Last active
December 16, 2015 15:09
-
-
Save svagionitis/5453854 to your computer and use it in GitHub Desktop.
Sequence Diagram For Playback a Video File From Disk (No errors) for http://www.websequencediagrams.com/
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
# No errors | |
title Sequence Diagram For Playback a Video File From Disk (No errors) | |
participant "Higher Layer (HTML page, JS)" as HigherLayer | |
participant "Media Player (Webkit {HTMLMediaElement, MediaPlayer, MediaPlayerPrivate}, Irisplayer)" as MediaPlayer | |
participant "Video pipeline(Local Disk, 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. Media Player reads enough data until the buffer is full. | |
2. Decoder decodes the data to video frames. | |
end note | |
VideoPipeline->MediaPlayer: Enough data returned for playback. | |
note right of MediaPlayer | |
networkState: NETWORK_IDLE | |
end note | |
MediaPlayer->HigherLayer: suspend | |
note right of MediaPlayer | |
readyState: HAVE_ENOUGH_DATA | |
end note | |
MediaPlayer->HigherLayer: canplay | |
MediaPlayer->HigherLayer: canplaythrough | |
MediaPlayer->HigherLayer: playing | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment