# Adding Back Tracks Does Not Work on WebRTC

**URL:** <https://react-native-webrtc.discourse.group/t/adding-back-tracks-does-not-work-on-webrtc/925>\
**Category:** Help\
**Created:** [August 26, 2020, 8:51pm UTC](https://react-native-webrtc.discourse.group/t/adding-back-tracks-does-not-work-on-webrtc/925 "2020-08-26T20:51:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brango](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@brango](https://react-native-webrtc.discourse.group/u/brango)\
**Post date:** [August 26, 2020, 8:51pm UTC](https://react-native-webrtc.discourse.group/t/adding-back-tracks-does-not-work-on-webrtc/925/1 "2020-08-26T20:51:13Z")

</div>

We create an app with React Native WebRTC and Janus Gateway. It works as wanted. Our app is based on push to talk. So when an users in listen mode need to break microphone for other apps. And take back when anyone press to speak button.

Breaking Mic:

```auto
if (!globalTrack) {
     globalTracks = config.myStream.getTracks();
}
config.myStream.getTracks().forEach(t => {
    config.myStream.removeTrack(t);
});

```

Get Back the Tracks:

```auto
globalTracks.forEach(t => {
    config.myStream.addTrack(t);
});

pluginHandle.createOffer({
    media: { addVideo: true },
    success: function(jsep) {
        Janus.debug(jsep);
        pluginHandle.send({message: {audio: true, video: false}, "jsep": jsep });
    },
    error: function(error) {
        console.log("WebRTC error... " + JSON.stringify(error));
    }
});

// also I have try this:

devices = await mediaDevices.getUserMedia({audio: true, video: false})

devices._tracks.forEach(t => {
    config.myStream.addTrack(t);
}); 

pluginHandle.createOffer({
    media: {audio: {deviceId: devices._tracks[0]['id']}, replaceAudio: true},
    success: function(jsep) {
        pluginHandle.send({message: {audio: true, video: false}, "jsep": jsep});
    },
    error: function(error) {
        console.log(("WebRTC error... " + JSON.stringify(error));
    }
});

```

**Problem** :

Problem: E.g: when a call came to the phone and answered it. The user’s voice does not pass anymore even after restarting the app.

On Janus Gateway every things is normal. I think problem is about renegotiation.

- Problem occurred only on Android phones.

Janus Gateway Log which when I speak at room:

```auto
There's a message for JANUS AudioBridge plugin
Setting muted property: true (room 20, user 2301490876606211)
Notifying participant 329012611897879 (brango)
Sending event to transport...
  >> 0 (Success)

```
