Chapter

data class Chapter(val id: String, val start: Long, val end: Long, val mediaMetadata: MediaMetadata) : TimeRange, Parcelable

Represents a chapter.

A chapter is a segment of a media item defined by a start and end time. It can also contain associated metadata, such as a title or image.

Constructors

Link copied to clipboard
constructor(id: String, start: Long, end: Long, mediaMetadata: MediaMetadata)

Properties

Link copied to clipboard
open val duration: Long

The duration of the time range, in milliseconds.

Link copied to clipboard
open override val end: Long

The end position of the chapter, in milliseconds.

Link copied to clipboard
val id: String

The unique identifier of the chapter.

Link copied to clipboard

The MediaMetadata associated with the chapter.

Link copied to clipboard
open override val start: Long

The start position of the chapter, in milliseconds.

Functions

Link copied to clipboard
open operator fun contains(positionMs: Long): Boolean

Checks if the provided position, in milliseconds, is within this TimeRange.

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)