Skip to content

Instantly share code, notes, and snippets.

@lemming
Created November 7, 2018 23:30
Show Gist options
  • Save lemming/353112a83dd36432895617c704d74beb to your computer and use it in GitHub Desktop.
Save lemming/353112a83dd36432895617c704d74beb to your computer and use it in GitHub Desktop.
Player
Player
error -> Error
toDVR -> DVR
toLive -> Live
toArchive -> Archive
Archive
DVR
Live*
Trying playback
no frames in 10s -> Online?
track closed -> DVR
frames received -> Playing
Playing
no frames in 10s -> Reconnecting
Reconnecting
frames received -> Playing
no frames in 30s -> Online?
Online?
online? -> DVR
offline? -> Something
Something
Onlines
Online camera
Online client
Online server
Error
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment