I am using the google meet example for local stream to server mute / unmute is not working same as in example #167
Unanswered
ChiragLiveu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Google Meet and trying to mute and unmute a video plugin. However, when I use the function below, it stops the stream, cutting off both audio and video. I have set the track kind to 'audio', but it still isn't working. Can you help me with this?
call like: await mute(
liveuStreamer.plugin?.webRTCHandle?.peerConnection,
'audio',
isAudioEnabled)
mute(RTCPeerConnection? peerConnection, String kind, bool enabled) async {
var transrecievers = (await peerConnection?.getTransceivers())?.where((element) => element.sender.track?.kind == kind).toList();
if (transrecievers?.isEmpty == true) {
return;
}
await transrecievers?.first.setDirection(enabled ? TransceiverDirection.SendOnly : TransceiverDirection.Inactive);
}
Beta Was this translation helpful? Give feedback.
All reactions