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
854 stars 279 forks source link

Sound Volume #25

Closed yvain99 closed 8 years ago

yvain99 commented 8 years ago

How can I decrease the volume / turn off loudspeaker of receiving calls? It's like we turn on the loudspeaker on call received.

stephenlb commented 8 years ago

Callers must be in SEPARATE ROOMS. Calling devices are TOO CLOSE. Make sure to use separate rooms.

stephenlb commented 8 years ago

You can also use the video volume on receivers like this:

Example

Set video volume to 20%:

var vid = document.getElementById("myVideo");
vid.volume = 0.2;

reference: http://www.w3schools.com/tags/av_prop_volume.asp