开发者

HTML video/audio crashes on multiple load ups

开发者 https://www.devze.com 2023-02-17 00:57 出处:网络
I have an application with multiple thumbnails (10+) and have manually set up onMouseEnter/Leave to load up a video/audio file like so

I have an application with multiple thumbnails (10+) and have manually set up onMouseEnter/Leave to load up a video/audio file like so

onMouseEnter=function(){
    videoPlayer.pause();
    videoPlayer.src=that.videoPath;
    videoPlayer.play()
}

It works fine, but if I move the mouse too quickly, it crashes. I tried using setTimeOut() with a 1s delay and using clearTimeout() to prevent interference, but th开发者_运维百科e problem still persisted.

Does anyone know what the problem could be?

Thanks

0

精彩评论

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