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

phone.stop() is not working

bryanlimy opened this issue · comments

I tried on both v1 and v2, phone.stop() would be get me TypeError: phone.stop is not a function.

I wonder if there is a probably to terminate a PHONE and stop using the camera/mic.

Checking...

Try: PHONE.camera.stop() or phone.camera.stop().

Looks like only the session also has this method. Try using session.stop(). I'll update the docs to reference this correctly.

For code reference detail on Camera/Mic Media Access:

PHONE.camera.start = startcamera;
PHONE.camera.stop  = stopcamera;
PHONE.camera.video = () => myvideo;  // <-- direct access to local media stream

just tested

phone.camera.stop() works fine. it stops the MediaStreamTrack

Thanks!