# Controls for audio only stream

**URL:** <https://react-native-webrtc.discourse.group/t/controls-for-audio-only-stream/1160>\
**Category:** General\
**Created:** [March 16, 2021, 5:08am UTC](https://react-native-webrtc.discourse.group/t/controls-for-audio-only-stream/1160 "2021-03-16T05:08:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mango009](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/mango009/32/393_2.png) [@mango009](https://react-native-webrtc.discourse.group/u/mango009)\
**Post date:** [March 16, 2021, 5:08am UTC](https://react-native-webrtc.discourse.group/t/controls-for-audio-only-stream/1160/1 "2021-03-16T05:08:22Z")

</div>

Hi,  
What is the best way to play/mute/stop/resume an audio only stream. Something similar to an `<audio>` tag in HTML5.  
Thanks.

---

<div class="post-metadata">

**Author:** ![TheSalarKhan](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/thesalarkhan/32/320_2.png) [@TheSalarKhan](https://react-native-webrtc.discourse.group/u/TheSalarKhan)\
**Post date:** [March 18, 2021, 4:06pm UTC](https://react-native-webrtc.discourse.group/t/controls-for-audio-only-stream/1160/2 "2021-03-18T16:06:13Z")

</div>

Hi!

If you want to mute mic you will have to get its mediastream track and set ‘enabled’ to false. The MediaStreamTrack object has an ‘enabled’ property that you can set to true to mute and false to unmute.

Here’s the implementation in react-native-webrtc: [react-native-webrtc/MediaStreamTrack.js at 1343580c0322f265ff0fb22722ac5501c5fd77ad · react-native-webrtc/react-native-webrtc · GitHub](https://github.com/react-native-webrtc/react-native-webrtc/blob/1343580c0322f265ff0fb22722ac5501c5fd77ad/MediaStreamTrack.js#L57)
