You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 7, 2018. It is now read-only.
See issue #196.
Commit 9e2053f updated the definition
of the play state but it failed to check for pending tasks. As a result,
when we are play-pending, we'd report 'paused' since we don't have
a resolved start time.
I've gone through all the possible states and revised this based on the
following chart. Hopefully it's right this time.
+---------+-------+------+-------+--------------------------------------+
| Current | Start | Play | Pause | State / Notes |
| time | time | task | task | |
+---------+-------+------+-------+--------------------------------------+
| o | o | o | o | 'idle' |
+---------+-------+------+-------+--------------------------------------+
| o | o | o | x | [1] Normally pausing sets the hold |
| | | | | time (current time) but if the |
| | | | | timeline is cleared while pending |
| | | | | this could happen. |
| | | | | We should report 'paused' because |
| | | | | we won't be ready until we have a |
| | | | | current time to use and at that |
| | | | | point we will end up being in the |
| | | | | regular paused state: resolved |
| | | | | current time, unresolved start time. |
+---------+-------+------+-------+--------------------------------------+
| o | o | x | o | [2] Not expected to happen because |
| | | | | we don't expect to play without |
| | | | | either a start time or hold time |
| | | | | (unless we had an aborted pause and |
| | | | | the timelineline was cleared?). |
| | | | | If this were to happen then |
| | | | | presumably we believe we can run the |
| | | | | pending play task (or else we would |
| | | | | have canceled it) so we should |
| | | | | 'running' or 'finished'. |
+---------+-------+------+-------+--------------------------------------+
| o | o | x | x | [3] Cannot have two pending tasks at |
| | | | | once. |
+---------+-------+------+-------+--------------------------------------+
| o | x | o | o | 'idle' |
+---------+-------+------+-------+--------------------------------------+
| o | x | o | x | As with [1], 'paused'. |
+---------+-------+------+-------+--------------------------------------+
| o | x | x | o | As with [2], 'running' / 'finished'. |
+---------+-------+------+-------+--------------------------------------+
| o | x | x | x | As with [3], n/a. |
+---------+-------+------+-------+--------------------------------------+
| x | o | o | o | 'paused' |
+---------+-------+------+-------+--------------------------------------+
| x | o | o | x | 'paused' |
+---------+-------+------+-------+--------------------------------------+
| x | o | x | o | 'running' / 'finished' |
+---------+-------+------+-------+--------------------------------------+
| x | o | x | x | As with [3], n/a. |
+---------+-------+------+-------+--------------------------------------+
| x | x | o | o | 'running' / 'finished' |
+---------+-------+------+-------+--------------------------------------+
| x | x | o | x | 'paused' |
+---------+-------+------+-------+--------------------------------------+
| x | x | x | o | 'running' / 'finished' |
+---------+-------+------+-------+--------------------------------------+
| x | x | x | x | As with [3], n/a. |
+---------+-------+------+-------+--------------------------------------+
0 commit comments