I have a question about the use of the widgets

I used the player widget on a website but i noticed some strange behaviour.
The widget get the metadata correctly from my WAN address but it tries to get the stream from the internal ip address.


Is there a way to solve this item? Have i installed something wrong?

Kind regards,
Serge

I did some more digging and when i checked the code for the player in my browser i found this part:

        if (this.playerMode == "manual") {
            this.settings.url = "";
            this.settings.codec = "";
        } else if (this.playerMode == "file") {
            this.settings.url = "";
            this.settings.codec = "";
        } else if (this.playerMode == "auto") {
            this.availableMobileStreamQueue = [];
            this.availableDesktopStreamQueue = [{"url":"http:\/\/192.168.0.33:8000\/_mp3","codec":"mp3","bitrate":128,"mobile":"0"},{"url":"http:\/\/192.168.0.31:9007\/_hq","codec":"mp3","bitrate":128,"mobile":"0"},{"url":"http:\/\/192.168.0.30:8730\/_b","codec":"mp3","bitrate":128,"mobile":"0"}];
            var stream = this.getNextAvailableStream();
            this.settings.url = stream["url"];
            this.settings.codec = stream["codec"];
        }

In the “this.availableDesktopStreamQueue” is my local ip address instead of the WAN IP address whereas in the “function attachStreamMetadataToPlayer” the WAN address is visible.

I found the origin of the wrong IP it was in the stream settings of Libretime. Which leads me to another problem. I have 3 different stream servers. Internal IP’s xxx.xxx.xxx.30 xxx.xxx.xxx.31 and xxx.xxx.xxx.33, from the internet you can reach these servers through other ports. The first is port 8000, the second 8730 and the third 9007 my router connects these ports to the correct server (this also works for the IPv6 addresses). But in the Libretime UI i can only use my domain name for the first stream. If i use the domain name for the second and third stream then Libretime doesn’t connect to the icecast2 daemons on those servers. What am i doing wrong here?

LibreTime is currently missing a way to specify a “public url” for the streams.

A weird workaround is to use the domain name of the icecast hosts and add a redirect using your firewall (catching outgoing traffic using the resolved icecast server ip and port).

Is there a way to add this as a “nice to have feature”? :wink: