examples/lib/leap-plugins-0.1.6.js
function (callback) {
    var xhr = new XMLHttpRequest(),
        url = this.url,
        recording = this,
        contentLength = 0;

    xhr.onreadystatechange = function () {
      if (xhr.readyState === xhr.DONE) {
        if (xhr.status === 200 || xhr.status === 0) {
          if (xhr.responseText) {

            recording.finishLoad(xhr.responseText, callback);

          } else {
            console.error('Leap Playback: "' + url + '" seems to be unreachable or the file is empty.');
          }
        } else {
          console.error('Leap Playback: Couldn\'t load "' + url + '" (' + xhr.status + ')');
        }
      }
    };

    xhr.addEventListener('progress', function(oEvent){

      if ( recording.options.loadProgress ) {

        if (oEvent.lengthComputable) {
          var percentComplete = oEvent.loaded / oEvent.total;
          recording.options.loadProgress( recording, percentComplete, oEvent );
        }

      }

    });

    this.loading = true;

    xhr.open("GET", url, true);
    xhr.send(null);
  }
function (callback) {
    var xhr = new XMLHttpRequest(),
        url = this.url,
        recording = this,
        contentLength = 0;

    xhr.onreadystatechange = function () {
      if (xhr.readyState === xhr.DONE) {
        if (xhr.status === 200 || xhr.status === 0) {
          if (xhr.responseText) {

            recording.finishLoad(xhr.responseText, callback);

          } else {
            console.error('Leap Playback: "' + url + '" seems to be unreachable or the file is empty.');
          }
        } else {
          console.error('Leap Playback: Couldn\'t load "' + url + '" (' + xhr.status + ')');
        }
      }
    };

    xhr.addEventListener('progress', function(oEvent){

      if ( recording.options.loadProgress ) {

        if (oEvent.lengthComputable) {
          var percentComplete = oEvent.loaded / oEvent.total;
          recording.options.loadProgress( recording, percentComplete, oEvent );
        }

      }

    });

    this.loading = true;

    xhr.open("GET", url, true);
    xhr.send(null);
  }
function ( callback ) { var xhr = new XMLHttpRequest ( ) , url = this . url , recording = this , contentLength = 0 ; xhr . onreadystatechange = function ( ) { if ( xhr . readyState === xhr . DONE ) { if ( xhr . status === 200 || xhr . status === 0 ) { if ( xhr . responseText ) { recording . finishLoad ( xhr . responseText , callback ) ; } else { console . error ( 'Leap Playback: "' + url + '" seems to be unreachable or the file is empty.' ) ; } } else { console . error ( 'Leap Playback: Couldn\'t load "' + url + '" (' + xhr . status + ')' ) ; } } } ; xhr . addEventListener ( 'progress' , function ( oEvent ) { if ( recording . options . loadProgress ) { if ( oEvent . lengthComputable ) { var percentComplete = oEvent . loaded / oEvent . total ; recording . options . loadProgress ( recording , percentComplete , oEvent ) ; } } } ) ; this . loading = true ; xhr . open ( "GET" , url , true ) ; xhr . send ( null ) ; }
optional callback once frames are loaded, will have a context of player
optional callback once frames are loaded will have a context of player