webrtc-sdk icon indicating copy to clipboard operation
webrtc-sdk copied to clipboard

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

Open crookedbard opened this issue 7 years ago • 4 comments

Sometimes I get this error after the ready function has been called: // As soon as the phone is ready we can make calls

phone.ready(function() {
      console.log('ready');
}

It happens when I start and stop camera repeatedly. Because of this I can't see my local video cam:

                // Local Camera Display
                phone.camera.ready(video => {
                localVideo.appendChild(video);
            });

crookedbard avatar Oct 25 '18 10:10 crookedbard

I stop the camera like this: image And after that I try to call again phone.startcamera(); And then I get that error.

crookedbard avatar Oct 25 '18 10:10 crookedbard

You need to PHONE.hangup() after stopping the camera. Hope this works!

stephenlb avatar Oct 30 '18 20:10 stephenlb

this didn't help

crookedbard avatar Nov 02 '18 13:11 crookedbard

Oh! Yes, the demo apps uses audio DOM APIs. This isn't part of the WebRTC SDK. You can exclude this by removing all .play() calls. This will fix your issue.

stephenlb avatar Nov 02 '18 17:11 stephenlb