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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:32:39+00:00 2026-05-16T03:32:39+00:00

I have an embeded youtube video which I want the YouTube API applied. I

  • 0

I have an embeded youtube video which I want the YouTube API applied. I add the url parameter using jQuery as follows (demo):

$(document).ready(function(){
 var obj = $('object');
 obj.find('embed').attr('src', function(i,s){return s+'&enablejsapi=1&version=3'})
 obj.find('param[name=movie]').attr('value', function(i,v){return v+'&enablejsapi=1&version=3'})

 $('.play').click(function(){
  obj.find('embed')[0].playVideo();
 });
 $('.pause').click(function(){
  obj.find('embed')[0].pauseVideo();
 })
});

This method works great in Firefox, but not at all in IE or Chrome (not sure about other browsers). So my question is how do I modify this to make the API work in other browsers? Would I have to completely remove the object and replace it using SWFObject?

Note: The embed code is directly from YouTube.


Update: I figured out if I remove the object, add the url parameters then add the object back, I can now get it to work in Chrome, but still not IE (updated demo).


Addendum: Why doesn’t the YouTube API function when the object/embed already has the enable code within it? I’m trying to avoid making SWFObject a dependancy.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="385">
 <param name="movie" value="http://www.youtube.com/v/2Qj8PhxSnhg&amp;hl=en_US&amp;fs=1&enablejsapi=1&version=3"></param>
 <param name="allowFullScreen" value="true"></param>
 <param name="allowscriptaccess" value="always"></param>
 <embed src="http://www.youtube.com/v/2Qj8PhxSnhg&amp;hl=en_US&amp;fs=1&enablejsapi=1&version=3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed>
</object>
  • 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-16T03:32:40+00:00Added an answer on May 16, 2026 at 3:32 am

    Regarding swfobject – yes. IE treats flash embeds slightly differently (thanks activex) than all the other browsers. check out this article to get an idea of why, and the SWFObject documentation for more information.

    Also, I recently created a jQuery plugin to help control the embedded player using the player API (basically what you’re doing).

    Check it out, it’s the jQuery TubePlayer plugin – http://www.tikku.com/jquery-youtube-tubeplayer-plugin

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

Sidebar

Related Questions

I want to have an embedded chromeless youtube video preload its video WITHOUT playing
I have a working webview in Titanium with an embeded youtube video. The video
I have an embeded youtube video, and it won't play on IE in windows
Is it possible to fade out a Javascript embedded Youtube video using Javascript/jQuery? At
I have a webpage where I've embedded a youtube video. I need to add
I have an absolutely placed div with an embedded YouTube video inside of it.
I have embeded a music in a webpage using this code: <embed src=upload/gnossiennes.mp3 autostart=true
Hi I have a plugin.dll which contains this all npp functions I have embeded
I have one flash file which is embading in another, the embeded one is
I have a video playing on my page. I want to show and hide

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.