Created
June 23, 2011 18:39
-
-
Save rymai/1043231 to your computer and use it in GitHub Desktop.
SublimeVideo: Custom play button JavaScript code (Prototype)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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