IOS microphone permission

77 views
Skip to first unread message

yimu wei

unread,
Dec 8, 2021, 7:36:27 AM12/8/21
to discuss-webrtc
I created a WebRTC audio receiver. only receive audio.I don't want the APP to ask for microphone access.can anyone tell me how to do it ?

my code is :
---------------------------

let mandatoryConstraints = ["OfferToReceiveAudio": "true","OfferToReceiveVideo": "false"]

let sdpConstraints = RTCMediaConstraints(mandatoryConstraints: mandatoryConstraints, optionalConstraints: nil)

self.remoteParticipant?.peerConnection?.offer(for: sdpConstraints, completionHandler: { (sessionDescription, error) in

     // set local sdp .....

})

---------------------------

and sdp info: audio type is recvonly.
Reply all
Reply to author
Forward
0 new messages