vladkorotnev / traktor-obs-relay

Small Traktor widget template/engine for OBS in Rust and HTML/JS
MIT License
25 stars 3 forks source link

Make the server public #4

Closed donmurdoc closed 2 years ago

donmurdoc commented 2 years ago

Hi, first off: I'm extremely impressed by how well the video sync works in the autodj. It works so well in sync, the tempo changes are super fast, and if I skip or rewind, it adjusts very well. Excellent.

Now what I wanted to know (sorry I'm not an expert in coding and servers):

Is it possible to make the webserver public, so as that another computer in the network can access and display the widgets?

vladkorotnev commented 2 years ago

Absolutely, change bind option in the config.toml file to the IP address the server is running on (or 0.0.0.0 to expose on all IPs -- but it may be a bad idea or dangerous).

Then edit assets/api/api.js and assets/api/api-ws.js to point to the same IP address.

If Traktor is running on a different computer, edit the fake "controller" the api installs too -- sadly I don't remember in which file the IP is.

donmurdoc commented 2 years ago

Ok, so I 1) Chaged the bin in config.toml 2) Changed api.js and api.ws.js 3) Changed ApiClient.js of the fake controller.

But I encounter these problems:

1) In my local computer, if I open the widgets (either via localhost or the traktor computer's ip) I can open them ok, EXCEPT for /auto-vj.html. Auto-vj.html opens, but is not playing the video.

2)If I open any widget on another browser via the network, they open (so I'm connected to the webserver), but they are not working (bpm displays ???, etc).

vladkorotnev commented 2 years ago

Probably you didn't need to change the fake controller IP if you're running the server on the same computer. Also make sure that in the js files you didn't remove the port number (number after the : in the IP). I'll test myself in a few moments

vladkorotnev commented 2 years ago

Ok I just tested in the following setup:

Laptop A on WiFi:

Laptop B:

When I play a track on laptop A, the laptop B shows the correct BPM. The video takes some seconds to load but is also working fine (if you have big video file maybe it's taking long to download as well)

vladkorotnev commented 2 years ago

0.0.0.0 ismaybe not too bad of an idea as long as you're sure nobody is breaking into your live gig LAN and it's behind a firewall to isolate from outside internet :-)

donmurdoc commented 2 years ago

Excellent, using that configuration worked perfectly. The potential of this is amazing, cause now the doors to have traktor vj is open.

This way, any vj can connect to my network, and get a feed of videos/gifs in sincro with the music I'm playing, and use it for live visuals.

Or maybe even if there's no vj, I can just use this for visuals. Possibilites are endless.

vladkorotnev commented 2 years ago

Closing for inactivity during 2 weeks