@gcorevideo/player 2.28.12 → 2.28.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2323,9 +2323,7 @@ if (typeof Object.assign != 'function') {
2323
2323
  // Skip over if undefined or null
2324
2324
  for (var nextKey in nextSource) {
2325
2325
  // Avoid bugs when hasOwnProperty is shadowed
2326
- if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
2327
- to[nextKey] = nextSource[nextKey];
2328
- }
2326
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) to[nextKey] = nextSource[nextKey];
2329
2327
  }
2330
2328
  }
2331
2329
  }
@@ -2341,18 +2339,14 @@ if (!Array.prototype.findIndex) {
2341
2339
  Object.defineProperty(Array.prototype, 'findIndex', {
2342
2340
  value: function value(predicate) {
2343
2341
  // 1. Let O be ? ToObject(this value).
2344
- if (this == null) {
2345
- throw new TypeError('"this" is null or not defined');
2346
- }
2342
+ if (this == null) throw new TypeError('"this" is null or not defined');
2347
2343
  var o = Object(this);
2348
2344
 
2349
2345
  // 2. Let len be ? ToLength(? Get(O, "length")).
2350
2346
  var len = o.length >>> 0;
2351
2347
 
2352
2348
  // 3. If IsCallable(predicate) is false, throw a TypeError exception.
2353
- if (typeof predicate !== 'function') {
2354
- throw new TypeError('predicate must be a function');
2355
- }
2349
+ if (typeof predicate !== 'function') throw new TypeError('predicate must be a function');
2356
2350
 
2357
2351
  // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
2358
2352
  var thisArg = arguments[1];
@@ -2367,9 +2361,8 @@ if (!Array.prototype.findIndex) {
2367
2361
  // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
2368
2362
  // d. If testResult is true, return k.
2369
2363
  var kValue = o[k];
2370
- if (predicate.call(thisArg, kValue, k, o)) {
2371
- return k;
2372
- }
2364
+ if (predicate.call(thisArg, kValue, k, o)) return k;
2365
+
2373
2366
  // e. Increase k by 1.
2374
2367
  k++;
2375
2368
  }
@@ -2648,8 +2641,8 @@ var hasFlash = function hasFlash() {
2648
2641
  }
2649
2642
  };
2650
2643
  var getBrowserInfo = function getBrowserInfo(ua) {
2651
- var parts = ua.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [],
2652
- extra;
2644
+ var parts = ua.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
2645
+ var extra;
2653
2646
  if (/trident/i.test(parts[1])) {
2654
2647
  extra = /\brv[ :]+(\d+)/g.exec(ua) || [];
2655
2648
  return {
@@ -2699,7 +2692,9 @@ var getBrowserData = function getBrowserData() {
2699
2692
  if (browser.versionIdentifier) {
2700
2693
  var versionRegExp = new RegExp(browser.versionIdentifier.toLowerCase());
2701
2694
  var versionRegExpResult = versionRegExp.exec(userAgent);
2702
- if (versionRegExpResult != null && versionRegExpResult[1]) setBrowserVersion(versionRegExpResult[1], browserObject);
2695
+ if (versionRegExpResult != null && versionRegExpResult[1]) {
2696
+ setBrowserVersion(versionRegExpResult[1], browserObject);
2697
+ }
2703
2698
  } else {
2704
2699
  setBrowserVersion(browserRegExpResult[1], browserObject);
2705
2700
  }
@@ -2755,7 +2750,9 @@ var getOsData = function getOsData() {
2755
2750
  } else if (os.versionIdentifier) {
2756
2751
  var versionRegExp = new RegExp(os.versionIdentifier.toLowerCase());
2757
2752
  var versionRegExpResult = versionRegExp.exec(userAgent);
2758
- if (versionRegExpResult != null && versionRegExpResult[1]) setOsVersion(versionRegExpResult[1], os.versionSeparator ? os.versionSeparator : '.', osObject);
2753
+ if (versionRegExpResult != null && versionRegExpResult[1]) {
2754
+ setOsVersion(versionRegExpResult[1], os.versionSeparator ? os.versionSeparator : '.', osObject);
2755
+ }
2759
2756
  }
2760
2757
  break;
2761
2758
  }
@@ -2770,16 +2767,20 @@ var getOsData = function getOsData() {
2770
2767
 
2771
2768
  // Set OS version
2772
2769
  var setOsVersion = function setOsVersion(version, separator, osObject) {
2773
- var finalSeparator = separator.substr(0, 1) == '[' ? new RegExp(separator, 'g') : separator;
2770
+ var finalSeparator = separator.substr(0, 1) === '[' ? new RegExp(separator, 'g') : separator;
2774
2771
  var splitVersion = version.split(finalSeparator, 2);
2775
- if (separator != '.') version = version.replace(new RegExp(separator, 'g'), '.');
2772
+ if (separator !== '.') version = version.replace(new RegExp(separator, 'g'), '.');
2776
2773
  osObject.fullVersion = version;
2777
2774
 
2778
2775
  // Major version
2779
- if (splitVersion && splitVersion[0]) osObject.majorVersion = parseInt(splitVersion[0]);
2776
+ if (splitVersion && splitVersion[0]) {
2777
+ osObject.majorVersion = parseInt(splitVersion[0]);
2778
+ }
2780
2779
 
2781
2780
  // Minor version
2782
- if (splitVersion && splitVersion[1]) osObject.minorVersion = parseInt(splitVersion[1]);
2781
+ if (splitVersion && splitVersion[1]) {
2782
+ osObject.minorVersion = parseInt(splitVersion[1]);
2783
+ }
2783
2784
  };
2784
2785
 
2785
2786
  // Set viewport size
@@ -2828,17 +2829,17 @@ Browser.hasLocalstorage = hasLocalstorage();
2828
2829
  Browser.hasFlash = hasFlash();
2829
2830
 
2830
2831
  /**
2831
- * @deprecated
2832
- * This parameter currently exists for retrocompatibility reasons.
2833
- * Use Browser.data.name instead.
2834
- */
2832
+ * @deprecated
2833
+ * This parameter currently exists for retrocompatibility reasons.
2834
+ * Use Browser.data.name instead.
2835
+ */
2835
2836
  Browser.name = browserInfo.name;
2836
2837
 
2837
2838
  /**
2838
- * @deprecated
2839
- * This parameter currently exists for retrocompatibility reasons.
2840
- * Use Browser.data.fullVersion instead.
2841
- */
2839
+ * @deprecated
2840
+ * This parameter currently exists for retrocompatibility reasons.
2841
+ * Use Browser.data.fullVersion instead.
2842
+ */
2842
2843
  Browser.version = browserInfo.version;
2843
2844
  Browser.userAgent = navigator.userAgent;
2844
2845
  Browser.data = getBrowserData();
@@ -2874,7 +2875,9 @@ function extend$1(parent, properties) {
2874
2875
  args[_key] = arguments[_key];
2875
2876
  }
2876
2877
  _this = _callSuper(this, Surrogate, [].concat(args));
2877
- if (properties.initialize) properties.initialize.apply(_this, args);
2878
+ if (properties.initialize) {
2879
+ properties.initialize.apply(_this, args);
2880
+ }
2878
2881
  return _this;
2879
2882
  }
2880
2883
  _inherits(Surrogate, _parent);
@@ -2932,7 +2935,17 @@ var Fullscreen$1 = {
2932
2935
  },
2933
2936
  cancelFullscreen: function cancelFullscreen() {
2934
2937
  var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
2935
- if (el.exitFullscreen) el.exitFullscreen();else if (el.webkitCancelFullScreen) el.webkitCancelFullScreen();else if (el.webkitExitFullscreen) el.webkitExitFullscreen();else if (el.mozCancelFullScreen) el.mozCancelFullScreen();else if (el.msExitFullscreen) el.msExitFullscreen();
2938
+ if (el.exitFullscreen) {
2939
+ el.exitFullscreen();
2940
+ } else if (el.webkitCancelFullScreen) {
2941
+ el.webkitCancelFullScreen();
2942
+ } else if (el.webkitExitFullscreen) {
2943
+ el.webkitExitFullscreen();
2944
+ } else if (el.mozCancelFullScreen) {
2945
+ el.mozCancelFullScreen();
2946
+ } else if (el.msExitFullscreen) {
2947
+ el.msExitFullscreen();
2948
+ }
2936
2949
  },
2937
2950
  fullscreenEnabled: function fullscreenEnabled() {
2938
2951
  return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
@@ -2969,7 +2982,9 @@ var Config$1 = /*#__PURE__*/function () {
2969
2982
  }, {
2970
2983
  key: "restore",
2971
2984
  value: function restore(key) {
2972
- if (Browser.hasLocalstorage && localStorage[this._createKeyspace(key)]) return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]);
2985
+ if (Browser.hasLocalstorage && localStorage[this._createKeyspace(key)]) {
2986
+ return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]);
2987
+ }
2973
2988
  return this._defaultValueFor(key);
2974
2989
  }
2975
2990
  }, {
@@ -3014,13 +3029,12 @@ var QueryString = /*#__PURE__*/function () {
3014
3029
  key: "parse",
3015
3030
  value: function parse(paramsString) {
3016
3031
  var match;
3017
- var pl = /\+/g,
3018
- // Regex for replacing addition symbol with a space
3019
- search = /([^&=]+)=?([^&]*)/g,
3020
- decode = function decode(s) {
3021
- return decodeURIComponent(s.replace(pl, ' '));
3022
- },
3023
- params = {};
3032
+ var pl = /\+/g; // Regex for replacing addition symbol with a space
3033
+ var search = /([^&=]+)=?([^&]*)/g;
3034
+ var decode = function decode(s) {
3035
+ return decodeURIComponent(s.replace(pl, ' '));
3036
+ };
3037
+ var params = {};
3024
3038
  while (match = search.exec(paramsString)) {
3025
3039
  // eslint-disable-line no-cond-assign
3026
3040
  params[decode(match[1]).toLowerCase()] = decode(match[2]);
@@ -3068,14 +3082,18 @@ function getBrowserLanguage() {
3068
3082
  return window.navigator && window.navigator.language;
3069
3083
  }
3070
3084
  function now$3() {
3071
- if (window.performance && window.performance.now) return performance.now();
3085
+ if (window.performance && window.performance.now) {
3086
+ return performance.now();
3087
+ }
3072
3088
  return Date.now();
3073
3089
  }
3074
3090
 
3075
3091
  // remove the item from the array if it exists in the array
3076
3092
  function removeArrayItem$1(arr, item) {
3077
3093
  var i = arr.indexOf(item);
3078
- if (i >= 0) arr.splice(i, 1);
3094
+ if (i >= 0) {
3095
+ arr.splice(i, 1);
3096
+ }
3079
3097
  }
3080
3098
 
3081
3099
  // https://github.com/video-dev/can-autoplay
@@ -3090,8 +3108,12 @@ function canAutoPlayMedia(cb, options) {
3090
3108
  }, options);
3091
3109
  var element = options.element ? options.element : document.createElement(options.type);
3092
3110
  element.muted = options.muted;
3093
- if (options.muted === true) element.setAttribute('muted', 'muted');
3094
- if (options.inline === true) element.setAttribute('playsinline', 'playsinline');
3111
+ if (options.muted === true) {
3112
+ element.setAttribute('muted', 'muted');
3113
+ }
3114
+ if (options.inline === true) {
3115
+ element.setAttribute('playsinline', 'playsinline');
3116
+ }
3095
3117
  element.src = options.source;
3096
3118
  var promise = element.play();
3097
3119
  var timeoutId = setTimeout(function () {
@@ -3126,7 +3148,9 @@ var DomRecycler = /*#__PURE__*/function () {
3126
3148
  }, {
3127
3149
  key: "create",
3128
3150
  value: function create(name) {
3129
- if (this.options.recycleVideo && name === 'video' && videoStack.length > 0) return videoStack.shift();
3151
+ if (this.options.recycleVideo && name === 'video' && videoStack.length > 0) {
3152
+ return videoStack.shift();
3153
+ }
3130
3154
  return document.createElement(name);
3131
3155
  }
3132
3156
  }, {
@@ -3250,7 +3274,9 @@ var Log = /*#__PURE__*/function () {
3250
3274
  }
3251
3275
  var color = COLORS[level];
3252
3276
  var klassDescription = '';
3253
- if (klass) klassDescription = '[' + klass + ']';
3277
+ if (klass) {
3278
+ klassDescription = '[' + klass + ']';
3279
+ }
3254
3280
  window.console && window.console.log && window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message));
3255
3281
  }
3256
3282
  }]);
@@ -3260,7 +3286,9 @@ Log.LEVEL_INFO = LEVEL_INFO;
3260
3286
  Log.LEVEL_WARN = LEVEL_WARN;
3261
3287
  Log.LEVEL_ERROR = LEVEL_ERROR;
3262
3288
  Log.getInstance = function () {
3263
- if (this._instance === undefined) this._instance = new this();
3289
+ if (this._instance === undefined) {
3290
+ this._instance = new this();
3291
+ }
3264
3292
  return this._instance;
3265
3293
  };
3266
3294
  Log.setLevel = function (level) {
@@ -3286,25 +3314,29 @@ var eventsApi = function eventsApi(obj, action, name, rest) {
3286
3314
 
3287
3315
  // Handle event maps.
3288
3316
  if (_typeof(name) === 'object') {
3289
- for (var key in name) obj[action].apply(obj, [key, name[key]].concat(rest));
3317
+ for (var key in name) {
3318
+ obj[action].apply(obj, [key, name[key]].concat(rest));
3319
+ }
3290
3320
  return false;
3291
3321
  }
3292
3322
 
3293
3323
  // Handle space separated event names.
3294
3324
  if (eventSplitter.test(name)) {
3295
3325
  var names = name.split(eventSplitter);
3296
- for (var i = 0, l = names.length; i < l; i++) obj[action].apply(obj, [names[i]].concat(rest));
3326
+ for (var i = 0, l = names.length; i < l; i++) {
3327
+ obj[action].apply(obj, [names[i]].concat(rest));
3328
+ }
3297
3329
  return false;
3298
3330
  }
3299
3331
  return true;
3300
3332
  };
3301
3333
  var triggerEvents = function triggerEvents(events, args, klass, name) {
3302
- var ev,
3303
- i = -1;
3304
- var l = events.length,
3305
- a1 = args[0],
3306
- a2 = args[1],
3307
- a3 = args[2];
3334
+ var ev;
3335
+ var i = -1;
3336
+ var l = events.length;
3337
+ var a1 = args[0];
3338
+ var a2 = args[1];
3339
+ var a3 = args[2];
3308
3340
  run();
3309
3341
  function run() {
3310
3342
  try {
@@ -3312,32 +3344,37 @@ var triggerEvents = function triggerEvents(events, args, klass, name) {
3312
3344
  /* eslint-disable curly */
3313
3345
  case 0:
3314
3346
  while (++i < l) {
3315
- (ev = events[i]).callback.call(ev.ctx);
3347
+ ev = events[i];
3348
+ ev.callback.call(ev.ctx);
3316
3349
  }
3317
3350
  return;
3318
3351
  case 1:
3319
3352
  while (++i < l) {
3320
- (ev = events[i]).callback.call(ev.ctx, a1);
3353
+ ev = events[i];
3354
+ ev.callback.call(ev.ctx, a1);
3321
3355
  }
3322
3356
  return;
3323
3357
  case 2:
3324
3358
  while (++i < l) {
3325
- (ev = events[i]).callback.call(ev.ctx, a1, a2);
3359
+ ev = events[i];
3360
+ ev.callback.call(ev.ctx, a1, a2);
3326
3361
  }
3327
3362
  return;
3328
3363
  case 3:
3329
3364
  while (++i < l) {
3330
- (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);
3365
+ ev = events[i];
3366
+ ev.callback.call(ev.ctx, a1, a2, a3);
3331
3367
  }
3332
3368
  return;
3333
3369
  default:
3334
3370
  while (++i < l) {
3335
- (ev = events[i]).callback.apply(ev.ctx, args);
3371
+ ev = events[i];
3372
+ ev.callback.apply(ev.ctx, args);
3336
3373
  }
3337
3374
  return;
3338
3375
  }
3339
3376
  } catch (exception) {
3340
- Log.error.apply(Log, [klass, 'error on event', name, 'trigger', '-', exception]);
3377
+ Log.error.apply(Log, [klass, 'error on event', name, 'trigger', '-', exception]); // eslint-disable-line
3341
3378
  run();
3342
3379
  }
3343
3380
  }
@@ -3385,12 +3422,11 @@ var Events$1 = /*#__PURE__*/function () {
3385
3422
  key: "once",
3386
3423
  value: function _once(name, callback, context) {
3387
3424
  var _this = this;
3388
- var _once;
3389
3425
  if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
3390
3426
  var off = function off() {
3391
3427
  return _this.off(name, _once);
3392
3428
  };
3393
- _once = function once() {
3429
+ var _once = function once() {
3394
3430
  off();
3395
3431
  callback.apply(this, arguments);
3396
3432
  };
@@ -3408,13 +3444,13 @@ var Events$1 = /*#__PURE__*/function () {
3408
3444
  }, {
3409
3445
  key: "off",
3410
3446
  value: function off(name, callback, context) {
3411
- var retain, ev, events, names, i, l, j, k;
3447
+ var retain, ev, events, i, l, j, k;
3412
3448
  if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
3413
3449
  if (!name && !callback && !context) {
3414
3450
  this._events = void 0;
3415
3451
  return this;
3416
3452
  }
3417
- names = name ? [name] : Object.keys(this._events);
3453
+ var names = name ? [name] : Object.keys(this._events);
3418
3454
  // jshint maxdepth:5
3419
3455
  for (i = 0, l = names.length; i < l; i++) {
3420
3456
  name = names[i];
@@ -3850,7 +3886,7 @@ Events$1.PLAYBACK_FRAGMENT_LOADED = 'playback:fragment:loaded';
3850
3886
  *
3851
3887
  * @event PLAYBACK_FRAGMENT_BUFFERED
3852
3888
  * @param {Object} data Data
3853
- *
3889
+ *
3854
3890
  */
3855
3891
  Events$1.PLAYBACK_FRAGMENT_BUFFERED = 'playback:fragment:buffered';
3856
3892
  // TODO doc
@@ -3908,11 +3944,11 @@ Events$1.CORE_CONTAINERS_CREATED = 'core:containers:created';
3908
3944
  Events$1.CORE_ACTIVE_CONTAINER_CHANGED = 'core:active:container:changed';
3909
3945
 
3910
3946
  /**
3911
- * Fired before options are changed in core
3912
- *
3913
- * @event CORE_OPTIONS_WILL_CHANGE
3914
- * @param {Object} current options before change
3915
- */
3947
+ * Fired before options are changed in core
3948
+ *
3949
+ * @event CORE_OPTIONS_WILL_CHANGE
3950
+ * @param {Object} current options before change
3951
+ */
3916
3952
  Events$1.CORE_OPTIONS_WILL_CHANGE = 'core:options:will:change';
3917
3953
 
3918
3954
  /**
@@ -4054,10 +4090,10 @@ Events$1.CONTAINER_SUBTITLE_CHANGED = 'container:subtitle:changed';
4054
4090
  Events$1.CONTAINER_AUDIO_AVAILABLE = 'container:audio:available';
4055
4091
 
4056
4092
  /**
4057
- * Fired whenever the current audio track has changed
4058
- * @event CONTAINER_AUDIO_CHANGED
4059
- * @param {import('../playback/playback').AudioTrack} track - audio track active after change
4060
- */
4093
+ * Fired whenever the current audio track has changed
4094
+ * @event CONTAINER_AUDIO_CHANGED
4095
+ * @param {import('../playback/playback').AudioTrack} track - audio track active after change
4096
+ */
4061
4097
  Events$1.CONTAINER_AUDIO_CHANGED = 'container:audio:changed';
4062
4098
 
4063
4099
  /**
@@ -4577,10 +4613,14 @@ var UIObject = /*#__PURE__*/function (_BaseObject) {
4577
4613
  if (method && method.constructor !== Function) method = this[events[key]];
4578
4614
  if (!method) continue;
4579
4615
  var match = key.match(delegateEventSplitter);
4580
- var eventName = match[1],
4581
- selector = match[2];
4616
+ var eventName = match[1];
4617
+ var selector = match[2];
4582
4618
  eventName += '.delegateEvents' + this.cid;
4583
- if (selector === '') this.$el.on(eventName, method.bind(this));else this.$el.on(eventName, selector, method.bind(this));
4619
+ if (selector === '') {
4620
+ this.$el.on(eventName, method.bind(this));
4621
+ } else {
4622
+ this.$el.on(eventName, selector, method.bind(this));
4623
+ }
4584
4624
  }
4585
4625
  return this;
4586
4626
  }
@@ -4608,7 +4648,7 @@ var UIObject = /*#__PURE__*/function (_BaseObject) {
4608
4648
  if (!this.el) {
4609
4649
  var attrs = $.extend(true, {}, this.attributes);
4610
4650
  if (this.id) attrs.id = this.id;
4611
- if (this.className) attrs['class'] = this.className;
4651
+ if (this.className) attrs["class"] = this.className;
4612
4652
  var $el = $(DomRecycler.create(this.tagName)).attr(attrs);
4613
4653
  this.setElement($el, false);
4614
4654
  } else {
@@ -4726,7 +4766,7 @@ var ErrorMixin = {
4726
4766
  var errorData = Object.assign({}, defaultError, error, {
4727
4767
  code: options.useCodePrefix ? prefixedCode : error.code
4728
4768
  });
4729
- if (i18n && errorData.level == PlayerError.Levels.FATAL && !errorData.UI) {
4769
+ if (i18n && errorData.level === PlayerError.Levels.FATAL && !errorData.UI) {
4730
4770
  var defaultUI = {
4731
4771
  title: i18n.t('default_error_title'),
4732
4772
  message: i18n.t('default_error_message')
@@ -5152,7 +5192,9 @@ var Container = /*#__PURE__*/function (_UIObject) {
5152
5192
  }, {
5153
5193
  key: "error",
5154
5194
  value: function error(_error) {
5155
- if (!this.isReady) this.ready();
5195
+ if (!this.isReady) {
5196
+ this.ready();
5197
+ }
5156
5198
  this.trigger(Events$1.CONTAINER_ERROR, _error, this.name);
5157
5199
  }
5158
5200
  }, {
@@ -5283,7 +5325,9 @@ var Container = /*#__PURE__*/function (_UIObject) {
5283
5325
  }, {
5284
5326
  key: "onContextMenu",
5285
5327
  value: function onContextMenu(event) {
5286
- if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events$1.CONTAINER_CONTEXTMENU, event, this.name);
5328
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5329
+ this.trigger(Events$1.CONTAINER_CONTEXTMENU, event, this.name);
5330
+ }
5287
5331
  }
5288
5332
  }, {
5289
5333
  key: "seek",
@@ -5380,22 +5424,30 @@ var Container = /*#__PURE__*/function (_UIObject) {
5380
5424
  }, {
5381
5425
  key: "mouseEnter",
5382
5426
  value: function mouseEnter() {
5383
- if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events$1.CONTAINER_MOUSE_ENTER);
5427
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5428
+ this.trigger(Events$1.CONTAINER_MOUSE_ENTER);
5429
+ }
5384
5430
  }
5385
5431
  }, {
5386
5432
  key: "mouseLeave",
5387
5433
  value: function mouseLeave() {
5388
- if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events$1.CONTAINER_MOUSE_LEAVE);
5434
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5435
+ this.trigger(Events$1.CONTAINER_MOUSE_LEAVE);
5436
+ }
5389
5437
  }
5390
5438
  }, {
5391
5439
  key: "mouseUp",
5392
5440
  value: function mouseUp() {
5393
- if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events$1.CONTAINER_MOUSE_UP);
5441
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5442
+ this.trigger(Events$1.CONTAINER_MOUSE_UP);
5443
+ }
5394
5444
  }
5395
5445
  }, {
5396
5446
  key: "mouseDown",
5397
5447
  value: function mouseDown() {
5398
- if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(Events$1.CONTAINER_MOUSE_DOWN);
5448
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5449
+ this.trigger(Events$1.CONTAINER_MOUSE_DOWN);
5450
+ }
5399
5451
  }
5400
5452
  }, {
5401
5453
  key: "enterPiP",
@@ -5442,7 +5494,11 @@ var Container = /*#__PURE__*/function (_UIObject) {
5442
5494
  }, {
5443
5495
  key: "updateStyle",
5444
5496
  value: function updateStyle() {
5445
- if (!this.options.chromeless || this.options.allowUserInteraction) this.$el.removeClass('chromeless');else this.$el.addClass('chromeless');
5497
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
5498
+ this.$el.removeClass('chromeless');
5499
+ } else {
5500
+ this.$el.addClass('chromeless');
5501
+ }
5446
5502
  }
5447
5503
  }, {
5448
5504
  key: "enableResizeObserver",
@@ -5733,6 +5789,17 @@ var Playback = /*#__PURE__*/function (_UIObject) {
5733
5789
  return 0;
5734
5790
  }
5735
5791
 
5792
+ /**
5793
+ * gets the frame rate of the current source
5794
+ * @method getFrameRate
5795
+ * @return {Number|null} frame rate (fps) of the current source, or null if unavailable
5796
+ */
5797
+ }, {
5798
+ key: "getFrameRate",
5799
+ value: function getFrameRate() {
5800
+ return null;
5801
+ }
5802
+
5736
5803
  /**
5737
5804
  * checks if the playback is playing.
5738
5805
  * @method isPlaying
@@ -6043,7 +6110,8 @@ var ContainerFactory = /*#__PURE__*/function (_BaseObject) {
6043
6110
  var playbackPlugin = this.findPlaybackPlugin(resolvedSource, mimeType);
6044
6111
 
6045
6112
  // Fallback to empty playback object until we sort out unsupported sources error without NoOp playback
6046
- var playback = playbackPlugin ? new playbackPlugin(options, this._i18n, this.playerError) : new Playback();
6113
+ var playback = playbackPlugin ? new playbackPlugin(options, this._i18n, this.playerError) // eslint-disable-line
6114
+ : new Playback();
6047
6115
  options = _objectSpread2$1(_objectSpread2$1({}, options), {}, {
6048
6116
  playback: playback
6049
6117
  });
@@ -6088,7 +6156,7 @@ var Core = /*#__PURE__*/function (_UIObject) {
6088
6156
  _this.styleRendered = false;
6089
6157
  _this.plugins = [];
6090
6158
  _this.containers = [];
6091
- //FIXME fullscreen api sucks
6159
+ // FIXME fullscreen api sucks
6092
6160
  _this._boundFullscreenHandler = function () {
6093
6161
  return _this.handleFullscreenChange();
6094
6162
  };
@@ -6634,7 +6702,9 @@ var CoreFactory = /*#__PURE__*/function (_BaseObject) {
6634
6702
  key: "setupExternalInterface",
6635
6703
  value: function setupExternalInterface(plugin) {
6636
6704
  var externalFunctions = plugin.getExternalInterface();
6637
- for (var key in externalFunctions) this.player[key] = externalFunctions[key].bind(plugin);
6705
+ for (var key in externalFunctions) {
6706
+ this.player[key] = externalFunctions[key].bind(plugin);
6707
+ }
6638
6708
  }
6639
6709
  }]);
6640
6710
  }(BaseObject);
@@ -6697,7 +6767,8 @@ var filterPluginsByType = function filterPluginsByType(plugins, type) {
6697
6767
  var _ref4 = _slicedToArray(_ref3, 2),
6698
6768
  key = _ref4[0],
6699
6769
  value = _ref4[1];
6700
- return obj[key] = value, obj;
6770
+ obj[key] = value;
6771
+ return obj;
6701
6772
  }, {});
6702
6773
  };
6703
6774
 
@@ -6713,7 +6784,7 @@ var Loader = (function () {
6713
6784
  plugins: {},
6714
6785
  playbacks: []
6715
6786
  };
6716
- var currentVersion = "0.12.0";
6787
+ var currentVersion = "0.13.0";
6717
6788
  return /*#__PURE__*/function () {
6718
6789
  /**
6719
6790
  * builds the loader
@@ -6739,7 +6810,6 @@ var Loader = (function () {
6739
6810
  /**
6740
6811
  * groups by type the external plugins that were passed through `options.plugins` it they're on a flat array
6741
6812
  * @method addExternalPlugins
6742
- * @private
6743
6813
  * @param {Object} an config object or an array of plugins
6744
6814
  * @return {Object} plugins the config object with the plugins separated by type
6745
6815
  */
@@ -6774,7 +6844,6 @@ var Loader = (function () {
6774
6844
  /**
6775
6845
  * adds all the external plugins that were passed through `options.plugins`
6776
6846
  * @method addExternalPlugins
6777
- * @private
6778
6847
  * @param {Object} plugins the config object with all plugins
6779
6848
  */
6780
6849
  }, {
@@ -6785,19 +6854,22 @@ var Loader = (function () {
6785
6854
  plugins = this.groupPluginsByType(plugins);
6786
6855
  if (plugins.playback) {
6787
6856
  var playbacks = plugins.playback.filter(function (playback) {
6788
- return Loader.checkVersionSupport(playback), true;
6857
+ Loader.checkVersionSupport(playback);
6858
+ return true;
6789
6859
  });
6790
6860
  this.playbackPlugins = loadExternalPlaybacksFirst ? this.removeDups(playbacks.concat(this.playbackPlugins)) : this.removeDups(this.playbackPlugins.concat(playbacks), true);
6791
6861
  }
6792
6862
  if (plugins.container) {
6793
6863
  var containerPlugins = plugins.container.filter(function (plugin) {
6794
- return Loader.checkVersionSupport(plugin), true;
6864
+ Loader.checkVersionSupport(plugin);
6865
+ return true;
6795
6866
  });
6796
6867
  this.containerPlugins = loadExternalPluginsFirst ? this.removeDups(containerPlugins.concat(this.containerPlugins)) : this.removeDups(this.containerPlugins.concat(containerPlugins), true);
6797
6868
  }
6798
6869
  if (plugins.core) {
6799
6870
  var corePlugins = plugins.core.filter(function (plugin) {
6800
- return Loader.checkVersionSupport(plugin), true;
6871
+ Loader.checkVersionSupport(plugin);
6872
+ return true;
6801
6873
  });
6802
6874
  this.corePlugins = loadExternalPluginsFirst ? this.removeDups(corePlugins.concat(this.corePlugins)) : this.removeDups(this.corePlugins.concat(corePlugins), true);
6803
6875
  }
@@ -6806,7 +6878,6 @@ var Loader = (function () {
6806
6878
  /**
6807
6879
  * validate if the external plugins that were passed through `options.plugins` are associated to the correct type
6808
6880
  * @method validateExternalPluginsType
6809
- * @private
6810
6881
  * @param {Object} plugins the config object with all plugins
6811
6882
  */
6812
6883
  }, {
@@ -6814,7 +6885,8 @@ var Loader = (function () {
6814
6885
  value: function validateExternalPluginsType(plugins) {
6815
6886
  var pluginTypes = ['playback', 'container', 'core'];
6816
6887
  pluginTypes.forEach(function (type) {
6817
- (plugins[type] || []).forEach(function (el) {
6888
+ var pluginsByType = plugins[type] || [];
6889
+ pluginsByType.forEach(function (el) {
6818
6890
  var errorMessage = 'external ' + el.type + ' plugin on ' + type + ' array';
6819
6891
  if (el.type !== type) throw new ReferenceError(errorMessage);
6820
6892
  });
@@ -6865,7 +6937,9 @@ var Loader = (function () {
6865
6937
  var pluginRegistry = registry.plugins;
6866
6938
  if (!pluginRegistry) return false;
6867
6939
  var previousEntry = pluginRegistry[pluginEntry.prototype.name];
6868
- if (previousEntry) Log.warn('Loader', "overriding plugin entry: ".concat(pluginEntry.prototype.name, " - ").concat(previousEntry));
6940
+ if (previousEntry) {
6941
+ Log.warn('Loader', "overriding plugin entry: ".concat(pluginEntry.prototype.name, " - ").concat(previousEntry));
6942
+ }
6869
6943
  pluginRegistry[pluginEntry.prototype.name] = pluginEntry;
6870
6944
  return true;
6871
6945
  }
@@ -7122,7 +7196,9 @@ var Player$1 = /*#__PURE__*/function (_BaseObject) {
7122
7196
  return _createClass(Player, [{
7123
7197
  key: "loader",
7124
7198
  get: function get() {
7125
- if (!this._loader) this._loader = new Loader(this.options.plugins || {}, this.options.playerId);
7199
+ if (!this._loader) {
7200
+ this._loader = new Loader(this.options.plugins || {}, this.options.playerId);
7201
+ }
7126
7202
  return this._loader;
7127
7203
  }
7128
7204
 
@@ -7212,7 +7288,11 @@ var Player$1 = /*#__PURE__*/function (_BaseObject) {
7212
7288
  }, {
7213
7289
  key: "_addEventListeners",
7214
7290
  value: function _addEventListeners() {
7215
- if (!this.core.isReady) this.listenToOnce(this.core, Events$1.CORE_READY, this._onReady);else this._onReady();
7291
+ if (!this.core.isReady) {
7292
+ this.listenToOnce(this.core, Events$1.CORE_READY, this._onReady);
7293
+ } else {
7294
+ this._onReady();
7295
+ }
7216
7296
  this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this._containerChanged);
7217
7297
  this.listenTo(this.core, Events$1.CORE_FULLSCREEN, this._onFullscreenChange);
7218
7298
  this.listenTo(this.core, Events$1.CORE_RESIZE, this._onResize);
@@ -7366,9 +7446,11 @@ var Player$1 = /*#__PURE__*/function (_BaseObject) {
7366
7446
  }, {
7367
7447
  key: "load",
7368
7448
  value: function load(sources, mimeType, autoPlay) {
7369
- if (autoPlay !== undefined) this.configure({
7370
- autoPlay: !!autoPlay
7371
- });
7449
+ if (autoPlay !== undefined) {
7450
+ this.configure({
7451
+ autoPlay: !!autoPlay
7452
+ });
7453
+ }
7372
7454
  this.core.load(sources, mimeType);
7373
7455
  return this;
7374
7456
  }
@@ -7762,22 +7844,22 @@ var tracksHTML = "<% for (var i = 0; i < tracks.length; i++) { %>\n <track data
7762
7844
  var css_248z$2 = "[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n";
7763
7845
 
7764
7846
  var MIMETYPES = {
7765
- 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {
7847
+ mp4: ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {
7766
7848
  return 'video/mp4; codecs="' + codec + ', mp4a.40.2"';
7767
7849
  }),
7768
- 'ogg': ['video/ogg; codecs="theora, vorbis"', 'video/ogg; codecs="dirac"', 'video/ogg; codecs="theora, speex"'],
7850
+ ogg: ['video/ogg; codecs="theora, vorbis"', 'video/ogg; codecs="dirac"', 'video/ogg; codecs="theora, speex"'],
7769
7851
  '3gpp': ['video/3gpp; codecs="mp4v.20.8, samr"'],
7770
- 'webm': ['video/webm; codecs="vp8, vorbis"'],
7771
- 'mkv': ['video/x-matroska; codecs="theora, vorbis"'],
7772
- 'm3u8': ['application/x-mpegurl']
7852
+ webm: ['video/webm; codecs="vp8, vorbis"'],
7853
+ mkv: ['video/x-matroska; codecs="theora, vorbis"'],
7854
+ m3u8: ['application/x-mpegurl']
7773
7855
  };
7774
- MIMETYPES['ogv'] = MIMETYPES['ogg'];
7856
+ MIMETYPES.ogv = MIMETYPES.ogg;
7775
7857
  MIMETYPES['3gp'] = MIMETYPES['3gpp'];
7776
7858
  var AUDIO_MIMETYPES = {
7777
- 'wav': ['audio/wav'],
7778
- 'mp3': ['audio/mp3', 'audio/mpeg;codecs="mp3"'],
7779
- 'aac': ['audio/mp4;codecs="mp4a.40.5"'],
7780
- 'oga': ['audio/ogg']
7859
+ wav: ['audio/wav'],
7860
+ mp3: ['audio/mp3', 'audio/mpeg;codecs="mp3"'],
7861
+ aac: ['audio/mp4;codecs="mp4a.40.5"'],
7862
+ oga: ['audio/ogg']
7781
7863
  };
7782
7864
  var KNOWN_AUDIO_MIMETYPES = Object.keys(AUDIO_MIMETYPES).reduce(function (acc, k) {
7783
7865
  return [].concat(_toConsumableArray(acc), _toConsumableArray(AUDIO_MIMETYPES[k]));
@@ -7814,7 +7896,11 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
7814
7896
  var preload = playbackConfig.preload || (Browser.isSafari ? 'auto' : _this.options.preload);
7815
7897
  var posterUrl; // FIXME: poster plugin should always convert poster to object with expected properties ?
7816
7898
  if (_this.options.poster) {
7817
- if (typeof _this.options.poster === 'string') posterUrl = _this.options.poster;else if (typeof _this.options.poster.url === 'string') posterUrl = _this.options.poster.url;
7899
+ if (typeof _this.options.poster === 'string') {
7900
+ posterUrl = _this.options.poster;
7901
+ } else if (typeof _this.options.poster.url === 'string') {
7902
+ posterUrl = _this.options.poster.url;
7903
+ }
7818
7904
  }
7819
7905
  $.extend(true, _this.el, {
7820
7906
  muted: _this.options.mute,
@@ -7825,7 +7911,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
7825
7911
  crossOrigin: playbackConfig.crossOrigin,
7826
7912
  'x-webkit-playsinline': playbackConfig.playInline
7827
7913
  });
7828
- if (playbackConfig.controls || _this.options.useVideoTagDefaultControls) _this.$el.attr('controls', '');
7914
+ if (playbackConfig.controls || _this.options.useVideoTagDefaultControls) {
7915
+ _this.$el.attr('controls', '');
7916
+ }
7829
7917
  playbackConfig.playInline && _this.$el.attr({
7830
7918
  playsinline: 'playsinline'
7831
7919
  });
@@ -7853,7 +7941,7 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
7853
7941
  key: "supportedVersion",
7854
7942
  get: function get() {
7855
7943
  return {
7856
- min: "0.12.0"
7944
+ min: "0.13.0"
7857
7945
  };
7858
7946
  }
7859
7947
  }, {
@@ -7879,23 +7967,23 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
7879
7967
  key: "events",
7880
7968
  get: function get() {
7881
7969
  return {
7882
- 'canplay': '_onCanPlay',
7883
- 'canplaythrough': '_handleBufferingEvents',
7884
- 'durationchange': '_onDurationChange',
7885
- 'ended': '_onEnded',
7886
- 'error': '_onError',
7887
- 'loadeddata': '_onLoadedData',
7888
- 'loadedmetadata': '_onLoadedMetadata',
7889
- 'pause': '_onPause',
7890
- 'playing': '_onPlaying',
7891
- 'progress': '_onProgress',
7892
- 'seeking': '_onSeeking',
7893
- 'seeked': '_onSeeked',
7894
- 'stalled': '_handleBufferingEvents',
7895
- 'timeupdate': '_onTimeUpdate',
7896
- 'waiting': '_onWaiting',
7897
- 'enterpictureinpicture': '_onEnterPiP',
7898
- 'leavepictureinpicture': '_onExitPiP'
7970
+ canplay: '_onCanPlay',
7971
+ canplaythrough: '_handleBufferingEvents',
7972
+ durationchange: '_onDurationChange',
7973
+ ended: '_onEnded',
7974
+ error: '_onError',
7975
+ loadeddata: '_onLoadedData',
7976
+ loadedmetadata: '_onLoadedMetadata',
7977
+ pause: '_onPause',
7978
+ playing: '_onPlaying',
7979
+ progress: '_onProgress',
7980
+ seeking: '_onSeeking',
7981
+ seeked: '_onSeeked',
7982
+ stalled: '_handleBufferingEvents',
7983
+ timeupdate: '_onTimeUpdate',
7984
+ waiting: '_onWaiting',
7985
+ enterpictureinpicture: '_onEnterPiP',
7986
+ leavepictureinpicture: '_onExitPiP'
7899
7987
  };
7900
7988
  }
7901
7989
 
@@ -7992,7 +8080,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
7992
8080
  };
7993
8081
 
7994
8082
  // Use current video element if recycling feature enabled with mobile devices
7995
- if (Browser.isMobile && DomRecycler.options.recycleVideo) opts.element = this.el;
8083
+ if (Browser.isMobile && DomRecycler.options.recycleVideo) {
8084
+ opts.element = this.el;
8085
+ }
7996
8086
 
7997
8087
  // Desktop browser autoplay policy may require user action
7998
8088
  // Mobile browser autoplay require user consent and video recycling feature enabled
@@ -8034,7 +8124,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8034
8124
  }, {
8035
8125
  key: "_setupSrc",
8036
8126
  value: function _setupSrc(srcUrl) {
8037
- if (this.el.src === srcUrl) return;
8127
+ if (this.el.src === srcUrl) {
8128
+ return;
8129
+ }
8038
8130
  this._ccIsSetup = false;
8039
8131
  this.el.src = srcUrl;
8040
8132
  this._src = this.el.src;
@@ -8049,7 +8141,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8049
8141
  });
8050
8142
  this._updateSettings();
8051
8143
  var autoSeekFromUrl = typeof this._options.autoSeekFromUrl === 'undefined' || this._options.autoSeekFromUrl;
8052
- if (this.getPlaybackType() !== Playback.LIVE && autoSeekFromUrl) this._checkInitialSeek();
8144
+ if (this.getPlaybackType() !== Playback.LIVE && autoSeekFromUrl) {
8145
+ this._checkInitialSeek();
8146
+ }
8053
8147
  }
8054
8148
  }, {
8055
8149
  key: "_onDurationChange",
@@ -8064,7 +8158,11 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8064
8158
  value: function _updateSettings() {
8065
8159
  // we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.
8066
8160
  // that's why we check it again and update media control accordingly.
8067
- if (this.getPlaybackType() === Playback.VOD || this.getPlaybackType() === Playback.AOD) this.settings.left = ['playpause', 'position', 'duration'];else this.settings.left = ['playstop'];
8161
+ if (this.getPlaybackType() === Playback.VOD || this.getPlaybackType() === Playback.AOD) {
8162
+ this.settings.left = ['playpause', 'position', 'duration'];
8163
+ } else {
8164
+ this.settings.left = ['playstop'];
8165
+ }
8068
8166
  this.settings.seekEnabled = this.isSeekEnabled();
8069
8167
  this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
8070
8168
  }
@@ -8115,9 +8213,11 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8115
8213
  this._handleBufferingEvents();
8116
8214
  var promise = this.el.play();
8117
8215
  // For more details, see https://developers.google.com/web/updates/2016/03/play-returns-promise
8118
- if (promise && promise["catch"]) promise["catch"](function (error) {
8119
- return Log.warn(_this4.name, 'HTML5 play failed', error);
8120
- });
8216
+ if (promise && promise["catch"]) {
8217
+ promise["catch"](function (error) {
8218
+ return Log.warn(_this4.name, 'HTML5 play failed', error);
8219
+ });
8220
+ }
8121
8221
  return promise;
8122
8222
  }
8123
8223
  }, {
@@ -8191,7 +8291,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8191
8291
  }, {
8192
8292
  key: "_startPlayheadMovingChecks",
8193
8293
  value: function _startPlayheadMovingChecks() {
8194
- if (this._playheadMovingTimer !== null || !this._playheadMovingCheckEnabled) return;
8294
+ if (this._playheadMovingTimer !== null || !this._playheadMovingCheckEnabled) {
8295
+ return;
8296
+ }
8195
8297
  this._playheadMovingTimeOnCheck = null;
8196
8298
  this._determineIfPlayheadMoving();
8197
8299
  this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), this._playheadMovingCheckInterval);
@@ -8199,7 +8301,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8199
8301
  }, {
8200
8302
  key: "_stopPlayheadMovingChecks",
8201
8303
  value: function _stopPlayheadMovingChecks() {
8202
- if (this._playheadMovingTimer === null) return;
8304
+ if (this._playheadMovingTimer === null) {
8305
+ return;
8306
+ }
8203
8307
  clearInterval(this._playheadMovingTimer);
8204
8308
  this._playheadMovingTimer = null;
8205
8309
  this._playheadMoving = false;
@@ -8329,10 +8433,16 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8329
8433
  var isMissingMediaDataToPlay = this.el.readyState < this.el.HAVE_FUTURE_DATA;
8330
8434
  var playheadShouldBeMoving = !this.el.ended && !this.el.paused && !this._playheadMoving;
8331
8435
  var buffering = isLoading && isMissingMediaDataToPlay;
8332
- if (this._playheadMovingCheckEnabled) buffering = buffering || isLoading && playheadShouldBeMoving;
8436
+ if (this._playheadMovingCheckEnabled) {
8437
+ buffering = buffering || isLoading && playheadShouldBeMoving;
8438
+ }
8333
8439
  if (this._isBuffering !== buffering) {
8334
8440
  this._isBuffering = buffering;
8335
- if (buffering) this.trigger(Events$1.PLAYBACK_BUFFERING, this.name);else this.trigger(Events$1.PLAYBACK_BUFFERFULL, this.name);
8441
+ if (buffering) {
8442
+ this.trigger(Events$1.PLAYBACK_BUFFERING, this.name);
8443
+ } else {
8444
+ this.trigger(Events$1.PLAYBACK_BUFFERFULL, this.name);
8445
+ }
8336
8446
  }
8337
8447
  }
8338
8448
  }, {
@@ -8348,7 +8458,11 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8348
8458
  raw: this.el.error,
8349
8459
  level: isUnknownError ? PlayerError.Levels.WARN : PlayerError.Levels.FATAL
8350
8460
  });
8351
- if (isUnknownError) Log.warn(this.name, 'HTML5 unknown error: ', formattedError);else this.trigger(Events$1.PLAYBACK_ERROR, formattedError);
8461
+ if (isUnknownError) {
8462
+ Log.warn(this.name, 'HTML5 unknown error: ', formattedError);
8463
+ } else {
8464
+ this.trigger(Events$1.PLAYBACK_ERROR, formattedError);
8465
+ }
8352
8466
  }
8353
8467
  }, {
8354
8468
  key: "destroy",
@@ -8368,7 +8482,7 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8368
8482
  value: function _updateDvr(status) {
8369
8483
  this.trigger(Events$1.PLAYBACK_DVR, status);
8370
8484
  this.trigger(Events$1.PLAYBACK_STATS_ADD, {
8371
- 'dvr': status
8485
+ dvr: status
8372
8486
  });
8373
8487
  }
8374
8488
  }, {
@@ -8391,7 +8505,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8391
8505
  key: "_checkInitialSeek",
8392
8506
  value: function _checkInitialSeek() {
8393
8507
  var seekTime = seekStringToSeconds();
8394
- if (seekTime !== 0) this.seek(seekTime);
8508
+ if (seekTime !== 0) {
8509
+ this.seek(seekTime);
8510
+ }
8395
8511
  }
8396
8512
  }, {
8397
8513
  key: "getCurrentTime",
@@ -8434,7 +8550,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8434
8550
  }, {
8435
8551
  key: "_onProgress",
8436
8552
  value: function _onProgress() {
8437
- if (!this.el.buffered.length) return;
8553
+ if (!this.el.buffered.length) {
8554
+ return;
8555
+ }
8438
8556
  var buffered = [];
8439
8557
  var bufferedPos = 0;
8440
8558
  for (var i = 0; i < this.el.buffered.length; i++) {
@@ -8442,7 +8560,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8442
8560
  start: this.el.buffered.start(i),
8443
8561
  end: this.el.buffered.end(i)
8444
8562
  }]);
8445
- if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) bufferedPos = i;
8563
+ if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {
8564
+ bufferedPos = i;
8565
+ }
8446
8566
  }
8447
8567
  var progress = {
8448
8568
  start: buffered[bufferedPos].start,
@@ -8455,14 +8575,18 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8455
8575
  key: "_typeFor",
8456
8576
  value: function _typeFor(src) {
8457
8577
  var mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType);
8458
- if (mimeTypes.length === 0) mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);
8578
+ if (mimeTypes.length === 0) {
8579
+ mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);
8580
+ }
8459
8581
  var mimeType = mimeTypes[0] || '';
8460
8582
  return mimeType.split(';')[0];
8461
8583
  }
8462
8584
  }, {
8463
8585
  key: "_ready",
8464
8586
  value: function _ready() {
8465
- if (this._isReadyState) return;
8587
+ if (this._isReadyState) {
8588
+ return;
8589
+ }
8466
8590
  this._isReadyState = true;
8467
8591
  this.trigger(Events$1.PLAYBACK_READY, this.name);
8468
8592
  }
@@ -8526,7 +8650,9 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8526
8650
  return this._ccTrackId;
8527
8651
  },
8528
8652
  set: function set(trackId) {
8529
- if (!isNumber$1(trackId)) return;
8653
+ if (!isNumber$1(trackId)) {
8654
+ return;
8655
+ }
8530
8656
  var tracks = this.closedCaptionsTracks;
8531
8657
  var showingTrack;
8532
8658
 
@@ -8535,9 +8661,13 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8535
8661
  showingTrack = tracks.find(function (track) {
8536
8662
  return track.id === trackId;
8537
8663
  });
8538
- if (!showingTrack) return; // Track id not found
8664
+ if (!showingTrack) {
8665
+ return;
8666
+ } // Track id not found
8539
8667
 
8540
- if (showingTrack.track.mode === 'showing') return; // Track already showing
8668
+ if (showingTrack.track.mode === 'showing') {
8669
+ return;
8670
+ } // Track already showing
8541
8671
  }
8542
8672
 
8543
8673
  // Since it is possible to display multiple tracks,
@@ -8545,7 +8675,7 @@ var HTML5Video$1 = /*#__PURE__*/function (_Playback) {
8545
8675
  tracks.filter(function (track) {
8546
8676
  return track.track.mode !== 'hidden';
8547
8677
  }).forEach(function (track) {
8548
- return track.track.mode = 'hidden';
8678
+ track.track.mode = 'hidden';
8549
8679
  });
8550
8680
  showingTrack && (showingTrack.track.mode = 'showing');
8551
8681
  this._ccTrackId = trackId;
@@ -8615,7 +8745,7 @@ var HTML5Audio = /*#__PURE__*/function (_HTML5Video) {
8615
8745
  key: "supportedVersion",
8616
8746
  get: function get() {
8617
8747
  return {
8618
- min: "0.12.0"
8748
+ min: "0.13.0"
8619
8749
  };
8620
8750
  }
8621
8751
  }, {
@@ -8672,7 +8802,7 @@ var HTMLImg = /*#__PURE__*/function (_Playback) {
8672
8802
  key: "supportedVersion",
8673
8803
  get: function get() {
8674
8804
  return {
8675
- min: "0.12.0"
8805
+ min: "0.13.0"
8676
8806
  };
8677
8807
  }
8678
8808
  }, {
@@ -8755,7 +8885,7 @@ var NoOp = /*#__PURE__*/function (_Playback) {
8755
8885
  key: "supportedVersion",
8756
8886
  get: function get() {
8757
8887
  return {
8758
- min: "0.12.0"
8888
+ min: "0.13.0"
8759
8889
  };
8760
8890
  }
8761
8891
  }, {
@@ -8783,7 +8913,9 @@ var NoOp = /*#__PURE__*/function (_Playback) {
8783
8913
  }));
8784
8914
  this.trigger(Events$1.PLAYBACK_READY, this.name);
8785
8915
  var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);
8786
- if (this.options.autoPlay || !showForNoOp) this._animate();
8916
+ if (this.options.autoPlay || !showForNoOp) {
8917
+ this._animate();
8918
+ }
8787
8919
  return this;
8788
8920
  }
8789
8921
  }, {
@@ -8801,12 +8933,14 @@ var NoOp = /*#__PURE__*/function (_Playback) {
8801
8933
  } catch (err) {
8802
8934
  buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4);
8803
8935
  var data = idata.data;
8804
- for (var i = 0; i < data.length; i++) buffer32[i] = data[i];
8936
+ for (var i = 0; i < data.length; i++) {
8937
+ buffer32[i] = data[i];
8938
+ }
8805
8939
  }
8806
- var len = buffer32.length,
8807
- m = Math.random() * 6 + 4;
8808
- var run = 0,
8809
- color = 0;
8940
+ var len = buffer32.length;
8941
+ var m = Math.random() * 6 + 4;
8942
+ var run = 0;
8943
+ var color = 0;
8810
8944
  for (var _i = 0; _i < len;) {
8811
8945
  if (run < 0) {
8812
8946
  run = m * Math.random();
@@ -8822,7 +8956,9 @@ var NoOp = /*#__PURE__*/function (_Playback) {
8822
8956
  key: "_loop",
8823
8957
  value: function _loop() {
8824
8958
  var _this2 = this;
8825
- if (this._stop) return;
8959
+ if (this._stop) {
8960
+ return;
8961
+ }
8826
8962
  this._noise();
8827
8963
  this._animationHandle = requestAnimationFrame$1(function () {
8828
8964
  return _this2._loop();
@@ -8881,14 +9017,14 @@ var Strings = /*#__PURE__*/function (_CorePlugin) {
8881
9017
  key: "supportedVersion",
8882
9018
  get: function get() {
8883
9019
  return {
8884
- min: "0.12.0"
9020
+ min: "0.13.0"
8885
9021
  };
8886
9022
  }
8887
9023
  }, {
8888
9024
  key: "t",
8889
9025
  value: function t(key) {
8890
9026
  var lang = this._language();
8891
- var fallbackLang = this._messages['en'];
9027
+ var fallbackLang = this._messages.en;
8892
9028
  var i18n = lang && this._messages[lang] || fallbackLang;
8893
9029
  return i18n[key] || fallbackLang[key] || key;
8894
9030
  }
@@ -8993,17 +9129,17 @@ var Strings = /*#__PURE__*/function (_CorePlugin) {
8993
9129
  }
8994
9130
  };
8995
9131
  this._messages = $.extend(true, defaultMessages, this.core.options.strings || {});
8996
- this._messages['de-DE'] = this._messages['de'];
8997
- this._messages['pt-BR'] = this._messages['pt'];
8998
- this._messages['en-US'] = this._messages['en'];
8999
- this._messages['bg-BG'] = this._messages['bg'];
9000
- this._messages['es-419'] = this._messages['es_am'];
9001
- this._messages['es-ES'] = this._messages['es'];
9002
- this._messages['fr-FR'] = this._messages['fr'];
9003
- this._messages['tr-TR'] = this._messages['tr'];
9004
- this._messages['et-EE'] = this._messages['et'];
9005
- this._messages['ar-IQ'] = this._messages['ar'];
9006
- this._messages['zh-CN'] = this._messages['zh'];
9132
+ this._messages['de-DE'] = this._messages.de;
9133
+ this._messages['pt-BR'] = this._messages.pt;
9134
+ this._messages['en-US'] = this._messages.en;
9135
+ this._messages['bg-BG'] = this._messages.bg;
9136
+ this._messages['es-419'] = this._messages.es_am;
9137
+ this._messages['es-ES'] = this._messages.es;
9138
+ this._messages['fr-FR'] = this._messages.fr;
9139
+ this._messages['tr-TR'] = this._messages.tr;
9140
+ this._messages['et-EE'] = this._messages.et;
9141
+ this._messages['ar-IQ'] = this._messages.ar;
9142
+ this._messages['zh-CN'] = this._messages.zh;
9007
9143
  }
9008
9144
  }]);
9009
9145
  }(CorePlugin);
@@ -9023,7 +9159,7 @@ var SourcesPlugin = /*#__PURE__*/function (_CorePlugin) {
9023
9159
  key: "supportedVersion",
9024
9160
  get: function get() {
9025
9161
  return {
9026
- min: "0.12.0"
9162
+ min: "0.13.0"
9027
9163
  };
9028
9164
  }
9029
9165
  }, {
@@ -50044,11 +50180,11 @@ class Player {
50044
50180
  }
50045
50181
  }
50046
50182
 
50047
- var version$1 = "2.28.12";
50183
+ var version$1 = "2.28.13";
50048
50184
 
50049
50185
  var packages = {
50050
50186
  "node_modules/@clappr/core": {
50051
- version: "0.12.0"},
50187
+ version: "0.13.0"},
50052
50188
  "node_modules/dashjs": {
50053
50189
  version: "4.7.4"},
50054
50190
  "node_modules/hls.js": {