import type { AudioStream, MediaPart, MediaPartStream, SubtitleStream } from '../media.ts'; import { type PlayQueue as PlayQueueType } from '../playqueue.ts'; import type { CreatePlayQueueOptions } from '../playqueue.types.ts'; import { PartialPlexObject } from './partialPlexObject.ts'; /** * This is a general place to store functions specific to media that is Playable. * Things were getting mixed up a bit when dealing with Shows, Season, Artists, * Albums which are all not playable. */ export declare abstract class Playable extends PartialPlexObject { /** (int): Active session key. */ sessionKey: any; /** (str): Username of the person playing this item (for active sessions). */ usernames: any; /** (:class:`~plexapi.client.PlexClient`): Client objects playing this item (for active sessions). */ players: any; /** (:class:`~plexapi.media.Session`): Session object, for a playing media file. */ session: any; /** (:class:`~plexapi.media.TranscodeSession`): Transcode Session object if item is being transcoded (None otherwise). */ transcodeSessions: any; /** (datetime): Datetime item was last viewed (history). */ viewedAt: any; /** (int): Playlist item ID (only populated for :class:`~plexapi.playlist.Playlist` items). */ playlistItemID?: number; /** * Returns a new PlayQueue from this media item. * * @param options Options for creating the PlayQueue * @returns New PlayQueue instance */ createPlayQueue(options?: CreatePlayQueueOptions): Promise; /** * Returns a stream URL that can be used for playback. * @param params Additional URL parameters for transcoding options. */ getStreamURL(params?: Record): string; /** * Returns all MediaPart objects across all Media entries. */ iterParts(): MediaPart[]; /** * Returns all audio streams from all parts. */ audioStreams(): AudioStream[]; /** * Returns all subtitle streams from all parts. */ subtitleStreams(): SubtitleStream[]; /** * Returns all video streams from all media (first part of each). */ videoStreams(): MediaPartStream[]; /** * Update the play progress for this media item. * @param time Current playback time in milliseconds. * @param state Playback state ('playing', 'paused', 'stopped'). Default 'stopped'. */ updateProgress(time: number, state?: 'playing' | 'paused' | 'stopped'): Promise; /** * Update the timeline for this media item. * @param time Current playback time in milliseconds. * @param state Playback state ('playing', 'paused', 'stopped'). * @param duration Total duration in milliseconds. */ updateTimeline(time: number, state: 'playing' | 'paused' | 'stopped', duration: number): Promise; }