]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#180]
authorrwldrn <waldron.rick@gmail.com>
Sun, 5 Dec 2010 16:32:47 +0000 (11:32 -0500)
committerrwldrn <waldron.rick@gmail.com>
Sun, 5 Dec 2010 16:32:47 +0000 (11:32 -0500)
popcorn.js

index e824008c3a4e0ec33f47a9be7b843d84e04cb2f0..e523ee8999b0ce47b0fe8d6862b383dd90612781 100644 (file)
     //  Provides some sugar, but ultimately extends
     //  the definition into Popcorn.p 
     
-    var plugin = {}, setup;
+    var natives = nativeEvents.split(/\s+/g), 
+        reserved = [ "start", "end", "timeupdate" ], 
+        plugin = {},
+        setup;
     
     
     
           return this;
         } 
         
+        //  Checks for expected properties
         if ( !( "start" in options ) ) {
           options.start = 0;
         }
           options.timeupdate = Popcorn.nop;
         }        
         
+        //  If a _setup was declared, then call it before 
+        //  the events commence
+        
         if ( "_setup" in setup && typeof setup._setup === "function" ) {
           setup._setup.call(self, options);
         }
         
-        
-        this.addEventListener( "timeupdate", function( event ) {
+        //  Plugin timeline handler 
+        this.video.addEventListener( "timeupdate", function( event ) {
           
           
           if ( ~~self.currentTime() === options.start || 
           }
           
         }, false);
+        
+
+        //  Future support plugin definitions for all of the native events
+        Popcorn.forEach( options, function ( key ) {
+          
+          console.log(key);
+        });
+        
+
+              
       
         
         return this;