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
<!-- 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 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
// 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 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() { | |
$(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 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
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 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
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 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
<!-- 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 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<!-- Inside the <body> tag --> | |
<img class="needs_sublime" src="video1.jpg" width="640" height="360" /> | |
<!-- Just before </body> (or in the <head> tag) --> | |
<script type="text/javascript"> | |
sublimevideo.load(); // When this page is first loaded there are no <video> element on the page, so SublimeVideo is not loaded unless we load it manually with this method | |
// see: http://docs.sublimevideo.net/javascript-api#load |
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
<!-- 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 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
<!-- Inside the <head> tag --> | |
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/YOUR_TOKEN.js"></script> | |
<!-- Inside the <body> tag --> | |
<video class="sublime" 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 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
# When a controller file is modified, it will execute the associated: | |
# - routing spec, | |
# - controller spec, | |
# - acceptance spec | |
guard 'rspec' do | |
watch(%r|app/controllers/(.*)_controller\.rb|) do |m| | |
["spec/routing/#{m[1]}_routing_spec.rb", | |
"spec/controllers/#{m[1]}_controller_spec.rb", | |
"spec/acceptance/#{m[1]}_spec.rb"] | |
end |