I am currently writing an application that enables user to start a video call via webRTC using peerJS. Now I want users to be able to decide if they want add audio or not, but without restarting the call.
As I see it - and according to this answer - there is no way to control the microphone using the browser. Suppose I start the call with video and audio enabled I could mute the video element on the partners side. I don't want to do that. Why? I imagine that somebody could use the developer console of the browser and unmute the video element, thus spying on the caller without his or her knowledge.
So for now it seems that I would have to re-call the partner and activate both, video and audio, now if the user wants video only I would have to re-call again.
My question: Is there a better way to do it? Also, if answering the call is there a way to determine wether it is a video-only or a video and audio call?