Custom audio players

Circling back to this as some of the folks/projects talking here have overlapping goals.

LibreTime has a couple issues in the queue -


Radio Station plugin for WordPress has a few related to audio players -


OpenProducer platform for radio stations and podcasters would like to bridge these together -


Assuming all these features could be provided by Radio Station + LibreTime (once there’s an API), we can direct resources towards development with a bounty, paid beta and/or series of hackathons directed towards radio stations and podcasters.

Would be great if we could bring all involved contributors together in the #openproducer channel in https://slack.opencollective.com/

So ultimately there are a bunch of different issues here.
The primary one is LibreTime provides widgets that use libraries that seem to not work reliably on all systems. The widgets and radio page are the most obvious way for people to stream but in reality they could use any of these players with LibreTime because most of them should be able to stream the Icecast stream LibreTime provides. Most modern browsers can stream a mp3 stream just by opening up the file.

The Sticky Audio Player is something that would need to be implemented on the front-end website and our widget will never support that out of the box as per the reasons above.

What we need at this point is for someone to deep dive into the Widget/built-in audio player and test it on a whole slew of platforms and identify where it fails and then suggest a solution that works for all of them that we can resolve it with.

So the sticky audio player would be a separate project (from the web player that ships with LibreTime)?

Would this be a LibreTime feature/project? Part of the Radio station plugin project? Something else?

As noted in this discussion there are several existing solutions or projects with similar goals. How can we reduce duplication and focus resources on something that can be shared across all projects?

I think that Radio station plugin is a separate project in and of itself but the web player plugin they are developing should be stand-alone and at the same time compatible with LibreTime and other radio streams.

Really the widget is kind of a hack for people who don’t have their own solution built into their website like what hopefully the radio station plugin will provide or whatever other custom player.

At this point we just need someone to do full testing on the widget we provide with every imaginable browser and operating system combination, report their findings and then make a decision if there is something better we can plugin that will replace what we have. It could be a rather involved process.

I don’t see the widget being an essential part of LibreTime because the functionality can be easily duplicated elsewhere but in reality a lot of people using LibreTime depend on it I think because they don’t have other solutions in place already. So it is a useful component and it’d be good to provide the best option that we can out of the box.

Right now, it looks like they’re releasing it as part of their pro version, but maybe I’m missing something as we were talking about collaborating on a player earlier in this discussion -
https://github.com/netmix/radio-station-pro/issues/33

There are players that looked promising like the webcomponent player @dascritch was working on

Wonder how close Azuracast comes to something we’d want to include in LibreTime. Maybe there’s an opportunity to incorporate what they’re using and collab with their team https://www.azuracast.com/about/screenshots.html#public-player-page

@guasaus As regards the player review thread, you’re right it is a more general review of Players rather than just for Pro. Whatever we decide upon will be in both Free and Pro versions though, but we may split up the player features for those. For example, currently we have decided that a widget player will be in the free and a sticky header/footer player in Pro. A popout player could be added to the widget later and might be in either.

As regards continuous playback, I have an experimental side project that uses javascript History API to allow for navigation and page loading on a site without playback interuptions. (This works between WordPress pageloads, but the same javascript code can be applied on other platforms.) As far as I know this hasn’t been possible before without going “headless” or changing CMS platforms.

@robbt Curious what underlying library the LibreTime widget uses?

So this could be a potential solution? If I’m understanding correctly, the continuous, sticky player doesn’t really depend on Radio Station plugin or a particular CMS. It would be nice to include something you can enable w/o custom theming, but not a requirement.

If that’s the case, can we work towards a common solution?

@gusaus I am playing with some code to try to use a common HTML element structure and styles for the player, but with the option of using one of a number of different javascript libraries for the player script. (Amplitude, Jplayer, Howler, Media Elements.) I’m doing the coding in a WordPress context but depending on what I end up it may be useable or modifyable for other platforms.

As for the continuous playback, yes that is a potential solution I am keen to pursue. The History API transition loading would be a cool WordPress plugin in it’s own right, as not having to convert your WordPress site to a headless javascript loading one just to make that happen is a real plus.

But I haven’t yet tried combining those with a Sticky Element. There is an additional challenge… Since with this method the current player could be “within” each of the loaded pages, there needs to be some additional code to communicate between player instances so that the any newly displayed player controls would be able to pause the existing player audio.

Further from this would be later solving the problem of possibly having multiple tabs playing audio from a site… There are websockets and things to communicate between windows and stop a stream in another player so this shouldn’t be too hard either, but that gives you an idea of what needs to be solved over time.

Most of this is over my head (even with coffee) but my takeaway is there’s some overlap with what’s on the Radio Station/WordPress roadmap and needs of both LibreTime and AzuraCast.

Would it be possible to scope out x-project solution? https://github.com/OpenProducer/openproducer-platform/issues/16#issuecomment-623311641

@gusaus As I go I’m trying to write it in a way that works both within WordPress and without it, but this means adding a bunch of extra functions and function checks just to replicate some of what WordPress does already. Am making good headway though.

1 Like

@majick777 Great to know you’re looking at all of the above while first focusing on the WordPress / Radio Station feature. Let’s try to bring together everybody interested in collaborating on players for LibreTime, AzuraCast, and Radio Station (if you need) into #openproducer’s channel in https://slack.opencollective.com/

Just came across https://www.wrir.org/ as an example of LibreTime in this docs PR https://zklosko.github.io/libretime/

I think that’s powered by WordPress and has some pretty cool audio player and playlist functionality. https://www.wrir.org/schedule/ looks like it could be powered by the Radio Station plugin?

If so, possibly there are some elements that could be incorporated into those projects?

1 Like

We’ve been talking about this functionality in the OpenProducer queue as we’d really like to include much of this in the MVP for stations and podcasters.

Not sure if/what could be incorporated into LibreTime and/or a stand-alone Audio player, but it would certainly be worth bringing together folks involved with these projects (most are talking in this thread), scoping out, and contributing back to those projects.

Interested? Join #openproducer in https://slack.opencollective.com/

This player, part of the WordPress Pro.Radio theme, integrates with AirTime/LibreTime

Good inspiration for a stand-alone player.

Just curious. Has there been any progress with any of the sticky players discussed in this thread?

Resurfacing this discussion as @djtonyz and @majick777 have recently released this WordPress plugin that includes a sticky audio player (in addition to a ton of other features) https://radiostation.pro/

With LibreTime integration on the roadmap (and a free trial currently happening), it might be a great time to try if you’re using WordPress to power your site.

1 Like