/    Sign up×
Community /Pin to ProfileBookmark

Backgroung music- consistent upon refresh

I have a website that has background music, by using the <embed src=”whatever.wav”…>.

However, each time a new page is loaded or refreshed, the song starts over from the beginning. How do I get it like that on [url]www.enya.com,[/url] where the song plays continuously from page to page, not starting over when a new page is visited.

Thank you,
mickapoo

to post a comment
HTML

26 Comments(s)

Copy linkTweet thisAlerts:
@Paul_JrJan 11.2004 — They use frames.
Copy linkTweet thisAlerts:
@PeOfEoJan 11.2004 — or just do not use background music because it is annoying as heck, especially when I have winamp running
Copy linkTweet thisAlerts:
@Jeff_MottJan 11.2004 — or just do not use background music because it is annoying as heck, especially when I have winamp running[/quote]ditto
Copy linkTweet thisAlerts:
@ArrtuJan 11.2004 — Set up a frameset doc :

<HTML>

<HEAD>

<TITLE> INDEX </TITLE>

</HEAD>

<FRAMESET COLS="1,*" FRAMEBORDER=NO FRAMESPACING=0>

<FRAME SRC="music.htm" NAME="side" SCROLLING=no>

<FRAME SRC="main.htm" NAME="main">

</FRAMESET>

</HTML>

then set up your music document

<HTML>

<HEAD>

<TITLE> INDEX </TITLE>

</HEAD>

<BODY>

<OBJECT DATA="music.mid">

<EMBED name="music" src="music.mid" width=1 height=1>

</EMBED>

</OBJECT>

</BODY>

</HTML>

That should just about do it. if you want to be extra cruel, you could put a NORESIZE in the frameset. Bear in mind that if you put music on a site that people have no control over, they will probably a) despise you for ever to the point that they will kill you on sight or b)never visit yoru site again
Copy linkTweet thisAlerts:
@spufiJan 11.2004 — I'll also add my vote for not having music playing as a default and not giving the user the ability to turn it off. Also not the <embed> tag isn't valid (X)HTML according to W3C.
Copy linkTweet thisAlerts:
@ArrtuJan 12.2004 — You are right, embed is not valid. But then, according to w3c, neither is the ability to change scrollbar color, track color etc in CSS. The problem lies with the fact that not everyone uses an up to date browser, moreover, not everyone uses internet explorer which in current versions fully supports the OBJECT tag. Netscape does not. It is for the benefit of NETSCAPE and older browsers that the EMBED tag has to be included, otherwise when the browser reads the code, it will overlook the OBJECT tag as it does not know what to do with it.
Copy linkTweet thisAlerts:
@Robert_WellockJan 12.2004 — I challange that statement on EMBED.

However <embed /> is valid XHTML if you use XHTML 1.x eXtensibility I myself wrote: "XHTML 1.0 EMBED Profile 1.0 DTD" last year so if anyone wants to view any of my Beck Movie files and use the W3C Validator on the code feel free you'll find it validates.

From http://validator.w3.org/
This Page Is Valid -//XHTMLCODER//DTD XHTML 1.0 Embed//EN![/quote]

[i]M$ Explorer does not support <object> [b]correctly[/b] and that is why I had to resort to creating the above.[/i]

?
Copy linkTweet thisAlerts:
@spufiJan 12.2004 — [i]Originally posted by Arrtu [/i]

[B]You are right, embed is not valid. But then, according to w3c, neither is the ability to change scrollbar color, track color etc in CSS. The problem lies with the fact that not everyone uses an up to date browser, moreover, not everyone uses internet explorer which in current versions fully supports the OBJECT tag. Netscape does not. It is for the benefit of NETSCAPE and older browsers that the EMBED tag has to be included, otherwise when the browser reads the code, it will overlook the OBJECT tag as it does not know what to do with it. [/B][/QUOTE]


Not exactly true.

http://www.alistapart.com/articles/flashsatay/

Flash used without the <embed> tag and it runs on Netscape.
Copy linkTweet thisAlerts:
@PeOfEoJan 12.2004 — Applets can use the deprecated applet tag or the object tag is I am not mistaken. So you could always resort to using them too (ugh applets load slowly :mad: )
Copy linkTweet thisAlerts:
@mickapooauthorJan 15.2004 — Arrtu,

Thanks for the advice in using frames. However, I tried that, but what happens is:

1. I receive a pop-up message asking about Active X controls and also,

  • 2. The windows media player opens. How do I get this not to appear, I only want it to play automatically, such as with the enya.com website.


  • Thank you so much for your help thus far.
    Copy linkTweet thisAlerts:
    @TomDenverJan 15.2004 — The pop up about ActiveX controls is due to your browsers security settings. Probably you have it set to "Prompt" instead of "Enable" on ActiveX controls. If you're using IE, go to Tools -> Internet Options. Click the Security tab, hit the Custom Level button and check your settings.

    I don't know how to solve the other problem with Media player. Try looking at the source code on a site that works the way you want it to?
    Copy linkTweet thisAlerts:
    @TomDenverJan 15.2004 — Enya's site uses Flash to play music in a separate frame.
    Copy linkTweet thisAlerts:
    @PeOfEoJan 15.2004 — enya?
    Copy linkTweet thisAlerts:
    @Paul_JrJan 15.2004 — [i]Originally posted by Arrtu [/i]

    [B]You are right, embed is not valid. But then, according to w3c, neither is the ability to change scrollbar color, track color etc in CSS.[/B][/QUOTE]

    Yes, that's because none of those things [i]are[/i] valid...

    [i]Originally posted by PeOfEo[/i]

    [B]enya?[/B][/QUOTE]

    http://www.enya.com
    Copy linkTweet thisAlerts:
    @mickapooauthorJan 15.2004 — I am not using Flash, but I do have it in a separate frame, as a user suggested above (very far above). Anyway, when I first had the page w/ background music using the <embed> tag, I set the width and height to 0, and that took care of the actual Windows Media Player from popping up. Now, using the frames, it appears again.
    Copy linkTweet thisAlerts:
    @PeOfEoJan 15.2004 — you might as well use

    <bgsound src="" loop="">
    Copy linkTweet thisAlerts:
    @mickapooauthorJan 15.2004 — but I thought that in order for it to remain continuous (meaning the one song plays from start to finish w/o stopping and starting with a refresh or different page) I had to use frames. That's how this topic started.
    Copy linkTweet thisAlerts:
    @PeOfEoJan 15.2004 — you would put that in a frame and not use the embed tag because it is not supported by ns.
    Copy linkTweet thisAlerts:
    @mickapooauthorJan 15.2004 — Ok, I tried that, and still the Windows Media Player appeared.
    Copy linkTweet thisAlerts:
    @Jeff_MottJan 16.2004 — [i]Originally posted by PeOfEo[/i]

    [B]enya?[/B][/QUOTE]
    You're a LotR fan, are you not PeOfEo? The song "May It Be" towards the beginning of the credits in FotR is Enya.
    Copy linkTweet thisAlerts:
    @PeOfEoJan 16.2004 — I sat in that movie so long, I am not going to go sit through the credits lol. The movie was great, the third one, but frankley that tie up session after the ring was destroyed was just HIDEOUSLY LONG.
    Copy linkTweet thisAlerts:
    @Jeff_MottJan 16.2004 — but frankley that tie up session after the ring was destroyed was just HIDEOUSLY LONG.[/quote]Well, if you figure your average 2 hour movie uses maybe 10 minutes to close up the story, figure how much time should be allotted for a 9 hour film. And, despite the relatively typical ending (good guys win and live through it), I felt the end helped to lessen the feeling of it being ordinary.

    My only complaint is that the characters sobbed far too much in RotK.
    Copy linkTweet thisAlerts:
    @TomDenverJan 16.2004 — People exist that have not heard of Enya?
    Copy linkTweet thisAlerts:
    @Paul_JrJan 16.2004 — [i]Originally posted by TomDenver [/i]

    [B]People exist that have not heard of Enya? [/B][/QUOTE]

    *Raises hand* Right here.
    Copy linkTweet thisAlerts:
    @ArrtuJan 17.2004 — The OBJECT tag became the standard on the introduction of HTML 4.0, however problems existed for anyone who used NS4.0 as it did not support the OBJECT tag and continued to honour the EMBED tag. It is for the benefit of anyone who, for whatever reason has not updated their browser beyond NS4 that the embed must be included. IE4 DID support the OBJECT tag. On the other hand the EMBED tag has never been part of the HTML standard. The OBJECT tag was introduced because before it was introduced IE and NS had conflicting ideas over what should be included. For example NS4 supported the attributes BORDER, HIDDEN, PALLETTE, PLUGINSPAGE and TYPE which were not supported in IE. similarly IE supported the attributes ALT, TITLE, CODE and CODEBASE (the latter two part of the OBJECT standard), but NS did not.

    In conclusion to this history lesson the OBJECT tag which has been fully supported by IE since IE4, deprecated the old EMBED tag which was predominatly championed by NS. It is not for me to question the morality of other HTML programmers out there, but personally I feel that for the sake of a few more lines of script, isn't it as well to support older browsers, rather than to give someone an error page telling them to update their jurassic browser?
    Copy linkTweet thisAlerts:
    @TomDenverJan 18.2004 — Maybe so, but there are other reasons to tell people to upgrade from NN4 than just that. More and more sites these days are sending no CSS to NN4 browsers, and some are sending users of that browser a different HTML page telling them why they should upgrade, and that their site won't display properly in their browser. Pyro has a list of several mainstream websites doing this on his site http://www.ryanbrill.com. Try viewing http://www.espn.com in NN4 for example. They provide a nice explanation (for the computer novices who use NN4) of why they should upgrade, and that it doesn't cost them anything, and that they don't have to use any particular brand (like MS). It provides links of where to download Mozilla, Opera, IE, and Netscape upgrades.

    I for one would like to see this trend continue, and hopefully we can weed out ancient browsers. Espn says that only 1.8% of their users use a non compliant browser (NN4 and IE4 mostly I think) and that's why they were comfortable with doing this to their site.
    ×

    Success!

    Help @mickapoo spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...