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.
As of July 11, 2014 at 3:45 PM, this bug appears to have been fixed.
You don't need to do anything, other than wait for Google to fix the bug. The last time something like this happened, Google fixed the bug within a couple of days.
There are already 4 defects filed on google's issues site regarding this issue. I expect these will be consolidated soon, and hopefully fixed soon as well. I list them here so you can star them if you want to be notified when the defect status changes:
https://code.google.com/p/gdata-issues/issues/detail?id=6482
https://code.google.com/p/gdata-issues/issues/detail?id=6480
https://code.google.com/p/gdata-issues/issues/detail?id=6481
https://code.google.com/p/gdata-issues/issues/detail?id=6484