jplayer如何显示“缓冲”文本

我对jplayer有疑问。

这是我的代码:

$("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { title: "Alin", artist: "song", mp3: "utl" }); }, solution: 'html, flash', cssSelectorAncestor: "#jp_container_1", swfPath: "/res/vendor/jPlayer/dist/jplayer/", supplied: "mp3", }); $("#jquery_jplayer_1").bind($.jPlayer.event.seeking, function(e){ if($(".jp-title span").length <= 0){ $(".jp-title").prepend(''); } }); $("#jquery_jplayer_1").bind($.jPlayer.event.seeked, function(e){ $(".jp-title span").remove(); }); $("#jquery_jplayer_1").bind($.jPlayer.event.timeupdate, function(e) { if (this.value === 0 ){ alert(1); } }); 

我想显示“缓冲”文本,如果播放的音乐因缓慢的互联网而暂停。 实际上,我希望在暂停播放音频时暂停播放事件,然后在缓冲足够的数据时再次自动播放。

像这样:

在此处输入图像描述

谢谢

 $("#jquery_jplayer_1").bind($.jPlayer.event.progress, function (event){ // If media loading is complete if (event.jPlayer.status.seekPercent === 100){ $(".jp-title .jp-title-loading").remove(); // Otherwise, if media is still loading } else { if($(".jp-title .jp-title-loading").length == 0){ $(".jp-title").prepend(''); } } });