Provides the mechanism for controlling the published stream.
You can access the CameraPublisher via the camera
property
of the Room object, after you have successfully joined a session:
const room = new VideoExpress.Room(roomProperties);
await room.join();
const { camera } = room;
Methods
Name | Description | ||||||
---|---|---|---|---|---|---|---|
(Promise<void>)
clearVideoFilter
()
|
Returns a Promise that resolves to |
||||||
(void)
disableAudio
()
|
Disables the audio track. | ||||||
(void)
disableVideo
()
|
Disables the video track. | ||||||
(void)
enableAudio
()
|
Enables the audio track. | ||||||
(void)
enableVideo
()
|
Enables the video track. | ||||||
(Promise<device>)
getAudioDevice
()
|
Returns a device object which contains the deviceId ,
label and kind .
|
||||||
(device)
getVideoDevice
()
|
Returns a device object which contains the deviceId ,
label and kind .
|
||||||
(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)
setAudioDevice
(deviceId)
|
Switches the audio input source. Pass in the device ID of the new audio source. Calling this method results in an error (the Promise returned by the method is rejected) in the following conditions:
|
||||||
(void)
setDisabledImageURI
(disabledImageURI)
|
Accepts an image URI (string) and updates the publisher
|
||||||
(void)
setVideoDevice
(deviceId)
|
This method sets the video source for a publisher that is using a camera. Pass in the device ID of the new video source. The following result in errors:
|
||||||
(Promise<void>)
setVideoFilter
(videoFilter)
|
Returns a Promise that resolves to
The following errors may be thrown when using
|
Events
Name | Description |
---|---|
accessAllowed
|
Dispatched when the user granted access to the device camera and mic. This event does not emit anything. |
accessDenied
|
Dispatched when the user denied access to the device camera and mic. This event does not emit anything. |
accessDialogClosed
|
Dispatched when the user closes the dialog box to allow or deny access to the camera and mic. This event does not emit anything. |
accessDialogOpened
|
Dispatched when the browser prompted a dialog box to allow or deny access to the camera and mic. This event does not emit anything. |
audioLevelUpdated
|
Emits audioLevel (Number ). Dispatched periodically
by the camera publisher 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.
|
created
|
Dispatched when the camera publisher is created. This event does not emit anything. |
destroyed
|
Dispatched when the camera publisher is destroyed. This event does not emit anything. |