-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add diagrams for playlist loaders (#426)
- Loading branch information
1 parent
7040b7d
commit 52201f9
Showing
38 changed files
with
734 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
119 changes: 119 additions & 0 deletions
119
docs/images/sources/dash-playlist-loader-mpc-mg-sequence.plantuml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
@startuml | ||
|
||
header DashPlaylistLoader sequences | ||
title DashPlaylistLoader sequences: Master Manifest with Alternate Audio | ||
|
||
Participant "MasterPlaylistController" as MPC #red | ||
Participant "MasterDashPlaylistLoader" as MPL #blue | ||
Participant "mainSegmentLoader" as SL #blue | ||
Participant "AudioDashPlaylistLoader" as APL #green | ||
Participant "audioSegmentLoader" as ASL #green | ||
Participant "external server" as ext #brown | ||
Participant "mpdParser" as parser #orange | ||
Participant "mediaGroups" as MG #purple | ||
Participant Tech #lightblue | ||
|
||
== Initialization == | ||
|
||
MPC -> MPL : construct MasterPlaylistLoader | ||
MPC -> MPL: load() | ||
|
||
== Requesting Master Manifest == | ||
|
||
MPL -> MPL : start() | ||
|
||
MPL -> ext: xhr request for master manifest | ||
ext -> MPL : response with master manifest | ||
|
||
MPL -> parser: parse manifest | ||
parser -> MPL: object representing manifest | ||
|
||
note over MPL #lightblue: trigger 'loadedplaylist' | ||
|
||
== Requesting Video Manifest == | ||
|
||
note over MPL #lightblue: handling loadedplaylist | ||
MPL -> MPL: media(x) | ||
|
||
alt if no sidx | ||
note over MPL #lightgray: zero delay to fake network request | ||
else if sidx | ||
break | ||
MPL -> ext: request sidx | ||
end | ||
end | ||
|
||
note over MPL #lightblue: trigger 'loadedmetadata' on master loader [T1] | ||
|
||
note over MPL #lightblue: handling 'loadedmetadata' | ||
|
||
opt vod and preload !== 'none' | ||
|
||
MPL -> SL: playlist() | ||
MPL -> SL: load() | ||
|
||
end | ||
|
||
== Initializing Media Groups, Choosing Active Tracks == | ||
|
||
MPL -> MG: setupMediaGroups() | ||
MG -> MG: initialize() | ||
|
||
== Initializing Alternate Audio Loader == | ||
|
||
MG -> APL: create child playlist loader for alt audio | ||
|
||
MG -> MG: activeGroup and audio variant selected | ||
MG -> MG: enable activeTrack, onTrackChanged() | ||
MG -> ASL: reset audio segment loader | ||
|
||
== Requesting Alternate Audio Manifest == | ||
|
||
MG -> MG: startLoaders() | ||
|
||
MG -> APL: load() | ||
APL -> APL: start() | ||
APL -> APL: zero delay to fake network request | ||
|
||
break finish pending tasks | ||
MG -> Tech: add audioTrack | ||
MPL -> MPC: setupSourceBuffers_() | ||
MPL -> MPC: setupFirstPlay() | ||
|
||
loop mainSegmentLoader.monitorBufferTick_() | ||
SL -> ext: requests media segments | ||
ext -> SL: response with media segment bytes | ||
end | ||
end | ||
|
||
APL -> APL: zero delay over | ||
APL -> APL: media(x) | ||
|
||
alt if no sidx | ||
note over APL #lightgray: zero delay to fake network request | ||
else if sidx | ||
break | ||
MPL -> ext: request sidx | ||
end | ||
end | ||
|
||
== Requesting Alternate Audio Segments == | ||
|
||
note over APL #lightblue: trigger 'loadedplaylist' | ||
note over APL #lightblue: handling 'loadedplaylist' | ||
APL -> ASL: playlist() | ||
|
||
|
||
note over ASL #lightblue: trigger 'loadedmetadata' [T2] | ||
note over APL #lightblue: handling 'loadedmetadata' | ||
APL -> ASL: playlist() | ||
APL -> ASL: load() | ||
|
||
loop audioSegmentLoader.monitorBufferTick_() | ||
|
||
ASL -> ext: requests media segments | ||
ext -> ASL: response with media segment bytes | ||
|
||
end | ||
|
||
@enduml |
21 changes: 21 additions & 0 deletions
21
docs/images/sources/dash-playlist-loader-states.nomnoml.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#title: DASH Playlist Loader States | ||
#arrowSize: 0.5 | ||
#bendSize: 1 | ||
#direction: down | ||
#gutter: 10 | ||
#edgeMargin: 1 | ||
#edges: rounded | ||
#fillArrows: false | ||
#font: Arial | ||
#fontSize: 10 | ||
#leading: 1 | ||
#lineWidth: 2 | ||
#padding: 20 | ||
#spacing: 50 | ||
#stroke: #33322E | ||
#zoom: 1 | ||
|
||
#.label: align=center visual=none italic | ||
|
||
[HAVE_NOTHING] load()-> [HAVE_MASTER] | ||
[HAVE_MASTER] media()-> [HAVE_METADATA] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.