jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 245 forks source link

Making mediaserverjs work from a dedicated server #108

Closed TheSisb closed 10 years ago

TheSisb commented 10 years ago

Having 127.0.0.1 meant connecting to mediaserverjs from another machine would break it. Document.domain gives more flexibility.

jansmolders86 commented 10 years ago

Thank you so much for this improvement! There is one more place where this should be implemented but I will take care of that. Again thank you very much!

TheSisb commented 10 years ago

No problem :+1: Thanks for making this so that I didn't have to haha. I look forward to contributing more.

jansmolders86 commented 10 years ago

Hey man,

I did some testing and document.domain does not solve the problem for every case. I'm currently substituting the fixed ip or domain, for a dynamic one which can be set from the remote settings, so you can configure it the way you want.

jansmolders86 commented 10 years ago

Hej there,

I finally created a "dynamic" solution to the ip problem. from this commit on: https://github.com/jansmolders86/mediacenterjs/commit/4c5c35a9e12c8b097b87865c057391ea8dc62ee7 You'll be able to configure both the port as the ip from the remote itself. If you don't configure anything, the local (internal) ip of the server will be used. You can also enter a DNS name if you don't want to use an IP.

Thanks again for your help!

TheSisb commented 10 years ago

This is a much better approach. I was looking at doing something more along these lines but being unfamiliar with the project I took the easy way out haha.

Thanks for the improvement.