2

I've successfully setup a WebSocket server using Ratchet for PHP on Windows/IIS. I went with Ratchet's available WAMP(WebSocket Application Messaging Protocol) setup so that I have Pub/Sub and RPC capabilities. That's been great for minor things like chatting or simple updates. What I am curious about is how to stream raw binary data (like audio/video) to a target audience (1 or more people)...

Server(s) :
- Windows 7 (64-bit) / Windows 2008 Server Enterprise (64-bit)
- PHP 5.4.x
- Ratchet (WebSocket Server) http://socketo.me/docs/wamp

Client Setup:
- Autobahn|JS http://autobahn.ws/js/
- when.js https://github.com/cujojs/when

Is there a solution out there using my setup that allows me to stream binary data to a target audience? Thanks in advance!

StratusBase LLC
  • 289
  • 1
  • 5
  • 16

2 Answers2

1

Technically you can setup the streaming like this: Send and receive binary data over web sockets in Javascript?

And then the playback of the audio: Streaming Binary with Node.js and WebSockets

Haven't found anything useful for video playback via streamed data and i think currently it's either unavailable or highly experimental.

Community
  • 1
  • 1
dkt
  • 146
  • 3
  • More examples: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html – dkt Jan 28 '14 at 14:43
  • These suggestions are appreciated but I've looked into them and they're all node.js implementations. Not PHP(using Ratchet). I will fiddle around a bit and see if I can make something work. – StratusBase LLC Jan 28 '14 at 18:23
  • 2
    @DigitalTrifecta Did you bump into something worthy eventually? – Remi M Mar 29 '15 at 05:11
  • @Azuli42 - To save myself a rather large headache I eventually switched to Node / Express / Socket.io. – StratusBase LLC Mar 30 '15 at 02:19
1

Somebody has a fork for Ratchet and he claims implementing binary data send/receive.

Take a look at this link.

And please don't forget to mark this answer as your accepted solution. Good luck

Khalil Laleh
  • 1,168
  • 10
  • 19
  • I found https://github.com/ratchetphp/Ratchet/issues/393#issuecomment-329532173 but still haven't figured it out. – Ryan Mar 09 '19 at 14:10