Using websocket to stream in video tag Using websocket to stream in video tag google-chrome google-chrome

Using websocket to stream in video tag


In addition to the text (string) messages, the WebSocket API allows you to sendbinary data, which is especially useful to implement binary protocols. Such binaryprotocols can be standard Internet protocols typically layered on top of TCP, where thepayload can be either a Blob or an ArrayBuffer.

// Send a Blobvar blob = new Blob("blob contents");ws.send(blob);// Send an ArrayBuffervar a = new Uint8Array([8,6,7,5,3,0,9]);ws.send(a.buffer);

Blob objects are particularly useful when combined with the JavaScript File APIfor sending and receiving files, mostly multimedia files, images, video, and audio.

Also i suggest to see WebRTC (Technology associated with WebSockets) Web Real-Time Communication (WebRTC) is another effort to enhance the communication capabilities of modern web browsers. WebRTC is peer-to-peer technology for the Web. The first applications for WebRTC are real-time voice and video chat. WebRTC is already a compelling new technology for media applications, and there are many available sample applications online that enable you to test this out with video and audio over the Web. Please check this link