foosel/OctoPrint — pull request #663 by Bevaz (2014-12-05 07:25:20+00:00)
Title: Relative path for webcam stream

If Octoprint server and webcam stream are hosted on the same server there could be a problem
when access is possible from different networks: for example from local network and from internet.

Let assume that octoprint address from local net is **http://192.168.111.22:5000** and from internet **http://octoprint.somedomain.org**. Webcam stream is hosted on the same server on port **4321** and path **/video**.
In this case when you connect to **http://192.168.111.22:5000** the address of webcam stream should be **http://192.168.111.22:4321/video**. When connect to **http://octoprint.somedomain.org** the address of webcam stream should be **http://octoprint.somedomain.org:4321/video**

Now you can specify **:port/path** as a webcam stream address (**:4321/video** in example above) and it will be added to server address depending on how you access to the server. Port with path are removed from octoprint address and port with path for webcam stream are added.