V
V
Vyacheslav Belyaev2016-09-14 06:38:49
JavaScript
Vyacheslav Belyaev, 2016-09-14 06:38:49

How to make an audio dialogue on the site?

I need to implement audio and video communication in the site. I use Webrtc, it was possible to transmit the voice, but it starts working only when both interlocutors press the use of the microphone.
Is it possible to do this: Here the interlocutors are chatting and one of them decided to say something in a voice, he makes a call and the second one starts to hear him. If the second also needs to convey something by voice, then he also presses to call.
Now the logic of work is as follows https://simplewebrtc.com/audio.html?chat

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hbruser, 2016-09-14
@hbruser

Yes, it is possible to do so.
In the script https://simplewebrtc.com/audio.js you use something like

navigator.mediaDevices.getUserMedia({video:{width: 320, height:240}})

When you call getUserMedia() , the browser requests access to the microphone.
Therefore, in order not to request access to the microphone, you simply do not need to call it.
Another thing is whether this will break this particular script and the logic of its work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question