Joined July 2012
·
Posted to
Autoplay Sublime Video with Hashtag (even with Lightbox)
over 1 year
ago
You need to replace "video1" with the ID of the video on your page. If you have a video with the ID #my-video
, you need to say sublime('my-video')
.
Posted to
Autoplay Sublime Video with Hashtag (even with Lightbox)
over 1 year
ago
Similar code should work:
// When the video is ready
sublimevideo.ready(function() {
// check if they are at the /#autoplay-video URL
if (window.location.hash == '#autoplay-video1') {
// If so, play the video automatically
sublime('video1').play();
} else if (window.location.hash == '#autoplay-video2') {
// If so, play the video automatically
sublime('video2').play();
}
});
Posted to
Autoplay Sublime Video with Hashtag (even with Lightbox)
over 1 year
ago
The syntax is here: http://docs.sublimevideo.net/lightbox
<video id="video1" style="display:none" width="640" height="360" poster="video-poster.jpg" preload="none">
<source src="http://yoursite.com/video.mp4" />
<source src="http://yoursite.com/video.webm" />
</video>
<a class="sublime" href="#video1">Play the video with the ID "video1"</a>
Posted to
Autoplay Sublime Video with Hashtag (even with Lightbox)
over 1 year
ago
I believe their javascript API has changed since I wrote this tip. Check out their documentation for info on how to use their lightbox player: http://docs.sublimevideo.net/javascript-api/lightbox
Posted to
Magical oh-my-zsh prompt
over 1 year
ago
@jhiggins It's pretty heavy visually for my personal taste, but cool nonetheless.
Posted to
Why not to use NOW() in MySQL
over 1 year
ago
Isn't date('Y-m-d H:i.s')
equivalent to date('Y-m-d H:i.s', time())
?
And don't you mean 'Y-m-d H:i:s'
?
Achievements
491 Karma
25,744 Total ProTip Views
Nephila Komaci 3
Have at least three original repos where PHP is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Forked
Have a project valued enough to be forked by someone else
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Velociraptor
Have at least one original repo where Perl is the dominant language
Charity
Fork and commit to someone's open source project in need
Note that none of the above accounts for a string
<?xml
that might be updated to be<?php xml
which is undesired.