반응형

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'
   
}));
}

Posted by 1010