Implementation of PlayerDecorator
Used to attach listeners. Only one listener can be attached per type/event at a time, if there was already a listener attached for the type/event it will be overridden.
Used for creating or joining a synchronization group. Stops synchronization.
JWT access token from CAS
Client name for referencing
Defines if client is passive. Passive client's position can not be used as a reference for server time initialization. Default is false
.
Promise which either successfully resolves or rejects with SyncError
Sends volume change command to other clients in a group.
The volume to set between 0 (silent) and 1 (max volume)
Sends pause command to other clients in a group.
Sends play command to other clients in a group.
Sends mute command to other clients in a group.
Used to remove listeners. As only one listener can be attached per type/event at a time, there is no need to pass the reference to the callback function.
Sends arbitrary payload to other clients in a group.
Sends chat message to other clients in a group and calls Events.chat_update listener with the message.
Sends seek command to other clients in a group. Uses PlayerDecorator.getCurrentPosition as the position to seek other clients to.
If delta
param (ms) is passed, applies it to the position returned by PlayerDecorator.getCurrentPosition before sending to other clients.
The delta in milliseconds to apply to the position returned by PlayerDecorator.getCurrentPosition
Sets the level of SyncSDK log outputs.
Please note that especially DEBUG level should not be used for production environments as this can decrease performance, especially for long-term playback, due to the amount of log messages.
Default is LogLevels.WARN.
Calls PlayerDecorator.load and starts synchronization.
Promise which either successfully resolves or rejects with SyncError
Stops synchronization and calls PlayerDecorator.unload.
Sends unmute command to other clients in a group.
Attaches player decorator to the SyncSDK instance if not yet attached.