From a281d0de2a8c08a7de5002022fd88f68cf43d031 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Thu, 8 Sep 2011 11:09:43 -0400 Subject: [PATCH] removed the Window.Processing timeout block. it now uses the popcorn.getScript() callback param --- plugins/gml/popcorn.gml.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) 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 -- 2.43.0