@clappr/player 0.11.8 → 0.11.11
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/clappr.js +500 -239
- package/dist/clappr.js.map +1 -1
- package/dist/clappr.min.js +1 -1
- package/dist/clappr.min.js.map +1 -1
- package/dist/clappr.plainhtml5.js +463 -228
- package/dist/clappr.plainhtml5.js.map +1 -1
- package/dist/clappr.plainhtml5.min.js +1 -1
- package/dist/clappr.plainhtml5.min.js.map +1 -1
- package/package.json +5 -5
- package/src/base_bundle.js +3 -4
- package/src/main.js +1 -1
package/dist/clappr.js
CHANGED
|
@@ -2208,9 +2208,7 @@
|
|
|
2208
2208
|
// Skip over if undefined or null
|
|
2209
2209
|
for (var nextKey in nextSource) {
|
|
2210
2210
|
// Avoid bugs when hasOwnProperty is shadowed
|
|
2211
|
-
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey))
|
|
2212
|
-
to[nextKey] = nextSource[nextKey];
|
|
2213
|
-
}
|
|
2211
|
+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) to[nextKey] = nextSource[nextKey];
|
|
2214
2212
|
}
|
|
2215
2213
|
}
|
|
2216
2214
|
}
|
|
@@ -2226,18 +2224,14 @@
|
|
|
2226
2224
|
Object.defineProperty(Array.prototype, 'findIndex', {
|
|
2227
2225
|
value: function value(predicate) {
|
|
2228
2226
|
// 1. Let O be ? ToObject(this value).
|
|
2229
|
-
if (this == null)
|
|
2230
|
-
throw new TypeError('"this" is null or not defined');
|
|
2231
|
-
}
|
|
2227
|
+
if (this == null) throw new TypeError('"this" is null or not defined');
|
|
2232
2228
|
var o = Object(this);
|
|
2233
2229
|
|
|
2234
2230
|
// 2. Let len be ? ToLength(? Get(O, "length")).
|
|
2235
2231
|
var len = o.length >>> 0;
|
|
2236
2232
|
|
|
2237
2233
|
// 3. If IsCallable(predicate) is false, throw a TypeError exception.
|
|
2238
|
-
if (typeof predicate !== 'function')
|
|
2239
|
-
throw new TypeError('predicate must be a function');
|
|
2240
|
-
}
|
|
2234
|
+
if (typeof predicate !== 'function') throw new TypeError('predicate must be a function');
|
|
2241
2235
|
|
|
2242
2236
|
// 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
|
2243
2237
|
var thisArg = arguments[1];
|
|
@@ -2252,9 +2246,8 @@
|
|
|
2252
2246
|
// c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
|
|
2253
2247
|
// d. If testResult is true, return k.
|
|
2254
2248
|
var kValue = o[k];
|
|
2255
|
-
if (predicate.call(thisArg, kValue, k, o))
|
|
2256
|
-
|
|
2257
|
-
}
|
|
2249
|
+
if (predicate.call(thisArg, kValue, k, o)) return k;
|
|
2250
|
+
|
|
2258
2251
|
// e. Increase k by 1.
|
|
2259
2252
|
k++;
|
|
2260
2253
|
}
|
|
@@ -2532,8 +2525,8 @@
|
|
|
2532
2525
|
}
|
|
2533
2526
|
};
|
|
2534
2527
|
var getBrowserInfo = function getBrowserInfo(ua) {
|
|
2535
|
-
var parts = ua.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []
|
|
2536
|
-
|
|
2528
|
+
var parts = ua.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
2529
|
+
var extra;
|
|
2537
2530
|
if (/trident/i.test(parts[1])) {
|
|
2538
2531
|
extra = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
2539
2532
|
return {
|
|
@@ -2583,7 +2576,9 @@
|
|
|
2583
2576
|
if (browser.versionIdentifier) {
|
|
2584
2577
|
var versionRegExp = new RegExp(browser.versionIdentifier.toLowerCase());
|
|
2585
2578
|
var versionRegExpResult = versionRegExp.exec(userAgent);
|
|
2586
|
-
if (versionRegExpResult != null && versionRegExpResult[1])
|
|
2579
|
+
if (versionRegExpResult != null && versionRegExpResult[1]) {
|
|
2580
|
+
setBrowserVersion(versionRegExpResult[1], browserObject);
|
|
2581
|
+
}
|
|
2587
2582
|
} else {
|
|
2588
2583
|
setBrowserVersion(browserRegExpResult[1], browserObject);
|
|
2589
2584
|
}
|
|
@@ -2639,7 +2634,9 @@
|
|
|
2639
2634
|
} else if (os.versionIdentifier) {
|
|
2640
2635
|
var versionRegExp = new RegExp(os.versionIdentifier.toLowerCase());
|
|
2641
2636
|
var versionRegExpResult = versionRegExp.exec(userAgent);
|
|
2642
|
-
if (versionRegExpResult != null && versionRegExpResult[1])
|
|
2637
|
+
if (versionRegExpResult != null && versionRegExpResult[1]) {
|
|
2638
|
+
setOsVersion(versionRegExpResult[1], os.versionSeparator ? os.versionSeparator : '.', osObject);
|
|
2639
|
+
}
|
|
2643
2640
|
}
|
|
2644
2641
|
break;
|
|
2645
2642
|
}
|
|
@@ -2654,16 +2651,20 @@
|
|
|
2654
2651
|
|
|
2655
2652
|
// Set OS version
|
|
2656
2653
|
var setOsVersion = function setOsVersion(version, separator, osObject) {
|
|
2657
|
-
var finalSeparator = separator.substr(0, 1)
|
|
2654
|
+
var finalSeparator = separator.substr(0, 1) === '[' ? new RegExp(separator, 'g') : separator;
|
|
2658
2655
|
var splitVersion = version.split(finalSeparator, 2);
|
|
2659
|
-
if (separator
|
|
2656
|
+
if (separator !== '.') version = version.replace(new RegExp(separator, 'g'), '.');
|
|
2660
2657
|
osObject.fullVersion = version;
|
|
2661
2658
|
|
|
2662
2659
|
// Major version
|
|
2663
|
-
if (splitVersion && splitVersion[0])
|
|
2660
|
+
if (splitVersion && splitVersion[0]) {
|
|
2661
|
+
osObject.majorVersion = parseInt(splitVersion[0]);
|
|
2662
|
+
}
|
|
2664
2663
|
|
|
2665
2664
|
// Minor version
|
|
2666
|
-
if (splitVersion && splitVersion[1])
|
|
2665
|
+
if (splitVersion && splitVersion[1]) {
|
|
2666
|
+
osObject.minorVersion = parseInt(splitVersion[1]);
|
|
2667
|
+
}
|
|
2667
2668
|
};
|
|
2668
2669
|
|
|
2669
2670
|
// Set viewport size
|
|
@@ -2712,17 +2713,17 @@
|
|
|
2712
2713
|
Browser.hasFlash = hasFlash();
|
|
2713
2714
|
|
|
2714
2715
|
/**
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2716
|
+
* @deprecated
|
|
2717
|
+
* This parameter currently exists for retrocompatibility reasons.
|
|
2718
|
+
* Use Browser.data.name instead.
|
|
2719
|
+
*/
|
|
2719
2720
|
Browser.name = browserInfo.name;
|
|
2720
2721
|
|
|
2721
2722
|
/**
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2723
|
+
* @deprecated
|
|
2724
|
+
* This parameter currently exists for retrocompatibility reasons.
|
|
2725
|
+
* Use Browser.data.fullVersion instead.
|
|
2726
|
+
*/
|
|
2726
2727
|
Browser.version = browserInfo.version;
|
|
2727
2728
|
Browser.userAgent = navigator.userAgent;
|
|
2728
2729
|
Browser.data = getBrowserData();
|
|
@@ -2757,7 +2758,9 @@
|
|
|
2757
2758
|
args[_key] = arguments[_key];
|
|
2758
2759
|
}
|
|
2759
2760
|
_this = _callSuper$2(this, Surrogate, [].concat(args));
|
|
2760
|
-
if (properties.initialize)
|
|
2761
|
+
if (properties.initialize) {
|
|
2762
|
+
properties.initialize.apply(_this, args);
|
|
2763
|
+
}
|
|
2761
2764
|
return _this;
|
|
2762
2765
|
}
|
|
2763
2766
|
_inherits$2(Surrogate, _parent);
|
|
@@ -2815,7 +2818,17 @@
|
|
|
2815
2818
|
},
|
|
2816
2819
|
cancelFullscreen: function cancelFullscreen() {
|
|
2817
2820
|
var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
|
|
2818
|
-
if (el.exitFullscreen)
|
|
2821
|
+
if (el.exitFullscreen) {
|
|
2822
|
+
el.exitFullscreen();
|
|
2823
|
+
} else if (el.webkitCancelFullScreen) {
|
|
2824
|
+
el.webkitCancelFullScreen();
|
|
2825
|
+
} else if (el.webkitExitFullscreen) {
|
|
2826
|
+
el.webkitExitFullscreen();
|
|
2827
|
+
} else if (el.mozCancelFullScreen) {
|
|
2828
|
+
el.mozCancelFullScreen();
|
|
2829
|
+
} else if (el.msExitFullscreen) {
|
|
2830
|
+
el.msExitFullscreen();
|
|
2831
|
+
}
|
|
2819
2832
|
},
|
|
2820
2833
|
fullscreenEnabled: function fullscreenEnabled() {
|
|
2821
2834
|
return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
|
|
@@ -2852,7 +2865,9 @@
|
|
|
2852
2865
|
}, {
|
|
2853
2866
|
key: "restore",
|
|
2854
2867
|
value: function restore(key) {
|
|
2855
|
-
if (Browser.hasLocalstorage && localStorage[this._createKeyspace(key)])
|
|
2868
|
+
if (Browser.hasLocalstorage && localStorage[this._createKeyspace(key)]) {
|
|
2869
|
+
return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]);
|
|
2870
|
+
}
|
|
2856
2871
|
return this._defaultValueFor(key);
|
|
2857
2872
|
}
|
|
2858
2873
|
}, {
|
|
@@ -2897,13 +2912,12 @@
|
|
|
2897
2912
|
key: "parse",
|
|
2898
2913
|
value: function parse(paramsString) {
|
|
2899
2914
|
var match;
|
|
2900
|
-
var pl = /\+/g
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
params = {};
|
|
2915
|
+
var pl = /\+/g; // Regex for replacing addition symbol with a space
|
|
2916
|
+
var search = /([^&=]+)=?([^&]*)/g;
|
|
2917
|
+
var decode = function decode(s) {
|
|
2918
|
+
return decodeURIComponent(s.replace(pl, ' '));
|
|
2919
|
+
};
|
|
2920
|
+
var params = {};
|
|
2907
2921
|
while (match = search.exec(paramsString)) {
|
|
2908
2922
|
// eslint-disable-line no-cond-assign
|
|
2909
2923
|
params[decode(match[1]).toLowerCase()] = decode(match[2]);
|
|
@@ -2951,14 +2965,18 @@
|
|
|
2951
2965
|
return window.navigator && window.navigator.language;
|
|
2952
2966
|
}
|
|
2953
2967
|
function now$2() {
|
|
2954
|
-
if (window.performance && window.performance.now)
|
|
2968
|
+
if (window.performance && window.performance.now) {
|
|
2969
|
+
return performance.now();
|
|
2970
|
+
}
|
|
2955
2971
|
return Date.now();
|
|
2956
2972
|
}
|
|
2957
2973
|
|
|
2958
2974
|
// remove the item from the array if it exists in the array
|
|
2959
2975
|
function removeArrayItem$1(arr, item) {
|
|
2960
2976
|
var i = arr.indexOf(item);
|
|
2961
|
-
if (i >= 0)
|
|
2977
|
+
if (i >= 0) {
|
|
2978
|
+
arr.splice(i, 1);
|
|
2979
|
+
}
|
|
2962
2980
|
}
|
|
2963
2981
|
|
|
2964
2982
|
// find an item regardless of its letter case
|
|
@@ -2981,8 +2999,12 @@
|
|
|
2981
2999
|
}, options);
|
|
2982
3000
|
var element = options.element ? options.element : document.createElement(options.type);
|
|
2983
3001
|
element.muted = options.muted;
|
|
2984
|
-
if (options.muted === true)
|
|
2985
|
-
|
|
3002
|
+
if (options.muted === true) {
|
|
3003
|
+
element.setAttribute('muted', 'muted');
|
|
3004
|
+
}
|
|
3005
|
+
if (options.inline === true) {
|
|
3006
|
+
element.setAttribute('playsinline', 'playsinline');
|
|
3007
|
+
}
|
|
2986
3008
|
element.src = options.source;
|
|
2987
3009
|
var promise = element.play();
|
|
2988
3010
|
var timeoutId = setTimeout(function () {
|
|
@@ -3017,7 +3039,9 @@
|
|
|
3017
3039
|
}, {
|
|
3018
3040
|
key: "create",
|
|
3019
3041
|
value: function create(name) {
|
|
3020
|
-
if (this.options.recycleVideo && name === 'video' && videoStack.length > 0)
|
|
3042
|
+
if (this.options.recycleVideo && name === 'video' && videoStack.length > 0) {
|
|
3043
|
+
return videoStack.shift();
|
|
3044
|
+
}
|
|
3021
3045
|
return document.createElement(name);
|
|
3022
3046
|
}
|
|
3023
3047
|
}, {
|
|
@@ -3156,7 +3180,9 @@
|
|
|
3156
3180
|
}
|
|
3157
3181
|
var color = COLORS[level];
|
|
3158
3182
|
var klassDescription = '';
|
|
3159
|
-
if (klass)
|
|
3183
|
+
if (klass) {
|
|
3184
|
+
klassDescription = '[' + klass + ']';
|
|
3185
|
+
}
|
|
3160
3186
|
window.console && window.console.log && window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message));
|
|
3161
3187
|
}
|
|
3162
3188
|
}]);
|
|
@@ -3166,7 +3192,9 @@
|
|
|
3166
3192
|
Log.LEVEL_WARN = LEVEL_WARN;
|
|
3167
3193
|
Log.LEVEL_ERROR = LEVEL_ERROR;
|
|
3168
3194
|
Log.getInstance = function () {
|
|
3169
|
-
if (this._instance === undefined)
|
|
3195
|
+
if (this._instance === undefined) {
|
|
3196
|
+
this._instance = new this();
|
|
3197
|
+
}
|
|
3170
3198
|
return this._instance;
|
|
3171
3199
|
};
|
|
3172
3200
|
Log.setLevel = function (level) {
|
|
@@ -3191,25 +3219,29 @@
|
|
|
3191
3219
|
|
|
3192
3220
|
// Handle event maps.
|
|
3193
3221
|
if (_typeof$1(name) === 'object') {
|
|
3194
|
-
for (var key in name)
|
|
3222
|
+
for (var key in name) {
|
|
3223
|
+
obj[action].apply(obj, [key, name[key]].concat(rest));
|
|
3224
|
+
}
|
|
3195
3225
|
return false;
|
|
3196
3226
|
}
|
|
3197
3227
|
|
|
3198
3228
|
// Handle space separated event names.
|
|
3199
3229
|
if (eventSplitter.test(name)) {
|
|
3200
3230
|
var names = name.split(eventSplitter);
|
|
3201
|
-
for (var i = 0, l = names.length; i < l; i++)
|
|
3231
|
+
for (var i = 0, l = names.length; i < l; i++) {
|
|
3232
|
+
obj[action].apply(obj, [names[i]].concat(rest));
|
|
3233
|
+
}
|
|
3202
3234
|
return false;
|
|
3203
3235
|
}
|
|
3204
3236
|
return true;
|
|
3205
3237
|
};
|
|
3206
3238
|
var triggerEvents = function triggerEvents(events, args, klass, name) {
|
|
3207
|
-
var ev
|
|
3208
|
-
|
|
3209
|
-
var l = events.length
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3239
|
+
var ev;
|
|
3240
|
+
var i = -1;
|
|
3241
|
+
var l = events.length;
|
|
3242
|
+
var a1 = args[0];
|
|
3243
|
+
var a2 = args[1];
|
|
3244
|
+
var a3 = args[2];
|
|
3213
3245
|
run();
|
|
3214
3246
|
function run() {
|
|
3215
3247
|
try {
|
|
@@ -3217,32 +3249,37 @@
|
|
|
3217
3249
|
/* eslint-disable curly */
|
|
3218
3250
|
case 0:
|
|
3219
3251
|
while (++i < l) {
|
|
3220
|
-
|
|
3252
|
+
ev = events[i];
|
|
3253
|
+
ev.callback.call(ev.ctx);
|
|
3221
3254
|
}
|
|
3222
3255
|
return;
|
|
3223
3256
|
case 1:
|
|
3224
3257
|
while (++i < l) {
|
|
3225
|
-
|
|
3258
|
+
ev = events[i];
|
|
3259
|
+
ev.callback.call(ev.ctx, a1);
|
|
3226
3260
|
}
|
|
3227
3261
|
return;
|
|
3228
3262
|
case 2:
|
|
3229
3263
|
while (++i < l) {
|
|
3230
|
-
|
|
3264
|
+
ev = events[i];
|
|
3265
|
+
ev.callback.call(ev.ctx, a1, a2);
|
|
3231
3266
|
}
|
|
3232
3267
|
return;
|
|
3233
3268
|
case 3:
|
|
3234
3269
|
while (++i < l) {
|
|
3235
|
-
|
|
3270
|
+
ev = events[i];
|
|
3271
|
+
ev.callback.call(ev.ctx, a1, a2, a3);
|
|
3236
3272
|
}
|
|
3237
3273
|
return;
|
|
3238
3274
|
default:
|
|
3239
3275
|
while (++i < l) {
|
|
3240
|
-
|
|
3276
|
+
ev = events[i];
|
|
3277
|
+
ev.callback.apply(ev.ctx, args);
|
|
3241
3278
|
}
|
|
3242
3279
|
return;
|
|
3243
3280
|
}
|
|
3244
3281
|
} catch (exception) {
|
|
3245
|
-
Log.error.apply(Log, [klass, 'error on event', name, 'trigger', '-', exception]);
|
|
3282
|
+
Log.error.apply(Log, [klass, 'error on event', name, 'trigger', '-', exception]); // eslint-disable-line
|
|
3246
3283
|
run();
|
|
3247
3284
|
}
|
|
3248
3285
|
}
|
|
@@ -3290,12 +3327,11 @@
|
|
|
3290
3327
|
key: "once",
|
|
3291
3328
|
value: function _once(name, callback, context) {
|
|
3292
3329
|
var _this = this;
|
|
3293
|
-
var _once;
|
|
3294
3330
|
if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
|
|
3295
3331
|
var off = function off() {
|
|
3296
3332
|
return _this.off(name, _once);
|
|
3297
3333
|
};
|
|
3298
|
-
_once = function once() {
|
|
3334
|
+
var _once = function once() {
|
|
3299
3335
|
off();
|
|
3300
3336
|
callback.apply(this, arguments);
|
|
3301
3337
|
};
|
|
@@ -3313,13 +3349,13 @@
|
|
|
3313
3349
|
}, {
|
|
3314
3350
|
key: "off",
|
|
3315
3351
|
value: function off(name, callback, context) {
|
|
3316
|
-
var retain, ev, events,
|
|
3352
|
+
var retain, ev, events, i, l, j, k;
|
|
3317
3353
|
if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
|
|
3318
3354
|
if (!name && !callback && !context) {
|
|
3319
3355
|
this._events = void 0;
|
|
3320
3356
|
return this;
|
|
3321
3357
|
}
|
|
3322
|
-
names = name ? [name] : Object.keys(this._events);
|
|
3358
|
+
var names = name ? [name] : Object.keys(this._events);
|
|
3323
3359
|
// jshint maxdepth:5
|
|
3324
3360
|
for (i = 0, l = names.length; i < l; i++) {
|
|
3325
3361
|
name = names[i];
|
|
@@ -3755,7 +3791,7 @@
|
|
|
3755
3791
|
*
|
|
3756
3792
|
* @event PLAYBACK_FRAGMENT_BUFFERED
|
|
3757
3793
|
* @param {Object} data Data
|
|
3758
|
-
*
|
|
3794
|
+
*
|
|
3759
3795
|
*/
|
|
3760
3796
|
Events$1.PLAYBACK_FRAGMENT_BUFFERED = 'playback:fragment:buffered';
|
|
3761
3797
|
// TODO doc
|
|
@@ -3811,6 +3847,15 @@
|
|
|
3811
3847
|
* @event CORE_ACTIVE_CONTAINER_CHANGED
|
|
3812
3848
|
*/
|
|
3813
3849
|
Events$1.CORE_ACTIVE_CONTAINER_CHANGED = 'core:active:container:changed';
|
|
3850
|
+
|
|
3851
|
+
/**
|
|
3852
|
+
* Fired before options are changed in core
|
|
3853
|
+
*
|
|
3854
|
+
* @event CORE_OPTIONS_WILL_CHANGE
|
|
3855
|
+
* @param {Object} current options before change
|
|
3856
|
+
*/
|
|
3857
|
+
Events$1.CORE_OPTIONS_WILL_CHANGE = 'core:options:will:change';
|
|
3858
|
+
|
|
3814
3859
|
/**
|
|
3815
3860
|
* Fired when the options were changed for the core
|
|
3816
3861
|
*
|
|
@@ -3950,10 +3995,10 @@
|
|
|
3950
3995
|
Events$1.CONTAINER_AUDIO_AVAILABLE = 'container:audio:available';
|
|
3951
3996
|
|
|
3952
3997
|
/**
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3998
|
+
* Fired whenever the current audio track has changed
|
|
3999
|
+
* @event CONTAINER_AUDIO_CHANGED
|
|
4000
|
+
* @param {import('../playback/playback').AudioTrack} track - audio track active after change
|
|
4001
|
+
*/
|
|
3957
4002
|
Events$1.CONTAINER_AUDIO_CHANGED = 'container:audio:changed';
|
|
3958
4003
|
|
|
3959
4004
|
/**
|
|
@@ -4063,6 +4108,14 @@
|
|
|
4063
4108
|
Events$1.CONTAINER_MEDIACONTROL_DISABLE = 'container:mediacontrol:disable';
|
|
4064
4109
|
Events$1.CONTAINER_MEDIACONTROL_ENABLE = 'container:mediacontrol:enable';
|
|
4065
4110
|
Events$1.CONTAINER_STATS_ADD = 'container:stats:add';
|
|
4111
|
+
/**
|
|
4112
|
+
* Fired before options are changed in container
|
|
4113
|
+
*
|
|
4114
|
+
* @event CONTAINER_OPTIONS_WILL_CHANGE
|
|
4115
|
+
* @param {Object} current options before change
|
|
4116
|
+
*/
|
|
4117
|
+
Events$1.CONTAINER_OPTIONS_WILL_CHANGE = 'container:options:will:change';
|
|
4118
|
+
|
|
4066
4119
|
/**
|
|
4067
4120
|
* Fired when the options were changed for the container
|
|
4068
4121
|
*
|
|
@@ -4464,10 +4517,14 @@
|
|
|
4464
4517
|
if (method && method.constructor !== Function) method = this[events[key]];
|
|
4465
4518
|
if (!method) continue;
|
|
4466
4519
|
var match = key.match(delegateEventSplitter);
|
|
4467
|
-
var eventName = match[1]
|
|
4468
|
-
|
|
4520
|
+
var eventName = match[1];
|
|
4521
|
+
var selector = match[2];
|
|
4469
4522
|
eventName += '.delegateEvents' + this.cid;
|
|
4470
|
-
if (selector === '')
|
|
4523
|
+
if (selector === '') {
|
|
4524
|
+
this.$el.on(eventName, method.bind(this));
|
|
4525
|
+
} else {
|
|
4526
|
+
this.$el.on(eventName, selector, method.bind(this));
|
|
4527
|
+
}
|
|
4471
4528
|
}
|
|
4472
4529
|
return this;
|
|
4473
4530
|
}
|
|
@@ -4495,7 +4552,7 @@
|
|
|
4495
4552
|
if (!this.el) {
|
|
4496
4553
|
var attrs = $.extend(true, {}, this.attributes);
|
|
4497
4554
|
if (this.id) attrs.id = this.id;
|
|
4498
|
-
if (this.className) attrs[
|
|
4555
|
+
if (this.className) attrs["class"] = this.className;
|
|
4499
4556
|
var $el = $(DomRecycler.create(this.tagName)).attr(attrs);
|
|
4500
4557
|
this.setElement($el, false);
|
|
4501
4558
|
} else {
|
|
@@ -4612,7 +4669,7 @@
|
|
|
4612
4669
|
var errorData = Object.assign({}, defaultError, error, {
|
|
4613
4670
|
code: options.useCodePrefix ? prefixedCode : error.code
|
|
4614
4671
|
});
|
|
4615
|
-
if (i18n && errorData.level
|
|
4672
|
+
if (i18n && errorData.level === PlayerError.Levels.FATAL && !errorData.UI) {
|
|
4616
4673
|
var defaultUI = {
|
|
4617
4674
|
title: i18n.t('default_error_title'),
|
|
4618
4675
|
message: i18n.t('default_error_message')
|
|
@@ -5036,7 +5093,9 @@
|
|
|
5036
5093
|
}, {
|
|
5037
5094
|
key: "error",
|
|
5038
5095
|
value: function error(_error) {
|
|
5039
|
-
if (!this.isReady)
|
|
5096
|
+
if (!this.isReady) {
|
|
5097
|
+
this.ready();
|
|
5098
|
+
}
|
|
5040
5099
|
this.trigger(Events$1.CONTAINER_ERROR, _error, this.name);
|
|
5041
5100
|
}
|
|
5042
5101
|
}, {
|
|
@@ -5167,7 +5226,9 @@
|
|
|
5167
5226
|
}, {
|
|
5168
5227
|
key: "onContextMenu",
|
|
5169
5228
|
value: function onContextMenu(event) {
|
|
5170
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5229
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5230
|
+
this.trigger(Events$1.CONTAINER_CONTEXTMENU, event, this.name);
|
|
5231
|
+
}
|
|
5171
5232
|
}
|
|
5172
5233
|
}, {
|
|
5173
5234
|
key: "seek",
|
|
@@ -5264,22 +5325,30 @@
|
|
|
5264
5325
|
}, {
|
|
5265
5326
|
key: "mouseEnter",
|
|
5266
5327
|
value: function mouseEnter() {
|
|
5267
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5328
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5329
|
+
this.trigger(Events$1.CONTAINER_MOUSE_ENTER);
|
|
5330
|
+
}
|
|
5268
5331
|
}
|
|
5269
5332
|
}, {
|
|
5270
5333
|
key: "mouseLeave",
|
|
5271
5334
|
value: function mouseLeave() {
|
|
5272
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5335
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5336
|
+
this.trigger(Events$1.CONTAINER_MOUSE_LEAVE);
|
|
5337
|
+
}
|
|
5273
5338
|
}
|
|
5274
5339
|
}, {
|
|
5275
5340
|
key: "mouseUp",
|
|
5276
5341
|
value: function mouseUp() {
|
|
5277
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5342
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5343
|
+
this.trigger(Events$1.CONTAINER_MOUSE_UP);
|
|
5344
|
+
}
|
|
5278
5345
|
}
|
|
5279
5346
|
}, {
|
|
5280
5347
|
key: "mouseDown",
|
|
5281
5348
|
value: function mouseDown() {
|
|
5282
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5349
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5350
|
+
this.trigger(Events$1.CONTAINER_MOUSE_DOWN);
|
|
5351
|
+
}
|
|
5283
5352
|
}
|
|
5284
5353
|
}, {
|
|
5285
5354
|
key: "enterPiP",
|
|
@@ -5326,7 +5395,11 @@
|
|
|
5326
5395
|
}, {
|
|
5327
5396
|
key: "updateStyle",
|
|
5328
5397
|
value: function updateStyle() {
|
|
5329
|
-
if (!this.options.chromeless || this.options.allowUserInteraction)
|
|
5398
|
+
if (!this.options.chromeless || this.options.allowUserInteraction) {
|
|
5399
|
+
this.$el.removeClass('chromeless');
|
|
5400
|
+
} else {
|
|
5401
|
+
this.$el.addClass('chromeless');
|
|
5402
|
+
}
|
|
5330
5403
|
}
|
|
5331
5404
|
}, {
|
|
5332
5405
|
key: "enableResizeObserver",
|
|
@@ -5375,10 +5448,12 @@
|
|
|
5375
5448
|
* enables to configure the container after its creation
|
|
5376
5449
|
* @method configure
|
|
5377
5450
|
* @param {Object} options all the options to change in form of a javascript object
|
|
5451
|
+
* @param {Object} oldOptions previous options
|
|
5378
5452
|
*/
|
|
5379
5453
|
}, {
|
|
5380
5454
|
key: "configure",
|
|
5381
|
-
value: function configure(options) {
|
|
5455
|
+
value: function configure(options, oldOptions) {
|
|
5456
|
+
this.trigger(Events$1.CONTAINER_OPTIONS_WILL_CHANGE, oldOptions);
|
|
5382
5457
|
this._options = $.extend(true, this._options, options);
|
|
5383
5458
|
this.updateStyle();
|
|
5384
5459
|
this.playback.configure(this.options);
|
|
@@ -5615,6 +5690,17 @@
|
|
|
5615
5690
|
return 0;
|
|
5616
5691
|
}
|
|
5617
5692
|
|
|
5693
|
+
/**
|
|
5694
|
+
* gets the frame rate of the current source
|
|
5695
|
+
* @method getFrameRate
|
|
5696
|
+
* @return {Number|null} frame rate (fps) of the current source, or null if unavailable
|
|
5697
|
+
*/
|
|
5698
|
+
}, {
|
|
5699
|
+
key: "getFrameRate",
|
|
5700
|
+
value: function getFrameRate() {
|
|
5701
|
+
return null;
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5618
5704
|
/**
|
|
5619
5705
|
* checks if the playback is playing.
|
|
5620
5706
|
* @method isPlaying
|
|
@@ -5924,7 +6010,8 @@
|
|
|
5924
6010
|
var playbackPlugin = this.findPlaybackPlugin(resolvedSource, mimeType);
|
|
5925
6011
|
|
|
5926
6012
|
// Fallback to empty playback object until we sort out unsupported sources error without NoOp playback
|
|
5927
|
-
var playback = playbackPlugin ? new playbackPlugin(options, this._i18n, this.playerError)
|
|
6013
|
+
var playback = playbackPlugin ? new playbackPlugin(options, this._i18n, this.playerError) // eslint-disable-line
|
|
6014
|
+
: new Playback();
|
|
5928
6015
|
options = _objectSpread2$2(_objectSpread2$2({}, options), {}, {
|
|
5929
6016
|
playback: playback
|
|
5930
6017
|
});
|
|
@@ -5967,7 +6054,7 @@
|
|
|
5967
6054
|
_this.styleRendered = false;
|
|
5968
6055
|
_this.plugins = [];
|
|
5969
6056
|
_this.containers = [];
|
|
5970
|
-
//FIXME fullscreen api sucks
|
|
6057
|
+
// FIXME fullscreen api sucks
|
|
5971
6058
|
_this._boundFullscreenHandler = function () {
|
|
5972
6059
|
return _this.handleFullscreenChange();
|
|
5973
6060
|
};
|
|
@@ -6399,13 +6486,15 @@
|
|
|
6399
6486
|
key: "configure",
|
|
6400
6487
|
value: function configure(options) {
|
|
6401
6488
|
var _this7 = this;
|
|
6489
|
+
var oldOptions = $.extend(true, {}, this._options);
|
|
6490
|
+
this.trigger(Events$1.CORE_OPTIONS_WILL_CHANGE, oldOptions);
|
|
6402
6491
|
this._options = $.extend(true, this._options, options);
|
|
6403
6492
|
this.configureDomRecycler();
|
|
6404
6493
|
var sources = options.source || options.sources;
|
|
6405
6494
|
sources && this.load(sources, options.mimeType || this.options.mimeType);
|
|
6406
|
-
this.trigger(Events$1.CORE_OPTIONS_CHANGE, options);
|
|
6495
|
+
this.trigger(Events$1.CORE_OPTIONS_CHANGE, options);
|
|
6407
6496
|
this.containers.forEach(function (container) {
|
|
6408
|
-
return container.configure(_this7.options);
|
|
6497
|
+
return container.configure(_this7.options, oldOptions);
|
|
6409
6498
|
});
|
|
6410
6499
|
}
|
|
6411
6500
|
}, {
|
|
@@ -6511,7 +6600,9 @@
|
|
|
6511
6600
|
key: "setupExternalInterface",
|
|
6512
6601
|
value: function setupExternalInterface(plugin) {
|
|
6513
6602
|
var externalFunctions = plugin.getExternalInterface();
|
|
6514
|
-
for (var key in externalFunctions)
|
|
6603
|
+
for (var key in externalFunctions) {
|
|
6604
|
+
this.player[key] = externalFunctions[key].bind(plugin);
|
|
6605
|
+
}
|
|
6515
6606
|
}
|
|
6516
6607
|
}]);
|
|
6517
6608
|
}(BaseObject);
|
|
@@ -6572,7 +6663,8 @@
|
|
|
6572
6663
|
var _ref4 = _slicedToArray(_ref3, 2),
|
|
6573
6664
|
key = _ref4[0],
|
|
6574
6665
|
value = _ref4[1];
|
|
6575
|
-
|
|
6666
|
+
obj[key] = value;
|
|
6667
|
+
return obj;
|
|
6576
6668
|
}, {});
|
|
6577
6669
|
};
|
|
6578
6670
|
|
|
@@ -6588,7 +6680,7 @@
|
|
|
6588
6680
|
plugins: {},
|
|
6589
6681
|
playbacks: []
|
|
6590
6682
|
};
|
|
6591
|
-
var currentVersion = "0.
|
|
6683
|
+
var currentVersion = "0.13.0";
|
|
6592
6684
|
return /*#__PURE__*/function () {
|
|
6593
6685
|
/**
|
|
6594
6686
|
* builds the loader
|
|
@@ -6614,7 +6706,6 @@
|
|
|
6614
6706
|
/**
|
|
6615
6707
|
* groups by type the external plugins that were passed through `options.plugins` it they're on a flat array
|
|
6616
6708
|
* @method addExternalPlugins
|
|
6617
|
-
* @private
|
|
6618
6709
|
* @param {Object} an config object or an array of plugins
|
|
6619
6710
|
* @return {Object} plugins the config object with the plugins separated by type
|
|
6620
6711
|
*/
|
|
@@ -6649,7 +6740,6 @@
|
|
|
6649
6740
|
/**
|
|
6650
6741
|
* adds all the external plugins that were passed through `options.plugins`
|
|
6651
6742
|
* @method addExternalPlugins
|
|
6652
|
-
* @private
|
|
6653
6743
|
* @param {Object} plugins the config object with all plugins
|
|
6654
6744
|
*/
|
|
6655
6745
|
}, {
|
|
@@ -6660,19 +6750,22 @@
|
|
|
6660
6750
|
plugins = this.groupPluginsByType(plugins);
|
|
6661
6751
|
if (plugins.playback) {
|
|
6662
6752
|
var playbacks = plugins.playback.filter(function (playback) {
|
|
6663
|
-
|
|
6753
|
+
Loader.checkVersionSupport(playback);
|
|
6754
|
+
return true;
|
|
6664
6755
|
});
|
|
6665
6756
|
this.playbackPlugins = loadExternalPlaybacksFirst ? this.removeDups(playbacks.concat(this.playbackPlugins)) : this.removeDups(this.playbackPlugins.concat(playbacks), true);
|
|
6666
6757
|
}
|
|
6667
6758
|
if (plugins.container) {
|
|
6668
6759
|
var containerPlugins = plugins.container.filter(function (plugin) {
|
|
6669
|
-
|
|
6760
|
+
Loader.checkVersionSupport(plugin);
|
|
6761
|
+
return true;
|
|
6670
6762
|
});
|
|
6671
6763
|
this.containerPlugins = loadExternalPluginsFirst ? this.removeDups(containerPlugins.concat(this.containerPlugins)) : this.removeDups(this.containerPlugins.concat(containerPlugins), true);
|
|
6672
6764
|
}
|
|
6673
6765
|
if (plugins.core) {
|
|
6674
6766
|
var corePlugins = plugins.core.filter(function (plugin) {
|
|
6675
|
-
|
|
6767
|
+
Loader.checkVersionSupport(plugin);
|
|
6768
|
+
return true;
|
|
6676
6769
|
});
|
|
6677
6770
|
this.corePlugins = loadExternalPluginsFirst ? this.removeDups(corePlugins.concat(this.corePlugins)) : this.removeDups(this.corePlugins.concat(corePlugins), true);
|
|
6678
6771
|
}
|
|
@@ -6681,7 +6774,6 @@
|
|
|
6681
6774
|
/**
|
|
6682
6775
|
* validate if the external plugins that were passed through `options.plugins` are associated to the correct type
|
|
6683
6776
|
* @method validateExternalPluginsType
|
|
6684
|
-
* @private
|
|
6685
6777
|
* @param {Object} plugins the config object with all plugins
|
|
6686
6778
|
*/
|
|
6687
6779
|
}, {
|
|
@@ -6689,7 +6781,8 @@
|
|
|
6689
6781
|
value: function validateExternalPluginsType(plugins) {
|
|
6690
6782
|
var pluginTypes = ['playback', 'container', 'core'];
|
|
6691
6783
|
pluginTypes.forEach(function (type) {
|
|
6692
|
-
|
|
6784
|
+
var pluginsByType = plugins[type] || [];
|
|
6785
|
+
pluginsByType.forEach(function (el) {
|
|
6693
6786
|
var errorMessage = 'external ' + el.type + ' plugin on ' + type + ' array';
|
|
6694
6787
|
if (el.type !== type) throw new ReferenceError(errorMessage);
|
|
6695
6788
|
});
|
|
@@ -6740,7 +6833,9 @@
|
|
|
6740
6833
|
var pluginRegistry = registry.plugins;
|
|
6741
6834
|
if (!pluginRegistry) return false;
|
|
6742
6835
|
var previousEntry = pluginRegistry[pluginEntry.prototype.name];
|
|
6743
|
-
if (previousEntry)
|
|
6836
|
+
if (previousEntry) {
|
|
6837
|
+
Log.warn('Loader', "overriding plugin entry: ".concat(pluginEntry.prototype.name, " - ").concat(previousEntry));
|
|
6838
|
+
}
|
|
6744
6839
|
pluginRegistry[pluginEntry.prototype.name] = pluginEntry;
|
|
6745
6840
|
return true;
|
|
6746
6841
|
}
|
|
@@ -6996,7 +7091,9 @@
|
|
|
6996
7091
|
return _createClass$2(Player, [{
|
|
6997
7092
|
key: "loader",
|
|
6998
7093
|
get: function get() {
|
|
6999
|
-
if (!this._loader)
|
|
7094
|
+
if (!this._loader) {
|
|
7095
|
+
this._loader = new Loader(this.options.plugins || {}, this.options.playerId);
|
|
7096
|
+
}
|
|
7000
7097
|
return this._loader;
|
|
7001
7098
|
}
|
|
7002
7099
|
|
|
@@ -7086,7 +7183,11 @@
|
|
|
7086
7183
|
}, {
|
|
7087
7184
|
key: "_addEventListeners",
|
|
7088
7185
|
value: function _addEventListeners() {
|
|
7089
|
-
if (!this.core.isReady)
|
|
7186
|
+
if (!this.core.isReady) {
|
|
7187
|
+
this.listenToOnce(this.core, Events$1.CORE_READY, this._onReady);
|
|
7188
|
+
} else {
|
|
7189
|
+
this._onReady();
|
|
7190
|
+
}
|
|
7090
7191
|
this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this._containerChanged);
|
|
7091
7192
|
this.listenTo(this.core, Events$1.CORE_FULLSCREEN, this._onFullscreenChange);
|
|
7092
7193
|
this.listenTo(this.core, Events$1.CORE_RESIZE, this._onResize);
|
|
@@ -7240,9 +7341,11 @@
|
|
|
7240
7341
|
}, {
|
|
7241
7342
|
key: "load",
|
|
7242
7343
|
value: function load(sources, mimeType, autoPlay) {
|
|
7243
|
-
if (autoPlay !== undefined)
|
|
7244
|
-
|
|
7245
|
-
|
|
7344
|
+
if (autoPlay !== undefined) {
|
|
7345
|
+
this.configure({
|
|
7346
|
+
autoPlay: !!autoPlay
|
|
7347
|
+
});
|
|
7348
|
+
}
|
|
7246
7349
|
this.core.load(sources, mimeType);
|
|
7247
7350
|
return this;
|
|
7248
7351
|
}
|
|
@@ -7632,22 +7735,22 @@
|
|
|
7632
7735
|
var tracksHTML = "<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track=\"<%= i %>\" kind=\"<%= tracks[i].kind %>\" label=\"<%= tracks[i].label %>\" srclang=\"<%= tracks[i].lang %>\" src=\"<%= tracks[i].src %>\">\n<% }; %>\n";
|
|
7633
7736
|
var css_248z$2$1 = "[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n";
|
|
7634
7737
|
var MIMETYPES = {
|
|
7635
|
-
|
|
7738
|
+
mp4: ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {
|
|
7636
7739
|
return 'video/mp4; codecs="' + codec + ', mp4a.40.2"';
|
|
7637
7740
|
}),
|
|
7638
|
-
|
|
7741
|
+
ogg: ['video/ogg; codecs="theora, vorbis"', 'video/ogg; codecs="dirac"', 'video/ogg; codecs="theora, speex"'],
|
|
7639
7742
|
'3gpp': ['video/3gpp; codecs="mp4v.20.8, samr"'],
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7743
|
+
webm: ['video/webm; codecs="vp8, vorbis"'],
|
|
7744
|
+
mkv: ['video/x-matroska; codecs="theora, vorbis"'],
|
|
7745
|
+
m3u8: ['application/x-mpegurl']
|
|
7643
7746
|
};
|
|
7644
|
-
MIMETYPES
|
|
7747
|
+
MIMETYPES.ogv = MIMETYPES.ogg;
|
|
7645
7748
|
MIMETYPES['3gp'] = MIMETYPES['3gpp'];
|
|
7646
7749
|
var AUDIO_MIMETYPES = {
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7750
|
+
wav: ['audio/wav'],
|
|
7751
|
+
mp3: ['audio/mp3', 'audio/mpeg;codecs="mp3"'],
|
|
7752
|
+
aac: ['audio/mp4;codecs="mp4a.40.5"'],
|
|
7753
|
+
oga: ['audio/ogg']
|
|
7651
7754
|
};
|
|
7652
7755
|
var KNOWN_AUDIO_MIMETYPES = Object.keys(AUDIO_MIMETYPES).reduce(function (acc, k) {
|
|
7653
7756
|
return [].concat(_toConsumableArray$1(acc), _toConsumableArray$1(AUDIO_MIMETYPES[k]));
|
|
@@ -7684,7 +7787,11 @@
|
|
|
7684
7787
|
var preload = playbackConfig.preload || (Browser.isSafari ? 'auto' : _this.options.preload);
|
|
7685
7788
|
var posterUrl; // FIXME: poster plugin should always convert poster to object with expected properties ?
|
|
7686
7789
|
if (_this.options.poster) {
|
|
7687
|
-
if (typeof _this.options.poster === 'string')
|
|
7790
|
+
if (typeof _this.options.poster === 'string') {
|
|
7791
|
+
posterUrl = _this.options.poster;
|
|
7792
|
+
} else if (typeof _this.options.poster.url === 'string') {
|
|
7793
|
+
posterUrl = _this.options.poster.url;
|
|
7794
|
+
}
|
|
7688
7795
|
}
|
|
7689
7796
|
$.extend(true, _this.el, {
|
|
7690
7797
|
muted: _this.options.mute,
|
|
@@ -7695,7 +7802,9 @@
|
|
|
7695
7802
|
crossOrigin: playbackConfig.crossOrigin,
|
|
7696
7803
|
'x-webkit-playsinline': playbackConfig.playInline
|
|
7697
7804
|
});
|
|
7698
|
-
if (playbackConfig.controls || _this.options.useVideoTagDefaultControls)
|
|
7805
|
+
if (playbackConfig.controls || _this.options.useVideoTagDefaultControls) {
|
|
7806
|
+
_this.$el.attr('controls', '');
|
|
7807
|
+
}
|
|
7699
7808
|
playbackConfig.playInline && _this.$el.attr({
|
|
7700
7809
|
playsinline: 'playsinline'
|
|
7701
7810
|
});
|
|
@@ -7723,7 +7832,7 @@
|
|
|
7723
7832
|
key: "supportedVersion",
|
|
7724
7833
|
get: function get() {
|
|
7725
7834
|
return {
|
|
7726
|
-
min: "0.
|
|
7835
|
+
min: "0.13.0"
|
|
7727
7836
|
};
|
|
7728
7837
|
}
|
|
7729
7838
|
}, {
|
|
@@ -7749,23 +7858,23 @@
|
|
|
7749
7858
|
key: "events",
|
|
7750
7859
|
get: function get() {
|
|
7751
7860
|
return {
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7861
|
+
canplay: '_onCanPlay',
|
|
7862
|
+
canplaythrough: '_handleBufferingEvents',
|
|
7863
|
+
durationchange: '_onDurationChange',
|
|
7864
|
+
ended: '_onEnded',
|
|
7865
|
+
error: '_onError',
|
|
7866
|
+
loadeddata: '_onLoadedData',
|
|
7867
|
+
loadedmetadata: '_onLoadedMetadata',
|
|
7868
|
+
pause: '_onPause',
|
|
7869
|
+
playing: '_onPlaying',
|
|
7870
|
+
progress: '_onProgress',
|
|
7871
|
+
seeking: '_onSeeking',
|
|
7872
|
+
seeked: '_onSeeked',
|
|
7873
|
+
stalled: '_handleBufferingEvents',
|
|
7874
|
+
timeupdate: '_onTimeUpdate',
|
|
7875
|
+
waiting: '_onWaiting',
|
|
7876
|
+
enterpictureinpicture: '_onEnterPiP',
|
|
7877
|
+
leavepictureinpicture: '_onExitPiP'
|
|
7769
7878
|
};
|
|
7770
7879
|
}
|
|
7771
7880
|
|
|
@@ -7862,7 +7971,9 @@
|
|
|
7862
7971
|
};
|
|
7863
7972
|
|
|
7864
7973
|
// Use current video element if recycling feature enabled with mobile devices
|
|
7865
|
-
if (Browser.isMobile && DomRecycler.options.recycleVideo)
|
|
7974
|
+
if (Browser.isMobile && DomRecycler.options.recycleVideo) {
|
|
7975
|
+
opts.element = this.el;
|
|
7976
|
+
}
|
|
7866
7977
|
|
|
7867
7978
|
// Desktop browser autoplay policy may require user action
|
|
7868
7979
|
// Mobile browser autoplay require user consent and video recycling feature enabled
|
|
@@ -7904,7 +8015,9 @@
|
|
|
7904
8015
|
}, {
|
|
7905
8016
|
key: "_setupSrc",
|
|
7906
8017
|
value: function _setupSrc(srcUrl) {
|
|
7907
|
-
if (this.el.src === srcUrl)
|
|
8018
|
+
if (this.el.src === srcUrl) {
|
|
8019
|
+
return;
|
|
8020
|
+
}
|
|
7908
8021
|
this._ccIsSetup = false;
|
|
7909
8022
|
this.el.src = srcUrl;
|
|
7910
8023
|
this._src = this.el.src;
|
|
@@ -7919,7 +8032,9 @@
|
|
|
7919
8032
|
});
|
|
7920
8033
|
this._updateSettings();
|
|
7921
8034
|
var autoSeekFromUrl = typeof this._options.autoSeekFromUrl === 'undefined' || this._options.autoSeekFromUrl;
|
|
7922
|
-
if (this.getPlaybackType() !== Playback.LIVE && autoSeekFromUrl)
|
|
8035
|
+
if (this.getPlaybackType() !== Playback.LIVE && autoSeekFromUrl) {
|
|
8036
|
+
this._checkInitialSeek();
|
|
8037
|
+
}
|
|
7923
8038
|
}
|
|
7924
8039
|
}, {
|
|
7925
8040
|
key: "_onDurationChange",
|
|
@@ -7934,7 +8049,11 @@
|
|
|
7934
8049
|
value: function _updateSettings() {
|
|
7935
8050
|
// we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.
|
|
7936
8051
|
// that's why we check it again and update media control accordingly.
|
|
7937
|
-
if (this.getPlaybackType() === Playback.VOD || this.getPlaybackType() === Playback.AOD)
|
|
8052
|
+
if (this.getPlaybackType() === Playback.VOD || this.getPlaybackType() === Playback.AOD) {
|
|
8053
|
+
this.settings.left = ['playpause', 'position', 'duration'];
|
|
8054
|
+
} else {
|
|
8055
|
+
this.settings.left = ['playstop'];
|
|
8056
|
+
}
|
|
7938
8057
|
this.settings.seekEnabled = this.isSeekEnabled();
|
|
7939
8058
|
this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
|
|
7940
8059
|
}
|
|
@@ -7985,9 +8104,11 @@
|
|
|
7985
8104
|
this._handleBufferingEvents();
|
|
7986
8105
|
var promise = this.el.play();
|
|
7987
8106
|
// For more details, see https://developers.google.com/web/updates/2016/03/play-returns-promise
|
|
7988
|
-
if (promise && promise["catch"])
|
|
7989
|
-
|
|
7990
|
-
|
|
8107
|
+
if (promise && promise["catch"]) {
|
|
8108
|
+
promise["catch"](function (error) {
|
|
8109
|
+
return Log.warn(_this4.name, 'HTML5 play failed', error);
|
|
8110
|
+
});
|
|
8111
|
+
}
|
|
7991
8112
|
return promise;
|
|
7992
8113
|
}
|
|
7993
8114
|
}, {
|
|
@@ -8061,7 +8182,9 @@
|
|
|
8061
8182
|
}, {
|
|
8062
8183
|
key: "_startPlayheadMovingChecks",
|
|
8063
8184
|
value: function _startPlayheadMovingChecks() {
|
|
8064
|
-
if (this._playheadMovingTimer !== null || !this._playheadMovingCheckEnabled)
|
|
8185
|
+
if (this._playheadMovingTimer !== null || !this._playheadMovingCheckEnabled) {
|
|
8186
|
+
return;
|
|
8187
|
+
}
|
|
8065
8188
|
this._playheadMovingTimeOnCheck = null;
|
|
8066
8189
|
this._determineIfPlayheadMoving();
|
|
8067
8190
|
this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), this._playheadMovingCheckInterval);
|
|
@@ -8069,7 +8192,9 @@
|
|
|
8069
8192
|
}, {
|
|
8070
8193
|
key: "_stopPlayheadMovingChecks",
|
|
8071
8194
|
value: function _stopPlayheadMovingChecks() {
|
|
8072
|
-
if (this._playheadMovingTimer === null)
|
|
8195
|
+
if (this._playheadMovingTimer === null) {
|
|
8196
|
+
return;
|
|
8197
|
+
}
|
|
8073
8198
|
clearInterval(this._playheadMovingTimer);
|
|
8074
8199
|
this._playheadMovingTimer = null;
|
|
8075
8200
|
this._playheadMoving = false;
|
|
@@ -8199,10 +8324,16 @@
|
|
|
8199
8324
|
var isMissingMediaDataToPlay = this.el.readyState < this.el.HAVE_FUTURE_DATA;
|
|
8200
8325
|
var playheadShouldBeMoving = !this.el.ended && !this.el.paused && !this._playheadMoving;
|
|
8201
8326
|
var buffering = isLoading && isMissingMediaDataToPlay;
|
|
8202
|
-
if (this._playheadMovingCheckEnabled)
|
|
8327
|
+
if (this._playheadMovingCheckEnabled) {
|
|
8328
|
+
buffering = buffering || isLoading && playheadShouldBeMoving;
|
|
8329
|
+
}
|
|
8203
8330
|
if (this._isBuffering !== buffering) {
|
|
8204
8331
|
this._isBuffering = buffering;
|
|
8205
|
-
if (buffering)
|
|
8332
|
+
if (buffering) {
|
|
8333
|
+
this.trigger(Events$1.PLAYBACK_BUFFERING, this.name);
|
|
8334
|
+
} else {
|
|
8335
|
+
this.trigger(Events$1.PLAYBACK_BUFFERFULL, this.name);
|
|
8336
|
+
}
|
|
8206
8337
|
}
|
|
8207
8338
|
}
|
|
8208
8339
|
}, {
|
|
@@ -8218,7 +8349,11 @@
|
|
|
8218
8349
|
raw: this.el.error,
|
|
8219
8350
|
level: isUnknownError ? PlayerError.Levels.WARN : PlayerError.Levels.FATAL
|
|
8220
8351
|
});
|
|
8221
|
-
if (isUnknownError)
|
|
8352
|
+
if (isUnknownError) {
|
|
8353
|
+
Log.warn(this.name, 'HTML5 unknown error: ', formattedError);
|
|
8354
|
+
} else {
|
|
8355
|
+
this.trigger(Events$1.PLAYBACK_ERROR, formattedError);
|
|
8356
|
+
}
|
|
8222
8357
|
}
|
|
8223
8358
|
}, {
|
|
8224
8359
|
key: "destroy",
|
|
@@ -8238,7 +8373,7 @@
|
|
|
8238
8373
|
value: function _updateDvr(status) {
|
|
8239
8374
|
this.trigger(Events$1.PLAYBACK_DVR, status);
|
|
8240
8375
|
this.trigger(Events$1.PLAYBACK_STATS_ADD, {
|
|
8241
|
-
|
|
8376
|
+
dvr: status
|
|
8242
8377
|
});
|
|
8243
8378
|
}
|
|
8244
8379
|
}, {
|
|
@@ -8261,7 +8396,9 @@
|
|
|
8261
8396
|
key: "_checkInitialSeek",
|
|
8262
8397
|
value: function _checkInitialSeek() {
|
|
8263
8398
|
var seekTime = seekStringToSeconds();
|
|
8264
|
-
if (seekTime !== 0)
|
|
8399
|
+
if (seekTime !== 0) {
|
|
8400
|
+
this.seek(seekTime);
|
|
8401
|
+
}
|
|
8265
8402
|
}
|
|
8266
8403
|
}, {
|
|
8267
8404
|
key: "getCurrentTime",
|
|
@@ -8304,7 +8441,9 @@
|
|
|
8304
8441
|
}, {
|
|
8305
8442
|
key: "_onProgress",
|
|
8306
8443
|
value: function _onProgress() {
|
|
8307
|
-
if (!this.el.buffered.length)
|
|
8444
|
+
if (!this.el.buffered.length) {
|
|
8445
|
+
return;
|
|
8446
|
+
}
|
|
8308
8447
|
var buffered = [];
|
|
8309
8448
|
var bufferedPos = 0;
|
|
8310
8449
|
for (var i = 0; i < this.el.buffered.length; i++) {
|
|
@@ -8312,7 +8451,9 @@
|
|
|
8312
8451
|
start: this.el.buffered.start(i),
|
|
8313
8452
|
end: this.el.buffered.end(i)
|
|
8314
8453
|
}]);
|
|
8315
|
-
if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end)
|
|
8454
|
+
if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {
|
|
8455
|
+
bufferedPos = i;
|
|
8456
|
+
}
|
|
8316
8457
|
}
|
|
8317
8458
|
var progress = {
|
|
8318
8459
|
start: buffered[bufferedPos].start,
|
|
@@ -8325,14 +8466,18 @@
|
|
|
8325
8466
|
key: "_typeFor",
|
|
8326
8467
|
value: function _typeFor(src) {
|
|
8327
8468
|
var mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType);
|
|
8328
|
-
if (mimeTypes.length === 0)
|
|
8469
|
+
if (mimeTypes.length === 0) {
|
|
8470
|
+
mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);
|
|
8471
|
+
}
|
|
8329
8472
|
var mimeType = mimeTypes[0] || '';
|
|
8330
8473
|
return mimeType.split(';')[0];
|
|
8331
8474
|
}
|
|
8332
8475
|
}, {
|
|
8333
8476
|
key: "_ready",
|
|
8334
8477
|
value: function _ready() {
|
|
8335
|
-
if (this._isReadyState)
|
|
8478
|
+
if (this._isReadyState) {
|
|
8479
|
+
return;
|
|
8480
|
+
}
|
|
8336
8481
|
this._isReadyState = true;
|
|
8337
8482
|
this.trigger(Events$1.PLAYBACK_READY, this.name);
|
|
8338
8483
|
}
|
|
@@ -8396,7 +8541,9 @@
|
|
|
8396
8541
|
return this._ccTrackId;
|
|
8397
8542
|
},
|
|
8398
8543
|
set: function set(trackId) {
|
|
8399
|
-
if (!isNumber(trackId))
|
|
8544
|
+
if (!isNumber(trackId)) {
|
|
8545
|
+
return;
|
|
8546
|
+
}
|
|
8400
8547
|
var tracks = this.closedCaptionsTracks;
|
|
8401
8548
|
var showingTrack;
|
|
8402
8549
|
|
|
@@ -8405,9 +8552,13 @@
|
|
|
8405
8552
|
showingTrack = tracks.find(function (track) {
|
|
8406
8553
|
return track.id === trackId;
|
|
8407
8554
|
});
|
|
8408
|
-
if (!showingTrack)
|
|
8555
|
+
if (!showingTrack) {
|
|
8556
|
+
return;
|
|
8557
|
+
} // Track id not found
|
|
8409
8558
|
|
|
8410
|
-
if (showingTrack.track.mode === 'showing')
|
|
8559
|
+
if (showingTrack.track.mode === 'showing') {
|
|
8560
|
+
return;
|
|
8561
|
+
} // Track already showing
|
|
8411
8562
|
}
|
|
8412
8563
|
|
|
8413
8564
|
// Since it is possible to display multiple tracks,
|
|
@@ -8415,7 +8566,7 @@
|
|
|
8415
8566
|
tracks.filter(function (track) {
|
|
8416
8567
|
return track.track.mode !== 'hidden';
|
|
8417
8568
|
}).forEach(function (track) {
|
|
8418
|
-
|
|
8569
|
+
track.track.mode = 'hidden';
|
|
8419
8570
|
});
|
|
8420
8571
|
showingTrack && (showingTrack.track.mode = 'showing');
|
|
8421
8572
|
this._ccTrackId = trackId;
|
|
@@ -8485,7 +8636,7 @@
|
|
|
8485
8636
|
key: "supportedVersion",
|
|
8486
8637
|
get: function get() {
|
|
8487
8638
|
return {
|
|
8488
|
-
min: "0.
|
|
8639
|
+
min: "0.13.0"
|
|
8489
8640
|
};
|
|
8490
8641
|
}
|
|
8491
8642
|
}, {
|
|
@@ -8540,7 +8691,7 @@
|
|
|
8540
8691
|
key: "supportedVersion",
|
|
8541
8692
|
get: function get() {
|
|
8542
8693
|
return {
|
|
8543
|
-
min: "0.
|
|
8694
|
+
min: "0.13.0"
|
|
8544
8695
|
};
|
|
8545
8696
|
}
|
|
8546
8697
|
}, {
|
|
@@ -8620,7 +8771,7 @@
|
|
|
8620
8771
|
key: "supportedVersion",
|
|
8621
8772
|
get: function get() {
|
|
8622
8773
|
return {
|
|
8623
|
-
min: "0.
|
|
8774
|
+
min: "0.13.0"
|
|
8624
8775
|
};
|
|
8625
8776
|
}
|
|
8626
8777
|
}, {
|
|
@@ -8648,7 +8799,9 @@
|
|
|
8648
8799
|
}));
|
|
8649
8800
|
this.trigger(Events$1.PLAYBACK_READY, this.name);
|
|
8650
8801
|
var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);
|
|
8651
|
-
if (this.options.autoPlay || !showForNoOp)
|
|
8802
|
+
if (this.options.autoPlay || !showForNoOp) {
|
|
8803
|
+
this._animate();
|
|
8804
|
+
}
|
|
8652
8805
|
return this;
|
|
8653
8806
|
}
|
|
8654
8807
|
}, {
|
|
@@ -8666,12 +8819,14 @@
|
|
|
8666
8819
|
} catch (err) {
|
|
8667
8820
|
buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4);
|
|
8668
8821
|
var data = idata.data;
|
|
8669
|
-
for (var i = 0; i < data.length; i++)
|
|
8822
|
+
for (var i = 0; i < data.length; i++) {
|
|
8823
|
+
buffer32[i] = data[i];
|
|
8824
|
+
}
|
|
8670
8825
|
}
|
|
8671
|
-
var len = buffer32.length
|
|
8672
|
-
|
|
8673
|
-
var run = 0
|
|
8674
|
-
|
|
8826
|
+
var len = buffer32.length;
|
|
8827
|
+
var m = Math.random() * 6 + 4;
|
|
8828
|
+
var run = 0;
|
|
8829
|
+
var color = 0;
|
|
8675
8830
|
for (var _i = 0; _i < len;) {
|
|
8676
8831
|
if (run < 0) {
|
|
8677
8832
|
run = m * Math.random();
|
|
@@ -8687,7 +8842,9 @@
|
|
|
8687
8842
|
key: "_loop",
|
|
8688
8843
|
value: function _loop() {
|
|
8689
8844
|
var _this2 = this;
|
|
8690
|
-
if (this._stop)
|
|
8845
|
+
if (this._stop) {
|
|
8846
|
+
return;
|
|
8847
|
+
}
|
|
8691
8848
|
this._noise();
|
|
8692
8849
|
this._animationHandle = requestAnimationFrame(function () {
|
|
8693
8850
|
return _this2._loop();
|
|
@@ -8746,14 +8903,14 @@
|
|
|
8746
8903
|
key: "supportedVersion",
|
|
8747
8904
|
get: function get() {
|
|
8748
8905
|
return {
|
|
8749
|
-
min: "0.
|
|
8906
|
+
min: "0.13.0"
|
|
8750
8907
|
};
|
|
8751
8908
|
}
|
|
8752
8909
|
}, {
|
|
8753
8910
|
key: "t",
|
|
8754
8911
|
value: function t(key) {
|
|
8755
8912
|
var lang = this._language();
|
|
8756
|
-
var fallbackLang = this._messages
|
|
8913
|
+
var fallbackLang = this._messages.en;
|
|
8757
8914
|
var i18n = lang && this._messages[lang] || fallbackLang;
|
|
8758
8915
|
return i18n[key] || fallbackLang[key] || key;
|
|
8759
8916
|
}
|
|
@@ -8858,17 +9015,17 @@
|
|
|
8858
9015
|
}
|
|
8859
9016
|
};
|
|
8860
9017
|
this._messages = $.extend(true, defaultMessages, this.core.options.strings || {});
|
|
8861
|
-
this._messages['de-DE'] = this._messages
|
|
8862
|
-
this._messages['pt-BR'] = this._messages
|
|
8863
|
-
this._messages['en-US'] = this._messages
|
|
8864
|
-
this._messages['bg-BG'] = this._messages
|
|
8865
|
-
this._messages['es-419'] = this._messages
|
|
8866
|
-
this._messages['es-ES'] = this._messages
|
|
8867
|
-
this._messages['fr-FR'] = this._messages
|
|
8868
|
-
this._messages['tr-TR'] = this._messages
|
|
8869
|
-
this._messages['et-EE'] = this._messages
|
|
8870
|
-
this._messages['ar-IQ'] = this._messages
|
|
8871
|
-
this._messages['zh-CN'] = this._messages
|
|
9018
|
+
this._messages['de-DE'] = this._messages.de;
|
|
9019
|
+
this._messages['pt-BR'] = this._messages.pt;
|
|
9020
|
+
this._messages['en-US'] = this._messages.en;
|
|
9021
|
+
this._messages['bg-BG'] = this._messages.bg;
|
|
9022
|
+
this._messages['es-419'] = this._messages.es_am;
|
|
9023
|
+
this._messages['es-ES'] = this._messages.es;
|
|
9024
|
+
this._messages['fr-FR'] = this._messages.fr;
|
|
9025
|
+
this._messages['tr-TR'] = this._messages.tr;
|
|
9026
|
+
this._messages['et-EE'] = this._messages.et;
|
|
9027
|
+
this._messages['ar-IQ'] = this._messages.ar;
|
|
9028
|
+
this._messages['zh-CN'] = this._messages.zh;
|
|
8872
9029
|
}
|
|
8873
9030
|
}]);
|
|
8874
9031
|
}(CorePlugin);
|
|
@@ -8887,7 +9044,7 @@
|
|
|
8887
9044
|
key: "supportedVersion",
|
|
8888
9045
|
get: function get() {
|
|
8889
9046
|
return {
|
|
8890
|
-
min: "0.
|
|
9047
|
+
min: "0.13.0"
|
|
8891
9048
|
};
|
|
8892
9049
|
}
|
|
8893
9050
|
}, {
|
|
@@ -8916,7 +9073,7 @@
|
|
|
8916
9073
|
@type {string}
|
|
8917
9074
|
@default
|
|
8918
9075
|
*/
|
|
8919
|
-
var version$2 = "0.
|
|
9076
|
+
var version$2 = "0.13.0";
|
|
8920
9077
|
|
|
8921
9078
|
// Built-in Plugins/Playbacks
|
|
8922
9079
|
|
|
@@ -9051,9 +9208,9 @@
|
|
|
9051
9208
|
}, _typeof(o);
|
|
9052
9209
|
}
|
|
9053
9210
|
var ClickToPausePlugin = /*#__PURE__*/function (_ContainerPlugin) {
|
|
9054
|
-
function ClickToPausePlugin(
|
|
9211
|
+
function ClickToPausePlugin() {
|
|
9055
9212
|
_classCallCheck$1(this, ClickToPausePlugin);
|
|
9056
|
-
return _callSuper$1(this, ClickToPausePlugin,
|
|
9213
|
+
return _callSuper$1(this, ClickToPausePlugin, arguments);
|
|
9057
9214
|
}
|
|
9058
9215
|
_inherits$1(ClickToPausePlugin, _ContainerPlugin);
|
|
9059
9216
|
return _createClass$1(ClickToPausePlugin, [{
|
|
@@ -9065,7 +9222,7 @@
|
|
|
9065
9222
|
key: "supportedVersion",
|
|
9066
9223
|
get: function get() {
|
|
9067
9224
|
return {
|
|
9068
|
-
min: "0.
|
|
9225
|
+
min: "0.13.0"
|
|
9069
9226
|
};
|
|
9070
9227
|
}
|
|
9071
9228
|
}, {
|
|
@@ -9084,7 +9241,11 @@
|
|
|
9084
9241
|
value: function click() {
|
|
9085
9242
|
var onClickPayload = this.config.onClickPayload;
|
|
9086
9243
|
if (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrEnabled()) {
|
|
9087
|
-
if (this.container.isPlaying())
|
|
9244
|
+
if (this.container.isPlaying()) {
|
|
9245
|
+
this.container.pause(onClickPayload);
|
|
9246
|
+
} else {
|
|
9247
|
+
this.container.play(onClickPayload);
|
|
9248
|
+
}
|
|
9088
9249
|
}
|
|
9089
9250
|
}
|
|
9090
9251
|
}, {
|
|
@@ -9124,7 +9285,7 @@
|
|
|
9124
9285
|
key: "supportedVersion",
|
|
9125
9286
|
get: function get() {
|
|
9126
9287
|
return {
|
|
9127
|
-
min: "0.
|
|
9288
|
+
min: "0.13.0"
|
|
9128
9289
|
};
|
|
9129
9290
|
}
|
|
9130
9291
|
}, {
|
|
@@ -9234,7 +9395,9 @@
|
|
|
9234
9395
|
key: "renderCcButton",
|
|
9235
9396
|
value: function renderCcButton() {
|
|
9236
9397
|
var tracks = this.container ? this.container.closedCaptionsTracks : [];
|
|
9237
|
-
for (var i = 0; i < tracks.length; i++)
|
|
9398
|
+
for (var i = 0; i < tracks.length; i++) {
|
|
9399
|
+
tracks[i].label = this._labelCb(tracks[i]);
|
|
9400
|
+
}
|
|
9238
9401
|
var style = Styler.getStyleFor(css_248z$7, {
|
|
9239
9402
|
baseUrl: this.options.baseUrl
|
|
9240
9403
|
});
|
|
@@ -9253,7 +9416,11 @@
|
|
|
9253
9416
|
value: function render() {
|
|
9254
9417
|
this.renderCcButton();
|
|
9255
9418
|
var $fullscreen = this.core.mediaControl.$el.find('button[data-fullscreen]');
|
|
9256
|
-
if ($fullscreen[0])
|
|
9419
|
+
if ($fullscreen[0]) {
|
|
9420
|
+
this.$el.insertAfter($fullscreen);
|
|
9421
|
+
} else {
|
|
9422
|
+
this.core.mediaControl.$el.find('.media-control-right-panel[data-media-control]').prepend(this.$el);
|
|
9423
|
+
}
|
|
9257
9424
|
return this;
|
|
9258
9425
|
}
|
|
9259
9426
|
}]);
|
|
@@ -9283,7 +9450,7 @@
|
|
|
9283
9450
|
key: "supportedVersion",
|
|
9284
9451
|
get: function get() {
|
|
9285
9452
|
return {
|
|
9286
|
-
min: "0.
|
|
9453
|
+
min: "0.13.0"
|
|
9287
9454
|
};
|
|
9288
9455
|
}
|
|
9289
9456
|
}, {
|
|
@@ -9353,8 +9520,12 @@
|
|
|
9353
9520
|
value: function click() {
|
|
9354
9521
|
var mediaControl = this.core.mediaControl;
|
|
9355
9522
|
var container = mediaControl.container;
|
|
9356
|
-
if (!container.isPlaying())
|
|
9357
|
-
|
|
9523
|
+
if (!container.isPlaying()) {
|
|
9524
|
+
container.play();
|
|
9525
|
+
}
|
|
9526
|
+
if (mediaControl.$el.hasClass('dvr')) {
|
|
9527
|
+
container.seek(container.getDuration());
|
|
9528
|
+
}
|
|
9358
9529
|
}
|
|
9359
9530
|
}, {
|
|
9360
9531
|
key: "settingsUpdate",
|
|
@@ -9410,7 +9581,7 @@
|
|
|
9410
9581
|
key: "supportedVersion",
|
|
9411
9582
|
get: function get() {
|
|
9412
9583
|
return {
|
|
9413
|
-
min: "0.
|
|
9584
|
+
min: "0.13.0"
|
|
9414
9585
|
};
|
|
9415
9586
|
}
|
|
9416
9587
|
}, {
|
|
@@ -9433,7 +9604,9 @@
|
|
|
9433
9604
|
key: "ended",
|
|
9434
9605
|
value: function ended() {
|
|
9435
9606
|
var exitOnEnd = typeof this.core.options.exitFullscreenOnEnd === 'undefined' || this.core.options.exitFullscreenOnEnd;
|
|
9436
|
-
if (exitOnEnd && this.core.isFullscreen())
|
|
9607
|
+
if (exitOnEnd && this.core.isFullscreen()) {
|
|
9608
|
+
this.core.toggleFullscreen();
|
|
9609
|
+
}
|
|
9437
9610
|
}
|
|
9438
9611
|
}]);
|
|
9439
9612
|
}(CorePlugin);
|
|
@@ -9458,7 +9631,7 @@
|
|
|
9458
9631
|
key: "supportedVersion",
|
|
9459
9632
|
get: function get() {
|
|
9460
9633
|
return {
|
|
9461
|
-
min: "0.
|
|
9634
|
+
min: "0.13.0"
|
|
9462
9635
|
};
|
|
9463
9636
|
}
|
|
9464
9637
|
}, {
|
|
@@ -9578,7 +9751,7 @@
|
|
|
9578
9751
|
key: "supportedVersion",
|
|
9579
9752
|
get: function get() {
|
|
9580
9753
|
return {
|
|
9581
|
-
min: "0.
|
|
9754
|
+
min: "0.13.0"
|
|
9582
9755
|
};
|
|
9583
9756
|
}
|
|
9584
9757
|
}, {
|
|
@@ -9648,13 +9821,17 @@
|
|
|
9648
9821
|
}, {
|
|
9649
9822
|
key: "setPlayIcon",
|
|
9650
9823
|
value: function setPlayIcon() {
|
|
9651
|
-
if (!this.playIcon)
|
|
9824
|
+
if (!this.playIcon) {
|
|
9825
|
+
this.playIcon = this.createIcon(playIcon);
|
|
9826
|
+
}
|
|
9652
9827
|
this.changeIcon(this.playIcon);
|
|
9653
9828
|
}
|
|
9654
9829
|
}, {
|
|
9655
9830
|
key: "setPauseIcon",
|
|
9656
9831
|
value: function setPauseIcon() {
|
|
9657
|
-
if (!this.pauseIcon)
|
|
9832
|
+
if (!this.pauseIcon) {
|
|
9833
|
+
this.pauseIcon = this.createIcon(pauseIcon);
|
|
9834
|
+
}
|
|
9658
9835
|
this.changeIcon(this.pauseIcon);
|
|
9659
9836
|
}
|
|
9660
9837
|
}, {
|
|
@@ -9697,7 +9874,7 @@
|
|
|
9697
9874
|
key: "supportedVersion",
|
|
9698
9875
|
get: function get() {
|
|
9699
9876
|
return {
|
|
9700
|
-
min: "0.
|
|
9877
|
+
min: "0.13.0"
|
|
9701
9878
|
};
|
|
9702
9879
|
}
|
|
9703
9880
|
}, {
|
|
@@ -9742,7 +9919,9 @@
|
|
|
9742
9919
|
this.listenTo(this.container, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDVR);
|
|
9743
9920
|
}
|
|
9744
9921
|
_gaq.push([this.trackerName + '_setAccount', this.account]);
|
|
9745
|
-
if (this.domainName)
|
|
9922
|
+
if (this.domainName) {
|
|
9923
|
+
_gaq.push([this.trackerName + '_setDomainName', this.domainName]);
|
|
9924
|
+
}
|
|
9746
9925
|
}
|
|
9747
9926
|
}, {
|
|
9748
9927
|
key: "onReady",
|
|
@@ -9791,7 +9970,9 @@
|
|
|
9791
9970
|
}, {
|
|
9792
9971
|
key: "onPlaybackChanged",
|
|
9793
9972
|
value: function onPlaybackChanged(playbackState) {
|
|
9794
|
-
if (playbackState.type !== null)
|
|
9973
|
+
if (playbackState.type !== null) {
|
|
9974
|
+
this.push(['Video', 'Playback Type - ' + playbackState.type, this.container.playback.src]);
|
|
9975
|
+
}
|
|
9795
9976
|
}
|
|
9796
9977
|
}, {
|
|
9797
9978
|
key: "onDVR",
|
|
@@ -10162,12 +10343,16 @@
|
|
|
10162
10343
|
_this.kibo = new Kibo(_this.options.focusElement);
|
|
10163
10344
|
_this.bindKeyEvents();
|
|
10164
10345
|
if (_this.container) {
|
|
10165
|
-
if (!$.isEmptyObject(_this.container.settings))
|
|
10346
|
+
if (!$.isEmptyObject(_this.container.settings)) {
|
|
10347
|
+
_this.settings = $.extend({}, _this.container.settings);
|
|
10348
|
+
}
|
|
10166
10349
|
} else {
|
|
10167
10350
|
_this.settings = {};
|
|
10168
10351
|
}
|
|
10169
10352
|
_this.userDisabled = false;
|
|
10170
|
-
if (_this.container && _this.container.mediaControlDisabled || _this.options.chromeless)
|
|
10353
|
+
if (_this.container && _this.container.mediaControlDisabled || _this.options.chromeless) {
|
|
10354
|
+
_this.disable();
|
|
10355
|
+
}
|
|
10171
10356
|
_this.stopDragHandler = function (event) {
|
|
10172
10357
|
return _this.stopDrag(event);
|
|
10173
10358
|
};
|
|
@@ -10188,7 +10373,7 @@
|
|
|
10188
10373
|
key: "supportedVersion",
|
|
10189
10374
|
get: function get() {
|
|
10190
10375
|
return {
|
|
10191
|
-
min: "0.
|
|
10376
|
+
min: "0.13.0"
|
|
10192
10377
|
};
|
|
10193
10378
|
}
|
|
10194
10379
|
}, {
|
|
@@ -10530,9 +10715,13 @@
|
|
|
10530
10715
|
});
|
|
10531
10716
|
}
|
|
10532
10717
|
};
|
|
10533
|
-
if (!this.container)
|
|
10534
|
-
|
|
10535
|
-
|
|
10718
|
+
if (!this.container) {
|
|
10719
|
+
this.listenToOnce(this, Events$1.MEDIACONTROL_CONTAINERCHANGED, function () {
|
|
10720
|
+
return setWhenContainerReady();
|
|
10721
|
+
});
|
|
10722
|
+
} else {
|
|
10723
|
+
setWhenContainerReady();
|
|
10724
|
+
}
|
|
10536
10725
|
}
|
|
10537
10726
|
}, {
|
|
10538
10727
|
key: "toggleFullscreen",
|
|
@@ -10612,7 +10801,9 @@
|
|
|
10612
10801
|
|
|
10613
10802
|
// default to 100%
|
|
10614
10803
|
this.currentSeekBarPercentage = 100;
|
|
10615
|
-
if (this.container && (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrInUse()))
|
|
10804
|
+
if (this.container && (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrInUse())) {
|
|
10805
|
+
this.currentSeekBarPercentage = this.currentPositionValue / this.currentDurationValue * 100;
|
|
10806
|
+
}
|
|
10616
10807
|
this.setSeekPercentage(this.currentSeekBarPercentage);
|
|
10617
10808
|
var newPosition = formatTime$1(this.currentPositionValue);
|
|
10618
10809
|
var newDuration = formatTime$1(this.currentDurationValue);
|
|
@@ -10712,7 +10903,11 @@
|
|
|
10712
10903
|
}, {
|
|
10713
10904
|
key: "updateCursorStyle",
|
|
10714
10905
|
value: function updateCursorStyle(showing) {
|
|
10715
|
-
if (showing)
|
|
10906
|
+
if (showing) {
|
|
10907
|
+
this.core.$el.removeClass('nocursor');
|
|
10908
|
+
} else if (this.core.isFullscreen()) {
|
|
10909
|
+
this.core.$el.addClass('nocursor');
|
|
10910
|
+
}
|
|
10716
10911
|
}
|
|
10717
10912
|
}, {
|
|
10718
10913
|
key: "settingsUpdate",
|
|
@@ -10904,7 +11099,11 @@
|
|
|
10904
11099
|
key: "configure",
|
|
10905
11100
|
value: function configure(options) {
|
|
10906
11101
|
// Check if chromeless mode or if configure is called with new source(s)
|
|
10907
|
-
if (this.options.chromeless || options.source || options.sources)
|
|
11102
|
+
if (this.options.chromeless || options.source || options.sources) {
|
|
11103
|
+
this.disable();
|
|
11104
|
+
} else {
|
|
11105
|
+
this.enable();
|
|
11106
|
+
}
|
|
10908
11107
|
this.trigger(Events$1.MEDIACONTROL_OPTIONS_CHANGE);
|
|
10909
11108
|
}
|
|
10910
11109
|
}, {
|
|
@@ -10933,12 +11132,18 @@
|
|
|
10933
11132
|
// Video volume cannot be changed with Safari on mobile devices
|
|
10934
11133
|
// Display mute/unmute icon only if Safari version >= 10
|
|
10935
11134
|
if (Browser.isSafari && Browser.isMobile) {
|
|
10936
|
-
if (Browser.version < 10)
|
|
11135
|
+
if (Browser.version < 10) {
|
|
11136
|
+
this.$volumeContainer.css('display', 'none');
|
|
11137
|
+
} else {
|
|
11138
|
+
this.$volumeBarContainer.css('display', 'none');
|
|
11139
|
+
}
|
|
10937
11140
|
}
|
|
10938
11141
|
this.$seekBarPosition.addClass('media-control-notransition');
|
|
10939
11142
|
this.$seekBarScrubber.addClass('media-control-notransition');
|
|
10940
11143
|
var previousSeekPercentage = 0;
|
|
10941
|
-
if (this.displayedSeekBarPercentage)
|
|
11144
|
+
if (this.displayedSeekBarPercentage) {
|
|
11145
|
+
previousSeekPercentage = this.displayedSeekBarPercentage;
|
|
11146
|
+
}
|
|
10942
11147
|
this.displayedSeekBarPercentage = null;
|
|
10943
11148
|
this.setSeekPercentage(previousSeekPercentage);
|
|
10944
11149
|
setTimeout(function () {
|
|
@@ -10988,7 +11193,7 @@
|
|
|
10988
11193
|
key: "supportedVersion",
|
|
10989
11194
|
get: function get() {
|
|
10990
11195
|
return {
|
|
10991
|
-
min: "0.
|
|
11196
|
+
min: "0.13.0"
|
|
10992
11197
|
};
|
|
10993
11198
|
}
|
|
10994
11199
|
}, {
|
|
@@ -11059,7 +11264,11 @@
|
|
|
11059
11264
|
}, {
|
|
11060
11265
|
key: "updatePlayButton",
|
|
11061
11266
|
value: function updatePlayButton(show) {
|
|
11062
|
-
if (show && (!this.options.chromeless || this.options.allowUserInteraction))
|
|
11267
|
+
if (show && (!this.options.chromeless || this.options.allowUserInteraction)) {
|
|
11268
|
+
this.showPlayButton();
|
|
11269
|
+
} else {
|
|
11270
|
+
this.hidePlayButton();
|
|
11271
|
+
}
|
|
11063
11272
|
}
|
|
11064
11273
|
}, {
|
|
11065
11274
|
key: "showPlayButton",
|
|
@@ -11097,7 +11306,9 @@
|
|
|
11097
11306
|
}, {
|
|
11098
11307
|
key: "update",
|
|
11099
11308
|
value: function update() {
|
|
11100
|
-
if (!this.shouldRender)
|
|
11309
|
+
if (!this.shouldRender) {
|
|
11310
|
+
return;
|
|
11311
|
+
}
|
|
11101
11312
|
var showPlayButton = !this.playRequested && !this.hasStartedPlaying && !this.container.buffering;
|
|
11102
11313
|
this.updatePlayButton(showPlayButton);
|
|
11103
11314
|
this.updatePoster();
|
|
@@ -11117,12 +11328,16 @@
|
|
|
11117
11328
|
key: "hidePoster",
|
|
11118
11329
|
value: function hidePoster() {
|
|
11119
11330
|
this.container.enableMediaControl();
|
|
11120
|
-
if (this.shouldHideOnPlay())
|
|
11331
|
+
if (this.shouldHideOnPlay()) {
|
|
11332
|
+
this.$el.hide();
|
|
11333
|
+
}
|
|
11121
11334
|
}
|
|
11122
11335
|
}, {
|
|
11123
11336
|
key: "render",
|
|
11124
11337
|
value: function render() {
|
|
11125
|
-
if (!this.shouldRender)
|
|
11338
|
+
if (!this.shouldRender) {
|
|
11339
|
+
return;
|
|
11340
|
+
}
|
|
11126
11341
|
var style = Styler.getStyleFor(css_248z$3, {
|
|
11127
11342
|
baseUrl: this.options.baseUrl
|
|
11128
11343
|
});
|
|
@@ -11148,7 +11363,9 @@
|
|
|
11148
11363
|
this.$playButton.addClass('poster-icon');
|
|
11149
11364
|
this.$playButton.attr('data-poster', '');
|
|
11150
11365
|
var buttonsColor = this.options.mediacontrol && this.options.mediacontrol.buttons;
|
|
11151
|
-
if (buttonsColor)
|
|
11366
|
+
if (buttonsColor) {
|
|
11367
|
+
this.$el.find('svg path').css('fill', buttonsColor);
|
|
11368
|
+
}
|
|
11152
11369
|
if (this.options.mediacontrol && this.options.mediacontrol.buttons) {
|
|
11153
11370
|
buttonsColor = this.options.mediacontrol.buttons;
|
|
11154
11371
|
this.$playButton.css('color', buttonsColor);
|
|
@@ -11177,7 +11394,11 @@
|
|
|
11177
11394
|
_this.firstFragDateTime = null;
|
|
11178
11395
|
_this.actualLiveTime = !!_this.mediaControl.options.actualLiveTime;
|
|
11179
11396
|
if (_this.actualLiveTime) {
|
|
11180
|
-
if (_this.mediaControl.options.actualLiveServerTime)
|
|
11397
|
+
if (_this.mediaControl.options.actualLiveServerTime) {
|
|
11398
|
+
_this.actualLiveServerTimeDiff = new Date().getTime() - new Date(_this.mediaControl.options.actualLiveServerTime).getTime();
|
|
11399
|
+
} else {
|
|
11400
|
+
_this.actualLiveServerTimeDiff = 0;
|
|
11401
|
+
}
|
|
11181
11402
|
}
|
|
11182
11403
|
return _this;
|
|
11183
11404
|
}
|
|
@@ -11191,7 +11412,7 @@
|
|
|
11191
11412
|
key: "supportedVersion",
|
|
11192
11413
|
get: function get() {
|
|
11193
11414
|
return {
|
|
11194
|
-
min: "0.
|
|
11415
|
+
min: "0.13.0"
|
|
11195
11416
|
};
|
|
11196
11417
|
}
|
|
11197
11418
|
}, {
|
|
@@ -11293,7 +11514,9 @@
|
|
|
11293
11514
|
secondsSinceMidnight = (e - d.setHours(0, 0, 0, 0)) / 1000;
|
|
11294
11515
|
}
|
|
11295
11516
|
seekTime = secondsSinceMidnight - this.duration + this.hoverPosition * this.duration;
|
|
11296
|
-
if (seekTime < 0)
|
|
11517
|
+
if (seekTime < 0) {
|
|
11518
|
+
seekTime += 86400;
|
|
11519
|
+
}
|
|
11297
11520
|
} else {
|
|
11298
11521
|
seekTime = this.hoverPosition * this.duration;
|
|
11299
11522
|
}
|
|
@@ -11393,7 +11616,7 @@
|
|
|
11393
11616
|
key: "supportedVersion",
|
|
11394
11617
|
get: function get() {
|
|
11395
11618
|
return {
|
|
11396
|
-
min: "0.
|
|
11619
|
+
min: "0.13.0"
|
|
11397
11620
|
};
|
|
11398
11621
|
}
|
|
11399
11622
|
}, {
|
|
@@ -11423,9 +11646,11 @@
|
|
|
11423
11646
|
key: "show",
|
|
11424
11647
|
value: function show() {
|
|
11425
11648
|
var _this2 = this;
|
|
11426
|
-
if (this.showTimeout === null)
|
|
11427
|
-
|
|
11428
|
-
|
|
11649
|
+
if (this.showTimeout === null) {
|
|
11650
|
+
this.showTimeout = setTimeout(function () {
|
|
11651
|
+
return _this2.$el.show();
|
|
11652
|
+
}, 300);
|
|
11653
|
+
}
|
|
11429
11654
|
}
|
|
11430
11655
|
}, {
|
|
11431
11656
|
key: "hide",
|
|
@@ -11446,7 +11671,9 @@
|
|
|
11446
11671
|
this.$el.append(style[0]);
|
|
11447
11672
|
this.container.$el.append(this.$el);
|
|
11448
11673
|
this.$el.hide();
|
|
11449
|
-
if (this.container.buffering)
|
|
11674
|
+
if (this.container.buffering) {
|
|
11675
|
+
this.onBuffering();
|
|
11676
|
+
}
|
|
11450
11677
|
return this;
|
|
11451
11678
|
}
|
|
11452
11679
|
}]);
|
|
@@ -11471,7 +11698,7 @@
|
|
|
11471
11698
|
key: "supportedVersion",
|
|
11472
11699
|
get: function get() {
|
|
11473
11700
|
return {
|
|
11474
|
-
min: "0.
|
|
11701
|
+
min: "0.13.0"
|
|
11475
11702
|
};
|
|
11476
11703
|
}
|
|
11477
11704
|
}, {
|
|
@@ -11502,7 +11729,9 @@
|
|
|
11502
11729
|
value: function onPlay() {
|
|
11503
11730
|
this.state = 'PLAYING';
|
|
11504
11731
|
this.watchingTimeInit = Date.now();
|
|
11505
|
-
if (!this.intervalId)
|
|
11732
|
+
if (!this.intervalId) {
|
|
11733
|
+
this.intervalId = setInterval(this.report.bind(this), this.reportInterval);
|
|
11734
|
+
}
|
|
11506
11735
|
}
|
|
11507
11736
|
}, {
|
|
11508
11737
|
key: "onStop",
|
|
@@ -11515,7 +11744,11 @@
|
|
|
11515
11744
|
}, {
|
|
11516
11745
|
key: "onBuffering",
|
|
11517
11746
|
value: function onBuffering() {
|
|
11518
|
-
if (this.firstPlay)
|
|
11747
|
+
if (this.firstPlay) {
|
|
11748
|
+
this.startupTimeInit = Date.now();
|
|
11749
|
+
} else {
|
|
11750
|
+
this.rebufferingTimeInit = Date.now();
|
|
11751
|
+
}
|
|
11519
11752
|
this.state = 'BUFFERING';
|
|
11520
11753
|
this.rebuffers++;
|
|
11521
11754
|
}
|
|
@@ -11592,7 +11825,7 @@
|
|
|
11592
11825
|
key: "supportedVersion",
|
|
11593
11826
|
get: function get() {
|
|
11594
11827
|
return {
|
|
11595
|
-
min: "0.
|
|
11828
|
+
min: "0.13.0"
|
|
11596
11829
|
};
|
|
11597
11830
|
}
|
|
11598
11831
|
}, {
|
|
@@ -11622,7 +11855,9 @@
|
|
|
11622
11855
|
}, {
|
|
11623
11856
|
key: "onPlay",
|
|
11624
11857
|
value: function onPlay() {
|
|
11625
|
-
if (!this.hidden)
|
|
11858
|
+
if (!this.hidden) {
|
|
11859
|
+
this.$el.show();
|
|
11860
|
+
}
|
|
11626
11861
|
}
|
|
11627
11862
|
}, {
|
|
11628
11863
|
key: "onStop",
|
|
@@ -11664,7 +11899,7 @@
|
|
|
11664
11899
|
WaterMark: WaterMarkPlugin
|
|
11665
11900
|
};
|
|
11666
11901
|
|
|
11667
|
-
var version$1 = "0.11.
|
|
11902
|
+
var version$1 = "0.11.11";
|
|
11668
11903
|
for (var _i = 0, _Object$values = Object.values(Plugins); _i < _Object$values.length; _i++) {
|
|
11669
11904
|
var plugin = _Object$values[_i];
|
|
11670
11905
|
Loader.registerPlugin(plugin);
|
|
@@ -47036,7 +47271,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47036
47271
|
key: "supportedVersion",
|
|
47037
47272
|
get: function get() {
|
|
47038
47273
|
return {
|
|
47039
|
-
min: "0.
|
|
47274
|
+
min: "0.13.0"
|
|
47040
47275
|
};
|
|
47041
47276
|
}
|
|
47042
47277
|
}, {
|
|
@@ -47047,12 +47282,20 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47047
47282
|
}, {
|
|
47048
47283
|
key: "currentLevel",
|
|
47049
47284
|
get: function get() {
|
|
47050
|
-
if (this._currentLevel === null || this._currentLevel === undefined)
|
|
47285
|
+
if (this._currentLevel === null || this._currentLevel === undefined) {
|
|
47286
|
+
return AUTO;
|
|
47287
|
+
} else {
|
|
47288
|
+
return this._currentLevel;
|
|
47289
|
+
} // 0 is a valid level ID
|
|
47051
47290
|
},
|
|
47052
47291
|
set: function set(id) {
|
|
47053
47292
|
this._currentLevel = id;
|
|
47054
47293
|
this.trigger(Events$1.PLAYBACK_LEVEL_SWITCH_START);
|
|
47055
|
-
if (this.options.playback.hlsUseNextLevel)
|
|
47294
|
+
if (this.options.playback.hlsUseNextLevel) {
|
|
47295
|
+
this._hls.nextLevel = this._currentLevel;
|
|
47296
|
+
} else {
|
|
47297
|
+
this._hls.currentLevel = this._currentLevel;
|
|
47298
|
+
}
|
|
47056
47299
|
}
|
|
47057
47300
|
}, {
|
|
47058
47301
|
key: "isReady",
|
|
@@ -47077,7 +47320,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47077
47320
|
}, {
|
|
47078
47321
|
key: "_startTime",
|
|
47079
47322
|
get: function get() {
|
|
47080
|
-
if (this._playbackType === Playback.LIVE && this._playlistType !== 'EVENT')
|
|
47323
|
+
if (this._playbackType === Playback.LIVE && this._playlistType !== 'EVENT') {
|
|
47324
|
+
return this._extrapolatedStartTime;
|
|
47325
|
+
}
|
|
47081
47326
|
return this._playableRegionStartTime;
|
|
47082
47327
|
}
|
|
47083
47328
|
}, {
|
|
@@ -47091,7 +47336,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47091
47336
|
}, {
|
|
47092
47337
|
key: "_extrapolatedStartTime",
|
|
47093
47338
|
get: function get() {
|
|
47094
|
-
if (!this._localStartTimeCorrelation)
|
|
47339
|
+
if (!this._localStartTimeCorrelation) {
|
|
47340
|
+
return this._playableRegionStartTime;
|
|
47341
|
+
}
|
|
47095
47342
|
var corr = this._localStartTimeCorrelation;
|
|
47096
47343
|
var timePassed = this._now - corr.local;
|
|
47097
47344
|
var extrapolatedWindowStartTime = (corr.remote + timePassed) / 1000;
|
|
@@ -47137,7 +47384,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47137
47384
|
}, {
|
|
47138
47385
|
key: "_extrapolatedWindowDuration",
|
|
47139
47386
|
get: function get() {
|
|
47140
|
-
if (this._segmentTargetDuration === null)
|
|
47387
|
+
if (this._segmentTargetDuration === null) {
|
|
47388
|
+
return 0;
|
|
47389
|
+
}
|
|
47141
47390
|
return this._extrapolatedWindowNumSegments * this._segmentTargetDuration;
|
|
47142
47391
|
}
|
|
47143
47392
|
}, {
|
|
@@ -47258,7 +47507,7 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47258
47507
|
_this2.options.hlsPlayback.preload && _this2._hls.loadSource(_this2.options.src);
|
|
47259
47508
|
});
|
|
47260
47509
|
this._hls.on(Hls.Events.MANIFEST_LOADING, function () {
|
|
47261
|
-
|
|
47510
|
+
_this2._manifestLoading = true;
|
|
47262
47511
|
});
|
|
47263
47512
|
this._hls.on(Hls.Events.LEVEL_LOADED, function (evt, data) {
|
|
47264
47513
|
return _this2._updatePlaybackType(evt, data);
|
|
@@ -47434,7 +47683,13 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47434
47683
|
}, {
|
|
47435
47684
|
key: "_updateSettings",
|
|
47436
47685
|
value: function _updateSettings() {
|
|
47437
|
-
if (this._playbackType === Playback.VOD)
|
|
47686
|
+
if (this._playbackType === Playback.VOD) {
|
|
47687
|
+
this.settings.left = ['playpause', 'position', 'duration'];
|
|
47688
|
+
} else if (this.dvrEnabled) {
|
|
47689
|
+
this.settings.left = ['playpause'];
|
|
47690
|
+
} else {
|
|
47691
|
+
this.settings.left = ['playstop'];
|
|
47692
|
+
}
|
|
47438
47693
|
this.settings.seekEnabled = this.isSeekEnabled();
|
|
47439
47694
|
this.trigger(Events$1.PLAYBACK_SETTINGSUPDATE);
|
|
47440
47695
|
}
|
|
@@ -47581,7 +47836,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47581
47836
|
start: Math.max(0, this.el.buffered.start(i) - this._playableRegionStartTime),
|
|
47582
47837
|
end: Math.max(0, this.el.buffered.end(i) - this._playableRegionStartTime)
|
|
47583
47838
|
}]);
|
|
47584
|
-
if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end)
|
|
47839
|
+
if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {
|
|
47840
|
+
bufferedPos = i;
|
|
47841
|
+
}
|
|
47585
47842
|
}
|
|
47586
47843
|
var progress = {
|
|
47587
47844
|
start: buffered[bufferedPos].start,
|
|
@@ -47631,7 +47888,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47631
47888
|
this._playbackType = data.details.live ? Playback.LIVE : Playback.VOD;
|
|
47632
47889
|
this._onLevelUpdated(evt, data);
|
|
47633
47890
|
// Live stream subtitle tracks detection hack (may not immediately available)
|
|
47634
|
-
if (this._ccTracksUpdated && this._playbackType === Playback.LIVE && this.hasClosedCaptionsTracks)
|
|
47891
|
+
if (this._ccTracksUpdated && this._playbackType === Playback.LIVE && this.hasClosedCaptionsTracks) {
|
|
47892
|
+
this._onSubtitleLoaded();
|
|
47893
|
+
}
|
|
47635
47894
|
}
|
|
47636
47895
|
}, {
|
|
47637
47896
|
key: "_fillLevels",
|
|
@@ -47657,7 +47916,9 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))}`);
|
|
|
47657
47916
|
var previousPlayableRegionDuration = this._playableRegionDuration;
|
|
47658
47917
|
if (fragments.length === 0) return;
|
|
47659
47918
|
// #EXT-X-PROGRAM-DATE-TIME
|
|
47660
|
-
if (fragments[0].rawProgramDateTime)
|
|
47919
|
+
if (fragments[0].rawProgramDateTime) {
|
|
47920
|
+
this._programDateTime = fragments[0].rawProgramDateTime;
|
|
47921
|
+
}
|
|
47661
47922
|
if (this._playableRegionStartTime !== fragments[0].start) {
|
|
47662
47923
|
startTimeChanged = true;
|
|
47663
47924
|
this._playableRegionStartTime = fragments[0].start;
|