SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Youtube Chromeless Player

    Hi there guys does anyone have experience using Youtube's Chromeless player. I have set it up as follows:

    Code:
    var params = { allowScriptAccess: "always" };
    var atts = { id: "myytplayer" };
    swfobject.embedSWF("http://www.youtube.com/apiplayer?key=AI39si5cxKBjboPA9SA2pkrpW7Qaub6XGE0-iqcwlfs5bvjNQyt36EFT3qvP73oqVcKD5GHZEHc6IZwX7X6T1Rxrciz98laKhA&enablejsapi=1&version=3&playerapiid=ytplayer" ,
    					   "ytapiplayer", "412", "246", "8", null, null, params, atts);
    Is my use of the developer key here correct? The API doc is vague at best when discussing this:

    Developer's Guide: Data API Protocol - YouTube APIs and Tools - Google Code

    Anyway I continue to get a handle on the player:

    Code:
     function onYouTubePlayerReady(playerId) {
    ytplayer = document.getElementById("myytplayer");
    play();
     }
    I then call the following function to load in my first url and play the video.

    This is done because I want two sets of controls - one on a list which the user has called to embed the player in the first place and another to be my custom chrome:

    Code:
    			  
     function play() {
    if(ytplayer)
    	 {
    	ytplayer.loadVideoByUrl( "http://www.youtube.com/watch?v=GPdYRBf1fGc&feature=player_detailpage",    0);   
     ytplayer.playVideo();
    	 }
    }
    Here is the test site :

    Jake Guy - Content Management System

    click the 4th accordion entry - this is defintely youtube, the plugin I am designing interchanges flowplayer with youtube.
    "Persistence is the path to perfection"

  2. #2
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok guys here's what worked for me:

    ytplayer.loadVideoById("I8xZBfVsMzs", 1, "medium");

    You just use the id instead of the url, don't need a developer key unless you need to write/upload

    Surely there's a way of doing it with a url tho?
    "Persistence is the path to perfection"

  3. #3
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its as it says in this:

    use a combination of this giude:

    YouTube JavaScript Player API Reference - YouTube APIs and Tools - Google Code

    and this tutorial vid:

    YouTube Player APIs and Tools Tutorial - YouTube

    I'd still like to find out how to load a chromeless video from a url tho, any ideas?
    "Persistence is the path to perfection"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •