I'm using cordova and using iframe to include youtube video.
I am using this line to put the video in the iframe.
ylink='<iframe width="100%" height="'+height+'" src="'+ylink+'?rel=0&controls=1&showinfo=0&modestbranding=1" frameborder="0" allowfullscreen allownetworking="internal"></iframe>'
$('#list_holder').html(ylink);
ylink format was like https://www.youtube.com/embed/XXXXXXXX
It loads perfectly. Video thumbnail loads. Then I start the play button. Video plays as expected. Problem is that it also trigger the right click context menu of youtube. I tried to touch other places of the video to hide it, but it reappears in the places where I touched.
Then I tried few suggestions. Last I end up with this huge url for using all those suggestions.
ylink='<iframe width="100%" height="'+height+'" src="'+ylink+'?
rel=0&controls=1&showinfo=0&modestbranding=1&disablekb=1&wmode=transparent" frameborder="0"
allowfullscreen allownetworking="internal" oncontextmenu="return false;"></iframe>'
Still not working. Most suggestions were using allownetworking="internal"
but I used it and no change. It's happening only on touch device. I'm testing on Android 2.3 and 4.0.4
How can I stop this context menu or hide it, disable it? I only need the seek control and fullscreen control. I don't need anything else in the video. What I'm missing??
[ Forgot to mention: Funny thing is that the first line worked perfectly yesterday and not working today. Context menu wasn't showing yesterday. Now I'm wondering if youtube changed anything or not.]
There is nothing wrong with your code, it's a recent bug with the youtube api. Sit tight and I expect it will work as expected within the next 24 hours. Revert your URL changes because since you know it was working fine yesterday it will continue to work once youtube have fixed the problem.
I've experienced the same issue today on an app that's been in the app store for more than a year.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With