0

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

wochao
  • 1
  • 1
  • see this for help: [How to disable audio in webrtc mobile app(ios) without changing in framework](https://stackoverflow.com/questions/44131447/how-to-disable-audio-in-webrtc-mobile-appios-without-changing-in-framework) – Anbu.Karthik Nov 15 '21 at 11:03
  • @Anbu.Karthik It's didn't work.I am not pubilsh local video, audio to other. Just RecvOnly. "peerConnection add localStream " this will call pubilsh. – wochao Nov 16 '21 at 08:30

0 Answers0