Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you want to go with HTML5 only, you will need a browser implementing the <strong>HTML Media Capture</strong> draft (available <a href="http://www.w3.org/TR/capture-api/" rel="noreferrer">here</a>) in order to access the raw data from the microphone.</p> <p>Once you have this data in hand, you need to send it over the network. Websockets would be the HTML5 option to have fast enough round trips with the server (sending local audio data and receiving remote audio data at the same time)</p> <p>Since you mention python, I would recommend looking around the <a href="http://twistedmatrix.com/trac/export/29073/branches/websocket-4173-2/doc/web/howto/websocket.xhtml" rel="noreferrer">twisted implementation</a> of websockets.</p> <p>You can have all your clients "register" on the websocket server with a callerID, so the server knows where to find a given callerID.</p> <p>Then your server will need an "invite" API where caller1 "invites" caller2.</p> <p>Once the call is setup and each client starts sending its audio data, the server will be able to send this audio data to the other party.</p> <p>Upon receiving audio data, the browser will need to play this audio data on the speakers, probably using the HTML5 audiotag.</p> <p>To do this, you may be forced to use a "trick" : instead of having the websocket server forward the raw audio data to the client, you may need to simulate 2 "infinite" files :</p> <ol> <li>caller1.wav : sound captured on caller1 mic</li> <li>caller2.wav : sound captured on caller2 mic</li> </ol> <p>caller1 browser would add caller2.wav in the audio.src attribute once the call is setup (caller1 would be informed of this event via websocket) and hopefully if the python server appends the raw audio data to the caller2.wav as it receives it, it would start playing.</p> <p>This sounds like a cool prototype you're going to hack up !</p> <p>Good luck on your journey,</p> <p>Jerome Wagner</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload