bladechob Posted October 12, 2008 Share Posted October 12, 2008 Doh! Sunday and my brain is fried! How can I embed sound (mp3 file) so that it remains constant in the background i.e. doesn't refresh when skipping to another page. All web pages are reference the index page. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 You could possibly use a hidden iframe, but I'm not too sure (I've never needed to use iframes, ever). Also, just to let you know, background sounds on web pages are SO annoying. I always have music playing while I'm on my computer, and I don't want to hear the fricken' Teletubbies theme song when I click a page, and I'm sure plenty of people feel the same way. =P Quote Link to comment Share on other sites More sharing options...
bladechob Posted October 12, 2008 Author Share Posted October 12, 2008 Who could possibly object to David Bowie's changes? Given that the site is a morphing one... Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 Who could possibly object to David Bowie's changes? Given that the site is a morphing one... Well, if you're playing David Bowie, that's slightly better than random beeping sounds or bad theme songs, but I'd still provide some way to turn it off. Quote Link to comment Share on other sites More sharing options...
bladechob Posted October 12, 2008 Author Share Posted October 12, 2008 yep the viewer can turn it off - all I want to do is make it play in the background and not restart on new page or refresh - that is soooooooo annoying Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 Well yeah, then check out iframes. I'm pretty sure that's a way to do it. Quote Link to comment Share on other sites More sharing options...
haku Posted October 13, 2008 Share Posted October 13, 2008 iframes is pretty much the only way to do it. But that being said - don't. Music on sites is one of the biggest reasons people leave a site without looking at it. You could also do a popup window, but most browsers block popups, so it probably won't work. Or, you could create your whole site using ajax so that the page never actually changes, just the contents. Your SEO rankings will go to crap though. Quote Link to comment Share on other sites More sharing options...
Zane Posted October 13, 2008 Share Posted October 13, 2008 yep the viewer can turn it off - all I want to do is make it play in the background and not restart on new page or refresh - that is soooooooo annoying you might have a rough time with that one. If you don't want the song to restart on refresh then the song is going to have to NOT autoplay. Everytime the page loads...if you have music to load...and it's set to autoplay...it's going to autoplay, most likely from the beginning. The only options I can think of are too complex to really go too in depth on. But you would have to control every event on your page using Javascript. Also you would somehow need to record the time in the current song, when the event occurred, store it in a Session, write a function to fade the volume up or down depending on if you're entering the page or leaving, and continue the song at the last time. Unless you can get the user to install some kind of software on their computer that runs only when your website is up then I doubt you'll have any lucky with a fully musically streamlined website. Quote Link to comment Share on other sites More sharing options...
Lamez Posted October 13, 2008 Share Posted October 13, 2008 pop up! with a flash player so the user can control if they want it on or off! Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 13, 2008 Share Posted October 13, 2008 how are iframes not the answer here? http://defunktmagazine.com/ ive done this before autoplay;visable controls and doesnt refresh on page change.. not the best for seo due to iframes you just build your content into the iframe not the player and have the content change around the player.. Quote Link to comment Share on other sites More sharing options...
Zane Posted October 13, 2008 Share Posted October 13, 2008 well I guess you're right..I didn't think too much on iframes. They seem like a thing of the past to me Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 13, 2008 Share Posted October 13, 2008 understandable i built that site over a year ago and fought to avoid iframes even then but for this they may in fact be the best answer Quote Link to comment Share on other sites More sharing options...
haku Posted October 14, 2008 Share Posted October 14, 2008 I really don't like iframes. But for this case, they are probably the best method. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.