platform/video.videojs/dist/video.es.js
function normalizeListenArgs(self, args) {

  // If the number of arguments is less than 3, the target is always the
  // evented object itself.
  var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;
  var target = void 0;
  var type = void 0;
  var listener = void 0;

  if (isTargetingSelf) {
    target = self.eventBusEl_;

    // Deal with cases where we got 3 arguments, but we are still listening to
    // the evented object itself.
    if (args.length >= 3) {
      args.shift();
    }

    type = args[0];
    listener = args[1];
  } else {
    target = args[0];
    type = args[1];
    listener = args[2];
  }

  validateTarget(target);
  validateEventType(type);
  validateListener(listener);

  listener = bind(self, listener);

  return { isTargetingSelf: isTargetingSelf, target: target, type: type, listener: listener };
}
function normalizeListenArgs(self, args) {

  // If the number of arguments is less than 3, the target is always the
  // evented object itself.
  var isTargetingSelf = args.length < 3 || args[0] === self || args[0] === self.eventBusEl_;
  var target = void 0;
  var type = void 0;
  var listener = void 0;

  if (isTargetingSelf) {
    target = self.eventBusEl_;

    // Deal with cases where we got 3 arguments, but we are still listening to
    // the evented object itself.
    if (args.length >= 3) {
      args.shift();
    }

    type = args[0];
    listener = args[1];
  } else {
    target = args[0];
    type = args[1];
    listener = args[2];
  }

  validateTarget(target);
  validateEventType(type);
  validateListener(listener);

  listener = bind(self, listener);

  return { isTargetingSelf: isTargetingSelf, target: target, type: type, listener: listener };
}
function normalizeListenArgs ( self , args ) { // If the number of arguments is less than 3, the target is always the // evented object itself. var isTargetingSelf = args . length < 3 || args [ 0 ] === self || args [ 0 ] === self . eventBusEl_ ; var target = void 0 ; var type = void 0 ; var listener = void 0 ; if ( isTargetingSelf ) { target = self . eventBusEl_ ; // Deal with cases where we got 3 arguments, but we are still listening to // the evented object itself. if ( args . length >= 3 ) { args . shift ( ) ; } type = args [ 0 ] ; listener = args [ 1 ] ; } else { target = args [ 0 ] ; type = args [ 1 ] ; listener = args [ 2 ] ; } validateTarget ( target ) ; validateEventType ( type ) ; validateListener ( listener ) ; listener = bind ( self , listener ) ; return { isTargetingSelf : isTargetingSelf , target : target , type : type , listener : listener } ; }
Takes an array of arguments given to `on()` or `one()`, validates them, and
normalizes them into an object.

@private
@param  {Object} self
The evented object on which `on()` or `one()` was called. This
object will be bound as the `this` value for the listener.

@param  {Array} args
An array of arguments passed to `on()` or `one()`.

@return {Object}
An object containing useful values for `on()` or `one()` calls.
Takes an array of arguments given to on () or one () validates them and normalizes them into an object .