Video streaming over websockets using JavaScript

前端 未结 4 1665
梦谈多话
梦谈多话 2020-11-29 15:04

What is the fastest way to stream live video using JavaScript? Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 15:31

    Is WebSockets over TCP a fast enough protocol to stream a video of, say, 30fps?

    Yes.. it is, take a look at this project. Websockets can easily handle HD videostreaming.. However, you should go for Adaptive Streaming. I explain here how you could implement it.

    Currently we're working on a webbased instant messaging application with chat, filesharing and video/webcam support. With some bits and tricks we got streaming media through websockets (used HTML5 Media Capture to get the stream from our webcams).

    You need to build a stream API and a Media Stream Transceiver to control the related media processing and transport.

提交回复
热议问题