loaded url dies in htmlviewer

Hello, folks. Long time no text.
I’m just trying to build an online radio player for one single station (live streaming). I’ve got the htmlviewer loading the page and starting the player, but after about 10 seconds the player stops and must be disconnecting, as the audio drops completely. is this some sort of “keep-alive” problem? I’ve tried both native and webkit settings.

If it’s Icecast or something like that, you can probably just stick a MoviePlayer on the window and call to the stream URL:

MoviePlayer1.Movie = OpenURLMovie("http://ipaddress/live/")

Note that you may have to parse the stream’s status JSON or XML to get the actual stream path.

I know this works pretty well on Windows as I have a freeware app that does it, and I’m pretty sure I tested on macOS and Linux, too, even though the entire userbase for the app was Windows-only.

Thanks, Anthony. I’ll give that a try. :slight_smile:
EDIT: may be awhile until I reply to mark this answered or not, as I have no idea how to parse the json or xml…therefore some googling in my immediate future. :wink:

Happy to help!

You should be able to grab either the stream info URL or the direct stream URL by inspecting the player element on the page, depending on how they’ve implemented it. If it’s the the stream info URL and a recent version of Icecast, just load it in to a JSONItem and traverse it and pull out the – I think – listenurl value.