6

I am creating an online experiment. It involves participants watching a video then answering a questionnaire. I would like to embed a chromeless youtube video which plays automatically on page load, does not have controls for participants to play around with, and loads the next page once the video finishes.

Now the autoplay/forward to next page functions are secondary and I'm not too concerned if I can't get them working. However I am very interested in how to embed a chromeless player. I have gone to the google playground but this code already has the controls attached. I am not very experienced at coding so I do not know what to remove from the code for none of the custom controls on the left to be displayed. Is anyone able to help me?

Thanks, Wil

Kinlan
  • 16,315
  • 5
  • 56
  • 88
ndthl
  • 173
  • 1
  • 1
  • 7

5 Answers5

7

When you embed the video, you can use the parameter controls=0 which will remove the buttons and make it appear chromeless.

ie the code in your embed section would include http://www.youtube.com/embed/NxLBVAq-4dg?rel=0&controls=0"

Mark
  • 79
  • 1
  • 1
  • making controls=0 isn't the same thing with chromeless player. when controls=0, controls disappear but there is still a title bar and a share menu on top part of the video. – alpera Dec 27 '13 at 11:42
6

You may want to look at http://code.google.com/apis/youtube/youtube_player_demo.html it allows you configure your player so that you can embed it chrome-less on your pages.

It should be a simple copy and paste.

Kinlan
  • 16,315
  • 5
  • 56
  • 88
  • Thanks for the recommendation, but unfortunately it does not generate embed code for the chromeless player! The link to google code playground above is my focus. If anyone knows what to remove from this code to get rid of the player controls on the right, then I'd be really grateful! wil – ndthl Apr 14 '10 at 10:47
  • did you click in the top right and select chromeless and then click update embed code.... that will generate what you need. – Kinlan Apr 14 '10 at 17:53
  • 3
    According to Google Youtube API demo page, `You cannot use an – Jason Kim Sep 25 '12 at 18:23
2

Yes, surprisingly, I did'nt find any Youtube page with sample code for their chromeless plugin. But there is a lot of of jquery plugin which use the chromeless plugin. You'l find a good tutorial here : http://tutorialzine.com/2010/07/youtube-api-custom-player-jquery-css/

Matthieu
  • 563
  • 1
  • 7
  • 25
1

You can use SWF objects to embed your chromeless player. You must add this js library in your html:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

then in your main js file you call the embedSWF method:

var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/FeJkDewhTEw?enablejsapi=1&playerapiid=ytplayer&version=3&controls=0&showinfo=0",
                   "ytapiplayer", "425", "356", "8", null, null, params, atts);

If you don't want any controls or info, just set controls=0 and showinfo=0 in the url

See: https://developers.google.com/youtube/js_api_reference#GettingStarted

Adrien
  • 618
  • 5
  • 7
-1

JW player http://www.longtailvideo.com/players will play youtube videos without the youtube branding, I think.

jmoz
  • 7,846
  • 5
  • 31
  • 33