Tag Archives: YouTube

YouTube’s comments strategy, Kindle’s Mayday on K-TWIN

kwin-studio

KTWIN Logo 96.3

The Nerdery’s Ryan Carlson went on K-TWIN’s Cane & Co. to discuss space, the final frontier and the privatization thereof by SpaceX. The also chatted about YouTube’s new strategy governing online comments, and Amazon’s strategy of using real people for customer support via Mayday on their Kindle Fire.

Must-hear radio like this can be heard around 8 a.m. Monday mornings on K-TWIN (96.3 FM, Twin Cities). Or, hear our rebroadcast, here.

Play

2010 Trends

Google, YouTube, and Twitter have all released their 2010 trend pieces. What do they have in common? Justin Bieber.

Here’s a quick breakdown of the top 10 trends on Twitter.

  1. Gulf Oil Spill
  2. FIFA World Cup
  3. Inception
  4. Haiti Earthquake
  5. Vuvuzela
  6. Apple iPad
  7. Google Android
  8. Justin Bieber
  9. Harry Potter & the Deathly Hallows
  10. Pulpo Paul

The fastest rising Google searches.

  1. Chatroulette
  2. iPad
  3. Justin Bieber
  4. Nicki Minaj
  5. Friv
  6. Myxer
  7. Katy Perry
  8. Twitter
  9. Gamezer
  10. Facebook

And if you have a minute 86 seconds you can find out what the top YouTube videos were.

There, now you know what happened in 2010.

Filed under Web Culture

BooneOakley hacks YouTube

There’s a lot of good things about working around The Nerdery (free crack/energy drinks, four-legged vacuum cleaners, rad people, etc.), but my new favorite perk is learning about the population that lives in
agency world ecosystem.

From my naive vantage point, agencies fit into one of two silos: those that take themselves way too seriously, or those that have a goofy amount of fun with their job and push the interactive agency space into cool places. Guess which one I like working with?

Enter: BooneOakley.

On the scene since 2000, these guys just launched a YouTube site. No, I’m not saying that like “they’re on The Facebook.” They literally launched a YouTube site, powered by YouTube, and getting ALL traffic
redirected from http://www.booneoakley.com.

Here’s the real fun. It’s functional. Fully. Functional. Leveraging embeddable annotations, you can fully navigate through different parts of the site. And you should, especially the bios with the pooping dog.

These guys get it, have fun with their work, are pushing it ahead, and hopefully will return my phone calls. If there’s one thing nerds like, it’s partnering with agencies that get it, have fun, and do innovative
work.

Dig it? Get up in their tweets, or leave them a YouTube message.

Matt Albiniak is a Sr. Account Nerd at Nerdery Interactive Labs. Learn more about him on the Periodic Table of Nerdery.

Tech Tuesday — YouTube in AIR

The YouTube video player is currently written in ActionScript 2.0 and integrating it into an AIR application requires a few additional steps. There are many solutions available that reverse engineer the URL to get access to the source video FLV, however, this breaks the terms of service and is not officially supported by YouTube or the API.

By taking advantage of the HTMLLoader class we are able to load the YouTube Chromeless video player into AIR without breaking the terms of service. It essentially loads up a web page within the AIR application and uses JavaScript to control the video.

Lets start by creating the JavaScript / HTML portion of the application that the HTMLLoader will consume. Resources for this can be found here; YouTube Chromeless Player Example page.

Simplified JavaScript functions for this example (includes Play, Pause and Load):

<script src="js/swfobject.js" type="text/javascript" />
<script type="text/javascript">

      function onYouTubePlayerReady(playerId) {
        ytplayer = document.getElementById("myytplayer");
      }
   
      // functions for the api calls
      function loadNewVideo(id, startSeconds) {
       if (ytplayer) {
         ytplayer.loadVideoById(id, startSeconds);
        }
       }
      
       function play() {
          if (ytplayer) {
            ytplayer.playVideo();
          }
        }
  
       function pause() {
         if (ytplayer) {
           ytplayer.pauseVideo();
         }
        }

  </script>

Next we will use the SWFObject to load in the YouTube Chromeless video player. Notice the use of wmode: “opaque” in this example. Without this you will not be able to place any display objects above your videos.

<script type="text/javascript"> 

       // allowScriptAccess must be set to allow the Javascript from one
       // domain to access the swf on the youtube domain
       var params = { allowScriptAccess: "always", bgcolor: "#cccccc", wmode: "opaque" };
       // this sets the id of the object or embed tag to 'myytplayer'.
       // You then use this id to access the swf and make calls to the player's API
       var atts = { id: "myytplayer" };
       swfobject.embedSWF("http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=ytplayer",
                           "ytapiplayer", "400", "300", "8", null, null, params, atts);

</script>

ActionScript Used to Load and Control the Video:
[as]
package com.sb.util
{
import flash.display.Sprite;
import flash.events.Event;
import flash.html.HTMLLoader;
import flash.net.URLRequest;

public class JSVideoPlayer extends Sprite
{

private var _html:HTMLLoader;
private var _ready:Boolean = false;

public function JSVideoPlayer()
{
_html = new HTMLLoader();
_html.paintsDefaultBackground = false;
_html.width = 400;
_html.height = 300;
_html.addEventListener(Event.COMPLETE,
onComplete);

loadHTMLcontent()

this.addChild( _html );
}
public function loadNewVideo(videoID:String):void
{
if(_ready){
_html.window.loadNewVideo(videoID);
}
}

public function playVideo():void
{
if(_ready){
_html.window.play();
}
}

public function pauseVideo():void
{
if(_ready){
_html.window.pause();
}
}

private function onComplete (e:Event):void
{
_ready = true;
}

public function loadHTMLcontent():void
{
_html.load(new URLRequest(‘test.html’));
}

}
}
[/as]

One of the limitations of using the HTMLLoader class is the inability to set the opacity of the video. For example you if wanted to fade the video out you would have to capture the current state of the video and replace it with a bitmap image that would then be faded out (download the zip file to see an example of this).

Source Files (ZIP)

Sources

PS: This example is only for AIR and may not work for Flex applications deployed on websites. Please visit ‘YouTube in Flex applications’ (On The Other Hand) for an example of how to do this in Flex.

This was originally posted on blackcj.com, Chris Black’s personal blog. Chris is a Senior Developer at Sierra Bravo.

Filed under Technology