getChapterAtPosition

fun Player.getChapterAtPosition(positionMs: Long = currentPosition): Chapter?

Retrieves the Chapter that encompasses the given position in the media playback.

Return

The Chapter at the given position, or null if no chapter is found at that position.

Parameters

positionMs

The position in the media playback, in milliseconds.