How do I go about embedding a youtube chromeless player without adding controls?

后端 未结 5 397
暗喜
暗喜 2021-01-05 12:26

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 au

相关标签:
5条回答
  • 2021-01-05 12:49

    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

    0 讨论(0)
  • 2021-01-05 12:58

    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.

    0 讨论(0)
  • 2021-01-05 13:06

    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/

    0 讨论(0)
  • 2021-01-05 13:07

    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"

    0 讨论(0)
  • 2021-01-05 13:11

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

    0 讨论(0)
提交回复
热议问题