BaseDispatcher
classe · SourceExtends: Writable
Properties
player
The Player that controls this dispatcher Source
pausedSince
The time that the stream was paused at (null if not paused) Source
paused
Whether or not playback is paused Source
pausedTime
Total time that this dispatcher has been paused in milliseconds Source
totalStreamTime
The time (in milliseconds) that the dispatcher has been playing audio for, taking into account skips and pauses Source
Methods
pause
Pauses playback Parameters
| Name | Type | Description |
|---|---|---|
silence? | boolean | Whether to play silence while paused to prevent audio glitches Default: false. |
| Source |
resume
Resumes playback Source
createHeaderExtension
Creates a one-byte extension header https://www.rfc-editor.org/rfc/rfc5285#section-4.2Returns: Buffer — <Buffer be de 00 01> Source
createPayloadExtension
Creates a one-byte extension header & a single extension of type playout-delay Returns: Buffer — playout-delay extension <Buffer 51 00 00 00> Source
Events
error
Emitted when the dispatcher encounters an error. Source
start
Emitted once the stream has started to play. Source
debug
Emitted whenever the dispatcher has debug information. Parameters
| Name | Type | Description |
|---|---|---|
info | string | The debug info |
| Source |