P2PSP / Virtual-Room

A virtual room where friends share videos among them in real time directly over the web browser, with synchronized playback and a video chat at the same time.
GNU General Public License v3.0
34 stars 25 forks source link

fixed hardcoded URLs in reference to issue #6 #10

Closed jainamritanshu closed 7 years ago

jainamritanshu commented 7 years ago

I have fixed the hardcoded URLs in the room.js. Introduced a new variable domainURL. Hope it seems fine now :smile:

jainamritanshu commented 7 years ago

Hi, I have used window.location.host and window.location.port to determine the whole domainURL, hope this works fine! :smile:

josmangarsal commented 7 years ago

Thanks! Now it's much better but the signaling server url should be also dynamic. You can use hostURL to create signalServer in room.js.

jainamritanshu commented 7 years ago

Sure @josmanual I am on it. Just a question, I guess I would have to at least hardcode the signal server port in the file?

josmangarsal commented 7 years ago

Yes I think so, use a global var to define it.

cristobalmedinalopez commented 7 years ago

@jainamritanshu Yes, we will use the port hardcoded (for now ;-))

cristobalmedinalopez commented 7 years ago

BTW, I added a new option to test script. You can give the port number as a parameter for the built-in web server. Commit: https://github.com/P2PSP/Virtual-Room/commit/bdad61847fdd46828124ba5cbf19af695c035d71

jainamritanshu commented 7 years ago

I have replaced the hardcoded URL for signal server as well. Please have a look Also should we define another separate variable for signal server URL, since developers might not prefer to use the same servers for client and server side?

josmangarsal commented 7 years ago

For now we can use the same url for both, at least for testing I think.