Session

class Session(val windowUid: WindowUid, val window: Timeline.Window)

Represents a playback session associated with a MediaItem in a Timeline.

  • A session is linked to the period inside the timeline, see Timeline.getUidOfPeriod.

  • A session is created when the player interacts with a MediaItem.

  • A session is considered the "current" session if its mediaItem is the current MediaItem.

  • A session is destroyed when:

    • It's no longer the current session (e.g., switching media items).

    • Its mediaItem is removed from the playlist.

    • The player reach idle state.

Constructors

Link copied to clipboard
constructor(windowUid: WindowUid, window: Timeline.Window)

Properties

Link copied to clipboard

The MediaItem associated with this session.

Link copied to clipboard

Unique identifier for this session.

Link copied to clipboard

The last known Window associated with this session.

Link copied to clipboard

The id of the window in the timeline, obtained from Window.uid.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String