javascript - what HTML5 video listener can trigger event in the beginning of a video? -


i want use listener trigger function in beginning of 1 video. using:

video.addeventlistener("play", function); 

it works in desktop. in ios, function triggered when pause re-start video. so, how should make listener trigger function in beginning of video? video may auto play or click play.

thanks lot in advanced!

you can use:

 video.addeventlistener("loadedmetadata", function) 

i not sure event won't send before starting film can use also:

 var firsttime = yes;  video.addeventlistener("progress", function() {                           if (firsttime) {                               firsttime = no;                               // want here                           }                          }); 

for events supported safari/webkit go https://developer.apple.com/library/safari/documentation/audiovideo/reference/htmlmediaelementclassreference/htmlmediaelement/htmlmediaelement.html. lecture.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -