Skip to content
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

Video doesn't resume playing after regaining focus #5377

Closed
spayton opened this issue Oct 27, 2020 · 1 comment
Closed

Video doesn't resume playing after regaining focus #5377

spayton opened this issue Oct 27, 2020 · 1 comment

Comments

@spayton
Copy link
Contributor

spayton commented Oct 27, 2020

Version

  • Phaser Version: from 3.20 -> current dev
  • Operating system: win10 x64
  • Browser: Desktop chrome 86

Description

A playing video pauses when swapping to another browser tab but doesn't resume when swapping back

Example Test Code

To reproduce, simply visit the labs video example, then switch to another tab on same browser, then back. the video will have stopped playing.

Additional Information

It is noticed that on regaining focus, an attempt is made to resume video playback in globalResume() but is prevented from doing so because _codePaused is set. The _codePaused property is set true on creation and never cleared, I'd guess that it should be cleared on playback.

@photonstorm
Copy link
Collaborator

Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants