@gcorevideo/player 2.20.4 → 2.20.6

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.
Files changed (63) hide show
  1. package/assets/error-screen/error_screen.ejs +3 -1
  2. package/dist/core.js +407 -205
  3. package/dist/index.css +1285 -1285
  4. package/dist/index.js +550 -386
  5. package/dist/plugins/index.css +966 -966
  6. package/dist/plugins/index.js +121 -162
  7. package/lib/Player.d.ts.map +1 -1
  8. package/lib/Player.js +2 -2
  9. package/lib/playback/BasePlayback.d.ts +11 -0
  10. package/lib/playback/BasePlayback.d.ts.map +1 -0
  11. package/lib/playback/BasePlayback.js +33 -0
  12. package/lib/playback/dash-playback/DashPlayback.d.ts +3 -2
  13. package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
  14. package/lib/playback/dash-playback/DashPlayback.js +7 -7
  15. package/lib/playback/hls-playback/HlsPlayback.d.ts +2 -2
  16. package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
  17. package/lib/playback/hls-playback/HlsPlayback.js +8 -5
  18. package/lib/playback/utils.d.ts +2 -0
  19. package/lib/playback/utils.d.ts.map +1 -0
  20. package/lib/playback/utils.js +1 -0
  21. package/lib/playback.types.d.ts +10 -3
  22. package/lib/playback.types.d.ts.map +1 -1
  23. package/lib/playback.types.js +3 -3
  24. package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
  25. package/lib/plugins/context-menu/ContextMenu.js +1 -2
  26. package/lib/plugins/error-screen/ErrorScreen.d.ts +39 -24
  27. package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
  28. package/lib/plugins/error-screen/ErrorScreen.js +69 -136
  29. package/lib/plugins/media-control/MediaControl.d.ts +1 -1
  30. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  31. package/lib/plugins/media-control/MediaControl.js +16 -8
  32. package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
  33. package/lib/plugins/multi-camera/MultiCamera.js +2 -3
  34. package/lib/plugins/poster/Poster.js +1 -1
  35. package/lib/plugins/source-controller/SourceController.d.ts +2 -1
  36. package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
  37. package/lib/plugins/source-controller/SourceController.js +12 -6
  38. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +2 -1
  39. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
  40. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +19 -3
  41. package/lib/testUtils.d.ts +66 -2
  42. package/lib/testUtils.d.ts.map +1 -1
  43. package/lib/testUtils.js +95 -2
  44. package/package.json +2 -2
  45. package/src/Player.ts +2 -2
  46. package/src/__tests__/Player.test.ts +2 -3
  47. package/src/playback/BasePlayback.ts +41 -0
  48. package/src/playback/dash-playback/DashPlayback.ts +12 -17
  49. package/src/playback/hls-playback/HlsPlayback.ts +9 -7
  50. package/src/playback.types.ts +11 -3
  51. package/src/plugins/context-menu/ContextMenu.ts +1 -2
  52. package/src/plugins/error-screen/ErrorScreen.ts +120 -195
  53. package/src/plugins/error-screen/__tests__/ErrorScreen.test.ts +113 -0
  54. package/src/plugins/error-screen/__tests__/__snapshots__/ErrorScreen.test.ts.snap +20 -0
  55. package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +32 -57
  56. package/src/plugins/media-control/MediaControl.ts +16 -8
  57. package/src/plugins/multi-camera/MultiCamera.ts +2 -3
  58. package/src/plugins/poster/Poster.ts +1 -1
  59. package/src/plugins/source-controller/SourceController.ts +20 -14
  60. package/src/plugins/source-controller/__tests__/SourceController.test.ts +29 -46
  61. package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +20 -3
  62. package/src/testUtils.ts +100 -3
  63. package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js CHANGED
@@ -11152,13 +11152,13 @@ var config = {};
11152
11152
 
11153
11153
  function noop$1() {}
11154
11154
 
11155
- var on$1 = noop$1;
11155
+ var on = noop$1;
11156
11156
  var addListener = noop$1;
11157
- var once$1 = noop$1;
11158
- var off$1 = noop$1;
11157
+ var once = noop$1;
11158
+ var off = noop$1;
11159
11159
  var removeListener = noop$1;
11160
11160
  var removeAllListeners = noop$1;
11161
- var emit$1 = noop$1;
11161
+ var emit = noop$1;
11162
11162
 
11163
11163
  function binding(name) {
11164
11164
  throw new Error('process.binding is not supported');
@@ -11211,13 +11211,13 @@ var browser$1 = {
11211
11211
  argv: argv,
11212
11212
  version: version$2,
11213
11213
  versions: versions,
11214
- on: on$1,
11214
+ on: on,
11215
11215
  addListener: addListener,
11216
- once: once$1,
11217
- off: off$1,
11216
+ once: once,
11217
+ off: off,
11218
11218
  removeListener: removeListener,
11219
11219
  removeAllListeners: removeAllListeners,
11220
- emit: emit$1,
11220
+ emit: emit,
11221
11221
  binding: binding,
11222
11222
  cwd: cwd,
11223
11223
  chdir: chdir,
@@ -12114,186 +12114,359 @@ function ifError(err) {
12114
12114
  if (err) throw err;
12115
12115
  }
12116
12116
 
12117
- /**
12118
- * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
12119
- *
12120
- * @copyright Yusuke Kawasaki
12121
- * @license MIT
12122
- * @constructor
12123
- * @see https://github.com/kawanet/event-lite
12124
- * @see http://kawanet.github.io/event-lite/EventLite.html
12125
- * @example
12126
- * var EventLite = require("event-lite");
12127
- *
12128
- * function MyClass() {...} // your class
12129
- *
12130
- * EventLite.mixin(MyClass.prototype); // import event methods
12131
- *
12132
- * var obj = new MyClass();
12133
- * obj.on("foo", function() {...}); // add event listener
12134
- * obj.once("bar", function() {...}); // add one-time event listener
12135
- * obj.emit("foo"); // dispatch event
12136
- * obj.emit("bar"); // dispatch another event
12137
- * obj.off("foo"); // remove event listener
12138
- */
12139
-
12140
- function EventLite() {
12141
- if (!(this instanceof EventLite)) return new EventLite();
12117
+ function getDefaultExportFromCjs$1 (x) {
12118
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12142
12119
  }
12143
12120
 
12144
- // (function(EventLite) {
12145
- // export the class for node.js
12146
- // if ("undefined" !== typeof module) module.exports = EventLite;
12121
+ var eventemitter3$1 = {exports: {}};
12147
12122
 
12148
- // property name to hold listeners
12149
- var LISTENERS = "listeners";
12123
+ var hasRequiredEventemitter3;
12150
12124
 
12151
- // methods to export
12152
- var methods = {
12153
- on: on,
12154
- once: once,
12155
- off: off,
12156
- emit: emit
12157
- };
12125
+ function requireEventemitter3 () {
12126
+ if (hasRequiredEventemitter3) return eventemitter3$1.exports;
12127
+ hasRequiredEventemitter3 = 1;
12128
+ (function (module) {
12158
12129
 
12159
- // mixin to self
12160
- mixin(EventLite.prototype);
12130
+ var has = Object.prototype.hasOwnProperty
12131
+ , prefix = '~';
12161
12132
 
12162
- // export mixin function
12163
- EventLite.mixin = mixin;
12133
+ /**
12134
+ * Constructor to create a storage for our `EE` objects.
12135
+ * An `Events` instance is a plain object whose properties are event names.
12136
+ *
12137
+ * @constructor
12138
+ * @private
12139
+ */
12140
+ function Events() {}
12141
+
12142
+ //
12143
+ // We try to not inherit from `Object.prototype`. In some engines creating an
12144
+ // instance in this way is faster than calling `Object.create(null)` directly.
12145
+ // If `Object.create(null)` is not supported we prefix the event names with a
12146
+ // character to make sure that the built-in object properties are not
12147
+ // overridden or used as an attack vector.
12148
+ //
12149
+ if (Object.create) {
12150
+ Events.prototype = Object.create(null);
12151
+
12152
+ //
12153
+ // This hack is needed because the `__proto__` property is still inherited in
12154
+ // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
12155
+ //
12156
+ if (!new Events().__proto__) prefix = false;
12157
+ }
12164
12158
 
12165
- /**
12166
- * Import on(), once(), off() and emit() methods into target object.
12167
- *
12168
- * @function EventLite.mixin
12169
- * @param target {Prototype}
12170
- */
12159
+ /**
12160
+ * Representation of a single event listener.
12161
+ *
12162
+ * @param {Function} fn The listener function.
12163
+ * @param {*} context The context to invoke the listener with.
12164
+ * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
12165
+ * @constructor
12166
+ * @private
12167
+ */
12168
+ function EE(fn, context, once) {
12169
+ this.fn = fn;
12170
+ this.context = context;
12171
+ this.once = once || false;
12172
+ }
12171
12173
 
12172
- function mixin(target) {
12173
- for (var key in methods) {
12174
- target[key] = methods[key];
12175
- }
12176
- return target;
12177
- }
12174
+ /**
12175
+ * Add a listener for a given event.
12176
+ *
12177
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
12178
+ * @param {(String|Symbol)} event The event name.
12179
+ * @param {Function} fn The listener function.
12180
+ * @param {*} context The context to invoke the listener with.
12181
+ * @param {Boolean} once Specify if the listener is a one-time listener.
12182
+ * @returns {EventEmitter}
12183
+ * @private
12184
+ */
12185
+ function addListener(emitter, event, fn, context, once) {
12186
+ if (typeof fn !== 'function') {
12187
+ throw new TypeError('The listener must be a function');
12188
+ }
12178
12189
 
12179
- /**
12180
- * Add an event listener.
12181
- *
12182
- * @function EventLite.prototype.on
12183
- * @param type {string}
12184
- * @param func {Function}
12185
- * @returns {EventLite} Self for method chaining
12186
- */
12190
+ var listener = new EE(fn, context || emitter, once)
12191
+ , evt = prefix ? prefix + event : event;
12187
12192
 
12188
- function on(type, func) {
12189
- getListeners(this, type).push(func);
12190
- return this;
12191
- }
12193
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
12194
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
12195
+ else emitter._events[evt] = [emitter._events[evt], listener];
12192
12196
 
12193
- /**
12194
- * Add one-time event listener.
12195
- *
12196
- * @function EventLite.prototype.once
12197
- * @param type {string}
12198
- * @param func {Function}
12199
- * @returns {EventLite} Self for method chaining
12200
- */
12197
+ return emitter;
12198
+ }
12201
12199
 
12202
- function once(type, func) {
12203
- var that = this;
12204
- wrap.originalListener = func;
12205
- getListeners(that, type).push(wrap);
12206
- return that;
12200
+ /**
12201
+ * Clear event by name.
12202
+ *
12203
+ * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
12204
+ * @param {(String|Symbol)} evt The Event name.
12205
+ * @private
12206
+ */
12207
+ function clearEvent(emitter, evt) {
12208
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
12209
+ else delete emitter._events[evt];
12210
+ }
12207
12211
 
12208
- function wrap() {
12209
- off.call(that, type, wrap);
12210
- func.apply(this, arguments);
12211
- }
12212
- }
12212
+ /**
12213
+ * Minimal `EventEmitter` interface that is molded against the Node.js
12214
+ * `EventEmitter` interface.
12215
+ *
12216
+ * @constructor
12217
+ * @public
12218
+ */
12219
+ function EventEmitter() {
12220
+ this._events = new Events();
12221
+ this._eventsCount = 0;
12222
+ }
12213
12223
 
12214
- /**
12215
- * Remove an event listener.
12216
- *
12217
- * @function EventLite.prototype.off
12218
- * @param [type] {string}
12219
- * @param [func] {Function}
12220
- * @returns {EventLite} Self for method chaining
12221
- */
12224
+ /**
12225
+ * Return an array listing the events for which the emitter has registered
12226
+ * listeners.
12227
+ *
12228
+ * @returns {Array}
12229
+ * @public
12230
+ */
12231
+ EventEmitter.prototype.eventNames = function eventNames() {
12232
+ var names = []
12233
+ , events
12234
+ , name;
12222
12235
 
12223
- function off(type, func) {
12224
- var that = this;
12225
- var listners;
12226
- if (!arguments.length) {
12227
- delete that[LISTENERS];
12228
- } else if (!func) {
12229
- listners = that[LISTENERS];
12230
- if (listners) {
12231
- delete listners[type];
12232
- if (!Object.keys(listners).length) return off.call(that);
12233
- }
12234
- } else {
12235
- listners = getListeners(that, type, true);
12236
- if (listners) {
12237
- listners = listners.filter(ne);
12238
- if (!listners.length) return off.call(that, type);
12239
- that[LISTENERS][type] = listners;
12240
- }
12241
- }
12242
- return that;
12236
+ if (this._eventsCount === 0) return names;
12243
12237
 
12244
- function ne(test) {
12245
- return test !== func && test.originalListener !== func;
12246
- }
12247
- }
12238
+ for (name in (events = this._events)) {
12239
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
12240
+ }
12248
12241
 
12249
- /**
12250
- * Dispatch (trigger) an event.
12251
- *
12252
- * @function EventLite.prototype.emit
12253
- * @param type {string}
12254
- * @param [value] {*}
12255
- * @returns {boolean} True when a listener received the event
12256
- */
12242
+ if (Object.getOwnPropertySymbols) {
12243
+ return names.concat(Object.getOwnPropertySymbols(events));
12244
+ }
12257
12245
 
12258
- function emit(type, value) {
12259
- var that = this;
12260
- var listeners = getListeners(that, type, true);
12261
- if (!listeners) return false;
12262
- var arglen = arguments.length;
12263
- if (arglen === 1) {
12264
- listeners.forEach(zeroarg);
12265
- } else if (arglen === 2) {
12266
- listeners.forEach(onearg);
12267
- } else {
12268
- var args = Array.prototype.slice.call(arguments, 1);
12269
- listeners.forEach(moreargs);
12270
- }
12271
- return !!listeners.length;
12246
+ return names;
12247
+ };
12272
12248
 
12273
- function zeroarg(func) {
12274
- func.call(that);
12275
- }
12249
+ /**
12250
+ * Return the listeners registered for a given event.
12251
+ *
12252
+ * @param {(String|Symbol)} event The event name.
12253
+ * @returns {Array} The registered listeners.
12254
+ * @public
12255
+ */
12256
+ EventEmitter.prototype.listeners = function listeners(event) {
12257
+ var evt = prefix ? prefix + event : event
12258
+ , handlers = this._events[evt];
12276
12259
 
12277
- function onearg(func) {
12278
- func.call(that, value);
12279
- }
12260
+ if (!handlers) return [];
12261
+ if (handlers.fn) return [handlers.fn];
12280
12262
 
12281
- function moreargs(func) {
12282
- func.apply(that, args);
12283
- }
12284
- }
12263
+ for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
12264
+ ee[i] = handlers[i].fn;
12265
+ }
12285
12266
 
12286
- /**
12287
- * @ignore
12288
- */
12267
+ return ee;
12268
+ };
12289
12269
 
12290
- function getListeners(that, type, readonly) {
12291
- if (readonly && !that[LISTENERS]) return;
12292
- var listeners = that[LISTENERS] || (that[LISTENERS] = {});
12293
- return listeners[type] || (listeners[type] = []);
12294
- }
12270
+ /**
12271
+ * Return the number of listeners listening to a given event.
12272
+ *
12273
+ * @param {(String|Symbol)} event The event name.
12274
+ * @returns {Number} The number of listeners.
12275
+ * @public
12276
+ */
12277
+ EventEmitter.prototype.listenerCount = function listenerCount(event) {
12278
+ var evt = prefix ? prefix + event : event
12279
+ , listeners = this._events[evt];
12280
+
12281
+ if (!listeners) return 0;
12282
+ if (listeners.fn) return 1;
12283
+ return listeners.length;
12284
+ };
12285
+
12286
+ /**
12287
+ * Calls each of the listeners registered for a given event.
12288
+ *
12289
+ * @param {(String|Symbol)} event The event name.
12290
+ * @returns {Boolean} `true` if the event had listeners, else `false`.
12291
+ * @public
12292
+ */
12293
+ EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
12294
+ var evt = prefix ? prefix + event : event;
12295
+
12296
+ if (!this._events[evt]) return false;
12297
+
12298
+ var listeners = this._events[evt]
12299
+ , len = arguments.length
12300
+ , args
12301
+ , i;
12302
+
12303
+ if (listeners.fn) {
12304
+ if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
12305
+
12306
+ switch (len) {
12307
+ case 1: return listeners.fn.call(listeners.context), true;
12308
+ case 2: return listeners.fn.call(listeners.context, a1), true;
12309
+ case 3: return listeners.fn.call(listeners.context, a1, a2), true;
12310
+ case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
12311
+ case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
12312
+ case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
12313
+ }
12314
+
12315
+ for (i = 1, args = new Array(len -1); i < len; i++) {
12316
+ args[i - 1] = arguments[i];
12317
+ }
12318
+
12319
+ listeners.fn.apply(listeners.context, args);
12320
+ } else {
12321
+ var length = listeners.length
12322
+ , j;
12323
+
12324
+ for (i = 0; i < length; i++) {
12325
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
12326
+
12327
+ switch (len) {
12328
+ case 1: listeners[i].fn.call(listeners[i].context); break;
12329
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
12330
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
12331
+ case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
12332
+ default:
12333
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
12334
+ args[j - 1] = arguments[j];
12335
+ }
12336
+
12337
+ listeners[i].fn.apply(listeners[i].context, args);
12338
+ }
12339
+ }
12340
+ }
12341
+
12342
+ return true;
12343
+ };
12344
+
12345
+ /**
12346
+ * Add a listener for a given event.
12347
+ *
12348
+ * @param {(String|Symbol)} event The event name.
12349
+ * @param {Function} fn The listener function.
12350
+ * @param {*} [context=this] The context to invoke the listener with.
12351
+ * @returns {EventEmitter} `this`.
12352
+ * @public
12353
+ */
12354
+ EventEmitter.prototype.on = function on(event, fn, context) {
12355
+ return addListener(this, event, fn, context, false);
12356
+ };
12357
+
12358
+ /**
12359
+ * Add a one-time listener for a given event.
12360
+ *
12361
+ * @param {(String|Symbol)} event The event name.
12362
+ * @param {Function} fn The listener function.
12363
+ * @param {*} [context=this] The context to invoke the listener with.
12364
+ * @returns {EventEmitter} `this`.
12365
+ * @public
12366
+ */
12367
+ EventEmitter.prototype.once = function once(event, fn, context) {
12368
+ return addListener(this, event, fn, context, true);
12369
+ };
12370
+
12371
+ /**
12372
+ * Remove the listeners of a given event.
12373
+ *
12374
+ * @param {(String|Symbol)} event The event name.
12375
+ * @param {Function} fn Only remove the listeners that match this function.
12376
+ * @param {*} context Only remove the listeners that have this context.
12377
+ * @param {Boolean} once Only remove one-time listeners.
12378
+ * @returns {EventEmitter} `this`.
12379
+ * @public
12380
+ */
12381
+ EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
12382
+ var evt = prefix ? prefix + event : event;
12383
+
12384
+ if (!this._events[evt]) return this;
12385
+ if (!fn) {
12386
+ clearEvent(this, evt);
12387
+ return this;
12388
+ }
12389
+
12390
+ var listeners = this._events[evt];
12391
+
12392
+ if (listeners.fn) {
12393
+ if (
12394
+ listeners.fn === fn &&
12395
+ (!once || listeners.once) &&
12396
+ (!context || listeners.context === context)
12397
+ ) {
12398
+ clearEvent(this, evt);
12399
+ }
12400
+ } else {
12401
+ for (var i = 0, events = [], length = listeners.length; i < length; i++) {
12402
+ if (
12403
+ listeners[i].fn !== fn ||
12404
+ (once && !listeners[i].once) ||
12405
+ (context && listeners[i].context !== context)
12406
+ ) {
12407
+ events.push(listeners[i]);
12408
+ }
12409
+ }
12410
+
12411
+ //
12412
+ // Reset the array, or remove it completely if we have no more listeners.
12413
+ //
12414
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
12415
+ else clearEvent(this, evt);
12416
+ }
12417
+
12418
+ return this;
12419
+ };
12420
+
12421
+ /**
12422
+ * Remove all listeners, or those of the specified event.
12423
+ *
12424
+ * @param {(String|Symbol)} [event] The event name.
12425
+ * @returns {EventEmitter} `this`.
12426
+ * @public
12427
+ */
12428
+ EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
12429
+ var evt;
12430
+
12431
+ if (event) {
12432
+ evt = prefix ? prefix + event : event;
12433
+ if (this._events[evt]) clearEvent(this, evt);
12434
+ } else {
12435
+ this._events = new Events();
12436
+ this._eventsCount = 0;
12437
+ }
12438
+
12439
+ return this;
12440
+ };
12441
+
12442
+ //
12443
+ // Alias methods names because people roll like that.
12444
+ //
12445
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
12446
+ EventEmitter.prototype.addListener = EventEmitter.prototype.on;
12447
+
12448
+ //
12449
+ // Expose the prefix.
12450
+ //
12451
+ EventEmitter.prefixed = prefix;
12452
+
12453
+ //
12454
+ // Allow `EventEmitter` to be imported as module namespace.
12455
+ //
12456
+ EventEmitter.EventEmitter = EventEmitter;
12295
12457
 
12296
- // })(EventLite);
12458
+ //
12459
+ // Expose the module.
12460
+ //
12461
+ {
12462
+ module.exports = EventEmitter;
12463
+ }
12464
+ } (eventemitter3$1));
12465
+ return eventemitter3$1.exports;
12466
+ }
12467
+
12468
+ var eventemitter3Exports$1 = requireEventemitter3();
12469
+ const EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs$1(eventemitter3Exports$1);
12297
12470
 
12298
12471
  /**
12299
12472
  * A top-level event on the player object
@@ -12413,10 +12586,6 @@ function isHlsSource(source, mimeType) {
12413
12586
  return source.endsWith('.m3u8');
12414
12587
  }
12415
12588
 
12416
- function getDefaultExportFromCjs$1 (x) {
12417
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12418
- }
12419
-
12420
12589
  var dash_all_min = {exports: {}};
12421
12590
 
12422
12591
  var hasRequiredDash_all_min;
@@ -12443,25 +12612,57 @@ var PlaybackErrorCode;
12443
12612
  /**
12444
12613
  * An unknown or uncategorised error.
12445
12614
  */
12446
- PlaybackErrorCode[PlaybackErrorCode["Generic"] = 0] = "Generic";
12615
+ PlaybackErrorCode["Generic"] = "GENERIC_ERROR";
12447
12616
  /**
12448
12617
  * The media source is not available. Typically a network error.
12449
12618
  */
12450
- PlaybackErrorCode[PlaybackErrorCode["MediaSourceUnavailable"] = 1] = "MediaSourceUnavailable";
12619
+ PlaybackErrorCode["MediaSourceUnavailable"] = "MEDIA_SOURCE_UNAVAILABLE";
12451
12620
  /**
12452
12621
  * The media source is not accessible due to some protection policy.
12453
12622
  */
12454
- PlaybackErrorCode[PlaybackErrorCode["MediaSourceAccessDenied"] = 3] = "MediaSourceAccessDenied";
12623
+ PlaybackErrorCode["MediaSourceAccessDenied"] = "MEDIA_SOURCE_ACCESS_DENIED";
12455
12624
  })(PlaybackErrorCode || (PlaybackErrorCode = {}));
12456
12625
 
12626
+ /**
12627
+ * This class adds common behaviors to all playback modules.
12628
+ * @internal
12629
+ * TODO use custom HTML5Video playback with this layer applied
12630
+ */
12631
+ class BasePlayback extends HTML5Video {
12632
+ createError(errorData, options) {
12633
+ const i18n = this.i18n ||
12634
+ // @ts-ignore
12635
+ (this.core && this.core.i18n) ||
12636
+ // @ts-ignore
12637
+ (this.container && this.container.i18n);
12638
+ if (i18n &&
12639
+ !errorData.UI &&
12640
+ errorData.code === PlaybackErrorCode.MediaSourceUnavailable) {
12641
+ const defaultUI = {
12642
+ title: i18n.t('no_broadcast'),
12643
+ message: '',
12644
+ };
12645
+ errorData.UI = defaultUI;
12646
+ }
12647
+ if (errorData.level === PlayerError.Levels.FATAL) {
12648
+ this.trigger(Events$1.PLAYBACK_MEDIACONTROL_DISABLE);
12649
+ }
12650
+ return super.createError(errorData, options);
12651
+ }
12652
+ _onPlaying() {
12653
+ super._onPlaying();
12654
+ this.trigger(Events$1.PLAYBACK_MEDIACONTROL_ENABLE);
12655
+ }
12656
+ }
12657
+
12457
12658
  // Copyright 2014 Globo.com Player authors. All rights reserved.
12458
12659
  // Use of this source code is governed by a BSD-style
12459
12660
  // license that can be found in the LICENSE file.
12460
12661
  const AUTO$2 = -1;
12461
12662
  const { now: now$2 } = Utils;
12462
- const T$f = 'playback.dash';
12663
+ const T$g = 'playback.dash';
12463
12664
  // @ts-expect-error
12464
- class DashPlayback extends HTML5Video {
12665
+ class DashPlayback extends BasePlayback {
12465
12666
  _levels = null;
12466
12667
  _currentLevel = null;
12467
12668
  // true when the actual duration is longer than hlsjs's live sync point
@@ -12729,10 +12930,10 @@ class DashPlayback extends HTML5Video {
12729
12930
  }
12730
12931
  _onPlaybackError = (event) => {
12731
12932
  // TODO
12732
- trace(`${T$f} _onPlaybackError`, { event });
12933
+ trace(`${T$g} _onPlaybackError`, { event });
12733
12934
  };
12734
12935
  _onDASHJSSError = (event) => {
12735
- trace(`${T$f} _onDASHJSSError`, { event });
12936
+ trace(`${T$g} _onDASHJSSError`, { event });
12736
12937
  this._stopTimeUpdateTimer();
12737
12938
  // Note that the other error types are deprecated
12738
12939
  const e = event.error;
@@ -12767,12 +12968,11 @@ class DashPlayback extends HTML5Video {
12767
12968
  }
12768
12969
  };
12769
12970
  triggerError(error) {
12770
- trace(`${T$f} triggerError`, { error });
12771
- this.trigger(Events$1.PLAYBACK_ERROR, {
12772
- ...error,
12773
- origin: this.name,
12774
- scope: DashPlayback.type,
12775
- });
12971
+ trace(`${T$g} triggerError`, { error });
12972
+ // this triggers Events.ERROR to be handled by the UI
12973
+ this.trigger(Events$1.PLAYBACK_ERROR, this.createError(error, {
12974
+ useCodePrefix: false,
12975
+ }));
12776
12976
  // only reset the dash player in 10ms async, so that the rest of the
12777
12977
  // calling function finishes
12778
12978
  setTimeout(() => {
@@ -12807,7 +13007,7 @@ class DashPlayback extends HTML5Video {
12807
13007
  }
12808
13008
  get dvrEnabled() {
12809
13009
  if (!this._dash) {
12810
- trace(`${T$f} dvrEnable no dash player instance`);
13010
+ trace(`${T$g} dvrEnable no dash player instance`);
12811
13011
  return false;
12812
13012
  }
12813
13013
  return (this._dash?.getDVRWindowSize() >= this._minDvrSize &&
@@ -12829,7 +13029,7 @@ class DashPlayback extends HTML5Video {
12829
13029
  this.trigger(Events$1.PLAYBACK_PROGRESS, progress, {});
12830
13030
  }
12831
13031
  play() {
12832
- trace(`${T$f} play`, { dash: !!this._dash });
13032
+ trace(`${T$g} play`, { dash: !!this._dash });
12833
13033
  if (!this._dash) {
12834
13034
  this._setup();
12835
13035
  }
@@ -41570,15 +41770,15 @@ const CLAPPR_VERSION = '0.11.3';
41570
41770
 
41571
41771
  // Copyright 2014 Globo.com Player authors. All rights reserved.
41572
41772
  // Use of this source code is governed by a BSD-style
41573
- // license that can be found in the LICENSE file.
41574
- const { now} = Utils;
41773
+ // license that can be found on https://github.com/clappr/hlsjs-playback/blob/main/LICENSE
41774
+ const { now } = Utils;
41575
41775
  const AUTO$1 = -1;
41576
41776
  const DEFAULT_RECOVER_ATTEMPTS = 16;
41577
41777
  Events$1.register('PLAYBACK_FRAGMENT_CHANGED');
41578
41778
  Events$1.register('PLAYBACK_FRAGMENT_PARSING_METADATA');
41579
- const T$e = 'playback.hls';
41779
+ const T$f = 'playback.hls';
41580
41780
  // @ts-expect-error
41581
- class HlsPlayback extends HTML5Video {
41781
+ class HlsPlayback extends BasePlayback {
41582
41782
  _ccIsSetup = false;
41583
41783
  _ccTracksUpdated = false;
41584
41784
  _currentFragment = null;
@@ -41806,7 +42006,7 @@ class HlsPlayback extends HTML5Video {
41806
42006
  maxBufferLength: 2,
41807
42007
  maxMaxBufferLength: 4,
41808
42008
  }, this.options.playback.hlsjsConfig);
41809
- trace(`${T$e} _createHLSInstance`, { config });
42009
+ trace(`${T$f} _createHLSInstance`, { config });
41810
42010
  this._hls = new Hls(config);
41811
42011
  }
41812
42012
  _attachHLSMedia() {
@@ -41895,7 +42095,7 @@ class HlsPlayback extends HTML5Video {
41895
42095
  }
41896
42096
  else {
41897
42097
  Log.error('hlsjs: failed to recover', { evt, data });
41898
- trace(`${T$e} _recover failed to recover`, {
42098
+ trace(`${T$f} _recover failed to recover`, {
41899
42099
  type: data.type,
41900
42100
  details: data.details,
41901
42101
  });
@@ -41981,7 +42181,7 @@ class HlsPlayback extends HTML5Video {
41981
42181
  this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
41982
42182
  }
41983
42183
  _onHLSJSError(evt, data) {
41984
- trace(`${T$e} _onHLSJSError`, {
42184
+ trace(`${T$f} _onHLSJSError`, {
41985
42185
  fatal: data.fatal,
41986
42186
  type: data.type,
41987
42187
  details: data.details,
@@ -42029,7 +42229,7 @@ class HlsPlayback extends HTML5Video {
42029
42229
  evt,
42030
42230
  data,
42031
42231
  });
42032
- trace(`${T$e} _onHLSJSError trying to recover from network error`, {
42232
+ trace(`${T$f} _onHLSJSError trying to recover from network error`, {
42033
42233
  details: data.details,
42034
42234
  });
42035
42235
  error.level = PlayerError.Levels.WARN;
@@ -42042,7 +42242,7 @@ class HlsPlayback extends HTML5Video {
42042
42242
  evt,
42043
42243
  data,
42044
42244
  });
42045
- trace(`${T$e} _onHLSJSError trying to recover from media error`, {
42245
+ trace(`${T$f} _onHLSJSError trying to recover from media error`, {
42046
42246
  details: data.details,
42047
42247
  });
42048
42248
  error.level = PlayerError.Levels.WARN;
@@ -42072,7 +42272,7 @@ class HlsPlayback extends HTML5Video {
42072
42272
  return;
42073
42273
  }
42074
42274
  Log.warn('hlsjs: non-fatal error occurred', { evt, data });
42075
- trace(`${T$e} _onHLSJSError non-fatal error occurred`, {
42275
+ trace(`${T$f} _onHLSJSError non-fatal error occurred`, {
42076
42276
  type: data.type,
42077
42277
  details: data.details,
42078
42278
  });
@@ -42383,7 +42583,9 @@ class HlsPlayback extends HTML5Video {
42383
42583
  return this._playbackType === Playback.VOD || this.dvrEnabled;
42384
42584
  }
42385
42585
  triggerError(error) {
42386
- this.trigger(Events$1.PLAYBACK_ERROR, error);
42586
+ this.trigger(Events$1.PLAYBACK_ERROR, this.createError(error, {
42587
+ useCodePrefix: false,
42588
+ }));
42387
42589
  this.stop();
42388
42590
  }
42389
42591
  }
@@ -42400,7 +42602,7 @@ function registerPlaybacks() {
42400
42602
  Loader.registerPlayback(DashPlayback);
42401
42603
  }
42402
42604
 
42403
- const T$d = 'GPlayer';
42605
+ const T$e = 'GPlayer';
42404
42606
  const DEFAULT_OPTIONS = {
42405
42607
  autoPlay: false,
42406
42608
  debug: 'none',
@@ -42421,7 +42623,7 @@ const DEFAULT_OPTIONS = {
42421
42623
  */
42422
42624
  class Player {
42423
42625
  config = DEFAULT_OPTIONS;
42424
- emitter = new EventLite();
42626
+ emitter = new EventEmitter$1();
42425
42627
  player = null;
42426
42628
  ready = false;
42427
42629
  rootNode = null;
@@ -42495,7 +42697,7 @@ class Player {
42495
42697
  }
42496
42698
  const coreOpts = this.buildCoreOptions(playerElement);
42497
42699
  const { core, container } = Player.getRegisteredPlugins();
42498
- trace(`${T$d} init`, {
42700
+ trace(`${T$e} init`, {
42499
42701
  registeredPlaybacks: Loader.registeredPlaybacks.map((p) => p.name),
42500
42702
  });
42501
42703
  coreOpts.plugins = {
@@ -42509,7 +42711,7 @@ class Player {
42509
42711
  * Destroys the player, releasing all resources and unmounting its UI from the DOM.
42510
42712
  */
42511
42713
  destroy() {
42512
- trace(`${T$d} destroy`, {
42714
+ trace(`${T$e} destroy`, {
42513
42715
  player: !!this.player,
42514
42716
  });
42515
42717
  if (this.player) {
@@ -42691,7 +42893,7 @@ class Player {
42691
42893
  this.config = $.extend(true, this.config, config);
42692
42894
  }
42693
42895
  initPlayer(coreOptions) {
42694
- trace(`${T$d} initPlayer`, {
42896
+ trace(`${T$e} initPlayer`, {
42695
42897
  autoPlay: coreOptions.autoPlay,
42696
42898
  sources: coreOptions.sources,
42697
42899
  // TODO selected options
@@ -42716,7 +42918,7 @@ class Player {
42716
42918
  }
42717
42919
  }
42718
42920
  triggerAutoPlay() {
42719
- trace(`${T$d} triggerAutoPlay`);
42921
+ trace(`${T$e} triggerAutoPlay`);
42720
42922
  setTimeout(() => {
42721
42923
  this.player?.play({
42722
42924
  autoPlay: true,
@@ -42734,7 +42936,7 @@ class Player {
42734
42936
  // TODO test
42735
42937
  events = {
42736
42938
  onReady: () => {
42737
- trace(`${T$d} onReady`, {
42939
+ trace(`${T$e} onReady`, {
42738
42940
  ready: this.ready,
42739
42941
  });
42740
42942
  if (this.ready) {
@@ -42768,7 +42970,7 @@ class Player {
42768
42970
  buildCoreOptions(rootNode) {
42769
42971
  const sources = this.buildMediaSourcesList();
42770
42972
  const source = sources[0];
42771
- trace(`${T$d} buildCoreOptions`, {
42973
+ trace(`${T$e} buildCoreOptions`, {
42772
42974
  source,
42773
42975
  sources,
42774
42976
  });
@@ -42829,7 +43031,7 @@ class Player {
42829
43031
  assert.ok(this.player, 'Player is not initialized');
42830
43032
  const core = this.player.core;
42831
43033
  core.on(Events$1.CORE_SCREEN_ORIENTATION_CHANGED, ({ orientation }) => {
42832
- trace(`${T$d} on CORE_SCREEN_ORIENTATION_CHANGED`, {
43034
+ trace(`${T$e} on CORE_SCREEN_ORIENTATION_CHANGED`, {
42833
43035
  orientation,
42834
43036
  rootNode: {
42835
43037
  width: this.rootNode?.clientWidth,
@@ -42844,14 +43046,14 @@ class Player {
42844
43046
  }
42845
43047
  }, null);
42846
43048
  core.on(Events$1.CORE_RESIZE, ({ width, height }) => {
42847
- trace(`${T$d} on CORE_RESIZE`, {
43049
+ trace(`${T$e} on CORE_RESIZE`, {
42848
43050
  width,
42849
43051
  height,
42850
43052
  });
42851
43053
  this.safeTriggerEvent(PlayerEvent.Resize, { width, height });
42852
43054
  }, null);
42853
43055
  core.on(Events$1.CORE_FULLSCREEN, (isFullscreen) => {
42854
- trace(`${T$d} CORE_FULLSCREEN`, {
43056
+ trace(`${T$e} CORE_FULLSCREEN`, {
42855
43057
  isFullscreen,
42856
43058
  });
42857
43059
  this.safeTriggerEvent(PlayerEvent.Fullscreen, isFullscreen);
@@ -42859,7 +43061,7 @@ class Player {
42859
43061
  }
42860
43062
  }
42861
43063
 
42862
- var version$1 = "2.20.4";
43064
+ var version$1 = "2.20.6";
42863
43065
 
42864
43066
  var packages = {
42865
43067
  "node_modules/@clappr/core": {
@@ -43192,7 +43394,7 @@ const volumeOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fil
43192
43394
 
43193
43395
  const pluginHtml$7 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon></div>\n</div>\n";
43194
43396
 
43195
- const T$c = 'plugins.big_mute_button';
43397
+ const T$d = 'plugins.big_mute_button';
43196
43398
  // TODO rewrite as a container plugin
43197
43399
  /**
43198
43400
  * Displays a big mute button over the video when it's muted.
@@ -43234,7 +43436,7 @@ class BigMuteButton extends UICorePlugin {
43234
43436
  this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
43235
43437
  this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
43236
43438
  this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
43237
- trace(`${T$c} bindEvents`, {
43439
+ trace(`${T$d} bindEvents`, {
43238
43440
  mediacontrol: !!this.core.mediaControl,
43239
43441
  });
43240
43442
  this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_RENDERED, this.mediaControlRendered);
@@ -43259,12 +43461,12 @@ class BigMuteButton extends UICorePlugin {
43259
43461
  }
43260
43462
  mediaControlRendered() {
43261
43463
  const container = this.core.activeContainer;
43262
- trace(`${T$c} mediaControlRendered`, {
43464
+ trace(`${T$d} mediaControlRendered`, {
43263
43465
  container: !!container,
43264
43466
  });
43265
43467
  if (container) {
43266
43468
  this.listenTo(container.playback, Events$1.PLAYBACK_PLAY, () => {
43267
- trace(`${T$c} PLAYBACK_PLAY`);
43469
+ trace(`${T$d} PLAYBACK_PLAY`);
43268
43470
  this.render();
43269
43471
  });
43270
43472
  }
@@ -43288,7 +43490,7 @@ class BigMuteButton extends UICorePlugin {
43288
43490
  }
43289
43491
  const { autoPlay, wasMuted } = this.options;
43290
43492
  const volume = container.volume;
43291
- trace(`${T$c} shouldRender`, {
43493
+ trace(`${T$d} shouldRender`, {
43292
43494
  autoPlay,
43293
43495
  wasMuted,
43294
43496
  volume,
@@ -43300,7 +43502,7 @@ class BigMuteButton extends UICorePlugin {
43300
43502
  */
43301
43503
  render() {
43302
43504
  if (this.shouldRender()) {
43303
- trace(`${T$c} render`, {
43505
+ trace(`${T$d} render`, {
43304
43506
  el: !!this.$el,
43305
43507
  });
43306
43508
  this.$el.html(BigMuteButton.template());
@@ -43346,7 +43548,7 @@ const gearIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"n
43346
43548
  const gearHdIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_28_1567)\">\n <path\n d=\"M19.14 12.94C19.18 12.64 19.2 12.33 19.2 12C19.2 11.68 19.18 11.36 19.13 11.06L21.16 9.47999C21.34 9.33999 21.39 9.06999 21.28 8.86999L19.36 5.54999C19.24 5.32999 18.99 5.25999 18.77 5.32999L16.38 6.28999C15.88 5.90999 15.35 5.58999 14.76 5.34999L14.4 2.80999C14.36 2.56999 14.16 2.39999 13.92 2.39999H10.08C9.83999 2.39999 9.64999 2.56999 9.60999 2.80999L9.24999 5.34999C8.65999 5.58999 8.11999 5.91999 7.62999 6.28999L5.23999 5.32999C5.01999 5.24999 4.76999 5.32999 4.64999 5.54999L2.73999 8.86999C2.61999 9.07999 2.65999 9.33999 2.85999 9.47999L4.88999 11.06C4.83999 11.36 4.79999 11.69 4.79999 12C4.79999 12.31 4.81999 12.64 4.86999 12.94L2.83999 14.52C2.65999 14.66 2.60999 14.93 2.71999 15.13L4.63999 18.45C4.75999 18.67 5.00999 18.74 5.22999 18.67L7.61999 17.71C8.11999 18.09 8.64999 18.41 9.23999 18.65L9.59999 21.19C9.64999 21.43 9.83999 21.6 10.08 21.6H13.92C14.16 21.6 14.36 21.43 14.39 21.19L14.75 18.65C15.34 18.41 15.88 18.09 16.37 17.71L18.76 18.67C18.98 18.75 19.23 18.67 19.35 18.45L21.27 15.13C21.39 14.91 21.34 14.66 21.15 14.52L19.14 12.94ZM12 15.6C10.02 15.6 8.39999 13.98 8.39999 12C8.39999 10.02 10.02 8.39999 12 8.39999C13.98 8.39999 15.6 10.02 15.6 12C15.6 13.98 13.98 15.6 12 15.6Z\"\n fill=\"#C9C9C9\"/>\n <rect x=\"13\" width=\"11\" height=\"7\" rx=\"1\" fill=\"#F6413B\"/>\n <path\n d=\"M14.6962 6V1.63636H15.3546V3.53267H17.53V1.63636H18.1905V6H17.53V4.0973H15.3546V6H14.6962ZM20.562 6H19.1493V1.63636H20.6067C21.0343 1.63636 21.4015 1.72372 21.7083 1.89844C22.0151 2.07173 22.2502 2.32102 22.4135 2.64631C22.5783 2.97017 22.6607 3.35866 22.6607 3.81179C22.6607 4.26634 22.5776 4.65696 22.4114 4.98366C22.2466 5.31037 22.008 5.56179 21.6955 5.73793C21.383 5.91264 21.0051 6 20.562 6ZM19.8077 5.42472H20.5257C20.8581 5.42472 21.1344 5.36222 21.3546 5.23722C21.5748 5.1108 21.7395 4.92827 21.8489 4.68963C21.9583 4.44957 22.013 4.15696 22.013 3.81179C22.013 3.46946 21.9583 3.17898 21.8489 2.94034C21.7409 2.7017 21.5797 2.5206 21.3652 2.39702C21.1507 2.27344 20.8844 2.21165 20.5662 2.21165H19.8077V5.42472Z\"\n fill=\"#C9C9C9\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_28_1567\">\n <rect width=\"24\" height=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n</svg>\n";
43347
43549
 
43348
43550
  const VERSION$5 = '2.19.12';
43349
- const T$b = 'plugins.bottom_gear';
43551
+ const T$c = 'plugins.bottom_gear';
43350
43552
  /**
43351
43553
  * Custom events emitted by the plugin
43352
43554
  * @beta
@@ -43432,11 +43634,11 @@ class BottomGear extends UICorePlugin {
43432
43634
  this.$el.find('.gear-wrapper').html(content);
43433
43635
  }
43434
43636
  onActiveContainerChanged() {
43435
- trace(`${T$b} onActiveContainerChanged`);
43637
+ trace(`${T$c} onActiveContainerChanged`);
43436
43638
  this.bindContainerEvents();
43437
43639
  }
43438
43640
  bindContainerEvents() {
43439
- trace(`${T$b} bindContainerEvents`);
43641
+ trace(`${T$c} bindContainerEvents`);
43440
43642
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);
43441
43643
  }
43442
43644
  highDefinitionUpdate(isHd) {
@@ -46238,7 +46440,7 @@ class ClapprStats extends ContainerPlugin {
46238
46440
  //Copyright 2014 Globo.com Player authors. All rights reserved.
46239
46441
  // Use of this source code is governed by a BSD-style
46240
46442
  // license that can be found at https://github.com/clappr/clappr-plugins/blob/master/LICENSE.
46241
- const T$a = 'plugins.click_to_pause_custom';
46443
+ const T$b = 'plugins.click_to_pause_custom';
46242
46444
  /**
46243
46445
  * Adds a behavior of toggling the playback state on click over the container
46244
46446
  * @beta
@@ -46268,7 +46470,7 @@ class ClickToPause extends ContainerPlugin {
46268
46470
  click() {
46269
46471
  const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
46270
46472
  const isDvrEnabled = this.container.isDvrEnabled();
46271
- trace(`${T$a} click`, {
46473
+ trace(`${T$b} click`, {
46272
46474
  isLivePlayback,
46273
46475
  isDvrEnabled,
46274
46476
  });
@@ -46286,7 +46488,7 @@ class ClickToPause extends ContainerPlugin {
46286
46488
  settingsUpdate() {
46287
46489
  const isLivePlayback = this.container.getPlaybackType() === Playback.LIVE;
46288
46490
  const pointerEnabled = !isLivePlayback || this.container.isDvrEnabled();
46289
- trace(`${T$a} settingsUpdate`, {
46491
+ trace(`${T$b} settingsUpdate`, {
46290
46492
  isLivePlayback,
46291
46493
  pointerEnabled,
46292
46494
  });
@@ -46591,7 +46793,7 @@ class ContextMenu extends UIContainerPlugin {
46591
46793
  this._url = this.options.contextMenu.url;
46592
46794
  }
46593
46795
  this.render();
46594
- this.bindEvents();
46796
+ $('body').on('click', this.hideOnBodyClick);
46595
46797
  }
46596
46798
  /**
46597
46799
  * @internal
@@ -46599,7 +46801,6 @@ class ContextMenu extends UIContainerPlugin {
46599
46801
  bindEvents() {
46600
46802
  this.listenTo(this.container, Events$1.CONTAINER_CONTEXTMENU, this.toggleContextMenu);
46601
46803
  this.listenTo(this.container, Events$1.CONTAINER_CLICK, this.hide);
46602
- $('body').on('click', this.hideOnBodyClick);
46603
46804
  }
46604
46805
  /**
46605
46806
  * @internal
@@ -46768,183 +46969,116 @@ class DvrControls extends UICorePlugin {
46768
46969
 
46769
46970
  const reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n</svg>";
46770
46971
 
46771
- const templateHtml = "<div class=\"player-error-screen__content\" data-error-screen>\n <% if (icon) { %>\n <div class=\"player-error-screen__icon\" data-error-screen><%= icon %></div>\n <% } %>\n <div class=\"player-error-screen__title\" data-error-screen><%= title %></div>\n <% if (message) { %>\n <div class=\"player-error-screen__message\" data-error-screen><%= message %></div>\n <% } %>\n <% if (code) { %>\n <div class=\"player-error-screen__code\" data-error-screen>Error code: <%= code %></div>\n <% } %>\n <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n</div>\n";
46972
+ const templateHtml = "<div class=\"player-error-screen__content\" data-error-screen>\n <% if (icon) { %>\n <div class=\"player-error-screen__icon\" data-error-screen><%= icon %></div>\n <% } %>\n <div class=\"player-error-screen__title\" data-error-screen><%= title %></div>\n <% if (message) { %>\n <div class=\"player-error-screen__message\" data-error-screen><%= message %></div>\n <% } %>\n <% if (code) { %>\n <div class=\"player-error-screen__code\" data-error-screen>Error code: <%= code %></div>\n <% } %>\n <% if (reloadIcon) { %>\n <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n <% } %>\n</div>\n";
46772
46973
 
46773
- const TIME_FOR_UPDATE = 10000;
46774
- const MAX_RETRY = 10;
46775
- const T$9 = 'plugins.error_screen';
46974
+ const T$a = 'plugins.error_screen';
46776
46975
  /**
46777
- * Displays a descriptive error in the overlay on top of the player.
46976
+ * Displays an error nicely in the overlay on top of the player.
46778
46977
  * @beta
46779
46978
  */
46780
46979
  class ErrorScreen extends UICorePlugin {
46781
- _retry = 0;
46782
46980
  err = null;
46783
- hideValue = false;
46784
- timeout = null;
46785
- reloadButton = null;
46981
+ /**
46982
+ * @internal
46983
+ */
46786
46984
  get name() {
46787
- return 'error_gplayer';
46985
+ return 'error_screen';
46788
46986
  }
46987
+ /**
46988
+ * @internal
46989
+ */
46789
46990
  get supportedVersion() {
46790
46991
  return { min: CLAPPR_VERSION };
46791
46992
  }
46792
- get template() {
46793
- return tmpl(templateHtml);
46794
- }
46795
- get container() {
46796
- return this.core.activeContainer;
46797
- }
46993
+ static template = tmpl(templateHtml);
46994
+ /**
46995
+ * @internal
46996
+ */
46798
46997
  get attributes() {
46799
46998
  return {
46800
- 'class': 'player-error-screen',
46999
+ class: 'player-error-screen',
46801
47000
  'data-error-screen': '',
46802
47001
  };
46803
47002
  }
47003
+ /**
47004
+ * @internal
47005
+ */
46804
47006
  bindEvents() {
46805
47007
  this.listenTo(this.core, Events$1.ERROR, this.onError);
46806
- this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
46807
- this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
46808
- this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
46809
- this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);
46810
- }
46811
- onCoreReady() {
46812
- trace(`${T$9} onCoreReady`);
46813
- if (this.core.activePlayback) {
46814
- this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
46815
- }
47008
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
46816
47009
  }
46817
47010
  onPlay() {
46818
- trace(`${T$9} onPlay`);
46819
- this.destroyError();
47011
+ trace(`${T$a} onPlay`);
47012
+ this.unmount();
46820
47013
  }
46821
- destroyError() {
46822
- trace(`${T$9} destroyError`);
46823
- this._retry = 0;
47014
+ unmount() {
47015
+ trace(`${T$a} unmount`);
46824
47016
  this.err = null;
46825
- if (this.timeout !== null) {
46826
- clearTimeout(this.timeout);
46827
- this.timeout = null;
46828
- }
46829
- this.$el.hide();
46830
- }
46831
- unBindEvents() {
46832
- // @ts-ignore
46833
- this.stopListening(this.core, 'core:advertisement:start');
46834
- // @ts-ignore
46835
- this.stopListening(this.core, 'core:advertisement:finish');
46836
- // @ts-ignore
46837
- this.stopListening(this.core, Events$1.ERROR);
47017
+ this.$el.remove();
46838
47018
  }
46839
- bindReload() {
46840
- this.reloadButton = this.$el.find('.player-error-screen__reload');
46841
- this.reloadButton && this.reloadButton.on('click', this.reload.bind(this));
47019
+ /**
47020
+ * @internal
47021
+ */
47022
+ get events() {
47023
+ return {
47024
+ 'click .player-error-screen__reload': 'reload',
47025
+ };
46842
47026
  }
46843
47027
  reload() {
46844
- this._retry++;
46845
- this.core.configure({
46846
- ...this.options,
46847
- autoPlay: true
46848
- });
46849
- this.core.activeContainer.mediaControlDisabled = false;
46850
- this.unbindReload();
46851
- }
46852
- unbindReload() {
46853
- this.reloadButton && this.reloadButton.off('click');
47028
+ setTimeout(() => {
47029
+ this.core.configure({
47030
+ reloading: true,
47031
+ source: this.core.options.source,
47032
+ sources: this.core.options.sources,
47033
+ });
47034
+ }, 0);
46854
47035
  }
46855
- onContainerChanged() {
47036
+ onActiveContainerChanged() {
47037
+ trace(`${T$a} onActiveContainerChanged`, {
47038
+ reloading: this.core.options.reloading,
47039
+ });
46856
47040
  this.err = null;
46857
- if (this.core.getPlugin('error_screen')) {
46858
- this.core.getPlugin('error_screen').disable();
46859
- }
46860
- this.unbindReload();
46861
- this.hide();
46862
- }
46863
- onStartAd() {
46864
- this.hideValue = true;
46865
- if (this.err) {
46866
- this.hide();
46867
- }
46868
- }
46869
- onFinishAd() {
46870
- this.hideValue = false;
46871
- if (this.err) {
46872
- this.container.disableMediaControl();
46873
- this.container.stop();
46874
- this.show();
47041
+ this.listenTo(this.core.activeContainer.playback, Events$1.PLAYBACK_PLAY, this.onPlay);
47042
+ if (this.core.options.reloading) {
47043
+ setTimeout(() => {
47044
+ this.core.options.reloading = false;
47045
+ this.unmount();
47046
+ this.core.activeContainer.play({
47047
+ reloading: true,
47048
+ });
47049
+ }, 0);
46875
47050
  }
46876
47051
  }
46877
47052
  onError(err) {
46878
- trace(`${T$9} onError`, { err });
46879
- if (err.level === PlayerError.Levels.FATAL ||
46880
- err.details === 'bufferStalledError' ||
46881
- err.details === 'manifestParsingError') {
47053
+ trace(`${T$a} onError`, { err });
47054
+ if (err.UI) {
47055
+ if (this.err) {
47056
+ this.unmount();
47057
+ }
46882
47058
  this.err = {
46883
- title: this.core.i18n.t('no_broadcast'),
46884
- message: '',
46885
- code: '',
46886
- // icon: (this.err.UI && this.err.UI.icon) || '',
46887
- icon: '',
46888
- reloadIcon,
47059
+ title: err.UI.title,
47060
+ message: err.UI.message,
47061
+ code: err.code,
47062
+ icon: err.UI.icon,
46889
47063
  };
46890
- if (this.options.errorScreen?.reloadOnError === false) {
46891
- return;
46892
- }
46893
- if (this.options.errorScreen?.neverStopToRetry) {
46894
- this._retry = 0;
46895
- }
46896
- if (this._retry >= MAX_RETRY) {
46897
- this.drying();
46898
- return;
46899
- }
46900
- const ctp = this.container.getPlugin('click_to_pause_custom');
46901
- const toggleCTP = !!ctp?.enabled;
46902
- if (toggleCTP) {
46903
- // clickToPausePlugin.afterEnabled = true;
46904
- ctp.disable();
46905
- }
46906
- this.timeout = setTimeout(() => {
46907
- if (toggleCTP) {
46908
- ctp.enable();
46909
- }
46910
- this.reload();
46911
- }, TIME_FOR_UPDATE);
46912
- const spinnerPlugin = this.container.getPlugin('spinner');
46913
- if (spinnerPlugin) {
46914
- spinnerPlugin.show(); // TODO remove?
46915
- setTimeout(() => spinnerPlugin.show(), 0);
46916
- }
46917
- }
46918
- }
46919
- drying() {
46920
- const spinnerPlugin = this.container.getPlugin('spinner');
46921
- spinnerPlugin?.hide();
46922
- this._retry = 0;
46923
- if (!this.hideValue) {
46924
- this.container.disableMediaControl();
46925
- this.container.stop();
46926
- this.show();
46927
- }
46928
- }
46929
- show(err) {
46930
- if (err) {
46931
- this.err = err;
47064
+ this.render();
46932
47065
  }
46933
- // TODO use container.disableMediaControl() instead
46934
- this.core.mediaControl.disable();
46935
- this.render();
46936
- this.$el.show();
46937
- }
46938
- hide() {
46939
- this.$el.hide();
46940
47066
  }
47067
+ /**
47068
+ * @internal
47069
+ */
46941
47070
  render() {
46942
47071
  if (!this.err) {
46943
47072
  return this;
46944
47073
  }
46945
- this.$el.html(this.template(this.err));
46946
- this.core.$el.append(this.el);
46947
- this.bindReload();
47074
+ this.$el.html(ErrorScreen.template({
47075
+ ...this.err,
47076
+ reloadIcon: this.options.errorScreen?.noReload ? null : reloadIcon,
47077
+ }));
47078
+ // TODO append to container instead of core?
47079
+ if (!this.el.parentElement) {
47080
+ this.core.$el.append(this.el);
47081
+ }
46948
47082
  return this;
46949
47083
  }
46950
47084
  }
@@ -47388,7 +47522,7 @@ const arrowLeftIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fil
47388
47522
 
47389
47523
  const checkIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M20.5793 4.19296C20.1216 3.86696 19.4777 3.96396 19.1424 4.40896L9.37295 17.3809L4.81634 12.107C4.45222 11.683 3.80218 11.6289 3.36709 11.9839C2.932 12.3389 2.87543 12.97 3.2416 13.393L8.64165 19.643C8.83708 19.869 9.12506 20 9.42849 20C9.4398 20 9.45114 20 9.46246 19.999C9.77926 19.989 10.0724 19.838 10.2586 19.59L20.8015 5.58996C21.1368 5.14496 21.0371 4.51896 20.5793 4.19296Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
47390
47524
 
47391
- const T$8 = 'plugins.level_selector';
47525
+ const T$9 = 'plugins.level_selector';
47392
47526
  const VERSION$4 = '2.19.4';
47393
47527
  /**
47394
47528
  * A {@link MediaControl | media control} plugin that provides a UI to control the quality level of the playback.
@@ -47490,10 +47624,10 @@ class LevelSelector extends UICorePlugin {
47490
47624
  }
47491
47625
  }
47492
47626
  onStop() {
47493
- trace(`${T$8} onStop`);
47627
+ trace(`${T$9} onStop`);
47494
47628
  const currentPlayback = this.core.activePlayback;
47495
47629
  this.listenToOnce(currentPlayback, Events$1.PLAYBACK_PLAY, () => {
47496
- trace(`${T$8} on PLAYBACK_PLAY after stop`, { selectedLevelId: this.selectedLevelId });
47630
+ trace(`${T$9} on PLAYBACK_PLAY after stop`, { selectedLevelId: this.selectedLevelId });
47497
47631
  if (currentPlayback.getPlaybackType() === 'live') {
47498
47632
  if (this.selectedLevelId !== -1) {
47499
47633
  currentPlayback.currentLevel = this.selectedLevelId;
@@ -47589,13 +47723,13 @@ class LevelSelector extends UICorePlugin {
47589
47723
  return false;
47590
47724
  }
47591
47725
  goBack() {
47592
- trace(`${T$8} goBack`);
47726
+ trace(`${T$9} goBack`);
47593
47727
  this.isOpen = false;
47594
47728
  this.core.trigger('gear:refresh');
47595
47729
  this.deferRender();
47596
47730
  }
47597
47731
  setLevel(index) {
47598
- trace(`${T$8} setIndexLevel`, { index });
47732
+ trace(`${T$9} setIndexLevel`, { index });
47599
47733
  this.selectedLevelId = index;
47600
47734
  if (!this.core.activePlayback) {
47601
47735
  return;
@@ -47613,7 +47747,7 @@ class LevelSelector extends UICorePlugin {
47613
47747
  this.deferRender();
47614
47748
  }
47615
47749
  onShowLevelSelectMenu() {
47616
- trace(`${T$8} onShowLevelSelectMenu`);
47750
+ trace(`${T$9} onShowLevelSelectMenu`);
47617
47751
  this.isOpen = true;
47618
47752
  this.renderDropdown();
47619
47753
  this.highlightCurrentLevel();
@@ -47649,11 +47783,11 @@ class LevelSelector extends UICorePlugin {
47649
47783
  return this.levelLabels[index] ?? formatLevelLabel(this.levels[index]);
47650
47784
  }
47651
47785
  updateCurrentLevel(info) {
47652
- trace(`${T$8} updateCurrentLevel`, { info });
47786
+ trace(`${T$9} updateCurrentLevel`, { info });
47653
47787
  this.highlightCurrentLevel();
47654
47788
  }
47655
47789
  highlightCurrentLevel() {
47656
- trace(`${T$8} highlightCurrentLevel`, {
47790
+ trace(`${T$9} highlightCurrentLevel`, {
47657
47791
  selectedLevelId: this.selectedLevelId,
47658
47792
  });
47659
47793
  this.allLevelElements().removeClass('current');
@@ -47905,6 +48039,7 @@ const fullscreenOnIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
47905
48039
  // Copyright 2014 Globo.com Player authors. All rights reserved.
47906
48040
  // Use of this source code is governed by a BSD-style
47907
48041
  // license that can be found in the LICENSE file.
48042
+ const T$8 = 'plugins.media_control';
47908
48043
  const LEFT_ORDER = [
47909
48044
  'playpause',
47910
48045
  'playstop',
@@ -48149,10 +48284,11 @@ class MediaControl extends UICorePlugin {
48149
48284
  }
48150
48285
  }
48151
48286
  /**
48152
- * Disables the plugin and unmounts its UI
48287
+ * Hides the media control UI
48153
48288
  */
48154
48289
  disable() {
48155
- this.userDisabled = true;
48290
+ trace(`${T$8} disable`);
48291
+ this.userDisabled = true; // TODO distinguish between user and system (e.g., unplayable) disabled?
48156
48292
  this.hide();
48157
48293
  this.unbindKeyEvents();
48158
48294
  this.$el.hide();
@@ -48161,6 +48297,7 @@ class MediaControl extends UICorePlugin {
48161
48297
  * Reenables the plugin disabled earlier with the {@link MediaControl.disable} method
48162
48298
  */
48163
48299
  enable() {
48300
+ trace(`${T$8} enable`);
48164
48301
  if (this.options.chromeless) {
48165
48302
  return;
48166
48303
  }
@@ -48418,8 +48555,14 @@ class MediaControl extends UICorePlugin {
48418
48555
  this.settingsUpdate();
48419
48556
  this.core.activeContainer &&
48420
48557
  this.core.activeContainer.trigger(Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.core.activeContainer.isDvrInUse());
48421
- this.core.activeContainer && this.core.activeContainer.mediaControlDisabled && this.disable();
48422
- this.trigger(Events$1.MEDIACONTROL_CONTAINERCHANGED);
48558
+ // TODO test
48559
+ if (this.core.activeContainer.mediaControlDisabled) {
48560
+ this.disable();
48561
+ }
48562
+ else {
48563
+ this.enable();
48564
+ }
48565
+ this.trigger(Events$1.MEDIACONTROL_CONTAINERCHANGED); // TODO check
48423
48566
  if (this.core.activeContainer.$el) {
48424
48567
  this.core.activeContainer.$el.addClass('container-skin-1');
48425
48568
  }
@@ -48838,13 +48981,13 @@ class MediaControl extends UICorePlugin {
48838
48981
  destroy() {
48839
48982
  $(document).unbind('mouseup', this.stopDrag);
48840
48983
  $(document).unbind('mousemove', this.updateDrag);
48984
+ $(document).unbind('touchend', this.stopDrag);
48985
+ $(document).unbind('touchmove', this.updateDrag);
48841
48986
  this.unbindKeyEvents();
48842
- // @ts-ignore
48843
- this.stopListening();
48844
48987
  return super.destroy();
48845
48988
  }
48846
48989
  configure() {
48847
- this.advertisementPlaying ? this.disable() : this.enable();
48990
+ // this.advertisementPlaying ? this.disable() : this.enable()
48848
48991
  this.trigger(Events$1.MEDIACONTROL_OPTIONS_CHANGE);
48849
48992
  }
48850
48993
  /**
@@ -49240,13 +49383,12 @@ class MultiCamera extends UICorePlugin {
49240
49383
  catch (error) {
49241
49384
  reportError(error);
49242
49385
  }
49243
- // TODO figure out
49244
- this.core.getPlugin('error_gplayer')?.show({
49386
+ // TODO trigger error instead
49387
+ this.core.getPlugin('error_screen')?.show({
49245
49388
  title: this.core.i18n.t('source_offline'),
49246
49389
  message: '',
49247
49390
  code: '',
49248
49391
  icon: '',
49249
- reloadIcon: '',
49250
49392
  });
49251
49393
  }
49252
49394
  hideError() {
@@ -49716,7 +49858,7 @@ class Poster extends UIContainerPlugin {
49716
49858
  }
49717
49859
  static template = tmpl(posterHTML);
49718
49860
  get shouldRender() {
49719
- if (!this.enabled) {
49861
+ if (!this.enabled || this.options.reloading) {
49720
49862
  return false;
49721
49863
  }
49722
49864
  const showForNoOp = !!this.options.poster?.showForNoOp;
@@ -50357,6 +50499,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
50357
50499
  'class': 'spinner-three-bounce'
50358
50500
  };
50359
50501
  }
50502
+ hideTimeout = null;
50360
50503
  showTimeout = null;
50361
50504
  template = tmpl(spinnerHTML);
50362
50505
  hasFatalError = false;
@@ -50412,8 +50555,18 @@ class SpinnerThreeBounce extends UIContainerPlugin {
50412
50555
  /**
50413
50556
  * Shows the spinner
50414
50557
  */
50415
- show() {
50416
- this.showTimeout = setTimeout(() => this.$el.show(), 300);
50558
+ show(delay = 300) {
50559
+ trace(`${T$4} show`);
50560
+ if (this.showTimeout === null) {
50561
+ if (this.hideTimeout !== null) {
50562
+ clearTimeout(this.hideTimeout);
50563
+ this.hideTimeout = null;
50564
+ }
50565
+ this.showTimeout = setTimeout(() => {
50566
+ this.showTimeout = null;
50567
+ this.$el.show();
50568
+ }, delay);
50569
+ }
50417
50570
  }
50418
50571
  /**
50419
50572
  * Hides the spinner
@@ -50423,7 +50576,12 @@ class SpinnerThreeBounce extends UIContainerPlugin {
50423
50576
  clearTimeout(this.showTimeout);
50424
50577
  this.showTimeout = null;
50425
50578
  }
50426
- this.$el.hide();
50579
+ this.hideTimeout = setTimeout(() => {
50580
+ this.hideTimeout = null;
50581
+ if (this.showTimeout === null) {
50582
+ this.$el.hide();
50583
+ }
50584
+ }, 0);
50427
50585
  }
50428
50586
  /**
50429
50587
  * @internal
@@ -50546,10 +50704,15 @@ class SourceController extends CorePlugin {
50546
50704
  */
50547
50705
  bindEvents() {
50548
50706
  super.bindEvents();
50549
- this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, () => this.onReady());
50707
+ this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
50708
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
50550
50709
  }
50551
- onReady() {
50552
- trace(`${T$3} onReady`, {
50710
+ onCoreReady() {
50711
+ trace(`${T$3} onCoreReady`);
50712
+ this.core.getPlugin('error_screen')?.disable(); // TODO test
50713
+ }
50714
+ onActiveContainerChanged() {
50715
+ trace(`${T$3} onActiveContainerChanged`, {
50553
50716
  retrying: this.active,
50554
50717
  currentSource: this.sourcesList[this.currentSourceIndex],
50555
50718
  });
@@ -50565,7 +50728,7 @@ class SourceController extends CorePlugin {
50565
50728
  this.bindContainerEventListeners();
50566
50729
  if (this.active) {
50567
50730
  this.core.activeContainer?.getPlugin('poster_custom')?.disable();
50568
- spinner?.show();
50731
+ spinner?.show(0);
50569
50732
  }
50570
50733
  }
50571
50734
  bindContainerEventListeners() {
@@ -50582,7 +50745,7 @@ class SourceController extends CorePlugin {
50582
50745
  switch (error.code) {
50583
50746
  case PlaybackErrorCode.MediaSourceUnavailable:
50584
50747
  this.core.activeContainer?.getPlugin('poster_custom')?.disable();
50585
- this.retryPlayback();
50748
+ setTimeout(() => this.retryPlayback(), 0);
50586
50749
  break;
50587
50750
  }
50588
50751
  });
@@ -50609,6 +50772,7 @@ class SourceController extends CorePlugin {
50609
50772
  currentSource: this.sourcesList[this.currentSourceIndex],
50610
50773
  });
50611
50774
  this.active = true;
50775
+ this.core.activeContainer?.getPlugin('spinner')?.show(0);
50612
50776
  this.getNextMediaSource().then((nextSource) => {
50613
50777
  trace(`${T$3} retryPlayback syncing...`, {
50614
50778
  nextSource,