WordPress.org

Ready to get started?Download WordPress

Forums

SublimeVideo - HTML5 Video Player
SublimeVideo + WordPress + Jetpack Infinite Scroll? (1 post)

  1. forestpurnell
    Member
    Posted 3 months ago #

    SublimeVideo's WordPress plugin works almost flawlessly with my theme and plugins except for one issue:

    When I enable Jetpack plugin's infinite scroll feature and scroll down, the newly loaded posts with videos just show normal, embedded html5 without the SublimeVideo javascript fanciness.

    I understand this is a common issue with infinite scroll where one must "callback" various functions to apply to posts which have been newly loaded. So I tried to follow the Jetpack plugin's instructions to solve that issue that here:

    http://jetpack.me/support/infinite-scroll/#javascript-events

    I also consulted SublimeVideo's documentation to try and find out what function to "callback":

    http://docs.sublimevideo.net/javascript-api/usage

    Here's what I came up with. It's from my theme's header.php, before <body&gt:

    <script>
    jQuery(document).ready(function(){

    // Re-intiate javascripts after infinite scroll
    jQuery( document.body ).on( 'post-load', function () {
    // Sublime Video
    sublime.load();
    } );

    });
    </script>

    The same block of code has worked with other callbacks, so I think I must just be using the wrong sublime video function?

    https://wordpress.org/plugins/sublimevideo-official/

Reply

You must log in to post.

About this Plugin

About this Topic