Use fancy audio player

Hi,
I’m planning to launch an audio community and was looking at audio player options in Discourse. There don’t seem to be any out-of-the-box solutions.

Would it be possible to integrate a player like the Podigee Podcast Player or Podlove Web Player so that any link to an audio file in a post would appear in that player?

I don’t know anything about Discourse coding, but from Podigee’s Github it seems like all that would be needed is to wrap an audio file URL in some code.

window.playerConfiguration = {
      "episode": {
        "media": {"mp3": "https://example.com/episode-1.mp3"},
        "title": "Transcript Test"
      }
    }
    <script class="podigee-podcast-player" src="https://cdn.podigee.com/podcast-player/javascripts/podigee-podcast-player.js" data-configuration="playerConfiguration"></script>

Similarly for Podlove. Is it difficult to detect audio files and do this?

2 Likes

Both links you shared require more information than a single link to MP3 to create the fancy player, so I don’t see a way for users to drop all the necessary bits easily.

We do have working out of the box onebox for YouTube, SoundCloud and similar ones can be allowed in the iframe settings.

Can you explain more about the type of files you will be using and who (staff, RSS feed, all users) will be sharing those files. Also where to you host those.

3 Likes

I see. I had a suspicion it wouldn’t be as easy as it seemed…

Yes, I’m aware of the iframes and added some relevant podcast hosting sites. But I was thinking that people would share their work in progress or something that is not public anywhere else.

Where the files would be hosted - I haven’t given that much thought yet. I would imagine instant file hosters, perhaps Dropbox, Google Drive (do they even allow direct file access?) or maybe I will allow increase upload limits.

This is the first thing to decide. In very partial to directing users to use some specialized service, like SoundCloud. They will normalize bitrate, codec, containers, adaptative bitrate during streaming, and disk space for you.

If you want users to upload files directly, you may want to setup some object storage service from day 1 (like Digital Ocean Spaces). That way your backups can keep on reasonable sizes.

3 Likes