Repository navigation
Document connected/active event ordering and starting playback from the track event - #926
Open
bcostdolby wants to merge 4 commits into
Open
bcostdolby wants to merge 4 commits into
bcostdolby wants to merge 4 commits into
Conversation
…he track event Co-Authored-By: Brendon Costa <brendon.costa@dolby.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Brendon Costa <brendon.costa@dolby.com>
…xample Co-Authored-By: Brendon Costa <brendon.costa@dolby.com>
Contributor
|
bcostdolby
commented
Oct 19, 2026
Co-Authored-By: Brendon Costa <brendon.costa@dolby.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Viewer apps have treated
connectedas "a source is active" and started playback there, or started it from theactivebroadcast event. Neither is reliable:connectedcomes from the browser'sRTCPeerConnectionwhileactiveis sent by the server, so they arrive in either order, and onactivethe Web SDK has not yet delivered thetrackevent that carries the media. Result: media is decoded but the element never plays (black screen, no error).Broadcast Events page: new "Event ordering" note stating that
connectedand the firstactiveare independent, that neither should start playback, and that the SDK emitstrackonly after the firstactive.Web SDK "Track event" section: same explanation, plus the
trackexample now shows the recommended pattern instead of a placeholder helper:Assigning
srcObjecton everytrackevent (audio and video, same stream) withautoplayon the element avoids a one-shot guard that would keep a stale stream after a reconnect, and avoids an explicitplay()whose promise can be rejected by autoplay policy. The prose notesmutedis needed without a prior user gesture, and that an explicitplay()must be called right after assigningsrcObjectin this handler with its promise handled.Verified against a live stream with SDK 0.4.0 and 0.9.3 source: the old
connected-gated logic never plays whenactivetrailsconnected;play()from theactivehandler is aborted by the subsequentsrcObjectassignment; the pattern above played in 6/6 trials including 3/3 withactiveforced to arrive 300 ms afterconnected.Link to Devin session: https://dolby.devinenterprise.com/sessions/d8bbfd361f6242fb8feab68067e55d8c
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/d8bbfd361f6242fb8feab68067e55d8c?variant=devin
Requested by: @bcostdolby