stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.

Home Page:https://stephenlb.github.io/webrtc-sdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

crookedbard opened this issue · 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);
            });

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

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

this didn't help

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.