docs: function MediaError(value) {
  
    // Allow redundant calls to this constructor to avoid having `instanceof`
    // checks peppered around the code.
    if (value instanceof MediaError) {
      return value;
    }
  
    if (typeof value === 'number') {
      this.code = value;
    } else if (typeof value === 'string') {
      // default code is zero, so this is a custom error
      this.message = value;
    } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
  
      // We assign the `code` property manually because native MediaError objects
      // do not expose it as an own/enumerable property of the object.
      if (typeof value.code === 'number') {
        this.code = value.code;
      }
  
      (0, _object2['default'])(this, value);
    }
  
    if (!this.message) {
      this.message = MediaError.defaultMessages[this.code] || '';
    }
  }