Christian Heilmann

You are currently browsing the archives for the youtube category.

Archive for the ‘youtube’ Category

YouTube now offers deep links to timestamps (via URI hash)

Sunday, October 26th, 2008

I was very happy this morning to see that YouTube now features the option to jump to a certain time in the video directly by adding a timestamp hash to the URL. For example:

They also automatically create links from comments that mention timestamps. This all is something that I’ve been hacking into YouTube with the YouTube captioner and other people building Splicd.

I guess the next natural step would be to show the timestamped comments as annotations just like Viddler does it.

A spot of rain on the parade is that the geo IP redirect in YouTube breaks timestamped links as you get sent from www. to uk. (for example here in the UK as found by Simon Willison). This should be easy to fix though, please?

Making YouTube easier and more accessible (updated 12/06)

Thursday, June 12th, 2008

Warning: The YouTube API is flaky at the moment, so there might be some outages!

At this year’s Accessibility2.0 conference in London Antonia Hyde from United Response asked the audience for technological solutions to make the social web easier accessible for people with learning disabilities.

Her presentation Rich Media and web apps for people with learning disabilities is available on slideshare.

Whilst not being able to tackle all the issues mentioned (probably the biggest one being captioning) I took some time to play with the YouTube API to create a much easier interface to watch videos. The following screenshot shows the Easy YouTube Player in action:

Easy YouTube player showing a video

Using the player

You can use the player in several ways, the easiest is to just copy and paste a youtube url in the url field. However, there is also a sort of REST interface that allows you to do more:

http://icant.co.uk/easy-youtube/

Shows the player without any movie loaded, empty search fields and playlists.

http://icant.co.uk/easy-youtube/?http://www.youtube.com/watch?v=9i0-btCTdN8

Pre-loads the video of this YouTube address and shows the preview image in the player.

http://icant.co.uk/easy-youtube/?search=panda

Performs a search on YouTube for the term panda and shows links to the videos in the playlist on the right. You can use more than one search word by adding them with a “+”. For example:

http://icant.co.uk/easy-youtube/?search=red+panda

One last option you have is to bookmark certain videos on del.icio.us and tag them for a user. In order to show these videos as a playlist you need to provide your user name and the tag separated by a dash. For example my user name on del.icio.us is “codepo8” and I bookmarked some videos with the tag “easyyoutubeplayer”. The following link will show them all in the playlist:

http://icant.co.uk/easy-youtube/?tag=codepo8-foreasyyoutubeplayer

You can mix and match the different options. If you for example want to show a video and perform a search for other videos you can use:

http://icant.co.uk/easy-youtube/?http://www.youtube.com/watch?v=3UgpfSp2t6k&search=accents

Documentation

The full player documentation with instructions on how to host the player yourself is available in the docs folder Easy YouTube Player documentation.

Download

You can download the player with all the demo files here:

Changes

12/06/08

  • complete re-write of code
  • new buttons – glass were too complex
  • added video size control
  • added search and playlist support
  • added address field to send to friends
  • player now template driven – no more changes in main code needed
  • added documentation
  • added RESTful interface

28/05/08

  • moved buttons to the bottom of the player
  • text is now below the buttons and has an invisible extra “use this button to ” text for screen readers
  • pause button now toggles pause/play
  • mute button now toggles mute/sound
  • the URL of the buttons is not an anchor but a url now (that goes nowhere, but this is just to read out the right command)
  • removed the “current highlight” state
  • added a volume level indicator (as a visual bar and a hidden form field)

Problems with the YouTube Chromeless player being unavailable? – Change the URL

Thursday, June 12th, 2008

I am almost ready to release v2 of the easy youtube player but out of a sudden everything stopped working. I thought at first my own developer key got banned for incessant re-loading locally, but even Google’s own example is broken.

The solution to it seems to be to change the URL of the embed code:


// broken
swfobject.embedSWF(‘http://gdata.youtube.com/apiplayer?key= ... ‘)
// working
swfobject.embedSWF(‘http://gdata.youtube.com/apiplayer/cl.swf?key= ... ‘)

Thanks do d.kunchev who pointed this out on the mailing list

Yay for Jacob Seidelin to join me in accessihacking YouTube

Friday, June 6th, 2008

Jacob Seidelin took his JavaScript kung-foo skills off Super Mario for a short while and wrote a proof of concept how to get the annotations out of a YouTube video to display it outside the movie.

I’ve blogged about this idea here and his solution is an example to use timeout to poll for annotations being displayed.

One little change with a massive impact would be to display the annotations in a form field – thus automatically updating screen reader buffers that there was a change.

This has the same issues as my idea to display timed comments as subtitles below the movie – polling is just not safe (imagine buffering in between), so it seems a simple method in the YouTube player to fire events at certain times would be great. Something like this:


var events = {
times:[12312,12312314,14234234,234234234,23423425],
callback:onTimedEvent,
obj:{something:3}
}

ytplayer.timedEvents(events);
function onTimedEvent(o){
// o would be {time:12312,obj:{something:3}};
}

The object would be a nice to have, for example to keep scope.

Check out Jacob’s annotation scraping example here

YouTube now with annotations – can we get those as an API please (captioning)?

Wednesday, June 4th, 2008

YouTube just released a new feature for video content generators: annotations. As you can see in this example video of someone jumping out of an aircraft the annotations show up whereever you want to put them on the screen and are time-based. You can even add links and hotspots to other videos and search results which means you can do interactive games using several videos.

Now this is all cute and nice, but what I’d want is API access to these annotations. This would allow us to provide not only captioning of the video for the hard of hearing but also information for blind visitors. I’ve written about this before, you can easily create an interface to have timed captioning on youtube but playing the captions back is trickier as you have no means of syncing the video (if the video buffers in between the captions and the video get out of sync).

Now, if YouTube came up with an API access to these captions that fires an event every time a new caption starts with the type of caption and its text value, it would be dead easy to update a hidden form field with that text (or an ARIA live region) to provide a poor man’s captioning and information for the hard of hearing.

YouTube could become both a larger consumer faced product by enabling more disabled visitors to gain access and a means of captioning video that is intuitive and easy to use.

I’d be happy to help out!