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

Silence Chrome error about interrupted play() requests #836

Closed
joeyparrish opened this issue May 31, 2017 · 3 comments
Closed

Silence Chrome error about interrupted play() requests #836

joeyparrish opened this issue May 31, 2017 · 3 comments
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

Chrome sometimes throws this error in the JS console:

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause()

This is not a real problem, and this log comes from Chrome, not the app. The error is very confusing to developers, and it often shows up as a red herring in Shaka Player bug reports.

App developers have been complaining about it to Chrome for more than a year now, and although the error appears less often since Chrome 52, it continues to occur in some cases.

Since this error adds no value for us and is confusing for developers, we should silence this error with a polyfill on HTMLMediaElement.prototype.play.

@joeyparrish joeyparrish added the type: enhancement New feature or request label May 31, 2017
@joeyparrish joeyparrish added this to the v2.2.0 milestone May 31, 2017
@joeyparrish
Copy link
Member Author

Filed an issue on Chromium to fix at a platform level as well: https://bugs.chromium.org/p/chromium/issues/detail?id=728294

@joeyparrish joeyparrish added the flag: good first issue This might be a relatively easy issue; good for new contributors label May 31, 2017
@joeyparrish
Copy link
Member Author

Quickest repro steps for Shaka Player:

  1. Open the demo app and the JS console
  2. Select any clip (Heliocentrism is shortest)
  3. Click "Load"
  4. Play the clip to the end
  5. Select any other clip
  6. Click "Load"

You will see in the console:

Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.

joeyparrish added a commit that referenced this issue Jun 5, 2017
Closes #836

Change-Id: Ie5b42bc707ce7443641e86c04ec116fd732bbbae
@joeyparrish
Copy link
Member Author

Cherry-picked to v2.1.3.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants