Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3755

YouTube API iFrame - Keep YouTube video iFrame playing while phone locked

$
0
0

I would like to know if it is possible to keep a YouTube API iFramme video playing while my phone is locked.I mean, I'm using the YouTube API iFrame to embed a YouTube video on my website. But when I lock my phone, the video stops playing. However, when I lock my computer, the video continues playing.How can I "fake" a "desktop iFrame" or how can I force, in JS, the video to play?

Thanks!

EDIT: I tried something like this:

function onPlayerStateChange(event) {    player.playVideo()}

It works only on some phones, but not for all...

It is not a problem if I can't stop playing the video after: it's for streaming, so I just have to mute the video if I want to "stop" it.


Viewing all articles
Browse latest Browse all 3755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>