mccambridge/tubular — pull request #6 by jahDsign (2014-10-01 12:17:39+00:00)
Title: Switch the videos in the background

Hello,

First of all, well done for creating this plugin, it's the kind of functionality I was looking for without having to code it all from scratch :) And it's been coded brilliantly, up to good standards!

In this fork, I have linted the js code and slightly optimised the caching of elements. Additionally, an option controlled class is added to the mute element so it can be styled differently through CSS to give visual feedback.
The significant change is the addition of the possibility to switch between videos. This is controlled from the HTML through an element of class "tubular-switch" which contains a data-id: the YT video ID to switch to.

I thought it was a nice addition to this great plugin as it allows to create a navigation between different videos.

I would also suggest exposing all the functions available so far (Play | Pause | Volume Up | Volume Down | Mute | Switch) so they could be called from an external script. ie: tubular.mute();

Thank you,

Antoine.