| 1 |
# |
| 2 |
# videostate.pystate |
| 3 |
# |
| 4 |
# Statemachine describing the playing of a video |
| 5 |
# [] = stop |
| 6 |
# > = play |
| 7 |
# || = pause |
| 8 |
# >> = fast forward |
| 9 |
# << = rewind |
| 10 |
|
| 11 |
statemachine VideoState: |
| 12 |
# basic >, [], and || controls |
| 13 |
Stopped-(play)->Playing |
| 14 |
Playing-(pause)-> Paused |
| 15 |
Playing-(stop)-> Stopped |
| 16 |
Paused-(stop)-> Stopped |
| 17 |
Paused-(play)->Playing |
| 18 |
|
| 19 |
# add >> and << controls - different meanings if occur while playing or stopped |
| 20 |
Playing-(fast_forward)->FastForward |
| 21 |
FastForward-(play)->Playing |
| 22 |
FastForward-(pause)->Paused |
| 23 |
FastForward-(stop)->Stopped |
| 24 |
Stopped-(fast_forward)->Forwardwinding |
| 25 |
Forwardwinding-(stop)->Stopped |
| 26 |
|
| 27 |
Playing-(rewind)->ReversePlaying |
| 28 |
ReversePlaying-(play)->Playing |
| 29 |
ReversePlaying-(pause)->Paused |
| 30 |
ReversePlaying-(stop)->Stopped |
| 31 |
Stopped-(rewind)->Rewinding |
| 32 |
Rewinding-(stop)->Stopped |