Why does the first subscription of my WebRTC stream take a significantly longer time than subsequent subscriptions?

Publishing an RTMP stream will yield nearly instantaneous subscribing via RTMP, but when the first RTC subscriber joins there is set-up involved meaning roughly 4-8 seconds in most cases; subsequent RTC subscribers will be speedier due to the set-up already having been done for the first. In the STUN spec (which is used in WebRTC) there is a minimum that must be supported for interconnection and that's 3 seconds, we actually do it faster in the order of about ~100 ms usually; so in most cases what you are really "waiting" around for when subscribing to WebRTC,  is a keyframe or configuration data which can flow from a publisher every 3-6 seconds or more (depends upon the encoder settings). 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.