Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

SWF plays, MP3 doesn't

6 replies [Last post]

hi

i'm using the older version of the player on an english language site. it's a very easy implementation: hold the mouse over a word and hear it spoken.

it's simple code (largely from your site) and works with an swf audio file. however, if i use an mp3 file instead, ie7 pops up a msg about running windows media player.

how can i force the jw player to play the mp3 file and avoid any microsoft issues?

thx

rob

mail@cherryheaven.co.uk

Unfortunately, we're not mind readers. If you post a link to your test page, someone may be able to help you.

hiu

it's the code from this site. it works perfectly well. except that if it's an mp3 file, not an swf, windows media wants to play it.

although i can tell it not to on my pc, i can't tell users to do the same.

<object width="0" height="0" id="ttsx">
<embed width="0" height="0" name="ttsx" play="true" loop="false" swliveconnect="true" src="yellow.mp3" type="application/x-shockwave-flash"></embed >
<param name="movie" value="yellow.mp3">
<param name="play" value="true">
<param name="loop" value="false">
</object >

thx

Hmmmm....

That's not code for a JW FLV Player.

Go to the Wizard button at the top of this page and generate some good code.

Use the swfobject code unless you are under some restriction where you can only use the object element.

hi

thx for reply.

well, it was cut and pasted, more or less, from the setup wizard for the older version player. it was used on youtube and a number of other audio/video sites. it's a very common bit of code, and is in books and articles.

it's worked in numerous applications without any problems, without the swfobject as i don't need any functionality.

i always played flv and swf (audio). however, as mp3 is easier to edit, i tried an mp3.

that's when the IE pop-up bar tries to get me to use windows media player - and, at that stage, it won't play the mp3.

rob

http://www.poachstevens.com/swap.htm

player loads fine, audio wil not load at all

<script type='text/javascript' src='http://www.poachstevens.com/audio/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('http://www.poachstevens.com/audio/player.swf','mpl','950','20','9');
so.addParam('allowfullscreen','false');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('author','The Swapmeet Ensemble');
so.addVariable('description','One Mans Trash...');
so.addVariable('duration','24:15');
so.addVariable('file','http://www.poachstevens.com/audio/snippet.mp3');
so.addVariable('type','sound');
so.addVariable('bufferlength','1');
so.addVariable('autostart','true');
so.addVariable('repeat','always');
so.write('mediaspace');
</script>

can anyone help me

 
The format of the value for the duration flashvar is wrong. Should be seconds only:so.addVariable('duration','1455');

You don't need the flashvar type=sound.

The rest of your code looks OK.