Jump to content

music background with mute


houssam_ballout

Recommended Posts

it would be easier to explain to your friend that websites simply do not do this anymore.  The only site that still plays embedded music is myspace, and nobody goes there.

 

However, if you really must do this, use an <embed> tag to load the music, then to mute it you:

 

var player = document.getElementById("theEmbedObjectId");
player.stop();

-Dan

Link to comment
Share on other sites

You should just put a meta redirect that will send them back to where they came from after about 2-3 seconds. It will save the users the trouble of clicking the back button themselves, since that's what people do as soon as uninvited music starts playing anyhow.

Link to comment
Share on other sites

The question you asked was for the mute functionality, which I've now given you.  Auto-playing music does not "give life to the website," it makes users leave.  I won't help any further than this.  If you wanted play/pause functionality then asking for it from the beginning would have been good, since then I wouldn't have closed the documentation page that I got the answer from.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.