src/SessionRecording.js
function continuePlayback() {

        // If frames remain after advancing, schedule next frame
        if (currentFrame + 1 < frames.length) {

            // Pull the upcoming frame
            var next = frames[currentFrame + 1];

            // Calculate the real timestamp corresponding to when the next
            // frame begins
            var nextRealTimestamp = next.timestamp - startVideoTimestamp + startRealTimestamp;

            // Calculate the relative delay between the current time and
            // the next frame start
            var delay = Math.max(nextRealTimestamp - new Date().getTime(), 0);

            // Advance to next frame after enough time has elapsed
            seekToFrame(currentFrame + 1, function frameDelayElapsed() {
                continuePlayback();
            }, delay);

        }

        // Otherwise stop playback
        else
            recording.pause();

    }
function continuePlayback() {

        // If frames remain after advancing, schedule next frame
        if (currentFrame + 1 < frames.length) {

            // Pull the upcoming frame
            var next = frames[currentFrame + 1];

            // Calculate the real timestamp corresponding to when the next
            // frame begins
            var nextRealTimestamp = next.timestamp - startVideoTimestamp + startRealTimestamp;

            // Calculate the relative delay between the current time and
            // the next frame start
            var delay = Math.max(nextRealTimestamp - new Date().getTime(), 0);

            // Advance to next frame after enough time has elapsed
            seekToFrame(currentFrame + 1, function frameDelayElapsed() {
                continuePlayback();
            }, delay);

        }

        // Otherwise stop playback
        else
            recording.pause();

    }
function continuePlayback ( ) { // If frames remain after advancing, schedule next frame if ( currentFrame + 1 < frames . length ) { // Pull the upcoming frame var next = frames [ currentFrame + 1 ] ; // Calculate the real timestamp corresponding to when the next // frame begins var nextRealTimestamp = next . timestamp - startVideoTimestamp + startRealTimestamp ; // Calculate the relative delay between the current time and // the next frame start var delay = Math . max ( nextRealTimestamp - new Date ( ) . getTime ( ) , 0 ) ; // Advance to next frame after enough time has elapsed seekToFrame ( currentFrame + 1 , function frameDelayElapsed ( ) { continuePlayback ( ) ; } , delay ) ; } // Otherwise stop playback else recording . pause ( ) ; }
Advances playback to the next frame in the frames array and schedules
playback of the frame following that frame based on their associated
timestamps. If no frames exist after the next frame, playback is paused.

@private
Advances playback to the next frame in the frames array and schedules playback of the frame following that frame based on their associated timestamps . If no frames exist after the next frame playback is paused .