Skip to content

Instantly share code, notes, and snippets.

@rymai
Created June 23, 2011 18:39
Show Gist options
  • Save rymai/1043231 to your computer and use it in GitHub Desktop.
Save rymai/1043231 to your computer and use it in GitHub Desktop.
SublimeVideo: Custom play button JavaScript code (Prototype)
sublimevideo.ready(function() {
$$("img.custom_play_button").each(function(img) {
img.on("click", function(event) {
event.stop();
// Hide the posterframe and prepare and play the video
sublimevideo.prepareAndPlay(img.readAttribute("id").replace(/^posterframe_/, ""));
img.hide();
}.bind(this));
}.bind(this));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment