fanni-portier
fanni-portier

Reputation: 31

html5 video // autoplay

I am showing a div width Text over the poster image while the video is loading and when the video is paused.

How can I detect the moment the video is fully loaded and autoplay starts? Because then, the div should be hidden.

Upvotes: 0

Views: 76

Answers (1)

user1693593
user1693593

Reputation:

It you have defined autoplay then detect using the play event:

video.onplay = function() { /* remove overlay here */ };

alternatively use canplay or canplaythrough when you want to manually trigger play.

Upvotes: 1

Related Questions