i am newbie in this forum anybody help me to creat video loops using javascript.

Recommended Answers

All 2 Replies

  1. Assign a variable and set it to your elements id attribute:

    video1 = document.getElementById('myVideo')

  2. give 'video1' a boolean value:
    true: will replay the video when the loop has stopped,
    false: will not replay the video when the loop has stopped

    video1.loop = true;
    video1.loop = false;

So your code should look somewhat like this:

video1 = document.getElementById('myVideo');
video1.loop = true;//replay

//or

video1 = document.getElementById('myVideo');
video1.loop = false;//donot replay
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.