jsmpeg-vnc
jsmpeg-vnc copied to clipboard
Sound?
Is sound coming?
Adding sound is not that hard, there will be only one downside and that is when the data is being transmitted. This could create a high latency(especially for low bandwidth users), but i don't think it will.
Capturing, encoding and transmitting sound is not that difficult, however, decoding and playing Sound in the browser is. Afaik there's currently no native Browser API that can deal with streaming audio, so we'd need to use a JavaScript decoder for that as well.
It's not standard yet, but in Firefox and Chrome you have https://developer.mozilla.org/en-US/docs/Web/API/MediaStream_API
Web Audio API is actually well supported and gives good latencies (around .5ms on desktop, 13ms on mobile).
Additionally, there already is a JS MP3 decoder that sends data to Web Audio API: https://github.com/audiocogs/mp3.js.
WebRTC (MediaStream) would be ideal, both for audio and video, as it is meant for low-latency playback (going as far as using SCTP over UDP instead of TCP). It may require a lot more work, though.
any API that you can use ?
In the server side, what will be best api to capture the audio? any samples?