Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9091329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:35:02+00:00 2026-06-16T22:35:02+00:00

New here and have a question for anyone experienced with HTML5 video and/or the

  • 0

New here and have a question for anyone experienced with HTML5 video and/or the VideoJS player (I’m also open to using a different player if necessary).

I’ve got a single video which includes an intro portion and a portion which I’d like to loop. I’ve done this in order to prevent having a “black blip” when loading the second part of it.

So my question is this, I’d like to have this second part seamlessly loop and can’t seem to pull it off quite right. There seems to be a second or so as a delay before it begins playing again. I had my video editor set the looping point at exactly 36 seconds and am using the following code to seek to 36 seconds in and play after reaching the end.

myPlayer.addEvent("ended", function () {
  myPlayer.currentTime(36);
  myPlayer.play();
});

This winds up swinging the video back to the first frame, then skipping to 36 seconds in, and then playing. I’m going to attempt setting a listener for the end second of the video and perform the seek, but I’m still concerned about the momentary delay after seeking.

Any help would be greatly appreciated!

Alex

UPDATE: I’ve managed to eliminate the bit where it goes back to first frame by editing the source of video.js to remove the default functions run when the “ended” event gets triggered (which basically went like this: “pause(); currentTime(0); pause();” )

The video will now go directly to the 36 second mark that I need it to, but the problem is that it still registers the video as ended and stops it before playing it again at the 36 second mark, creating a slight delay in the loop. I’m trying to figure out how I can get it to listen for, maybe, the second that the video is about to end and trigger the seek (currentTime) function then as opposed to the “ended” event listener.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:35:03+00:00Added an answer on June 16, 2026 at 10:35 pm

    Try breaking the video up into two sections: the intro and the looping part. Make a <video> element for each one and position them in the same place, with the second video hidden. Set an "ended" event on the intro to swap out the display and start the second video. Then, you can set the loop attribute on the second video element.

    You shouldn’t have a problem getting the two videos to play seamlessly together as long as you have the preload attribute on at least the looping video.

    If that doesn’t work, try making two video elements with the same looping video. While one is playing, you can hide the other and set its currentTime back to zero, so any seeking delay will happen when nobody is looking. (Hopefully, the browser will be smart enough to cache the video file and only load it from the network once, but you may want to experiment.)

    (Unfortunately, none of this will work on an ipad, because mobile safari doesn’t support multiple media elements on one web page.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new around here and I have a quick question if anyone can
i'm new here and i have a question. I am trying to insert a
I'm new here and have a problem. I am having to pick up C#
I'm new here and I have a problem with the jQuery's function - animate
am new here. i have a slight problem; PLease look at the following code
I'm new around here and i have a little problems with a C# application.
I'm quite new here. I have a problem with the new iOS 5.1 slide-in
/edited/ I'm new here. I have a text file that reads: 6 <cr> R
I'm new here and I hope anyonte can help me. I have WCF Service
I'm new here to stackoverflow, so bear with me. I have a book that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.