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 6473425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:27:54+00:00 2026-05-25T06:27:54+00:00

The specific video sites are just for example. But I’m curious how one can

  • 0

The specific video sites are just for example. But I’m curious how one can queue up another video after the first finishes, from the same site or otherwise. Essentially an ad-hoc playlist.

Given a sequence of video links, how can one string them together to make a “playlist”?

  • 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-05-25T06:27:55+00:00Added an answer on May 25, 2026 at 6:27 am

    JavaScript is the way to go here. When one video ends, have JavaScript change the values for the new embed. Because Vimeo and YouTube both use similar embed methods (iframes), it makes life much simpler.

    When one video ends (more on detecting that at the end of this post) use JavaScript to change the SRC attribute on your iframe. You can also change the width and height as needed.

    Example:

    <iframe id="ourVideo" width="400" height="225" src="http://player.vimeo.com/video/28023982?title=0&amp;byline=0&amp;portrait=0" frameborder="0"></iframe>
    

    Then, in JavaScript

    var newHTML = "http://www.youtube.com/embed/ZnehCBoYLbc?rel=0";
    document.getElementById("ourVideo").setAttribute( "src", newHTML );
    

    I created a new variable for the new HTML, but you can pull this from wherever you would like. Using frameworks like jQuery make life much simpler:

    $("#ourVideo").attr( "src", newHTML );
    

    If you wanted a playlist functionality, I’d recommend populating an Array in JavaScript, then iterating through that:

    var playlist = [ "http://....1", "http://....2", "http://....3", "http://....4" ];
    

    How to know when to change:

    This is tricky. You can do it the lazy way, which is set a timer equal to the length of the video (not recommended, especially considering load time). The other way is to use JavaScript callbacks from the video players. This is more complicated, but much better.

    More information on the callbacks here:

    YouTube’s JS API Callbacks

    Vimeo’s

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

Sidebar

Related Questions

I'm sure there's a million questions along this line but I can't find one
XP-specific answers preferred, but others are welcome too.
A specific example: becoming familiar with django's project source code (core, contrib, utils, etc.).
A specific example I need to generate a random number between 0 and 2,
One specific instance, I want to set a BP on every switch(msg) handled in
I think this is specific to IE 6.0 but... In JavaScript I add a
Frankly speaking. I'm looking for a specific video course webpage which I visited few
I am processing video frames in real time. I loop through each pixel one
I've been working on an iPad-specific site that uses HTML5 video and though I've
I want to add video in my app . But i have a problem

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.