Video

Enable Video

The enableVideo method enables the local microphone and starts producing the video stream with the label video.

enableVideo method calls both fetchStream and produce method internally.It also return MediaStream which can be used to render the screen share stream in the UI.

Example

// Enable Video stream
const stream = await huddleClient.localPeer.enableVideo();
  • Disable Video

The disableVideo method stops the local video stream and also stops producing the video stream with remote peers.

Example

// Disable video stream
await huddleClient.localPeer.disableVideo();

replaceVideoStream

The replacevideoStream method replaces the current video stream with the new stream.

Parameters

ParamsTypeDescriptionReturn Type
mediastreamMediaStreamThis function replaces the video streamPromise<void>

Example

// Usage
await huddleClient.localPeer.replaceVideoStream({MediaStream});

changeVideoSource

The changeVideoSource changes the Video source to the given deviceId, sets the preferred cam device as the given deviceId

Parameters

ParamsTypeDescriptionReturn Type
deviceIdstringThis function changes the video streamPromise<void>

Example

// Usage
await huddleClient.localPeer.changeVideoSource({deviceId});
Audio/Video Infrastructure designed for developers to empower them to ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.