Skip to content

Chrome/Opera throw "DOMException: The play() request was interrupted by a new load request." on session.accept() #349

Closed

Description

@avillacis

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

Activity

  1. avillacis commented on Sep 2, 2016

    @avillacis
    Author

    Just to be clear, I also implemented the suggestion to .pause() then remove the tag by @svarunan , also without success.

  2. avillacis commented on Sep 5, 2016

    @avillacis
    Author

    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.

  3. DanEdwards61 commented on Sep 15, 2016

    @DanEdwards61
  4. james-criscuolo commented on Nov 1, 2017

    @james-criscuolo
    Collaborator

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions