I am building an streaming app with flutter and webrtc whereby I wish to only receive incoming video data and do not want anything to do with the local media streams (on my iOS device).
I wish to bypass asking the user for access to their microphone in order to establish a connection with webrtc – where the iOS device is the answer and receives an offer from my peer via my signalling server.
Right now it works if I disable the phones’ video but when I disable the audio stream it results in a black screen in the RTCVideoView.
` final Map<String, dynamic> mediaConstraints = {
‘audio’: true,
‘video’: false
};
localStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);`
This results in a connection, but when I do
` final Map<String, dynamic> mediaConstraints = {
‘audio’: false,
‘video’: false
};
localStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);`
I get logs that the connection is made but no media is shown to the screen.
I want to bypass this such that I don’t have to ask the user for access to their microphone for this to work as I have no need for their data, nor do I want to ask them for it because it just seems a bit fishy asking for access to their hardware for no reason.
Right now I have tried
- adding transceivers to set the tracks to receive only
- add a dummy local stream
- throwing my laptop out the window
Any insight would be greatly appreciated.
Thanks!
J
Right now I have tried
- adding transceivers to set the tracks to receive only
- add a dummy local stream
- throwing my laptop out the window
Right now it works if I disable the phones’ video but when I disable the audio stream it results in a black screen in the RTCVideoView. Ideally I want the set up to work without being concerned with the local device media.
James Potter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.