Open denmorgenshtern opened 1 year ago
Have same problem
Hey @denmorgenshtern and @zweropet ,
There is a PR setting mic mute/unmute through setMicStatus method.
https://github.com/ant-media/WebRTC-iOS-SDK/pull/14
Could you please try it?
hi @mekya, problem in mute / unmute audio while watching video stream, not mic.
hi @denmorgenshtern ,
Then what about mute/unmute the audio stream on the server side? In this way, the server will not send you the audio packets. If yes, there is a new method in the SDK to enableAudioTrack
that receives boolean parameter.
There is also a fix to remove the AntMediaClient reference from AudioSession in the PR mentioned above.
If the solution above does not help you, please let me know.
hi @mekya, server side solution doesn't fit for us. Our server broadcasts to many clients, the client should be able to mute / unmute the audio locally on his side.
Hi @denmorgenshtern ,
I mean mute/unmute the audio stream on the server side not for any one, just specifically for the user. In this way, you can also to save CPU and bandwidth.
Anyway, if you just want to mute/unmute the video, it's an iOS development for the Shared Audio Instance. If you need a specific method for the iOS SDK, please let me know.
Description
App crashes somewhere after user changes
RTCAudioSession.sharedInstance().isAudioEnabled
state Problem appeared after this https://github.com/ant-media/WebRTC-iOS-SDK/pull/13I don't know if it matters, but I use
RTCAudioSession.sharedInstance
to mute / unmute audio while playing streamSteps to reproduce
Can't reproduce it myself, only see sentry logs, about 4% users, any iPhone devices and iOS versions
Logs
Log example
``` Version: iOS 16.1.1 (20B101) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: BUS_NOOP at 0x0000000000000018 Crashed Thread: 17 Application Specific Information: StartPlayout > Attempted to dereference garbage pointer 0x18. Thread 17 Crashed: 0 WebRTC 0x1063a09c0 -[RTCVideoEncoderSettings maxFramerate] 1 WebRTC 0x1064a626c webrtc::ios_adm::AudioDeviceIOS::StartPlayout 2 WebRTC 0x1064aa2c0 webrtc::ios_adm::AudioDeviceModuleIOS::StartPlayout 3 WebRTC 0x106597b40 webrtc::internal::AudioState::AddReceivingStream 4 WebRTC 0x106507cc4 cricket::WebRtcVoiceMediaChannel::SetPlayout 5 WebRTC 0x106330268 cricket::VoiceChannel::UpdateMediaSendRecvState_w 6 WebRTC 0x1063304cc cricket::VoiceChannel::SetLocalContent_w 7 WebRTC 0x10632ec18 cricket::BaseChannel::SetLocalContent 8 WebRTC 0x106384334 rtc::FunctionView