Closed jamesshaw1987 closed 7 years ago
Yeah, so if the _PLEX_LOCALURL environment variable is set, _baseurl will be set to that value. And if getStreamUrl() then just uses _baseurl it will attempt to fetch the media streams from the local network, which will fail because the request is made by the Alexa servers.
_stream_baseurl is always set to the value of _PLEXURL, so will always be the publicly available URL. Which means getStreamUrl() can safely use that variable, knowing it will always provide a publicly available stream URL.
AH yes, I forgot that Alexa needed an external URL to be able to cope with music playback. Thanks!
Thanks for the adjustment in the Readme file as well! Looks good, but I'm wondering why you changed the getStreamUrl method? As it is written now, if you only use the Global URL, it will be ok. However, when you would be using the Local URL, the base_url will be replaced, but as the getStreamUrl uses the _stream_baseurl variable, it will still call upon the Global URL. Could this be the case?