TVSDK supports seeking to a specific position (time) where the stream is a sliding-window playlist, in both video on demand (VOD) and live streams.
Seeking in a live stream is allowed only for DVR.
Set up callbacks for seeking.
Seeking is asynchronous, so TVSDK dispatches the following seek-related events:
SeekEvent.SEEK_BEGIN- Seek starting.
SeekEvent.SEEK_END- Seek successful.
SeekEvent.SEEK_POSITION_ADJUSTED- readjusted the seek position provided by the user.
Wait for the player to be in a valid status for seeking.
Valid states are PREPARED, COMPLETED, PAUSED, and PLAYING.
Listen for the appropriate event to see when the user is scrubbing.
Pass the requested seek position (milliseconds) to the
You can seek only in the asset’s seekable duration. For video on demand, the duration is from 0 through the asset’s duration.
This moves the play head to a new position in the stream, but the final computed position might differ from the specified seek position.
Wait for TVSDK to dispatch the
Retrieve the final adjusted play position using event.actualPosition.
This is important because the actual start position after the seek can be different from the requested position. Various rules might apply, including:
Use the position information when displaying a seek scrub bar.