Embedded youtube video on touch device showing right click context menu automatically

android, cordova, ios, youtube, youtube-api

Solution

As of July 11, 2014 at 3:45 PM, this bug appears to have been fixed.

Problem

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.]

Original source