This file contains 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<!-- Inside the <body> tag --> | |
<video id="video1" poster="posterframe.jpg" width="640" height="360" preload="none"> | |
<source src="video.mp4" /> | |
<source src="video.ogv" /> | |
</video> | |
<!-- Just before </body> (or in the <head> tag) --> |
This file contains 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
var SublimeVideo = SublimeVideo || {}; | |
var InteractiveThumbnailsHandler = function(interactiveWrapperId){ | |
this.interactiveWrapperId = interactiveWrapperId; | |
this.videosCount = $("#" + this.interactiveWrapperId + " .video_wrap").size(); | |
this.setup(); | |
}; | |
$.extend(InteractiveThumbnailsHandler.prototype, { | |
setup: function() { |
This file contains 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
var SublimeVideo = SublimeVideo || {}; | |
var InteractiveThumbnailsHandler = Class.create({ | |
initialize: function(interactiveWrapperId) { | |
this.interactiveWrapperId = interactiveWrapperId; | |
this.videosCount = $$("#" + interactiveWrapperId + " .video_wrap").size(); | |
$$("#" + this.interactiveWrapperId + " li").each(function(thumb) { | |
thumb.on("click", function(event) { | |
event.stop(); |
This file contains 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() { | |
$(this).click(function(event) { | |
event.preventDefault(); | |
// Hide the posterframe and prepare and play the video | |
sublimevideo.prepareAndPlay($(this).attr("id").replace(/^posterframe_/, "")); | |
$(this).hide(); | |
}); | |
}); | |
}); |
This file contains 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
// From the documentation: http://docs.sublimevideo.net/javascript-api#onEnd | |
// You can use sublimevideo.onEnd() to restore the video to its initial state | |
// (that shows the poster frame and the play button) automatically when the video ends: | |
sublimevideo.ready(function(){ | |
sublimevideo.onEnd(function(sv){ | |
sublimevideo.stop(); | |
}); | |
}); |
This file contains 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
<!-- Inside the <head> tag --> | |
<style type="text/css"> | |
.sublimevideo_shadow_box { | |
-webkit-box-shadow:rgba(0,0,0,0.5) 0 3px 15px; | |
-moz-box-shadow:rgba(0,0,0,0.5) 0 3px 15px; | |
box-shadow:rgba(0,0,0,0.5) 0 3px 15px; | |
} | |
</style> | |
<!-- Inside the <body> tag --> |
This file contains 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<style type="text/css" media="screen"> | |
#zoomable a { | |
display:block; | |
width:180px; | |
height:76px; | |
background:#000; | |
position:relative; | |
-webkit-box-shadow:rgba(0,0,0,0.4) 0 4px 10px; |
This file contains 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<!-- Inside the <body> tag --> | |
<a class="sublime" href="video.mp4"> | |
Click here to view the video | |
</a> | |
<video class="sublime zoom" poster="posterframe.jpg" width="800" height="336" preload="none" style="display:none"> | |
<source src="video.mp4" /> | |
<source src="video.ogv" /> |
This file contains 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
# For https://github.com/guard/guard/blob/master/CHANGELOG.md | |
input, output, people = File.read('CHANGELOG.md'), "", {} | |
input.each_line do |line| | |
if found = line.match(/\[@(\w+)\]\(([\w:\/.]+)\)/) | |
user, url = found[1], found[2] | |
people[user] = url unless people.include?(user) | |
end | |
end |
This file contains 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['sv._setAccount', 'UA-XXXXX-X']); | |
_gaq.push(['sv._trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |