Chapter
@UnstableApi
interface Chapter : Metadata.Entry
ChapterFrame |
Chapter information ID3 frame. |
Chapter information, for example ID3 CHAP or Quicktime chap data.
The start and end times are an offset from the start of the current Timeline.Period. To use these times with seekTo, they must be converted to be relative to the window by subtracting the window offset.
Example conversion:
long windowOffsetMs = player.getCurrentTimeline().getWindow(player.getCurrentMediaItemIndex(), new Timeline.Window()).positionInFirstPeriodUs / 1000; long seekPositionMs = chapter.getStartTimeMs() - windowOffsetMs; player.seekTo(seekPositionMs);
Summary
Nested types |
|---|
class Chapter.BuilderBuilder for |
Public functions |
|
|---|---|
Long |
Returns the end time of the chapter in milliseconds, or |
Long |
Returns the start time of the chapter in milliseconds, or |
Label? |
getTitle()Returns the title of the chapter, or |
Boolean |
isHidden()Returns whether the chapter is hidden. |
Inherited functions |
||||||
|---|---|---|---|---|---|---|
|
Public functions
getEndTimeMs
fun getEndTimeMs(): Long
Returns the end time of the chapter in milliseconds, or TIME_UNSET if unknown.
getStartTimeMs
fun getStartTimeMs(): Long
Returns the start time of the chapter in milliseconds, or TIME_UNSET if unknown.