Answer the question
In order to leave comments, you need to log in
How to pause video playback?
On the page of the site from the autoplay folder, a video is played. How to make it pause itself at a certain point in time, say, at the fifth second? At the same time, a black screen should not appear in its place.
Answer the question
In order to leave comments, you need to log in
How to implement video/audio playback on button click?
$(function (e) {
$('[data-type="video"]').on('play', function () {
var video = this;
setTimeout(function () {
video.pause();
}, 5000);
});
});
$('[data-type="video"]').on('timeupdate', function () {
if (this.currentTime > 5) {
this.pause();
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question