How to change dynamic video resolution during a call (in WebRTC)

I am using SimpleWebRTC lib for my project.

  • How to change dynamic resolution of remote video during call (for example google hangout on browser resize)
  • resizing the video call will resize the remote video resolution (.videoWidth.videoHeight)
  • Is this related to plan webrtc b ?

I would like to know how it is implemented for many peer-to-peer connections.

+3


source to share


1 answer


Tell submit (say via DataChannels) to change the resolution to NxM. At the end of the submission, until the new APIs are able to resize the getUserMedia / MediaStream capture on the fly, you can request a second camera / microphone stream and replace the existing streams with them. (Note: this will cause onnegotiationneeded, i.e. renegotiation, and there will be a new output stream on the other side.)

A smoother (but only in Firefox so far - in the process of standardization) would be to use RTPSender.replaceTrack () to change the video track without touching the sound or revisiting.



Another option that will exist (although not in the browser yet) is to use RTPSender.width / height (or any other syntax) to scale the outgoing video prior to encoding.

Plan B for multithreading / BUNDLE (which Chrome implements) was not adopted; Firefox has now (in Fx38, which comes out in a few days) has a Unified Plan; expect to see a blog post soon from someone on how to get these two working together (until Chrome implements a single plan)

+2


source







All Articles