The discussion revolves around playing music in the background of a Discourse topic. barreeeiroo initially asked if there’s a working method to achieve this, but the suggested plugin, Media Autoplay Plugin, is blocked by Google Chrome’s autoplay policy. Falco explained that Chrome only allows autoplay if users frequently watch videos with sound on.
Nichalas_Petranek suggested having site-level or category-level background music, which could be a unique feature, especially for specific categories. However, most users, including pfaffman and cmwebdev, agreed that autoplaying music is generally annoying and not recommended.
As an alternative, riking proposed adding a floating music player that allows users to control the playback. [fbpbdmin](/t/-/89053/9, 11) liked the idea of having site-level or category-level background music and suggested that it could be doable by adding a player to the banner area, as long as it comes with a pause button.
Alternately, I wonder if there is a way to have site-level or category level background music through means of a plugin or something… Although I suppose having site-level background music is no different than opening up your favorite streaming service and have that play in the background.
I’m on an aviation-based forum and a few categories are dedicated to specific airlines. Some of those airlines feature native boarding music on their aircraft. Being able to incorporate, for example, the boarding music of Qatar Airways to play in the background of the Qatar Airways category would be pretty sweet!
After skimming through the documentation provided by Google, I wonder if there is a way to store the music/media on the forum and have it play based on a trigger of sorts that circumvents the automatic aspect… For lack of programming knowledge, I’m not even going to try to type out some sample code to illustrate. Hopefully I’ve explained clearly enough and I can try to clarify where need be.
If you want web pages to auto-play music, the easiest thing to do would be to go back about 10-15 years. Almost everyone on the planet hates web pages that make noise they didn’t explicitly ask for, so they all use browsers that keep that from happening.
An acceptable alternate form of this feature would be a floating “music player” added on the page. By using a native <audio controls loop>, the user would be able to control whether it was playing.