Vitalii Plodistov
Vitalii Plodistov

Reputation: 125

How to play audio on website without quicktime?

I checked some themes here, but still can't find answer about next.

On my website, I'm using different ways for audion playing.

if ($.browser.msie) {
    $(".audio").prepend($("<embed>").attr({
        'src':'/resources/voices/'+voice+'.wav',
        'HIDDEN':'true',
        'AUTOSTART':'true'
    }));
}else if($.browser.safari){
    $(".audio").removeAttr("style");
    $(".audio").prepend($("<object></object>").attr({
        'type':'audio/x-wav',
        'data':'/resources/voices/'+voice+'.wav',
        'width':'0',
        'height':'0'
    }));
    $("object:first").prepend($("<param>").attr({
        'name':'autoplay',
        'value':'true'
    }));
}else{
    $(".audio").prepend($("<audio></audio>").attr({
        'src':'/resources/voices/'+voice+'.wav',
        'volume':0.4,
        'autoplay':'autoplay'
    }));
}

Everything was fine, while some of website guests, said that there was errors connected with quicktime plugin. And, yes, I installed quicktime from apple.com, and now, audio doesn't play in IE. And in chrome it always asks about confirmation to use quicktime plugin.

Is it possible to ignore quicktime plugin, and use standart ways to play audio? I'm looking anything from javascript...

Thank you!!!

Upvotes: 2

Views: 1561

Answers (3)

devsnd
devsnd

Reputation: 7722

I would recommend using JPlayer, since it uses HTML5 for Playback, but has a Flash-Fallback, in case the Browser doesn't support HTML5 yet.

Upvotes: 3

Elzo Valugi
Elzo Valugi

Reputation: 27856

Use a general, not dependent on quicktime encoding format. I recommend ogg, which is free.

Upvotes: 1

user1016265
user1016265

Reputation: 2387

You could use HTML5 or Flash but in any case you should use proper audio format for that purpose

Upvotes: 0

Related Questions