Floating Audio Player for entire forum

AI-generated summary

The discussion revolves around creating a floating audio player for an entire Discourse forum, allowing users to play music from SoundCloud playlists while browsing. lowkey_324 initiated the request, seeking a solution to embed a persistent music player with basic controls and song information. Several users offered solutions, including using the Media Overlay Component to embed a SoundCloud player in a floating window via iframe, which can be enabled by whitelisting SoundCloud domains in site settings denvergeeks. A more advanced solution was provided by Don, who developed a custom theme component called SoundCloud Music Player that integrates directly into the forum. This component allows users to input a SoundCloud user or playlist ID, with options to hide the player and support multiple playlists Don. The component has been iteratively improved to fix UI issues on mobile devices and enhance desktop functionality Don. The conversation also explored the possibility of extending the component to support other platforms like Spotify and even video players for YouTube or Vimeo, though this would require more complex implementation. simon and merefield noted that while basic audio players can be built with a theme component using SoundCloud’s public API, more advanced features requiring authentication would need a backend plugin. The community praised the component’s functionality and expressed interest in further enhancements, such as playlist selection and cross-platform integration fbpbdmin, Aizada_M.

Hi, I’ve read through the forum trying to figure out if its possible to have an audio player for one’s entire discourse website. I’m not trying to do anything fancy like auto play.

What I’d like to do is have a music player floating on the website. So regardless of which topic or pages a user visits, they can decide to just click play and listen to music as they read through posts (so yes there should be the basic music player controls). The name of the song and the artists name would also appear. The music will be from Soundcloud playlists that I’ve made from my own account.

It’d also be great if there was a way to allow users to hide this music player.

Any chance you have any articles, plugins, third party services or instructions you can point me to in order to achieve this?

I have no idea if it’s possible, but this would be pretty cool in the sidebar as an additional section!

there’s been similar topics and possible solutions suggested

It can be done ;):

https://github.com/captbaritone/webamp

nicely done Robert!

Thanks for this! I have very minimal coding experience so after looking through the documentation I’m not sure I understand how to connect a SoundCloud playlist with this audio player. Any chance you have some insight?

this is cool too

Perhaps you could hire a freelancer to help you Marketplace

OOOOOOOO MMMMMMMM GGGGGGGGGG…

Mtv No GIF by MELOTIKA

The Media Overlay Component will provide a button at the corner of every iframe.

This way you can pop out any iframe into a separate little window, and keep it on top while browsing through the forum, until the user closes it.

Enable that Theme Component, and whitelist your iframe source (i.e. https://w.soundcloud.com and https://api.soundcloud.com) in your site settings under allowed iframes.

Then you can paste this snippet into a Topic Post…

<iframe src="https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/129053679&color=ff5500&auto_play=false&hide_related=false&show_comments=false&show_user=true&show_reposts=false" height=100%></iframe>

Click that button and that mini player pops up in the bottom right corner and stays open while you browse around the site (until you manually close it)…

hah. i was going to try this but you beat me to it. well done! :smiley: :clap:

Hello :wave:

I’ve made a simple theme component what fit your needs and you can use or it can be a good sample to customize it more. :slightly_smiling_face:

https://github.com/VaperinaDEV/soundcloud-music-player

I added some settings.This component uses the SoundCloud embed. You need to add your SoundCloud User ID and it will fetch your songs.

that’s super cool :smiley: nice work :clap:

This is EXACTLY what I was looking for. You are amazingggg! I will test it out this week. I hope you don’t mind me reaching out if I need some help though.

Amazing, @Don !!!

You are really fun to watch!

Hi @Don,

Any chance I can chat with you. I tried to find your profile, but couldn’t. I wanted to get some help on making thise theme component fetch playlist ids instead of user ids or at least have an embedded playlist (by inputting embed code or the playlist url) appear when you click on the “player” icon . Is this a possibility?

hi @lowkey_324 :wave: it is best to post your inquiry here in case others can help and so others can also learn the solutions. :slight_smile:

Hello, I’ve added a setting to add playlist. DEV: Add playlist embed by VaperinaDEV · Pull Request #1 · VaperinaDEV/soundcloud-music-player · GitHub

You can choose from two

  • embed type
    • user
    • playlist

And add a User ID or Playlist ID depends what you selected from the list.

LETSGOOOOOOO! you are honestly an ANGEL!

The only thing is after I add it as a component of the Default theme, I receive this message as it can’t fetch the URL for my public playlist. What am I doing wrong? I tried only inputting the playlist id and I tried inputting both playlist id and user id when I select playlist for embed type

Oh yes sorry, I fixed it. FIX: playlists typo · VaperinaDEV/soundcloud-music-player@3f4ae4d · GitHub