seek
Jumps to a new playback position.
virtual int seek(int64_t newPos) = 0;
If you call seek after playback is complete (i.e., after receiving the onPlayerSourceStateChanged callback reporting the playback state as PLAYER_STATE_PLAYBACK_COMPLETED or PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED), the SDK restarts playback from the specified position and triggers the onPlayerSourceStateChanged callback reporting the playback state as PLAYER_STATE_PLAYING.
If you call seek while playback is paused, after a successful call, the SDK jumps to the specified position. To resume playback, call resume or play.
Timing
You can call this method either before or after joining a channel.
Parameters
- newPos
- The new playback position in milliseconds.
Return Values
- 0: The method call succeeds.
- < 0: The method call fails.