ClusterWS-Client-JS icon indicating copy to clipboard operation
ClusterWS-Client-JS copied to clipboard

raw video/audio access on the server

Open alirezag opened this issue 7 years ago • 3 comments

Submitting

  • [ ] Bug
  • [x] Question
  • [ ] Suggetion
  • [ ] Other

Details

Hi all, I'm thinking of using ClusterWs for a demo app. I was wondering if I can access the raw video data on the server for some extra processing before passing it to the clients?

alirezag avatar Oct 18 '18 09:10 alirezag

I hope i understood your question properly :)

There is no message modification on the publis event but what you can do is to send message (vide/audio) to the server with standard send then process it on the server and then publish to the channel:

Client -> standard send -> server (process) -> server.publish to the channel -> all other clients which listen to the channel.

This is one of the best approaches which i also prefer to use in most cases as i can do proper data validation and stuff.

Now about video and audio streaming i don't think WebSocket protocol is the best way to deal with it. I think you better check out UDP protocol.

goriunov avatar Oct 18 '18 10:10 goriunov

thanks for the reply. As for the streaming, would webrtc work?

alirezag avatar Oct 19 '18 08:10 alirezag

Yes if you are using it for Peer-To-Peer communication (in any way you will need to use websokcet for signalling when user is connected or disconnected to stop or start stream for particular IP)

goriunov avatar Oct 19 '18 10:10 goriunov