This message was deleted.
# helpdesk
s
This message was deleted.
m
cc @polite-kilobyte-67570
p
hi Ryan, the way this works today is by calling
setVolume
on the either the RemoteParticipant or on the RemoteAudioTrack. There’s also an open issue on enabling your usecase with ScreenShareAudio more directly via the participant here: https://github.com/livekit/client-sdk-js/issues/442 For now you’d have to call that function directly on the RemoteAudioTrack until the participant level feature for screen share audio has landed!
just realised I misread the question: you’re talking about controlling the input volume. That’s currently not possible without some manual workarounds.
k
Okay I figured that was the case! Are there any listeners I can add to check if a remote track is muted or not? My goal is just to increase Microphone clarity while speaking over audio.
p
The way we would like this to work in the future is that you can pipe local tracks through web audio before they are sent out and use a
gainNode
to control the volume!
k
Is that currently possible?
I was looking at the exact same gainNode stuff earlier
p
in order to listen to a remote track’s muted status there’s a
TrackMuted
event.
The manual workarounds for piping the a mediastream through webaudio would require you to work with more low level APIs of LiveKit, the basic gist would be: • acquire your source track via
getUserMedia
• create a source from it with
audioContext.createMediaStreamSource(myTrack)
• create a destination with
audioContext.createMediaStreamDestination()
• link them up with
mySource.connect(myGainNode); myGainNode.connect(myDestination)
• manually publish that track with
localParticipant.publishTrack(myDestination.stream.getAudioTracks()[0])
(this is totally untested, but the basic workflow should be correct)