1

In server side, I find that spring 4 has a support on building websocket server. However from spring document, in server side, only a demo of extending TextWebSocketHandler class is shown.

I guess I may need to use BinaryWebSocketHandler to transfer video stream between browers, but it seems that no one is demostrating or even discussing the usage of BinaryWebSocketHandler in Spring from google search.

Is it possible to implement such a feature in Spring? Maybe I should use plain java instead?

Besides, in client side, to submit live video stream to other browsers, which js library should i use? Is sockjs possible to do so? Or should i use socket.io?

Thanks.

4

1 回答 1

2

It's not about Spring or webSockets. Browsers should exchange video directly using webRtc. However signaling server requires for that. It can be implemented on Java using simple http. You can use spring httpInvoker or webSockets.

If both peers can't establish direction connection due NAT issue for transfer video, you should use TURN server. I don't think that there are any Java opensource TURN servers. The simplest thing you can do, implement simple signaling server for connection establishment, media stream should flow directly between browsers.

于 2014-10-24T14:23:26.490 回答