getTimelinePositionFromApproximateOffsetMs

Get the timeline position that most closely matches an offset into the timeline. If the offset is negative, the position at the start of the timeline will be returned. If the offset is larger than the duration of the timeline, the position at the end of the timeline will be returned.

While a segment's audio length is not yet known, an offset at or past the sum of the known lengths before that segment may return a position inside that segment or a position after it. An offset from getApproximateOffsetMs then does not reliably convert back to the same position. To return to a position later, store the SyncMediaTimelinePositionData and pass it to ColibrioAudioPlayer.seekToTimelinePosition.

Parameters

approximateOffsetMs
  • Milliseconds into the timeline.