Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

VideoExpress.Participant.ScreenSubscriber

Methods Events 

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 backgroundImageURI property. Currently supported image formats include: PNG, JPEG, or a non-animated GIF. You can also use the data URI scheme and pass in base-64-encrypted PNG data or SVG data. If the URL or image data is invalid, the property is ignored and a default image is set. Returns void.

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.