WebRTC requests access to the microphone when watching a video stream (iOS)

177 views
Skip to first unread message

Михаил Сеин

unread,
Nov 5, 2018, 8:53:40 AM11/5/18
to discuss-webrtc
Hello!

I apologize for writing here, I do not know how to solve my problem.

Platform: iOS
Latest version of GoogleWebRTC

I use the WebRTC to watch the stream that I broadcast from my webcam.
The problem is that the mobile application requests access to the microphone when the video-audio stream starts. As far as I understand, this is related to RTCMediaConstraints (offerToRecieveAudio, OfferToRecieveVideo). If you set the audio constraint = False, then the application will not request access to the microphone, but then there will be no audio stream.

Is there any way to fix this? (to avoid the request for access to the microphone, because it is not needed because I only need to watch the stream, this is not a video chat)

Thank.

Andriy Buchynskyy

unread,
Nov 5, 2018, 9:05:40 AM11/5/18
to discuss-webrtc
Hello, from my opinion if you have one way video and audio sending you can offer to send video and audio only for the side that will stream. For example if you have client A and B and  B will send video and audio to A, so you can send constraints for B like audio = True, video = True. And when you send constraints to A you can set audio = False, video = False. 

BWSwift

unread,
Nov 5, 2018, 9:12:51 AM11/5/18
to discuss-webrtc
Hi, if you only watch the stream you need to generate receiveonly sdpOffer (fast way - try to not setup loacalMedia stream to PeerConection before generate the offer).
Reply all
Reply to author
Forward
0 new messages