Youtube Embedded Videos - View on Youtube

Hello everyone

In my app I have one view where I display a list of youtube videos.
I’m using youtube iframe API and the videos are displayed fine in my view.

The problem is, when the user touches the Youtube watermark on the video to “view on youtube” the video opens on youtube app and the user can’t come back to the app.
Is there a way I can open the video fullscreen inside my app, without the “view on youtube” option?

On iOS the Youtube player has a “Done” button which goes back to the app, so that’s fine. Can’t I have the same behaviour on Android too?

Thank you!

Add to url ?modestbranding=1 or &showinfo=0 you tube api

1 Like

It didn’t work.
The Youtube watermark still appears over the video.

Is there a way I can play the video fullscreen inside my app?

I just faced the same issue within my app. There is a nice fix using html5 sandbox:

<iframe sandbox="allow-scripts allow-same-origin" width="560" height="315" ng-src="{{fullVideoUrl}}" frameborder="0" allowfullscreen></iframe>

Just update your iframe code to include:

sandbox="allow-scripts allow-same-origin"

For the full screen option add:


Hope that helps :wink:


Does anyone know how to do this in a more native manner? So the the user doesn’t need to download the youtube app or embed an iframe? Currently, I don’t even have the “done” button. Also, I don’t really want to use the youtube lite lib just to get a “done” button.

So, Apple doesn’t really like the idea of “disabling” YouTube’s feature,
the error from the sandbox is:

Blocked opening $URL in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

Is there a way to catch that event and display something to the user instead ? ( Apple wants a “gateway” instead of disabling that button ) ( see my personal issue at: YouTube logo link is taking over the app )

try to set this option, maybe it helps.

It is easy to embedd the video it shows the youtube thumbnail with play button. There was a option to embed just copy/paste the code on your site.