raumHOCH / flexMOTE-samples

Sample applications for flexMOTE
MIT License
1 stars 1 forks source link

qrcode should not point to localhost:3000/#xyz #1

Open tillmannheigel opened 8 years ago

tillmannheigel commented 8 years ago

The QR-Code generator in the examples points to localhost:3000, what obviously isn't very useful. I think instead the QR-Code should point to the flexmotes server address.

There a few steps the will lead to this behavior: a) the client needs to know the address of the server by: best guess OR parameter b) the qr-code should use this ip address.

chrdavid commented 8 years ago

Well, the flexMOTE-samples are suppost to run w/ a running flexMOTE server on localhost:3000, as mentioned in the readme and the API usage example.

The qrcode generation is not part of flexMOTE, just an useful extension demonstrated in the samples. It's the job of the application to generate a valid qrcode, which obviously should point to the flexMOTE server it connects itself... So for the samples it's localhost:3000, for real live applications, it has to be adjusted, yes.

We could possibly add a settings variable to set the server path only once. But that also would require to load the js libs dynamically, as we load the flexmote.js right from the flexMOTE server (check the index.html).

A "best guess" could be implemented using the socket.io's connection url - so give it a try :)

chrdavid commented 8 years ago

Second thought: the flexMOTE server could return it's "public domain" to be used by connecting applications. This way the application could connect from an internal network and still expose a qrcode w/ public domain.