Re: [webrtc-pc] Tweak MediaStreamTrack.onunmute: at decode, not reception (#3076)

Sorry I have to completely backtrack here after talking with Olga from our Audio team.

`MediaStreamTrack.onunmute` firing "early" (when packet is received) is a FEATURE, not a bug, because `track.onunmute = () => audioTag.srcObject = <stream with track>;` is a pre-requisite for audio being decoded in the first place due to Chrome's pipeline. The spec does not mandate that we decode if we don't have a sink and there are legitimate reasons for not doing so.

Another thing, the earlier we set srcObject, the less risk that we don't start playout in time which would result in lost audio or video frames. Therefore having an onunmute that fires prior to jitter buffer is actually a good thing. If the app cares about the difference between packet reception and first decode that is information that is already available elsewhere and does not need to be copied here.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/3076#issuecomment-3346377559 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 29 September 2025 11:15:37 UTC