code: function(self, domElement) {
  
      var width = domElement.videoWidth,
          height = domElement.videoHeight,
          stopped = true;
  
      function actor() {
        if (stopped) {
          return;
        }
        if (width !== domElement.videoWidth || height !== domElement.videoHeight) {
          self.trigger('videoDimensionsChanged',
            { width: width, height: height },
            { width: domElement.videoWidth, height: domElement.videoHeight }
          );
          width = domElement.videoWidth;
          height = domElement.videoHeight;
        }
        waiter();
      }
  
      function waiter() {
        self.whenTimeIncrements(function() {
          window.requestAnimationFrame(actor);
        });
      }
  
      self.startObservingSize = function() {
        stopped = false;
        waiter();
      };
  
      self.stopObservingSize = function() {
        stopped = true;
      };
  
    }
docs: /* jshint globalstrict: true, strict: false, undef: true, unused: true,
  trailing: true, browser: true, smarttabs:true /* global OT, OTPlugin