DefaultSocketApi
class DefaultSocketApi(api: ApiClient, socketReconnectPolicy: SocketReconnectPolicy, socketConnectionFactory: SocketConnectionFactory) : SocketApi
Implementation of the Jellyfin WebSocket API. Each instance of this class maintains its own connection.
See also
Constructors
Link copied to clipboard
constructor(api: ApiClient, socketReconnectPolicy: SocketReconnectPolicy, socketConnectionFactory: SocketConnectionFactory)
Functions
Link copied to clipboard
Notify this SocketApi instance of changes in the parent ApiClient.
Link copied to clipboard
Subscribe to all incoming WebSocket messages. Returns a flow that emits each deserialized message.
Link copied to clipboard
inline fun SocketApi.subscribeGeneralCommand(command: GeneralCommandType): Flow<GeneralCommandMessage>
Subscribe to a specific GeneralCommandType message.
Link copied to clipboard
inline fun SocketApi.subscribeGeneralCommands(commands: Set<GeneralCommandType> = GeneralCommandType.values().toSet()): Flow<GeneralCommandMessage>
Subscribe to specific GeneralCommandType messages.
Link copied to clipboard
Subscribe to a specific PlaystateCommand message.
Link copied to clipboard
inline fun SocketApi.subscribePlayStateCommands(commands: Set<PlaystateCommand> = PlaystateCommand.values().toSet()): Flow<PlaystateMessage>
Subscribe to specific PlaystateCommand messages.
Link copied to clipboard
inline fun SocketApi.subscribeSyncPlayCommand(command: SendCommandType): Flow<SyncPlayCommandMessage>
Subscribe to a specific SendCommandType message.
Link copied to clipboard
inline fun SocketApi.subscribeSyncPlayCommands(commands: Set<SendCommandType> = SendCommandType.values().toSet()): Flow<SyncPlayCommandMessage>
Subscribe to specific SendCommandType messages.