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
855 stars 278 forks source link

Added toggleAudio and toggleVideo #52

Closed giorgioma closed 5 years ago

giorgioma commented 6 years ago

This enables developers to change streams being sent mid-call by exposing functions as in: var phone = window.PHONE({...}); phone.camera.toggleAudio(); phone.camera.toggleVideo();

.toggleVideo() might require some socket event to inform the other part it needs to hide the video or a black video will be shown.

These functions work only on initialized user devices. It does not take care of asking for new permissions or renegotiations.

stephenlb commented 5 years ago

Merged!