0

I put jplayer in my joomla site for playing my mp3 files. The problem is play button and the progress bar of the jplayer not working in my site when using Firefox. I added the "add type ogg" in my htaccess. The ogg file is playing in my site but there is no ogg file display when I inspect the element using firebug. I can find only a disabled code that is:

<div class="jp-jplayer" id="jquery_jplayer_1" style="width: 0px; height: 0px;">
    <img id="jp_poster_0" style="width: 0px; height: 0px; display: none;" src=" images/jmplayer/albums/thumb_13520917357864.jpeg">
    <object width="1" height="1" id="jp_flash_0" data="js/Jplayer.swf" type="application/x-shockwave-flash" style="width: 0px; height: 0px;">
    <param name="flashvars" value="jQuery=jQuery&amp;id=jquery_jplayer_1&amp;vol=0.8&amp;muted=false">
    <param name="allowscriptaccess" value="always"><param name="bgcolor" value="#000000">
    <param name="wmode" value="opaque"></object>
</div>

here is my link : http://www.keralacarpentry.com/saavnnew

4

3 に答える 3

0

実際、jPlayer はaudio タグを使用し、firefox はタグ をサポートしてhtml 5いませんW3schools リファレンスmp3 filesaudio

その他の参考資料:

Firefox が mp3 ファイル形式をサポートしないのはなぜですか

jPlayer が Firefox で MP3 ファイルを再生しないのはなぜですか?

于 2012-12-12T07:39:26.247 に答える
0

Firefox は mp3 ファイルをサポートしていませんが、jplayer を使用して再生するには、Firefox に Flash をインストールし、次のように javascript に swf パスを含める必要があります。

$("#jquery_jplayer").jPlayer({
    ready: function () {
      $(this).jPlayer("setMedia", { mp3: "http://sound26.mp3pk.com/indian/ladiesvsricky/ladiesvsrickybahl01(www.songs.pk).mp3" } );
    },
    //swfPath: "http://cloudfactory-transcription.s3.amazonaws.com/javascripts/",
    swfPath: "http://www.jplayer.org/latest/js/Jplayer.swf",
    supplied: "mp3",
    volume: 1,
    wmode:"window",
    solution: "html,flash",
});

Jplayer は、Flash のみを使用して、Firefox で mp3 ファイルを再生します。

于 2012-12-12T08:08:02.620 に答える
0

#jquery_jplayer_1 の場合、2 回バインドします
。 1. 693 行
目 2. $('#playallinner').click すると、再度バインドします。

変更の提案:
1. コードを 693 から 703 に削除します。

        /*
        var myPlaylist = new jPlayerPlaylist({
           jPlayer: "#jquery_jplayer_1",
           cssSelectorAncestor: "#jp_container_1"
         }, {
          playlistOptions: {
                  enableRemoveControls: true
          },
        swfPath: "js",
        supplied: "mp3",
        wmode: "window"
        });
         */

2. 1794 から次のようにコードを変更します。

//new a jPlayerlist object
var playallList = new jPlayerPlaylist({
        jPlayer: "#jquery_jplayer_1",
        cssSelectorAncestor: "#jp_container_1"
    }, {
        swfPath: "js",
        supplied: "mp3",
        wmode: "window"
});
// add list into the list
playallList.setPlaylist([           
           {
             title:"Aadhai Aaula",
             artist:"Mipa",
             .... // list all songs you want
           },

]);
//play the list when the play button be clicked.
$('#playallinner').click(function(){
     playallList.play();
     var playcount = /*parseInt($("#playtotal").html())+*/ 6;
     $("#playtotal").text(playcount);
});
于 2012-12-12T18:08:58.397 に答える