Make audio stream available when muted
See original GitHub issueWhat are you trying to do?
When an attendee starts talking while muted I want to show a message saying “You are muted, please unmute yourself”. This means I want to “watch” the audiostream of the microphone when the attendee is muted and when it reaches a certain threshold (so it detects ‘speaking’) show the message.
What documentation have you looked at so far?
createAnalyserNodeForAudioInput()
I have tried using the meetingSession.audioVideo.createAnalyserNodeForAudioInput()
. The data is fine when the attendee is not muted, but from the moment the attendee is muted the data is always 0. Is there a different way to get the captured sound?
Any other documentation
I couldn’t find anything in the documentation that is related to getting the audio (stream) other than the createAnalyserNodeForAudioInput()
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
MediaStreamTrack.muted - Web APIs | MDN
The muted read-only property of the MediaStreamTrack interface returns a boolean value indicating whether or not the track is currently ...
Read more >How to Appeal Muted Audio - Twitch
This article explains how to appeal muted audio in VODs. If you believe one of your videos has been incorrectly flagged by our...
Read more >Audio is not available in the stream - Restream Help Center
In some cases your sound may not be available on stream. This is normally caused by broadcaster misconfiguration and is easily fixed on...
Read more >how to mute the voice of the remote media stream?
Below is some snippet for audio muting. function toggleAudioMute() {. if (localStream.audioTracks.length === 0) {. console.log("No local audio available.");.
Read more >Add a muted audio stream inside a filter_complex - Super User
So I can avoid to run two different commands to do what I need to. ffmpeg \ -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \ -i ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When you mute the microphone using
realtimeMuteLocalAudio()
, SDK simply disables the media stream of the audio input device.createAnalyserNodeForAudioInput()
uses this disabled stream, so it won’t help.As a workaround, you might get the microphone’s stream yourself and create an AnalyserNode on it.
While in the meeting, try running this snippet in the browser console. Make sure to replace
__your_device_id__
with the device ID of your muted microphone. You’ll see the non-zero percentage in the console while you speak.I used the startAudioPreview() in the SDK demo. I haven’t tested this code thoroughly, but hope you can get some ideas.
Workaround works great still great job.