PlaystateApi - functional programming interface

  • Parameters

    Returns {
        markPlayedItem(itemId: string, userId?: string, datePlayed?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserItemDataDto>)>;
        markUnplayedItem(itemId: string, userId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserItemDataDto>)>;
        onPlaybackProgress(itemId: string, mediaSourceId?: string, positionTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, volumeLevel?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, repeatMode?: RepeatMode, isPaused?: boolean, isMuted?: boolean, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        onPlaybackStart(itemId: string, mediaSourceId?: string, audioStreamIndex?: number, subtitleStreamIndex?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, canSeek?: boolean, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        onPlaybackStopped(itemId: string, mediaSourceId?: string, nextMediaType?: string, positionTicks?: number, liveStreamId?: string, playSessionId?: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        pingPlaybackSession(playSessionId: string, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        reportPlaybackProgress(playbackProgressInfo?: PlaybackProgressInfo, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        reportPlaybackStart(playbackStartInfo?: PlaybackStartInfo, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
        reportPlaybackStopped(playbackStopInfo?: PlaybackStopInfo, options?: RawAxiosRequestConfig): Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>;
    }

    • markPlayedItem:function
      • Parameters

        • itemId: string

          Item id.

        • OptionaluserId: string

          User id.

        • OptionaldatePlayed: string

          Optional. The date the item was played.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserItemDataDto>)>

        Marks an item as played for user.

    • markUnplayedItem:function
      • Parameters

        • itemId: string

          Item id.

        • OptionaluserId: string

          User id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserItemDataDto>)>

        Marks an item as unplayed for user.

    • onPlaybackProgress:function
      • Parameters

        • itemId: string

          Item id.

        • OptionalmediaSourceId: string

          The id of the MediaSource.

        • OptionalpositionTicks: number

          Optional. The current position, in ticks. 1 tick = 10000 ms.

        • OptionalaudioStreamIndex: number

          The audio stream index.

        • OptionalsubtitleStreamIndex: number

          The subtitle stream index.

        • OptionalvolumeLevel: number

          Scale of 0-100.

        • OptionalplayMethod: PlayMethod

          The play method.

        • OptionalliveStreamId: string

          The live stream id.

        • OptionalplaySessionId: string

          The play session id.

        • OptionalrepeatMode: RepeatMode

          The repeat mode.

        • OptionalisPaused: boolean

          Indicates if the player is paused.

        • OptionalisMuted: boolean

          Indicates if the player is muted.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports a session's playback progress.

    • onPlaybackStart:function
      • Parameters

        • itemId: string

          Item id.

        • OptionalmediaSourceId: string

          The id of the MediaSource.

        • OptionalaudioStreamIndex: number

          The audio stream index.

        • OptionalsubtitleStreamIndex: number

          The subtitle stream index.

        • OptionalplayMethod: PlayMethod

          The play method.

        • OptionalliveStreamId: string

          The live stream id.

        • OptionalplaySessionId: string

          The play session id.

        • OptionalcanSeek: boolean

          Indicates if the client can seek.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports that a session has begun playing an item.

    • onPlaybackStopped:function
      • Parameters

        • itemId: string

          Item id.

        • OptionalmediaSourceId: string

          The id of the MediaSource.

        • OptionalnextMediaType: string

          The next media type that will play.

        • OptionalpositionTicks: number

          Optional. The position, in ticks, where playback stopped. 1 tick = 10000 ms.

        • OptionalliveStreamId: string

          The live stream id.

        • OptionalplaySessionId: string

          The play session id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports that a session has stopped playing an item.

    • pingPlaybackSession:function
      • Parameters

        • playSessionId: string

          Playback session id.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Pings a playback session.

    • reportPlaybackProgress:function
      • Parameters

        • OptionalplaybackProgressInfo: PlaybackProgressInfo

          The playback progress info.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports playback progress within a session.

    • reportPlaybackStart:function
      • Parameters

        • OptionalplaybackStartInfo: PlaybackStartInfo

          The playback start info.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports playback has started within a session.

    • reportPlaybackStopped:function
      • Parameters

        • OptionalplaybackStopInfo: PlaybackStopInfo

          The playback stop info.

        • Optionaloptions: RawAxiosRequestConfig

          Override http request option.

        Returns Promise<((axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>)>

        Reports playback has stopped within a session.