-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep youtube iframe video playing when app is in background #562
Comments
dealing with the same issue now. Audio playing but video not, seems to be no solution for this atm |
I've had to deal with this bug for years. The best solution I have is:
I don't like this solution though because the video html 5 element will fire an It'd be nice if you could set it to |
@the7erm I have tried with above solution but it not working for youtube iframe. |
for me also not working for html5 video tag using mp4, tested on Android 8 |
That's unfortunate. I guess when elements are in an iframe you can't because of browser security stuff. It might also be that youtube has code that forces it to pause. |
I have the same problem, have you figured it out? |
@mh4ck No, I did not get any solution yet. |
I managed to fix it by putting a setinterval and play youtube player api every 1s it will work fine :) |
Hi, can you please elaborate a little? Will be very helpful to others if you can provide code example, you env and/or some comments. |
For anyone still looking for a solution, I added an event listener for the visibility changed event and when the browser is hidden, I wait a few seconds then I force the video to play again. See below: |
In Ionic 5, Is there a way to keep playing youtube iframe video when we put app in background. Because when app goes to background the iframe video gets paused.
I am enabling background mode using this plugin, but it is not working for iframe video.
Can anyone please provide any solution to this?
The text was updated successfully, but these errors were encountered: