Joined July 2012
·

Andy Fleming

User Experience (UX) Craftsman at Variable Action
·
San Diego, CA
·
·
·

Note that none of the above accounts for a string <?xml that might be updated to be <?php xml which is undesired.

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').

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();

    }

});

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>

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,778 Total ProTip Views