Search code examples
jqueryjplayer

jplayer provide two files of different audio format


My Jplayer code i have to also add mp3 format for more browser support, please help .. now there is only .ogg file format... it doesnot support IE7

$("#jpId1").jPlayer({
        ready: function () { // The $.jPlayer.event.ready event
            $(this).jPlayer("setMedia", { // Set the media
                oga: "sound/cookingloop.ogg"
            }).jPlayer("stop"); // Attempt to auto play the media
        },
        ended: function () { // The $.jPlayer.event.ended event
            $(this).jPlayer("play"); // Repeat the media
        },
        supplied: "oga",
        solution: "html,flash",
   }

);

Solution

  • I found this code from jplayer website

    $("#jquery_jplayer_1").jPlayer({
       ready: function () {
          $(this).jPlayer("setMedia", {
          mp3: "/media/mysound.mp3",
          oga: "/media/mysound.ogg"
       });
       },
       swfPath: "/js",
       supplied: "mp3, oga"
    });
    

    I have worked it with mp3 so it works jplayer