HTML video/audio crashes on multiple load ups
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
精彩评论