Const
Readonly
attributes: { Readonly
duration: Attribute<number | bigint | null, any>Indicates the duration, in milliseconds, of the current media being played back
or null when duration is not applicable (for example, in live streaming content with no known duration). This attribute shall never be 0.
Readonly
playbackIndicates the speed at which the current media is being played. The new PlaybackSpeed shall be reflected in this attribute whenever any of the following occurs:
• Starting of playback
• Resuming of playback
• Fast-forwarding
• Rewinding
The PlaybackSpeed shall reflect the ratio of time elapsed in the media to the actual time taken for the playback assuming no changes to media playback (for example buffering events or requests to pause/rewind/forward).
• A value for PlaybackSpeed of 1 shall indicate normal playback where, for example, playback for 1 second causes the media to advance by 1 second within the duration of the media.
• A value for PlaybackSpeed which is greater than 0 shall indicate that as playback is happening the media is currently advancing in time within the duration of the media.
• A value for PlaybackSpeed which is less than 0 shall indicate that as playback is happening the media is currently going back in time within the duration of the media.
• A value for PlaybackSpeed of 0 shall indicate that the media is currently not playing back. When the CurrentState attribute has the value of PAUSED, NOT_PLAYING or BUFFERING, the PlaybackSpeed shall be set to 0 to reflect that the media is not playing.
Following examples illustrate the PlaybackSpeed attribute values in various conditions.
Readonly
sampledIndicates the position of playback (Position field) at the time (UpdateAt field) specified in the attribute. The client may use the SampledPosition attribute to compute the current position within the media stream based on the PlaybackSpeed, PlaybackPositionStruct.UpdatedAt and PlaybackPositionStruct.Position fields. To enable this, the SampledPosition attribute shall be updated whenever a change in either the playback speed or the playback position is triggered outside the normal playback of the media. The events which may cause this to happen include:
• Starting or resumption of playback
• Seeking
• Skipping forward or backward
• Fast-forwarding or rewinding
• Updating of playback speed as a result of explicit request, or as a result of buffering events
Readonly
seekIndicates the furthest forward valid position to which a client may seek forward, in milliseconds from the start of the media. When the media has an associated StartTime, a value of null shall indicate that a seek forward is valid only until the current time within the media, using a position computed from the difference between the current time offset and StartTime, in milliseconds from start of the media, truncating fractional milliseconds towards 0. A value of Nas when StartTime is not specified shall indicate that seeking forward is not allowed.
Readonly
seekIndicates the earliest valid position to which a client may seek back, in milliseconds from start of the media. A value of Nas shall indicate that seeking backwards is not allowed.
Readonly
startIndicates the start time of the media, in case the media has a fixed start time (for example, live stream or television broadcast), or null when start time does not apply to the current media (for example, video-on-demand). This time is a UTC time. The client needs to handle conversion to local time, as required, taking in account time zone and possible local DST offset.
Readonly
commands: { Readonly
seek: Command<TypeFromFields, TypeFromFields, any>Upon receipt, this shall change the playback position in the media to the given position.
A MediaPlaybackCluster supports these elements if it supports feature AdvancedSeek.