PlayRequest

@Serializable
data class PlayRequest(val sessionId: String, val playCommand: PlayCommand, val itemIds: Collection<UUID>, val startPositionTicks: Long? = null, val mediaSourceId: String? = null, val audioStreamIndex: Int? = null, val subtitleStreamIndex: Int? = null, val startIndex: Int? = null)

Instructs a session to play an item.

Constructors

Link copied to clipboard
constructor(sessionId: String, playCommand: PlayCommand, itemIds: Collection<UUID>, startPositionTicks: Long? = null, mediaSourceId: String? = null, audioStreamIndex: Int? = null, subtitleStreamIndex: Int? = null, startIndex: Int? = null)

Properties

Link copied to clipboard
@SerialName(value = "audioStreamIndex")
val audioStreamIndex: Int?

Optional. The index of the audio stream to play.

Link copied to clipboard
@SerialName(value = "itemIds")
val itemIds: Collection<UUID>

The ids of the items to play, comma delimited.

Link copied to clipboard
@SerialName(value = "mediaSourceId")
val mediaSourceId: String?

Optional. The media source id.

Link copied to clipboard
@SerialName(value = "playCommand")
val playCommand: PlayCommand

The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.

Link copied to clipboard
@SerialName(value = "sessionId")
val sessionId: String

The session id.

Link copied to clipboard
@SerialName(value = "startIndex")
val startIndex: Int?

Optional. The start index.

Link copied to clipboard
@SerialName(value = "startPositionTicks")
val startPositionTicks: Long?

The starting position of the first item.

Link copied to clipboard
@SerialName(value = "subtitleStreamIndex")
val subtitleStreamIndex: Int?

Optional. The index of the subtitle stream to play.