我创建了一个音频元素。如何检查元素是否暂停?
var $audio = $("<audio></audio>").attr({
'src':'kassets/sound/intro.mp3',
'autoplay':'autoplay'
});
var $audiocontrol = $('<i class="fa fa-pause" aria-hidden="true"></i>');
$audiocontrol.on("click", function(e){
if($audio.paused == false){
$audio.trigger("pause");
}else{
$audio.trigger("play");
}
});
var $flyer = $('<div class="style_intro"></div>');
$( "body" ).append( $audio, $audiocontrol, $flyer );