From: Christopher De Cairos Date: Thu, 8 Sep 2011 15:09:43 +0000 (-0400) Subject: removed the Window.Processing timeout block. it now uses the popcorn.getScript()... X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a281d0de2a8c08a7de5002022fd88f68cf43d031;p=popcorn-js.git removed the Window.Processing timeout block. it now uses the popcorn.getScript() callback param --- diff --git a/plugins/gml/popcorn.gml.js b/plugins/gml/popcorn.gml.js index 17cf12f..2288250 100755 --- a/plugins/gml/popcorn.gml.js +++ b/plugins/gml/popcorn.gml.js @@ -165,28 +165,17 @@ if ( !window.Processing ) { - Popcorn.getScript( "http://processingjs.org/content/download/processing-js-1.2.1/processing-1.2.1.min.js" ); - } - - // makes sure both processing.js and the gml data are loaded - var readyCheck = function() { - - if ( window.Processing ) { - + Popcorn.getScript( "http://processingjs.org/content/download/processing-js-1.2.1/processing-1.2.1.min.js", function() { + Popcorn.getJSONP( "http://000000book.com/data/" + options.gmltag + ".json?callback=", function( data ) { options.pjsInstance = new Processing( options.container, gmlPlayer ); options.pjsInstance.construct( self.media, data, options ); options._running && options.pjsInstance.loop(); }, false ); + }); + } - return; - } - - setTimeout( readyCheck, 5 ); - }; - - readyCheck(); }, /** * @member gml