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

  • SEARCH
  • Home
  • 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 9158907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:21:47+00:00 2026-06-17T13:21:47+00:00

I have a custom youtube player coded mostly in javascipt/jQuery that uses the iframe

  • 0

I have a custom youtube player coded mostly in javascipt/jQuery that uses the iframe method and has next and previous track buttons that work without using the YouTube JavaScript API functions. The player also changes the ID of the video playing based on the search result link clicked on by the user. The only problem I Have is that I need to be able to detect when the video that is currently playing ends so the player will know when to skip to the next track on the list without requiring the user to click a button. Is this possible to do without the API calls?

If not, how should I go about implementing the YouTube iframe embed using the JavaScript API to determine when the song has ended via the OnStateChange event, while still being able to change the ID of the song playing when a user clicks on a search result link?

Should this be done by passing the video ID to the function creating the YouTube player object, then destroying it when a user clicks on a link and inserting a new instance of the YouTube player with the new ID?

  • 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-17T13:21:48+00:00Added an answer on June 17, 2026 at 1:21 pm

    I just created an instance of the youtube player object outside of my jquery $(document.ready() statement and then changed the “src” attribute of the iframe via jQuery and that worked out for me.

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

Sidebar

Related Questions

I have developed a custom YouTube player. with that player I have implemented a
I have custom event that has several different subscribers who will all use the
I have a custom youtube plugin that adds an image to my tinyMCE editor
So I have this UIWindow that has some custom properties. I also have a
Ok I have a page that uses 3 plugins and custom code. Fullscreenr ScrollTo
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have custom gallery. Gallery represents items that are frame layout. There are one
I have custom component that I can place in my layout file (XML) for
I have custom groupViews that need to change state when they are expanded and
I have custom radar tiles that I am trying to overlay over Google Maps

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.