Video streaming from client to server: which alternative use, websocket or webrtc

前端 未结 5 1143
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 04:08

I wish do several little projects experimenting with video and audio streaming from client to server and from client-server-multiples points, I have several questions:

5条回答
  •  星月不相逢
    2021-01-03 04:28

    Peer2Peer?

    Can be done with WebRTC, not with WebSockets. See Do websockets allow for p2p (browser to browser) communication?

    Browser support?

    WebRTC: Chrome + Firefox (+ Opera)

    WebSockets: Chrome + Firefox + IE + Safari (+ Opera and some others)

    Transport?

    WebRTC: UDP (SRTP), (also possible: TCP mode with TURN server) hopefully always end-to-end encrypted, but I'm not sure in case of TURN servers

    WebSockets: TCP, can be secured via HTTPS/WSS, but not end-to-end between peers!

提交回复
热议问题