YouTube Choose Your Own Adventure Interaction

This was a quick demo built to show how we could mix videos hosted on YouTube with viewer choices at the end of those videos that cause other videos to load.

There’s a bit of work around what the visuals would be like for a user but nothing aggressive.1

If you play the first video (around 5 seconds),2 you’ll get a prompt that partially obscures the video and then loads a new video based on the button you click.

The people ended up going with Story Line or something like that but I liked this enough to write this post and figure it’ll come up again some day. With interest from someone, it’d be something that could be pretty easily built into WordPress as a plugin.

See the Pen
youtube end event
by Tom (@twwoodward)
on CodePen.


1 That means it’s ugly but I don’t want you to judge me.

2 Which is pretty short but I still fast forward it.

YouTube Full Screen – Javascript & CSS

I’m sticking this js/css combo in a number of the WordPress themes we’re building.

It’s two pieces, a javascript piece that finds the YouTube videos and wraps them in a div and a CSS Piece that makes the videos full size for the enclosing div. It stops overflows from getting ugly and expands small embeds (via oembed or embed code).

I think it’s handy and I keep having to go to codepen to find it. So now it’s here.

See the Pen
full size youtube/vimeo
by Tom (@twwoodward)
on CodePen.