开发者

HTML5 Audio scrub troubles

I think that this will be a fairly easy answer but I am unsure of why it works great in Chrome and FF but in Safari does not. It seams that the way开发者_高级运维 the HTML5 audio player is designed that it blocks my function from firing. Again this is only in Safari. I wonder if there is a keyword that I am missing that Safari uses to distinguish there player scrub.

if(video != '') {
    $("#<?php echo $track_id ?>").mousehold(function(){
        video.currentTime = this.currentTime;
        video.pause();
    });
    $("#<?php echo $track_id ?>").mouseup(function(){
        video.currentTime = this.currentTime;
        video.pause();
    });
}

So what happens is when the user drags the audio scrub bar it also scrubs the video.

Thanks in advance all.


Maybe mousehold doesn't work in Safari... Try using mousedown instead?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜