Info: We are using react-native-webrtc with jitsi.
The functionality required , on trigger we are looking to silence all audio streams , once its silenced with the same trigger all the silenced streams should be active, we can think them as setting the volume to 0 and to set it back to 1 (0 being silenced & 1 being active).
We currently have initialised webRTC [React Native]
import {
  MediaStream,
  MediaStreamTrack,
  RTCSessionDescription,
  RTCIceCandidate,
  mediaDevices,
  permissions,
} from "react-native-webrtc";
import RTCPeerConnection from "./RTCPeerConnection";
((global) => {
  if (typeof global.MediaStream === "undefined") {
    global.MediaStream = MediaStream;
  }
  if (typeof global.MediaStreamTrack === "undefined") {
    global.MediaStreamTrack = MediaStreamTrack;
  }
  if (typeof global.RTCIceCandidate === "undefined") {
    global.RTCIceCandidate = RTCIceCandidate;
  }
  if (typeof global.RTCPeerConnection === "undefined") {
    global.RTCPeerConnection = RTCPeerConnection;
  }
  if (typeof global.RTCPeerConnection === "undefined") {
    global.webkitRTCPeerConnection = RTCPeerConnection;
  }
  if (typeof global.RTCSessionDescription === "undefined") {
    global.RTCSessionDescription = RTCSessionDescription;
  }
  const navigator = global.navigator;
  if (navigator) {
    if (typeof navigator.mediaDevices === "undefined") {
      navigator.mediaDevices = mediaDevices;
    }
    if (typeof navigator.permissions === "undefined") {
      navigator.permissions = permissions;
    }
  }
})(global || window || this);
What are the ways by which this can be accomplished ? Any help is greatly appreciated .
Also how to disable audio output and enable it again ?
Note: We are using react-native
CC: @saghul