Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 video fires pause event while seeked

I am designing an app which uses HTML 5 video. When I seek while the video is running "video pause" event is fired which in turns affect my logic for actions which has to happen during seeking. Is there a way by which I can remove this pause event or find that particular pause events which happen with seeking?

like image 662
Prasanna Mahendiran Avatar asked Nov 14 '16 08:11

Prasanna Mahendiran


1 Answers

You can use video element's readyState property to check whether the pause event fired when the user seeked or when the user paused.

var vid = document.getElementById("myVideo");
var vidState = vid.readyState;   //when user hit the pause button, this value will be 4
like image 104
Qamer Sayeed Avatar answered Sep 22 '22 12:09

Qamer Sayeed