Browser to browser video chat testing without WebRTC. How to Use the web socket server to send and receive data in real time.
The overall process will be like this:
- Obtain media stream using
getUserMedia
to access webcams on the local computer. MediaRecorder
encodes media stream and converts it into blob data.(media segment)- Send blob data to the server via a web socket.(Blob data will be converted into arrayBuffer)
- The server returns the data back to the client.
- By using
appendBuffer
, appends the media segment to the SourceBuffer in MediaSource.
$ cd backend
$ npm install
$ npm start
$ cd frontend
$ npm install
$ npm start