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
Uncaught (in promise) DOMException: The play() request was interrupted by a new load request. #421
Comments
I'm still seeing the error even with the try catch here. Not every time it's called though. |
Same here |
Hi @redannick @dananichev |
Only in Google Chrome: "buffer-controller.js:76 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request." hls.js version: https://github.com/dailymotion/hls.js/releases/tag/v0.5.41 P.S.:
|
The exception could be caught by handling the promise returned from the |
Indeed (more details here). Something like this should do the trick: const playPromise = media.play()
if (playPromise !== null) {
playPromise.catch(() => { /* discard runtime error */ })
} It will be fixed in a coming PR. |
@dighan Good link. I'd check for the catch method in the returned object to be a function, the strict comparison with null is not safe enough to be cross-platform, the method may return anything. |
@dighan And I wouldn't discard the error, rather it should be properly handled, and the relevant hls.js event should be triggered depending on the type of the caught error. |
Use it in the playlist extension Fixes #1063
@dighan, @sompylasar - FYI in a somewhat different scenario: flowplayer/flowplayer@ad49f21 |
I'm experiencing the same issue but in my case it only happens on my minified js file. Does this make any sense? The error object: {"type":"otherError",
"details":"internalException",
"fatal":false,"event":"hlsFragLoaded",
"err":{"message":"Uncaught ReferenceError: _0xd0ac is not defined (blob:http://playerapitest2.liquidplatform.com:7091/9b700624-eee0-4dc2-ba1c-5c38e497af02:1)"}} |
Here is an explanation of the error https://developers.google.com/web/updates/2017/06/play-request-was-interrupted |
I don't know if this is the case for you guys, but for me, the error seems to be inconsistent. For some stream URLs, my player plays the stream just fine, but in others, this exception is thrown. |
@notanewbie Both links show the promise rejection for me in Chrome Version 65.0.3325.162 (Official Build) (64-bit):
That the first ( |
Cool, thanks @sompylasar. I was only looking at the Network tab when the video wouldn't play. Quick follow up, the stream is actually broadcasting a black screen with no sound. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I had this same issue, but I was calling
However you don't need to |
The exception is thrown from the
src
assignment here:https://github.com/dailymotion/hls.js/blob/443f6f840798e2cfc92a5577ff971f5edece8afe/src/controller/buffer-controller.js#L67
Regardless of being labeled as
(in promise)
, the exception happens synchronously during the public API calls ofdetachMedia()
, as well as inrecoverMediaError()
anddestroy()
which both calldetachMedia()
internally.I think a
try..catch
like the one above that code won't hurt.The text was updated successfully, but these errors were encountered: