stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.
https://stephenlb.github.io/webrtc-sdk/
MIT License
853 stars 278 forks source link

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

Open crookedbard opened 5 years ago

crookedbard commented 5 years ago

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 commented 5 years ago

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

stephenlb commented 5 years ago

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

crookedbard commented 5 years ago

this didn't help

stephenlb commented 5 years ago

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.