Hello experts,
Is it possible to upgrade an audio call to audio+video call without renegotiation? I want to avoid renegotiation to upgrade the calls quicker. I wouldnt want the user to wait 3 seconds to start seeing the video. (FYI, my application does not support Trickle ICE and BUNDLE SDP for now)
To do this, I plan to send out both audio and video tracks in SDP even if the user selected just audio call. However I disable the video track to begin with -
stream.getVideoTracks()[0].enabled = false;
The receiver sees a black screen. When the caller upgrades the call to audio+video, I enable the video track and the reciever is able to see the video instantly.
However, this approach isn't desirable for 2 reasons. Firstly, webcam light is on even if video track is disabled. Second, this is inefficient since there will be a minimal flow of RTP packets even when the video track is disabled.
I got curious as to how commercial players such as 'Slack' do the same. From chrome webrtc-internals, I found that Slack does not renegotiate as well, instead adopts the same technique of sending both audio and video tracks in SDP for just audio call. However, I see no RTP packets being sent for video during audio call even though SDP has video tracks. When user enables video, I see change in local description regarding only 'ssrc msid' being replaced and the RTP packets starts flowing without renegotiation.
Something like this -
a=ssrc:23712514 msid:355b7517-fa05-4d9a-a1a7-e213f7ab4e7b fake-label-9OfhfeSOYQwCD1EE
- New Value(video enabled) -
a=ssrc:23712514 msid:355b7517-fa05-4d9a-a1a7-e213f7ab4e7b 306d58a2-f3db-4634-a70c-0682493208c0
The above change does not trigger re-negotiation and the web cam light turns on only after user enables video.
How can I achieve something similar in my application. Basically having video tracks in SDP(sendrecv), but not send any video RTP data for audio only calls and later enable video without renegotiation.