The CameraSubscriber object is a representation of the local video
element that is playing back the participant’s stream. It includes methods that
let you disable and enable local audio playback for the subscribed stream.
You can access the CameraSubscriber object via the camera
property of the Participant object, as follows:
participant.camera.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 camera subscriber to indicate the audio level. This event is dispatched
up to 60 times per second, depending on the browser. The audioLevel
value object is the audio level, from 0 to 1.0.
|