Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Music playing throughout Website

Featured Replies

Hi all,

 

My question is, would it be possible to have music - a song, playing constantly while someone browses through different pages of a website?

 

It's something I've never thought about but someone had asked me and I have no idea.

 

Cheers,

Al.

It is possible by not recommended...

 

- it can be annoying

- it can be embarrasing (if the user is at work browsing the net while they're suppoed to be working)

- not everyone has their sound turned on

- people already listen to music while they browse

  • Author

Yea I would be against putting music on a website unless the website in question was selling music and had an option to listen to part of a track.

 

But someone has asked me about adding music to a site in the way described in the first post - could you give me any links to suggestion or tutorials on how to implement it that way?

The only way I now that is easy to code is to use out of date frames in a frameset.

 

You put the audio code (and a controller if you want) in a top frame which has only a little height (or you omit the top frame and put the audio in the frameset when there is no controller) and then put every page into a lower frame.

 

The frameset (and the top frame if you have one) are constant and the pages change in the lower frame and the audio keeps playing. All links to other pages must use the target code to load in the lower frame.

Clean way of doing it would be AJAX.

 

So you should load page content without page refresh.

 

Just don't forget to create actual links to every page as well, cause otherwise google won't index your website.

Don't do it! I hate that! (Sorry pet peeve)

 

For all the reasons listed by BlueDreamer plus some people (me for instance) just don't like it.

 

If you do decide to do it make sure it is an option (not autoload) and that people can easily see where to turn it off.

  • Author

Thanks for the replies.

 

Agree mantis, I'm not a fan of music on a website either. The site is a Wordpress site and currently has a plugin installed (with a play/pause button and no auto-play) but I'm not too sure the client is 100% happy with the current plugin. Still waiting for word back but hopefully things will just stay as they are.

 

Al.

Another solution could be to have the musicplayer (with autoplay) in a seperate popup window. You could use javascript window.open method for that. But I think you would need a click event from the user to execute the method (if it is called automaticly eg. from window.onload it would likely be blocked by the browsers popup prevention)

Thanks for the replies.

 

Agree mantis, I'm not a fan of music on a website either. The site is a Wordpress site and currently has a plugin installed (with a play/pause button and no auto-play) but I'm not too sure the client is 100% happy with the current plugin. Still waiting for word back but hopefully things will just stay as they are.

 

Al.

 

Fair enough. Although, if I were you I would argue the case. I find a lot of clients are simply unaware that this could negatively impact perception of their site. Musical websites were trendy for a while as was auto-play video. I think it has since been agreed upon as a bad practice (or at least an annoying one) and is probably why a lot of plugins wouldn't bother to include the option. I'm sure you could find one though. I just googled it and found this:

http://wordpress.org/support/topic/how-to-autoplay-a-song-on-home-page

 

Apparently I'm not the only one with strong feelings on the subject ;)

You need to think about blind people using your website; they probably use a screen reader, so would music playing on every page mean that mean that the screen reader is drowned out by audio?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.