SublimeVideo

Documentation

Check out our Getting Started and FAQ pages to start, and if you have any problems take a look at our Troubleshooting page.

Returning to the initial state once video playback ends

Sometimes you may want to return to the video’s initial state – with the initial play button – once a video has finished playing. This is easy to achieve thanks to our JavaScript API.

Simply put the following JavaScript code in a <script> element just before the </body> tag, or in an external file.

sublimevideo.ready(function() {
  sublimevideo.onEnd(function(sv) {
    sublimevideo.stop();
  });
});

Note: As discussed in the Loop a video page, if you don’t want to apply this effect to all the videos in your page, you can add conditions before calling sublimevideo.stop (for example adding an id to your <video> element and then perform a check on sv.element.id).

Demo

You can see this feature in action on this page.