@ctrl/plex
    Preparing search index...

    Class Media

    Hierarchy

    • PlexObject
      • Media
    Index
    • Parameters

      • server: PlexServer
      • data: unknown
      • Optionalinitpath: string
      • Optionalparent: PlexObject

      Returns Media

    aspectRatio?: number
    audioChannels?: number

    Number of audio channels for this video (ex: 6)

    audioCodec?: string

    Audio codec used within the video (ex: ac3)

    audioProfile?: string

    Audio profile of the media (ex: lc, dts).

    bitrate?: number

    Bitrate of the video (ex: 1624)

    container?: string

    Container format of the media (ex: mp4, mkv, mp3).

    duration?: number

    Length of the video in milliseconds (ex: 6990483)

    has64bitOffsets: boolean

    True if video has 64 bit offsets

    hasVoiceActivity?: boolean
    height?: number

    Height of the video in pixels (ex: 256)

    id: number

    Plex ID of this media item

    key?: string

    Plex relative url, when the payload includes one.

    optimizedForStreaming: boolean
    parent?: WeakRef<PlexObject>

    WeakRef to the parent object that this object is built from.

    parts: MediaPart[]
    proxyType?: number
    selected?: boolean

    True if this media version is selected in a playback session.

    server: PlexServer
    target?: string

    Optimization target name for optimized versions.

    title?: string
    uuid?: string

    Unique id of this media version, when Plex provides one.

    videoCodec?: string
    videoFrameRate?: string
    videoProfile?: string
    videoResolution?: string

    Plex resolution bucket (ex: 4k, 1080, 720, 480, sd).

    width?: number

    Width of the video in pixels

    TAG: "Media" = ...

    xml element tag

    TYPE: string | null = null

    xml element type

    • Delete this media version, leaving the other versions of the item intact.

      Returns Promise<void>

    • Returns true if this object was built from a parent of the given class.

      Parameters

      • cls: new (...args: any[]) => PlexObject

      Returns boolean

    • Refreshing a Library or individual item causes the metadata for the item to be refreshed, even if it already has metadata. You can think of refreshing as "update metadata for the requested item even if it already has some". You should refresh a Library or individual item if:

      Returns Promise<void>

    • Reload the data for this object from this.key.

      Parameters

      • Optionalekey: string

      Returns Promise<void>