Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save svagionitis/5451670 to your computer and use it in GitHub Desktop.
Save svagionitis/5451670 to your computer and use it in GitHub Desktop.
Sequence Diagram For Playback an HLS stream (Error fetching data) for http://www.websequencediagrams.com/
<div class="wsd" wsd_style="vs2010"><pre>
# Error fetching data
title Sequence Diagram For Playback an HLS stream (Error fetching data)
participant "Higher Layer (HTML page, JS)" as HigherLayer
participant "HTMLMediaElement" as MediaPlayer
participant "Video pipeline(Remote Server, Demux, Decoder)" as VideoPipeline
note right of MediaPlayer
networkState: NETWORK_IDLE
readyState: HAVE_ENOUGH_DATA
end note
HigherLayer->MediaPlayer: play()
MediaPlayer->HigherLayer: play
MediaPlayer->HigherLayer: playing
MediaPlayer->VideoPipeline: Check if there are enough data for playback.
alt There are not enough data for playback
note right of MediaPlayer
networkState: NETWORK_LOADING
end note
MediaPlayer->HigherLayer: progress
note right of MediaPlayer
readyState: HAVE_CURRENT_DATA
end note
MediaPlayer->HigherLayer: waiting
note right of VideoPipeline
1. Connect successfully to remote server.
2. Some media data has been received \nbut the connection interrupted or aborted by the user.
end note
VideoPipeline->MediaPlayer: Error fetching data.
alt Connection interrupted
note right of MediaPlayer
networkState: NETWORK_IDLE
error: MEDIA_ERR_NETWORK
end note
MediaPlayer->HigherLayer: error
else Connection aborted
note right of MediaPlayer
error: MEDIA_ERR_ABORTED
end note
MediaPlayer->HigherLayer: error
note right of MediaPlayer
networkState: NETWORK_IDLE
end note
end
else There are enough data to playback
note right of MediaPlayer
No need to perform any particular action.
end note
VideoPipeline->MediaPlayer: No need to return any data.
end
</pre></div><script type="text/javascript" src="http://www.websequencediagrams.com/service.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment