The PSDK supports seeking to a specific position (time) in live streams where the stream is either a sliding-window playlist or an event type and in VOD.
You can seek to a particular location in the stream.
Seeking in a live stream is allowed only for DVR.
Valid statuses are PREPARED, COMPLETED, PAUSED, and PLAYING. Being in a valid state ensures that the media resource has successfully loaded. If the player is not in a valid seekable status, attempting to call the following methods throws an IllegalStateException.
For example, wait for the PSDK to call your callback for the MediaPlayerStatusChangeEvent.STATUS_CHANGED event with PREPARED status.
This moves the play head to a different position in the stream. Note that the requested seek position might not coincide with the actual computed position.
function seek(position:Number):void;
This is important because the actual start position after the seek could be different than the requested position. Various rules might apply, including:
The seek operation is asynchronous, so the PSDK dispatches these events related to seeking:
The media player might readjust the seek position provided by the user. Therefore, check the callback for SeekEvent.SEEK_POSITION_ADJUSTED, which notifies the application that the position has been adjusted. The adjusted position is provided through event.actualPosition.