]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#680] Fixes suspicious code warnings
authorRick Waldron <waldron.rick@gmail.com>
Tue, 23 Aug 2011 17:54:06 +0000 (13:54 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Tue, 23 Aug 2011 17:54:06 +0000 (13:54 -0400)
players/baseplayer/popcorn.baseplayer.js
players/soundcloud/popcorn.soundcloud.js
players/vimeo/popcorn.vimeo.js
players/youtube/popcorn.youtube.js

index 9c2b2d3b0faf45c95ebf04787b7b42edf5584ef5..5e3d1dce72e60b52cbf780d7bac04d13c39da94e 100644 (file)
     this.playbackRate = 1;
 
     // These are considered to be "on" by being defined. Initialize to undefined
-    this.autoplay;
-    this.loop;
+    this.autoplay = null;
+    this.loop = null;
 
     // List of events
     this._events = {};
 
     // The underlying player resource. May be <canvas>, <iframe>, <object>, array, etc
-    this._resource;
+    this._resource = null;
     // The container div of the resource
-    this._container;
+    this._container = null;
 
     this.offsetWidth = this.width = 0;
     this.offsetHeight = this.height = 0;
     this.offsetLeft = 0;
     this.offsetTop = 0;
-    this.offsetParent;
+    this.offsetParent = null;
   };
 
   Popcorn.baseplayer.init.prototype = {
index f37b8cc85e0d843aab35a6d549b2c6df33083b93..129e3cd442e8704616c202c093290612830b227e 100644 (file)
       this._containerId = options.target;
       this._options = options;
       this._comments = [];
-      this._popcorn;
+      this._popcorn = null;
 
       pullFromContainer( this );
 
       this.top = 0;
       this.left = 0;
 
-      this.autoplay;
+      this.autoplay = null;
       this.played = 0;
 
       this.addEventListener( "load", function() {
index 03ae21da1313c0fadf9dc5b9522b1e2246a80d54..f129f0f0fcfd8776a6a608fa8c24d8f6b711341c 100644 (file)
 
       options.css && Popcorn.extend( this._target.style, options.css );
 
-      this.addEventFn;
-      this.evtHolder;
+      this.addEventFn = null;
+      this.evtHolder = null;
       this.paused = true;
       this.duration = Number.MAX_VALUE;
       this.ended = 0;
index d0afd553489365a4bf8524585dd3a140de268322..4e7737bcc73acaa96665adc257cdd9a96e448f7a 100755 (executable)
@@ -311,6 +311,7 @@ var onYouTubePlayerReady;
           self.dispatchEvent( 'waiting' );
         } else if ( state === YOUTUBE_STATE_CUED ) {
           // not handled
+          Popcorn.nop();
         }
       };