Cordova - Youtube iFrame Embed - Fullscreen No video

This is a strange problem. Running on Android Cordova device, if I have an iFrame, embed Youtube video with width and height set to 100%:

<iframe width="100%" height="100%" src="https://www.youtube.com/embed/2Xk744838J4" frameborder="0" allowfullscreen></iframe>

      

When you switch to full screen mode with the built-in control, the screen goes black. No video, but audio continues to play. Rotating the screen doesn't help.

If I set a fixed width and height:

<iframe width="560" height="315" src="https://www.youtube.com/embed/2Xk744838J4" frameborder="0" allowfullscreen></iframe>

      

When switching to full screen mode, the screen is initially black. When I turn the screen, the video shows. Better than the first scenario.

Sometimes it only works for both scenarios, but most of the time it has the problems described above.

I am working on Android 7.0, Samsung S7. Is this just my device or some kind of error?

+3


source to share





All Articles