# RTCAudioSessionConfiguration

**URL:** <https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66>\
**Category:** Uncategorized\
**Created:** [March 17, 2019, 7:23pm UTC](https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66 "2019-03-17T19:23:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiantongc](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/jiantongc/32/28_2.png) [@jiantongc](https://react-native-webrtc.discourse.group/u/jiantongc)\
**Post date:** [March 17, 2019, 7:23pm UTC](https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66/1 "2019-03-17T19:23:57Z")

</div>

Is there anyway to change the category of the RTCAudioSessionConfiguration object before setting it as the webrtc configuration?

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 18, 2019, 7:12pm UTC](https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66/2 "2019-03-18T19:12:28Z")

</div>

No, not in this module, at the moment.

---

<div class="post-metadata">

**Author:** ![jiantongc](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/jiantongc/32/28_2.png) [@jiantongc](https://react-native-webrtc.discourse.group/u/jiantongc)\
**Post date:** [March 21, 2019, 6:14am UTC](https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66/3 "2019-03-21T06:14:40Z")

</div>

The reason to that is by default, the library treats a one-way communication (broadcast) as video call, and it causes quite a few issues, eg. Microphone permission request (for the viewers), playing mode, speaker routing, etc.

We’ve made sure that the sdp only uses ‘sendonly’ or ‘recvonly’, but still…  
It doesn’t seem like there’s a way to start a view-only live stream using this library w/o all these glitches.

Any advise would be much appreciated.

---

<div class="post-metadata">

**Author:** ![saghul](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/saghul/32/4_2.png) [@saghul](https://react-native-webrtc.discourse.group/u/saghul)\
**Post date:** [March 21, 2019, 8:38am UTC](https://react-native-webrtc.discourse.group/t/rtcaudiosessionconfiguration/66/4 "2019-03-21T08:38:17Z")

</div>

> [@jiantongc](#):
>
> The reason to that is by default, the library treats a one-way communication (broadcast) as video call, and it causes quite a few issues, eg. Microphone permission request (for the viewers), playing mode, speaker routing, etc.

Unfortunately this is buried deep down WebRTC and is still not fixed, so no amount of configuration will fix the permissions problem, as you know from [10396 - webrtc - Web-based real-time communication - Monorail](https://bugs.chromium.org/p/webrtc/issues/detail?id=10396)

> [@jiantongc](#):
>
> We’ve made sure that the sdp only uses ‘sendonly’ or ‘recvonly’, but still…  
> It doesn’t seem like there’s a way to start a view-only live stream using this library w/o all these glitches.
> 
> Any advise would be much appreciated.

I’d assume the default constraints we pass would be enough: [https://github.com/oney/react-native-webrtc/blob/master/RTCPeerConnection.js#L46](https://github.com/oney/react-native-webrtc/blob/master/RTCPeerConnection.js#L46)

What SDP do you get when you create an offer without adding any streams to the peer connection?
