seek

abstract fun seek(source: Source, time: Double)

Seeks to the specified time in the specified source. The source must be part of the playback session.

Has no effect if there is no active playback session.


abstract fun seek(source: Source, seekTarget: SeekTarget?)

Seeks in the specified source at the position specified by seekTarget.

If seekTarget is null, seek to the source's default position.

For example:

  • player.playlist.seek(source): Seek to the source's default position (see SourceOptions).

  • player.playlist.seek(source, TargetPosition(offset = 0)): Seek to the beginning for a VoD or the live edge for a live-stream.

  • player.playlist.seek(source, TargetPosition(offset = -10, TimelineReferencePoint.End)): Seek to 10s before the end (VoD) or 10s before live edge (live stream).

Limitations:

Has no effect if there is no active playback session.