-
Notifications
You must be signed in to change notification settings - Fork 60
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
[iOS] Video continues playing after you leave page #50
Comments
I believe this is easily solved by just running the destroy method on the video. Videos must be destroyed as on iOS there is a hard limit of around 15-20 videos. Soon as you hit this, it'll stop rendering videos. |
@bnussey yes, but maybe it should be done automatically by the plugin? That would make everything simpler. |
Hey @lukeramsden I disagree, its a common pattern and good practice to run necessary destroys when leaving a page. |
Did not know about |
I knew about it, that's what I'm currently doing, I just think it's good practice to have to plugin clean up after itself. |
@lukeramsden -- the plugin will not know when to do that, it relies on you to specify that. Feel free to provide a PR if you'd like though. |
Is there no way to bind it to the onNavigatingFrom event? I'll have a go at it later cause I'm on my phone right now. |
@bnussey Just FYI, I tested it with
|
Hey @manijak just depends on your specific scenario. If you want to come back to the video and play it, then you just need to pause it. If you never want to come back to the video, and the page is going to be reloaded the next time you want to access it, you destroy it. But please make sure you're destroying at some point otherwise will run into issues |
Here is another issue. The video player gets paused and mute when I switch to the iOS home screen, but when I lock device everything works correctly. I think the issue is in the native script’s videoplayer. |
Started at #46
If you leave a page, the video continues playing in the background, but only on iOS. Potential fix to make video run destroy() or suspend() on leaving the page?
The text was updated successfully, but these errors were encountered: