mpc-js
    Preparing search index...

    Interface ConnectionCommands

    interface ConnectionCommands {
        allTagTypes(): Promise<void>;
        clearTagTypes(): Promise<void>;
        close(): void;
        disableAllProtocolFeatures(): Promise<void>;
        disableProtocolFeatures(features: string[]): Promise<void>;
        disableTagTypes(names: string[]): Promise<void>;
        enableAllProtocolFeatures(): Promise<void>;
        enableProtocolFeatures(features: string[]): Promise<void>;
        enableTagTypes(names: string[]): Promise<void>;
        getAvailableProtocolFeatures(): Promise<string[]>;
        getAvailableTagTypes(): Promise<string[]>;
        getEnabledProtocolFeatures(): Promise<string[]>;
        kill(): void;
        password(password: string): Promise<void>;
        ping(): Promise<void>;
        setBinaryLimit(size: number): Promise<void>;
        setEnabledTagTypes(names: string[]): Promise<void>;
        tagTypes(): Promise<string[]>;
    }

    Hierarchy

    • ReturnType<typeof createConnectionCommands>
      • ConnectionCommands
    Index

    Methods

    • Announce that this client is interested in all tag types. This is the default setting for new clients.

      Returns Promise<void>

    • Clear the list of tag types this client is interested in. This means that MPD will not send any tags to this client.

      Returns Promise<void>

    • Closes the connection to MPD. MPD will try to send the remaining output buffer before it actually closes the connection, but that cannot be guaranteed. This command will not generate a response.

      Returns void

    • Disables all protocol features.

      Returns Promise<void>

    • Disables one or more features.

      Parameters

      • features: string[]

      Returns Promise<void>

    • Remove one or more tags from the list of tag types the client is interested in. These will be omitted from responses to this client.

      Parameters

      • names: string[]

      Returns Promise<void>

    • Enables all protocol features.

      Returns Promise<void>

    • Enables one or more features.

      Parameters

      • features: string[]

      Returns Promise<void>

    • Re-enable one or more tags from the list of tag types for this client. These will no longer be hidden from responses to this client.

      Parameters

      • names: string[]

      Returns Promise<void>

    • Lists all available protocol features.

      Returns Promise<string[]>

    • Get the list of tag types configured by the metadata_to_use setting.

      Returns Promise<string[]>

    • Get a list of enabled protocol features. Available features:

      • hide_playlists_in_root: disables the listing of stored playlists for listInfo().

      Returns Promise<string[]>

    • This is used for authentication with the server. password is simply the plaintext password.

      Parameters

      • password: string

      Returns Promise<void>

    • Set the maximum binary response size for the current connection to the specified number of bytes. A bigger value means less overhead for transmitting large entities, but it also means that the connection is blocked for a longer time.

      Parameters

      • size: number

      Returns Promise<void>

    • Set the list of enabled tag types for this client. These will no longer be hidden from responses to this client.

      Parameters

      • names: string[]

      Returns Promise<void>

    • Gets a list of available tag types. It is an intersection of the metadata_to_use setting and this client's tag mask. About the tag mask: each client can decide to disable any number of tag types, which will be omitted from responses to this client. That is a good idea, because it makes responses smaller.

      Returns Promise<string[]>