title: Error: Error calling method on NPObject! with Youtube jsapi
body: <p>I'm doing a video player using JQuery and the YouTube JS API, i've varios methods for control the youtube player object, for example:</p>
  
  <pre><code>     setVolumen: function (value) {
  
          if (value &lt; 0 || value &gt; 100) {
              this.throwError("Volumen inválido: "+ value);
              return;
          }
  
          this.volume = value;
  
          this.elements.player.each(function () {
              if (typeof this.setVolume != "undefined") {
                  this.setVolume(value);
              }
          });
      },
  </code></pre>
  
  <p>"this.elements.player" is a jquery selector of the yt player object. I call a setVolume method from player-controll instance and works. ex:</p>
  
  <pre><code>        // This is inside a method of controller class
          // and self is a reference to "this" in method context
  
          this.celements.volume.slider({
              max: 100,
              value: 100,                
              change: function (event, obj) {
                  self.setVolumen(obj.value);
              }
          });
  </code></pre>
  
  <p>If i move the slider element, this works without problems, buy i call a method from jquery selector:</p>
  
  <p>$('#playlist').UplayList('setVolumen',80);</p>
  
  <p>this thrown "Error: Error calling method on NPObject!"</p>
  
  <p>The object exist, and setVolume isn't undefined. I dont understand.</p>
  
  <p>In Jquery a have:</p>
  
  <pre><code>$.fn.extend({
  
      UplayList: function (options) {
          this.each(function  () {
  
              if ($(this).data('uplaylistId')) {
                  var instance = $.playList.instances[$(this).data('uplaylistId')];
                  instance[options].apply( instance, Array.prototype.slice.call( arguments, 1 ));
              } else {
                  var instance = new $.playList(this, options);
                  var id = instance.elements.player.attr('id');
                  $(this).data('uplaylistId',id);
              }
  
          });
      }
  });
  </code></pre>