Thomas
Thomas

Reputation: 34188

Jquery : wav file is not working with jplayer

i am trying to play wav audio file by jplayer but it is not working. here is the code. just tell me am i missing something in code ?

js fiddle http://jsfiddle.net/tridip/XLNCY/19670/

$(document).ready(function() {

    $("#jquery_jplayer_1").jPlayer({
        ready: function(event) {
            $(this).jPlayer("setMedia", {
                title: "Bubble",
                wav: "http://download.wavetlan.com/SVV/Media/HTTP/WAV/Media-Convert/Media-Convert_test1_Alaw_Mono_VBR_8SS_16000Hz.wav"

            });
        },
        swfPath: "http://jplayer.org/latest/dist/jplayer",
        supplied: "mp3, oga",
        wmode: "window",
        useStateClassSkin: true,
        autoBlur: false,
        smoothPlayBar: true,
        keyEnabled: true,
        remainingDuration: true,
        toggleDuration: true
    });
});          

i have constrain that i have to use wav file by jquery. so please give me suggestion like how to play wav file.

is there any other best jquery player which can play wav file and also work file in old browser too. looking for suggestion. thanks

Upvotes: 0

Views: 1134

Answers (1)

Martin Dawson
Martin Dawson

Reputation: 7656

http://jsfiddle.net/XLNCY/19718/

supplied: "mp3, oga, wav".

Jplayer can work in old browsers. It's very flexible and you can do a lot with it.

Take a look at source code for jPlayer, line 495~:

supplied: "mp3", // Defines which formats jPlayer will try and support and the priority by the order. 1st is highest,

Only Mp3 is defined, which means that for every instance of jPlayer we need to specify wav format as well. Or you can do it in a global settings and apply that to all jPlayer options.

Upvotes: 2

Related Questions