The ScreenSubscriber
object is a representation of the local video
element that is playing back the participant’s screen sharing stream. It includes
methods that let you disable and enable local audio playback for the subscribed stream.
You can access the ScreenSubscriber
object via the
screen
property of the Participant
object, as follows:
participant.screen.on('audioLevelUpdated', (audioLevel) => {
console.log('Audio level: ', audioLevel);
});
Methods
Name | Description |
---|---|
(void)
disableAudio
()
|
Disables the audio track |
(void)
disableVideo
()
|
Disables the video track |
(void)
enableAudio
()
|
Enables the audio track |
(void)
enableVideo
()
|
Enables the video track |
(boolean)
isAudioEnabled
()
|
Returns true when the audio track is enabled.
Otherwise it returns false .
|
(boolean)
isVideoEnabled
()
|
Returns true when the video track is enabled.
Otherwise it returns false .
|
(void)
setDisabledImageURI
(disabledImageURI)
|
Accepts an image URI (string) and updates the subscriber
|
Events
Name | Description |
---|---|
audioLevelUpdated
|
Emits audioLevel (Number ) Dispatched periodically
by the screen subscriber to indicate the audio level. This event is dispatched
up to 60 times per second, depending on the browser. The audioLevel
value is the audio level, from 0 to 1.0.
|