Accessihacking Online Video

47
Accessihacking YouTube Christian Heilmann, BarCamp Brighton, March 2008

description

My presentation for Barcamp Brighton about how you can use the YouTube API to make it more accessible by creating time-based captions.

Transcript of Accessihacking Online Video

Page 1: Accessihacking Online Video

Accessihacking YouTube

Christian Heilmann, BarCamp Brighton, March 2008

Page 2: Accessihacking Online Video

How do you make Powerpoint and PDF files accessible?

Page 3: Accessihacking Online Video

Option #1:Learn about all the settings of

Acrobat and Powerpoint.

Page 4: Accessihacking Online Video

Do not want!

Page 5: Accessihacking Online Video

Option #2:Upload the file to slideshare.net!

Page 6: Accessihacking Online Video

Screenshot of slideshare.net, which automatically generated a text representation of the slides for you

Page 7: Accessihacking Online Video

How do you make online video accessible?

Page 8: Accessihacking Online Video

Option #1:Pay for transcription and

captioning, offer timed captions in some random

binary formats and pray that some player will support it.

Page 9: Accessihacking Online Video

Do not want!

Page 10: Accessihacking Online Video

Do online video services have captioning high on their

priority list?

Page 11: Accessihacking Online Video

Not really.

Page 12: Accessihacking Online Video

Do they miss out because of that?

Page 13: Accessihacking Online Video

Totally!

Page 14: Accessihacking Online Video

Why?

Page 15: Accessihacking Online Video

Accessible captions in an easy format

=SEO win!

Page 16: Accessihacking Online Video

Does answering your own questions make you look like a

pretentious idiot?

Page 17: Accessihacking Online Video

Totally!

Page 18: Accessihacking Online Video

Option #2:De-moronify comments by

giving people an incentive to stick to the subject at hand.

Page 19: Accessihacking Online Video

Viddler does it.

Page 20: Accessihacking Online Video

Screenshot of a video on viddler.com with timed comments.

Page 21: Accessihacking Online Video

Viddler is not that big and known though.

Page 22: Accessihacking Online Video

We want mainstream accessibility.

Page 23: Accessihacking Online Video

Solution: Hack the planet system.

Page 24: Accessihacking Online Video

How do you hack a system the legal way?

Page 25: Accessihacking Online Video

Use an API!

Page 26: Accessihacking Online Video

YouTube JavaScript API=

full of win!

Page 27: Accessihacking Online Video

Win #1: Built on top of SWFObject

Page 28: Accessihacking Online Video

<div id="video"> <a href="muffy.mpg"> video of a cute kitten (MPG, 2MB) </a> </div>

<script type="text/javascript"> var params = {allowScriptAccess:'always'}; var atts = {id:'player'}; swfobject.embedSWF("http://www.youtube.com/v/T4y6M2AeQ00&amp;border=0&amp;enablejsapi=1&amp;playerapiid=ytplayer", "video", "425", "356", "8", null, null, params, atts);</script>

Page 29: Accessihacking Online Video

Win #2: Built with events

Page 30: Accessihacking Online Video

<script type="text/javascript"> // do stuff, the player is ready! function onYouTubePlayerReady(id){

// get the player v = document.getElementById('player');

// do stuff when the player state changes v.addEventListener('onStateChange', 'onPlayerStateChange');

// do stuff when there is a player error v.addEventListener('onError', 'onPlayerError');

}</script>

Page 31: Accessihacking Online Video

Player states:

unstarted (-1)ended (0)playing (1)paused (2)buffering (3)video cued (5).

Page 32: Accessihacking Online Video

Win #3: Lots of methods

Page 33: Accessihacking Online Video

playVideo, pauseVideo, stopVideo, clearVideo, getVideoBytesLoaded,

getVideoBytesTotal, getVideoStartBytes, mute,unMute, isMuted, setVolume,

getVolume, seekTo, getPlayerState, getCurrentTime, getDuration,

addEventListener, getVideoUrl, getVideoEmbedCode

Page 34: Accessihacking Online Video

The important ones for this hack:

Page 35: Accessihacking Online Video

playVideo, pauseVideo, stopVideo, clearVideo, getVideoBytesLoaded,

getVideoBytesTotal, getVideoStartBytes, mute,unMute, isMuted, setVolume,

getVolume, seekTo, getPlayerState, getCurrentTime, getDuration,

addEventListener, getVideoUrl, getVideoEmbedCode

Page 36: Accessihacking Online Video

getCurrentTime() gives us the time of the video and seekTo()

jumps to the section of the video and plays from there.

Page 37: Accessihacking Online Video

Battle plan!

Page 38: Accessihacking Online Video

★ Create form after video when the player is ready.

★ Every time the player is paused, create timestamp link and comment field.

★ Write server side control to create list of comments

Page 41: Accessihacking Online Video

Where is this going?

Page 42: Accessihacking Online Video

Broadway.

Page 43: Accessihacking Online Video

★ The YouTube team like the idea.

★ Stanford university is working on a flash player with captions and like it.

★ Someone on GeekUp is writing a GreaseMonkey script to hack YouTube

★ I will pester Yahoo! video

★ I’ll be back in two week’s time :)

Page 44: Accessihacking Online Video

Things I asked for:

Page 45: Accessihacking Online Video

Ability to pass in the JSON object that will fire events

with the text at the defined time - this would allow us to populate a form field to tell screen readers what is

going on.

Page 46: Accessihacking Online Video

The reason is that you seem not to be able to focus an element when the Flash

player is on.

Page 47: Accessihacking Online Video

THANKS!

Chris Heilmann

http://wait-till-i.com