Ticket #1049 (closed feature: invalid)
Begin and end options for streaming
| Reported by: | pablo | Owned by: | jeroen |
|---|---|---|---|
| Priority: | Low | Milestone: | Backlog |
| Component: | general | Keywords: | |
| Cc: | Forum thread: |
Description
The player currently has two options, start and duration which allows users to set the start position and content length of a clip. (Strictly speaking, the start option is only fully supported by RTMP, HTTP pseudostreaming and YouTube).
There is an additional use case, where a publisher may want to treat a certain segment of a clip as though it were the entire clip. For this, we need two additional options, begin and end. begin is the point in the video where the player starts (left side of the controlbar). end is the point in the video where the player stops (right side of the controlbar). The duration is therefore end minus begin. If end is not set, we don't have to force the duration (just wait for NetStream.Stop), which'll fix issues with videos in which the duration metadata is set slightly shorter than the actual length of the video stream.
This table describes the behavior of the player based on the combinations of these options:
| start | duration | begin | end | Behavior |
| - | - | - | - | Duration set by metadata |
| - | - | - | X | Duration = end |
| - | - | X | - | Clip starts at begin, duration = duration-begin |
| - | - | X | X | Clip starts at begin, duration = end - begin |
| - | X | - | - | Same behavior as only end set |
| - | X | - | X | Not valid; end takes precedence |
| - | X | X | - | Clip starts at begin, end = begin + duration |
| - | X | X | X | Not valid; duration is calculated by end - begin |
| X | - | - | - | Clip seeks to start position on playback |
| X | - | - | X | Clip seeks to start, finishes at end. |
| X | - | X | - | Clip begins at begin + start, can't seek before begin |
| X | - | X | X | Clip only seekable between begin and end, starts at begin + start |
| X | X | - | - | Clip limited by duration, begins playback at start, but still seekable to 0:00 |
| X | X | - | X | Not valid; duration is determined by end |
| X | X | X | - | Clip limited by duration, begins playback at begin + start, seekable from begin |
| X | X | X | X | Clip seekable between begin and end, begins at begin + start (duration is ignored; calculated from begin and end) |
