cjroth / aframe-phantomjs-continuous-streaming

Browse the web in VR by live streaming a web page into Aframe using PhantomJS and ffmpeg.
MIT License
45 stars 17 forks source link

port mentioned in docs for stream doesn't seem to match shell script #3

Closed micahstubbs closed 7 years ago

micahstubbs commented 7 years ago

the docs say port 8888 https://github.com/cjroth/aframe-phantomjs-continuous-streaming/blob/master/README.md#run

but the shell script seems to use ports 8082 and 8084 https://github.com/cjroth/aframe-phantomjs-continuous-streaming/blob/master/stream-server.js#L13

would be nice to clarify the docs 😄

cjroth commented 7 years ago

Oh yeah, this is kind of confusing.

So the PhantomJS script (runner.js) actually creates its own server on port 8888 to listen for user events eg click/navigate which the browser will forward to it once I get that part working. (For now I've been curling... curl http://localhost:8888 -d '{ "type": "click", "x": 25, "y": 30 }'.

The shell script with ports 8082 and 8084 is the script borrowed from jsmpeg which Phantom streams its output to (see scripts/phantom-ffmpeg-stream.sh) on port 8082. This then sends the mpeg data to the browser via a Websocket on port 8084.

You shouldn't need to worry about the details of this script or ports 8082/4 much unless you need to change the IP from 127.0.01 to your network IP.

micahstubbs commented 7 years ago

thanks for explaining what's happening!