Audio

Enable Audio

The enableAudio method enables the local microphone and starts producing the audio stream with the label audio.

Example

// Enable audio stream
await huddleClient.localPeer.enableAudio();

Disable Audio

The disableAudio method stops the local audio stream and also stops producing the audio stream with remote peers.

Example

// Disable audio stream
await huddleClient.localPeer.disableAudio();

replaceAudioStream

The replaceAudioStream method replaces the current audio stream with the new stream.

Parameters

ParamsTypeDescriptionReturn Type
mediastreamMediaStreamThis function replaces the audio streamPromise<void>

Example

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

changeAudioSource

The changeAudioSource changes the Audio source to the given deviceId, sets the preferred mic device as the given deviceId

Parameters

ParamsTypeDescriptionReturn Type
deviceIdstringchanges the audio source to the given deviceIdPromise<void>

Example

// Usage
await huddleClient.localPeer.changeAudioSource({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.