Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Array of available Quality objects from the loaded source, or empty if none are currently available. The qualities will be available after the Player transitions to the State.Ready state. Note that this set will contain only qualities capable of being played on the current device and not all those present in the source stream.
The playback duration in seconds. The duration is Infinity
if the media is a live stream. A Player.Event.DurationChanged is emitted
whenever the playback duration changes.
Whether the Player is muted. You can also mute the Player by setting it to true, or unmute by setting it to false. Updating this property has no effect once the Player transitions to the Player.State.Ended state.
Whether the Player is muted. You can also mute the Player by setting it to true, or unmute by setting it to false. Updating this property has no effect once the Player transitions to the Player.State.Ended state.
For a live stream, the latency to the source in seconds.
The playback position in seconds.
The current quality of the Player's live stream. You can also change the quality of the live stream by setting a new Player.Quality from Player.availableQualities. The Player will emit a Player.Event.QualityChanged event.
The current quality of the Player's live stream. You can also change the quality of the live stream by setting a new Player.Quality from Player.availableQualities. The Player will emit a Player.Event.QualityChanged event.
The Player state. Soon after a successful connection to a live stream, the Player is in the Player.State.Idle state while it is preparing the playback. Then it transitions to the Player.State.Ready state.
The SID of the PlayerStreamer which the Player is connected to.
The HTMLVideoElement used to play back the live stream.
The Player's video size.
The Player's volume level in the range [0.0, 1.0].
Whether high latency reduction is enabled for all Player instances.
This is set to true
by default.
When set to true
, the Player SDK will periodiocally inspect player.liveLatency
and perform the following when high latency is observed:
If the live latency is between 3 and 5 seconds, the Player will increase the playback rate to a value that should not be perceptible to a user. The increased playback rate will allow the Player to catch up to the live source, and will be reverted once the live latency drops below 3 seconds. Application of this strategy may result in audio pitch distortion.
If the live latency is greater than or equal to 5 seconds, the Player will seek ahead to near the end of the Player's buffered content. The user will notice skips in the media content when this strategy is applied.
Sets whether high latency reduction is enabled for all Player instances.
When set to true
, the Player SDK will periodiocally inspect player.liveLatency
and perform the following when high latency is observed:
If the live latency is between 3 and 5 seconds, the Player will increase the playback rate to a value that should not be perceptible to a user. The increased playback rate will allow the Player to catch up to the live source, and will be reverted once the live latency drops below 3 seconds. Application of this strategy may result in audio pitch distortion.
If the live latency is greater than or equal to 5 seconds, the Player will seek ahead to near the end of the Player's buffered content. The user will notice skips in the media content when this strategy is applied.
Whether the SDK supports the browser. The SDK only supports browsers which are capable of running WebAssembly (WASM).
The SDK's log level.
The SDK version.
Set an HTMLVideoElement to play back the live stream. For iOS browsers, please enable inline playback before attaching the HTMLVideoElement.
The HTMLVideoElement to be used to play back the live stream
Disconnect from the live stream. The Player will transition to the terminal Player.State.Ended state, release all resources related to the playback of the live stream, and stop emitting events.
The Player.duration property has changed.
A callback that has the updated Player.duration, in seconds.
The Player encountered an error while playing back the live stream.
A callback that has the Player.Error
The Player's playback quality changed.
A callback that has the updated Player.Quality
The Player is rebuffering from a previous Player.State.Playing state.
A callback called when the event is emitted
The player seeked to a given position (as requested by Player.seekTo).
A callback that has the position where the seek completed, in seconds.
The Player's state changed.
A callback that has the new Player.State
The Player received a timed metadata from the live stream source.
A callback that has the Player.TimedMetadata
The Player's video size changed.
A callback that has the new Player.VideoDimensions
The Player's volume level changed.
A callback that has the new volume level
Pause the Player's live stream. The Player transitions to the Player.State.Idle state.
Start the playback of the Player's live stream. The Player may transition to the Player.State.Buffering state if it is buffering media for playback, and will finally transition to the Player.State.Playing state.
Calling this method before Player.state transitions to Player.State.Ready will not have any effect.
Instruct the Player to seek to a specified time in the stream and begins playing media in that position. The player state might change to buffering if there is not enough buffered content in the specified position. This method is asynchronous and a Player.Event.SeekCompleted is emitted upon completion. This is only supported for recorded media and will emit a Player.Error if invoked on a live media.
Set the Player's volume level in the range [0.0, 1.0]. The Player.volume property will be updated asynchronously and a Player.Event.VolumeChanged is emitted with the updated volume. A Player.Error will be emitted for any invalid parameters.
Set the SDK's log level.
Generated using TypeDoc
A Player controls the playback of a live stream.