# iOS no sound after setActive

**URL:** <https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33>\
**Category:** Uncategorized\
**Created:** [January 28, 2019, 11:46am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33 "2019-01-28T11:46:46Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [January 28, 2019, 11:46am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/1 "2019-01-28T11:46:46Z")

</div>

we integrated jisti-meet to our ios app, but after hangup, there is a red bar at the top.

we tried below disableAudio to remove red bar after handup and enableAudio before rejoining a meeting.  
the issue is after rejoin, the participants can not hear each other.

-(void) disableAudio {  
//[[RTCAudioSession sharedInstance] setIsAudioEnabled:NO];  
//[[RTCAudioSession sharedInstance] setUseManualAudio:NO];  
[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];  
}

-(void) enableAudio {  
[[AVAudioSession sharedInstance] setActive:YES error:nil];  
//[[RTCAudioSession sharedInstance] setUseManualAudio:YES];  
//[[RTCAudioSession sharedInstance] setIsAudioEnabled:YES];  
}

---

<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:** [January 28, 2019, 3:18pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/2 "2019-01-28T15:18:11Z")

</div>

What do you do after hangup? Do you get the condeferenceEnded delegate method called?

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [January 29, 2019, 3:13am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/3 "2019-01-29T03:13:41Z")

</div>

Hi  
here is how it occurs  
1 join a meeting ,everything is good ,haveing sound.  
2 handup to exit  
3 there is another function using AVAudioRecorder to record voide and share to others but it calles [[AVAudioSession sharedInstance]setActive:NO err:&err] at the end.  
4 join a meeting again,issus happens,the participants can not hear each other.

the issus should be caused by #3 setActive:NO and we want to know how to fix it in #4.

Could you give us some help ?

Thank you very much.

Have a good day.

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [January 30, 2019, 10:39am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/4 "2019-01-30T10:39:50Z")

</div>

hello, could you give us some suggestions please ?

thanks.

---

<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:** [January 30, 2019, 12:28pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/5 "2019-01-30T12:28:31Z")

</div>

HI @frank. To be honest I have no idea how to deal with that. You are interfering with the AVAudioSession which the WebRTC library is using… can you avoid calling setActive:NO in your recorder?

---

<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:** [February 6, 2019, 9:18am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/6 "2019-02-06T09:18:38Z")

</div>

I think I might have solved your problem… by mistake 😛 Can you please build the SDK with the following patch applied? [https://github.com/jitsi/jitsi-meet/pull/3864](https://github.com/jitsi/jitsi-meet/pull/3864)

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [February 10, 2019, 7:24am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/7 "2019-02-10T07:24:36Z")

</div>

Hello  
thanks for your help .but there is the issue yet.

below steps will reproduce the issue

1. join a meeting (thing goes well here), then click handup to exit

2. other module in same application call below  
AVAudioSession \*session = [AVAudioSession sharedInstance];  
[session setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:&error];

3. join a new meeting, then participants can not hear each other

hope get your help again

thank you very much.

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [February 13, 2019, 10:25pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/8 "2019-02-13T22:25:36Z")

</div>

@saghul  
Hello , my friend , just let you know we have fixed the issue with long time ,thanks for your help again.

In addition ,ould you tell me how much we should pay to you and how to pay it ?

---

<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:** [February 14, 2019, 2:54pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/9 "2019-02-14T14:54:53Z")

</div>

No need to pay anything @frank, I’m happy it works for you now!

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [February 15, 2019, 9:34am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/10 "2019-02-15T09:34:31Z")

</div>

I am so appreciate for that , may i have your IM or Email address please?

Maybe we need your help or we would have some cooperation in future 😀

Thanks for you help again

Have a good weekend.

---

<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:** [February 15, 2019, 10:51am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/11 "2019-02-15T10:51:51Z")

</div>

My email address shouldn’t be hard to find 😉 Feel free to reach out.

Cheers,

---

<div class="post-metadata">

**Author:** ![frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@frank](https://react-native-webrtc.discourse.group/u/frank)\
**Post date:** [February 26, 2019, 1:46am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/12 "2019-02-26T01:46:45Z")

</div>

@saghul  
We have another issue need your help , we have found that jitsi use the bigger data traffic than other solutions , for instance ,there are 6 persons in one room last 20mins ,it will cost 600MB data traffic of per person ,

we have tried to find some solutions to decrease data used ,like reduce the resolutions and fps, but seems no help .

Could you give us some help or suggestions?

In addition ,we have read some answers in stackoverflow below:

> <https://stackoverflow.com/questions/16712224/how-to-control-bandwidth-in-webrtc-video-call>

Do you think that it is possible ?

Hope get your reply and many thanks.

Have a nice day.

---

<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:** [February 28, 2019, 1:33pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/13 "2019-02-28T13:33:07Z")

</div>

In iOS we ignore the resolution constraints and use 720p always. You can change those here: [https://github.com/oney/react-native-webrtc/blob/master/ios/RCTWebRTC/VideoCaptureController.m#L4](https://github.com/oney/react-native-webrtc/blob/master/ios/RCTWebRTC/VideoCaptureController.m#L4)

---

<div class="post-metadata">

**Author:** ![sagark1510](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/sagark1510/32/489_2.png) [@sagark1510](https://react-native-webrtc.discourse.group/u/sagark1510)\
**Post date:** [August 23, 2021, 12:49pm UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/14 "2021-08-23T12:49:32Z")

</div>

@frank @saghul I’m not using the same jisti-meet library but I also face the same issue. How to fix this problem?

---

<div class="post-metadata">

**Author:** ![zsinba](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/zsinba/32/516_2.png) [@zsinba](https://react-native-webrtc.discourse.group/u/zsinba)\
**Post date:** [October 13, 2021, 8:08am UTC](https://react-native-webrtc.discourse.group/t/ios-no-sound-after-setactive/33/15 "2021-10-13T08:08:04Z")

</div>

how about it ? we have the same issue .
