@ctrl/plex
    Preparing search index...

    Class PlexClient

    Control a Plex player directly or by proxying commands through a Plex server.

    See https://github.com/plexinc/plex-media-player/wiki/Remote-control-API for the remote-control commands players understand.

    Hierarchy (View Summary)

    Index
    address?: string
    baseurl: string

    HTTP address of the client, without a trailing slash.

    device?: string

    Best guess on the type of device (PS4, iPhone, Linux).

    deviceClass?: string

    Device class (pc, phone, stb).

    key: "/resources" = '/resources'
    local?: boolean
    machineIdentifier?: string
    model?: string
    platform?: string
    platformVersion?: string
    product?: string

    Product name (Plex for iOS, Plex Web).

    profile?: string
    protocol?: string
    protocolCapabilities: string[]

    Controllers the client supports (navigation, playback, timeline, mirror, playqueues).

    protocolVersion?: string
    relayed?: boolean
    remotePublicAddress?: string
    secure?: boolean
    server?: PlexServer

    Server this client was found on, used for proxying commands.

    state?: string
    timeout: number

    Request timeout in milliseconds.

    title?: string

    Display name of the client (Johns iPhone).

    userID?: number
    vendor?: string
    version?: string
    • Load attributes directly from the client. Later commands go straight to the device even if this object was first populated from a server's client list.

      Returns Promise<PlexClient>

    • Open the context menu on the client.

      Returns Promise<void>

    • Navigate back on the client.

      Returns Promise<void>

    • Navigate to home on the client.

      Returns Promise<void>

    • Navigate to music on the client.

      Returns Promise<void>

    • Move selection down.

      Returns Promise<void>

    • Move selection left.

      Returns Promise<void>

    • Move selection right.

      Returns Promise<void>

    • Move selection up.

      Returns Promise<void>

    • Jump to next letter in lists.

      Returns Promise<void>

    • Page down in lists.

      Returns Promise<void>

    • Page up in lists.

      Returns Promise<void>

    • Jump to previous letter in lists.

      Returns Promise<void>

    • Send a request to the client. Players answer in JSON, XML, or plain text depending on the product, so XML is converted to the same shape as Plex JSON responses.

      Type Parameters

      • T = unknown

      Parameters

      Returns Promise<T>

    • Select the current item.

      Returns Promise<void>

    • Set the active subtitle stream.

      Parameters

      • subtitleStreamID: number

        Subtitle stream id, or 0 to disable subtitles.

      • options: ClientCommandOptions = {}

      Returns Promise<void>

    • Toggle the on-screen display.

      Returns Promise<void>

    • Build a URL for this client, optionally including its token.

      Parameters

      • key: string
      • __namedParameters: { includeToken?: boolean } = {}

      Returns URL