Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save svagionitis/5445090 to your computer and use it in GitHub Desktop.
Save svagionitis/5445090 to your computer and use it in GitHub Desktop.
Sequence Diagram For Loading an HLS stream (Error fetching data from remote server) for http://www.websequencediagrams.com/
<div class="wsd" wsd_style="vs2010"><pre>
# Errors fetching data from remote server
title Sequence Diagram For Loading an HLS stream (Error fetching data from remote server)
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_EMPTY
readyState: HAVE_NOTHING
end note
HigherLayer->MediaPlayer: load()
note right of MediaPlayer
networkState: NETWORK_NO_SOURCE
end note
MediaPlayer->VideoPipeline: Can you fetch the media data from the remote server?
note right of MediaPlayer
networkState: NETWORK_LOADING
end note
MediaPlayer->HigherLayer: loadstart
MediaPlayer->HigherLayer: progress
note right of VideoPipeline
# For HLS specification see http://tools.ietf.org/html/draft-pantos-http-live-streaming-11
1. Connect successfully to remote server.
2. Some media data has been received but the connection interrupted or aborted by the user.
end note
note right of MediaPlayer
readyState >= HAVE_NOTHING
The readyState can be larger than HAVE_NOTHING \nbecause some data might have been downloaded.
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
alt readyState: HAVE_NOTHING
note right of MediaPlayer
networkState: NETWORK_EMPTY
end note
MediaPlayer->HigherLayer: emptied
else readyState > HAVE_NOTHING
note right of MediaPlayer
networkState: NETWORK_IDLE
end note
end
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