Audio

NameTypeDescription
fetchAudioStream(deviceId?: string)FunctionEnables audio stream from user’s device mic(lobby)
stopAudioStream()FunctionDisables audio stream from user’s device mic(lobby)
produceAudio(micStream: MediaStream, peerIds?: string[])FunctionStarts sharing user’s audio stream with other peers in the room
stopProducingAudio()FunctionStops sharing user’s audio stream with other peers in the room
enumerateDevices()FunctionReturns the list of audio devices
createSingleConsumer(peerId: string, "mic")FunctionStarts consuming audio stream for given peerId
closeSingleConsumer(peerId: string, "mic")FunctionStops consuming audio stream for given peerId

Example

 
<script src="https://unpkg.com/@huddle01/web-core@latest/dist/index.js"></script>
 
<body>
 
    <button id="fetchAudioStream">Fetch Audio Stream</button>
 
</body>
 
<script> 
 
document.getElementById("fetchAudioStream").addEventListener("click", async () => {
  await huddleClient.fetchAudioStream();
});
 
</script>
 
Audio/Video Infrastructure designed for the developers to empower them ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2022 Graphene 01, Inc. All Rights Reserved.