Add audio player to stylesheet

Hi all,

I am stumped. I am trying to add an audio player to my site. I have managed to accomplish it but when ever you navigate to a different page on my site the player starts all over again. I am not sure if it is possible to make the audio player stay on the site and not reload when a user clicks on another page on my site. Could this audio player be added to a css sheet and stay constant? I have been to sites where it remains but they are using frames i believe.

Here is the audio player I am working with. Any help is greatly appreciated. :frowning:


<!-- AUDIO PLAYER -->
	<tr>
		<td width="860" height="23">
        <table width="860" height="23" align="center" border="0" cellpadding="0" cellspacing="0">
	        <td width="5" background="site/trimL.gif"></td>
	        <td width="30" background="site/playerTrimL.gif"></td>
			<td width="740" align="center" valign="bottom" bgcolor="000000">
			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="740" height="15">
			<param name="allowScriptAccess" value="sameDomain"/>
			<param name="movie" value="http://www.mysite.com/audio/xspf_player_slim.swf?http://www.mysite.com/audio/playlist_url=playlist.xspf&autoload=true&autoplay=true"/>
			<param name="quality" value="high"/>
			<param name="bgcolor" value="#333333"/>
			<embed src="http://www.mysite.com/audio/xspf_player_slim.swf?playlist_url=http://www.mysite.com/audio/playlist.xspf&autoload=true&autoplay=true"
				quality="high" bgcolor="#333333"
				name="xspf_player_slim" allowscriptaccess="sameDomain"
				type="application/x-shockwave-flash"
				pluginspage="http://www.macromedia.com/go/getflashplayer"
				align="center" width="740" height="15" ></embed>
			</object></td>			
	        <td width="30" background="site/playerTrimR.gif"></td>
	        <td width="5" background="site/trimR.gif"></td>
		</table>
		</td>
	</tr>

Here is a handy link that may help:

http://www.visibilityinherit.com/code/embedding-music.php

I am not sure if it is possible to make the audio player stay on the site and not reload when a user clicks on another page on my site. Could this audio player be added to a css sheet and stay constant?

Long story short… unless you want to invest a lot of time and energy into converting your website into a single page design (OK for small sites), flash dependant website (as in the whole site uses flash - bad practice), using frames (seriously bad practice) or using AJAX to inject content into your pages (again not ideal) you can’t make the audio player stay constant on your site without incurring the reset upon refresh issue. As for CSS, CSS is for styling content not for embedding anything (well except fonts), if your plan was to have auto playing music while people browse the website, you are probably better off not being able to-do it. If people want to listen to media they’ll stay on the page to hear it… if your just adding it as a “feature”, don’t bother, people don’t want or like unexpected noise through their speakers, and studies show 90% of people will just hit the back button if you interrupt them with unnecessary music. :slight_smile:

Thanks :cool:

That pretty much sums it up for me. :smiley: I guess I can put it on one page and if they navigate away from it so be it. the site i looked at was running frames and the top portion stayed the same all the time. I just did not know if you could embedd with CSS. Now I know. Thanks guys!