我希望得到一些帮助,这个自定义jplayer mp3即时通讯试图把我的博客(博客平台)。在编码方面,我基本上都是这个词的每一个意义上的一个成熟者。我遵循here这个教程,并做了一些提示,但我仍然无法让玩家上班。这是代码。任何帮助将非常感谢,因为我一直在试图做这件事情几天。jquery播放和停止按钮
$(document).ready(function() {
// Using jQuery object, rather than $
var mediaPlayer = jQuery('#mediaContainer');
mediaPlayer.jPlayer({
// Tells JPlayer where to find the SWF file.
swfPath: 'https://sites.google.com/site/maestromuzic/Jplayer.swf',
// Fix for some older Andriod phones.
solution: "flash, html",
// Tells the player that the track is available in:
// mp3, Ogg Vorbis and Wave formats.
supplied : 'mp3',
// Assigns the CSS selectors which will control the player,
// creating buttons.
cssSelector: {
play: '#playButton',
pause: '#pauseButton',
stop: '#stopButton'
},
// Assigns the files for each format, once the player is loaded.
ready: function() {jQuery(this).jPlayer("setMedia", {
mp3: 'http://files.mboxdrive.com/1296462407/Lutan Fyah - Badmind.mp3',
});}
});
$('#playButton').click(function() {
$('#mediaContainer').jPlayer('play');
});
$('#pauseButton').click(function() {
$('#mediaContainer').jPlayer('pause');
});
$('#stopButton').click(function() {
$('#mediaContainer').jPlayer('stop');
});
});
</script>
<div id="mediaPlayer">
<div id="mediaContainer">
</div>
<div id="playButton">
Play</div>
<div id="pauseButton">
Pause</div>
<div id="stopButton">
Stop</div>
</div><code>
尝试删除行'solution:“flash,html”,'和底部的事件处理程序。 – adeneo
thanx为yuh答复,但没有运气仍然。如果任何人都可以帮助ID非常感谢这个人。如果有人想为我解决问题,我甚至不会介意付费。任何人? – Mervin