Jonathan Prior

TwineTubular – Twine 1.4 macro for a YouTube background video

I've been quietly playing about with Twine recently. While working on something completely unrelated, I happened across this jQuery plugin called Tubular. I immediately thought it would be a cool thing to use in Twine games, after seeing how Porpentine has pulled off spectacular usage of YouTube-sourced audio in her games.

So I spent what turned out to be an entire sleepless night hacking jQuery and a jQuery plugin into the form of a Twine macro.

I have only tested this on the default Sugarcane template in Firefox 21 and Chrome 27. I can't really provide any support, as I have no time to do so.

Here it is. Hope you'll all get some use out of it.

Here's a demo.

Update 2013-05-27: You can now use multiple videos in a single game (this didn't work before as the plugin wasn't cleaning up properly upon termination). You can now also use the audio from the YouTube video when you specify another argument.