A
A
Arthur Asatryan2015-02-26 21:12:19
JavaScript
Arthur Asatryan, 2015-02-26 21:12:19

Broadcast video stream using HTML5 Websockets?

The point is the following.
Send live webcam video to other conference participants

navigator.getUserMedia  = navigator.getUserMedia ||
                          navigator.webkitGetUserMedia ||
                          navigator.mozGetUserMedia ||
                          navigator.msGetUserMedia;

var video = document.querySelector('video');

if (navigator.getUserMedia) {
  navigator.getUserMedia({audio: true, video: true}, function(stream) {
    video.src = window.URL.createObjectURL(stream);
  }, errorCallback);
} else {
  video.src = 'somevideo.webm'; // fallback.
}

Initially send data to the Java server using Websocket , then from the server to all users.
And so the question is, how to read the bytes of the stream from stream in order to send them to the server in the future? Tried FileReader but its readAs* methods accept only Blob types as input.
Any ideas? Maybe other implementations, approaches?
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur Asatryan, 2015-03-03
@viwoam

The question is closed.
Can be implemented using WebRTC
However, flash is the dominant technology so far.

A
Alexey Yaroshevich, 2015-02-27
@qfox

It is not very clear why this should be done via websocket, but even if you imagine how much you will send through them, the quality will be that.
You can try to look towards solutions like https://github.com/phoboslab/jsmpeg , but this is on nodejs and requires ffmpeg/VLC.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question