How to close iOS webrtc mircoPhone using?

152 Views Asked by At

My scene:

In my iOS app, it just play remoteVideo by using webrtc. My project's webrtc is WebRTC iOS framework in cocoapods.(https://cocoapods.org/pods/WebRTC)

Here is my code:

    RTCRtpTransceiverInit *transceiverInit = [[RTCRtpTransceiverInit alloc] init];
    transceiverInit.direction = RTCRtpTransceiverDirectionRecvOnly;
    [self.peerConnection addTransceiverOfType:RTCRtpMediaTypeAudio init:transceiverInit];
    [self.peerConnection addTransceiverOfType:RTCRtpMediaTypeVideo init:transceiverInit];

It works.After setRemoteSDP, I get addStream‘s callback. And, set the view as renderView.It can show remoteVideo on my view.

But I noticed iPhone's microPhone is using. How to close the microPhone recorder ?Because I don't need publish any data to remote client.In my app, it's just a receiver.

Img

0

There are 0 best solutions below