cordova - youtube embedfailed to execute request fullscreen - cordova

I have created cordova android application in which some youtube video is embeded but on clicking youtube fullscreen button i am getting this error in
console log:
youtube embedFailed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.
The iframe code is
<iframe class="embed_video" src="" frameborder="0" allowfullscreen></iframe>
so how can i fix it.


Electron webview doesn't auto-play youtube videos

Electron webview doesn't auto-play youtube videos. I am using Electron version 4.0.4
I send autoplay=1 as mentioned in Youtube docs, but no luck.
In the same time, Youtube URL auto-plays just fine in incognito Chrome window when copy/pasted.
Here is the simple code of webview
<webview id="youtube" src=""></webview>
Any help will be greatly appreciated!

Youtube iframe API - Android fullscreen

I'm using the YouTube iframe api to embed a video.
When playing the video on an iPhone, the video automatically switches to full screen mode. I was wondering if it's possible to force the same behavior on an Android? (currently the video is played inline, which doesn't look so good).
There is no way to automatically play the video fullscreen. The closest you could get is to put the player in a fullscreen div and autoplay it using the url params:
<iframe width="100%" height="100%" src="//" frameborder="0" allowfullscreen></iframe>

Playing YouTube videos from embedded player

I am trying to play YouTube videos from a chrome extension and I get error code 150 frequently, specifically from videos that are from outside my country. I use Youtube Data API v3 to retrieve videos with the following parameters:
However, I often get videos that throw error code 150 when played from my embedded player.
One example is the following video:
Turn down for what
when played from an embedded player, it throws error 150, and the error message shown in the iframe is
the video contains content from SME. It is restricted from playback on certain sites.
I try the same video with the same embedded iframe player in youtube Player demo website hosted on, and it plays without the error code.
Therefore, I suspect the above error happens because I am trying to play the video from chrome extension, not because I am playing it from an embedded player. When I play it from the webpage hosted on my local machine (ex: file:///home/, I get the same error message.
To resolve the issue, I attempted to make YouTube think that I was a normal webpage instead of a chrome extension. By using chrome.webRequest, I added a referer information to the request header.
{ name: 'Referer', value: "" }
Even after the requestHeader was fixed, the error remained. I assume it's because there's origin property attached to youtube iframe player that specifies where the embedded player is from, regardless of the requestHeader.
My objective is either to find videos that are absolutely playable, or play videos that are only playable from a webpage (can't be played from chrome extension).
I would appreciate any help. Thank you.
Extra information
My iframe is initialized like below:
<iframe id="myframe" src="
enablejsapi=1&origin=chrome-extension:\\<my_extension_id>" frameborder="0" allowFullScreen></iframe>

Youtube redirecting http to https and using flash player instead of HTML5

I am using the youtube embed to show videos. Using IE11 (also FF28 but not FF27), when I am logged into my google account, the http request gets redirected to https, which isn't a big deal, except that even though I am specifying the html5 player, youtube serves up the flash player.
Is there some way to force http or force the html5 player over https?
Log in to google account and navigate to url ""
redirects to https and flash player
Log out of google account and navigate to url ""
Stays http and gets html5 player
Thanks in advance!
If you put the video in a sandboxed iframe and don't specifically allow plugins it can't load flashplayer, and thus has to use the html5 player. Note you have to at a minimum allow-same-origin, and allow-scripts or playback doesn't work. If you want the youtube button to be able to open the youtube page for the video you will also need allow-popups. Note that in the new window created from the youtube button the sandbox is still in effect even if navigated elsewhere manually by typing in a new URL.
<iframe seamless="" height="100%" width="100%"
sandbox="allow-same-origin allow-scripts"

iOS app playing youtube Video on Apple-TV

I would like to build an iOS app that plays youtube videos within a UIWebView window, with the UIWebView window being user selected to either play directly on the iOS device, or via AirPlay onto an AppleTV.
The website displayed in the UIWebView is my own website and will have javascript that will signal back-and-forth to the app when the youtube video ends (using the iframe api for youtube).
Question: Is the above possible?
Specifically, the iOS docs show that I need to have in the html within the UIWebView:
<video src="myPlaylist.m3u8"
height="300" width="400"
x-webkit-airplay="allow" >
<embed airplay="allow"
But with YouTube iFrame api I do not have access to the < video > tag so how do I make the AirPlay icon visible to the user on the UIWebView window?
Thank you for any direction anyone can provide.
UIWebView uses it's own movie player controller to play embedded videos. It offers a setting to allow AirPlay:
[_webView setMediaPlaybackAllowsAirPlay:YES];
When set to YES, you'll get the familiar AirPlay icon when the movie plays.