Start, pause, change src using setTimeout(Medium)

JavaScript

var videoContainer = document.getElementById(“Unique-ID”);

var video = videoContainer.children[0];

 

setTimeout(function(){

video.play();

}, 3000);

 

setTimeout(function(){

video.pause();

}, 6000);

setTimeout(function(){

video.src = “http://path/to/video.mp4”;

video.play();

}, 10000);

Description

The first timeout starts the video after 3 seconds, after 6 seconds the second timeout function stops the video and after 10 seconds the third timeout changes the src of the video and starts to play it again.

Screenshot

Add screens

© 2018 Konica Minolta Business Solutions Europe GmbH

Close Menu
Close Panel