jquery flash plugin is showing nothing
I am using jquery flash plugin for showing audio clip i had tried in this fiddle .please check this fiddle http://www.jsfiddle.net/RCfkF/2/ the flash plugin is not showing any thing ,why please suggest .Thanks
I have implemented according to ClemDesm answer , but is not showing , please ch开发者_运维问答eck the fiddle http://www.jsfiddle.net/RCfkF/2/
Thanks
First, your fiddle got bad markup.
Anyway, you don't use the plugin as it is shown on its examples and docs.
You don't link to the mp3, but to a swf reading that mp3!
From http://jquery.lukelutman.com/plugins/flash/example-mp3.html,
Javascript:
$(document).ready(function(){
$('a[@href$="mp3"]').flash(
{ src: 'singlemp3player.swf', height: 20, width: 100 },
{ version: 7 },
function(htmlOptions) {
$this = $(this);
htmlOptions.flashvars.file = $this.attr('href');
$this.before($.fn.flash.transform(htmlOptions));
}
);
});
Before:
<li><a href="sound.mp3">sound.mp3</a></li>
After:
<li>
<embed width="100" height="20" type="application/x-shockwave-flash" src="singlemp3player.swf" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="file=sound.mp3"/>
<a href="sound.mp3">sound.mp3</a>
</li>
This is how you might use the plugin (just a copy/paste of the example above)
http://www.jsfiddle.net/RCfkF/4/
精彩评论