You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chrome/Opera throw "DOMException: The play() request was interrupted by a new load request." on session.accept() #349
I have this webphone project that uses SIP.js 0.7.5 . The javascript code is supposed to be a straightforward implementation of a webphone GUI. My HTML templates output a pair of
My available browsers are:
firefox-48.0.1-1.fc24.x86_64
google-chrome-stable-53.0.2785.92-1.x86_64
opera-developer-41.0.2329.0-0.x86_64
The webphone is supposed to connect to an Asterisk 11.21.0 instance.
Under Firefox, both call origination and call answering work correctly from the webphone.
Under Opera or Google Chrome, call origination works correctly. However, call answering fails. There is no audio, and the console shows this error:
sip-0.7.5.js:11567 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request.
attachMediaStream @ sip-0.7.5.js:11567
attachAndPlay @ sip-0.7.5.js:11594
render @ sip-0.7.5.js:11601
(anonymous function) @ sip-0.7.5.js:11283
render @ sip-0.7.5.js:11280
sdpCreationSucceeded @ sip-0.7.5.js:6041
(I was originally using the minified version, but switched to the development version in order to have a backtrace)
I am well aware of issue #315. Please, do NOT close this as a duplicate. The referenced issue never got an answer about what to do to work around the exception. I am not calling a play() method anywhere in my code, and I am not touching or referencing the MediaStreams anywhere, since I have no need for it.
Following what I understand from the comment on #315 by @svarunan , I tried dynamically adding the
Using the development SIP.js, I found out that inserting:
if (!element.paused) element.pause();
right before the call to environment.revokeObjectURL() (of which there is only one instance in the nested function attachMediaStream()) will silence the DOMException under Chrome. However, it does not fix the absence of audio.
Activity
avillacis commentedon Sep 2, 2016
Just to be clear, I also implemented the suggestion to .pause() then remove the tag by @svarunan , also without success.
avillacis commentedon Sep 5, 2016
Using the development SIP.js, I found out that inserting:
if (!element.paused) element.pause();right before the call to environment.revokeObjectURL() (of which there is only one instance in the nested function attachMediaStream()) will silence the DOMException under Chrome. However, it does not fix the absence of audio.
DanEdwards61 commentedon Sep 15, 2016
Chrome has an issue open for this. Not sure if this is your case or not, but see https://bugs.chromium.org/p/chromium/issues/detail?id=593273
james-criscuolo commentedon Nov 1, 2017
Chrome now leaves a link next to that error:
https://developers.google.com/web/updates/2017/06/play-request-was-interrupted
I don't believe this is internal to the library, so I'll close.