summaryrefslogtreecommitdiffstats
path: root/wp-includes/js/mediaelement
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/js/mediaelement')
-rw-r--r--wp-includes/js/mediaelement/mediaelement-and-player.js8540
-rw-r--r--wp-includes/js/mediaelement/mediaelement-and-player.min.js12
-rw-r--r--wp-includes/js/mediaelement/mediaelement-migrate.js84
-rw-r--r--wp-includes/js/mediaelement/mediaelement-migrate.min.js1
-rw-r--r--wp-includes/js/mediaelement/mediaelement.js3984
-rw-r--r--wp-includes/js/mediaelement/mediaelement.min.js12
-rw-r--r--wp-includes/js/mediaelement/mediaelementplayer-legacy.css774
-rw-r--r--wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css1
-rw-r--r--wp-includes/js/mediaelement/mediaelementplayer.css774
-rw-r--r--wp-includes/js/mediaelement/mediaelementplayer.min.css1
-rw-r--r--wp-includes/js/mediaelement/mejs-controls.pngbin0 -> 2883 bytes
-rw-r--r--wp-includes/js/mediaelement/mejs-controls.svg1
-rw-r--r--wp-includes/js/mediaelement/renderers/vimeo.js432
-rw-r--r--wp-includes/js/mediaelement/renderers/vimeo.min.js12
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.css293
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.js100
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.min.css1
-rw-r--r--wp-includes/js/mediaelement/wp-mediaelement.min.js1
-rw-r--r--wp-includes/js/mediaelement/wp-playlist.js205
-rw-r--r--wp-includes/js/mediaelement/wp-playlist.min.js1
20 files changed, 15229 insertions, 0 deletions
diff --git a/wp-includes/js/mediaelement/mediaelement-and-player.js b/wp-includes/js/mediaelement/mediaelement-and-player.js
new file mode 100644
index 0000000..26b951e
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement-and-player.js
@@ -0,0 +1,8540 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
+
+},{}],2:[function(_dereq_,module,exports){
+(function (global){
+var topLevel = typeof global !== 'undefined' ? global :
+ typeof window !== 'undefined' ? window : {}
+var minDoc = _dereq_(1);
+
+var doccy;
+
+if (typeof document !== 'undefined') {
+ doccy = document;
+} else {
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
+
+ if (!doccy) {
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
+ }
+}
+
+module.exports = doccy;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"1":1}],3:[function(_dereq_,module,exports){
+(function (global){
+var win;
+
+if (typeof window !== "undefined") {
+ win = window;
+} else if (typeof global !== "undefined") {
+ win = global;
+} else if (typeof self !== "undefined"){
+ win = self;
+} else {
+ win = {};
+}
+
+module.exports = win;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],4:[function(_dereq_,module,exports){
+(function (root) {
+
+ // Store setTimeout reference so promise-polyfill will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var setTimeoutFunc = setTimeout;
+
+ function noop() {}
+
+ // Polyfill for Function.prototype.bind
+ function bind(fn, thisArg) {
+ return function () {
+ fn.apply(thisArg, arguments);
+ };
+ }
+
+ function Promise(fn) {
+ if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
+ if (typeof fn !== 'function') throw new TypeError('not a function');
+ this._state = 0;
+ this._handled = false;
+ this._value = undefined;
+ this._deferreds = [];
+
+ doResolve(fn, this);
+ }
+
+ function handle(self, deferred) {
+ while (self._state === 3) {
+ self = self._value;
+ }
+ if (self._state === 0) {
+ self._deferreds.push(deferred);
+ return;
+ }
+ self._handled = true;
+ Promise._immediateFn(function () {
+ var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
+ if (cb === null) {
+ (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
+ return;
+ }
+ var ret;
+ try {
+ ret = cb(self._value);
+ } catch (e) {
+ reject(deferred.promise, e);
+ return;
+ }
+ resolve(deferred.promise, ret);
+ });
+ }
+
+ function resolve(self, newValue) {
+ try {
+ // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
+ if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
+ if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+ var then = newValue.then;
+ if (newValue instanceof Promise) {
+ self._state = 3;
+ self._value = newValue;
+ finale(self);
+ return;
+ } else if (typeof then === 'function') {
+ doResolve(bind(then, newValue), self);
+ return;
+ }
+ }
+ self._state = 1;
+ self._value = newValue;
+ finale(self);
+ } catch (e) {
+ reject(self, e);
+ }
+ }
+
+ function reject(self, newValue) {
+ self._state = 2;
+ self._value = newValue;
+ finale(self);
+ }
+
+ function finale(self) {
+ if (self._state === 2 && self._deferreds.length === 0) {
+ Promise._immediateFn(function() {
+ if (!self._handled) {
+ Promise._unhandledRejectionFn(self._value);
+ }
+ });
+ }
+
+ for (var i = 0, len = self._deferreds.length; i < len; i++) {
+ handle(self, self._deferreds[i]);
+ }
+ self._deferreds = null;
+ }
+
+ function Handler(onFulfilled, onRejected, promise) {
+ this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+ this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+ this.promise = promise;
+ }
+
+ /**
+ * Take a potentially misbehaving resolver function and make sure
+ * onFulfilled and onRejected are only called once.
+ *
+ * Makes no guarantees about asynchrony.
+ */
+ function doResolve(fn, self) {
+ var done = false;
+ try {
+ fn(function (value) {
+ if (done) return;
+ done = true;
+ resolve(self, value);
+ }, function (reason) {
+ if (done) return;
+ done = true;
+ reject(self, reason);
+ });
+ } catch (ex) {
+ if (done) return;
+ done = true;
+ reject(self, ex);
+ }
+ }
+
+ Promise.prototype['catch'] = function (onRejected) {
+ return this.then(null, onRejected);
+ };
+
+ Promise.prototype.then = function (onFulfilled, onRejected) {
+ var prom = new (this.constructor)(noop);
+
+ handle(this, new Handler(onFulfilled, onRejected, prom));
+ return prom;
+ };
+
+ Promise.all = function (arr) {
+ var args = Array.prototype.slice.call(arr);
+
+ return new Promise(function (resolve, reject) {
+ if (args.length === 0) return resolve([]);
+ var remaining = args.length;
+
+ function res(i, val) {
+ try {
+ if (val && (typeof val === 'object' || typeof val === 'function')) {
+ var then = val.then;
+ if (typeof then === 'function') {
+ then.call(val, function (val) {
+ res(i, val);
+ }, reject);
+ return;
+ }
+ }
+ args[i] = val;
+ if (--remaining === 0) {
+ resolve(args);
+ }
+ } catch (ex) {
+ reject(ex);
+ }
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ res(i, args[i]);
+ }
+ });
+ };
+
+ Promise.resolve = function (value) {
+ if (value && typeof value === 'object' && value.constructor === Promise) {
+ return value;
+ }
+
+ return new Promise(function (resolve) {
+ resolve(value);
+ });
+ };
+
+ Promise.reject = function (value) {
+ return new Promise(function (resolve, reject) {
+ reject(value);
+ });
+ };
+
+ Promise.race = function (values) {
+ return new Promise(function (resolve, reject) {
+ for (var i = 0, len = values.length; i < len; i++) {
+ values[i].then(resolve, reject);
+ }
+ });
+ };
+
+ // Use polyfill for setImmediate for performance gains
+ Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||
+ function (fn) {
+ setTimeoutFunc(fn, 0);
+ };
+
+ Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
+ if (typeof console !== 'undefined' && console) {
+ console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
+ }
+ };
+
+ /**
+ * Set the immediate function to execute callbacks
+ * @param fn {function} Function to execute
+ * @deprecated
+ */
+ Promise._setImmediateFn = function _setImmediateFn(fn) {
+ Promise._immediateFn = fn;
+ };
+
+ /**
+ * Change the function to execute on unhandled rejection
+ * @param {function} fn Function to execute on unhandled rejection
+ * @deprecated
+ */
+ Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
+ Promise._unhandledRejectionFn = fn;
+ };
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = Promise;
+ } else if (!root.Promise) {
+ root.Promise = Promise;
+ }
+
+})(this);
+
+},{}],5:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _en = _dereq_(15);
+
+var _general = _dereq_(27);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var i18n = { lang: 'en', en: _en.EN };
+
+i18n.language = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (args !== null && args !== undefined && args.length) {
+
+ if (typeof args[0] !== 'string') {
+ throw new TypeError('Language code must be a string value');
+ }
+
+ if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) {
+ throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');
+ }
+
+ i18n.lang = args[0];
+
+ if (i18n[args[0]] === undefined) {
+ args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};
+ i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;
+ } else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {
+ i18n[args[0]] = args[1];
+ }
+ }
+
+ return i18n.lang;
+};
+
+i18n.t = function (message) {
+ var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
+
+
+ if (typeof message === 'string' && message.length) {
+
+ var str = void 0,
+ pluralForm = void 0;
+
+ var language = i18n.language();
+
+ var _plural = function _plural(input, number, form) {
+
+ if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
+ return input;
+ }
+
+ var _pluralForms = function () {
+ return [function () {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return [3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ } else {
+ return arguments.length <= 6 ? undefined : arguments[6];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }];
+ }();
+
+ return _pluralForms[form].apply(null, [number].concat(input));
+ };
+
+ if (i18n[language] !== undefined) {
+ str = i18n[language][message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n[language]['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ if (!str && i18n.en) {
+ str = i18n.en[message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n.en['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ str = str || message;
+
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ str = str.replace('%1', pluralParam);
+ }
+
+ return (0, _general.escapeHTML)(str);
+ }
+
+ return message;
+};
+
+_mejs2.default.i18n = i18n;
+
+if (typeof mejsL10n !== 'undefined') {
+ _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
+}
+
+exports.default = i18n;
+
+},{"15":15,"27":27,"7":7}],6:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(27);
+
+var _media2 = _dereq_(28);
+
+var _renderer = _dereq_(8);
+
+var _constants = _dereq_(25);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var MediaElement = function MediaElement(idOrNode, options, sources) {
+ var _this = this;
+
+ _classCallCheck(this, MediaElement);
+
+ var t = this;
+
+ sources = Array.isArray(sources) ? sources : null;
+
+ t.defaults = {
+ renderers: [],
+
+ fakeNodeName: 'mediaelementwrapper',
+
+ pluginPath: 'build/',
+
+ shimScriptAccess: 'sameDomain'
+ };
+
+ options = Object.assign(t.defaults, options);
+
+ t.mediaElement = _document2.default.createElement(options.fakeNodeName);
+
+ var id = idOrNode,
+ error = false;
+
+ if (typeof idOrNode === 'string') {
+ t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
+ } else {
+ t.mediaElement.originalNode = idOrNode;
+ id = idOrNode.id;
+ }
+
+ if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
+ return null;
+ }
+
+ t.mediaElement.options = options;
+ id = id || 'mejs_' + Math.random().toString().slice(2);
+
+ t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');
+
+ var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
+ if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
+ t.mediaElement.originalNode.setAttribute('preload', 'none');
+ }
+
+ t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);
+
+ t.mediaElement.appendChild(t.mediaElement.originalNode);
+
+ var processURL = function processURL(url, type) {
+ if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4 && this.status === 200) {
+ var _url = _window2.default.URL || _window2.default.webkitURL,
+ blobUrl = _url.createObjectURL(this.response);
+ t.mediaElement.originalNode.setAttribute('src', blobUrl);
+ return blobUrl;
+ }
+ return url;
+ };
+ xhr.open('GET', url);
+ xhr.responseType = 'blob';
+ xhr.send();
+ }
+
+ return url;
+ };
+
+ var mediaFiles = void 0;
+
+ if (sources !== null) {
+ mediaFiles = sources;
+ } else if (t.mediaElement.originalNode !== null) {
+
+ mediaFiles = [];
+
+ switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
+ case 'iframe':
+ mediaFiles.push({
+ type: '',
+ src: t.mediaElement.originalNode.getAttribute('src')
+ });
+ break;
+ case 'audio':
+ case 'video':
+ var _sources = t.mediaElement.originalNode.children.length,
+ nodeSource = t.mediaElement.originalNode.getAttribute('src');
+
+ if (nodeSource) {
+ var node = t.mediaElement.originalNode,
+ type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
+ mediaFiles.push({
+ type: type,
+ src: processURL(nodeSource, type)
+ });
+ }
+
+ for (var i = 0; i < _sources; i++) {
+ var n = t.mediaElement.originalNode.children[i];
+ if (n.tagName.toLowerCase() === 'source') {
+ var src = n.getAttribute('src'),
+ _type = (0, _media2.formatType)(src, n.getAttribute('type'));
+ mediaFiles.push({ type: _type, src: processURL(src, _type) });
+ }
+ }
+ break;
+ }
+ }
+
+ t.mediaElement.id = id;
+ t.mediaElement.renderers = {};
+ t.mediaElement.events = {};
+ t.mediaElement.promises = [];
+ t.mediaElement.renderer = null;
+ t.mediaElement.rendererName = null;
+
+ t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {
+
+ var t = _this,
+ media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.show();
+ t.mediaElement.renderer.setSrc(media);
+ return true;
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.hide();
+ }
+
+ var newRenderer = t.mediaElement.renderers[rendererName],
+ newRendererType = null;
+
+ if (newRenderer !== undefined && newRenderer !== null) {
+ newRenderer.show();
+ newRenderer.setSrc(media);
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ return true;
+ }
+
+ var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;
+
+ for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
+ var index = rendererArray[_i];
+
+ if (index === rendererName) {
+ var rendererList = _renderer.renderer.renderers;
+ newRendererType = rendererList[index];
+
+ var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
+ newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
+ newRenderer.name = rendererName;
+
+ t.mediaElement.renderers[newRendererType.name] = newRenderer;
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ newRenderer.show();
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ t.mediaElement.setSize = function (width, height) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.setSize(width, height);
+ }
+ };
+
+ t.mediaElement.generateError = function (message, urlList) {
+ message = message || '';
+ urlList = Array.isArray(urlList) ? urlList : [];
+ var event = (0, _general.createEvent)('error', t.mediaElement);
+ event.message = message;
+ event.urls = urlList;
+ t.mediaElement.dispatchEvent(event);
+ error = true;
+ };
+
+ var props = _mejs2.default.html5media.properties,
+ methods = _mejs2.default.html5media.methods,
+ addProperty = function addProperty(obj, name, onGet, onSet) {
+ var oldValue = obj[name];
+ var getFn = function getFn() {
+ return onGet.apply(obj, [oldValue]);
+ },
+ setFn = function setFn(newValue) {
+ oldValue = onSet.apply(obj, [newValue]);
+ return oldValue;
+ };
+
+ Object.defineProperty(obj, name, {
+ get: getFn,
+ set: setFn
+ });
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ if (propName !== 'src') {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
+ getFn = function getFn() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
+ },
+ setFn = function setFn(value) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
+ t.mediaElement.renderer['set' + capName](value);
+ }
+ };
+
+ addProperty(t.mediaElement, propName, getFn, setFn);
+ t.mediaElement['get' + capName] = getFn;
+ t.mediaElement['set' + capName] = setFn;
+ }
+ },
+ getSrc = function getSrc() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
+ },
+ setSrc = function setSrc(value) {
+ var mediaFiles = [];
+
+ if (typeof value === 'string') {
+ mediaFiles.push({
+ src: value,
+ type: value ? (0, _media2.getTypeFromFile)(value) : ''
+ });
+ } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
+ var _src = (0, _media2.absolutizeUrl)(value.src),
+ _type2 = value.type,
+ media = Object.assign(value, {
+ src: _src,
+ type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
+ });
+ mediaFiles.push(media);
+ } else if (Array.isArray(value)) {
+ for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {
+
+ var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
+ _type3 = value[_i2].type,
+ _media = Object.assign(value[_i2], {
+ src: _src2,
+ type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
+ });
+
+ mediaFiles.push(_media);
+ }
+ }
+
+ var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
+ event = void 0;
+
+ if (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) {
+ t.mediaElement.pause();
+ event = (0, _general.createEvent)('pause', t.mediaElement);
+ t.mediaElement.dispatchEvent(event);
+ }
+ t.mediaElement.originalNode.src = mediaFiles[0].src || '';
+
+ if (renderInfo === null && mediaFiles[0].src) {
+ t.mediaElement.generateError('No renderer found', mediaFiles);
+ return;
+ }
+
+ var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === '');
+ return shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
+ },
+ triggerAction = function triggerAction(methodName, args) {
+ try {
+ if (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) {
+ var response = t.mediaElement.renderer[methodName](args);
+ if (response && typeof response.then === 'function') {
+ response.catch(function () {
+ if (t.mediaElement.paused) {
+ setTimeout(function () {
+ var tmpResponse = t.mediaElement.renderer.play();
+ if (tmpResponse !== undefined) {
+ tmpResponse.catch(function () {
+ if (!t.mediaElement.renderer.paused) {
+ t.mediaElement.renderer.pause();
+ }
+ });
+ }
+ }, 150);
+ }
+ });
+ }
+ } else {
+ t.mediaElement.renderer[methodName](args);
+ }
+ } catch (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ }
+ },
+ assignMethods = function assignMethods(methodName) {
+ t.mediaElement[methodName] = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ triggerAction(methodName, args);
+ }).catch(function (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ });
+ } else {
+ triggerAction(methodName, args);
+ }
+ }
+ return null;
+ };
+ };
+
+ addProperty(t.mediaElement, 'src', getSrc, setSrc);
+ t.mediaElement.getSrc = getSrc;
+ t.mediaElement.setSrc = setSrc;
+
+ for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
+ assignGettersSetters(props[_i3]);
+ }
+
+ for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
+ assignMethods(methods[_i4]);
+ }
+
+ t.mediaElement.addEventListener = function (eventName, callback) {
+ t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];
+
+ t.mediaElement.events[eventName].push(callback);
+ };
+ t.mediaElement.removeEventListener = function (eventName, callback) {
+ if (!eventName) {
+ t.mediaElement.events = {};
+ return true;
+ }
+
+ var callbacks = t.mediaElement.events[eventName];
+
+ if (!callbacks) {
+ return true;
+ }
+
+ if (!callback) {
+ t.mediaElement.events[eventName] = [];
+ return true;
+ }
+
+ for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
+ if (callbacks[_i5] === callback) {
+ t.mediaElement.events[eventName].splice(_i5, 1);
+ return true;
+ }
+ }
+ return false;
+ };
+
+ t.mediaElement.dispatchEvent = function (event) {
+ var callbacks = t.mediaElement.events[event.type];
+ if (callbacks) {
+ for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
+ callbacks[_i6].apply(null, [event]);
+ }
+ }
+ };
+
+ t.mediaElement.destroy = function () {
+ var mediaElement = t.mediaElement.originalNode.cloneNode(true);
+ var wrapper = t.mediaElement.parentElement;
+ mediaElement.removeAttribute('id');
+ mediaElement.remove();
+ t.mediaElement.remove();
+ wrapper.appendChild(mediaElement);
+ };
+
+ if (mediaFiles.length) {
+ t.mediaElement.src = mediaFiles;
+ }
+
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }).catch(function () {
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ });
+ } else {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }
+
+ return t.mediaElement;
+};
+
+_window2.default.MediaElement = MediaElement;
+_mejs2.default.MediaElement = MediaElement;
+
+exports.default = MediaElement;
+
+},{"2":2,"25":25,"27":27,"28":28,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var mejs = {};
+
+mejs.version = '4.2.17';
+
+mejs.html5media = {
+ properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
+ readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],
+
+ methods: ['load', 'play', 'pause', 'canPlayType'],
+
+ events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],
+
+ mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
+};
+
+_window2.default.mejs = mejs;
+
+exports.default = mejs;
+
+},{"3":3}],8:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.renderer = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Renderer = function () {
+ function Renderer() {
+ _classCallCheck(this, Renderer);
+
+ this.renderers = {};
+ this.order = [];
+ }
+
+ _createClass(Renderer, [{
+ key: 'add',
+ value: function add(renderer) {
+ if (renderer.name === undefined) {
+ throw new TypeError('renderer must contain at least `name` property');
+ }
+
+ this.renderers[renderer.name] = renderer;
+ this.order.push(renderer.name);
+ }
+ }, {
+ key: 'select',
+ value: function select(mediaFiles) {
+ var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+
+ var renderersLength = renderers.length;
+
+ renderers = renderers.length ? renderers : this.order;
+
+ if (!renderersLength) {
+ var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
+ rendererRanking = function rendererRanking(renderer) {
+ for (var i = 0, total = rendererIndicator.length; i < total; i++) {
+ if (rendererIndicator[i].test(renderer)) {
+ return i;
+ }
+ }
+ return rendererIndicator.length;
+ };
+
+ renderers.sort(function (a, b) {
+ return rendererRanking(a) - rendererRanking(b);
+ });
+ }
+
+ for (var i = 0, total = renderers.length; i < total; i++) {
+ var key = renderers[i],
+ _renderer = this.renderers[key];
+
+ if (_renderer !== null && _renderer !== undefined) {
+ for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
+ if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
+ return {
+ rendererName: _renderer.name,
+ src: mediaFiles[j].src
+ };
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+ }, {
+ key: 'order',
+ set: function set(order) {
+ if (!Array.isArray(order)) {
+ throw new TypeError('order must be an array of strings.');
+ }
+
+ this._order = order;
+ },
+ get: function get() {
+ return this._order;
+ }
+ }, {
+ key: 'renderers',
+ set: function set(renderers) {
+ if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
+ throw new TypeError('renderers must be an array of objects.');
+ }
+
+ this._renderers = renderers;
+ },
+ get: function get() {
+ return this._renderers;
+ }
+ }]);
+
+ return Renderer;
+}();
+
+var renderer = exports.renderer = new Renderer();
+
+_mejs2.default.Renderers = renderer;
+
+},{"7":7}],9:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _constants = _dereq_(25);
+
+var Features = _interopRequireWildcard(_constants);
+
+var _general = _dereq_(27);
+
+var _dom = _dereq_(26);
+
+var _media = _dereq_(28);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ usePluginFullScreen: true,
+
+ fullscreenText: null,
+
+ useFakeFullscreen: false
+});
+
+Object.assign(_player2.default.prototype, {
+ isFullScreen: false,
+
+ isNativeFullScreen: false,
+
+ isInIframe: false,
+
+ isPluginClickThroughCreated: false,
+
+ fullscreenMode: '',
+
+ containerSizeTimeout: null,
+
+ buildfullscreen: function buildfullscreen(player) {
+ if (!player.isVideo) {
+ return;
+ }
+
+ player.isInIframe = _window2.default.location !== _window2.default.parent.location;
+
+ player.detectFullscreenMode();
+
+ var t = this,
+ fullscreenTitle = (0, _general.isString)(t.options.fullscreenText) ? t.options.fullscreenText : _i18n2.default.t('mejs.fullscreen'),
+ fullscreenBtn = _document2.default.createElement('div');
+
+ fullscreenBtn.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'fullscreen-button';
+ fullscreenBtn.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + fullscreenTitle + '" aria-label="' + fullscreenTitle + '" tabindex="0"></button>';
+ t.addControlElement(fullscreenBtn, 'fullscreen');
+
+ fullscreenBtn.addEventListener('click', function () {
+ var isFullScreen = Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || player.isFullScreen;
+
+ if (isFullScreen) {
+ player.exitFullScreen();
+ } else {
+ player.enterFullScreen();
+ }
+ });
+
+ player.fullscreenBtn = fullscreenBtn;
+
+ t.options.keyActions.push({
+ keys: [70],
+ action: function action(player, media, key, event) {
+ if (!event.ctrlKey) {
+ if (typeof player.enterFullScreen !== 'undefined') {
+ if (player.isFullScreen) {
+ player.exitFullScreen();
+ } else {
+ player.enterFullScreen();
+ }
+ }
+ }
+ }
+ });
+
+ t.exitFullscreenCallback = function (e) {
+ var key = e.which || e.keyCode || 0;
+ if (t.options.enableKeyboard && key === 27 && (Features.HAS_TRUE_NATIVE_FULLSCREEN && Features.IS_FULLSCREEN || t.isFullScreen)) {
+ player.exitFullScreen();
+ }
+ };
+
+ t.globalBind('keydown', t.exitFullscreenCallback);
+
+ t.normalHeight = 0;
+ t.normalWidth = 0;
+
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN) {
+ var fullscreenChanged = function fullscreenChanged() {
+ if (player.isFullScreen) {
+ if (Features.isFullScreen()) {
+ player.isNativeFullScreen = true;
+
+ player.setControlsSize();
+ } else {
+ player.isNativeFullScreen = false;
+
+ player.exitFullScreen();
+ }
+ }
+ };
+
+ player.globalBind(Features.FULLSCREEN_EVENT_NAME, fullscreenChanged);
+ }
+ },
+ cleanfullscreen: function cleanfullscreen(player) {
+ player.exitFullScreen();
+ player.globalUnbind('keydown', player.exitFullscreenCallback);
+ },
+ detectFullscreenMode: function detectFullscreenMode() {
+ var t = this,
+ isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);
+
+ var mode = '';
+
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN && isNative) {
+ mode = 'native-native';
+ } else if (Features.HAS_TRUE_NATIVE_FULLSCREEN && !isNative) {
+ mode = 'plugin-native';
+ } else if (t.usePluginFullScreen && Features.SUPPORT_POINTER_EVENTS) {
+ mode = 'plugin-click';
+ }
+
+ t.fullscreenMode = mode;
+ return mode;
+ },
+ enterFullScreen: function enterFullScreen() {
+ var t = this,
+ isNative = t.media.rendererName !== null && /(html5|native)/i.test(t.media.rendererName),
+ containerStyles = getComputedStyle(t.getElement(t.container));
+
+ if (!t.isVideo) {
+ return;
+ }
+
+ if (t.options.useFakeFullscreen === false && (Features.IS_IOS || Features.IS_SAFARI) && Features.HAS_IOS_FULLSCREEN && typeof t.media.originalNode.webkitEnterFullscreen === 'function' && t.media.originalNode.canPlayType((0, _media.getTypeFromFile)(t.media.getSrc()))) {
+ t.media.originalNode.webkitEnterFullscreen();
+ return;
+ }
+
+ (0, _dom.addClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');
+
+ t.normalHeight = parseFloat(containerStyles.height);
+ t.normalWidth = parseFloat(containerStyles.width);
+
+ if (t.fullscreenMode === 'native-native' || t.fullscreenMode === 'plugin-native') {
+ Features.requestFullScreen(t.getElement(t.container));
+
+ if (t.isInIframe) {
+ setTimeout(function checkFullscreen() {
+
+ if (t.isNativeFullScreen) {
+ var percentErrorMargin = 0.002,
+ windowWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth,
+ screenWidth = screen.width,
+ absDiff = Math.abs(screenWidth - windowWidth),
+ marginError = screenWidth * percentErrorMargin;
+
+ if (absDiff > marginError) {
+ t.exitFullScreen();
+ } else {
+ setTimeout(checkFullscreen, 500);
+ }
+ }
+ }, 1000);
+ }
+ }
+
+ t.getElement(t.container).style.width = '100%';
+ t.getElement(t.container).style.height = '100%';
+
+ t.containerSizeTimeout = setTimeout(function () {
+ t.getElement(t.container).style.width = '100%';
+ t.getElement(t.container).style.height = '100%';
+ t.setControlsSize();
+ }, 500);
+
+ if (isNative) {
+ t.node.style.width = '100%';
+ t.node.style.height = '100%';
+ } else {
+ var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
+ _total = elements.length;
+ for (var i = 0; i < _total; i++) {
+ elements[i].style.width = '100%';
+ elements[i].style.height = '100%';
+ }
+ }
+
+ if (t.options.setDimensions && typeof t.media.setSize === 'function') {
+ t.media.setSize(screen.width, screen.height);
+ }
+
+ var layers = t.getElement(t.layers).children,
+ total = layers.length;
+ for (var _i = 0; _i < total; _i++) {
+ layers[_i].style.width = '100%';
+ layers[_i].style.height = '100%';
+ }
+
+ if (t.fullscreenBtn) {
+ (0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
+ (0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
+ }
+
+ t.setControlsSize();
+ t.isFullScreen = true;
+
+ var zoomFactor = Math.min(screen.width / t.width, screen.height / t.height),
+ captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
+ if (captionText) {
+ captionText.style.fontSize = zoomFactor * 100 + '%';
+ captionText.style.lineHeight = 'normal';
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = (screen.height - t.normalHeight) / 2 - t.getElement(t.controls).offsetHeight / 2 + zoomFactor + 15 + 'px';
+ }
+ var event = (0, _general.createEvent)('enteredfullscreen', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ },
+ exitFullScreen: function exitFullScreen() {
+ var t = this,
+ isNative = t.media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName);
+
+ if (!t.isVideo) {
+ return;
+ }
+
+ clearTimeout(t.containerSizeTimeout);
+
+ if (Features.HAS_TRUE_NATIVE_FULLSCREEN && (Features.IS_FULLSCREEN || t.isFullScreen)) {
+ Features.cancelFullScreen();
+ }
+
+ (0, _dom.removeClass)(_document2.default.documentElement, t.options.classPrefix + 'fullscreen');
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'container-fullscreen');
+
+ if (t.options.setDimensions) {
+ t.getElement(t.container).style.width = t.normalWidth + 'px';
+ t.getElement(t.container).style.height = t.normalHeight + 'px';
+
+ if (isNative) {
+ t.node.style.width = t.normalWidth + 'px';
+ t.node.style.height = t.normalHeight + 'px';
+ } else {
+ var elements = t.getElement(t.container).querySelectorAll('embed, object, video'),
+ _total2 = elements.length;
+ for (var i = 0; i < _total2; i++) {
+ elements[i].style.width = t.normalWidth + 'px';
+ elements[i].style.height = t.normalHeight + 'px';
+ }
+ }
+
+ if (typeof t.media.setSize === 'function') {
+ t.media.setSize(t.normalWidth, t.normalHeight);
+ }
+
+ var layers = t.getElement(t.layers).children,
+ total = layers.length;
+ for (var _i2 = 0; _i2 < total; _i2++) {
+ layers[_i2].style.width = t.normalWidth + 'px';
+ layers[_i2].style.height = t.normalHeight + 'px';
+ }
+ }
+
+ if (t.fullscreenBtn) {
+ (0, _dom.removeClass)(t.fullscreenBtn, t.options.classPrefix + 'unfullscreen');
+ (0, _dom.addClass)(t.fullscreenBtn, t.options.classPrefix + 'fullscreen');
+ }
+
+ t.setControlsSize();
+ t.isFullScreen = false;
+
+ var captionText = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-text');
+ if (captionText) {
+ captionText.style.fontSize = '';
+ captionText.style.lineHeight = '';
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'captions-position').style.bottom = '';
+ }
+ var event = (0, _general.createEvent)('exitedfullscreen', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ }
+});
+
+},{"16":16,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"5":5}],10:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _general = _dereq_(27);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ playText: null,
+
+ pauseText: null
+});
+
+Object.assign(_player2.default.prototype, {
+ buildplaypause: function buildplaypause(player, controls, layers, media) {
+ var t = this,
+ op = t.options,
+ playTitle = (0, _general.isString)(op.playText) ? op.playText : _i18n2.default.t('mejs.play'),
+ pauseTitle = (0, _general.isString)(op.pauseText) ? op.pauseText : _i18n2.default.t('mejs.pause'),
+ play = _document2.default.createElement('div');
+
+ play.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'playpause-button ' + t.options.classPrefix + 'play';
+ play.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + playTitle + '" aria-label="' + pauseTitle + '" tabindex="0"></button>';
+ play.addEventListener('click', function () {
+ if (t.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+ });
+
+ var playBtn = play.querySelector('button');
+ t.addControlElement(play, 'playpause');
+
+ function togglePlayPause(which) {
+ if ('play' === which) {
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'play');
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
+ (0, _dom.addClass)(play, t.options.classPrefix + 'pause');
+ playBtn.setAttribute('title', pauseTitle);
+ playBtn.setAttribute('aria-label', pauseTitle);
+ } else {
+
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'replay');
+ (0, _dom.addClass)(play, t.options.classPrefix + 'play');
+ playBtn.setAttribute('title', playTitle);
+ playBtn.setAttribute('aria-label', playTitle);
+ }
+ }
+
+ togglePlayPause('pse');
+
+ media.addEventListener('loadedmetadata', function () {
+ if (media.rendererName.indexOf('flash') === -1) {
+ togglePlayPause('pse');
+ }
+ });
+ media.addEventListener('play', function () {
+ togglePlayPause('play');
+ });
+ media.addEventListener('playing', function () {
+ togglePlayPause('play');
+ });
+ media.addEventListener('pause', function () {
+ togglePlayPause('pse');
+ });
+ media.addEventListener('ended', function () {
+ if (!player.options.loop) {
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'pause');
+ (0, _dom.removeClass)(play, t.options.classPrefix + 'play');
+ (0, _dom.addClass)(play, t.options.classPrefix + 'replay');
+ playBtn.setAttribute('title', playTitle);
+ playBtn.setAttribute('aria-label', playTitle);
+ }
+ });
+ }
+});
+
+},{"16":16,"2":2,"26":26,"27":27,"5":5}],11:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _constants = _dereq_(25);
+
+var _time = _dereq_(30);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ enableProgressTooltip: true,
+
+ useSmoothHover: true,
+
+ forceLive: false
+});
+
+Object.assign(_player2.default.prototype, {
+ buildprogress: function buildprogress(player, controls, layers, media) {
+
+ var lastKeyPressTime = 0,
+ mouseIsDown = false,
+ startedPaused = false;
+
+ var t = this,
+ autoRewindInitial = player.options.autoRewind,
+ tooltip = player.options.enableProgressTooltip ? '<span class="' + t.options.classPrefix + 'time-float">' + ('<span class="' + t.options.classPrefix + 'time-float-current">00:00</span>') + ('<span class="' + t.options.classPrefix + 'time-float-corner"></span>') + '</span>' : '',
+ rail = _document2.default.createElement('div');
+
+ rail.className = t.options.classPrefix + 'time-rail';
+ rail.innerHTML = '<span class="' + t.options.classPrefix + 'time-total ' + t.options.classPrefix + 'time-slider">' + ('<span class="' + t.options.classPrefix + 'time-buffering"></span>') + ('<span class="' + t.options.classPrefix + 'time-loaded"></span>') + ('<span class="' + t.options.classPrefix + 'time-current"></span>') + ('<span class="' + t.options.classPrefix + 'time-hovered no-hover"></span>') + ('<span class="' + t.options.classPrefix + 'time-handle"><span class="' + t.options.classPrefix + 'time-handle-content"></span></span>') + ('' + tooltip) + '</span>';
+
+ t.addControlElement(rail, 'progress');
+
+ t.options.keyActions.push({
+ keys: [37, 227],
+ action: function action(player) {
+ if (!isNaN(player.duration) && player.duration > 0) {
+ if (player.isVideo) {
+ player.showControls();
+ player.startControlsTimer();
+ }
+
+ var timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');
+ if (timeSlider) {
+ timeSlider.focus();
+ }
+
+ var newTime = Math.max(player.currentTime - player.options.defaultSeekBackwardInterval(player), 0);
+
+ if (!player.paused) {
+ player.pause();
+ }
+
+ setTimeout(function () {
+ player.setCurrentTime(newTime);
+ }, 0);
+
+ setTimeout(function () {
+ player.play();
+ }, 0);
+ }
+ }
+ }, {
+ keys: [39, 228],
+ action: function action(player) {
+
+ if (!isNaN(player.duration) && player.duration > 0) {
+ if (player.isVideo) {
+ player.showControls();
+ player.startControlsTimer();
+ }
+
+ var timeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'time-total');
+ if (timeSlider) {
+ timeSlider.focus();
+ }
+
+ var newTime = Math.min(player.currentTime + player.options.defaultSeekForwardInterval(player), player.duration);
+
+ if (!player.paused) {
+ player.pause();
+ }
+
+ setTimeout(function () {
+ player.setCurrentTime(newTime);
+ }, 0);
+
+ setTimeout(function () {
+ player.play();
+ }, 0);
+ }
+ }
+ });
+
+ t.rail = controls.querySelector('.' + t.options.classPrefix + 'time-rail');
+ t.total = controls.querySelector('.' + t.options.classPrefix + 'time-total');
+ t.loaded = controls.querySelector('.' + t.options.classPrefix + 'time-loaded');
+ t.current = controls.querySelector('.' + t.options.classPrefix + 'time-current');
+ t.handle = controls.querySelector('.' + t.options.classPrefix + 'time-handle');
+ t.timefloat = controls.querySelector('.' + t.options.classPrefix + 'time-float');
+ t.timefloatcurrent = controls.querySelector('.' + t.options.classPrefix + 'time-float-current');
+ t.slider = controls.querySelector('.' + t.options.classPrefix + 'time-slider');
+ t.hovered = controls.querySelector('.' + t.options.classPrefix + 'time-hovered');
+ t.buffer = controls.querySelector('.' + t.options.classPrefix + 'time-buffering');
+ t.newTime = 0;
+ t.forcedHandlePause = false;
+ t.setTransformStyle = function (element, value) {
+ element.style.transform = value;
+ element.style.webkitTransform = value;
+ element.style.MozTransform = value;
+ element.style.msTransform = value;
+ element.style.OTransform = value;
+ };
+
+ t.buffer.style.display = 'none';
+
+ var handleMouseMove = function handleMouseMove(e) {
+ var totalStyles = getComputedStyle(t.total),
+ offsetStyles = (0, _dom.offset)(t.total),
+ width = t.total.offsetWidth,
+ transform = function () {
+ if (totalStyles.webkitTransform !== undefined) {
+ return 'webkitTransform';
+ } else if (totalStyles.mozTransform !== undefined) {
+ return 'mozTransform ';
+ } else if (totalStyles.oTransform !== undefined) {
+ return 'oTransform';
+ } else if (totalStyles.msTransform !== undefined) {
+ return 'msTransform';
+ } else {
+ return 'transform';
+ }
+ }(),
+ cssMatrix = function () {
+ if ('WebKitCSSMatrix' in window) {
+ return 'WebKitCSSMatrix';
+ } else if ('MSCSSMatrix' in window) {
+ return 'MSCSSMatrix';
+ } else if ('CSSMatrix' in window) {
+ return 'CSSMatrix';
+ }
+ }();
+
+ var percentage = 0,
+ leftPos = 0,
+ pos = 0,
+ x = void 0;
+
+ if (e.originalEvent && e.originalEvent.changedTouches) {
+ x = e.originalEvent.changedTouches[0].pageX;
+ } else if (e.changedTouches) {
+ x = e.changedTouches[0].pageX;
+ } else {
+ x = e.pageX;
+ }
+
+ if (t.getDuration()) {
+ if (x < offsetStyles.left) {
+ x = offsetStyles.left;
+ } else if (x > width + offsetStyles.left) {
+ x = width + offsetStyles.left;
+ }
+
+ pos = x - offsetStyles.left;
+ percentage = pos / width;
+ t.newTime = percentage * t.getDuration();
+
+ if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
+ t.setCurrentRailHandle(t.newTime);
+ t.updateCurrent(t.newTime);
+ }
+
+ if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
+ if (pos < 0) {
+ pos = 0;
+ }
+ if (t.options.useSmoothHover && cssMatrix !== null && typeof window[cssMatrix] !== 'undefined') {
+ var matrix = new window[cssMatrix](getComputedStyle(t.handle)[transform]),
+ handleLocation = matrix.m41,
+ hoverScaleX = pos / parseFloat(getComputedStyle(t.total).width) - handleLocation / parseFloat(getComputedStyle(t.total).width);
+
+ t.hovered.style.left = handleLocation + 'px';
+ t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');
+ t.hovered.setAttribute('pos', pos);
+
+ if (hoverScaleX >= 0) {
+ (0, _dom.removeClass)(t.hovered, 'negative');
+ } else {
+ (0, _dom.addClass)(t.hovered, 'negative');
+ }
+ }
+
+ if (t.timefloat) {
+ var half = t.timefloat.offsetWidth / 2,
+ offsetContainer = mejs.Utils.offset(t.getElement(t.container)),
+ tooltipStyles = getComputedStyle(t.timefloat);
+
+ if (x - offsetContainer.left < t.timefloat.offsetWidth) {
+ leftPos = half;
+ } else if (x - offsetContainer.left >= t.getElement(t.container).offsetWidth - half) {
+ leftPos = t.total.offsetWidth - half;
+ } else {
+ leftPos = pos;
+ }
+
+ if ((0, _dom.hasClass)(t.getElement(t.container), t.options.classPrefix + 'long-video')) {
+ leftPos += parseFloat(tooltipStyles.marginLeft) / 2 + t.timefloat.offsetWidth / 2;
+ }
+
+ t.timefloat.style.left = leftPos + 'px';
+ t.timefloatcurrent.innerHTML = (0, _time.secondsToTimeCode)(t.newTime, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat);
+ t.timefloat.style.display = 'block';
+ }
+ }
+ } else if (!_constants.IS_IOS && !_constants.IS_ANDROID && t.timefloat) {
+ leftPos = t.timefloat.offsetWidth + width >= t.getElement(t.container).offsetWidth ? t.timefloat.offsetWidth / 2 : 0;
+ t.timefloat.style.left = leftPos + 'px';
+ t.timefloat.style.left = leftPos + 'px';
+ t.timefloat.style.display = 'block';
+ }
+ },
+ updateSlider = function updateSlider() {
+ var seconds = t.getCurrentTime(),
+ timeSliderText = _i18n2.default.t('mejs.time-slider'),
+ time = (0, _time.secondsToTimeCode)(seconds, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat),
+ duration = t.getDuration();
+
+ t.slider.setAttribute('role', 'slider');
+ t.slider.tabIndex = 0;
+
+ if (media.paused) {
+ t.slider.setAttribute('aria-label', timeSliderText);
+ t.slider.setAttribute('aria-valuemin', 0);
+ t.slider.setAttribute('aria-valuemax', isNaN(duration) ? 0 : duration);
+ t.slider.setAttribute('aria-valuenow', seconds);
+ t.slider.setAttribute('aria-valuetext', time);
+ } else {
+ t.slider.removeAttribute('aria-label');
+ t.slider.removeAttribute('aria-valuemin');
+ t.slider.removeAttribute('aria-valuemax');
+ t.slider.removeAttribute('aria-valuenow');
+ t.slider.removeAttribute('aria-valuetext');
+ }
+ },
+ restartPlayer = function restartPlayer() {
+ if (new Date() - lastKeyPressTime >= 1000) {
+ t.play();
+ }
+ },
+ handleMouseup = function handleMouseup() {
+ if (mouseIsDown && t.getCurrentTime() !== null && t.newTime.toFixed(4) !== t.getCurrentTime().toFixed(4)) {
+ t.setCurrentTime(t.newTime);
+ t.setCurrentRailHandle(t.newTime);
+ t.updateCurrent(t.newTime);
+ }
+ if (t.forcedHandlePause) {
+ t.slider.focus();
+ t.play();
+ }
+ t.forcedHandlePause = false;
+ };
+
+ t.slider.addEventListener('focus', function () {
+ player.options.autoRewind = false;
+ });
+ t.slider.addEventListener('blur', function () {
+ player.options.autoRewind = autoRewindInitial;
+ });
+ t.slider.addEventListener('keydown', function (e) {
+ if (new Date() - lastKeyPressTime >= 1000) {
+ startedPaused = t.paused;
+ }
+
+ if (t.options.enableKeyboard && t.options.keyActions.length) {
+
+ var keyCode = e.which || e.keyCode || 0,
+ duration = t.getDuration(),
+ seekForward = player.options.defaultSeekForwardInterval(media),
+ seekBackward = player.options.defaultSeekBackwardInterval(media);
+
+ var seekTime = t.getCurrentTime();
+ var volume = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
+
+ if (keyCode === 38 || keyCode === 40) {
+ if (volume) {
+ volume.style.display = 'block';
+ }
+ if (t.isVideo) {
+ t.showControls();
+ t.startControlsTimer();
+ }
+
+ var newVolume = keyCode === 38 ? Math.min(t.volume + 0.1, 1) : Math.max(t.volume - 0.1, 0),
+ mutePlayer = newVolume <= 0;
+ t.setVolume(newVolume);
+ t.setMuted(mutePlayer);
+ return;
+ } else {
+ if (volume) {
+ volume.style.display = 'none';
+ }
+ }
+
+ switch (keyCode) {
+ case 37:
+ if (t.getDuration() !== Infinity) {
+ seekTime -= seekBackward;
+ }
+ break;
+ case 39:
+ if (t.getDuration() !== Infinity) {
+ seekTime += seekForward;
+ }
+ break;
+ case 36:
+ seekTime = 0;
+ break;
+ case 35:
+ seekTime = duration;
+ break;
+ case 13:
+ case 32:
+ if (_constants.IS_FIREFOX) {
+ if (t.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+ }
+ return;
+ default:
+ return;
+ }
+
+ seekTime = seekTime < 0 || isNaN(seekTime) ? 0 : seekTime >= duration ? duration : Math.floor(seekTime);
+ lastKeyPressTime = new Date();
+ if (!startedPaused) {
+ player.pause();
+ }
+
+ setTimeout(function () {
+ t.setCurrentTime(seekTime);
+ }, 0);
+
+ if (seekTime < t.getDuration() && !startedPaused) {
+ setTimeout(restartPlayer, 1100);
+ }
+
+ player.showControls();
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+
+ var events = ['mousedown', 'touchstart'];
+
+ t.slider.addEventListener('dragstart', function () {
+ return false;
+ });
+
+ for (var i = 0, total = events.length; i < total; i++) {
+ t.slider.addEventListener(events[i], function (e) {
+ t.forcedHandlePause = false;
+ if (t.getDuration() !== Infinity) {
+ if (e.which === 1 || e.which === 0) {
+ if (!t.paused) {
+ t.pause();
+ t.forcedHandlePause = true;
+ }
+
+ mouseIsDown = true;
+ handleMouseMove(e);
+ var endEvents = ['mouseup', 'touchend'];
+
+ for (var j = 0, totalEvents = endEvents.length; j < totalEvents; j++) {
+ t.getElement(t.container).addEventListener(endEvents[j], function (event) {
+ var target = event.target;
+ if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
+ handleMouseMove(event);
+ }
+ });
+ }
+ t.globalBind('mouseup.dur touchend.dur', function () {
+ handleMouseup();
+ mouseIsDown = false;
+ if (t.timefloat) {
+ t.timefloat.style.display = 'none';
+ }
+ });
+ }
+ }
+ }, _constants.SUPPORT_PASSIVE_EVENT && events[i] === 'touchstart' ? { passive: true } : false);
+ }
+ t.slider.addEventListener('mouseenter', function (e) {
+ if (e.target === t.slider && t.getDuration() !== Infinity) {
+ t.getElement(t.container).addEventListener('mousemove', function (event) {
+ var target = event.target;
+ if (target === t.slider || target.closest('.' + t.options.classPrefix + 'time-slider')) {
+ handleMouseMove(event);
+ }
+ });
+ if (t.timefloat && !_constants.IS_IOS && !_constants.IS_ANDROID) {
+ t.timefloat.style.display = 'block';
+ }
+ if (t.hovered && !_constants.IS_IOS && !_constants.IS_ANDROID && t.options.useSmoothHover) {
+ (0, _dom.removeClass)(t.hovered, 'no-hover');
+ }
+ }
+ });
+ t.slider.addEventListener('mouseleave', function () {
+ if (t.getDuration() !== Infinity) {
+ if (!mouseIsDown) {
+ if (t.timefloat) {
+ t.timefloat.style.display = 'none';
+ }
+ if (t.hovered && t.options.useSmoothHover) {
+ (0, _dom.addClass)(t.hovered, 'no-hover');
+ }
+ }
+ }
+ });
+
+ t.broadcastCallback = function (e) {
+ var broadcast = controls.querySelector('.' + t.options.classPrefix + 'broadcast');
+ if (!t.options.forceLive && t.getDuration() !== Infinity) {
+ if (broadcast) {
+ t.slider.style.display = '';
+ broadcast.remove();
+ }
+
+ player.setProgressRail(e);
+ if (!t.forcedHandlePause) {
+ player.setCurrentRail(e);
+ }
+ updateSlider();
+ } else if (!broadcast && t.options.forceLive) {
+ var label = _document2.default.createElement('span');
+ label.className = t.options.classPrefix + 'broadcast';
+ label.innerText = _i18n2.default.t('mejs.live-broadcast');
+ t.slider.style.display = 'none';
+ t.rail.appendChild(label);
+ }
+ };
+
+ media.addEventListener('progress', t.broadcastCallback);
+ media.addEventListener('timeupdate', t.broadcastCallback);
+ media.addEventListener('play', function () {
+ t.buffer.style.display = 'none';
+ });
+ media.addEventListener('playing', function () {
+ t.buffer.style.display = 'none';
+ });
+ media.addEventListener('seeking', function () {
+ t.buffer.style.display = '';
+ });
+ media.addEventListener('seeked', function () {
+ t.buffer.style.display = 'none';
+ });
+ media.addEventListener('pause', function () {
+ t.buffer.style.display = 'none';
+ });
+ media.addEventListener('waiting', function () {
+ t.buffer.style.display = '';
+ });
+ media.addEventListener('loadeddata', function () {
+ t.buffer.style.display = '';
+ });
+ media.addEventListener('canplay', function () {
+ t.buffer.style.display = 'none';
+ });
+ media.addEventListener('error', function () {
+ t.buffer.style.display = 'none';
+ });
+
+ t.getElement(t.container).addEventListener('controlsresize', function (e) {
+ if (t.getDuration() !== Infinity) {
+ player.setProgressRail(e);
+ if (!t.forcedHandlePause) {
+ player.setCurrentRail(e);
+ }
+ }
+ });
+ },
+ cleanprogress: function cleanprogress(player, controls, layers, media) {
+ media.removeEventListener('progress', player.broadcastCallback);
+ media.removeEventListener('timeupdate', player.broadcastCallback);
+ if (player.rail) {
+ player.rail.remove();
+ }
+ },
+ setProgressRail: function setProgressRail(e) {
+ var t = this,
+ target = e !== undefined ? e.detail.target || e.target : t.media;
+
+ var percent = null;
+
+ if (target && target.buffered && target.buffered.length > 0 && target.buffered.end && t.getDuration()) {
+ percent = target.buffered.end(target.buffered.length - 1) / t.getDuration();
+ } else if (target && target.bytesTotal !== undefined && target.bytesTotal > 0 && target.bufferedBytes !== undefined) {
+ percent = target.bufferedBytes / target.bytesTotal;
+ } else if (e && e.lengthComputable && e.total !== 0) {
+ percent = e.loaded / e.total;
+ }
+
+ if (percent !== null) {
+ percent = Math.min(1, Math.max(0, percent));
+
+ if (t.loaded) {
+ t.setTransformStyle(t.loaded, 'scaleX(' + percent + ')');
+ }
+ }
+ },
+ setCurrentRailHandle: function setCurrentRailHandle(fakeTime) {
+ var t = this;
+ t.setCurrentRailMain(t, fakeTime);
+ },
+ setCurrentRail: function setCurrentRail() {
+ var t = this;
+ t.setCurrentRailMain(t);
+ },
+ setCurrentRailMain: function setCurrentRailMain(t, fakeTime) {
+ if (t.getCurrentTime() !== undefined && t.getDuration()) {
+ var nTime = typeof fakeTime === 'undefined' ? t.getCurrentTime() : fakeTime;
+
+ if (t.total && t.handle) {
+ var tW = parseFloat(getComputedStyle(t.total).width);
+
+ var newWidth = Math.round(tW * nTime / t.getDuration()),
+ handlePos = newWidth - Math.round(t.handle.offsetWidth / 2);
+
+ handlePos = handlePos < 0 ? 0 : handlePos;
+ t.setTransformStyle(t.current, 'scaleX(' + newWidth / tW + ')');
+ t.setTransformStyle(t.handle, 'translateX(' + handlePos + 'px)');
+
+ if (t.options.useSmoothHover && !(0, _dom.hasClass)(t.hovered, 'no-hover')) {
+ var pos = parseInt(t.hovered.getAttribute('pos'), 10);
+ pos = isNaN(pos) ? 0 : pos;
+
+ var hoverScaleX = pos / tW - handlePos / tW;
+
+ t.hovered.style.left = handlePos + 'px';
+ t.setTransformStyle(t.hovered, 'scaleX(' + hoverScaleX + ')');
+
+ if (hoverScaleX >= 0) {
+ (0, _dom.removeClass)(t.hovered, 'negative');
+ } else {
+ (0, _dom.addClass)(t.hovered, 'negative');
+ }
+ }
+ }
+ }
+ }
+});
+
+},{"16":16,"2":2,"25":25,"26":26,"30":30,"5":5}],12:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _time = _dereq_(30);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ duration: 0,
+
+ timeAndDurationSeparator: '<span> | </span>'
+});
+
+Object.assign(_player2.default.prototype, {
+ buildcurrent: function buildcurrent(player, controls, layers, media) {
+ var t = this,
+ time = _document2.default.createElement('div');
+
+ time.className = t.options.classPrefix + 'time';
+ time.setAttribute('role', 'timer');
+ time.setAttribute('aria-live', 'off');
+ time.innerHTML = '<span class="' + t.options.classPrefix + 'currenttime">' + (0, _time.secondsToTimeCode)(0, player.options.alwaysShowHours, player.options.showTimecodeFrameCount, player.options.framesPerSecond, player.options.secondsDecimalLength, player.options.timeFormat) + '</span>';
+
+ t.addControlElement(time, 'current');
+ player.updateCurrent();
+ t.updateTimeCallback = function () {
+ if (t.controlsAreVisible) {
+ player.updateCurrent();
+ }
+ };
+ media.addEventListener('timeupdate', t.updateTimeCallback);
+ },
+ cleancurrent: function cleancurrent(player, controls, layers, media) {
+ media.removeEventListener('timeupdate', player.updateTimeCallback);
+ },
+ buildduration: function buildduration(player, controls, layers, media) {
+ var t = this,
+ currTime = controls.lastChild.querySelector('.' + t.options.classPrefix + 'currenttime');
+
+ if (currTime) {
+ controls.querySelector('.' + t.options.classPrefix + 'time').innerHTML += t.options.timeAndDurationSeparator + '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');
+ } else {
+ if (controls.querySelector('.' + t.options.classPrefix + 'currenttime')) {
+ (0, _dom.addClass)(controls.querySelector('.' + t.options.classPrefix + 'currenttime').parentNode, t.options.classPrefix + 'currenttime-container');
+ }
+
+ var duration = _document2.default.createElement('div');
+ duration.className = t.options.classPrefix + 'time ' + t.options.classPrefix + 'duration-container';
+ duration.innerHTML = '<span class="' + t.options.classPrefix + 'duration">' + ((0, _time.secondsToTimeCode)(t.options.duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat) + '</span>');
+
+ t.addControlElement(duration, 'duration');
+ }
+
+ t.updateDurationCallback = function () {
+ if (t.controlsAreVisible) {
+ player.updateDuration();
+ }
+ };
+
+ media.addEventListener('timeupdate', t.updateDurationCallback);
+ },
+ cleanduration: function cleanduration(player, controls, layers, media) {
+ media.removeEventListener('timeupdate', player.updateDurationCallback);
+ },
+ updateCurrent: function updateCurrent() {
+ var t = this;
+
+ var currentTime = t.getCurrentTime();
+
+ if (isNaN(currentTime)) {
+ currentTime = 0;
+ }
+
+ var timecode = (0, _time.secondsToTimeCode)(currentTime, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);
+
+ if (timecode.length > 5) {
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
+ } else {
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
+ }
+
+ if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime')) {
+ t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'currenttime').innerText = timecode;
+ }
+ },
+ updateDuration: function updateDuration() {
+ var t = this;
+
+ var duration = t.getDuration();
+
+ if (t.media !== undefined && (isNaN(duration) || duration === Infinity || duration < 0)) {
+ t.media.duration = t.options.duration = duration = 0;
+ }
+
+ if (t.options.duration > 0) {
+ duration = t.options.duration;
+ }
+
+ var timecode = (0, _time.secondsToTimeCode)(duration, t.options.alwaysShowHours, t.options.showTimecodeFrameCount, t.options.framesPerSecond, t.options.secondsDecimalLength, t.options.timeFormat);
+
+ if (timecode.length > 5) {
+ (0, _dom.addClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
+ } else {
+ (0, _dom.removeClass)(t.getElement(t.container), t.options.classPrefix + 'long-video');
+ }
+
+ if (t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration') && duration > 0) {
+ t.getElement(t.controls).querySelector('.' + t.options.classPrefix + 'duration').innerHTML = timecode;
+ }
+ }
+});
+
+},{"16":16,"2":2,"26":26,"30":30}],13:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _time = _dereq_(30);
+
+var _general = _dereq_(27);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ startLanguage: '',
+
+ tracksText: null,
+
+ chaptersText: null,
+
+ tracksAriaLive: false,
+
+ hideCaptionsButtonWhenEmpty: true,
+
+ toggleCaptionsButtonWhenOnlyOne: false,
+
+ slidesSelector: ''
+});
+
+Object.assign(_player2.default.prototype, {
+ hasChapters: false,
+
+ buildtracks: function buildtracks(player, controls, layers, media) {
+
+ this.findTracks();
+
+ if (!player.tracks.length && (!player.trackFiles || !player.trackFiles.length === 0)) {
+ return;
+ }
+
+ var t = this,
+ attr = t.options.tracksAriaLive ? ' role="log" aria-live="assertive" aria-atomic="false"' : '',
+ tracksTitle = (0, _general.isString)(t.options.tracksText) ? t.options.tracksText : _i18n2.default.t('mejs.captions-subtitles'),
+ chaptersTitle = (0, _general.isString)(t.options.chaptersText) ? t.options.chaptersText : _i18n2.default.t('mejs.captions-chapters'),
+ total = player.trackFiles === null ? player.tracks.length : player.trackFiles.length;
+
+ if (t.domNode.textTracks) {
+ for (var i = t.domNode.textTracks.length - 1; i >= 0; i--) {
+ t.domNode.textTracks[i].mode = 'hidden';
+ }
+ }
+
+ t.cleartracks(player);
+
+ player.captions = _document2.default.createElement('div');
+ player.captions.className = t.options.classPrefix + 'captions-layer ' + t.options.classPrefix + 'layer';
+ player.captions.innerHTML = '<div class="' + t.options.classPrefix + 'captions-position ' + t.options.classPrefix + 'captions-position-hover"' + attr + '>' + ('<span class="' + t.options.classPrefix + 'captions-text"></span>') + '</div>';
+ player.captions.style.display = 'none';
+ layers.insertBefore(player.captions, layers.firstChild);
+
+ player.captionsText = player.captions.querySelector('.' + t.options.classPrefix + 'captions-text');
+
+ player.captionsButton = _document2.default.createElement('div');
+ player.captionsButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'captions-button';
+ player.captionsButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + tracksTitle + '" aria-label="' + tracksTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'captions-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'captions-selector-list">') + ('<li class="' + t.options.classPrefix + 'captions-selector-list-item">') + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + player.id + '_captions" id="' + player.id + '_captions_none" ') + 'value="none" checked disabled>' + ('<label class="' + t.options.classPrefix + 'captions-selector-label ') + (t.options.classPrefix + 'captions-selected" ') + ('for="' + player.id + '_captions_none">' + _i18n2.default.t('mejs.none') + '</label>') + '</li>' + '</ul>' + '</div>';
+
+ t.addControlElement(player.captionsButton, 'tracks');
+
+ player.captionsButton.querySelector('.' + t.options.classPrefix + 'captions-selector-input').disabled = false;
+
+ player.chaptersButton = _document2.default.createElement('div');
+ player.chaptersButton.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'chapters-button';
+ player.chaptersButton.innerHTML = '<button type="button" aria-controls="' + t.id + '" title="' + chaptersTitle + '" aria-label="' + chaptersTitle + '" tabindex="0"></button>' + ('<div class="' + t.options.classPrefix + 'chapters-selector ' + t.options.classPrefix + 'offscreen">') + ('<ul class="' + t.options.classPrefix + 'chapters-selector-list"></ul>') + '</div>';
+
+ var subtitleCount = 0;
+
+ for (var _i = 0; _i < total; _i++) {
+ var kind = player.tracks[_i].kind,
+ src = player.tracks[_i].src;
+ if (src.trim()) {
+ if (kind === 'subtitles' || kind === 'captions') {
+ subtitleCount++;
+ } else if (kind === 'chapters' && !controls.querySelector('.' + t.options.classPrefix + 'chapter-selector')) {
+ player.captionsButton.parentNode.insertBefore(player.chaptersButton, player.captionsButton);
+ }
+ }
+ }
+
+ player.trackToLoad = -1;
+ player.selectedTrack = null;
+ player.isLoadingTrack = false;
+
+ for (var _i2 = 0; _i2 < total; _i2++) {
+ var _kind = player.tracks[_i2].kind;
+ if (player.tracks[_i2].src.trim() && (_kind === 'subtitles' || _kind === 'captions')) {
+ player.addTrackButton(player.tracks[_i2].trackId, player.tracks[_i2].srclang, player.tracks[_i2].label);
+ }
+ }
+
+ player.loadNextTrack();
+
+ var inEvents = ['mouseenter', 'focusin'],
+ outEvents = ['mouseleave', 'focusout'];
+
+ if (t.options.toggleCaptionsButtonWhenOnlyOne && subtitleCount === 1) {
+ player.captionsButton.addEventListener('click', function (e) {
+ var trackId = 'none';
+ if (player.selectedTrack === null) {
+ trackId = player.tracks[0].trackId;
+ }
+ var keyboard = e.keyCode || e.which;
+ player.setTrack(trackId, typeof keyboard !== 'undefined');
+ });
+ } else {
+ var labels = player.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selector-label'),
+ captions = player.captionsButton.querySelectorAll('input[type=radio]');
+
+ for (var _i3 = 0, _total = inEvents.length; _i3 < _total; _i3++) {
+ player.captionsButton.addEventListener(inEvents[_i3], function () {
+ (0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
+ });
+ }
+
+ for (var _i4 = 0, _total2 = outEvents.length; _i4 < _total2; _i4++) {
+ player.captionsButton.addEventListener(outEvents[_i4], function () {
+ (0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'captions-selector'), t.options.classPrefix + 'offscreen');
+ });
+ }
+
+ for (var _i5 = 0, _total3 = captions.length; _i5 < _total3; _i5++) {
+ captions[_i5].addEventListener('click', function (e) {
+ var keyboard = e.keyCode || e.which;
+ player.setTrack(this.value, typeof keyboard !== 'undefined');
+ });
+ }
+
+ for (var _i6 = 0, _total4 = labels.length; _i6 < _total4; _i6++) {
+ labels[_i6].addEventListener('click', function (e) {
+ var radio = (0, _dom.siblings)(this, function (el) {
+ return el.tagName === 'INPUT';
+ })[0],
+ event = (0, _general.createEvent)('click', radio);
+ radio.dispatchEvent(event);
+ e.preventDefault();
+ });
+ }
+
+ player.captionsButton.addEventListener('keydown', function (e) {
+ e.stopPropagation();
+ });
+ }
+
+ for (var _i7 = 0, _total5 = inEvents.length; _i7 < _total5; _i7++) {
+ player.chaptersButton.addEventListener(inEvents[_i7], function () {
+ if (this.querySelector('.' + t.options.classPrefix + 'chapters-selector-list').children.length) {
+ (0, _dom.removeClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
+ }
+ });
+ }
+
+ for (var _i8 = 0, _total6 = outEvents.length; _i8 < _total6; _i8++) {
+ player.chaptersButton.addEventListener(outEvents[_i8], function () {
+ (0, _dom.addClass)(this.querySelector('.' + t.options.classPrefix + 'chapters-selector'), t.options.classPrefix + 'offscreen');
+ });
+ }
+
+ player.chaptersButton.addEventListener('keydown', function (e) {
+ e.stopPropagation();
+ });
+
+ if (!player.options.alwaysShowControls) {
+ player.getElement(player.container).addEventListener('controlsshown', function () {
+ (0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
+ });
+
+ player.getElement(player.container).addEventListener('controlshidden', function () {
+ if (!media.paused) {
+ (0, _dom.removeClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
+ }
+ });
+ } else {
+ (0, _dom.addClass)(player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'captions-position'), t.options.classPrefix + 'captions-position-hover');
+ }
+
+ media.addEventListener('timeupdate', function () {
+ player.displayCaptions();
+ });
+
+ if (player.options.slidesSelector !== '') {
+ player.slidesContainer = _document2.default.querySelectorAll(player.options.slidesSelector);
+
+ media.addEventListener('timeupdate', function () {
+ player.displaySlides();
+ });
+ }
+ },
+ cleartracks: function cleartracks(player) {
+ if (player) {
+ if (player.captions) {
+ player.captions.remove();
+ }
+ if (player.chapters) {
+ player.chapters.remove();
+ }
+ if (player.captionsText) {
+ player.captionsText.remove();
+ }
+ if (player.captionsButton) {
+ player.captionsButton.remove();
+ }
+ if (player.chaptersButton) {
+ player.chaptersButton.remove();
+ }
+ }
+ },
+ rebuildtracks: function rebuildtracks() {
+ var t = this;
+ t.findTracks();
+ t.buildtracks(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
+ },
+ findTracks: function findTracks() {
+ var t = this,
+ tracktags = t.trackFiles === null ? t.node.querySelectorAll('track') : t.trackFiles,
+ total = tracktags.length;
+
+ t.tracks = [];
+ for (var i = 0; i < total; i++) {
+ var track = tracktags[i],
+ srclang = track.getAttribute('srclang').toLowerCase() || '',
+ trackId = t.id + '_track_' + i + '_' + track.getAttribute('kind') + '_' + srclang;
+ t.tracks.push({
+ trackId: trackId,
+ srclang: srclang,
+ src: track.getAttribute('src'),
+ kind: track.getAttribute('kind'),
+ label: track.getAttribute('label') || '',
+ entries: [],
+ isLoaded: false
+ });
+ }
+ },
+ setTrack: function setTrack(trackId, setByKeyboard) {
+
+ var t = this,
+ radios = t.captionsButton.querySelectorAll('input[type="radio"]'),
+ captions = t.captionsButton.querySelectorAll('.' + t.options.classPrefix + 'captions-selected'),
+ track = t.captionsButton.querySelector('input[value="' + trackId + '"]');
+
+ for (var i = 0, total = radios.length; i < total; i++) {
+ radios[i].checked = false;
+ }
+
+ for (var _i9 = 0, _total7 = captions.length; _i9 < _total7; _i9++) {
+ (0, _dom.removeClass)(captions[_i9], t.options.classPrefix + 'captions-selected');
+ }
+
+ track.checked = true;
+ var labels = (0, _dom.siblings)(track, function (el) {
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
+ });
+ for (var _i10 = 0, _total8 = labels.length; _i10 < _total8; _i10++) {
+ (0, _dom.addClass)(labels[_i10], t.options.classPrefix + 'captions-selected');
+ }
+
+ if (trackId === 'none') {
+ t.selectedTrack = null;
+ (0, _dom.removeClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
+ } else {
+ for (var _i11 = 0, _total9 = t.tracks.length; _i11 < _total9; _i11++) {
+ var _track = t.tracks[_i11];
+ if (_track.trackId === trackId) {
+ if (t.selectedTrack === null) {
+ (0, _dom.addClass)(t.captionsButton, t.options.classPrefix + 'captions-enabled');
+ }
+ t.selectedTrack = _track;
+ t.captions.setAttribute('lang', t.selectedTrack.srclang);
+ t.displayCaptions();
+ break;
+ }
+ }
+ }
+
+ var event = (0, _general.createEvent)('captionschange', t.media);
+ event.detail.caption = t.selectedTrack;
+ t.media.dispatchEvent(event);
+
+ if (!setByKeyboard) {
+ setTimeout(function () {
+ t.getElement(t.container).focus();
+ }, 500);
+ }
+ },
+ loadNextTrack: function loadNextTrack() {
+ var t = this;
+
+ t.trackToLoad++;
+ if (t.trackToLoad < t.tracks.length) {
+ t.isLoadingTrack = true;
+ t.loadTrack(t.trackToLoad);
+ } else {
+ t.isLoadingTrack = false;
+ t.checkForTracks();
+ }
+ },
+ loadTrack: function loadTrack(index) {
+ var t = this,
+ track = t.tracks[index];
+
+ if (track !== undefined && (track.src !== undefined || track.src !== "")) {
+ (0, _dom.ajax)(track.src, 'text', function (d) {
+ track.entries = typeof d === 'string' && /<tt\s+xml/ig.exec(d) ? _mejs2.default.TrackFormatParser.dfxp.parse(d) : _mejs2.default.TrackFormatParser.webvtt.parse(d);
+
+ track.isLoaded = true;
+ t.enableTrackButton(track);
+ t.loadNextTrack();
+
+ if (track.kind === 'slides') {
+ t.setupSlides(track);
+ } else if (track.kind === 'chapters' && !t.hasChapters) {
+ t.drawChapters(track);
+ t.hasChapters = true;
+ }
+ }, function () {
+ t.removeTrackButton(track.trackId);
+ t.loadNextTrack();
+ });
+ }
+ },
+ enableTrackButton: function enableTrackButton(track) {
+ var t = this,
+ lang = track.srclang,
+ target = _document2.default.getElementById('' + track.trackId);
+
+ if (!target) {
+ return;
+ }
+
+ var label = track.label;
+
+ if (label === '') {
+ label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
+ }
+ target.disabled = false;
+ var targetSiblings = (0, _dom.siblings)(target, function (el) {
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'captions-selector-label');
+ });
+ for (var i = 0, total = targetSiblings.length; i < total; i++) {
+ targetSiblings[i].innerHTML = label;
+ }
+
+ if (t.options.startLanguage === lang) {
+ target.checked = true;
+ var event = (0, _general.createEvent)('click', target);
+ target.dispatchEvent(event);
+ }
+ },
+ removeTrackButton: function removeTrackButton(trackId) {
+ var element = _document2.default.getElementById('' + trackId);
+ if (element) {
+ var button = element.closest('li');
+ if (button) {
+ button.remove();
+ }
+ }
+ },
+ addTrackButton: function addTrackButton(trackId, lang, label) {
+ var t = this;
+ if (label === '') {
+ label = _i18n2.default.t(_mejs2.default.language.codes[lang]) || lang;
+ }
+
+ t.captionsButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'captions-selector-list-item">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_captions" id="' + trackId + '" value="' + trackId + '" disabled>') + ('<label class="' + t.options.classPrefix + 'captions-selector-label"') + ('for="' + trackId + '">' + label + ' (loading)</label>') + '</li>';
+ },
+ checkForTracks: function checkForTracks() {
+ var t = this;
+
+ var hasSubtitles = false;
+
+ if (t.options.hideCaptionsButtonWhenEmpty) {
+ for (var i = 0, total = t.tracks.length; i < total; i++) {
+ var kind = t.tracks[i].kind;
+ if ((kind === 'subtitles' || kind === 'captions') && t.tracks[i].isLoaded) {
+ hasSubtitles = true;
+ break;
+ }
+ }
+
+ t.captionsButton.style.display = hasSubtitles ? '' : 'none';
+ t.setControlsSize();
+ }
+ },
+ displayCaptions: function displayCaptions() {
+ if (this.tracks === undefined) {
+ return;
+ }
+
+ var t = this,
+ track = t.selectedTrack,
+ sanitize = function sanitize(html) {
+ var div = _document2.default.createElement('div');
+ div.innerHTML = html;
+
+ var scripts = div.getElementsByTagName('script');
+ var i = scripts.length;
+ while (i--) {
+ scripts[i].remove();
+ }
+
+ var allElements = div.getElementsByTagName('*');
+ for (var _i12 = 0, n = allElements.length; _i12 < n; _i12++) {
+ var attributesObj = allElements[_i12].attributes,
+ attributes = Array.prototype.slice.call(attributesObj);
+
+ for (var j = 0, total = attributes.length; j < total; j++) {
+ if (attributes[j].name.startsWith('on') || attributes[j].value.startsWith('javascript')) {
+ allElements[_i12].remove();
+ } else if (attributes[j].name === 'style') {
+ allElements[_i12].removeAttribute(attributes[j].name);
+ }
+ }
+ }
+ return div.innerHTML;
+ };
+
+ if (track !== null && track.isLoaded) {
+ var i = t.searchTrackPosition(track.entries, t.media.currentTime);
+ if (i > -1) {
+ var text = track.entries[i].text;
+ if (typeof t.options.captionTextPreprocessor === 'function') text = t.options.captionTextPreprocessor(text);
+ t.captionsText.innerHTML = sanitize(text);
+ t.captionsText.className = t.options.classPrefix + 'captions-text ' + (track.entries[i].identifier || '');
+ t.captions.style.display = '';
+ t.captions.style.height = '0px';
+ return;
+ }
+ t.captions.style.display = 'none';
+ } else {
+ t.captions.style.display = 'none';
+ }
+ },
+ setupSlides: function setupSlides(track) {
+ var t = this;
+ t.slides = track;
+ t.slides.entries.imgs = [t.slides.entries.length];
+ t.showSlide(0);
+ },
+ showSlide: function showSlide(index) {
+ var _this = this;
+
+ var t = this;
+
+ if (t.tracks === undefined || t.slidesContainer === undefined) {
+ return;
+ }
+
+ var url = t.slides.entries[index].text;
+
+ var img = t.slides.entries[index].imgs;
+
+ if (img === undefined || img.fadeIn === undefined) {
+ var image = _document2.default.createElement('img');
+ image.src = url;
+ image.addEventListener('load', function () {
+ var self = _this,
+ visible = (0, _dom.siblings)(self, function (el) {
+ return visible(el);
+ });
+ self.style.display = 'none';
+ t.slidesContainer.innerHTML += self.innerHTML;
+ (0, _dom.fadeIn)(t.slidesContainer.querySelector(image));
+ for (var i = 0, total = visible.length; i < total; i++) {
+ (0, _dom.fadeOut)(visible[i], 400);
+ }
+ });
+ t.slides.entries[index].imgs = img = image;
+ } else if (!(0, _dom.visible)(img)) {
+ var _visible = (0, _dom.siblings)(self, function (el) {
+ return _visible(el);
+ });
+ (0, _dom.fadeIn)(t.slidesContainer.querySelector(img));
+ for (var i = 0, total = _visible.length; i < total; i++) {
+ (0, _dom.fadeOut)(_visible[i]);
+ }
+ }
+ },
+ displaySlides: function displaySlides() {
+ var t = this;
+
+ if (this.slides === undefined) {
+ return;
+ }
+
+ var slides = t.slides,
+ i = t.searchTrackPosition(slides.entries, t.media.currentTime);
+
+ if (i > -1) {
+ t.showSlide(i);
+ }
+ },
+ drawChapters: function drawChapters(chapters) {
+ var t = this,
+ total = chapters.entries.length;
+
+ if (!total) {
+ return;
+ }
+
+ t.chaptersButton.querySelector('ul').innerHTML = '';
+
+ for (var i = 0; i < total; i++) {
+ t.chaptersButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'chapters-selector-list-item" ' + 'role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false">' + ('<input type="radio" class="' + t.options.classPrefix + 'captions-selector-input" ') + ('name="' + t.id + '_chapters" id="' + t.id + '_chapters_' + i + '" value="' + chapters.entries[i].start + '" disabled>') + ('<label class="' + t.options.classPrefix + 'chapters-selector-label"') + ('for="' + t.id + '_chapters_' + i + '">' + chapters.entries[i].text + '</label>') + '</li>';
+ }
+
+ var radios = t.chaptersButton.querySelectorAll('input[type="radio"]'),
+ labels = t.chaptersButton.querySelectorAll('.' + t.options.classPrefix + 'chapters-selector-label');
+
+ for (var _i13 = 0, _total10 = radios.length; _i13 < _total10; _i13++) {
+ radios[_i13].disabled = false;
+ radios[_i13].checked = false;
+ radios[_i13].addEventListener('click', function (e) {
+ var self = this,
+ listItems = t.chaptersButton.querySelectorAll('li'),
+ label = (0, _dom.siblings)(self, function (el) {
+ return (0, _dom.hasClass)(el, t.options.classPrefix + 'chapters-selector-label');
+ })[0];
+
+ self.checked = true;
+ self.parentNode.setAttribute('aria-checked', true);
+ (0, _dom.addClass)(label, t.options.classPrefix + 'chapters-selected');
+ (0, _dom.removeClass)(t.chaptersButton.querySelector('.' + t.options.classPrefix + 'chapters-selected'), t.options.classPrefix + 'chapters-selected');
+
+ for (var _i14 = 0, _total11 = listItems.length; _i14 < _total11; _i14++) {
+ listItems[_i14].setAttribute('aria-checked', false);
+ }
+
+ var keyboard = e.keyCode || e.which;
+ if (typeof keyboard === 'undefined') {
+ setTimeout(function () {
+ t.getElement(t.container).focus();
+ }, 500);
+ }
+
+ t.media.setCurrentTime(parseFloat(self.value));
+ if (t.media.paused) {
+ t.media.play();
+ }
+ });
+ }
+
+ for (var _i15 = 0, _total12 = labels.length; _i15 < _total12; _i15++) {
+ labels[_i15].addEventListener('click', function (e) {
+ var radio = (0, _dom.siblings)(this, function (el) {
+ return el.tagName === 'INPUT';
+ })[0],
+ event = (0, _general.createEvent)('click', radio);
+ radio.dispatchEvent(event);
+ e.preventDefault();
+ });
+ }
+ },
+ searchTrackPosition: function searchTrackPosition(tracks, currentTime) {
+ var lo = 0,
+ hi = tracks.length - 1,
+ mid = void 0,
+ start = void 0,
+ stop = void 0;
+
+ while (lo <= hi) {
+ mid = lo + hi >> 1;
+ start = tracks[mid].start;
+ stop = tracks[mid].stop;
+
+ if (currentTime >= start && currentTime < stop) {
+ return mid;
+ } else if (start < currentTime) {
+ lo = mid + 1;
+ } else if (start > currentTime) {
+ hi = mid - 1;
+ }
+ }
+
+ return -1;
+ }
+});
+
+_mejs2.default.language = {
+ codes: {
+ af: 'mejs.afrikaans',
+ sq: 'mejs.albanian',
+ ar: 'mejs.arabic',
+ be: 'mejs.belarusian',
+ bg: 'mejs.bulgarian',
+ ca: 'mejs.catalan',
+ zh: 'mejs.chinese',
+ 'zh-cn': 'mejs.chinese-simplified',
+ 'zh-tw': 'mejs.chines-traditional',
+ hr: 'mejs.croatian',
+ cs: 'mejs.czech',
+ da: 'mejs.danish',
+ nl: 'mejs.dutch',
+ en: 'mejs.english',
+ et: 'mejs.estonian',
+ fl: 'mejs.filipino',
+ fi: 'mejs.finnish',
+ fr: 'mejs.french',
+ gl: 'mejs.galician',
+ de: 'mejs.german',
+ el: 'mejs.greek',
+ ht: 'mejs.haitian-creole',
+ iw: 'mejs.hebrew',
+ hi: 'mejs.hindi',
+ hu: 'mejs.hungarian',
+ is: 'mejs.icelandic',
+ id: 'mejs.indonesian',
+ ga: 'mejs.irish',
+ it: 'mejs.italian',
+ ja: 'mejs.japanese',
+ ko: 'mejs.korean',
+ lv: 'mejs.latvian',
+ lt: 'mejs.lithuanian',
+ mk: 'mejs.macedonian',
+ ms: 'mejs.malay',
+ mt: 'mejs.maltese',
+ no: 'mejs.norwegian',
+ fa: 'mejs.persian',
+ pl: 'mejs.polish',
+ pt: 'mejs.portuguese',
+ ro: 'mejs.romanian',
+ ru: 'mejs.russian',
+ sr: 'mejs.serbian',
+ sk: 'mejs.slovak',
+ sl: 'mejs.slovenian',
+ es: 'mejs.spanish',
+ sw: 'mejs.swahili',
+ sv: 'mejs.swedish',
+ tl: 'mejs.tagalog',
+ th: 'mejs.thai',
+ tr: 'mejs.turkish',
+ uk: 'mejs.ukrainian',
+ vi: 'mejs.vietnamese',
+ cy: 'mejs.welsh',
+ yi: 'mejs.yiddish'
+ }
+};
+
+_mejs2.default.TrackFormatParser = {
+ webvtt: {
+ pattern: /^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
+
+ parse: function parse(trackText) {
+ var lines = trackText.split(/\r?\n/),
+ entries = [];
+
+ var timecode = void 0,
+ text = void 0,
+ identifier = void 0;
+
+ for (var i = 0, total = lines.length; i < total; i++) {
+ timecode = this.pattern.exec(lines[i]);
+
+ if (timecode && i < lines.length) {
+ if (i - 1 >= 0 && lines[i - 1] !== '') {
+ identifier = lines[i - 1];
+ }
+ i++;
+
+ text = lines[i];
+ i++;
+ while (lines[i] !== '' && i < lines.length) {
+ text = text + '\n' + lines[i];
+ i++;
+ }
+ text = text === null ? '' : text.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
+ entries.push({
+ identifier: identifier,
+ start: (0, _time.convertSMPTEtoSeconds)(timecode[1]) === 0 ? 0.200 : (0, _time.convertSMPTEtoSeconds)(timecode[1]),
+ stop: (0, _time.convertSMPTEtoSeconds)(timecode[3]),
+ text: text,
+ settings: timecode[5]
+ });
+ }
+ identifier = '';
+ }
+ return entries;
+ }
+ },
+
+ dfxp: {
+ parse: function parse(trackText) {
+ var trackElem = _document2.default.adoptNode(new DOMParser().parseFromString(trackText, 'application/xml').documentElement),
+ container = trackElem.querySelector('div'),
+ lines = container.querySelectorAll('p'),
+ styleNode = _document2.default.getElementById(container.getAttribute('style')),
+ entries = [];
+
+ var styles = void 0;
+
+ if (styleNode) {
+ styleNode.removeAttribute('id');
+ var attributes = styleNode.attributes;
+ if (attributes.length) {
+ styles = {};
+ for (var i = 0, total = attributes.length; i < total; i++) {
+ styles[attributes[i].name.split(":")[1]] = attributes[i].value;
+ }
+ }
+ }
+
+ for (var _i16 = 0, _total13 = lines.length; _i16 < _total13; _i16++) {
+ var style = void 0,
+ _temp = {
+ start: null,
+ stop: null,
+ style: null,
+ text: null
+ };
+
+ if (lines[_i16].getAttribute('begin')) {
+ _temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('begin'));
+ }
+ if (!_temp.start && lines[_i16 - 1].getAttribute('end')) {
+ _temp.start = (0, _time.convertSMPTEtoSeconds)(lines[_i16 - 1].getAttribute('end'));
+ }
+ if (lines[_i16].getAttribute('end')) {
+ _temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16].getAttribute('end'));
+ }
+ if (!_temp.stop && lines[_i16 + 1].getAttribute('begin')) {
+ _temp.stop = (0, _time.convertSMPTEtoSeconds)(lines[_i16 + 1].getAttribute('begin'));
+ }
+
+ if (styles) {
+ style = '';
+ for (var _style in styles) {
+ style += _style + ': ' + styles[_style] + ';';
+ }
+ }
+ if (style) {
+ _temp.style = style;
+ }
+ if (_temp.start === 0) {
+ _temp.start = 0.200;
+ }
+ _temp.text = lines[_i16].innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
+ entries.push(_temp);
+ }
+ return entries;
+ }
+ }
+};
+
+},{"16":16,"2":2,"26":26,"27":27,"30":30,"5":5,"7":7}],14:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _constants = _dereq_(25);
+
+var _general = _dereq_(27);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+Object.assign(_player.config, {
+ muteText: null,
+
+ unmuteText: null,
+
+ allyVolumeControlText: null,
+
+ hideVolumeOnTouchDevices: true,
+
+ audioVolume: 'horizontal',
+
+ videoVolume: 'vertical',
+
+ startVolume: 0.8
+});
+
+Object.assign(_player2.default.prototype, {
+ buildvolume: function buildvolume(player, controls, layers, media) {
+ if ((_constants.IS_ANDROID || _constants.IS_IOS) && this.options.hideVolumeOnTouchDevices) {
+ return;
+ }
+
+ var t = this,
+ mode = t.isVideo ? t.options.videoVolume : t.options.audioVolume,
+ muteText = (0, _general.isString)(t.options.muteText) ? t.options.muteText : _i18n2.default.t('mejs.mute'),
+ unmuteText = (0, _general.isString)(t.options.unmuteText) ? t.options.unmuteText : _i18n2.default.t('mejs.unmute'),
+ volumeControlText = (0, _general.isString)(t.options.allyVolumeControlText) ? t.options.allyVolumeControlText : _i18n2.default.t('mejs.volume-help-text'),
+ mute = _document2.default.createElement('div');
+
+ mute.className = t.options.classPrefix + 'button ' + t.options.classPrefix + 'volume-button ' + t.options.classPrefix + 'mute';
+ mute.innerHTML = mode === 'horizontal' ? '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' : '<button type="button" aria-controls="' + t.id + '" title="' + muteText + '" aria-label="' + muteText + '" tabindex="0"></button>' + ('<a href="javascript:void(0);" class="' + t.options.classPrefix + 'volume-slider" ') + ('aria-label="' + _i18n2.default.t('mejs.volume-slider') + '" aria-valuemin="0" aria-valuemax="100" role="slider" ') + 'aria-orientation="vertical">' + ('<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>') + ('<div class="' + t.options.classPrefix + 'volume-total">') + ('<div class="' + t.options.classPrefix + 'volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'volume-handle"></div>') + '</div>' + '</a>';
+
+ t.addControlElement(mute, 'volume');
+
+ t.options.keyActions.push({
+ keys: [38],
+ action: function action(player) {
+ var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
+ if (volumeSlider && volumeSlider.matches(':focus')) {
+ volumeSlider.style.display = 'block';
+ }
+ if (player.isVideo) {
+ player.showControls();
+ player.startControlsTimer();
+ }
+
+ var newVolume = Math.min(player.volume + 0.1, 1);
+ player.setVolume(newVolume);
+ if (newVolume > 0) {
+ player.setMuted(false);
+ }
+ }
+ }, {
+ keys: [40],
+ action: function action(player) {
+ var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
+ if (volumeSlider) {
+ volumeSlider.style.display = 'block';
+ }
+
+ if (player.isVideo) {
+ player.showControls();
+ player.startControlsTimer();
+ }
+
+ var newVolume = Math.max(player.volume - 0.1, 0);
+ player.setVolume(newVolume);
+
+ if (newVolume <= 0.1) {
+ player.setMuted(true);
+ }
+ }
+ }, {
+ keys: [77],
+ action: function action(player) {
+ var volumeSlider = player.getElement(player.container).querySelector('.' + t.options.classPrefix + 'volume-slider');
+ if (volumeSlider) {
+ volumeSlider.style.display = 'block';
+ }
+
+ if (player.isVideo) {
+ player.showControls();
+ player.startControlsTimer();
+ }
+ if (player.media.muted) {
+ player.setMuted(false);
+ } else {
+ player.setMuted(true);
+ }
+ }
+ });
+
+ if (mode === 'horizontal') {
+ var anchor = _document2.default.createElement('a');
+ anchor.className = t.options.classPrefix + 'horizontal-volume-slider';
+ anchor.href = 'javascript:void(0);';
+ anchor.setAttribute('aria-label', _i18n2.default.t('mejs.volume-slider'));
+ anchor.setAttribute('aria-valuemin', 0);
+ anchor.setAttribute('aria-valuemax', 100);
+ anchor.setAttribute('aria-valuenow', 100);
+ anchor.setAttribute('role', 'slider');
+ anchor.innerHTML += '<span class="' + t.options.classPrefix + 'offscreen">' + volumeControlText + '</span>' + ('<div class="' + t.options.classPrefix + 'horizontal-volume-total">') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-current"></div>') + ('<div class="' + t.options.classPrefix + 'horizontal-volume-handle"></div>') + '</div>';
+ mute.parentNode.insertBefore(anchor, mute.nextSibling);
+ }
+
+ var mouseIsDown = false,
+ mouseIsOver = false,
+ modified = false,
+ updateVolumeSlider = function updateVolumeSlider() {
+ var volume = Math.floor(media.volume * 100);
+ volumeSlider.setAttribute('aria-valuenow', volume);
+ volumeSlider.setAttribute('aria-valuetext', volume + '%');
+ };
+
+ var volumeSlider = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-slider') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-slider'),
+ volumeTotal = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-total') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-total'),
+ volumeCurrent = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-current') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-current'),
+ volumeHandle = mode === 'vertical' ? t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'volume-handle') : t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'horizontal-volume-handle'),
+ positionVolumeHandle = function positionVolumeHandle(volume) {
+
+ if (volume === null || isNaN(volume) || volume === undefined) {
+ return;
+ }
+
+ volume = Math.max(0, volume);
+ volume = Math.min(volume, 1);
+
+ if (volume === 0) {
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
+ var button = mute.firstElementChild;
+ button.setAttribute('title', unmuteText);
+ button.setAttribute('aria-label', unmuteText);
+ } else {
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
+ var _button = mute.firstElementChild;
+ _button.setAttribute('title', muteText);
+ _button.setAttribute('aria-label', muteText);
+ }
+
+ var volumePercentage = volume * 100 + '%',
+ volumeStyles = getComputedStyle(volumeHandle);
+
+ if (mode === 'vertical') {
+ volumeCurrent.style.bottom = 0;
+ volumeCurrent.style.height = volumePercentage;
+ volumeHandle.style.bottom = volumePercentage;
+ volumeHandle.style.marginBottom = -parseFloat(volumeStyles.height) / 2 + 'px';
+ } else {
+ volumeCurrent.style.left = 0;
+ volumeCurrent.style.width = volumePercentage;
+ volumeHandle.style.left = volumePercentage;
+ volumeHandle.style.marginLeft = -parseFloat(volumeStyles.width) / 2 + 'px';
+ }
+ },
+ handleVolumeMove = function handleVolumeMove(e) {
+ var totalOffset = (0, _dom.offset)(volumeTotal),
+ volumeStyles = getComputedStyle(volumeTotal);
+
+ modified = true;
+
+ var volume = null;
+
+ if (mode === 'vertical') {
+ var railHeight = parseFloat(volumeStyles.height),
+ newY = e.pageY - totalOffset.top;
+
+ volume = (railHeight - newY) / railHeight;
+
+ if (totalOffset.top === 0 || totalOffset.left === 0) {
+ return;
+ }
+ } else {
+ var railWidth = parseFloat(volumeStyles.width),
+ newX = e.pageX - totalOffset.left;
+
+ volume = newX / railWidth;
+ }
+
+ volume = Math.max(0, volume);
+ volume = Math.min(volume, 1);
+
+ positionVolumeHandle(volume);
+
+ t.setMuted(volume === 0);
+ t.setVolume(volume);
+
+ e.preventDefault();
+ e.stopPropagation();
+ },
+ toggleMute = function toggleMute() {
+ if (t.muted) {
+ positionVolumeHandle(0);
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'mute');
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'unmute');
+ } else {
+
+ positionVolumeHandle(media.volume);
+ (0, _dom.removeClass)(mute, t.options.classPrefix + 'unmute');
+ (0, _dom.addClass)(mute, t.options.classPrefix + 'mute');
+ }
+ };
+
+ player.getElement(player.container).addEventListener('keydown', function (e) {
+ var hasFocus = !!e.target.closest('.' + t.options.classPrefix + 'container');
+ if (!hasFocus && mode === 'vertical') {
+ volumeSlider.style.display = 'none';
+ }
+ });
+
+ mute.addEventListener('mouseenter', function (e) {
+ if (e.target === mute) {
+ volumeSlider.style.display = 'block';
+ mouseIsOver = true;
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ mute.addEventListener('focusin', function () {
+ volumeSlider.style.display = 'block';
+ mouseIsOver = true;
+ });
+
+ mute.addEventListener('focusout', function (e) {
+ if ((!e.relatedTarget || e.relatedTarget && !e.relatedTarget.matches('.' + t.options.classPrefix + 'volume-slider')) && mode === 'vertical') {
+ volumeSlider.style.display = 'none';
+ }
+ });
+ mute.addEventListener('mouseleave', function () {
+ mouseIsOver = false;
+ if (!mouseIsDown && mode === 'vertical') {
+ volumeSlider.style.display = 'none';
+ }
+ });
+ mute.addEventListener('focusout', function () {
+ mouseIsOver = false;
+ });
+ mute.addEventListener('keydown', function (e) {
+ if (t.options.enableKeyboard && t.options.keyActions.length) {
+ var keyCode = e.which || e.keyCode || 0,
+ volume = media.volume;
+
+ switch (keyCode) {
+ case 38:
+ volume = Math.min(volume + 0.1, 1);
+ break;
+ case 40:
+ volume = Math.max(0, volume - 0.1);
+ break;
+ default:
+ return true;
+ }
+
+ mouseIsDown = false;
+ positionVolumeHandle(volume);
+ media.setVolume(volume);
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ mute.querySelector('button').addEventListener('click', function () {
+ media.setMuted(!media.muted);
+ var event = (0, _general.createEvent)('volumechange', media);
+ media.dispatchEvent(event);
+ });
+
+ volumeSlider.addEventListener('dragstart', function () {
+ return false;
+ });
+
+ volumeSlider.addEventListener('mouseover', function () {
+ mouseIsOver = true;
+ });
+ volumeSlider.addEventListener('focusin', function () {
+ volumeSlider.style.display = 'block';
+ mouseIsOver = true;
+ });
+ volumeSlider.addEventListener('focusout', function () {
+ mouseIsOver = false;
+ if (!mouseIsDown && mode === 'vertical') {
+ volumeSlider.style.display = 'none';
+ }
+ });
+ volumeSlider.addEventListener('mousedown', function (e) {
+ handleVolumeMove(e);
+ t.globalBind('mousemove.vol', function (event) {
+ var target = event.target;
+ if (mouseIsDown && (target === volumeSlider || target.closest(mode === 'vertical' ? '.' + t.options.classPrefix + 'volume-slider' : '.' + t.options.classPrefix + 'horizontal-volume-slider'))) {
+ handleVolumeMove(event);
+ }
+ });
+ t.globalBind('mouseup.vol', function () {
+ mouseIsDown = false;
+ if (!mouseIsOver && mode === 'vertical') {
+ volumeSlider.style.display = 'none';
+ }
+ });
+ mouseIsDown = true;
+ e.preventDefault();
+ e.stopPropagation();
+ });
+
+ media.addEventListener('volumechange', function (e) {
+ if (!mouseIsDown) {
+ toggleMute();
+ }
+ updateVolumeSlider(e);
+ });
+
+ var rendered = false;
+ media.addEventListener('rendererready', function () {
+ if (!modified) {
+ setTimeout(function () {
+ rendered = true;
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
+ media.setMuted(true);
+ }
+ media.setVolume(player.options.startVolume);
+ t.setControlsSize();
+ }, 250);
+ }
+ });
+
+ media.addEventListener('loadedmetadata', function () {
+ setTimeout(function () {
+ if (!modified && !rendered) {
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
+ media.setMuted(true);
+ }
+ if (player.options.startVolume === 0) {
+ player.options.startVolume = 0;
+ }
+ media.setVolume(player.options.startVolume);
+ t.setControlsSize();
+ }
+ rendered = false;
+ }, 250);
+ });
+
+ if (player.options.startVolume === 0 || media.originalNode.muted) {
+ media.setMuted(true);
+ if (player.options.startVolume === 0) {
+ player.options.startVolume = 0;
+ }
+ toggleMute();
+ }
+
+ t.getElement(t.container).addEventListener('controlsresize', function () {
+ toggleMute();
+ });
+ }
+});
+
+},{"16":16,"2":2,"25":25,"26":26,"27":27,"5":5}],15:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var EN = exports.EN = {
+ 'mejs.plural-form': 1,
+
+ 'mejs.download-file': 'Download File',
+
+ 'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',
+
+ 'mejs.fullscreen': 'Fullscreen',
+
+ 'mejs.play': 'Play',
+ 'mejs.pause': 'Pause',
+
+ 'mejs.time-slider': 'Time Slider',
+ 'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
+ 'mejs.live-broadcast': 'Live Broadcast',
+
+ 'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
+ 'mejs.unmute': 'Unmute',
+ 'mejs.mute': 'Mute',
+ 'mejs.volume-slider': 'Volume Slider',
+
+ 'mejs.video-player': 'Video Player',
+ 'mejs.audio-player': 'Audio Player',
+
+ 'mejs.captions-subtitles': 'Captions/Subtitles',
+ 'mejs.captions-chapters': 'Chapters',
+ 'mejs.none': 'None',
+ 'mejs.afrikaans': 'Afrikaans',
+ 'mejs.albanian': 'Albanian',
+ 'mejs.arabic': 'Arabic',
+ 'mejs.belarusian': 'Belarusian',
+ 'mejs.bulgarian': 'Bulgarian',
+ 'mejs.catalan': 'Catalan',
+ 'mejs.chinese': 'Chinese',
+ 'mejs.chinese-simplified': 'Chinese (Simplified)',
+ 'mejs.chinese-traditional': 'Chinese (Traditional)',
+ 'mejs.croatian': 'Croatian',
+ 'mejs.czech': 'Czech',
+ 'mejs.danish': 'Danish',
+ 'mejs.dutch': 'Dutch',
+ 'mejs.english': 'English',
+ 'mejs.estonian': 'Estonian',
+ 'mejs.filipino': 'Filipino',
+ 'mejs.finnish': 'Finnish',
+ 'mejs.french': 'French',
+ 'mejs.galician': 'Galician',
+ 'mejs.german': 'German',
+ 'mejs.greek': 'Greek',
+ 'mejs.haitian-creole': 'Haitian Creole',
+ 'mejs.hebrew': 'Hebrew',
+ 'mejs.hindi': 'Hindi',
+ 'mejs.hungarian': 'Hungarian',
+ 'mejs.icelandic': 'Icelandic',
+ 'mejs.indonesian': 'Indonesian',
+ 'mejs.irish': 'Irish',
+ 'mejs.italian': 'Italian',
+ 'mejs.japanese': 'Japanese',
+ 'mejs.korean': 'Korean',
+ 'mejs.latvian': 'Latvian',
+ 'mejs.lithuanian': 'Lithuanian',
+ 'mejs.macedonian': 'Macedonian',
+ 'mejs.malay': 'Malay',
+ 'mejs.maltese': 'Maltese',
+ 'mejs.norwegian': 'Norwegian',
+ 'mejs.persian': 'Persian',
+ 'mejs.polish': 'Polish',
+ 'mejs.portuguese': 'Portuguese',
+ 'mejs.romanian': 'Romanian',
+ 'mejs.russian': 'Russian',
+ 'mejs.serbian': 'Serbian',
+ 'mejs.slovak': 'Slovak',
+ 'mejs.slovenian': 'Slovenian',
+ 'mejs.spanish': 'Spanish',
+ 'mejs.swahili': 'Swahili',
+ 'mejs.swedish': 'Swedish',
+ 'mejs.tagalog': 'Tagalog',
+ 'mejs.thai': 'Thai',
+ 'mejs.turkish': 'Turkish',
+ 'mejs.ukrainian': 'Ukrainian',
+ 'mejs.vietnamese': 'Vietnamese',
+ 'mejs.welsh': 'Welsh',
+ 'mejs.yiddish': 'Yiddish'
+};
+
+},{}],16:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.config = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _mediaelement = _dereq_(6);
+
+var _mediaelement2 = _interopRequireDefault(_mediaelement);
+
+var _default = _dereq_(17);
+
+var _default2 = _interopRequireDefault(_default);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _constants = _dereq_(25);
+
+var _general = _dereq_(27);
+
+var _time = _dereq_(30);
+
+var _media = _dereq_(28);
+
+var _dom = _dereq_(26);
+
+var dom = _interopRequireWildcard(_dom);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+_mejs2.default.mepIndex = 0;
+
+_mejs2.default.players = {};
+
+var config = exports.config = {
+ poster: '',
+
+ showPosterWhenEnded: false,
+
+ showPosterWhenPaused: false,
+
+ defaultVideoWidth: 480,
+
+ defaultVideoHeight: 270,
+
+ videoWidth: -1,
+
+ videoHeight: -1,
+
+ defaultAudioWidth: 400,
+
+ defaultAudioHeight: 40,
+
+ defaultSeekBackwardInterval: function defaultSeekBackwardInterval(media) {
+ return media.getDuration() * 0.05;
+ },
+
+ defaultSeekForwardInterval: function defaultSeekForwardInterval(media) {
+ return media.getDuration() * 0.05;
+ },
+
+ setDimensions: true,
+
+ audioWidth: -1,
+
+ audioHeight: -1,
+
+ loop: false,
+
+ autoRewind: true,
+
+ enableAutosize: true,
+
+ timeFormat: '',
+
+ alwaysShowHours: false,
+
+ showTimecodeFrameCount: false,
+
+ framesPerSecond: 25,
+
+ alwaysShowControls: false,
+
+ hideVideoControlsOnLoad: false,
+
+ hideVideoControlsOnPause: false,
+
+ clickToPlayPause: true,
+
+ controlsTimeoutDefault: 1500,
+
+ controlsTimeoutMouseEnter: 2500,
+
+ controlsTimeoutMouseLeave: 1000,
+
+ iPadUseNativeControls: false,
+
+ iPhoneUseNativeControls: false,
+
+ AndroidUseNativeControls: false,
+
+ features: ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'],
+
+ useDefaultControls: false,
+
+ isVideo: true,
+
+ stretching: 'auto',
+
+ classPrefix: 'mejs__',
+
+ enableKeyboard: true,
+
+ pauseOtherPlayers: true,
+
+ secondsDecimalLength: 0,
+
+ customError: null,
+
+ keyActions: [{
+ keys: [32, 179],
+ action: function action(player) {
+
+ if (!_constants.IS_FIREFOX) {
+ if (player.paused || player.ended) {
+ player.play();
+ } else {
+ player.pause();
+ }
+ }
+ }
+ }]
+};
+
+_mejs2.default.MepDefaults = config;
+
+var MediaElementPlayer = function () {
+ function MediaElementPlayer(node, o) {
+ _classCallCheck(this, MediaElementPlayer);
+
+ var t = this,
+ element = typeof node === 'string' ? _document2.default.getElementById(node) : node;
+
+ if (!(t instanceof MediaElementPlayer)) {
+ return new MediaElementPlayer(element, o);
+ }
+
+ t.node = t.media = element;
+
+ if (!t.node) {
+ return;
+ }
+
+ if (t.media.player) {
+ return t.media.player;
+ }
+
+ t.hasFocus = false;
+
+ t.controlsAreVisible = true;
+
+ t.controlsEnabled = true;
+
+ t.controlsTimer = null;
+
+ t.currentMediaTime = 0;
+
+ t.proxy = null;
+
+ if (o === undefined) {
+ var options = t.node.getAttribute('data-mejsoptions');
+ o = options ? JSON.parse(options) : {};
+ }
+
+ t.options = Object.assign({}, config, o);
+
+ if (t.options.loop && !t.media.getAttribute('loop')) {
+ t.media.loop = true;
+ t.node.loop = true;
+ } else if (t.media.loop) {
+ t.options.loop = true;
+ }
+
+ if (!t.options.timeFormat) {
+ t.options.timeFormat = 'mm:ss';
+ if (t.options.alwaysShowHours) {
+ t.options.timeFormat = 'hh:mm:ss';
+ }
+ if (t.options.showTimecodeFrameCount) {
+ t.options.timeFormat += ':ff';
+ }
+ }
+
+ (0, _time.calculateTimeFormat)(0, t.options, t.options.framesPerSecond || 25);
+
+ t.id = 'mep_' + _mejs2.default.mepIndex++;
+
+ _mejs2.default.players[t.id] = t;
+
+ t.init();
+
+ return t;
+ }
+
+ _createClass(MediaElementPlayer, [{
+ key: 'getElement',
+ value: function getElement(element) {
+ return element;
+ }
+ }, {
+ key: 'init',
+ value: function init() {
+ var t = this,
+ playerOptions = Object.assign({}, t.options, {
+ success: function success(media, domNode) {
+ t._meReady(media, domNode);
+ },
+ error: function error(e) {
+ t._handleError(e);
+ }
+ }),
+ tagName = t.node.tagName.toLowerCase();
+
+ t.isDynamic = tagName !== 'audio' && tagName !== 'video' && tagName !== 'iframe';
+ t.isVideo = t.isDynamic ? t.options.isVideo : tagName !== 'audio' && t.options.isVideo;
+ t.mediaFiles = null;
+ t.trackFiles = null;
+
+ if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls) {
+ t.node.setAttribute('controls', true);
+
+ if (_constants.IS_IPAD && t.node.getAttribute('autoplay')) {
+ t.play();
+ }
+ } else if ((t.isVideo || !t.isVideo && (t.options.features.length || t.options.useDefaultControls)) && !(_constants.IS_ANDROID && t.options.AndroidUseNativeControls)) {
+ t.node.removeAttribute('controls');
+ var videoPlayerTitle = t.isVideo ? _i18n2.default.t('mejs.video-player') : _i18n2.default.t('mejs.audio-player');
+
+ var offscreen = _document2.default.createElement('span');
+ offscreen.className = t.options.classPrefix + 'offscreen';
+ offscreen.innerText = videoPlayerTitle;
+ t.media.parentNode.insertBefore(offscreen, t.media);
+
+ t.container = _document2.default.createElement('div');
+ t.getElement(t.container).id = t.id;
+ t.getElement(t.container).className = t.options.classPrefix + 'container ' + t.options.classPrefix + 'container-keyboard-inactive ' + t.media.className;
+ t.getElement(t.container).tabIndex = 0;
+ t.getElement(t.container).setAttribute('role', 'application');
+ t.getElement(t.container).setAttribute('aria-label', videoPlayerTitle);
+ t.getElement(t.container).innerHTML = '<div class="' + t.options.classPrefix + 'inner">' + ('<div class="' + t.options.classPrefix + 'mediaelement"></div>') + ('<div class="' + t.options.classPrefix + 'layers"></div>') + ('<div class="' + t.options.classPrefix + 'controls"></div>') + '</div>';
+ t.getElement(t.container).addEventListener('focus', function (e) {
+ if (!t.controlsAreVisible && !t.hasFocus && t.controlsEnabled) {
+ t.showControls(true);
+
+ var btnSelector = (0, _general.isNodeAfter)(e.relatedTarget, t.getElement(t.container)) ? '.' + t.options.classPrefix + 'controls .' + t.options.classPrefix + 'button:last-child > button' : '.' + t.options.classPrefix + 'playpause-button > button',
+ button = t.getElement(t.container).querySelector(btnSelector);
+
+ button.focus();
+ }
+ });
+ t.node.parentNode.insertBefore(t.getElement(t.container), t.node);
+
+ if (!t.options.features.length && !t.options.useDefaultControls) {
+ t.getElement(t.container).style.background = 'transparent';
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls').style.display = 'none';
+ }
+
+ if (t.isVideo && t.options.stretching === 'fill' && !dom.hasClass(t.getElement(t.container).parentNode, t.options.classPrefix + 'fill-container')) {
+ t.outerContainer = t.media.parentNode;
+
+ var wrapper = _document2.default.createElement('div');
+ wrapper.className = t.options.classPrefix + 'fill-container';
+ t.getElement(t.container).parentNode.insertBefore(wrapper, t.getElement(t.container));
+ wrapper.appendChild(t.getElement(t.container));
+ }
+
+ if (_constants.IS_ANDROID) {
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'android');
+ }
+ if (_constants.IS_IOS) {
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ios');
+ }
+ if (_constants.IS_IPAD) {
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'ipad');
+ }
+ if (_constants.IS_IPHONE) {
+ dom.addClass(t.getElement(t.container), t.options.classPrefix + 'iphone');
+ }
+ dom.addClass(t.getElement(t.container), t.isVideo ? t.options.classPrefix + 'video' : t.options.classPrefix + 'audio');
+
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'mediaelement').appendChild(t.node);
+
+ t.media.player = t;
+
+ t.controls = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'controls');
+ t.layers = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'layers');
+
+ var tagType = t.isVideo ? 'video' : 'audio',
+ capsTagName = tagType.substring(0, 1).toUpperCase() + tagType.substring(1);
+
+ if (t.options[tagType + 'Width'] > 0 || t.options[tagType + 'Width'].toString().indexOf('%') > -1) {
+ t.width = t.options[tagType + 'Width'];
+ } else if (t.node.style.width !== '' && t.node.style.width !== null) {
+ t.width = t.node.style.width;
+ } else if (t.node.getAttribute('width')) {
+ t.width = t.node.getAttribute('width');
+ } else {
+ t.width = t.options['default' + capsTagName + 'Width'];
+ }
+
+ if (t.options[tagType + 'Height'] > 0 || t.options[tagType + 'Height'].toString().indexOf('%') > -1) {
+ t.height = t.options[tagType + 'Height'];
+ } else if (t.node.style.height !== '' && t.node.style.height !== null) {
+ t.height = t.node.style.height;
+ } else if (t.node.getAttribute('height')) {
+ t.height = t.node.getAttribute('height');
+ } else {
+ t.height = t.options['default' + capsTagName + 'Height'];
+ }
+
+ t.initialAspectRatio = t.height >= t.width ? t.width / t.height : t.height / t.width;
+
+ t.setPlayerSize(t.width, t.height);
+
+ playerOptions.pluginWidth = t.width;
+ playerOptions.pluginHeight = t.height;
+ } else if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
+ t.node.style.display = 'none';
+ }
+
+ _mejs2.default.MepDefaults = playerOptions;
+
+ new _mediaelement2.default(t.media, playerOptions, t.mediaFiles);
+
+ if (t.getElement(t.container) !== undefined && t.options.features.length && t.controlsAreVisible && !t.options.hideVideoControlsOnLoad) {
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ }
+ }
+ }, {
+ key: 'showControls',
+ value: function showControls(doAnimation) {
+ var t = this;
+
+ doAnimation = doAnimation === undefined || doAnimation;
+
+ if (t.controlsAreVisible || !t.isVideo) {
+ return;
+ }
+
+ if (doAnimation) {
+ (function () {
+ dom.fadeIn(t.getElement(t.controls), 200, function () {
+ dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ });
+
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
+
+ var _loop = function _loop(i, total) {
+ dom.fadeIn(controls[i], 200, function () {
+ dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
+ });
+ };
+
+ for (var i = 0, total = controls.length; i < total; i++) {
+ _loop(i, total);
+ }
+ })();
+ } else {
+ dom.removeClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
+ t.getElement(t.controls).style.display = '';
+ t.getElement(t.controls).style.opacity = 1;
+
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
+ for (var i = 0, total = controls.length; i < total; i++) {
+ dom.removeClass(controls[i], t.options.classPrefix + 'offscreen');
+ controls[i].style.display = '';
+ }
+
+ var event = (0, _general.createEvent)('controlsshown', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ }
+
+ t.controlsAreVisible = true;
+ t.setControlsSize();
+ }
+ }, {
+ key: 'hideControls',
+ value: function hideControls(doAnimation, forceHide) {
+ var t = this;
+
+ doAnimation = doAnimation === undefined || doAnimation;
+
+ if (forceHide !== true && (!t.controlsAreVisible || t.options.alwaysShowControls || t.paused && t.readyState === 4 && (!t.options.hideVideoControlsOnLoad && t.currentTime <= 0 || !t.options.hideVideoControlsOnPause && t.currentTime > 0) || t.isVideo && !t.options.hideVideoControlsOnLoad && !t.readyState || t.ended)) {
+ return;
+ }
+
+ if (doAnimation) {
+ (function () {
+ dom.fadeOut(t.getElement(t.controls), 200, function () {
+ dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
+ t.getElement(t.controls).style.display = '';
+ var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ });
+
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
+
+ var _loop2 = function _loop2(i, total) {
+ dom.fadeOut(controls[i], 200, function () {
+ dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
+ controls[i].style.display = '';
+ });
+ };
+
+ for (var i = 0, total = controls.length; i < total; i++) {
+ _loop2(i, total);
+ }
+ })();
+ } else {
+ dom.addClass(t.getElement(t.controls), t.options.classPrefix + 'offscreen');
+ t.getElement(t.controls).style.display = '';
+ t.getElement(t.controls).style.opacity = 0;
+
+ var controls = t.getElement(t.container).querySelectorAll('.' + t.options.classPrefix + 'control');
+ for (var i = 0, total = controls.length; i < total; i++) {
+ dom.addClass(controls[i], t.options.classPrefix + 'offscreen');
+ controls[i].style.display = '';
+ }
+
+ var event = (0, _general.createEvent)('controlshidden', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ }
+
+ t.controlsAreVisible = false;
+ }
+ }, {
+ key: 'startControlsTimer',
+ value: function startControlsTimer(timeout) {
+ var t = this;
+
+ timeout = typeof timeout !== 'undefined' ? timeout : t.options.controlsTimeoutDefault;
+
+ t.killControlsTimer('start');
+
+ t.controlsTimer = setTimeout(function () {
+ t.hideControls();
+ t.killControlsTimer('hide');
+ }, timeout);
+ }
+ }, {
+ key: 'killControlsTimer',
+ value: function killControlsTimer() {
+ var t = this;
+
+ if (t.controlsTimer !== null) {
+ clearTimeout(t.controlsTimer);
+ delete t.controlsTimer;
+ t.controlsTimer = null;
+ }
+ }
+ }, {
+ key: 'disableControls',
+ value: function disableControls() {
+ var t = this;
+
+ t.killControlsTimer();
+ t.controlsEnabled = false;
+ t.hideControls(false, true);
+ }
+ }, {
+ key: 'enableControls',
+ value: function enableControls() {
+ var t = this;
+
+ t.controlsEnabled = true;
+ t.showControls(false);
+ }
+ }, {
+ key: '_setDefaultPlayer',
+ value: function _setDefaultPlayer() {
+ var t = this;
+ if (t.proxy) {
+ t.proxy.pause();
+ }
+ t.proxy = new _default2.default(t);
+ t.media.addEventListener('loadedmetadata', function () {
+ if (t.getCurrentTime() > 0 && t.currentMediaTime > 0) {
+ t.setCurrentTime(t.currentMediaTime);
+ if (!_constants.IS_IOS && !_constants.IS_ANDROID) {
+ t.play();
+ }
+ }
+ });
+ }
+ }, {
+ key: '_meReady',
+ value: function _meReady(media, domNode) {
+ var t = this,
+ autoplayAttr = domNode.getAttribute('autoplay'),
+ autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),
+ isNative = media.rendererName !== null && /(native|html5)/i.test(media.rendererName);
+
+ if (t.getElement(t.controls)) {
+ t.enableControls();
+ }
+
+ if (t.getElement(t.container) && t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play')) {
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-play').style.display = '';
+ }
+
+ if (t.created) {
+ return;
+ }
+
+ t.created = true;
+ t.media = media;
+ t.domNode = domNode;
+
+ if (!(_constants.IS_ANDROID && t.options.AndroidUseNativeControls) && !(_constants.IS_IPAD && t.options.iPadUseNativeControls) && !(_constants.IS_IPHONE && t.options.iPhoneUseNativeControls)) {
+ if (!t.isVideo && !t.options.features.length && !t.options.useDefaultControls) {
+ if (autoplay && isNative) {
+ t.play();
+ }
+
+ if (t.options.success) {
+
+ if (typeof t.options.success === 'string') {
+ _window2.default[t.options.success](t.media, t.domNode, t);
+ } else {
+ t.options.success(t.media, t.domNode, t);
+ }
+ }
+
+ return;
+ }
+
+ t.featurePosition = {};
+
+ t._setDefaultPlayer();
+
+ t.buildposter(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
+ t.buildkeyboard(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
+ t.buildoverlays(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
+
+ if (t.options.useDefaultControls) {
+ var defaultControls = ['playpause', 'current', 'progress', 'duration', 'tracks', 'volume', 'fullscreen'];
+ t.options.features = defaultControls.concat(t.options.features.filter(function (item) {
+ return defaultControls.indexOf(item) === -1;
+ }));
+ }
+
+ t.buildfeatures(t, t.getElement(t.controls), t.getElement(t.layers), t.media);
+
+ var event = (0, _general.createEvent)('controlsready', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+
+ t.setPlayerSize(t.width, t.height);
+ t.setControlsSize();
+
+ if (t.isVideo) {
+ t.clickToPlayPauseCallback = function () {
+
+ if (t.options.clickToPlayPause) {
+ var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
+ pressed = button.getAttribute('aria-pressed');
+
+ if (t.paused && pressed) {
+ t.pause();
+ } else if (t.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+
+ button.setAttribute('aria-pressed', !pressed);
+ t.getElement(t.container).focus();
+ }
+ };
+
+ t.createIframeLayer();
+
+ t.media.addEventListener('click', t.clickToPlayPauseCallback);
+
+ if ((_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls) {
+ t.node.addEventListener('touchstart', function () {
+ if (t.controlsAreVisible) {
+ t.hideControls(false);
+ } else {
+ if (t.controlsEnabled) {
+ t.showControls(false);
+ }
+ }
+ }, _constants.SUPPORT_PASSIVE_EVENT ? { passive: true } : false);
+ } else {
+ t.getElement(t.container).addEventListener('mouseenter', function () {
+ if (t.controlsEnabled) {
+ if (!t.options.alwaysShowControls) {
+ t.killControlsTimer('enter');
+ t.showControls();
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
+ }
+ }
+ });
+ t.getElement(t.container).addEventListener('mousemove', function () {
+ if (t.controlsEnabled) {
+ if (!t.controlsAreVisible) {
+ t.showControls();
+ }
+ if (!t.options.alwaysShowControls) {
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
+ }
+ }
+ });
+ t.getElement(t.container).addEventListener('mouseleave', function () {
+ if (t.controlsEnabled) {
+ if (!t.paused && !t.options.alwaysShowControls) {
+ t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
+ }
+ }
+ });
+ }
+
+ if (t.options.hideVideoControlsOnLoad) {
+ t.hideControls(false);
+ }
+
+ if (t.options.enableAutosize) {
+ t.media.addEventListener('loadedmetadata', function (e) {
+ var target = e !== undefined ? e.detail.target || e.target : t.media;
+ if (t.options.videoHeight <= 0 && !t.domNode.getAttribute('height') && !t.domNode.style.height && target !== null && !isNaN(target.videoHeight)) {
+ t.setPlayerSize(target.videoWidth, target.videoHeight);
+ t.setControlsSize();
+ t.media.setSize(target.videoWidth, target.videoHeight);
+ }
+ });
+ }
+ }
+
+ t.media.addEventListener('play', function () {
+ t.hasFocus = true;
+
+ for (var playerIndex in _mejs2.default.players) {
+ if (_mejs2.default.players.hasOwnProperty(playerIndex)) {
+ var p = _mejs2.default.players[playerIndex];
+
+ if (p.id !== t.id && t.options.pauseOtherPlayers && !p.paused && !p.ended && p.options.ignorePauseOtherPlayersOption !== true) {
+ p.pause();
+ p.hasFocus = false;
+ }
+ }
+ }
+
+ if (!(_constants.IS_ANDROID || _constants.IS_IOS) && !t.options.alwaysShowControls && t.isVideo) {
+ t.hideControls();
+ }
+ });
+
+ t.media.addEventListener('ended', function () {
+ if (t.options.autoRewind) {
+ try {
+ t.setCurrentTime(0);
+
+ setTimeout(function () {
+ var loadingElement = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-loading');
+ if (loadingElement && loadingElement.parentNode) {
+ loadingElement.parentNode.style.display = 'none';
+ }
+ }, 20);
+ } catch (exp) {
+
+ }
+ }
+
+ if (typeof t.media.renderer.stop === 'function') {
+ t.media.renderer.stop();
+ } else {
+ t.pause();
+ }
+
+ if (t.setProgressRail) {
+ t.setProgressRail();
+ }
+ if (t.setCurrentRail) {
+ t.setCurrentRail();
+ }
+
+ if (t.options.loop) {
+ t.play();
+ } else if (!t.options.alwaysShowControls && t.controlsEnabled) {
+ t.showControls();
+ }
+ });
+
+ t.media.addEventListener('loadedmetadata', function () {
+
+ (0, _time.calculateTimeFormat)(t.getDuration(), t.options, t.options.framesPerSecond || 25);
+
+ if (t.updateDuration) {
+ t.updateDuration();
+ }
+ if (t.updateCurrent) {
+ t.updateCurrent();
+ }
+
+ if (!t.isFullScreen) {
+ t.setPlayerSize(t.width, t.height);
+ t.setControlsSize();
+ }
+ });
+
+ var duration = null;
+ t.media.addEventListener('timeupdate', function () {
+ if (!isNaN(t.getDuration()) && duration !== t.getDuration()) {
+ duration = t.getDuration();
+ (0, _time.calculateTimeFormat)(duration, t.options, t.options.framesPerSecond || 25);
+
+ if (t.updateDuration) {
+ t.updateDuration();
+ }
+ if (t.updateCurrent) {
+ t.updateCurrent();
+ }
+
+ t.setControlsSize();
+ }
+ });
+
+ t.getElement(t.container).addEventListener('click', function (e) {
+ dom.addClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
+ });
+
+ t.getElement(t.container).addEventListener('focusin', function (e) {
+ dom.removeClass(e.currentTarget, t.options.classPrefix + 'container-keyboard-inactive');
+ if (t.isVideo && !_constants.IS_ANDROID && !_constants.IS_IOS && t.controlsEnabled && !t.options.alwaysShowControls) {
+ t.killControlsTimer('enter');
+ t.showControls();
+ t.startControlsTimer(t.options.controlsTimeoutMouseEnter);
+ }
+ });
+
+ t.getElement(t.container).addEventListener('focusout', function (e) {
+ setTimeout(function () {
+ if (e.relatedTarget) {
+ if (t.keyboardAction && !e.relatedTarget.closest('.' + t.options.classPrefix + 'container')) {
+ t.keyboardAction = false;
+ if (t.isVideo && !t.options.alwaysShowControls && !t.paused) {
+ t.startControlsTimer(t.options.controlsTimeoutMouseLeave);
+ }
+ }
+ }
+ }, 0);
+ });
+
+ setTimeout(function () {
+ t.setPlayerSize(t.width, t.height);
+ t.setControlsSize();
+ }, 0);
+
+ t.globalResizeCallback = function () {
+ if (!(t.isFullScreen || _constants.HAS_TRUE_NATIVE_FULLSCREEN && _document2.default.webkitIsFullScreen)) {
+ t.setPlayerSize(t.width, t.height);
+ }
+
+ t.setControlsSize();
+ };
+
+ t.globalBind('resize', t.globalResizeCallback);
+ }
+
+ if (autoplay && isNative) {
+ t.play();
+ }
+
+ if (t.options.success) {
+ if (typeof t.options.success === 'string') {
+ _window2.default[t.options.success](t.media, t.domNode, t);
+ } else {
+ t.options.success(t.media, t.domNode, t);
+ }
+ }
+ }
+ }, {
+ key: '_handleError',
+ value: function _handleError(e, media, node) {
+ var t = this,
+ play = t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-play');
+
+ if (play) {
+ play.style.display = 'none';
+ }
+
+ if (t.options.error) {
+ t.options.error(e, media, node);
+ }
+
+ if (t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay')) {
+ t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'cannotplay').remove();
+ }
+
+ var errorContainer = _document2.default.createElement('div');
+ errorContainer.className = t.options.classPrefix + 'cannotplay';
+ errorContainer.style.width = '100%';
+ errorContainer.style.height = '100%';
+
+ var errorContent = typeof t.options.customError === 'function' ? t.options.customError(t.media, t.media.originalNode) : t.options.customError,
+ imgError = '';
+
+ if (!errorContent) {
+ var poster = t.media.originalNode.getAttribute('poster');
+ if (poster) {
+ imgError = '<img src="' + poster + '" alt="' + _mejs2.default.i18n.t('mejs.download-file') + '">';
+ }
+
+ if (e.message) {
+ errorContent = '<p>' + e.message + '</p>';
+ }
+
+ if (e.urls) {
+ for (var i = 0, total = e.urls.length; i < total; i++) {
+ var url = e.urls[i];
+ errorContent += '<a href="' + url.src + '" data-type="' + url.type + '"><span>' + _mejs2.default.i18n.t('mejs.download-file') + ': ' + url.src + '</span></a>';
+ }
+ }
+ }
+
+ if (errorContent && t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error')) {
+ errorContainer.innerHTML = errorContent;
+ t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').innerHTML = '' + imgError + errorContainer.outerHTML;
+ t.getElement(t.layers).querySelector('.' + t.options.classPrefix + 'overlay-error').parentNode.style.display = 'block';
+ }
+
+ if (t.controlsEnabled) {
+ t.disableControls();
+ }
+ }
+ }, {
+ key: 'setPlayerSize',
+ value: function setPlayerSize(width, height) {
+ var t = this;
+
+ if (!t.options.setDimensions) {
+ return false;
+ }
+
+ if (typeof width !== 'undefined') {
+ t.width = width;
+ }
+
+ if (typeof height !== 'undefined') {
+ t.height = height;
+ }
+
+ switch (t.options.stretching) {
+ case 'fill':
+ if (t.isVideo) {
+ t.setFillMode();
+ } else {
+ t.setDimensions(t.width, t.height);
+ }
+ break;
+ case 'responsive':
+ t.setResponsiveMode();
+ break;
+ case 'none':
+ t.setDimensions(t.width, t.height);
+ break;
+
+ default:
+ if (t.hasFluidMode() === true) {
+ t.setResponsiveMode();
+ } else {
+ t.setDimensions(t.width, t.height);
+ }
+ break;
+ }
+ }
+ }, {
+ key: 'hasFluidMode',
+ value: function hasFluidMode() {
+ var t = this;
+
+ return t.height.toString().indexOf('%') !== -1 || t.node && t.node.style.maxWidth && t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width || t.node && t.node.currentStyle && t.node.currentStyle.maxWidth === '100%';
+ }
+ }, {
+ key: 'setResponsiveMode',
+ value: function setResponsiveMode() {
+ var t = this,
+ parent = function () {
+
+ var parentEl = void 0,
+ el = t.getElement(t.container);
+
+ while (el) {
+ try {
+ if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
+ return _window2.default.frameElement;
+ } else {
+ parentEl = el.parentElement;
+ }
+ } catch (e) {
+ parentEl = el.parentElement;
+ }
+
+ if (parentEl && dom.visible(parentEl)) {
+ return parentEl;
+ }
+ el = parentEl;
+ }
+
+ return null;
+ }(),
+ parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null),
+ nativeWidth = function () {
+ if (t.isVideo) {
+ if (t.node.videoWidth && t.node.videoWidth > 0) {
+ return t.node.videoWidth;
+ } else if (t.node.getAttribute('width')) {
+ return t.node.getAttribute('width');
+ } else {
+ return t.options.defaultVideoWidth;
+ }
+ } else {
+ return t.options.defaultAudioWidth;
+ }
+ }(),
+ nativeHeight = function () {
+ if (t.isVideo) {
+ if (t.node.videoHeight && t.node.videoHeight > 0) {
+ return t.node.videoHeight;
+ } else if (t.node.getAttribute('height')) {
+ return t.node.getAttribute('height');
+ } else {
+ return t.options.defaultVideoHeight;
+ }
+ } else {
+ return t.options.defaultAudioHeight;
+ }
+ }(),
+ aspectRatio = function () {
+ if (!t.options.enableAutosize) {
+ return t.initialAspectRatio;
+ }
+ var ratio = 1;
+ if (!t.isVideo) {
+ return ratio;
+ }
+
+ if (t.node.videoWidth && t.node.videoWidth > 0 && t.node.videoHeight && t.node.videoHeight > 0) {
+ ratio = t.height >= t.width ? t.node.videoWidth / t.node.videoHeight : t.node.videoHeight / t.node.videoWidth;
+ } else {
+ ratio = t.initialAspectRatio;
+ }
+
+ if (isNaN(ratio) || ratio < 0.01 || ratio > 100) {
+ ratio = 1;
+ }
+
+ return ratio;
+ }(),
+ parentHeight = parseFloat(parentStyles.height);
+
+ var newHeight = void 0,
+ parentWidth = parseFloat(parentStyles.width);
+
+ if (t.isVideo) {
+ if (t.height === '100%') {
+ newHeight = parseFloat(parentWidth * nativeHeight / nativeWidth, 10);
+ } else {
+ newHeight = t.height >= t.width ? parseFloat(parentWidth / aspectRatio, 10) : parseFloat(parentWidth * aspectRatio, 10);
+ }
+ } else {
+ newHeight = nativeHeight;
+ }
+
+ if (isNaN(newHeight)) {
+ newHeight = parentHeight;
+ }
+
+ if (t.getElement(t.container).parentNode.length > 0 && t.getElement(t.container).parentNode.tagName.toLowerCase() === 'body') {
+ parentWidth = _window2.default.innerWidth || _document2.default.documentElement.clientWidth || _document2.default.body.clientWidth;
+ newHeight = _window2.default.innerHeight || _document2.default.documentElement.clientHeight || _document2.default.body.clientHeight;
+ }
+
+ if (newHeight && parentWidth) {
+ t.getElement(t.container).style.width = parentWidth + 'px';
+ t.getElement(t.container).style.height = newHeight + 'px';
+
+ t.node.style.width = '100%';
+ t.node.style.height = '100%';
+
+ if (t.isVideo && t.media.setSize) {
+ t.media.setSize(parentWidth, newHeight);
+ }
+
+ var layerChildren = t.getElement(t.layers).children;
+ for (var i = 0, total = layerChildren.length; i < total; i++) {
+ layerChildren[i].style.width = '100%';
+ layerChildren[i].style.height = '100%';
+ }
+ }
+ }
+ }, {
+ key: 'setFillMode',
+ value: function setFillMode() {
+ var t = this;
+ var isIframe = _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null;
+ var parent = function () {
+ var parentEl = void 0,
+ el = t.getElement(t.container);
+
+ while (el) {
+ try {
+ if (_constants.IS_FIREFOX && el.tagName.toLowerCase() === 'html' && _window2.default.self !== _window2.default.top && _window2.default.frameElement !== null) {
+ return _window2.default.frameElement;
+ } else {
+ parentEl = el.parentElement;
+ }
+ } catch (e) {
+ parentEl = el.parentElement;
+ }
+
+ if (parentEl && dom.visible(parentEl)) {
+ return parentEl;
+ }
+ el = parentEl;
+ }
+
+ return null;
+ }();
+ var parentStyles = parent ? getComputedStyle(parent, null) : getComputedStyle(_document2.default.body, null);
+
+ if (t.node.style.height !== 'none' && t.node.style.height !== t.height) {
+ t.node.style.height = 'auto';
+ }
+ if (t.node.style.maxWidth !== 'none' && t.node.style.maxWidth !== t.width) {
+ t.node.style.maxWidth = 'none';
+ }
+
+ if (t.node.style.maxHeight !== 'none' && t.node.style.maxHeight !== t.height) {
+ t.node.style.maxHeight = 'none';
+ }
+
+ if (t.node.currentStyle) {
+ if (t.node.currentStyle.height === '100%') {
+ t.node.currentStyle.height = 'auto';
+ }
+ if (t.node.currentStyle.maxWidth === '100%') {
+ t.node.currentStyle.maxWidth = 'none';
+ }
+ if (t.node.currentStyle.maxHeight === '100%') {
+ t.node.currentStyle.maxHeight = 'none';
+ }
+ }
+
+ if (!isIframe && !parseFloat(parentStyles.width)) {
+ parent.style.width = t.media.offsetWidth + 'px';
+ }
+
+ if (!isIframe && !parseFloat(parentStyles.height)) {
+ parent.style.height = t.media.offsetHeight + 'px';
+ }
+
+ parentStyles = getComputedStyle(parent);
+
+ var parentWidth = parseFloat(parentStyles.width),
+ parentHeight = parseFloat(parentStyles.height);
+
+ t.setDimensions('100%', '100%');
+
+ var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
+ if (poster) {
+ poster.style.display = '';
+ }
+
+ var targetElement = t.getElement(t.container).querySelectorAll('object, embed, iframe, video'),
+ initHeight = t.height,
+ initWidth = t.width,
+ scaleX1 = parentWidth,
+ scaleY1 = initHeight * parentWidth / initWidth,
+ scaleX2 = initWidth * parentHeight / initHeight,
+ scaleY2 = parentHeight,
+ bScaleOnWidth = scaleX2 > parentWidth === false,
+ finalWidth = bScaleOnWidth ? Math.floor(scaleX1) : Math.floor(scaleX2),
+ finalHeight = bScaleOnWidth ? Math.floor(scaleY1) : Math.floor(scaleY2),
+ width = bScaleOnWidth ? parentWidth + 'px' : finalWidth + 'px',
+ height = bScaleOnWidth ? finalHeight + 'px' : parentHeight + 'px';
+
+ for (var i = 0, total = targetElement.length; i < total; i++) {
+ targetElement[i].style.height = height;
+ targetElement[i].style.width = width;
+ if (t.media.setSize) {
+ t.media.setSize(width, height);
+ }
+
+ targetElement[i].style.marginLeft = Math.floor((parentWidth - finalWidth) / 2) + 'px';
+ targetElement[i].style.marginTop = 0;
+ }
+ }
+ }, {
+ key: 'setDimensions',
+ value: function setDimensions(width, height) {
+ var t = this;
+
+ width = (0, _general.isString)(width) && width.indexOf('%') > -1 ? width : parseFloat(width) + 'px';
+ height = (0, _general.isString)(height) && height.indexOf('%') > -1 ? height : parseFloat(height) + 'px';
+
+ t.getElement(t.container).style.width = width;
+ t.getElement(t.container).style.height = height;
+
+ var layers = t.getElement(t.layers).children;
+ for (var i = 0, total = layers.length; i < total; i++) {
+ layers[i].style.width = width;
+ layers[i].style.height = height;
+ }
+ }
+ }, {
+ key: 'setControlsSize',
+ value: function setControlsSize() {
+ var t = this;
+
+ if (!dom.visible(t.getElement(t.container))) {
+ return;
+ }
+
+ if (t.rail && dom.visible(t.rail)) {
+ var totalStyles = t.total ? getComputedStyle(t.total, null) : null,
+ totalMargin = totalStyles ? parseFloat(totalStyles.marginLeft) + parseFloat(totalStyles.marginRight) : 0,
+ railStyles = getComputedStyle(t.rail),
+ railMargin = parseFloat(railStyles.marginLeft) + parseFloat(railStyles.marginRight);
+
+ var siblingsWidth = 0;
+
+ var siblings = dom.siblings(t.rail, function (el) {
+ return el !== t.rail;
+ }),
+ total = siblings.length;
+ for (var i = 0; i < total; i++) {
+ siblingsWidth += siblings[i].offsetWidth;
+ }
+
+ siblingsWidth += totalMargin + (totalMargin === 0 ? railMargin * 2 : railMargin) + 1;
+
+ t.getElement(t.container).style.minWidth = siblingsWidth + 'px';
+
+ var event = (0, _general.createEvent)('controlsresize', t.getElement(t.container));
+ t.getElement(t.container).dispatchEvent(event);
+ } else {
+ var children = t.getElement(t.controls).children;
+ var minWidth = 0;
+
+ for (var _i = 0, _total = children.length; _i < _total; _i++) {
+ minWidth += children[_i].offsetWidth;
+ }
+
+ t.getElement(t.container).style.minWidth = minWidth + 'px';
+ }
+ }
+ }, {
+ key: 'addControlElement',
+ value: function addControlElement(element, key) {
+
+ var t = this;
+
+ if (t.featurePosition[key] !== undefined) {
+ var child = t.getElement(t.controls).children[t.featurePosition[key] - 1];
+ child.parentNode.insertBefore(element, child.nextSibling);
+ } else {
+ t.getElement(t.controls).appendChild(element);
+ var children = t.getElement(t.controls).children;
+ for (var i = 0, total = children.length; i < total; i++) {
+ if (element === children[i]) {
+ t.featurePosition[key] = i;
+ break;
+ }
+ }
+ }
+ }
+ }, {
+ key: 'createIframeLayer',
+ value: function createIframeLayer() {
+ var t = this;
+
+ if (t.isVideo && t.media.rendererName !== null && t.media.rendererName.indexOf('iframe') > -1 && !_document2.default.getElementById(t.media.id + '-iframe-overlay')) {
+
+ var layer = _document2.default.createElement('div'),
+ target = _document2.default.getElementById(t.media.id + '_' + t.media.rendererName);
+
+ layer.id = t.media.id + '-iframe-overlay';
+ layer.className = t.options.classPrefix + 'iframe-overlay';
+ layer.addEventListener('click', function (e) {
+ if (t.options.clickToPlayPause) {
+ if (t.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+
+ target.parentNode.insertBefore(layer, target);
+ }
+ }
+ }, {
+ key: 'resetSize',
+ value: function resetSize() {
+ var t = this;
+
+ setTimeout(function () {
+ t.setPlayerSize(t.width, t.height);
+ t.setControlsSize();
+ }, 50);
+ }
+ }, {
+ key: 'setPoster',
+ value: function setPoster(url) {
+ var t = this;
+
+ if (t.getElement(t.container)) {
+ var posterDiv = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster');
+
+ if (!posterDiv) {
+ posterDiv = _document2.default.createElement('div');
+ posterDiv.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
+ t.getElement(t.layers).appendChild(posterDiv);
+ }
+
+ var posterImg = posterDiv.querySelector('img');
+
+ if (!posterImg && url) {
+ posterImg = _document2.default.createElement('img');
+ posterImg.className = t.options.classPrefix + 'poster-img';
+ posterImg.width = '100%';
+ posterImg.height = '100%';
+ posterDiv.style.display = '';
+ posterDiv.appendChild(posterImg);
+ }
+
+ if (url) {
+ posterImg.setAttribute('src', url);
+ posterDiv.style.backgroundImage = 'url("' + url + '")';
+ posterDiv.style.display = '';
+ } else if (posterImg) {
+ posterDiv.style.backgroundImage = 'none';
+ posterDiv.style.display = 'none';
+ posterImg.remove();
+ } else {
+ posterDiv.style.display = 'none';
+ }
+ } else if (_constants.IS_IPAD && t.options.iPadUseNativeControls || _constants.IS_IPHONE && t.options.iPhoneUseNativeControls || _constants.IS_ANDROID && t.options.AndroidUseNativeControls) {
+ t.media.originalNode.poster = url;
+ }
+ }
+ }, {
+ key: 'changeSkin',
+ value: function changeSkin(className) {
+ var t = this;
+
+ t.getElement(t.container).className = t.options.classPrefix + 'container ' + className;
+ t.setPlayerSize(t.width, t.height);
+ t.setControlsSize();
+ }
+ }, {
+ key: 'globalBind',
+ value: function globalBind(events, callback) {
+ var t = this,
+ doc = t.node ? t.node.ownerDocument : _document2.default;
+
+ events = (0, _general.splitEvents)(events, t.id);
+ if (events.d) {
+ var eventList = events.d.split(' ');
+ for (var i = 0, total = eventList.length; i < total; i++) {
+ eventList[i].split('.').reduce(function (part, e) {
+ doc.addEventListener(e, callback, false);
+ return e;
+ }, '');
+ }
+ }
+ if (events.w) {
+ var _eventList = events.w.split(' ');
+ for (var _i2 = 0, _total2 = _eventList.length; _i2 < _total2; _i2++) {
+ _eventList[_i2].split('.').reduce(function (part, e) {
+ _window2.default.addEventListener(e, callback, false);
+ return e;
+ }, '');
+ }
+ }
+ }
+ }, {
+ key: 'globalUnbind',
+ value: function globalUnbind(events, callback) {
+ var t = this,
+ doc = t.node ? t.node.ownerDocument : _document2.default;
+
+ events = (0, _general.splitEvents)(events, t.id);
+ if (events.d) {
+ var eventList = events.d.split(' ');
+ for (var i = 0, total = eventList.length; i < total; i++) {
+ eventList[i].split('.').reduce(function (part, e) {
+ doc.removeEventListener(e, callback, false);
+ return e;
+ }, '');
+ }
+ }
+ if (events.w) {
+ var _eventList2 = events.w.split(' ');
+ for (var _i3 = 0, _total3 = _eventList2.length; _i3 < _total3; _i3++) {
+ _eventList2[_i3].split('.').reduce(function (part, e) {
+ _window2.default.removeEventListener(e, callback, false);
+ return e;
+ }, '');
+ }
+ }
+ }
+ }, {
+ key: 'buildfeatures',
+ value: function buildfeatures(player, controls, layers, media) {
+ var t = this;
+
+ for (var i = 0, total = t.options.features.length; i < total; i++) {
+ var feature = t.options.features[i];
+ if (t['build' + feature]) {
+ try {
+ t['build' + feature](player, controls, layers, media);
+ } catch (e) {
+ console.error('error building ' + feature, e);
+ }
+ }
+ }
+ }
+ }, {
+ key: 'buildposter',
+ value: function buildposter(player, controls, layers, media) {
+ var t = this,
+ poster = _document2.default.createElement('div');
+
+ poster.className = t.options.classPrefix + 'poster ' + t.options.classPrefix + 'layer';
+ layers.appendChild(poster);
+
+ var posterUrl = media.originalNode.getAttribute('poster');
+
+ if (player.options.poster !== '') {
+ if (posterUrl && _constants.IS_IOS) {
+ media.originalNode.removeAttribute('poster');
+ }
+ posterUrl = player.options.poster;
+ }
+
+ if (posterUrl) {
+ t.setPoster(posterUrl);
+ } else if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
+ t.setPoster(t.media.renderer.getPosterUrl());
+ } else {
+ poster.style.display = 'none';
+ }
+
+ media.addEventListener('play', function () {
+ poster.style.display = 'none';
+ });
+
+ media.addEventListener('playing', function () {
+ poster.style.display = 'none';
+ });
+
+ if (player.options.showPosterWhenEnded && player.options.autoRewind) {
+ media.addEventListener('ended', function () {
+ poster.style.display = '';
+ });
+ }
+
+ media.addEventListener('error', function () {
+ poster.style.display = 'none';
+ });
+
+ if (player.options.showPosterWhenPaused) {
+ media.addEventListener('pause', function () {
+ if (!player.ended) {
+ poster.style.display = '';
+ }
+ });
+ }
+ }
+ }, {
+ key: 'buildoverlays',
+ value: function buildoverlays(player, controls, layers, media) {
+
+ if (!player.isVideo) {
+ return;
+ }
+
+ var t = this,
+ loading = _document2.default.createElement('div'),
+ error = _document2.default.createElement('div'),
+ bigPlay = _document2.default.createElement('div');
+
+ loading.style.display = 'none';
+ loading.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
+ loading.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-loading">' + ('<span class="' + t.options.classPrefix + 'overlay-loading-bg-img"></span>') + '</div>';
+ layers.appendChild(loading);
+
+ error.style.display = 'none';
+ error.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer';
+ error.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-error"></div>';
+ layers.appendChild(error);
+
+ bigPlay.className = t.options.classPrefix + 'overlay ' + t.options.classPrefix + 'layer ' + t.options.classPrefix + 'overlay-play';
+ bigPlay.innerHTML = '<div class="' + t.options.classPrefix + 'overlay-button" role="button" tabindex="0" ' + ('aria-label="' + _i18n2.default.t('mejs.play') + '" aria-pressed="false"></div>');
+ bigPlay.addEventListener('click', function () {
+ if (t.options.clickToPlayPause) {
+
+ var button = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'overlay-button'),
+ pressed = button.getAttribute('aria-pressed');
+
+ if (t.paused) {
+ t.play();
+ } else {
+ t.pause();
+ }
+
+ button.setAttribute('aria-pressed', !!pressed);
+ t.getElement(t.container).focus();
+ }
+ });
+
+ bigPlay.addEventListener('keydown', function (e) {
+ var keyPressed = e.keyCode || e.which || 0;
+
+ if (keyPressed === 13 || _constants.IS_FIREFOX && keyPressed === 32) {
+ var event = (0, _general.createEvent)('click', bigPlay);
+ bigPlay.dispatchEvent(event);
+ return false;
+ }
+ });
+
+ layers.appendChild(bigPlay);
+
+ if (t.media.rendererName !== null && (/(youtube|facebook)/i.test(t.media.rendererName) && !(t.media.originalNode.getAttribute('poster') || player.options.poster || typeof t.media.renderer.getPosterUrl === 'function' && t.media.renderer.getPosterUrl()) || _constants.IS_STOCK_ANDROID || t.media.originalNode.getAttribute('autoplay'))) {
+ bigPlay.style.display = 'none';
+ }
+
+ var hasError = false;
+
+ media.addEventListener('play', function () {
+ bigPlay.style.display = 'none';
+ loading.style.display = 'none';
+ error.style.display = 'none';
+ hasError = false;
+ });
+ media.addEventListener('playing', function () {
+ bigPlay.style.display = 'none';
+ loading.style.display = 'none';
+ error.style.display = 'none';
+ hasError = false;
+ });
+ media.addEventListener('seeking', function () {
+ bigPlay.style.display = 'none';
+ loading.style.display = '';
+ hasError = false;
+ });
+ media.addEventListener('seeked', function () {
+ bigPlay.style.display = t.paused && !_constants.IS_STOCK_ANDROID ? '' : 'none';
+ loading.style.display = 'none';
+ hasError = false;
+ });
+ media.addEventListener('pause', function () {
+ loading.style.display = 'none';
+ if (!_constants.IS_STOCK_ANDROID && !hasError) {
+ bigPlay.style.display = '';
+ }
+ hasError = false;
+ });
+ media.addEventListener('waiting', function () {
+ loading.style.display = '';
+ hasError = false;
+ });
+
+ media.addEventListener('loadeddata', function () {
+ loading.style.display = '';
+
+ if (_constants.IS_ANDROID) {
+ media.canplayTimeout = setTimeout(function () {
+ if (_document2.default.createEvent) {
+ var evt = _document2.default.createEvent('HTMLEvents');
+ evt.initEvent('canplay', true, true);
+ return media.dispatchEvent(evt);
+ }
+ }, 300);
+ }
+ hasError = false;
+ });
+ media.addEventListener('canplay', function () {
+ loading.style.display = 'none';
+
+ clearTimeout(media.canplayTimeout);
+ hasError = false;
+ });
+
+ media.addEventListener('error', function (e) {
+ t._handleError(e, t.media, t.node);
+ loading.style.display = 'none';
+ bigPlay.style.display = 'none';
+ hasError = true;
+ });
+
+ media.addEventListener('loadedmetadata', function () {
+ if (!t.controlsEnabled) {
+ t.enableControls();
+ }
+ });
+
+ media.addEventListener('keydown', function (e) {
+ t.onkeydown(player, media, e);
+ hasError = false;
+ });
+ }
+ }, {
+ key: 'buildkeyboard',
+ value: function buildkeyboard(player, controls, layers, media) {
+
+ var t = this;
+
+ t.getElement(t.container).addEventListener('keydown', function () {
+ t.keyboardAction = true;
+ });
+
+ t.globalKeydownCallback = function (event) {
+ var container = _document2.default.activeElement.closest('.' + t.options.classPrefix + 'container'),
+ target = t.media.closest('.' + t.options.classPrefix + 'container');
+ t.hasFocus = !!(container && target && container.id === target.id);
+ return t.onkeydown(player, media, event);
+ };
+
+ t.globalClickCallback = function (event) {
+ t.hasFocus = !!event.target.closest('.' + t.options.classPrefix + 'container');
+ };
+
+ t.globalBind('keydown', t.globalKeydownCallback);
+
+ t.globalBind('click', t.globalClickCallback);
+ }
+ }, {
+ key: 'onkeydown',
+ value: function onkeydown(player, media, e) {
+
+ if (player.hasFocus && player.options.enableKeyboard) {
+ for (var i = 0, total = player.options.keyActions.length; i < total; i++) {
+ var keyAction = player.options.keyActions[i];
+
+ for (var j = 0, jl = keyAction.keys.length; j < jl; j++) {
+ if (e.keyCode === keyAction.keys[j]) {
+ keyAction.action(player, media, e.keyCode, e);
+ e.preventDefault();
+ e.stopPropagation();
+ return;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+ }, {
+ key: 'play',
+ value: function play() {
+ this.proxy.play();
+ }
+ }, {
+ key: 'pause',
+ value: function pause() {
+ this.proxy.pause();
+ }
+ }, {
+ key: 'load',
+ value: function load() {
+ this.proxy.load();
+ }
+ }, {
+ key: 'setCurrentTime',
+ value: function setCurrentTime(time) {
+ this.proxy.setCurrentTime(time);
+ }
+ }, {
+ key: 'getCurrentTime',
+ value: function getCurrentTime() {
+ return this.proxy.currentTime;
+ }
+ }, {
+ key: 'getDuration',
+ value: function getDuration() {
+ return this.proxy.duration;
+ }
+ }, {
+ key: 'setVolume',
+ value: function setVolume(volume) {
+ this.proxy.volume = volume;
+ }
+ }, {
+ key: 'getVolume',
+ value: function getVolume() {
+ return this.proxy.getVolume();
+ }
+ }, {
+ key: 'setMuted',
+ value: function setMuted(value) {
+ this.proxy.setMuted(value);
+ }
+ }, {
+ key: 'setSrc',
+ value: function setSrc(src) {
+ if (!this.controlsEnabled) {
+ this.enableControls();
+ }
+ this.proxy.setSrc(src);
+ }
+ }, {
+ key: 'getSrc',
+ value: function getSrc() {
+ return this.proxy.getSrc();
+ }
+ }, {
+ key: 'canPlayType',
+ value: function canPlayType(type) {
+ return this.proxy.canPlayType(type);
+ }
+ }, {
+ key: 'remove',
+ value: function remove() {
+ var t = this,
+ rendererName = t.media.rendererName,
+ src = t.media.originalNode.src;
+
+ for (var featureIndex in t.options.features) {
+ var feature = t.options.features[featureIndex];
+ if (t['clean' + feature]) {
+ try {
+ t['clean' + feature](t, t.getElement(t.layers), t.getElement(t.controls), t.media);
+ } catch (e) {
+ console.error('error cleaning ' + feature, e);
+ }
+ }
+ }
+
+ var nativeWidth = t.node.getAttribute('width'),
+ nativeHeight = t.node.getAttribute('height');
+
+ if (nativeWidth) {
+ if (nativeWidth.indexOf('%') === -1) {
+ nativeWidth = nativeWidth + 'px';
+ }
+ } else {
+ nativeWidth = 'auto';
+ }
+
+ if (nativeHeight) {
+ if (nativeHeight.indexOf('%') === -1) {
+ nativeHeight = nativeHeight + 'px';
+ }
+ } else {
+ nativeHeight = 'auto';
+ }
+
+ t.node.style.width = nativeWidth;
+ t.node.style.height = nativeHeight;
+
+ t.setPlayerSize(0, 0);
+
+ if (!t.isDynamic) {
+ (function () {
+ t.node.setAttribute('controls', true);
+ t.node.setAttribute('id', t.node.getAttribute('id').replace('_' + rendererName, '').replace('_from_mejs', ''));
+ var poster = t.getElement(t.container).querySelector('.' + t.options.classPrefix + 'poster>img');
+ if (poster) {
+ t.node.setAttribute('poster', poster.src);
+ }
+
+ delete t.node.autoplay;
+
+ t.node.setAttribute('src', '');
+ if (t.media.canPlayType((0, _media.getTypeFromFile)(src)) !== '') {
+ t.node.setAttribute('src', src);
+ }
+
+ if (rendererName && rendererName.indexOf('iframe') > -1) {
+ var layer = _document2.default.getElementById(t.media.id + '-iframe-overlay');
+ layer.remove();
+ }
+
+ var node = t.node.cloneNode();
+ node.style.display = '';
+ t.getElement(t.container).parentNode.insertBefore(node, t.getElement(t.container));
+ t.node.remove();
+
+ if (t.mediaFiles) {
+ for (var i = 0, total = t.mediaFiles.length; i < total; i++) {
+ var source = _document2.default.createElement('source');
+ source.setAttribute('src', t.mediaFiles[i].src);
+ source.setAttribute('type', t.mediaFiles[i].type);
+ node.appendChild(source);
+ }
+ }
+ if (t.trackFiles) {
+ var _loop3 = function _loop3(_i4, _total4) {
+ var track = t.trackFiles[_i4];
+ var newTrack = _document2.default.createElement('track');
+ newTrack.kind = track.kind;
+ newTrack.label = track.label;
+ newTrack.srclang = track.srclang;
+ newTrack.src = track.src;
+
+ node.appendChild(newTrack);
+ newTrack.addEventListener('load', function () {
+ this.mode = 'showing';
+ node.textTracks[_i4].mode = 'showing';
+ });
+ };
+
+ for (var _i4 = 0, _total4 = t.trackFiles.length; _i4 < _total4; _i4++) {
+ _loop3(_i4, _total4);
+ }
+ }
+
+ delete t.node;
+ delete t.mediaFiles;
+ delete t.trackFiles;
+ })();
+ } else {
+ t.getElement(t.container).parentNode.insertBefore(t.node, t.getElement(t.container));
+ }
+
+ if (t.media.renderer && typeof t.media.renderer.destroy === 'function') {
+ t.media.renderer.destroy();
+ }
+
+ delete _mejs2.default.players[t.id];
+
+ if (_typeof(t.getElement(t.container)) === 'object') {
+ var offscreen = t.getElement(t.container).parentNode.querySelector('.' + t.options.classPrefix + 'offscreen');
+ if (offscreen) {
+ offscreen.remove();
+ }
+ t.getElement(t.container).remove();
+ }
+ t.globalUnbind('resize', t.globalResizeCallback);
+ t.globalUnbind('keydown', t.globalKeydownCallback);
+ t.globalUnbind('click', t.globalClickCallback);
+
+ delete t.media.player;
+ }
+ }, {
+ key: 'paused',
+ get: function get() {
+ return this.proxy.paused;
+ }
+ }, {
+ key: 'muted',
+ get: function get() {
+ return this.proxy.muted;
+ },
+ set: function set(muted) {
+ this.setMuted(muted);
+ }
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this.proxy.ended;
+ }
+ }, {
+ key: 'readyState',
+ get: function get() {
+ return this.proxy.readyState;
+ }
+ }, {
+ key: 'currentTime',
+ set: function set(time) {
+ this.setCurrentTime(time);
+ },
+ get: function get() {
+ return this.getCurrentTime();
+ }
+ }, {
+ key: 'duration',
+ get: function get() {
+ return this.getDuration();
+ }
+ }, {
+ key: 'volume',
+ set: function set(volume) {
+ this.setVolume(volume);
+ },
+ get: function get() {
+ return this.getVolume();
+ }
+ }, {
+ key: 'src',
+ set: function set(src) {
+ this.setSrc(src);
+ },
+ get: function get() {
+ return this.getSrc();
+ }
+ }]);
+
+ return MediaElementPlayer;
+}();
+
+_window2.default.MediaElementPlayer = MediaElementPlayer;
+_mejs2.default.MediaElementPlayer = MediaElementPlayer;
+
+exports.default = MediaElementPlayer;
+
+},{"17":17,"2":2,"25":25,"26":26,"27":27,"28":28,"3":3,"30":30,"5":5,"6":6,"7":7}],17:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var DefaultPlayer = function () {
+ function DefaultPlayer(player) {
+ _classCallCheck(this, DefaultPlayer);
+
+ this.media = player.media;
+ this.isVideo = player.isVideo;
+ this.classPrefix = player.options.classPrefix;
+ this.createIframeLayer = function () {
+ return player.createIframeLayer();
+ };
+ this.setPoster = function (url) {
+ return player.setPoster(url);
+ };
+ return this;
+ }
+
+ _createClass(DefaultPlayer, [{
+ key: 'play',
+ value: function play() {
+ this.media.play();
+ }
+ }, {
+ key: 'pause',
+ value: function pause() {
+ this.media.pause();
+ }
+ }, {
+ key: 'load',
+ value: function load() {
+ var t = this;
+
+ if (!t.isLoaded) {
+ t.media.load();
+ }
+
+ t.isLoaded = true;
+ }
+ }, {
+ key: 'setCurrentTime',
+ value: function setCurrentTime(time) {
+ this.media.setCurrentTime(time);
+ }
+ }, {
+ key: 'getCurrentTime',
+ value: function getCurrentTime() {
+ return this.media.currentTime;
+ }
+ }, {
+ key: 'getDuration',
+ value: function getDuration() {
+ var duration = this.media.getDuration();
+ if (duration === Infinity && this.media.seekable && this.media.seekable.length) {
+ duration = this.media.seekable.end(0);
+ }
+ return duration;
+ }
+ }, {
+ key: 'setVolume',
+ value: function setVolume(volume) {
+ this.media.setVolume(volume);
+ }
+ }, {
+ key: 'getVolume',
+ value: function getVolume() {
+ return this.media.getVolume();
+ }
+ }, {
+ key: 'setMuted',
+ value: function setMuted(value) {
+ this.media.setMuted(value);
+ }
+ }, {
+ key: 'setSrc',
+ value: function setSrc(src) {
+ var t = this,
+ layer = document.getElementById(t.media.id + '-iframe-overlay');
+
+ if (layer) {
+ layer.remove();
+ }
+
+ t.media.setSrc(src);
+ t.createIframeLayer();
+ if (t.media.renderer !== null && typeof t.media.renderer.getPosterUrl === 'function') {
+ t.setPoster(t.media.renderer.getPosterUrl());
+ }
+ }
+ }, {
+ key: 'getSrc',
+ value: function getSrc() {
+ return this.media.getSrc();
+ }
+ }, {
+ key: 'canPlayType',
+ value: function canPlayType(type) {
+ return this.media.canPlayType(type);
+ }
+ }, {
+ key: 'paused',
+ get: function get() {
+ return this.media.paused;
+ }
+ }, {
+ key: 'muted',
+ set: function set(muted) {
+ this.setMuted(muted);
+ },
+ get: function get() {
+ return this.media.muted;
+ }
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this.media.ended;
+ }
+ }, {
+ key: 'readyState',
+ get: function get() {
+ return this.media.readyState;
+ }
+ }, {
+ key: 'currentTime',
+ set: function set(time) {
+ this.setCurrentTime(time);
+ },
+ get: function get() {
+ return this.getCurrentTime();
+ }
+ }, {
+ key: 'duration',
+ get: function get() {
+ return this.getDuration();
+ }
+ }, {
+ key: 'remainingTime',
+ get: function get() {
+ return this.getDuration() - this.currentTime();
+ }
+ }, {
+ key: 'volume',
+ set: function set(volume) {
+ this.setVolume(volume);
+ },
+ get: function get() {
+ return this.getVolume();
+ }
+ }, {
+ key: 'src',
+ set: function set(src) {
+ this.setSrc(src);
+ },
+ get: function get() {
+ return this.getSrc();
+ }
+ }]);
+
+ return DefaultPlayer;
+}();
+
+exports.default = DefaultPlayer;
+
+
+_window2.default.DefaultPlayer = DefaultPlayer;
+
+},{"3":3}],18:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _player = _dereq_(16);
+
+var _player2 = _interopRequireDefault(_player);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+if (typeof jQuery !== 'undefined') {
+ _mejs2.default.$ = jQuery;
+} else if (typeof Zepto !== 'undefined') {
+ _mejs2.default.$ = Zepto;
+} else if (typeof ender !== 'undefined') {
+ _mejs2.default.$ = ender;
+}
+
+(function ($) {
+ if (typeof $ !== 'undefined') {
+ $.fn.mediaelementplayer = function (options) {
+ if (options === false) {
+ this.each(function () {
+ var player = $(this).data('mediaelementplayer');
+ if (player) {
+ player.remove();
+ }
+ $(this).removeData('mediaelementplayer');
+ });
+ } else {
+ this.each(function () {
+ $(this).data('mediaelementplayer', new _player2.default(this, options));
+ });
+ }
+ return this;
+ };
+
+ $(document).ready(function () {
+ $('.' + _mejs2.default.MepDefaults.classPrefix + 'player').mediaelementplayer();
+ });
+ }
+})(_mejs2.default.$);
+
+},{"16":16,"3":3,"7":7}],19:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _media = _dereq_(28);
+
+var _constants = _dereq_(25);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeDash = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof dashjs !== 'undefined') {
+ NativeDash.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';
+
+ NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeDash.promise.then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ }
+
+ return NativeDash.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = dashjs.MediaPlayer().create();
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var DashNativeRenderer = {
+ name: 'native_dash',
+ options: {
+ prefix: 'native_dash',
+ dash: {
+ path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
+ debug: false,
+ drm: {},
+
+ robustnessLevel: ''
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ autoplay = originalNode.autoplay,
+ children = originalNode.children;
+
+ var node = null,
+ dashPlayer = null;
+
+ originalNode.removeAttribute('type');
+ for (var i = 0, total = children.length; i < total; i++) {
+ children[i].removeAttribute('type');
+ }
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return dashPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ node[propName] = source;
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ node.removeEventListener(events[_i], attachNativeEvents);
+ }
+ dashPlayer = NativeDash._createPlayer({
+ options: options.dash,
+ id: id
+ });
+
+ if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
+ dashPlayer.setProtectionData(value.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(source);
+ if (autoplay) {
+ dashPlayer.play();
+ }
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
+ assignGettersSetters(props[_i2]);
+ }
+
+ _window2.default['__ready__' + id] = function (_dashPlayer) {
+ mediaElement.dashPlayer = dashPlayer = _dashPlayer;
+
+ var dashEvents = dashjs.MediaPlayer.events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ dashPlayer.initialize();
+ dashPlayer.attachView(node);
+ dashPlayer.setAutoPlay(false);
+
+ if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
+ dashPlayer.setProtectionData(options.dash.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(node.getSrc());
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ assignEvents(events[_i3]);
+ }
+
+ var assignMdashEvents = function assignMdashEvents(e) {
+ if (e.type.toLowerCase() === 'error') {
+ mediaElement.generateError(e.message, node.src);
+ console.error(e);
+ } else {
+ var _event = (0, _general.createEvent)(e.type, mediaElement);
+ _event.data = e;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ for (var eventType in dashEvents) {
+ if (dashEvents.hasOwnProperty(eventType)) {
+ dashPlayer.on(dashEvents[eventType], function (e) {
+ return assignMdashEvents(e);
+ });
+ }
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ node.setAttribute('src', mediaFiles[_i4].src);
+ if (typeof mediaFiles[_i4].drm !== 'undefined') {
+ options.dash.drm = mediaFiles[_i4].drm;
+ }
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeDash.load({
+ options: options.dash,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
+});
+
+_renderer.renderer.add(DashNativeRenderer);
+
+},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],20:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PluginDetector = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _constants = _dereq_(25);
+
+var _media = _dereq_(28);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var PluginDetector = exports.PluginDetector = {
+ plugins: [],
+
+ hasPluginVersion: function hasPluginVersion(plugin, v) {
+ var pv = PluginDetector.plugins[plugin];
+ v[1] = v[1] || 0;
+ v[2] = v[2] || 0;
+ return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
+ },
+
+ addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
+ PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
+ },
+
+ detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {
+
+ var version = [0, 0, 0],
+ description = void 0,
+ ax = void 0;
+
+ if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
+ description = _constants.NAV.plugins[pluginName].description;
+ if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
+ version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
+ for (var i = 0, total = version.length; i < total; i++) {
+ version[i] = parseInt(version[i].match(/\d+/), 10);
+ }
+ }
+ } else if (_window2.default.ActiveXObject !== undefined) {
+ try {
+ ax = new ActiveXObject(activeX);
+ if (ax) {
+ version = axDetect(ax);
+ }
+ } catch (e) {
+
+ }
+ }
+ return version;
+ }
+};
+
+PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
+ var version = [],
+ d = ax.GetVariable("$version");
+
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ return version;
+});
+
+var FlashMediaElementRenderer = {
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var flash = {};
+ var isActive = false;
+
+ flash.options = options;
+ flash.id = mediaElement.id + '_' + flash.options.prefix;
+ flash.mediaElement = mediaElement;
+ flash.flashState = {};
+ flash.flashApi = null;
+ flash.flashApiStack = [];
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ flash.flashState[propName] = null;
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['get' + capName] = function () {
+ if (flash.flashApi !== null) {
+ if (typeof flash.flashApi['get_' + propName] === 'function') {
+ var value = flash.flashApi['get_' + propName]();
+
+ if (propName === 'buffered') {
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return value;
+ },
+ length: 1
+ };
+ }
+ return value;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ };
+
+ flash['set' + capName] = function (value) {
+ if (propName === 'src') {
+ value = (0, _media.absolutizeUrl)(value);
+ }
+
+ if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
+ try {
+ flash.flashApi['set_' + propName](value);
+ } catch (e) {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'set',
+ propName: propName,
+ value: value
+ });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ flash[methodName] = function () {
+ if (isActive) {
+ if (flash.flashApi !== null) {
+ if (flash.flashApi['fire_' + methodName]) {
+ try {
+ flash.flashApi['fire_' + methodName]();
+ } catch (e) {
+
+ }
+ } else {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'call',
+ methodName: methodName
+ });
+ }
+ }
+ };
+ };
+ methods.push('stop');
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var initEvents = ['rendererready'];
+
+ for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
+ var event = (0, _general.createEvent)(initEvents[_i2], flash);
+ mediaElement.dispatchEvent(event);
+ }
+
+ _window2.default['__ready__' + flash.id] = function () {
+
+ flash.flashReady = true;
+ flash.flashApi = _document2.default.getElementById('__' + flash.id);
+
+ if (flash.flashApiStack.length) {
+ for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
+ var stackItem = flash.flashApiStack[_i3];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ flash[stackItem.methodName]();
+ }
+ }
+ }
+ };
+
+ _window2.default['__event__' + flash.id] = function (eventName, message) {
+ var event = (0, _general.createEvent)(eventName, flash);
+ if (message) {
+ try {
+ event.data = JSON.parse(message);
+ event.details.data = JSON.parse(message);
+ } catch (e) {
+ event.message = message;
+ }
+ }
+
+ flash.mediaElement.dispatchEvent(event);
+ };
+
+ flash.flashWrapper = _document2.default.createElement('div');
+
+ if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
+ flash.options.shimScriptAccess = 'sameDomain';
+ }
+
+ var autoplay = mediaElement.originalNode.autoplay,
+ flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
+ isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
+ flashHeight = isVideo ? mediaElement.originalNode.height : 1,
+ flashWidth = isVideo ? mediaElement.originalNode.width : 1;
+
+ if (mediaElement.originalNode.getAttribute('src')) {
+ flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
+ }
+
+ if (flash.options.enablePseudoStreaming === true) {
+ flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
+ flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
+ }
+
+ if (flash.options.streamDelimiter) {
+ flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
+ }
+
+ if (flash.options.proxyType) {
+ flashVars.push('proxytype=' + flash.options.proxyType);
+ }
+
+ mediaElement.appendChild(flash.flashWrapper);
+ mediaElement.originalNode.style.display = 'none';
+
+ var settings = [];
+
+ if (_constants.IS_IE || _constants.IS_EDGE) {
+ var specialIEContainer = _document2.default.createElement('div');
+ flash.flashWrapper.appendChild(specialIEContainer);
+
+ if (_constants.IS_EDGE) {
+ settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
+ } else {
+ settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
+ }
+
+ if (!isVideo) {
+ settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
+ }
+
+ specialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name="movie" value="' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '" />') + ('<param name="flashvars" value="' + flashVars.join('&amp;') + '" />') + '<param name="quality" value="high" />' + '<param name="bgcolor" value="#000000" />' + '<param name="wmode" value="transparent" />' + ('<param name="allowScriptAccess" value="' + flash.options.shimScriptAccess + '" />') + '<param name="allowFullScreen" value="true" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';
+ } else {
+
+ settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];
+
+ if (isVideo) {
+ settings.push('width="' + flashWidth + '"');
+ settings.push('height="' + flashHeight + '"');
+ } else {
+ settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
+ }
+
+ flash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';
+ }
+
+ flash.flashNode = flash.flashWrapper.lastChild;
+
+ flash.hide = function () {
+ isActive = false;
+ if (isVideo) {
+ flash.flashNode.style.display = 'none';
+ }
+ };
+ flash.show = function () {
+ isActive = true;
+ if (isVideo) {
+ flash.flashNode.style.display = '';
+ }
+ };
+ flash.setSize = function (width, height) {
+ flash.flashNode.style.width = width + 'px';
+ flash.flashNode.style.height = height + 'px';
+
+ if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
+ flash.flashApi.fire_setSize(width, height);
+ }
+ };
+
+ flash.destroy = function () {
+ flash.flashNode.remove();
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ flash.setSrc(mediaFiles[_i4].src);
+ break;
+ }
+ }
+ }
+
+ return flash;
+ }
+};
+
+var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);
+
+if (hasFlash) {
+ _media.typeChecks.push(function (url) {
+ url = url.toLowerCase();
+
+ if (url.startsWith('rtmp')) {
+ if (~url.indexOf('.mp3')) {
+ return 'audio/rtmp';
+ } else {
+ return 'video/rtmp';
+ }
+ } else if (/\.og(a|g)/i.test(url)) {
+ return 'audio/ogg';
+ } else if (~url.indexOf('.m3u8')) {
+ return 'application/x-mpegURL';
+ } else if (~url.indexOf('.mpd')) {
+ return 'application/dash+xml';
+ } else if (~url.indexOf('.flv')) {
+ return 'video/flv';
+ } else {
+ return null;
+ }
+ });
+
+ var FlashMediaElementVideoRenderer = {
+ name: 'flash_video',
+ options: {
+ prefix: 'flash_video',
+ filename: 'mediaelement-flash-video.swf',
+ enablePseudoStreaming: false,
+
+ pseudoStreamingStartQueryParam: 'start',
+
+ pseudoStreamingType: 'byte',
+
+ proxyType: '',
+
+ streamDelimiter: ''
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+
+ };
+ _renderer.renderer.add(FlashMediaElementVideoRenderer);
+
+ var FlashMediaElementHlsVideoRenderer = {
+ name: 'flash_hls',
+ options: {
+ prefix: 'flash_hls',
+ filename: 'mediaelement-flash-video-hls.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementHlsVideoRenderer);
+
+ var FlashMediaElementMdashVideoRenderer = {
+ name: 'flash_dash',
+ options: {
+ prefix: 'flash_dash',
+ filename: 'mediaelement-flash-video-mdash.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/dash+xml'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementMdashVideoRenderer);
+
+ var FlashMediaElementAudioRenderer = {
+ name: 'flash_audio',
+ options: {
+ prefix: 'flash_audio',
+ filename: 'mediaelement-flash-audio.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/mp3'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioRenderer);
+
+ var FlashMediaElementAudioOggRenderer = {
+ name: 'flash_audio_ogg',
+ options: {
+ prefix: 'flash_audio_ogg',
+ filename: 'mediaelement-flash-audio-ogg.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioOggRenderer);
+}
+
+},{"2":2,"25":25,"27":27,"28":28,"3":3,"5":5,"7":7,"8":8}],21:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _constants = _dereq_(25);
+
+var _media = _dereq_(28);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeFlv = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof flvjs !== 'undefined') {
+ NativeFlv.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';
+
+ NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeFlv.promise.then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ }
+
+ return NativeFlv.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ flvjs.LoggingControl.enableDebug = settings.options.debug;
+ flvjs.LoggingControl.enableVerbose = settings.options.debug;
+ var player = flvjs.createPlayer(settings.options, settings.configs);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var FlvNativeRenderer = {
+ name: 'native_flv',
+ options: {
+ prefix: 'native_flv',
+ flv: {
+ path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',
+
+ cors: true,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix;
+
+ var node = null,
+ flvPlayer = null;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return flvPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (flvPlayer !== null) {
+ var _flvOptions = {};
+ _flvOptions.type = 'flv';
+ _flvOptions.url = value;
+ _flvOptions.cors = options.flv.cors;
+ _flvOptions.debug = options.flv.debug;
+ _flvOptions.path = options.flv.path;
+ var _flvConfigs = options.flv.configs;
+
+ flvPlayer.destroy();
+ for (var i = 0, total = events.length; i < total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ flvPlayer = NativeFlv._createPlayer({
+ options: _flvOptions,
+ configs: _flvConfigs,
+ id: id
+ });
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_flvPlayer) {
+ mediaElement.flvPlayer = flvPlayer = _flvPlayer;
+
+ var flvEvents = flvjs.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ flvPlayer.unload();
+ flvPlayer.detachMediaElement();
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var assignFlvEvents = function assignFlvEvents(name, data) {
+ if (name === 'error') {
+ var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
+ mediaElement.generateError(message, node.src);
+ } else {
+ var _event = (0, _general.createEvent)(name, mediaElement);
+ _event.data = data;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ var _loop = function _loop(eventType) {
+ if (flvEvents.hasOwnProperty(eventType)) {
+ flvPlayer.on(flvEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignFlvEvents(flvEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in flvEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
+ node.setAttribute('src', mediaFiles[_i2].src);
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ var flvOptions = {};
+ flvOptions.type = 'flv';
+ flvOptions.url = node.src;
+ flvOptions.cors = options.flv.cors;
+ flvOptions.debug = options.flv.debug;
+ flvOptions.path = options.flv.path;
+ var flvConfigs = options.flv.configs;
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.pause();
+ }
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeFlv.load({
+ options: flvOptions,
+ configs: flvConfigs,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
+});
+
+_renderer.renderer.add(FlvNativeRenderer);
+
+},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],22:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _constants = _dereq_(25);
+
+var _media = _dereq_(28);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeHls = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof Hls !== 'undefined') {
+ NativeHls.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';
+
+ NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeHls.promise.then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ }
+
+ return NativeHls.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = new Hls(settings.options);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var HlsNativeRenderer = {
+ name: 'native_hls',
+ options: {
+ prefix: 'native_hls',
+ hls: {
+ path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',
+
+ autoStartLoad: false,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ preload = originalNode.getAttribute('preload'),
+ autoplay = originalNode.autoplay;
+
+ var hlsPlayer = null,
+ node = null,
+ index = 0,
+ total = mediaFiles.length;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+ options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return hlsPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (hlsPlayer !== null) {
+ hlsPlayer.destroy();
+ for (var i = 0, _total = events.length; i < _total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ hlsPlayer = NativeHls._createPlayer({
+ options: options.hls,
+ id: id
+ });
+ hlsPlayer.loadSource(value);
+ hlsPlayer.attachMedia(node);
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, _total2 = props.length; i < _total2; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_hlsPlayer) {
+ mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
+ var hlsEvents = Hls.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ var url = mediaElement.originalNode.src;
+ hlsPlayer.detachMedia();
+ hlsPlayer.loadSource(url);
+ hlsPlayer.attachMedia(node);
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var recoverDecodingErrorDate = void 0,
+ recoverSwapAudioCodecDate = void 0;
+ var assignHlsEvents = function assignHlsEvents(name, data) {
+ if (name === 'hlsError') {
+ console.warn(data);
+ data = data[1];
+
+ if (data.fatal) {
+ switch (data.type) {
+ case 'mediaError':
+ var now = new Date().getTime();
+ if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
+ recoverDecodingErrorDate = new Date().getTime();
+ hlsPlayer.recoverMediaError();
+ } else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
+ recoverSwapAudioCodecDate = new Date().getTime();
+ console.warn('Attempting to swap Audio Codec and recover from media error');
+ hlsPlayer.swapAudioCodec();
+ hlsPlayer.recoverMediaError();
+ } else {
+ var message = 'Cannot recover, last media error recovery failed';
+ mediaElement.generateError(message, node.src);
+ console.error(message);
+ }
+ break;
+ case 'networkError':
+ if (data.details === 'manifestLoadError') {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.setSrc(mediaFiles[index++].src);
+ node.load();
+ node.play();
+ } else {
+ var _message = 'Network error';
+ mediaElement.generateError(_message, mediaFiles);
+ console.error(_message);
+ }
+ } else {
+ var _message2 = 'Network error';
+ mediaElement.generateError(_message2, mediaFiles);
+ console.error(_message2);
+ }
+ break;
+ default:
+ hlsPlayer.destroy();
+ break;
+ }
+ return;
+ }
+ }
+ var event = (0, _general.createEvent)(name, mediaElement);
+ event.data = data;
+ mediaElement.dispatchEvent(event);
+ };
+
+ var _loop = function _loop(eventType) {
+ if (hlsEvents.hasOwnProperty(eventType)) {
+ hlsPlayer.on(hlsEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignHlsEvents(hlsEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in hlsEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ if (preload !== 'auto' && !autoplay) {
+ node.addEventListener('play', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.startLoad();
+ }
+ });
+
+ node.addEventListener('pause', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ }
+ });
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ hlsPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeHls.load({
+ options: options.hls,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
+});
+
+_renderer.renderer.add(HlsNativeRenderer);
+
+},{"25":25,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],23:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _constants = _dereq_(25);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var HtmlMediaElement = {
+ name: 'html5',
+ options: {
+ prefix: 'html5'
+ },
+
+ canPlayType: function canPlayType(type) {
+
+ var mediaElement = _document2.default.createElement('video');
+
+ if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
+ return 'yes';
+ } else if (mediaElement.canPlayType) {
+ return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
+ } else {
+ return '';
+ }
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var id = mediaElement.id + '_' + options.prefix;
+ var isActive = false;
+
+ var node = null;
+
+ if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
+ node = _document2.default.createElement('audio');
+ mediaElement.appendChild(node);
+ } else {
+ node = mediaElement.originalNode;
+ }
+
+ node.setAttribute('id', id);
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return node[propName];
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ node[propName] = value;
+ }
+ };
+ };
+
+ for (var i = 0, _total = props.length; i < _total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ assignEvents = function assignEvents(eventName) {
+ node.addEventListener(eventName, function (e) {
+ if (isActive) {
+ var _event = (0, _general.createEvent)(e.type, e.target);
+ mediaElement.dispatchEvent(_event);
+ }
+ });
+ };
+
+ for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ isActive = false;
+ node.style.display = 'none';
+
+ return node;
+ };
+
+ node.show = function () {
+ isActive = true;
+ node.style.display = '';
+
+ return node;
+ };
+
+ var index = 0,
+ total = mediaFiles.length;
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ node.addEventListener('error', function (e) {
+ if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.src = mediaFiles[index++].src;
+ node.load();
+ node.play();
+ } else {
+ mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
+ }
+ }
+ });
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ return node;
+ }
+};
+
+_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;
+
+_renderer.renderer.add(HtmlMediaElement);
+
+},{"2":2,"25":25,"27":27,"3":3,"7":7,"8":8}],24:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(27);
+
+var _media = _dereq_(28);
+
+var _dom = _dereq_(26);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var YouTubeApi = {
+ isIframeStarted: false,
+
+ isIframeLoaded: false,
+
+ iframeQueue: [],
+
+ enqueueIframe: function enqueueIframe(settings) {
+ YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;
+
+ if (YouTubeApi.isLoaded) {
+ YouTubeApi.createIframe(settings);
+ } else {
+ YouTubeApi.loadIframeApi();
+ YouTubeApi.iframeQueue.push(settings);
+ }
+ },
+
+ loadIframeApi: function loadIframeApi() {
+ if (!YouTubeApi.isIframeStarted) {
+ (0, _dom.loadScript)('https://www.youtube.com/player_api');
+ YouTubeApi.isIframeStarted = true;
+ }
+ },
+
+ iFrameReady: function iFrameReady() {
+
+ YouTubeApi.isLoaded = true;
+ YouTubeApi.isIframeLoaded = true;
+
+ while (YouTubeApi.iframeQueue.length > 0) {
+ var settings = YouTubeApi.iframeQueue.pop();
+ YouTubeApi.createIframe(settings);
+ }
+ },
+
+ createIframe: function createIframe(settings) {
+ return new YT.Player(settings.containerId, settings);
+ },
+
+ getYouTubeId: function getYouTubeId(url) {
+
+ var youTubeId = '';
+
+ if (url.indexOf('?') > 0) {
+ youTubeId = YouTubeApi.getYouTubeIdFromParam(url);
+
+ if (youTubeId === '') {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+ } else {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+
+ var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
+ youTubeId = id.split('?');
+ return youTubeId[0];
+ },
+
+ getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?'),
+ parameters = parts[1].split('&');
+
+ var youTubeId = '';
+
+ for (var i = 0, total = parameters.length; i < total; i++) {
+ var paramParts = parameters[i].split('=');
+ if (paramParts[0] === 'v') {
+ youTubeId = paramParts[1];
+ break;
+ }
+ }
+
+ return youTubeId;
+ },
+
+ getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?');
+ url = parts[0];
+ return url.substring(url.lastIndexOf('/') + 1);
+ },
+
+ getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
+ if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
+ return url;
+ }
+
+ var parts = url.split('/');
+ parts[2] = parts[2].replace('.com', '-nocookie.com');
+ return parts.join('/');
+ }
+};
+
+var YouTubeIframeRenderer = {
+ name: 'youtube_iframe',
+
+ options: {
+ prefix: 'youtube_iframe',
+
+ youtube: {
+ autoplay: 0,
+ controls: 0,
+ disablekb: 1,
+ end: 0,
+ loop: 0,
+ modestbranding: 0,
+ playsinline: 0,
+ rel: 0,
+ showinfo: 0,
+ start: 0,
+ iv_load_policy: 3,
+
+ nocookie: false,
+
+ imageQuality: null
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var youtube = {},
+ apiStack = [],
+ readyState = 4;
+
+ var youTubeApi = null,
+ paused = true,
+ ended = false,
+ youTubeIframe = null,
+ volume = 1;
+
+ youtube.options = options;
+ youtube.id = mediaElement.id + '_' + options.prefix;
+ youtube.mediaElement = mediaElement;
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['get' + capName] = function () {
+ if (youTubeApi !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ return youTubeApi.getCurrentTime();
+ case 'duration':
+ return youTubeApi.getDuration();
+ case 'volume':
+ volume = youTubeApi.getVolume() / 100;
+ return volume;
+ case 'playbackRate':
+ return youTubeApi.getPlaybackRate();
+ case 'paused':
+ return paused;
+ case 'ended':
+ return ended;
+ case 'muted':
+ return youTubeApi.isMuted();
+ case 'buffered':
+ var percentLoaded = youTubeApi.getVideoLoadedFraction(),
+ duration = youTubeApi.getDuration();
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return percentLoaded * duration;
+ },
+ length: 1
+ };
+ case 'src':
+ return youTubeApi.getVideoUrl();
+ case 'readyState':
+ return readyState;
+ }
+
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ youtube['set' + capName] = function (value) {
+ if (youTubeApi !== null) {
+ switch (propName) {
+ case 'src':
+ var url = typeof value === 'string' ? value : value[0].src,
+ _videoId = YouTubeApi.getYouTubeId(url);
+
+ if (mediaElement.originalNode.autoplay) {
+ youTubeApi.loadVideoById(_videoId);
+ } else {
+ youTubeApi.cueVideoById(_videoId);
+ }
+ break;
+ case 'currentTime':
+ youTubeApi.seekTo(value);
+ break;
+ case 'muted':
+ if (value) {
+ youTubeApi.mute();
+ } else {
+ youTubeApi.unMute();
+ }
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'volume':
+ volume = value;
+ youTubeApi.setVolume(value * 100);
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'playbackRate':
+ youTubeApi.setPlaybackRate(value);
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('ratechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'readyState':
+ var event = (0, _general.createEvent)('canplay', youtube);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ youtube[methodName] = function () {
+ if (youTubeApi !== null) {
+ switch (methodName) {
+ case 'play':
+ paused = false;
+ return youTubeApi.playVideo();
+ case 'pause':
+ paused = true;
+ return youTubeApi.pauseVideo();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var errorHandler = function errorHandler(error) {
+ var message = '';
+ switch (error.data) {
+ case 2:
+ message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
+ break;
+ case 5:
+ message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
+ break;
+ case 100:
+ message = 'The video requested was not found. Either video has been removed or has been marked as private.';
+ break;
+ case 101:
+ case 105:
+ message = 'The owner of the requested video does not allow it to be played in embedded players.';
+ break;
+ default:
+ message = 'Unknown error.';
+ break;
+ }
+ mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
+ };
+
+ var youtubeContainer = _document2.default.createElement('div');
+ youtubeContainer.id = youtube.id;
+
+ if (youtube.options.youtube.nocookie) {
+ mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
+ }
+
+ mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+
+ var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
+ height = isAudio ? '1' : mediaElement.originalNode.height,
+ width = isAudio ? '1' : mediaElement.originalNode.width,
+ videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
+ youtubeSettings = {
+ id: youtube.id,
+ containerId: youtubeContainer.id,
+ videoId: videoId,
+ height: height,
+ width: width,
+ host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
+ playerVars: Object.assign({
+ controls: 0,
+ rel: 0,
+ disablekb: 1,
+ showinfo: 0,
+ modestbranding: 0,
+ html5: 1,
+ iv_load_policy: 3
+ }, youtube.options.youtube),
+ origin: _window2.default.location.host,
+ events: {
+ onReady: function onReady(e) {
+ mediaElement.youTubeApi = youTubeApi = e.target;
+ mediaElement.youTubeState = {
+ paused: true,
+ ended: false
+ };
+
+ if (apiStack.length) {
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
+
+ var stackItem = apiStack[_i2];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ youtube[stackItem.methodName]();
+ }
+ }
+ }
+
+ youTubeIframe = youTubeApi.getIframe();
+
+ if (mediaElement.originalNode.muted) {
+ youTubeApi.mute();
+ }
+
+ var events = ['mouseover', 'mouseout'],
+ assignEvents = function assignEvents(e) {
+ var newEvent = (0, _general.createEvent)(e.type, youtube);
+ mediaElement.dispatchEvent(newEvent);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ youTubeIframe.addEventListener(events[_i3], assignEvents, false);
+ }
+
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
+ var event = (0, _general.createEvent)(initEvents[_i4], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onStateChange: function onStateChange(e) {
+ var events = [];
+
+ switch (e.data) {
+ case -1:
+ events = ['loadedmetadata'];
+ paused = true;
+ ended = false;
+ break;
+ case 0:
+ events = ['ended'];
+ paused = false;
+ ended = !youtube.options.youtube.loop;
+ if (!youtube.options.youtube.loop) {
+ youtube.stopInterval();
+ }
+ break;
+ case 1:
+ events = ['play', 'playing'];
+ paused = false;
+ ended = false;
+ youtube.startInterval();
+ break;
+ case 2:
+ events = ['pause'];
+ paused = true;
+ ended = false;
+ youtube.stopInterval();
+ break;
+ case 3:
+ events = ['progress'];
+ ended = false;
+ break;
+ case 5:
+ events = ['loadeddata', 'loadedmetadata', 'canplay'];
+ paused = true;
+ ended = false;
+ break;
+ }
+
+ for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
+ var event = (0, _general.createEvent)(events[_i5], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onError: function onError(e) {
+ return errorHandler(e);
+ }
+ }
+ };
+
+ if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
+ youtubeSettings.playerVars.playsinline = 1;
+ }
+
+ if (mediaElement.originalNode.controls) {
+ youtubeSettings.playerVars.controls = 1;
+ }
+ if (mediaElement.originalNode.autoplay) {
+ youtubeSettings.playerVars.autoplay = 1;
+ }
+ if (mediaElement.originalNode.loop) {
+ youtubeSettings.playerVars.loop = 1;
+ }
+
+ if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
+ youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ }
+
+ YouTubeApi.enqueueIframe(youtubeSettings);
+
+ youtube.onEvent = function (eventName, player, _youTubeState) {
+ if (_youTubeState !== null && _youTubeState !== undefined) {
+ mediaElement.youTubeState = _youTubeState;
+ }
+ };
+
+ youtube.setSize = function (width, height) {
+ if (youTubeApi !== null) {
+ youTubeApi.setSize(width, height);
+ }
+ };
+ youtube.hide = function () {
+ youtube.stopInterval();
+ youtube.pause();
+ if (youTubeIframe) {
+ youTubeIframe.style.display = 'none';
+ }
+ };
+ youtube.show = function () {
+ if (youTubeIframe) {
+ youTubeIframe.style.display = '';
+ }
+ };
+ youtube.destroy = function () {
+ youTubeApi.destroy();
+ };
+ youtube.interval = null;
+
+ youtube.startInterval = function () {
+ youtube.interval = setInterval(function () {
+ var event = (0, _general.createEvent)('timeupdate', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 250);
+ };
+ youtube.stopInterval = function () {
+ if (youtube.interval) {
+ clearInterval(youtube.interval);
+ }
+ };
+ youtube.getPosterUrl = function () {
+ var quality = options.youtube.imageQuality,
+ resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
+ id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
+ };
+
+ return youtube;
+ }
+};
+
+_window2.default.onYouTubePlayerAPIReady = function () {
+ YouTubeApi.iFrameReady();
+};
+
+_media.typeChecks.push(function (url) {
+ return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
+ );
+});
+
+_renderer.renderer.add(YouTubeIframeRenderer);
+
+},{"2":2,"26":26,"27":27,"28":28,"3":3,"7":7,"8":8}],25:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NAV = exports.NAV = _window2.default.navigator;
+var UA = exports.UA = NAV.userAgent.toLowerCase();
+var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
+var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
+var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
+var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
+var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
+var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
+var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
+var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
+var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
+var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
+var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
+ var element = _document2.default.createElement('x'),
+ documentElement = _document2.default.documentElement,
+ getComputedStyle = _window2.default.getComputedStyle;
+
+ if (!('pointerEvents' in element.style)) {
+ return false;
+ }
+
+ element.style.pointerEvents = 'auto';
+ element.style.pointerEvents = 'x';
+ documentElement.appendChild(element);
+ var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
+ element.remove();
+ return !!supports;
+}();
+
+var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
+ var supportsPassive = false;
+ try {
+ var opts = Object.defineProperty({}, 'passive', {
+ get: function get() {
+ supportsPassive = true;
+ }
+ });
+ _window2.default.addEventListener('test', null, opts);
+ } catch (e) {}
+
+ return supportsPassive;
+}();
+
+var html5Elements = ['source', 'track', 'audio', 'video'];
+var video = void 0;
+
+for (var i = 0, total = html5Elements.length; i < total; i++) {
+ video = _document2.default.createElement(html5Elements[i]);
+}
+
+var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA);
+
+var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;
+
+var hasNativeFullscreen = video.requestFullscreen !== undefined;
+
+if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
+ hasNativeFullscreen = false;
+ hasiOSFullScreen = false;
+}
+
+var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
+var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
+var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
+var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
+var nativeFullScreenEnabled = hasTrueNativeFullScreen;
+var fullScreenEventName = '';
+var isFullScreen = void 0,
+ requestFullScreen = void 0,
+ cancelFullScreen = void 0;
+
+if (hasMozNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
+} else if (hasMsNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
+}
+
+if (IS_CHROME) {
+ hasiOSFullScreen = false;
+}
+
+if (hasTrueNativeFullScreen) {
+ if (hasWebkitNativeFullScreen) {
+ fullScreenEventName = 'webkitfullscreenchange';
+ } else if (hasMozNativeFullScreen) {
+ fullScreenEventName = 'fullscreenchange';
+ } else if (hasMsNativeFullScreen) {
+ fullScreenEventName = 'MSFullscreenChange';
+ }
+
+ exports.isFullScreen = isFullScreen = function isFullScreen() {
+ if (hasMozNativeFullScreen) {
+ return _document2.default.mozFullScreen;
+ } else if (hasWebkitNativeFullScreen) {
+ return _document2.default.webkitIsFullScreen;
+ } else if (hasMsNativeFullScreen) {
+ return _document2.default.msFullscreenElement !== null;
+ }
+ };
+
+ exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
+ if (hasWebkitNativeFullScreen) {
+ el.webkitRequestFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ el.msRequestFullscreen();
+ }
+ };
+
+ exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
+ if (hasWebkitNativeFullScreen) {
+ _document2.default.webkitCancelFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ _document2.default.mozCancelFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ _document2.default.msExitFullscreen();
+ }
+ };
+}
+
+var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
+var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
+var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
+var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
+var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
+var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
+var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
+var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
+exports.isFullScreen = isFullScreen;
+exports.requestFullScreen = requestFullScreen;
+exports.cancelFullScreen = cancelFullScreen;
+
+
+_mejs2.default.Features = _mejs2.default.Features || {};
+_mejs2.default.Features.isiPad = IS_IPAD;
+_mejs2.default.Features.isiPod = IS_IPOD;
+_mejs2.default.Features.isiPhone = IS_IPHONE;
+_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
+_mejs2.default.Features.isAndroid = IS_ANDROID;
+_mejs2.default.Features.isIE = IS_IE;
+_mejs2.default.Features.isEdge = IS_EDGE;
+_mejs2.default.Features.isChrome = IS_CHROME;
+_mejs2.default.Features.isFirefox = IS_FIREFOX;
+_mejs2.default.Features.isSafari = IS_SAFARI;
+_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
+_mejs2.default.Features.hasMSE = HAS_MSE;
+_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
+_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
+_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
+_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
+_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
+_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
+_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
+_mejs2.default.Features.isFullScreen = isFullScreen;
+_mejs2.default.Features.requestFullScreen = requestFullScreen;
+_mejs2.default.Features.cancelFullScreen = cancelFullScreen;
+
+},{"2":2,"3":3,"7":7}],26:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.removeClass = exports.addClass = exports.hasClass = undefined;
+exports.loadScript = loadScript;
+exports.offset = offset;
+exports.toggleClass = toggleClass;
+exports.fadeOut = fadeOut;
+exports.fadeIn = fadeIn;
+exports.siblings = siblings;
+exports.visible = visible;
+exports.ajax = ajax;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function loadScript(url) {
+ return new Promise(function (resolve, reject) {
+ var script = _document2.default.createElement('script');
+ script.src = url;
+ script.async = true;
+ script.onload = function () {
+ script.remove();
+ resolve();
+ };
+ script.onerror = function () {
+ script.remove();
+ reject();
+ };
+ _document2.default.head.appendChild(script);
+ });
+}
+
+function offset(el) {
+ var rect = el.getBoundingClientRect(),
+ scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
+ scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
+ return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
+}
+
+var hasClassMethod = void 0,
+ addClassMethod = void 0,
+ removeClassMethod = void 0;
+
+if ('classList' in _document2.default.documentElement) {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return el.classList !== undefined && el.classList.contains(className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ return el.classList.add(className);
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ return el.classList.remove(className);
+ };
+} else {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return new RegExp('\\b' + className + '\\b').test(el.className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ if (!hasClass(el, className)) {
+ el.className += ' ' + className;
+ }
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
+ };
+}
+
+var hasClass = exports.hasClass = hasClassMethod;
+var addClass = exports.addClass = addClassMethod;
+var removeClass = exports.removeClass = removeClassMethod;
+
+function toggleClass(el, className) {
+ hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
+}
+
+function fadeOut(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 1;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(1 - progress / duration, 2);
+ el.style.opacity = opacity < 0 ? 0 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function fadeIn(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 0;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(progress / duration, 2);
+ el.style.opacity = opacity > 1 ? 1 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function siblings(el, filter) {
+ var siblings = [];
+ el = el.parentNode.firstChild;
+ do {
+ if (!filter || filter(el)) {
+ siblings.push(el);
+ }
+ } while (el = el.nextSibling);
+ return siblings;
+}
+
+function visible(elem) {
+ if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
+ return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
+ }
+ return !!(elem.offsetWidth || elem.offsetHeight);
+}
+
+function ajax(url, dataType, success, error) {
+ var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
+
+ var type = 'application/x-www-form-urlencoded; charset=UTF-8',
+ completed = false,
+ accept = '*/'.concat('*');
+
+ switch (dataType) {
+ case 'text':
+ type = 'text/plain';
+ break;
+ case 'json':
+ type = 'application/json, text/javascript';
+ break;
+ case 'html':
+ type = 'text/html';
+ break;
+ case 'xml':
+ type = 'application/xml, text/xml';
+ break;
+ }
+
+ if (type !== 'application/x-www-form-urlencoded') {
+ accept = type + ', */*; q=0.01';
+ }
+
+ if (xhr) {
+ xhr.open('GET', url, true);
+ xhr.setRequestHeader('Accept', accept);
+ xhr.onreadystatechange = function () {
+ if (completed) {
+ return;
+ }
+
+ if (xhr.readyState === 4) {
+ if (xhr.status === 200) {
+ completed = true;
+ var data = void 0;
+ switch (dataType) {
+ case 'json':
+ data = JSON.parse(xhr.responseText);
+ break;
+ case 'xml':
+ data = xhr.responseXML;
+ break;
+ default:
+ data = xhr.responseText;
+ break;
+ }
+ success(data);
+ } else if (typeof error === 'function') {
+ error(xhr.status);
+ }
+ }
+ };
+
+ xhr.send();
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.offset = offset;
+_mejs2.default.Utils.hasClass = hasClass;
+_mejs2.default.Utils.addClass = addClass;
+_mejs2.default.Utils.removeClass = removeClass;
+_mejs2.default.Utils.toggleClass = toggleClass;
+_mejs2.default.Utils.fadeIn = fadeIn;
+_mejs2.default.Utils.fadeOut = fadeOut;
+_mejs2.default.Utils.siblings = siblings;
+_mejs2.default.Utils.visible = visible;
+_mejs2.default.Utils.ajax = ajax;
+_mejs2.default.Utils.loadScript = loadScript;
+
+},{"2":2,"3":3,"7":7}],27:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.escapeHTML = escapeHTML;
+exports.debounce = debounce;
+exports.isObjectEmpty = isObjectEmpty;
+exports.splitEvents = splitEvents;
+exports.createEvent = createEvent;
+exports.isNodeAfter = isNodeAfter;
+exports.isString = isString;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function escapeHTML(input) {
+
+ if (typeof input !== 'string') {
+ throw new Error('Argument passed must be a string');
+ }
+
+ var map = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;'
+ };
+
+ return input.replace(/[&<>"]/g, function (c) {
+ return map[c];
+ });
+}
+
+function debounce(func, wait) {
+ var _this = this,
+ _arguments = arguments;
+
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+
+ if (typeof func !== 'function') {
+ throw new Error('First argument must be a function');
+ }
+
+ if (typeof wait !== 'number') {
+ throw new Error('Second argument must be a numeric value');
+ }
+
+ var timeout = void 0;
+ return function () {
+ var context = _this,
+ args = _arguments;
+ var later = function later() {
+ timeout = null;
+ if (!immediate) {
+ func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+
+ if (callNow) {
+ func.apply(context, args);
+ }
+ };
+}
+
+function isObjectEmpty(instance) {
+ return Object.getOwnPropertyNames(instance).length <= 0;
+}
+
+function splitEvents(events, id) {
+ var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
+
+ var ret = { d: [], w: [] };
+ (events || '').split(' ').forEach(function (v) {
+ var eventName = '' + v + (id ? '.' + id : '');
+
+ if (eventName.startsWith('.')) {
+ ret.d.push(eventName);
+ ret.w.push(eventName);
+ } else {
+ ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
+ }
+ });
+
+ ret.d = ret.d.join(' ');
+ ret.w = ret.w.join(' ');
+ return ret;
+}
+
+function createEvent(eventName, target) {
+
+ if (typeof eventName !== 'string') {
+ throw new Error('Event name must be a string');
+ }
+
+ var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
+ detail = {
+ target: target
+ };
+
+ if (eventFrags !== null) {
+ eventName = eventFrags[1];
+ detail.namespace = eventFrags[2];
+ }
+
+ return new window.CustomEvent(eventName, {
+ detail: detail
+ });
+}
+
+function isNodeAfter(sourceNode, targetNode) {
+
+ return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
+}
+
+function isString(value) {
+ return typeof value === 'string';
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.escapeHTML = escapeHTML;
+_mejs2.default.Utils.debounce = debounce;
+_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
+_mejs2.default.Utils.splitEvents = splitEvents;
+_mejs2.default.Utils.createEvent = createEvent;
+_mejs2.default.Utils.isNodeAfter = isNodeAfter;
+_mejs2.default.Utils.isString = isString;
+
+},{"7":7}],28:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.typeChecks = undefined;
+exports.absolutizeUrl = absolutizeUrl;
+exports.formatType = formatType;
+exports.getMimeFromType = getMimeFromType;
+exports.getTypeFromFile = getTypeFromFile;
+exports.getExtension = getExtension;
+exports.normalizeExtension = normalizeExtension;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(27);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var typeChecks = exports.typeChecks = [];
+
+function absolutizeUrl(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var el = document.createElement('div');
+ el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
+ return el.firstChild.href;
+}
+
+function formatType(url) {
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+
+ return url && !type ? getTypeFromFile(url) : type;
+}
+
+function getMimeFromType(type) {
+
+ if (typeof type !== 'string') {
+ throw new Error('`type` argument must be a string');
+ }
+
+ return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
+}
+
+function getTypeFromFile(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ for (var i = 0, total = typeChecks.length; i < total; i++) {
+ var type = typeChecks[i](url);
+
+ if (type) {
+ return type;
+ }
+ }
+
+ var ext = getExtension(url),
+ normalizedExt = normalizeExtension(ext);
+
+ var mime = 'video/mp4';
+
+ if (normalizedExt) {
+ if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
+ mime = 'video/' + normalizedExt;
+ } else if ('mov' === normalizedExt) {
+ mime = 'video/quicktime';
+ } else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
+ mime = 'audio/' + normalizedExt;
+ }
+ }
+
+ return mime;
+}
+
+function getExtension(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var baseUrl = url.split('?')[0],
+ baseName = baseUrl.split('\\').pop().split('/').pop();
+ return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
+}
+
+function normalizeExtension(extension) {
+
+ if (typeof extension !== 'string') {
+ throw new Error('`extension` argument must be a string');
+ }
+
+ switch (extension) {
+ case 'mp4':
+ case 'm4v':
+ return 'mp4';
+ case 'webm':
+ case 'webma':
+ case 'webmv':
+ return 'webm';
+ case 'ogg':
+ case 'oga':
+ case 'ogv':
+ return 'ogg';
+ default:
+ return extension;
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.typeChecks = typeChecks;
+_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
+_mejs2.default.Utils.formatType = formatType;
+_mejs2.default.Utils.getMimeFromType = getMimeFromType;
+_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
+_mejs2.default.Utils.getExtension = getExtension;
+_mejs2.default.Utils.normalizeExtension = normalizeExtension;
+
+},{"27":27,"7":7}],29:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _promisePolyfill = _dereq_(4);
+
+var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('remove')) {
+ return;
+ }
+ Object.defineProperty(item, 'remove', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function remove() {
+ this.parentNode.removeChild(this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+
+(function () {
+
+ if (typeof window.CustomEvent === 'function') {
+ return false;
+ }
+
+ function CustomEvent(event, params) {
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
+ var evt = _document2.default.createEvent('CustomEvent');
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
+ return evt;
+ }
+
+ CustomEvent.prototype = window.Event.prototype;
+ window.CustomEvent = CustomEvent;
+})();
+
+if (typeof Object.assign !== 'function') {
+ Object.assign = function (target) {
+
+ if (target === null || target === undefined) {
+ throw new TypeError('Cannot convert undefined or null to object');
+ }
+
+ var to = Object(target);
+
+ for (var index = 1, total = arguments.length; index < total; index++) {
+ var nextSource = arguments[index];
+
+ if (nextSource !== null) {
+ for (var nextKey in nextSource) {
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ }
+ return to;
+ };
+}
+
+if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function (searchString, position) {
+ position = position || 0;
+ return this.substr(position, searchString.length) === searchString;
+ };
+}
+
+if (!Element.prototype.matches) {
+ Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = matches.length - 1;
+ while (--i >= 0 && matches.item(i) !== this) {}
+ return i > -1;
+ };
+}
+
+if (window.Element && !Element.prototype.closest) {
+ Element.prototype.closest = function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = void 0,
+ el = this;
+ do {
+ i = matches.length;
+ while (--i >= 0 && matches.item(i) !== el) {}
+ } while (i < 0 && (el = el.parentElement));
+ return el;
+ };
+}
+
+(function () {
+ var lastTime = 0;
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
+ for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
+ window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
+ var currTime = new Date().getTime();
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function () {
+ callback(currTime + timeToCall);
+ }, timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
+ clearTimeout(id);
+ };
+})();
+
+if (/firefox/i.test(navigator.userAgent)) {
+ var getComputedStyle = window.getComputedStyle;
+ window.getComputedStyle = function (el, pseudoEl) {
+ var t = getComputedStyle(el, pseudoEl);
+ return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
+ };
+}
+
+if (!window.Promise) {
+ window.Promise = _promisePolyfill2.default;
+}
+
+(function (constructor) {
+ if (constructor && constructor.prototype && constructor.prototype.children === null) {
+ Object.defineProperty(constructor.prototype, 'children', {
+ get: function get() {
+ var i = 0,
+ node = void 0,
+ nodes = this.childNodes,
+ children = [];
+ while (node = nodes[i++]) {
+ if (node.nodeType === 1) {
+ children.push(node);
+ }
+ }
+ return children;
+ }
+ });
+ }
+})(window.Node || window.Element);
+
+},{"2":2,"4":4}],30:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isDropFrame = isDropFrame;
+exports.secondsToTimeCode = secondsToTimeCode;
+exports.timeCodeToSeconds = timeCodeToSeconds;
+exports.calculateTimeFormat = calculateTimeFormat;
+exports.convertSMPTEtoSeconds = convertSMPTEtoSeconds;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function isDropFrame() {
+ var fps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 25;
+
+ return !(fps % 1 === 0);
+}
+function secondsToTimeCode(time) {
+ var forceHours = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+ var showFrameCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+ var fps = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25;
+ var secondsDecimalLength = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
+ var timeFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'hh:mm:ss';
+
+
+ time = !time || typeof time !== 'number' || time < 0 ? 0 : time;
+
+ var dropFrames = Math.round(fps * 0.066666),
+ timeBase = Math.round(fps),
+ framesPer24Hours = Math.round(fps * 3600) * 24,
+ framesPer10Minutes = Math.round(fps * 600),
+ frameSep = isDropFrame(fps) ? ';' : ':',
+ hours = void 0,
+ minutes = void 0,
+ seconds = void 0,
+ frames = void 0,
+ f = Math.round(time * fps);
+
+ if (isDropFrame(fps)) {
+
+ if (f < 0) {
+ f = framesPer24Hours + f;
+ }
+
+ f = f % framesPer24Hours;
+
+ var d = Math.floor(f / framesPer10Minutes);
+ var m = f % framesPer10Minutes;
+ f = f + dropFrames * 9 * d;
+ if (m > dropFrames) {
+ f = f + dropFrames * Math.floor((m - dropFrames) / Math.round(timeBase * 60 - dropFrames));
+ }
+
+ var timeBaseDivision = Math.floor(f / timeBase);
+
+ hours = Math.floor(Math.floor(timeBaseDivision / 60) / 60);
+ minutes = Math.floor(timeBaseDivision / 60) % 60;
+
+ if (showFrameCount) {
+ seconds = timeBaseDivision % 60;
+ } else {
+ seconds = Math.floor(f / timeBase % 60).toFixed(secondsDecimalLength);
+ }
+ } else {
+ hours = Math.floor(time / 3600) % 24;
+ minutes = Math.floor(time / 60) % 60;
+ if (showFrameCount) {
+ seconds = Math.floor(time % 60);
+ } else {
+ seconds = Math.floor(time % 60).toFixed(secondsDecimalLength);
+ }
+ }
+ hours = hours <= 0 ? 0 : hours;
+ minutes = minutes <= 0 ? 0 : minutes;
+ seconds = seconds <= 0 ? 0 : seconds;
+
+ seconds = seconds === 60 ? 0 : seconds;
+ minutes = minutes === 60 ? 0 : minutes;
+
+ var timeFormatFrags = timeFormat.split(':');
+ var timeFormatSettings = {};
+ for (var i = 0, total = timeFormatFrags.length; i < total; ++i) {
+ var unique = '';
+ for (var j = 0, t = timeFormatFrags[i].length; j < t; j++) {
+ if (unique.indexOf(timeFormatFrags[i][j]) < 0) {
+ unique += timeFormatFrags[i][j];
+ }
+ }
+ if (~['f', 's', 'm', 'h'].indexOf(unique)) {
+ timeFormatSettings[unique] = timeFormatFrags[i].length;
+ }
+ }
+
+ var result = forceHours || hours > 0 ? (hours < 10 && timeFormatSettings.h > 1 ? '0' + hours : hours) + ':' : '';
+ result += (minutes < 10 && timeFormatSettings.m > 1 ? '0' + minutes : minutes) + ':';
+ result += '' + (seconds < 10 && timeFormatSettings.s > 1 ? '0' + seconds : seconds);
+
+ if (showFrameCount) {
+ frames = (f % timeBase).toFixed(0);
+ frames = frames <= 0 ? 0 : frames;
+ result += frames < 10 && timeFormatSettings.f ? frameSep + '0' + frames : '' + frameSep + frames;
+ }
+
+ return result;
+}
+
+function timeCodeToSeconds(time) {
+ var fps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
+
+
+ if (typeof time !== 'string') {
+ throw new TypeError('Time must be a string');
+ }
+
+ if (time.indexOf(';') > 0) {
+ time = time.replace(';', ':');
+ }
+
+ if (!/\d{2}(\:\d{2}){0,3}/i.test(time)) {
+ throw new TypeError('Time code must have the format `00:00:00`');
+ }
+
+ var parts = time.split(':');
+
+ var output = void 0,
+ hours = 0,
+ minutes = 0,
+ seconds = 0,
+ frames = 0,
+ totalMinutes = 0,
+ dropFrames = Math.round(fps * 0.066666),
+ timeBase = Math.round(fps),
+ hFrames = timeBase * 3600,
+ mFrames = timeBase * 60;
+
+ switch (parts.length) {
+ default:
+ case 1:
+ seconds = parseInt(parts[0], 10);
+ break;
+ case 2:
+ minutes = parseInt(parts[0], 10);
+ seconds = parseInt(parts[1], 10);
+ break;
+ case 3:
+ hours = parseInt(parts[0], 10);
+ minutes = parseInt(parts[1], 10);
+ seconds = parseInt(parts[2], 10);
+ break;
+ case 4:
+ hours = parseInt(parts[0], 10);
+ minutes = parseInt(parts[1], 10);
+ seconds = parseInt(parts[2], 10);
+ frames = parseInt(parts[3], 10);
+ break;
+ }
+
+ if (isDropFrame(fps)) {
+ totalMinutes = 60 * hours + minutes;
+ output = hFrames * hours + mFrames * minutes + timeBase * seconds + frames - dropFrames * (totalMinutes - Math.floor(totalMinutes / 10));
+ } else {
+ output = (hFrames * hours + mFrames * minutes + fps * seconds + frames) / fps;
+ }
+
+ return parseFloat(output.toFixed(3));
+}
+
+function calculateTimeFormat(time, options) {
+ var fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 25;
+
+
+ time = !time || typeof time !== 'number' || time < 0 ? 0 : time;
+
+ var hours = Math.floor(time / 3600) % 24,
+ minutes = Math.floor(time / 60) % 60,
+ seconds = Math.floor(time % 60),
+ frames = Math.floor((time % 1 * fps).toFixed(3)),
+ lis = [[frames, 'f'], [seconds, 's'], [minutes, 'm'], [hours, 'h']];
+
+ var format = options.timeFormat,
+ firstTwoPlaces = format[1] === format[0],
+ separatorIndex = firstTwoPlaces ? 2 : 1,
+ separator = format.length < separatorIndex ? format[separatorIndex] : ':',
+ firstChar = format[0],
+ required = false;
+
+ for (var i = 0, len = lis.length; i < len; i++) {
+ if (~format.indexOf(lis[i][1])) {
+ required = true;
+ } else if (required) {
+ var hasNextValue = false;
+ for (var j = i; j < len; j++) {
+ if (lis[j][0] > 0) {
+ hasNextValue = true;
+ break;
+ }
+ }
+
+ if (!hasNextValue) {
+ break;
+ }
+
+ if (!firstTwoPlaces) {
+ format = firstChar + format;
+ }
+ format = lis[i][1] + separator + format;
+ if (firstTwoPlaces) {
+ format = lis[i][1] + format;
+ }
+ firstChar = lis[i][1];
+ }
+ }
+
+ options.timeFormat = format;
+}
+
+function convertSMPTEtoSeconds(SMPTE) {
+
+ if (typeof SMPTE !== 'string') {
+ throw new TypeError('Argument must be a string value');
+ }
+
+ SMPTE = SMPTE.replace(',', '.');
+
+ var decimalLen = ~SMPTE.indexOf('.') ? SMPTE.split('.')[1].length : 0;
+
+ var secs = 0,
+ multiplier = 1;
+
+ SMPTE = SMPTE.split(':').reverse();
+
+ for (var i = 0, total = SMPTE.length; i < total; i++) {
+ multiplier = 1;
+ if (i > 0) {
+ multiplier = Math.pow(60, i);
+ }
+ secs += Number(SMPTE[i]) * multiplier;
+ }
+ return Number(secs.toFixed(decimalLen));
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.secondsToTimeCode = secondsToTimeCode;
+_mejs2.default.Utils.timeCodeToSeconds = timeCodeToSeconds;
+_mejs2.default.Utils.calculateTimeFormat = calculateTimeFormat;
+_mejs2.default.Utils.convertSMPTEtoSeconds = convertSMPTEtoSeconds;
+
+},{"7":7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]);
diff --git a/wp-includes/js/mediaelement/mediaelement-and-player.min.js b/wp-includes/js/mediaelement/mediaelement-and-player.min.js
new file mode 100644
index 0000000..c3b41e1
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement-and-player.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function r(a,s,l){function d(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return d(t||e)},i,i.exports,r,a,s,l)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)d(l[e]);return d}({1:[function(e,t,n){},{}],2:[function(i,r,e){(function(e){var t,n=void 0!==e?e:"undefined"!=typeof window?window:{},o=i(1);"undefined"!=typeof document?t=document:(t=n["__GLOBAL_DOCUMENT_CACHE@4"])||(t=n["__GLOBAL_DOCUMENT_CACHE@4"]=o),r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,n,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){!function(e){var t=setTimeout;function o(){}function r(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function i(n,o){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,r._immediateFn(function(){var e=1===n._state?o.onFulfilled:o.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(e){return void s(o.promise,e)}a(o.promise,t)}else(1===n._state?a:s)(o.promise,n._value)})):n._deferreds.push(o)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof r)return t._state=3,t._value=e,void l(t);if("function"==typeof n)return void d((o=n,i=e,function(){o.apply(i,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){s(t,e)}var o,i}function s(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)i(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,s(t,e))})}catch(e){if(n)return;n=!0,s(t,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.all=function(e){var s=Array.prototype.slice.call(e);return new r(function(o,i){if(0===s.length)return o([]);var r=s.length;function a(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},i)}s[t]=e,0==--r&&o(s)}catch(e){i(e)}}for(var e=0;e<s.length;e++)a(e,s[e])})},r.resolve=function(t){return t&&"object"==typeof t&&t.constructor===r?t:new r(function(e){e(t)})},r.reject=function(n){return new r(function(e,t){t(n)})},r.race=function(i){return new r(function(e,t){for(var n=0,o=i.length;n<o;n++)i[n].then(e,t)})},r._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},r._setImmediateFn=function(e){r._immediateFn=e},r._setUnhandledRejectionFn=function(e){r._unhandledRejectionFn=e},void 0!==n&&n.exports?n.exports=r:e.Promise||(e.Promise=r)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e(7),r=(o=i)&&o.__esModule?o:{default:o},s=e(15),l=e(27);var d={lang:"en",en:s.EN,language:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!=t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");d.lang=t[0],void 0===d[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===a(t[1])?t[1]:{},d[t[0]]=(0,l.isObjectEmpty)(t[1])?s.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===a(t[1])&&(d[t[0]]=t[1])}return d.lang},t:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,o=void 0,i=d.language(),r=function(e,t,n){return"object"!==(void 0===e?"undefined":a(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||0<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:6<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:3<=(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:11<=(arguments.length<=0?void 0:arguments[0])%100?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||1<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:10<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==d[i]&&(n=d[i][e],null!==t&&"number"==typeof t&&(o=d[i]["mejs.plural-form"],n=r.apply(null,[n,t,o]))),!n&&d.en&&(n=d.en[e],null!==t&&"number"==typeof t&&(o=d.en["mejs.plural-form"],n=r.apply(null,[n,t,o]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,l.escapeHTML)(n)}return e}};r.default.i18n=d,"undefined"!=typeof mejsL10n&&r.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=d},{15:15,27:27,7:7}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F=o(e(3)),j=o(e(2)),I=o(e(7)),M=e(27),O=e(28),D=e(8),R=e(25);function o(e){return e&&e.__esModule?e:{default:e}}var i=function e(t,n,o){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var f=this;o=Array.isArray(o)?o:null,f.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(f.defaults,n),f.mediaElement=j.default.createElement(n.fakeNodeName);var i=t,r=!1;if("string"==typeof t?f.mediaElement.originalNode=j.default.getElementById(t):i=(f.mediaElement.originalNode=t).id,void 0===f.mediaElement.originalNode||null===f.mediaElement.originalNode)return null;f.mediaElement.options=n,i=i||"mejs_"+Math.random().toString().slice(2),f.mediaElement.originalNode.setAttribute("id",i+"_from_mejs");var a=f.mediaElement.originalNode.tagName.toLowerCase();-1<["video","audio"].indexOf(a)&&!f.mediaElement.originalNode.getAttribute("preload")&&f.mediaElement.originalNode.setAttribute("preload","none"),f.mediaElement.originalNode.parentNode.insertBefore(f.mediaElement,f.mediaElement.originalNode),f.mediaElement.appendChild(f.mediaElement.originalNode);var s=function(t,e){if("https:"===F.default.location.protocol&&0===t.indexOf("http:")&&R.IS_IOS&&-1<I.default.html5media.mediaTypes.indexOf(e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var e=(F.default.URL||F.default.webkitURL).createObjectURL(this.response);return f.mediaElement.originalNode.setAttribute("src",e),e}return t},n.open("GET",t),n.responseType="blob",n.send()}return t},l=void 0;if(null!==o)l=o;else if(null!==f.mediaElement.originalNode)switch(l=[],f.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":l.push({type:"",src:f.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var d=f.mediaElement.originalNode.children.length,u=f.mediaElement.originalNode.getAttribute("src");if(u){var p=f.mediaElement.originalNode,m=(0,O.formatType)(u,p.getAttribute("type"));l.push({type:m,src:s(u,m)})}for(var h=0;h<d;h++){var v=f.mediaElement.originalNode.children[h];if("source"===v.tagName.toLowerCase()){var g=v.getAttribute("src"),y=(0,O.formatType)(g,v.getAttribute("type"));l.push({type:y,src:s(g,y)})}}}f.mediaElement.id=i,f.mediaElement.renderers={},f.mediaElement.events={},f.mediaElement.promises=[],f.mediaElement.renderer=null,f.mediaElement.rendererName=null,f.mediaElement.changeRenderer=function(e,t){var n=c,o=2<Object.keys(t[0]).length?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(o),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var i=n.mediaElement.renderers[e],r=null;if(null!=i)return i.show(),i.setSrc(o),n.mediaElement.renderer=i,n.mediaElement.rendererName=e,!0;for(var a=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:D.renderer.order,s=0,l=a.length;s<l;s++){var d=a[s];if(d===e){r=D.renderer.renderers[d];var u=Object.assign(r.options,n.mediaElement.options);return(i=r.create(n.mediaElement,u,t)).name=e,n.mediaElement.renderers[r.name]=i,n.mediaElement.renderer=i,n.mediaElement.rendererName=e,i.show(),!0}}return!1},f.mediaElement.setSize=function(e,t){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&f.mediaElement.renderer.setSize(e,t)},f.mediaElement.generateError=function(e,t){e=e||"",t=Array.isArray(t)?t:[];var n=(0,M.createEvent)("error",f.mediaElement);n.message=e,n.urls=t,f.mediaElement.dispatchEvent(n),r=!0};var E=I.default.html5media.properties,b=I.default.html5media.methods,S=function(t,e,n,o){var i=t[e];Object.defineProperty(t,e,{get:function(){return n.apply(t,[i])},set:function(e){return i=o.apply(t,[e])}})},x=function(e){if("src"!==e){var t=""+e.substring(0,1).toUpperCase()+e.substring(1),n=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["get"+t]?f.mediaElement.renderer["get"+t]():null},o=function(e){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["set"+t]&&f.mediaElement.renderer["set"+t](e)};S(f.mediaElement,e,n,o),f.mediaElement["get"+t]=n,f.mediaElement["set"+t]=o}},w=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer?f.mediaElement.renderer.getSrc():null},P=function(e){var t=[];if("string"==typeof e)t.push({src:e,type:e?(0,O.getTypeFromFile)(e):""});else if("object"===(void 0===e?"undefined":L(e))&&void 0!==e.src){var n=(0,O.absolutizeUrl)(e.src),o=e.type,i=Object.assign(e,{src:n,type:""!==o&&null!=o||!n?o:(0,O.getTypeFromFile)(n)});t.push(i)}else if(Array.isArray(e))for(var r=0,a=e.length;r<a;r++){var s=(0,O.absolutizeUrl)(e[r].src),l=e[r].type,d=Object.assign(e[r],{src:s,type:""!==l&&null!=l||!s?l:(0,O.getTypeFromFile)(s)});t.push(d)}var u=D.renderer.select(t,f.mediaElement.options.renderers.length?f.mediaElement.options.renderers:[]),c=void 0;if(f.mediaElement.paused||null==f.mediaElement.src||""===f.mediaElement.src||(f.mediaElement.pause(),c=(0,M.createEvent)("pause",f.mediaElement),f.mediaElement.dispatchEvent(c)),f.mediaElement.originalNode.src=t[0].src||"",null!==u||!t[0].src)return!(null==t[0].src||""===t[0].src)?f.mediaElement.changeRenderer(u.rendererName,t):null;f.mediaElement.generateError("No renderer found",t)},T=function(e,t){try{if("play"!==e||"native_dash"!==f.mediaElement.rendererName&&"native_hls"!==f.mediaElement.rendererName&&"vimeo_iframe"!==f.mediaElement.rendererName)f.mediaElement.renderer[e](t);else{var n=f.mediaElement.renderer[e](t);n&&"function"==typeof n.then&&n.catch(function(){f.mediaElement.paused&&setTimeout(function(){var e=f.mediaElement.renderer.play();void 0!==e&&e.catch(function(){f.mediaElement.renderer.paused||f.mediaElement.renderer.pause()})},150)})}}catch(e){f.mediaElement.generateError(e,l)}},C=function(o){f.mediaElement[o]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer[o]&&(f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){T(o,t)}).catch(function(e){f.mediaElement.generateError(e,l)}):T(o,t)),null}};S(f.mediaElement,"src",w,P),f.mediaElement.getSrc=w,f.mediaElement.setSrc=P;for(var k=0,_=E.length;k<_;k++)x(E[k]);for(var N=0,A=b.length;N<A;N++)C(b[N]);return f.mediaElement.addEventListener=function(e,t){f.mediaElement.events[e]=f.mediaElement.events[e]||[],f.mediaElement.events[e].push(t)},f.mediaElement.removeEventListener=function(e,t){if(!e)return f.mediaElement.events={},!0;var n=f.mediaElement.events[e];if(!n)return!0;if(!t)return f.mediaElement.events[e]=[],!0;for(var o=0;o<n.length;o++)if(n[o]===t)return f.mediaElement.events[e].splice(o,1),!0;return!1},f.mediaElement.dispatchEvent=function(e){var t=f.mediaElement.events[e.type];if(t)for(var n=0;n<t.length;n++)t[n].apply(null,[e])},f.mediaElement.destroy=function(){var e=f.mediaElement.originalNode.cloneNode(!0),t=f.mediaElement.parentElement;e.removeAttribute("id"),e.remove(),f.mediaElement.remove(),t.appendChild(e)},l.length&&(f.mediaElement.src=l),f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode)}).catch(function(){r&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)}):(f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode),r&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)),f.mediaElement};F.default.MediaElement=i,I.default.MediaElement=i,n.default=i},{2:2,25:25,27:27,28:28,3:3,7:7,8:8}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i=e(3);var r={version:"4.2.17",html5media:{properties:["volume","src","currentTime","muted","duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable","currentSrc","preload","bufferedBytes","bufferedTime","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","autoplay","loop","controls"],readOnlyProperties:["duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable"],methods:["load","play","pause","canPlayType"],events:["loadstart","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","suspend","abort","error","emptied","stalled","play","playing","pause","waiting","seeking","seeked","timeupdate","ended","ratechange","volumechange"],mediaTypes:["audio/mp3","audio/ogg","audio/oga","audio/wav","audio/x-wav","audio/wave","audio/x-pn-wav","audio/mpeg","audio/mp4","video/mp4","video/webm","video/ogg","video/ogv"]}};((o=i)&&o.__esModule?o:{default:o}).default.mejs=r,n.default=r},{3:3}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderer=void 0;var o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),a=e(7),s=(o=a)&&o.__esModule?o:{default:o};var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return r(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var o=[/^(html5|native)/i,/^flash/i,/iframe$/i],i=function(e){for(var t=0,n=o.length;t<n;t++)if(o[t].test(e))return t;return o.length};t.sort(function(e,t){return i(e)-i(t)})}for(var r=0,a=t.length;r<a;r++){var s=t[r],l=this.renderers[s];if(null!=l)for(var d=0,u=e.length;d<u;d++)if("function"==typeof l.canPlayType&&"string"==typeof e[d].type&&l.canPlayType(e[d].type))return{rendererName:l.name,src:e[d].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":i(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),d=n.renderer=new l;s.default.Renderers=d},{7:7}],9:[function(e,t,n){"use strict";var f=a(e(3)),p=a(e(2)),i=a(e(5)),o=e(16),r=a(o),m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(e(25)),h=e(27),v=e(26),g=e(28);function a(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{usePluginFullScreen:!0,fullscreenText:null,useFakeFullscreen:!1}),Object.assign(r.default.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,isPluginClickThroughCreated:!1,fullscreenMode:"",containerSizeTimeout:null,buildfullscreen:function(n){if(n.isVideo){n.isInIframe=f.default.location!==f.default.parent.location,n.detectFullscreenMode();var o=this,e=(0,h.isString)(o.options.fullscreenText)?o.options.fullscreenText:i.default.t("mejs.fullscreen"),t=p.default.createElement("div");if(t.className=o.options.classPrefix+"button "+o.options.classPrefix+"fullscreen-button",t.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',o.addControlElement(t,"fullscreen"),t.addEventListener("click",function(){m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||n.isFullScreen?n.exitFullScreen():n.enterFullScreen()}),n.fullscreenBtn=t,o.options.keyActions.push({keys:[70],action:function(e,t,n,o){o.ctrlKey||void 0!==e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}),o.exitFullscreenCallback=function(e){var t=e.which||e.keyCode||0;o.options.enableKeyboard&&27===t&&(m.HAS_TRUE_NATIVE_FULLSCREEN&&m.IS_FULLSCREEN||o.isFullScreen)&&n.exitFullScreen()},o.globalBind("keydown",o.exitFullscreenCallback),o.normalHeight=0,o.normalWidth=0,m.HAS_TRUE_NATIVE_FULLSCREEN){n.globalBind(m.FULLSCREEN_EVENT_NAME,function(){n.isFullScreen&&(m.isFullScreen()?(n.isNativeFullScreen=!0,n.setControlsSize()):(n.isNativeFullScreen=!1,n.exitFullScreen()))})}}},cleanfullscreen:function(e){e.exitFullScreen(),e.globalUnbind("keydown",e.exitFullscreenCallback)},detectFullscreenMode:function(){var e=null!==this.media.rendererName&&/(native|html5)/i.test(this.media.rendererName),t="";return m.HAS_TRUE_NATIVE_FULLSCREEN&&e?t="native-native":m.HAS_TRUE_NATIVE_FULLSCREEN&&!e?t="plugin-native":this.usePluginFullScreen&&m.SUPPORT_POINTER_EVENTS&&(t="plugin-click"),this.fullscreenMode=t},enterFullScreen:function(){var o=this,e=null!==o.media.rendererName&&/(html5|native)/i.test(o.media.rendererName),t=getComputedStyle(o.getElement(o.container));if(o.isVideo)if(!1===o.options.useFakeFullscreen&&(m.IS_IOS||m.IS_SAFARI)&&m.HAS_IOS_FULLSCREEN&&"function"==typeof o.media.originalNode.webkitEnterFullscreen&&o.media.originalNode.canPlayType((0,g.getTypeFromFile)(o.media.getSrc())))o.media.originalNode.webkitEnterFullscreen();else{if((0,v.addClass)(p.default.documentElement,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.getElement(o.container),o.options.classPrefix+"container-fullscreen"),o.normalHeight=parseFloat(t.height),o.normalWidth=parseFloat(t.width),"native-native"!==o.fullscreenMode&&"plugin-native"!==o.fullscreenMode||(m.requestFullScreen(o.getElement(o.container)),o.isInIframe&&setTimeout(function e(){if(o.isNativeFullScreen){var t=f.default.innerWidth||p.default.documentElement.clientWidth||p.default.body.clientWidth,n=screen.width;.002*n<Math.abs(n-t)?o.exitFullScreen():setTimeout(e,500)}},1e3)),o.getElement(o.container).style.width="100%",o.getElement(o.container).style.height="100%",o.containerSizeTimeout=setTimeout(function(){o.getElement(o.container).style.width="100%",o.getElement(o.container).style.height="100%",o.setControlsSize()},500),e)o.node.style.width="100%",o.node.style.height="100%";else for(var n=o.getElement(o.container).querySelectorAll("embed, object, video"),i=n.length,r=0;r<i;r++)n[r].style.width="100%",n[r].style.height="100%";o.options.setDimensions&&"function"==typeof o.media.setSize&&o.media.setSize(screen.width,screen.height);for(var a=o.getElement(o.layers).children,s=a.length,l=0;l<s;l++)a[l].style.width="100%",a[l].style.height="100%";o.fullscreenBtn&&((0,v.removeClass)(o.fullscreenBtn,o.options.classPrefix+"fullscreen"),(0,v.addClass)(o.fullscreenBtn,o.options.classPrefix+"unfullscreen")),o.setControlsSize(),o.isFullScreen=!0;var d=Math.min(screen.width/o.width,screen.height/o.height),u=o.getElement(o.container).querySelector("."+o.options.classPrefix+"captions-text");u&&(u.style.fontSize=100*d+"%",u.style.lineHeight="normal",o.getElement(o.container).querySelector("."+o.options.classPrefix+"captions-position").style.bottom=(screen.height-o.normalHeight)/2-o.getElement(o.controls).offsetHeight/2+d+15+"px");var c=(0,h.createEvent)("enteredfullscreen",o.getElement(o.container));o.getElement(o.container).dispatchEvent(c)}},exitFullScreen:function(){var e=this,t=null!==e.media.rendererName&&/(native|html5)/i.test(e.media.rendererName);if(e.isVideo){if(clearTimeout(e.containerSizeTimeout),m.HAS_TRUE_NATIVE_FULLSCREEN&&(m.IS_FULLSCREEN||e.isFullScreen)&&m.cancelFullScreen(),(0,v.removeClass)(p.default.documentElement,e.options.classPrefix+"fullscreen"),(0,v.removeClass)(e.getElement(e.container),e.options.classPrefix+"container-fullscreen"),e.options.setDimensions){if(e.getElement(e.container).style.width=e.normalWidth+"px",e.getElement(e.container).style.height=e.normalHeight+"px",t)e.node.style.width=e.normalWidth+"px",e.node.style.height=e.normalHeight+"px";else for(var n=e.getElement(e.container).querySelectorAll("embed, object, video"),o=n.length,i=0;i<o;i++)n[i].style.width=e.normalWidth+"px",n[i].style.height=e.normalHeight+"px";"function"==typeof e.media.setSize&&e.media.setSize(e.normalWidth,e.normalHeight);for(var r=e.getElement(e.layers).children,a=r.length,s=0;s<a;s++)r[s].style.width=e.normalWidth+"px",r[s].style.height=e.normalHeight+"px"}e.fullscreenBtn&&((0,v.removeClass)(e.fullscreenBtn,e.options.classPrefix+"unfullscreen"),(0,v.addClass)(e.fullscreenBtn,e.options.classPrefix+"fullscreen")),e.setControlsSize(),e.isFullScreen=!1;var l=e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-text");l&&(l.style.fontSize="",l.style.lineHeight="",e.getElement(e.container).querySelector("."+e.options.classPrefix+"captions-position").style.bottom="");var d=(0,h.createEvent)("exitedfullscreen",e.getElement(e.container));e.getElement(e.container).dispatchEvent(d)}}})},{16:16,2:2,25:25,26:26,27:27,28:28,3:3,5:5}],10:[function(e,t,n){"use strict";var c=r(e(2)),o=e(16),i=r(o),f=r(e(5)),p=e(27),m=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{playText:null,pauseText:null}),Object.assign(i.default.prototype,{buildplaypause:function(e,t,n,o){var i=this,r=i.options,a=(0,p.isString)(r.playText)?r.playText:f.default.t("mejs.play"),s=(0,p.isString)(r.pauseText)?r.pauseText:f.default.t("mejs.pause"),l=c.default.createElement("div");l.className=i.options.classPrefix+"button "+i.options.classPrefix+"playpause-button "+i.options.classPrefix+"play",l.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+a+'" aria-label="'+s+'" tabindex="0"></button>',l.addEventListener("click",function(){i.paused?i.play():i.pause()});var d=l.querySelector("button");function u(e){"play"===e?((0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"pause"),d.setAttribute("title",s),d.setAttribute("aria-label",s)):((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"replay"),(0,m.addClass)(l,i.options.classPrefix+"play"),d.setAttribute("title",a),d.setAttribute("aria-label",a))}i.addControlElement(l,"playpause"),u("pse"),o.addEventListener("loadedmetadata",function(){-1===o.rendererName.indexOf("flash")&&u("pse")}),o.addEventListener("play",function(){u("play")}),o.addEventListener("playing",function(){u("play")}),o.addEventListener("pause",function(){u("pse")}),o.addEventListener("ended",function(){e.options.loop||((0,m.removeClass)(l,i.options.classPrefix+"pause"),(0,m.removeClass)(l,i.options.classPrefix+"play"),(0,m.addClass)(l,i.options.classPrefix+"replay"),d.setAttribute("title",a),d.setAttribute("aria-label",a))})}})},{16:16,2:2,26:26,27:27,5:5}],11:[function(e,t,n){"use strict";var p=r(e(2)),o=e(16),i=r(o),m=r(e(5)),y=e(25),E=e(30),b=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{enableProgressTooltip:!0,useSmoothHover:!0,forceLive:!1}),Object.assign(i.default.prototype,{buildprogress:function(h,s,e,d){var u=0,v=!1,c=!1,g=this,t=h.options.autoRewind,n=h.options.enableProgressTooltip?'<span class="'+g.options.classPrefix+'time-float"><span class="'+g.options.classPrefix+'time-float-current">00:00</span><span class="'+g.options.classPrefix+'time-float-corner"></span></span>':"",o=p.default.createElement("div");o.className=g.options.classPrefix+"time-rail",o.innerHTML='<span class="'+g.options.classPrefix+"time-total "+g.options.classPrefix+'time-slider"><span class="'+g.options.classPrefix+'time-buffering"></span><span class="'+g.options.classPrefix+'time-loaded"></span><span class="'+g.options.classPrefix+'time-current"></span><span class="'+g.options.classPrefix+'time-hovered no-hover"></span><span class="'+g.options.classPrefix+'time-handle"><span class="'+g.options.classPrefix+'time-handle-content"></span></span>'+n+"</span>",g.addControlElement(o,"progress"),g.options.keyActions.push({keys:[37,227],action:function(e){if(!isNaN(e.duration)&&0<e.duration){e.isVideo&&(e.showControls(),e.startControlsTimer());var t=e.getElement(e.container).querySelector("."+g.options.classPrefix+"time-total");t&&t.focus();var n=Math.max(e.currentTime-e.options.defaultSeekBackwardInterval(e),0);e.paused||e.pause(),setTimeout(function(){e.setCurrentTime(n)},0),setTimeout(function(){e.play()},0)}}},{keys:[39,228],action:function(e){if(!isNaN(e.duration)&&0<e.duration){e.isVideo&&(e.showControls(),e.startControlsTimer());var t=e.getElement(e.container).querySelector("."+g.options.classPrefix+"time-total");t&&t.focus();var n=Math.min(e.currentTime+e.options.defaultSeekForwardInterval(e),e.duration);e.paused||e.pause(),setTimeout(function(){e.setCurrentTime(n)},0),setTimeout(function(){e.play()},0)}}}),g.rail=s.querySelector("."+g.options.classPrefix+"time-rail"),g.total=s.querySelector("."+g.options.classPrefix+"time-total"),g.loaded=s.querySelector("."+g.options.classPrefix+"time-loaded"),g.current=s.querySelector("."+g.options.classPrefix+"time-current"),g.handle=s.querySelector("."+g.options.classPrefix+"time-handle"),g.timefloat=s.querySelector("."+g.options.classPrefix+"time-float"),g.timefloatcurrent=s.querySelector("."+g.options.classPrefix+"time-float-current"),g.slider=s.querySelector("."+g.options.classPrefix+"time-slider"),g.hovered=s.querySelector("."+g.options.classPrefix+"time-hovered"),g.buffer=s.querySelector("."+g.options.classPrefix+"time-buffering"),g.newTime=0,g.forcedHandlePause=!1,g.setTransformStyle=function(e,t){e.style.transform=t,e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t},g.buffer.style.display="none";var i=function(e){var t=getComputedStyle(g.total),n=(0,b.offset)(g.total),o=g.total.offsetWidth,i=void 0!==t.webkitTransform?"webkitTransform":void 0!==t.mozTransform?"mozTransform ":void 0!==t.oTransform?"oTransform":void 0!==t.msTransform?"msTransform":"transform",r="WebKitCSSMatrix"in window?"WebKitCSSMatrix":"MSCSSMatrix"in window?"MSCSSMatrix":"CSSMatrix"in window?"CSSMatrix":void 0,a=0,s=0,l=0,d=void 0;if(d=e.originalEvent&&e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.changedTouches?e.changedTouches[0].pageX:e.pageX,g.getDuration()){if(d<n.left?d=n.left:d>o+n.left&&(d=o+n.left),a=(l=d-n.left)/o,g.newTime=a*g.getDuration(),v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),!y.IS_IOS&&!y.IS_ANDROID){if(l<0&&(l=0),g.options.useSmoothHover&&null!==r&&void 0!==window[r]){var u=new window[r](getComputedStyle(g.handle)[i]).m41,c=l/parseFloat(getComputedStyle(g.total).width)-u/parseFloat(getComputedStyle(g.total).width);g.hovered.style.left=u+"px",g.setTransformStyle(g.hovered,"scaleX("+c+")"),g.hovered.setAttribute("pos",l),0<=c?(0,b.removeClass)(g.hovered,"negative"):(0,b.addClass)(g.hovered,"negative")}if(g.timefloat){var f=g.timefloat.offsetWidth/2,p=mejs.Utils.offset(g.getElement(g.container)),m=getComputedStyle(g.timefloat);s=d-p.left<g.timefloat.offsetWidth?f:d-p.left>=g.getElement(g.container).offsetWidth-f?g.total.offsetWidth-f:l,(0,b.hasClass)(g.getElement(g.container),g.options.classPrefix+"long-video")&&(s+=parseFloat(m.marginLeft)/2+g.timefloat.offsetWidth/2),g.timefloat.style.left=s+"px",g.timefloatcurrent.innerHTML=(0,E.secondsToTimeCode)(g.newTime,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),g.timefloat.style.display="block"}}}else y.IS_IOS||y.IS_ANDROID||!g.timefloat||(s=g.timefloat.offsetWidth+o>=g.getElement(g.container).offsetWidth?g.timefloat.offsetWidth/2:0,g.timefloat.style.left=s+"px",g.timefloat.style.left=s+"px",g.timefloat.style.display="block")},f=function(){1e3<=new Date-u&&g.play()};g.slider.addEventListener("focus",function(){h.options.autoRewind=!1}),g.slider.addEventListener("blur",function(){h.options.autoRewind=t}),g.slider.addEventListener("keydown",function(e){if(1e3<=new Date-u&&(c=g.paused),g.options.enableKeyboard&&g.options.keyActions.length){var t=e.which||e.keyCode||0,n=g.getDuration(),o=h.options.defaultSeekForwardInterval(d),i=h.options.defaultSeekBackwardInterval(d),r=g.getCurrentTime(),a=g.getElement(g.container).querySelector("."+g.options.classPrefix+"volume-slider");if(38===t||40===t){a&&(a.style.display="block"),g.isVideo&&(g.showControls(),g.startControlsTimer());var s=38===t?Math.min(g.volume+.1,1):Math.max(g.volume-.1,0),l=s<=0;return g.setVolume(s),void g.setMuted(l)}switch(a&&(a.style.display="none"),t){case 37:g.getDuration()!==1/0&&(r-=i);break;case 39:g.getDuration()!==1/0&&(r+=o);break;case 36:r=0;break;case 35:r=n;break;case 13:case 32:return void(y.IS_FIREFOX&&(g.paused?g.play():g.pause()));default:return}r=r<0||isNaN(r)?0:n<=r?n:Math.floor(r),u=new Date,c||h.pause(),setTimeout(function(){g.setCurrentTime(r)},0),r<g.getDuration()&&!c&&setTimeout(f,1100),h.showControls(),e.preventDefault(),e.stopPropagation()}});var r=["mousedown","touchstart"];g.slider.addEventListener("dragstart",function(){return!1});for(var a=0,l=r.length;a<l;a++)g.slider.addEventListener(r[a],function(e){if(g.forcedHandlePause=!1,g.getDuration()!==1/0&&(1===e.which||0===e.which)){g.paused||(g.pause(),g.forcedHandlePause=!0),v=!0,i(e);for(var t=["mouseup","touchend"],n=0,o=t.length;n<o;n++)g.getElement(g.container).addEventListener(t[n],function(e){var t=e.target;(t===g.slider||t.closest("."+g.options.classPrefix+"time-slider"))&&i(e)});g.globalBind("mouseup.dur touchend.dur",function(){v&&null!==g.getCurrentTime()&&g.newTime.toFixed(4)!==g.getCurrentTime().toFixed(4)&&(g.setCurrentTime(g.newTime),g.setCurrentRailHandle(g.newTime),g.updateCurrent(g.newTime)),g.forcedHandlePause&&(g.slider.focus(),g.play()),g.forcedHandlePause=!1,v=!1,g.timefloat&&(g.timefloat.style.display="none")})}},!(!y.SUPPORT_PASSIVE_EVENT||"touchstart"!==r[a])&&{passive:!0});g.slider.addEventListener("mouseenter",function(e){e.target===g.slider&&g.getDuration()!==1/0&&(g.getElement(g.container).addEventListener("mousemove",function(e){var t=e.target;(t===g.slider||t.closest("."+g.options.classPrefix+"time-slider"))&&i(e)}),!g.timefloat||y.IS_IOS||y.IS_ANDROID||(g.timefloat.style.display="block"),g.hovered&&!y.IS_IOS&&!y.IS_ANDROID&&g.options.useSmoothHover&&(0,b.removeClass)(g.hovered,"no-hover"))}),g.slider.addEventListener("mouseleave",function(){g.getDuration()!==1/0&&(v||(g.timefloat&&(g.timefloat.style.display="none"),g.hovered&&g.options.useSmoothHover&&(0,b.addClass)(g.hovered,"no-hover")))}),g.broadcastCallback=function(e){var t,n,o,i,r=s.querySelector("."+g.options.classPrefix+"broadcast");if(g.options.forceLive||g.getDuration()===1/0){if(!r&&g.options.forceLive){var a=p.default.createElement("span");a.className=g.options.classPrefix+"broadcast",a.innerText=m.default.t("mejs.live-broadcast"),g.slider.style.display="none",g.rail.appendChild(a)}}else r&&(g.slider.style.display="",r.remove()),h.setProgressRail(e),g.forcedHandlePause||h.setCurrentRail(e),t=g.getCurrentTime(),n=m.default.t("mejs.time-slider"),o=(0,E.secondsToTimeCode)(t,h.options.alwaysShowHours,h.options.showTimecodeFrameCount,h.options.framesPerSecond,h.options.secondsDecimalLength,h.options.timeFormat),i=g.getDuration(),g.slider.setAttribute("role","slider"),g.slider.tabIndex=0,d.paused?(g.slider.setAttribute("aria-label",n),g.slider.setAttribute("aria-valuemin",0),g.slider.setAttribute("aria-valuemax",isNaN(i)?0:i),g.slider.setAttribute("aria-valuenow",t),g.slider.setAttribute("aria-valuetext",o)):(g.slider.removeAttribute("aria-label"),g.slider.removeAttribute("aria-valuemin"),g.slider.removeAttribute("aria-valuemax"),g.slider.removeAttribute("aria-valuenow"),g.slider.removeAttribute("aria-valuetext"))},d.addEventListener("progress",g.broadcastCallback),d.addEventListener("timeupdate",g.broadcastCallback),d.addEventListener("play",function(){g.buffer.style.display="none"}),d.addEventListener("playing",function(){g.buffer.style.display="none"}),d.addEventListener("seeking",function(){g.buffer.style.display=""}),d.addEventListener("seeked",function(){g.buffer.style.display="none"}),d.addEventListener("pause",function(){g.buffer.style.display="none"}),d.addEventListener("waiting",function(){g.buffer.style.display=""}),d.addEventListener("loadeddata",function(){g.buffer.style.display=""}),d.addEventListener("canplay",function(){g.buffer.style.display="none"}),d.addEventListener("error",function(){g.buffer.style.display="none"}),g.getElement(g.container).addEventListener("controlsresize",function(e){g.getDuration()!==1/0&&(h.setProgressRail(e),g.forcedHandlePause||h.setCurrentRail(e))})},cleanprogress:function(e,t,n,o){o.removeEventListener("progress",e.broadcastCallback),o.removeEventListener("timeupdate",e.broadcastCallback),e.rail&&e.rail.remove()},setProgressRail:function(e){var t=this,n=void 0!==e?e.detail.target||e.target:t.media,o=null;n&&n.buffered&&0<n.buffered.length&&n.buffered.end&&t.getDuration()?o=n.buffered.end(n.buffered.length-1)/t.getDuration():n&&void 0!==n.bytesTotal&&0<n.bytesTotal&&void 0!==n.bufferedBytes?o=n.bufferedBytes/n.bytesTotal:e&&e.lengthComputable&&0!==e.total&&(o=e.loaded/e.total),null!==o&&(o=Math.min(1,Math.max(0,o)),t.loaded&&t.setTransformStyle(t.loaded,"scaleX("+o+")"))},setCurrentRailHandle:function(e){this.setCurrentRailMain(this,e)},setCurrentRail:function(){this.setCurrentRailMain(this)},setCurrentRailMain:function(e,t){if(void 0!==e.getCurrentTime()&&e.getDuration()){var n=void 0===t?e.getCurrentTime():t;if(e.total&&e.handle){var o=parseFloat(getComputedStyle(e.total).width),i=Math.round(o*n/e.getDuration()),r=i-Math.round(e.handle.offsetWidth/2);if(r=r<0?0:r,e.setTransformStyle(e.current,"scaleX("+i/o+")"),e.setTransformStyle(e.handle,"translateX("+r+"px)"),e.options.useSmoothHover&&!(0,b.hasClass)(e.hovered,"no-hover")){var a=parseInt(e.hovered.getAttribute("pos"),10),s=(a=isNaN(a)?0:a)/o-r/o;e.hovered.style.left=r+"px",e.setTransformStyle(e.hovered,"scaleX("+s+")"),0<=s?(0,b.removeClass)(e.hovered,"negative"):(0,b.addClass)(e.hovered,"negative")}}}}})},{16:16,2:2,25:25,26:26,30:30,5:5}],12:[function(e,t,n){"use strict";var a=r(e(2)),o=e(16),i=r(o),s=e(30),l=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{duration:0,timeAndDurationSeparator:"<span> | </span>"}),Object.assign(i.default.prototype,{buildcurrent:function(e,t,n,o){var i=this,r=a.default.createElement("div");r.className=i.options.classPrefix+"time",r.setAttribute("role","timer"),r.setAttribute("aria-live","off"),r.innerHTML='<span class="'+i.options.classPrefix+'currenttime">'+(0,s.secondsToTimeCode)(0,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat)+"</span>",i.addControlElement(r,"current"),e.updateCurrent(),i.updateTimeCallback=function(){i.controlsAreVisible&&e.updateCurrent()},o.addEventListener("timeupdate",i.updateTimeCallback)},cleancurrent:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateTimeCallback)},buildduration:function(e,t,n,o){var i=this;if(t.lastChild.querySelector("."+i.options.classPrefix+"currenttime"))t.querySelector("."+i.options.classPrefix+"time").innerHTML+=i.options.timeAndDurationSeparator+'<span class="'+i.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"</span>";else{t.querySelector("."+i.options.classPrefix+"currenttime")&&(0,l.addClass)(t.querySelector("."+i.options.classPrefix+"currenttime").parentNode,i.options.classPrefix+"currenttime-container");var r=a.default.createElement("div");r.className=i.options.classPrefix+"time "+i.options.classPrefix+"duration-container",r.innerHTML='<span class="'+i.options.classPrefix+'duration">'+(0,s.secondsToTimeCode)(i.options.duration,i.options.alwaysShowHours,i.options.showTimecodeFrameCount,i.options.framesPerSecond,i.options.secondsDecimalLength,i.options.timeFormat)+"</span>",i.addControlElement(r,"duration")}i.updateDurationCallback=function(){i.controlsAreVisible&&e.updateDuration()},o.addEventListener("timeupdate",i.updateDurationCallback)},cleanduration:function(e,t,n,o){o.removeEventListener("timeupdate",e.updateDurationCallback)},updateCurrent:function(){var e=this,t=e.getCurrentTime();isNaN(t)&&(t=0);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5<n.length?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime")&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"currenttime").innerText=n)},updateDuration:function(){var e=this,t=e.getDuration();void 0!==e.media&&(isNaN(t)||t===1/0||t<0)&&(e.media.duration=e.options.duration=t=0),0<e.options.duration&&(t=e.options.duration);var n=(0,s.secondsToTimeCode)(t,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength,e.options.timeFormat);5<n.length?(0,l.addClass)(e.getElement(e.container),e.options.classPrefix+"long-video"):(0,l.removeClass)(e.getElement(e.container),e.options.classPrefix+"long-video"),e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration")&&0<t&&(e.getElement(e.controls).querySelector("."+e.options.classPrefix+"duration").innerHTML=n)}})},{16:16,2:2,26:26,30:30}],13:[function(e,t,n){"use strict";var L=r(e(2)),d=r(e(7)),F=r(e(5)),o=e(16),i=r(o),m=e(30),j=e(27),I=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{startLanguage:"",tracksText:null,chaptersText:null,tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),Object.assign(i.default.prototype,{hasChapters:!1,buildtracks:function(o,e,t,n){if(this.findTracks(),o.tracks.length||o.trackFiles&&0!==!o.trackFiles.length){var i=this,r=i.options.tracksAriaLive?' role="log" aria-live="assertive" aria-atomic="false"':"",a=(0,j.isString)(i.options.tracksText)?i.options.tracksText:F.default.t("mejs.captions-subtitles"),s=(0,j.isString)(i.options.chaptersText)?i.options.chaptersText:F.default.t("mejs.captions-chapters"),l=null===o.trackFiles?o.tracks.length:o.trackFiles.length;if(i.domNode.textTracks)for(var d=i.domNode.textTracks.length-1;0<=d;d--)i.domNode.textTracks[d].mode="hidden";i.cleartracks(o),o.captions=L.default.createElement("div"),o.captions.className=i.options.classPrefix+"captions-layer "+i.options.classPrefix+"layer",o.captions.innerHTML='<div class="'+i.options.classPrefix+"captions-position "+i.options.classPrefix+'captions-position-hover"'+r+'><span class="'+i.options.classPrefix+'captions-text"></span></div>',o.captions.style.display="none",t.insertBefore(o.captions,t.firstChild),o.captionsText=o.captions.querySelector("."+i.options.classPrefix+"captions-text"),o.captionsButton=L.default.createElement("div"),o.captionsButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"captions-button",o.captionsButton.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0"></button><div class="'+i.options.classPrefix+"captions-selector "+i.options.classPrefix+'offscreen"><ul class="'+i.options.classPrefix+'captions-selector-list"><li class="'+i.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+i.options.classPrefix+'captions-selector-input" name="'+o.id+'_captions" id="'+o.id+'_captions_none" value="none" checked disabled><label class="'+i.options.classPrefix+"captions-selector-label "+i.options.classPrefix+'captions-selected" for="'+o.id+'_captions_none">'+F.default.t("mejs.none")+"</label></li></ul></div>",i.addControlElement(o.captionsButton,"tracks"),o.captionsButton.querySelector("."+i.options.classPrefix+"captions-selector-input").disabled=!1,o.chaptersButton=L.default.createElement("div"),o.chaptersButton.className=i.options.classPrefix+"button "+i.options.classPrefix+"chapters-button",o.chaptersButton.innerHTML='<button type="button" aria-controls="'+i.id+'" title="'+s+'" aria-label="'+s+'" tabindex="0"></button><div class="'+i.options.classPrefix+"chapters-selector "+i.options.classPrefix+'offscreen"><ul class="'+i.options.classPrefix+'chapters-selector-list"></ul></div>';for(var u=0,c=0;c<l;c++){var f=o.tracks[c].kind;o.tracks[c].src.trim()&&("subtitles"===f||"captions"===f?u++:"chapters"!==f||e.querySelector("."+i.options.classPrefix+"chapter-selector")||o.captionsButton.parentNode.insertBefore(o.chaptersButton,o.captionsButton))}o.trackToLoad=-1,o.selectedTrack=null,o.isLoadingTrack=!1;for(var p=0;p<l;p++){var m=o.tracks[p].kind;!o.tracks[p].src.trim()||"subtitles"!==m&&"captions"!==m||o.addTrackButton(o.tracks[p].trackId,o.tracks[p].srclang,o.tracks[p].label)}o.loadNextTrack();var h=["mouseenter","focusin"],v=["mouseleave","focusout"];if(i.options.toggleCaptionsButtonWhenOnlyOne&&1===u)o.captionsButton.addEventListener("click",function(e){var t="none";null===o.selectedTrack&&(t=o.tracks[0].trackId);var n=e.keyCode||e.which;o.setTrack(t,void 0!==n)});else{for(var g=o.captionsButton.querySelectorAll("."+i.options.classPrefix+"captions-selector-label"),y=o.captionsButton.querySelectorAll("input[type=radio]"),E=0,b=h.length;E<b;E++)o.captionsButton.addEventListener(h[E],function(){(0,I.removeClass)(this.querySelector("."+i.options.classPrefix+"captions-selector"),i.options.classPrefix+"offscreen")});for(var S=0,x=v.length;S<x;S++)o.captionsButton.addEventListener(v[S],function(){(0,I.addClass)(this.querySelector("."+i.options.classPrefix+"captions-selector"),i.options.classPrefix+"offscreen")});for(var w=0,P=y.length;w<P;w++)y[w].addEventListener("click",function(e){var t=e.keyCode||e.which;o.setTrack(this.value,void 0!==t)});for(var T=0,C=g.length;T<C;T++)g[T].addEventListener("click",function(e){var t=(0,I.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,j.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()});o.captionsButton.addEventListener("keydown",function(e){e.stopPropagation()})}for(var k=0,_=h.length;k<_;k++)o.chaptersButton.addEventListener(h[k],function(){this.querySelector("."+i.options.classPrefix+"chapters-selector-list").children.length&&(0,I.removeClass)(this.querySelector("."+i.options.classPrefix+"chapters-selector"),i.options.classPrefix+"offscreen")});for(var N=0,A=v.length;N<A;N++)o.chaptersButton.addEventListener(v[N],function(){(0,I.addClass)(this.querySelector("."+i.options.classPrefix+"chapters-selector"),i.options.classPrefix+"offscreen")});o.chaptersButton.addEventListener("keydown",function(e){e.stopPropagation()}),o.options.alwaysShowControls?(0,I.addClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover"):(o.getElement(o.container).addEventListener("controlsshown",function(){(0,I.addClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover")}),o.getElement(o.container).addEventListener("controlshidden",function(){n.paused||(0,I.removeClass)(o.getElement(o.container).querySelector("."+i.options.classPrefix+"captions-position"),i.options.classPrefix+"captions-position-hover")})),n.addEventListener("timeupdate",function(){o.displayCaptions()}),""!==o.options.slidesSelector&&(o.slidesContainer=L.default.querySelectorAll(o.options.slidesSelector),n.addEventListener("timeupdate",function(){o.displaySlides()}))}},cleartracks:function(e){e&&(e.captions&&e.captions.remove(),e.chapters&&e.chapters.remove(),e.captionsText&&e.captionsText.remove(),e.captionsButton&&e.captionsButton.remove(),e.chaptersButton&&e.chaptersButton.remove())},rebuildtracks:function(){var e=this;e.findTracks(),e.buildtracks(e,e.getElement(e.controls),e.getElement(e.layers),e.media)},findTracks:function(){var e=this,t=null===e.trackFiles?e.node.querySelectorAll("track"):e.trackFiles,n=t.length;e.tracks=[];for(var o=0;o<n;o++){var i=t[o],r=i.getAttribute("srclang").toLowerCase()||"",a=e.id+"_track_"+o+"_"+i.getAttribute("kind")+"_"+r;e.tracks.push({trackId:a,srclang:r,src:i.getAttribute("src"),kind:i.getAttribute("kind"),label:i.getAttribute("label")||"",entries:[],isLoaded:!1})}},setTrack:function(e,t){for(var n=this,o=n.captionsButton.querySelectorAll('input[type="radio"]'),i=n.captionsButton.querySelectorAll("."+n.options.classPrefix+"captions-selected"),r=n.captionsButton.querySelector('input[value="'+e+'"]'),a=0,s=o.length;a<s;a++)o[a].checked=!1;for(var l=0,d=i.length;l<d;l++)(0,I.removeClass)(i[l],n.options.classPrefix+"captions-selected");r.checked=!0;for(var u=(0,I.siblings)(r,function(e){return(0,I.hasClass)(e,n.options.classPrefix+"captions-selector-label")}),c=0,f=u.length;c<f;c++)(0,I.addClass)(u[c],n.options.classPrefix+"captions-selected");if("none"===e)n.selectedTrack=null,(0,I.removeClass)(n.captionsButton,n.options.classPrefix+"captions-enabled");else for(var p=0,m=n.tracks.length;p<m;p++){var h=n.tracks[p];if(h.trackId===e){null===n.selectedTrack&&(0,I.addClass)(n.captionsButton,n.options.classPrefix+"captions-enabled"),n.selectedTrack=h,n.captions.setAttribute("lang",n.selectedTrack.srclang),n.displayCaptions();break}}var v=(0,j.createEvent)("captionschange",n.media);v.detail.caption=n.selectedTrack,n.media.dispatchEvent(v),t||setTimeout(function(){n.getElement(n.container).focus()},500)},loadNextTrack:function(){var e=this;e.trackToLoad++,e.trackToLoad<e.tracks.length?(e.isLoadingTrack=!0,e.loadTrack(e.trackToLoad)):(e.isLoadingTrack=!1,e.checkForTracks())},loadTrack:function(e){var t=this,n=t.tracks[e];void 0===n||void 0===n.src&&""===n.src||(0,I.ajax)(n.src,"text",function(e){n.entries="string"==typeof e&&/<tt\s+xml/gi.exec(e)?d.default.TrackFormatParser.dfxp.parse(e):d.default.TrackFormatParser.webvtt.parse(e),n.isLoaded=!0,t.enableTrackButton(n),t.loadNextTrack(),"slides"===n.kind?t.setupSlides(n):"chapters"!==n.kind||t.hasChapters||(t.drawChapters(n),t.hasChapters=!0)},function(){t.removeTrackButton(n.trackId),t.loadNextTrack()})},enableTrackButton:function(e){var t=this,n=e.srclang,o=L.default.getElementById(""+e.trackId);if(o){var i=e.label;""===i&&(i=F.default.t(d.default.language.codes[n])||n),o.disabled=!1;for(var r=(0,I.siblings)(o,function(e){return(0,I.hasClass)(e,t.options.classPrefix+"captions-selector-label")}),a=0,s=r.length;a<s;a++)r[a].innerHTML=i;if(t.options.startLanguage===n){o.checked=!0;var l=(0,j.createEvent)("click",o);o.dispatchEvent(l)}}},removeTrackButton:function(e){var t=L.default.getElementById(""+e);if(t){var n=t.closest("li");n&&n.remove()}},addTrackButton:function(e,t,n){var o=this;""===n&&(n=F.default.t(d.default.language.codes[t])||t),o.captionsButton.querySelector("ul").innerHTML+='<li class="'+o.options.classPrefix+'captions-selector-list-item"><input type="radio" class="'+o.options.classPrefix+'captions-selector-input" name="'+o.id+'_captions" id="'+e+'" value="'+e+'" disabled><label class="'+o.options.classPrefix+'captions-selector-label"for="'+e+'">'+n+" (loading)</label></li>"},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(var n=0,o=e.tracks.length;n<o;n++){var i=e.tracks[n].kind;if(("subtitles"===i||"captions"===i)&&e.tracks[n].isLoaded){t=!0;break}}e.captionsButton.style.display=t?"":"none",e.setControlsSize()}},displayCaptions:function(){if(void 0!==this.tracks){var e=this,t=e.selectedTrack;if(null!==t&&t.isLoaded){var n=e.searchTrackPosition(t.entries,e.media.currentTime);if(-1<n){var o=t.entries[n].text;return"function"==typeof e.options.captionTextPreprocessor&&(o=e.options.captionTextPreprocessor(o)),e.captionsText.innerHTML=function(e){var t=L.default.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),o=n.length;o--;)n[o].remove();for(var i=t.getElementsByTagName("*"),r=0,a=i.length;r<a;r++)for(var s=i[r].attributes,l=Array.prototype.slice.call(s),d=0,u=l.length;d<u;d++)l[d].name.startsWith("on")||l[d].value.startsWith("javascript")?i[r].remove():"style"===l[d].name&&i[r].removeAttribute(l[d].name);return t.innerHTML}(o),e.captionsText.className=e.options.classPrefix+"captions-text "+(t.entries[n].identifier||""),e.captions.style.display="",void(e.captions.style.height="0px")}e.captions.style.display="none"}else e.captions.style.display="none"}},setupSlides:function(e){this.slides=e,this.slides.entries.imgs=[this.slides.entries.length],this.showSlide(0)},showSlide:function(e){var i=this,r=this;if(void 0!==r.tracks&&void 0!==r.slidesContainer){var t=r.slides.entries[e].text,n=r.slides.entries[e].imgs;if(void 0===n||void 0===n.fadeIn){var a=L.default.createElement("img");a.src=t,a.addEventListener("load",function(){var e=i,t=(0,I.siblings)(e,function(e){return t(e)});e.style.display="none",r.slidesContainer.innerHTML+=e.innerHTML,(0,I.fadeIn)(r.slidesContainer.querySelector(a));for(var n=0,o=t.length;n<o;n++)(0,I.fadeOut)(t[n],400)}),r.slides.entries[e].imgs=n=a}else if(!(0,I.visible)(n)){var o=(0,I.siblings)(self,function(e){return o(e)});(0,I.fadeIn)(r.slidesContainer.querySelector(n));for(var s=0,l=o.length;s<l;s++)(0,I.fadeOut)(o[s])}}},displaySlides:function(){if(void 0!==this.slides){var e=this.slides,t=this.searchTrackPosition(e.entries,this.media.currentTime);-1<t&&this.showSlide(t)}},drawChapters:function(e){var r=this,t=e.entries.length;if(t){r.chaptersButton.querySelector("ul").innerHTML="";for(var n=0;n<t;n++)r.chaptersButton.querySelector("ul").innerHTML+='<li class="'+r.options.classPrefix+'chapters-selector-list-item" role="menuitemcheckbox" aria-live="polite" aria-disabled="false" aria-checked="false"><input type="radio" class="'+r.options.classPrefix+'captions-selector-input" name="'+r.id+'_chapters" id="'+r.id+"_chapters_"+n+'" value="'+e.entries[n].start+'" disabled><label class="'+r.options.classPrefix+'chapters-selector-label"for="'+r.id+"_chapters_"+n+'">'+e.entries[n].text+"</label></li>";for(var o=r.chaptersButton.querySelectorAll('input[type="radio"]'),i=r.chaptersButton.querySelectorAll("."+r.options.classPrefix+"chapters-selector-label"),a=0,s=o.length;a<s;a++)o[a].disabled=!1,o[a].checked=!1,o[a].addEventListener("click",function(e){var t=r.chaptersButton.querySelectorAll("li"),n=(0,I.siblings)(this,function(e){return(0,I.hasClass)(e,r.options.classPrefix+"chapters-selector-label")})[0];this.checked=!0,this.parentNode.setAttribute("aria-checked",!0),(0,I.addClass)(n,r.options.classPrefix+"chapters-selected"),(0,I.removeClass)(r.chaptersButton.querySelector("."+r.options.classPrefix+"chapters-selected"),r.options.classPrefix+"chapters-selected");for(var o=0,i=t.length;o<i;o++)t[o].setAttribute("aria-checked",!1);void 0===(e.keyCode||e.which)&&setTimeout(function(){r.getElement(r.container).focus()},500),r.media.setCurrentTime(parseFloat(this.value)),r.media.paused&&r.media.play()});for(var l=0,d=i.length;l<d;l++)i[l].addEventListener("click",function(e){var t=(0,I.siblings)(this,function(e){return"INPUT"===e.tagName})[0],n=(0,j.createEvent)("click",t);t.dispatchEvent(n),e.preventDefault()})}},searchTrackPosition:function(e,t){for(var n=0,o=e.length-1,i=void 0,r=void 0,a=void 0;n<=o;){if(r=e[i=n+o>>1].start,a=e[i].stop,r<=t&&t<a)return i;r<t?n=i+1:t<r&&(o=i-1)}return-1}}),d.default.language={codes:{af:"mejs.afrikaans",sq:"mejs.albanian",ar:"mejs.arabic",be:"mejs.belarusian",bg:"mejs.bulgarian",ca:"mejs.catalan",zh:"mejs.chinese","zh-cn":"mejs.chinese-simplified","zh-tw":"mejs.chines-traditional",hr:"mejs.croatian",cs:"mejs.czech",da:"mejs.danish",nl:"mejs.dutch",en:"mejs.english",et:"mejs.estonian",fl:"mejs.filipino",fi:"mejs.finnish",fr:"mejs.french",gl:"mejs.galician",de:"mejs.german",el:"mejs.greek",ht:"mejs.haitian-creole",iw:"mejs.hebrew",hi:"mejs.hindi",hu:"mejs.hungarian",is:"mejs.icelandic",id:"mejs.indonesian",ga:"mejs.irish",it:"mejs.italian",ja:"mejs.japanese",ko:"mejs.korean",lv:"mejs.latvian",lt:"mejs.lithuanian",mk:"mejs.macedonian",ms:"mejs.malay",mt:"mejs.maltese",no:"mejs.norwegian",fa:"mejs.persian",pl:"mejs.polish",pt:"mejs.portuguese",ro:"mejs.romanian",ru:"mejs.russian",sr:"mejs.serbian",sk:"mejs.slovak",sl:"mejs.slovenian",es:"mejs.spanish",sw:"mejs.swahili",sv:"mejs.swedish",tl:"mejs.tagalog",th:"mejs.thai",tr:"mejs.turkish",uk:"mejs.ukrainian",vi:"mejs.vietnamese",cy:"mejs.welsh",yi:"mejs.yiddish"}},d.default.TrackFormatParser={webvtt:{pattern:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(e){for(var t=e.split(/\r?\n/),n=[],o=void 0,i=void 0,r=void 0,a=0,s=t.length;a<s;a++){if((o=this.pattern.exec(t[a]))&&a<t.length){for(0<=a-1&&""!==t[a-1]&&(r=t[a-1]),i=t[++a],a++;""!==t[a]&&a<t.length;)i=i+"\n"+t[a],a++;i=null===i?"":i.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),n.push({identifier:r,start:0===(0,m.convertSMPTEtoSeconds)(o[1])?.2:(0,m.convertSMPTEtoSeconds)(o[1]),stop:(0,m.convertSMPTEtoSeconds)(o[3]),text:i,settings:o[5]})}r=""}return n}},dfxp:{parse:function(e){var t=L.default.adoptNode((new DOMParser).parseFromString(e,"application/xml").documentElement).querySelector("div"),n=t.querySelectorAll("p"),o=L.default.getElementById(t.getAttribute("style")),i=[],r=void 0;if(o){o.removeAttribute("id");var a=o.attributes;if(a.length){r={};for(var s=0,l=a.length;s<l;s++)r[a[s].name.split(":")[1]]=a[s].value}}for(var d=0,u=n.length;d<u;d++){var c=void 0,f={start:null,stop:null,style:null,text:null};if(n[d].getAttribute("begin")&&(f.start=(0,m.convertSMPTEtoSeconds)(n[d].getAttribute("begin"))),!f.start&&n[d-1].getAttribute("end")&&(f.start=(0,m.convertSMPTEtoSeconds)(n[d-1].getAttribute("end"))),n[d].getAttribute("end")&&(f.stop=(0,m.convertSMPTEtoSeconds)(n[d].getAttribute("end"))),!f.stop&&n[d+1].getAttribute("begin")&&(f.stop=(0,m.convertSMPTEtoSeconds)(n[d+1].getAttribute("begin"))),r)for(var p in c="",r)c+=p+": "+r[p]+";";c&&(f.style=c),0===f.start&&(f.start=.2),f.text=n[d].innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.push(f)}return i}}}},{16:16,2:2,26:26,27:27,30:30,5:5,7:7}],14:[function(e,t,n){"use strict";var x=r(e(2)),o=e(16),i=r(o),w=r(e(5)),P=e(25),T=e(27),C=e(26);function r(e){return e&&e.__esModule?e:{default:e}}Object.assign(o.config,{muteText:null,unmuteText:null,allyVolumeControlText:null,hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical",startVolume:.8}),Object.assign(i.default.prototype,{buildvolume:function(e,t,n,o){if(!P.IS_ANDROID&&!P.IS_IOS||!this.options.hideVolumeOnTouchDevices){var a=this,s=a.isVideo?a.options.videoVolume:a.options.audioVolume,r=(0,T.isString)(a.options.muteText)?a.options.muteText:w.default.t("mejs.mute"),l=(0,T.isString)(a.options.unmuteText)?a.options.unmuteText:w.default.t("mejs.unmute"),i=(0,T.isString)(a.options.allyVolumeControlText)?a.options.allyVolumeControlText:w.default.t("mejs.volume-help-text"),d=x.default.createElement("div");if(d.className=a.options.classPrefix+"button "+a.options.classPrefix+"volume-button "+a.options.classPrefix+"mute",d.innerHTML="horizontal"===s?'<button type="button" aria-controls="'+a.id+'" title="'+r+'" aria-label="'+r+'" tabindex="0"></button>':'<button type="button" aria-controls="'+a.id+'" title="'+r+'" aria-label="'+r+'" tabindex="0"></button><a href="javascript:void(0);" class="'+a.options.classPrefix+'volume-slider" aria-label="'+w.default.t("mejs.volume-slider")+'" aria-valuemin="0" aria-valuemax="100" role="slider" aria-orientation="vertical"><span class="'+a.options.classPrefix+'offscreen">'+i+'</span><div class="'+a.options.classPrefix+'volume-total"><div class="'+a.options.classPrefix+'volume-current"></div><div class="'+a.options.classPrefix+'volume-handle"></div></div></a>',a.addControlElement(d,"volume"),a.options.keyActions.push({keys:[38],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&t.matches(":focus")&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.min(e.volume+.1,1);e.setVolume(n),0<n&&e.setMuted(!1)}},{keys:[40],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var n=Math.max(e.volume-.1,0);e.setVolume(n),n<=.1&&e.setMuted(!0)}},{keys:[77],action:function(e){var t=e.getElement(e.container).querySelector("."+a.options.classPrefix+"volume-slider");t&&(t.style.display="block"),e.isVideo&&(e.showControls(),e.startControlsTimer()),e.media.muted?e.setMuted(!1):e.setMuted(!0)}}),"horizontal"===s){var u=x.default.createElement("a");u.className=a.options.classPrefix+"horizontal-volume-slider",u.href="javascript:void(0);",u.setAttribute("aria-label",w.default.t("mejs.volume-slider")),u.setAttribute("aria-valuemin",0),u.setAttribute("aria-valuemax",100),u.setAttribute("aria-valuenow",100),u.setAttribute("role","slider"),u.innerHTML+='<span class="'+a.options.classPrefix+'offscreen">'+i+'</span><div class="'+a.options.classPrefix+'horizontal-volume-total"><div class="'+a.options.classPrefix+'horizontal-volume-current"></div><div class="'+a.options.classPrefix+'horizontal-volume-handle"></div></div>',d.parentNode.insertBefore(u,d.nextSibling)}var c=!1,f=!1,p=!1,m="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-slider"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-slider"),h="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-total"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-total"),v="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-current"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-current"),g="vertical"===s?a.getElement(a.container).querySelector("."+a.options.classPrefix+"volume-handle"):a.getElement(a.container).querySelector("."+a.options.classPrefix+"horizontal-volume-handle"),y=function(e){if(null!==e&&!isNaN(e)&&void 0!==e){if(e=Math.max(0,e),0===(e=Math.min(e,1))){(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute");var t=d.firstElementChild;t.setAttribute("title",l),t.setAttribute("aria-label",l)}else{(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute");var n=d.firstElementChild;n.setAttribute("title",r),n.setAttribute("aria-label",r)}var o=100*e+"%",i=getComputedStyle(g);"vertical"===s?(v.style.bottom=0,v.style.height=o,g.style.bottom=o,g.style.marginBottom=-parseFloat(i.height)/2+"px"):(v.style.left=0,v.style.width=o,g.style.left=o,g.style.marginLeft=-parseFloat(i.width)/2+"px")}},E=function(e){var t=(0,C.offset)(h),n=getComputedStyle(h);p=!0;var o=null;if("vertical"===s){var i=parseFloat(n.height);if(o=(i-(e.pageY-t.top))/i,0===t.top||0===t.left)return}else{var r=parseFloat(n.width);o=(e.pageX-t.left)/r}o=Math.max(0,o),o=Math.min(o,1),y(o),a.setMuted(0===o),a.setVolume(o),e.preventDefault(),e.stopPropagation()},b=function(){a.muted?(y(0),(0,C.removeClass)(d,a.options.classPrefix+"mute"),(0,C.addClass)(d,a.options.classPrefix+"unmute")):(y(o.volume),(0,C.removeClass)(d,a.options.classPrefix+"unmute"),(0,C.addClass)(d,a.options.classPrefix+"mute"))};e.getElement(e.container).addEventListener("keydown",function(e){!!e.target.closest("."+a.options.classPrefix+"container")||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseenter",function(e){e.target===d&&(m.style.display="block",f=!0,e.preventDefault(),e.stopPropagation())}),d.addEventListener("focusin",function(){m.style.display="block",f=!0}),d.addEventListener("focusout",function(e){e.relatedTarget&&(!e.relatedTarget||e.relatedTarget.matches("."+a.options.classPrefix+"volume-slider"))||"vertical"!==s||(m.style.display="none")}),d.addEventListener("mouseleave",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),d.addEventListener("focusout",function(){f=!1}),d.addEventListener("keydown",function(e){if(a.options.enableKeyboard&&a.options.keyActions.length){var t=e.which||e.keyCode||0,n=o.volume;switch(t){case 38:n=Math.min(n+.1,1);break;case 40:n=Math.max(0,n-.1);break;default:return!0}c=!1,y(n),o.setVolume(n),e.preventDefault(),e.stopPropagation()}}),d.querySelector("button").addEventListener("click",function(){o.setMuted(!o.muted);var e=(0,T.createEvent)("volumechange",o);o.dispatchEvent(e)}),m.addEventListener("dragstart",function(){return!1}),m.addEventListener("mouseover",function(){f=!0}),m.addEventListener("focusin",function(){m.style.display="block",f=!0}),m.addEventListener("focusout",function(){f=!1,c||"vertical"!==s||(m.style.display="none")}),m.addEventListener("mousedown",function(e){E(e),a.globalBind("mousemove.vol",function(e){var t=e.target;c&&(t===m||t.closest("vertical"===s?"."+a.options.classPrefix+"volume-slider":"."+a.options.classPrefix+"horizontal-volume-slider"))&&E(e)}),a.globalBind("mouseup.vol",function(){c=!1,f||"vertical"!==s||(m.style.display="none")}),c=!0,e.preventDefault(),e.stopPropagation()}),o.addEventListener("volumechange",function(e){var t;c||b(),t=Math.floor(100*o.volume),m.setAttribute("aria-valuenow",t),m.setAttribute("aria-valuetext",t+"%")});var S=!1;o.addEventListener("rendererready",function(){p||setTimeout(function(){S=!0,(0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),o.setVolume(e.options.startVolume),a.setControlsSize()},250)}),o.addEventListener("loadedmetadata",function(){setTimeout(function(){p||S||((0===e.options.startVolume||o.originalNode.muted)&&o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),o.setVolume(e.options.startVolume),a.setControlsSize()),S=!1},250)}),(0===e.options.startVolume||o.originalNode.muted)&&(o.setMuted(!0),0===e.options.startVolume&&(e.options.startVolume=0),b()),a.getElement(a.container).addEventListener("controlsresize",function(){b()})}}})},{16:16,2:2,25:25,26:26,27:27,5:5}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.config=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),S=r(e(3)),x=r(e(2)),f=r(e(7)),d=r(e(6)),i=r(e(17)),u=r(e(5)),w=e(25),m=e(27),c=e(30),p=e(28),P=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(e(26));function r(e){return e&&e.__esModule?e:{default:e}}f.default.mepIndex=0,f.default.players={};var s=n.config={poster:"",showPosterWhenEnded:!1,showPosterWhenPaused:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:40,defaultSeekBackwardInterval:function(e){return.05*e.getDuration()},defaultSeekForwardInterval:function(e){return.05*e.getDuration()},setDimensions:!0,audioWidth:-1,audioHeight:-1,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,hideVideoControlsOnPause:!1,clickToPlayPause:!0,controlsTimeoutDefault:1500,controlsTimeoutMouseEnter:2500,controlsTimeoutMouseLeave:1e3,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],useDefaultControls:!1,isVideo:!0,stretching:"auto",classPrefix:"mejs__",enableKeyboard:!0,pauseOtherPlayers:!0,secondsDecimalLength:0,customError:null,keyActions:[{keys:[32,179],action:function(e){w.IS_FIREFOX||(e.paused||e.ended?e.play():e.pause())}}]};f.default.MepDefaults=s;var l=function(){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=this,o="string"==typeof e?x.default.getElementById(e):e;if(!(n instanceof r))return new r(o,t);if(n.node=n.media=o,n.node){if(n.media.player)return n.media.player;if(n.hasFocus=!1,n.controlsAreVisible=!0,n.controlsEnabled=!0,n.controlsTimer=null,n.currentMediaTime=0,n.proxy=null,void 0===t){var i=n.node.getAttribute("data-mejsoptions");t=i?JSON.parse(i):{}}return n.options=Object.assign({},s,t),n.options.loop&&!n.media.getAttribute("loop")?(n.media.loop=!0,n.node.loop=!0):n.media.loop&&(n.options.loop=!0),n.options.timeFormat||(n.options.timeFormat="mm:ss",n.options.alwaysShowHours&&(n.options.timeFormat="hh:mm:ss"),n.options.showTimecodeFrameCount&&(n.options.timeFormat+=":ff")),(0,c.calculateTimeFormat)(0,n.options,n.options.framesPerSecond||25),n.id="mep_"+f.default.mepIndex++,(f.default.players[n.id]=n).init(),n}}return o(r,[{key:"getElement",value:function(e){return e}},{key:"init",value:function(){var n=this,e=Object.assign({},n.options,{success:function(e,t){n._meReady(e,t)},error:function(e){n._handleError(e)}}),t=n.node.tagName.toLowerCase();if(n.isDynamic="audio"!==t&&"video"!==t&&"iframe"!==t,n.isVideo=n.isDynamic?n.options.isVideo:"audio"!==t&&n.options.isVideo,n.mediaFiles=null,n.trackFiles=null,w.IS_IPAD&&n.options.iPadUseNativeControls||w.IS_IPHONE&&n.options.iPhoneUseNativeControls)n.node.setAttribute("controls",!0),w.IS_IPAD&&n.node.getAttribute("autoplay")&&n.play();else if(!n.isVideo&&(n.isVideo||!n.options.features.length&&!n.options.useDefaultControls)||w.IS_ANDROID&&n.options.AndroidUseNativeControls)n.isVideo||n.options.features.length||n.options.useDefaultControls||(n.node.style.display="none");else{n.node.removeAttribute("controls");var o=n.isVideo?u.default.t("mejs.video-player"):u.default.t("mejs.audio-player"),i=x.default.createElement("span");if(i.className=n.options.classPrefix+"offscreen",i.innerText=o,n.media.parentNode.insertBefore(i,n.media),n.container=x.default.createElement("div"),n.getElement(n.container).id=n.id,n.getElement(n.container).className=n.options.classPrefix+"container "+n.options.classPrefix+"container-keyboard-inactive "+n.media.className,n.getElement(n.container).tabIndex=0,n.getElement(n.container).setAttribute("role","application"),n.getElement(n.container).setAttribute("aria-label",o),n.getElement(n.container).innerHTML='<div class="'+n.options.classPrefix+'inner"><div class="'+n.options.classPrefix+'mediaelement"></div><div class="'+n.options.classPrefix+'layers"></div><div class="'+n.options.classPrefix+'controls"></div></div>',n.getElement(n.container).addEventListener("focus",function(e){if(!n.controlsAreVisible&&!n.hasFocus&&n.controlsEnabled){n.showControls(!0);var t=(0,m.isNodeAfter)(e.relatedTarget,n.getElement(n.container))?"."+n.options.classPrefix+"controls ."+n.options.classPrefix+"button:last-child > button":"."+n.options.classPrefix+"playpause-button > button";n.getElement(n.container).querySelector(t).focus()}}),n.node.parentNode.insertBefore(n.getElement(n.container),n.node),n.options.features.length||n.options.useDefaultControls||(n.getElement(n.container).style.background="transparent",n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls").style.display="none"),n.isVideo&&"fill"===n.options.stretching&&!P.hasClass(n.getElement(n.container).parentNode,n.options.classPrefix+"fill-container")){n.outerContainer=n.media.parentNode;var r=x.default.createElement("div");r.className=n.options.classPrefix+"fill-container",n.getElement(n.container).parentNode.insertBefore(r,n.getElement(n.container)),r.appendChild(n.getElement(n.container))}w.IS_ANDROID&&P.addClass(n.getElement(n.container),n.options.classPrefix+"android"),w.IS_IOS&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ios"),w.IS_IPAD&&P.addClass(n.getElement(n.container),n.options.classPrefix+"ipad"),w.IS_IPHONE&&P.addClass(n.getElement(n.container),n.options.classPrefix+"iphone"),P.addClass(n.getElement(n.container),n.isVideo?n.options.classPrefix+"video":n.options.classPrefix+"audio"),n.getElement(n.container).querySelector("."+n.options.classPrefix+"mediaelement").appendChild(n.node),(n.media.player=n).controls=n.getElement(n.container).querySelector("."+n.options.classPrefix+"controls"),n.layers=n.getElement(n.container).querySelector("."+n.options.classPrefix+"layers");var a=n.isVideo?"video":"audio",s=a.substring(0,1).toUpperCase()+a.substring(1);0<n.options[a+"Width"]||-1<n.options[a+"Width"].toString().indexOf("%")?n.width=n.options[a+"Width"]:""!==n.node.style.width&&null!==n.node.style.width?n.width=n.node.style.width:n.node.getAttribute("width")?n.width=n.node.getAttribute("width"):n.width=n.options["default"+s+"Width"],0<n.options[a+"Height"]||-1<n.options[a+"Height"].toString().indexOf("%")?n.height=n.options[a+"Height"]:""!==n.node.style.height&&null!==n.node.style.height?n.height=n.node.style.height:n.node.getAttribute("height")?n.height=n.node.getAttribute("height"):n.height=n.options["default"+s+"Height"],n.initialAspectRatio=n.height>=n.width?n.width/n.height:n.height/n.width,n.setPlayerSize(n.width,n.height),e.pluginWidth=n.width,e.pluginHeight=n.height}if(f.default.MepDefaults=e,new d.default(n.media,e,n.mediaFiles),void 0!==n.getElement(n.container)&&n.options.features.length&&n.controlsAreVisible&&!n.options.hideVideoControlsOnLoad){var l=(0,m.createEvent)("controlsshown",n.getElement(n.container));n.getElement(n.container).dispatchEvent(l)}}},{key:"showControls",value:function(e){var i=this;if(e=void 0===e||e,!i.controlsAreVisible&&i.isVideo){if(e)!function(){P.fadeIn(i.getElement(i.controls),200,function(){P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen");var e=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeIn(n[e],200,function(){P.removeClass(n[e],i.options.classPrefix+"offscreen")})},t=0,o=n.length;t<o;t++)e(t)}();else{P.removeClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="",i.getElement(i.controls).style.opacity=1;for(var t=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),n=0,o=t.length;n<o;n++)P.removeClass(t[n],i.options.classPrefix+"offscreen"),t[n].style.display="";var r=(0,m.createEvent)("controlsshown",i.getElement(i.container));i.getElement(i.container).dispatchEvent(r)}i.controlsAreVisible=!0,i.setControlsSize()}}},{key:"hideControls",value:function(e,t){var i=this;if(e=void 0===e||e,!0===t||!(!i.controlsAreVisible||i.options.alwaysShowControls||i.paused&&4===i.readyState&&(!i.options.hideVideoControlsOnLoad&&i.currentTime<=0||!i.options.hideVideoControlsOnPause&&0<i.currentTime)||i.isVideo&&!i.options.hideVideoControlsOnLoad&&!i.readyState||i.ended)){if(e)!function(){P.fadeOut(i.getElement(i.controls),200,function(){P.addClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="";var e=(0,m.createEvent)("controlshidden",i.getElement(i.container));i.getElement(i.container).dispatchEvent(e)});for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),e=function(e,t){P.fadeOut(n[e],200,function(){P.addClass(n[e],i.options.classPrefix+"offscreen"),n[e].style.display=""})},t=0,o=n.length;t<o;t++)e(t)}();else{P.addClass(i.getElement(i.controls),i.options.classPrefix+"offscreen"),i.getElement(i.controls).style.display="",i.getElement(i.controls).style.opacity=0;for(var n=i.getElement(i.container).querySelectorAll("."+i.options.classPrefix+"control"),o=0,r=n.length;o<r;o++)P.addClass(n[o],i.options.classPrefix+"offscreen"),n[o].style.display="";var a=(0,m.createEvent)("controlshidden",i.getElement(i.container));i.getElement(i.container).dispatchEvent(a)}i.controlsAreVisible=!1}}},{key:"startControlsTimer",value:function(e){var t=this;e=void 0!==e?e:t.options.controlsTimeoutDefault,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)}},{key:"killControlsTimer",value:function(){null!==this.controlsTimer&&(clearTimeout(this.controlsTimer),delete this.controlsTimer,this.controlsTimer=null)}},{key:"disableControls",value:function(){this.killControlsTimer(),this.controlsEnabled=!1,this.hideControls(!1,!0)}},{key:"enableControls",value:function(){this.controlsEnabled=!0,this.showControls(!1)}},{key:"_setDefaultPlayer",value:function(){var e=this;e.proxy&&e.proxy.pause(),e.proxy=new i.default(e),e.media.addEventListener("loadedmetadata",function(){0<e.getCurrentTime()&&0<e.currentMediaTime&&(e.setCurrentTime(e.currentMediaTime),w.IS_IOS||w.IS_ANDROID||e.play())})}},{key:"_meReady",value:function(e,t){var n=this,o=t.getAttribute("autoplay"),i=!(null==o||"false"===o),r=null!==e.rendererName&&/(native|html5)/i.test(e.rendererName);if(n.getElement(n.controls)&&n.enableControls(),n.getElement(n.container)&&n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play")&&(n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-play").style.display=""),!n.created){if(n.created=!0,n.media=e,n.domNode=t,!(w.IS_ANDROID&&n.options.AndroidUseNativeControls||w.IS_IPAD&&n.options.iPadUseNativeControls||w.IS_IPHONE&&n.options.iPhoneUseNativeControls)){if(!n.isVideo&&!n.options.features.length&&!n.options.useDefaultControls)return i&&r&&n.play(),void(n.options.success&&("string"==typeof n.options.success?S.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n)));if(n.featurePosition={},n._setDefaultPlayer(),n.buildposter(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildkeyboard(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.buildoverlays(n,n.getElement(n.controls),n.getElement(n.layers),n.media),n.options.useDefaultControls){var a=["playpause","current","progress","duration","tracks","volume","fullscreen"];n.options.features=a.concat(n.options.features.filter(function(e){return-1===a.indexOf(e)}))}n.buildfeatures(n,n.getElement(n.controls),n.getElement(n.layers),n.media);var s=(0,m.createEvent)("controlsready",n.getElement(n.container));n.getElement(n.container).dispatchEvent(s),n.setPlayerSize(n.width,n.height),n.setControlsSize(),n.isVideo&&(n.clickToPlayPauseCallback=function(){if(n.options.clickToPlayPause){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");n.paused&&t?n.pause():n.paused?n.play():n.pause(),e.setAttribute("aria-pressed",!t),n.getElement(n.container).focus()}},n.createIframeLayer(),n.media.addEventListener("click",n.clickToPlayPauseCallback),!w.IS_ANDROID&&!w.IS_IOS||n.options.alwaysShowControls?(n.getElement(n.container).addEventListener("mouseenter",function(){n.controlsEnabled&&(n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter)))}),n.getElement(n.container).addEventListener("mousemove",function(){n.controlsEnabled&&(n.controlsAreVisible||n.showControls(),n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("mouseleave",function(){n.controlsEnabled&&(n.paused||n.options.alwaysShowControls||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))})):n.node.addEventListener("touchstart",function(){n.controlsAreVisible?n.hideControls(!1):n.controlsEnabled&&n.showControls(!1)},!!w.SUPPORT_PASSIVE_EVENT&&{passive:!0}),n.options.hideVideoControlsOnLoad&&n.hideControls(!1),n.options.enableAutosize&&n.media.addEventListener("loadedmetadata",function(e){var t=void 0!==e?e.detail.target||e.target:n.media;n.options.videoHeight<=0&&!n.domNode.getAttribute("height")&&!n.domNode.style.height&&null!==t&&!isNaN(t.videoHeight)&&(n.setPlayerSize(t.videoWidth,t.videoHeight),n.setControlsSize(),n.media.setSize(t.videoWidth,t.videoHeight))})),n.media.addEventListener("play",function(){for(var e in n.hasFocus=!0,f.default.players)if(f.default.players.hasOwnProperty(e)){var t=f.default.players[e];t.id===n.id||!n.options.pauseOtherPlayers||t.paused||t.ended||!0===t.options.ignorePauseOtherPlayersOption||(t.pause(),t.hasFocus=!1)}w.IS_ANDROID||w.IS_IOS||n.options.alwaysShowControls||!n.isVideo||n.hideControls()}),n.media.addEventListener("ended",function(){if(n.options.autoRewind)try{n.setCurrentTime(0),setTimeout(function(){var e=n.getElement(n.container).querySelector("."+n.options.classPrefix+"overlay-loading");e&&e.parentNode&&(e.parentNode.style.display="none")},20)}catch(e){}"function"==typeof n.media.renderer.stop?n.media.renderer.stop():n.pause(),n.setProgressRail&&n.setProgressRail(),n.setCurrentRail&&n.setCurrentRail(),n.options.loop?n.play():!n.options.alwaysShowControls&&n.controlsEnabled&&n.showControls()}),n.media.addEventListener("loadedmetadata",function(){(0,c.calculateTimeFormat)(n.getDuration(),n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.isFullScreen||(n.setPlayerSize(n.width,n.height),n.setControlsSize())});var l=null;n.media.addEventListener("timeupdate",function(){isNaN(n.getDuration())||l===n.getDuration()||(l=n.getDuration(),(0,c.calculateTimeFormat)(l,n.options,n.options.framesPerSecond||25),n.updateDuration&&n.updateDuration(),n.updateCurrent&&n.updateCurrent(),n.setControlsSize())}),n.getElement(n.container).addEventListener("click",function(e){P.addClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive")}),n.getElement(n.container).addEventListener("focusin",function(e){P.removeClass(e.currentTarget,n.options.classPrefix+"container-keyboard-inactive"),!n.isVideo||w.IS_ANDROID||w.IS_IOS||!n.controlsEnabled||n.options.alwaysShowControls||(n.killControlsTimer("enter"),n.showControls(),n.startControlsTimer(n.options.controlsTimeoutMouseEnter))}),n.getElement(n.container).addEventListener("focusout",function(e){setTimeout(function(){e.relatedTarget&&n.keyboardAction&&!e.relatedTarget.closest("."+n.options.classPrefix+"container")&&(n.keyboardAction=!1,!n.isVideo||n.options.alwaysShowControls||n.paused||n.startControlsTimer(n.options.controlsTimeoutMouseLeave))},0)}),setTimeout(function(){n.setPlayerSize(n.width,n.height),n.setControlsSize()},0),n.globalResizeCallback=function(){n.isFullScreen||w.HAS_TRUE_NATIVE_FULLSCREEN&&x.default.webkitIsFullScreen||n.setPlayerSize(n.width,n.height),n.setControlsSize()},n.globalBind("resize",n.globalResizeCallback)}i&&r&&n.play(),n.options.success&&("string"==typeof n.options.success?S.default[n.options.success](n.media,n.domNode,n):n.options.success(n.media,n.domNode,n))}}},{key:"_handleError",value:function(e,t,n){var o=this,i=o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-play");i&&(i.style.display="none"),o.options.error&&o.options.error(e,t,n),o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay")&&o.getElement(o.container).querySelector("."+o.options.classPrefix+"cannotplay").remove();var r=x.default.createElement("div");r.className=o.options.classPrefix+"cannotplay",r.style.width="100%",r.style.height="100%";var a="function"==typeof o.options.customError?o.options.customError(o.media,o.media.originalNode):o.options.customError,s="";if(!a){var l=o.media.originalNode.getAttribute("poster");if(l&&(s='<img src="'+l+'" alt="'+f.default.i18n.t("mejs.download-file")+'">'),e.message&&(a="<p>"+e.message+"</p>"),e.urls)for(var d=0,u=e.urls.length;d<u;d++){var c=e.urls[d];a+='<a href="'+c.src+'" data-type="'+c.type+'"><span>'+f.default.i18n.t("mejs.download-file")+": "+c.src+"</span></a>"}}a&&o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error")&&(r.innerHTML=a,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").innerHTML=""+s+r.outerHTML,o.getElement(o.layers).querySelector("."+o.options.classPrefix+"overlay-error").parentNode.style.display="block"),o.controlsEnabled&&o.disableControls()}},{key:"setPlayerSize",value:function(e,t){var n=this;if(!n.options.setDimensions)return!1;switch(void 0!==e&&(n.width=e),void 0!==t&&(n.height=t),n.options.stretching){case"fill":n.isVideo?n.setFillMode():n.setDimensions(n.width,n.height);break;case"responsive":n.setResponsiveMode();break;case"none":n.setDimensions(n.width,n.height);break;default:!0===n.hasFluidMode()?n.setResponsiveMode():n.setDimensions(n.width,n.height)}}},{key:"hasFluidMode",value:function(){var e=this;return-1!==e.height.toString().indexOf("%")||e.node&&e.node.style.maxWidth&&"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width||e.node&&e.node.currentStyle&&"100%"===e.node.currentStyle.maxWidth}},{key:"setResponsiveMode",value:function(){var o=this,e=function(){for(var t=void 0,n=o.getElement(o.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),t=e?getComputedStyle(e,null):getComputedStyle(x.default.body,null),n=o.isVideo?o.node.videoWidth&&0<o.node.videoWidth?o.node.videoWidth:o.node.getAttribute("width")?o.node.getAttribute("width"):o.options.defaultVideoWidth:o.options.defaultAudioWidth,i=o.isVideo?o.node.videoHeight&&0<o.node.videoHeight?o.node.videoHeight:o.node.getAttribute("height")?o.node.getAttribute("height"):o.options.defaultVideoHeight:o.options.defaultAudioHeight,r=function(){if(!o.options.enableAutosize)return o.initialAspectRatio;var e=1;return o.isVideo&&(e=o.node.videoWidth&&0<o.node.videoWidth&&o.node.videoHeight&&0<o.node.videoHeight?o.height>=o.width?o.node.videoWidth/o.node.videoHeight:o.node.videoHeight/o.node.videoWidth:o.initialAspectRatio,(isNaN(e)||e<.01||100<e)&&(e=1)),e}(),a=parseFloat(t.height),s=void 0,l=parseFloat(t.width);if(s=o.isVideo?"100%"===o.height?parseFloat(l*i/n,10):o.height>=o.width?parseFloat(l/r,10):parseFloat(l*r,10):i,isNaN(s)&&(s=a),0<o.getElement(o.container).parentNode.length&&"body"===o.getElement(o.container).parentNode.tagName.toLowerCase()&&(l=S.default.innerWidth||x.default.documentElement.clientWidth||x.default.body.clientWidth,s=S.default.innerHeight||x.default.documentElement.clientHeight||x.default.body.clientHeight),s&&l){o.getElement(o.container).style.width=l+"px",o.getElement(o.container).style.height=s+"px",o.node.style.width="100%",o.node.style.height="100%",o.isVideo&&o.media.setSize&&o.media.setSize(l,s);for(var d=o.getElement(o.layers).children,u=0,c=d.length;u<c;u++)d[u].style.width="100%",d[u].style.height="100%"}}},{key:"setFillMode",value:function(){var e=this,t=S.default.self!==S.default.top&&null!==S.default.frameElement,n=function(){for(var t=void 0,n=e.getElement(e.container);n;){try{if(w.IS_FIREFOX&&"html"===n.tagName.toLowerCase()&&S.default.self!==S.default.top&&null!==S.default.frameElement)return S.default.frameElement;t=n.parentElement}catch(e){t=n.parentElement}if(t&&P.visible(t))return t;n=t}return null}(),o=n?getComputedStyle(n,null):getComputedStyle(x.default.body,null);"none"!==e.node.style.height&&e.node.style.height!==e.height&&(e.node.style.height="auto"),"none"!==e.node.style.maxWidth&&e.node.style.maxWidth!==e.width&&(e.node.style.maxWidth="none"),"none"!==e.node.style.maxHeight&&e.node.style.maxHeight!==e.height&&(e.node.style.maxHeight="none"),e.node.currentStyle&&("100%"===e.node.currentStyle.height&&(e.node.currentStyle.height="auto"),"100%"===e.node.currentStyle.maxWidth&&(e.node.currentStyle.maxWidth="none"),"100%"===e.node.currentStyle.maxHeight&&(e.node.currentStyle.maxHeight="none")),t||parseFloat(o.width)||(n.style.width=e.media.offsetWidth+"px"),t||parseFloat(o.height)||(n.style.height=e.media.offsetHeight+"px"),o=getComputedStyle(n);var i=parseFloat(o.width),r=parseFloat(o.height);e.setDimensions("100%","100%");var a=e.getElement(e.container).querySelector("."+e.options.classPrefix+"poster>img");a&&(a.style.display="");for(var s=e.getElement(e.container).querySelectorAll("object, embed, iframe, video"),l=e.height,d=e.width,u=i,c=l*i/d,f=d*r/l,p=r,m=i<f==!1,h=m?Math.floor(u):Math.floor(f),v=m?Math.floor(c):Math.floor(p),g=m?i+"px":h+"px",y=m?v+"px":r+"px",E=0,b=s.length;E<b;E++)s[E].style.height=y,s[E].style.width=g,e.media.setSize&&e.media.setSize(g,y),s[E].style.marginLeft=Math.floor((i-h)/2)+"px",s[E].style.marginTop=0}},{key:"setDimensions",value:function(e,t){var n=this;e=(0,m.isString)(e)&&-1<e.indexOf("%")?e:parseFloat(e)+"px",t=(0,m.isString)(t)&&-1<t.indexOf("%")?t:parseFloat(t)+"px",n.getElement(n.container).style.width=e,n.getElement(n.container).style.height=t;for(var o=n.getElement(n.layers).children,i=0,r=o.length;i<r;i++)o[i].style.width=e,o[i].style.height=t}},{key:"setControlsSize",value:function(){var t=this;if(P.visible(t.getElement(t.container)))if(t.rail&&P.visible(t.rail)){for(var e=t.total?getComputedStyle(t.total,null):null,n=e?parseFloat(e.marginLeft)+parseFloat(e.marginRight):0,o=getComputedStyle(t.rail),i=parseFloat(o.marginLeft)+parseFloat(o.marginRight),r=0,a=P.siblings(t.rail,function(e){return e!==t.rail}),s=a.length,l=0;l<s;l++)r+=a[l].offsetWidth;r+=n+(0===n?2*i:i)+1,t.getElement(t.container).style.minWidth=r+"px";var d=(0,m.createEvent)("controlsresize",t.getElement(t.container));t.getElement(t.container).dispatchEvent(d)}else{for(var u=t.getElement(t.controls).children,c=0,f=0,p=u.length;f<p;f++)c+=u[f].offsetWidth;t.getElement(t.container).style.minWidth=c+"px"}}},{key:"addControlElement",value:function(e,t){var n=this;if(void 0!==n.featurePosition[t]){var o=n.getElement(n.controls).children[n.featurePosition[t]-1];o.parentNode.insertBefore(e,o.nextSibling)}else{n.getElement(n.controls).appendChild(e);for(var i=n.getElement(n.controls).children,r=0,a=i.length;r<a;r++)if(e===i[r]){n.featurePosition[t]=r;break}}}},{key:"createIframeLayer",value:function(){var t=this;if(t.isVideo&&null!==t.media.rendererName&&-1<t.media.rendererName.indexOf("iframe")&&!x.default.getElementById(t.media.id+"-iframe-overlay")){var e=x.default.createElement("div"),n=x.default.getElementById(t.media.id+"_"+t.media.rendererName);e.id=t.media.id+"-iframe-overlay",e.className=t.options.classPrefix+"iframe-overlay",e.addEventListener("click",function(e){t.options.clickToPlayPause&&(t.paused?t.play():t.pause(),e.preventDefault(),e.stopPropagation())}),n.parentNode.insertBefore(e,n)}}},{key:"resetSize",value:function(){var e=this;setTimeout(function(){e.setPlayerSize(e.width,e.height),e.setControlsSize()},50)}},{key:"setPoster",value:function(e){var t=this;if(t.getElement(t.container)){var n=t.getElement(t.container).querySelector("."+t.options.classPrefix+"poster");n||((n=x.default.createElement("div")).className=t.options.classPrefix+"poster "+t.options.classPrefix+"layer",t.getElement(t.layers).appendChild(n));var o=n.querySelector("img");!o&&e&&((o=x.default.createElement("img")).className=t.options.classPrefix+"poster-img",o.width="100%",o.height="100%",n.style.display="",n.appendChild(o)),e?(o.setAttribute("src",e),n.style.backgroundImage='url("'+e+'")',n.style.display=""):o?(n.style.backgroundImage="none",n.style.display="none",o.remove()):n.style.display="none"}else(w.IS_IPAD&&t.options.iPadUseNativeControls||w.IS_IPHONE&&t.options.iPhoneUseNativeControls||w.IS_ANDROID&&t.options.AndroidUseNativeControls)&&(t.media.originalNode.poster=e)}},{key:"changeSkin",value:function(e){var t=this;t.getElement(t.container).className=t.options.classPrefix+"container "+e,t.setPlayerSize(t.width,t.height),t.setControlsSize()}},{key:"globalBind",value:function(e,n){var o=this.node?this.node.ownerDocument:x.default;if((e=(0,m.splitEvents)(e,this.id)).d)for(var t=e.d.split(" "),i=0,r=t.length;i<r;i++)t[i].split(".").reduce(function(e,t){return o.addEventListener(t,n,!1),t},"");if(e.w)for(var a=e.w.split(" "),s=0,l=a.length;s<l;s++)a[s].split(".").reduce(function(e,t){return S.default.addEventListener(t,n,!1),t},"")}},{key:"globalUnbind",value:function(e,n){var o=this.node?this.node.ownerDocument:x.default;if((e=(0,m.splitEvents)(e,this.id)).d)for(var t=e.d.split(" "),i=0,r=t.length;i<r;i++)t[i].split(".").reduce(function(e,t){return o.removeEventListener(t,n,!1),t},"");if(e.w)for(var a=e.w.split(" "),s=0,l=a.length;s<l;s++)a[s].split(".").reduce(function(e,t){return S.default.removeEventListener(t,n,!1),t},"")}},{key:"buildfeatures",value:function(e,t,n,o){for(var i=0,r=this.options.features.length;i<r;i++){var a=this.options.features[i];if(this["build"+a])try{this["build"+a](e,t,n,o)}catch(e){console.error("error building "+a,e)}}}},{key:"buildposter",value:function(e,t,n,o){var i=this,r=x.default.createElement("div");r.className=i.options.classPrefix+"poster "+i.options.classPrefix+"layer",n.appendChild(r);var a=o.originalNode.getAttribute("poster");""!==e.options.poster&&(a&&w.IS_IOS&&o.originalNode.removeAttribute("poster"),a=e.options.poster),a?i.setPoster(a):null!==i.media.renderer&&"function"==typeof i.media.renderer.getPosterUrl?i.setPoster(i.media.renderer.getPosterUrl()):r.style.display="none",o.addEventListener("play",function(){r.style.display="none"}),o.addEventListener("playing",function(){r.style.display="none"}),e.options.showPosterWhenEnded&&e.options.autoRewind&&o.addEventListener("ended",function(){r.style.display=""}),o.addEventListener("error",function(){r.style.display="none"}),e.options.showPosterWhenPaused&&o.addEventListener("pause",function(){e.ended||(r.style.display="")})}},{key:"buildoverlays",value:function(t,e,n,o){if(t.isVideo){var i=this,r=x.default.createElement("div"),a=x.default.createElement("div"),s=x.default.createElement("div");r.style.display="none",r.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",r.innerHTML='<div class="'+i.options.classPrefix+'overlay-loading"><span class="'+i.options.classPrefix+'overlay-loading-bg-img"></span></div>',n.appendChild(r),a.style.display="none",a.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer",a.innerHTML='<div class="'+i.options.classPrefix+'overlay-error"></div>',n.appendChild(a),s.className=i.options.classPrefix+"overlay "+i.options.classPrefix+"layer "+i.options.classPrefix+"overlay-play",s.innerHTML='<div class="'+i.options.classPrefix+'overlay-button" role="button" tabindex="0" aria-label="'+u.default.t("mejs.play")+'" aria-pressed="false"></div>',s.addEventListener("click",function(){if(i.options.clickToPlayPause){var e=i.getElement(i.container).querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");i.paused?i.play():i.pause(),e.setAttribute("aria-pressed",!!t),i.getElement(i.container).focus()}}),s.addEventListener("keydown",function(e){var t=e.keyCode||e.which||0;if(13===t||w.IS_FIREFOX&&32===t){var n=(0,m.createEvent)("click",s);return s.dispatchEvent(n),!1}}),n.appendChild(s),null!==i.media.rendererName&&(/(youtube|facebook)/i.test(i.media.rendererName)&&!(i.media.originalNode.getAttribute("poster")||t.options.poster||"function"==typeof i.media.renderer.getPosterUrl&&i.media.renderer.getPosterUrl())||w.IS_STOCK_ANDROID||i.media.originalNode.getAttribute("autoplay"))&&(s.style.display="none");var l=!1;o.addEventListener("play",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("playing",function(){s.style.display="none",r.style.display="none",a.style.display="none",l=!1}),o.addEventListener("seeking",function(){s.style.display="none",r.style.display="",l=!1}),o.addEventListener("seeked",function(){s.style.display=i.paused&&!w.IS_STOCK_ANDROID?"":"none",r.style.display="none",l=!1}),o.addEventListener("pause",function(){r.style.display="none",w.IS_STOCK_ANDROID||l||(s.style.display=""),l=!1}),o.addEventListener("waiting",function(){r.style.display="",l=!1}),o.addEventListener("loadeddata",function(){r.style.display="",w.IS_ANDROID&&(o.canplayTimeout=setTimeout(function(){if(x.default.createEvent){var e=x.default.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),o.dispatchEvent(e)}},300)),l=!1}),o.addEventListener("canplay",function(){r.style.display="none",clearTimeout(o.canplayTimeout),l=!1}),o.addEventListener("error",function(e){i._handleError(e,i.media,i.node),r.style.display="none",s.style.display="none",l=!0}),o.addEventListener("loadedmetadata",function(){i.controlsEnabled||i.enableControls()}),o.addEventListener("keydown",function(e){i.onkeydown(t,o,e),l=!1})}}},{key:"buildkeyboard",value:function(o,e,t,i){var r=this;r.getElement(r.container).addEventListener("keydown",function(){r.keyboardAction=!0}),r.globalKeydownCallback=function(e){var t=x.default.activeElement.closest("."+r.options.classPrefix+"container"),n=r.media.closest("."+r.options.classPrefix+"container");return r.hasFocus=!(!t||!n||t.id!==n.id),r.onkeydown(o,i,e)},r.globalClickCallback=function(e){r.hasFocus=!!e.target.closest("."+r.options.classPrefix+"container")},r.globalBind("keydown",r.globalKeydownCallback),r.globalBind("click",r.globalClickCallback)}},{key:"onkeydown",value:function(e,t,n){if(e.hasFocus&&e.options.enableKeyboard)for(var o=0,i=e.options.keyActions.length;o<i;o++)for(var r=e.options.keyActions[o],a=0,s=r.keys.length;a<s;a++)if(n.keyCode===r.keys[a])return r.action(e,t,n.keyCode,n),n.preventDefault(),void n.stopPropagation();return!0}},{key:"play",value:function(){this.proxy.play()}},{key:"pause",value:function(){this.proxy.pause()}},{key:"load",value:function(){this.proxy.load()}},{key:"setCurrentTime",value:function(e){this.proxy.setCurrentTime(e)}},{key:"getCurrentTime",value:function(){return this.proxy.currentTime}},{key:"getDuration",value:function(){return this.proxy.duration}},{key:"setVolume",value:function(e){this.proxy.volume=e}},{key:"getVolume",value:function(){return this.proxy.getVolume()}},{key:"setMuted",value:function(e){this.proxy.setMuted(e)}},{key:"setSrc",value:function(e){this.controlsEnabled||this.enableControls(),this.proxy.setSrc(e)}},{key:"getSrc",value:function(){return this.proxy.getSrc()}},{key:"canPlayType",value:function(e){return this.proxy.canPlayType(e)}},{key:"remove",value:function(){var l=this,d=l.media.rendererName,u=l.media.originalNode.src;for(var e in l.options.features){var t=l.options.features[e];if(l["clean"+t])try{l["clean"+t](l,l.getElement(l.layers),l.getElement(l.controls),l.media)}catch(e){console.error("error cleaning "+t,e)}}var n=l.node.getAttribute("width"),o=l.node.getAttribute("height");if(n?-1===n.indexOf("%")&&(n+="px"):n="auto",o?-1===o.indexOf("%")&&(o+="px"):o="auto",l.node.style.width=n,l.node.style.height=o,l.setPlayerSize(0,0),l.isDynamic?l.getElement(l.container).parentNode.insertBefore(l.node,l.getElement(l.container)):function(){l.node.setAttribute("controls",!0),l.node.setAttribute("id",l.node.getAttribute("id").replace("_"+d,"").replace("_from_mejs",""));var e=l.getElement(l.container).querySelector("."+l.options.classPrefix+"poster>img");(e&&l.node.setAttribute("poster",e.src),delete l.node.autoplay,l.node.setAttribute("src",""),""!==l.media.canPlayType((0,p.getTypeFromFile)(u))&&l.node.setAttribute("src",u),d&&-1<d.indexOf("iframe"))&&x.default.getElementById(l.media.id+"-iframe-overlay").remove();var i=l.node.cloneNode();if(i.style.display="",l.getElement(l.container).parentNode.insertBefore(i,l.getElement(l.container)),l.node.remove(),l.mediaFiles)for(var t=0,n=l.mediaFiles.length;t<n;t++){var o=x.default.createElement("source");o.setAttribute("src",l.mediaFiles[t].src),o.setAttribute("type",l.mediaFiles[t].type),i.appendChild(o)}if(l.trackFiles)for(var r=function(e,t){var n=l.trackFiles[e],o=x.default.createElement("track");o.kind=n.kind,o.label=n.label,o.srclang=n.srclang,o.src=n.src,i.appendChild(o),o.addEventListener("load",function(){this.mode="showing",i.textTracks[e].mode="showing"})},a=0,s=l.trackFiles.length;a<s;a++)r(a);delete l.node,delete l.mediaFiles,delete l.trackFiles}(),l.media.renderer&&"function"==typeof l.media.renderer.destroy&&l.media.renderer.destroy(),delete f.default.players[l.id],"object"===a(l.getElement(l.container))){var i=l.getElement(l.container).parentNode.querySelector("."+l.options.classPrefix+"offscreen");i&&i.remove(),l.getElement(l.container).remove()}l.globalUnbind("resize",l.globalResizeCallback),l.globalUnbind("keydown",l.globalKeydownCallback),l.globalUnbind("click",l.globalClickCallback),delete l.media.player}},{key:"paused",get:function(){return this.proxy.paused}},{key:"muted",get:function(){return this.proxy.muted},set:function(e){this.setMuted(e)}},{key:"ended",get:function(){return this.proxy.ended}},{key:"readyState",get:function(){return this.proxy.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),r}();S.default.MediaElementPlayer=l,f.default.MediaElementPlayer=l,n.default=l},{17:17,2:2,25:25,26:26,27:27,28:28,3:3,30:30,5:5,6:6,7:7}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o,i=function(){function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}}(),r=e(3),a=(o=r)&&o.__esModule?o:{default:o};var s=function(){function e(t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.media=t.media,this.isVideo=t.isVideo,this.classPrefix=t.options.classPrefix,this.createIframeLayer=function(){return t.createIframeLayer()},this.setPoster=function(e){return t.setPoster(e)},this}return i(e,[{key:"play",value:function(){this.media.play()}},{key:"pause",value:function(){this.media.pause()}},{key:"load",value:function(){this.isLoaded||this.media.load(),this.isLoaded=!0}},{key:"setCurrentTime",value:function(e){this.media.setCurrentTime(e)}},{key:"getCurrentTime",value:function(){return this.media.currentTime}},{key:"getDuration",value:function(){var e=this.media.getDuration();return e===1/0&&this.media.seekable&&this.media.seekable.length&&(e=this.media.seekable.end(0)),e}},{key:"setVolume",value:function(e){this.media.setVolume(e)}},{key:"getVolume",value:function(){return this.media.getVolume()}},{key:"setMuted",value:function(e){this.media.setMuted(e)}},{key:"setSrc",value:function(e){var t=this,n=document.getElementById(t.media.id+"-iframe-overlay");n&&n.remove(),t.media.setSrc(e),t.createIframeLayer(),null!==t.media.renderer&&"function"==typeof t.media.renderer.getPosterUrl&&t.setPoster(t.media.renderer.getPosterUrl())}},{key:"getSrc",value:function(){return this.media.getSrc()}},{key:"canPlayType",value:function(e){return this.media.canPlayType(e)}},{key:"paused",get:function(){return this.media.paused}},{key:"muted",set:function(e){this.setMuted(e)},get:function(){return this.media.muted}},{key:"ended",get:function(){return this.media.ended}},{key:"readyState",get:function(){return this.media.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"remainingTime",get:function(){return this.getDuration()-this.currentTime()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),e}();n.default=s,a.default.DefaultPlayer=s},{3:3}],18:[function(e,t,n){"use strict";a(e(3));var o,i=a(e(7)),r=a(e(16));function a(e){return e&&e.__esModule?e:{default:e}}"undefined"!=typeof jQuery?i.default.$=jQuery:"undefined"!=typeof Zepto?i.default.$=Zepto:"undefined"!=typeof ender&&(i.default.$=ender),void 0!==(o=i.default.$)&&(o.fn.mediaelementplayer=function(e){return!1===e?this.each(function(){var e=o(this).data("mediaelementplayer");e&&e.remove(),o(this).removeData("mediaelementplayer")}):this.each(function(){o(this).data("mediaelementplayer",new r.default(this,e))}),this},o(document).ready(function(){o("."+i.default.MepDefaults.classPrefix+"player").mediaelementplayer()}))},{16:16,3:3,7:7}],19:[function(e,t,n){"use strict";var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=a(e(3)),x=a(e(7)),w=e(8),P=e(27),o=e(28),i=e(25),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var T={promise:null,load:function(e){return"undefined"!=typeof dashjs?T.promise=new Promise(function(e){e()}).then(function(){T._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.dashjs.org/latest/dash.all.min.js",T.promise=T.promise||(0,r.loadScript)(e.options.path),T.promise.then(function(){T._createPlayer(e)})),T.promise},_createPlayer:function(e){var t=dashjs.MediaPlayer().create();return S.default["__ready__"+e.id](t),t}},s={name:"native_dash",options:{prefix:"native_dash",dash:{path:"https://cdn.dashjs.org/latest/dash.all.min.js",debug:!1,drm:{},robustnessLevel:""}},canPlayType:function(e){return i.HAS_MSE&&-1<["application/dash+xml"].indexOf(e.toLowerCase())},create:function(s,l,e){var t=s.originalNode,r=s.id+"_"+l.prefix,a=t.autoplay,n=t.children,d=null,u=null;t.removeAttribute("type");for(var o=0,i=n.length;o<i;o++)n[o].removeAttribute("type");d=t.cloneNode(!0),l=Object.assign(l,s.options);for(var c=x.default.html5media.properties,f=x.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),p=function(e){var t=(0,P.createEvent)(e.type,s);s.dispatchEvent(t)},m=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);d["get"+e]=function(){return null!==u?d[i]:null},d["set"+e]=function(e){if(-1===x.default.html5media.readOnlyProperties.indexOf(i))if("src"===i){var t="object"===(void 0===e?"undefined":b(e))&&e.src?e.src:e;if(d[i]=t,null!==u){u.reset();for(var n=0,o=f.length;n<o;n++)d.removeEventListener(f[n],p);u=T._createPlayer({options:l.dash,id:r}),e&&"object"===(void 0===e?"undefined":b(e))&&"object"===b(e.drm)&&(u.setProtectionData(e.drm),(0,P.isString)(l.dash.robustnessLevel)&&l.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(l.dash.robustnessLevel)),u.attachSource(t),a&&u.play()}}else d[i]=e}},h=0,v=c.length;h<v;h++)m(c[h]);if(S.default["__ready__"+r]=function(e){s.dashPlayer=u=e;for(var t,n=dashjs.MediaPlayer.events,o=0,i=f.length;o<i;o++)"loadedmetadata"===(t=f[o])&&(u.initialize(),u.attachView(d),u.setAutoPlay(!1),"object"!==b(l.dash.drm)||x.default.Utils.isObjectEmpty(l.dash.drm)||(u.setProtectionData(l.dash.drm),(0,P.isString)(l.dash.robustnessLevel)&&l.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(l.dash.robustnessLevel)),u.attachSource(d.getSrc())),d.addEventListener(t,p);var r=function(e){if("error"===e.type.toLowerCase())s.generateError(e.message,d.src),console.error(e);else{var t=(0,P.createEvent)(e.type,s);t.data=e,s.dispatchEvent(t)}};for(var a in n)n.hasOwnProperty(a)&&u.on(n[a],function(e){return r(e)})},e&&0<e.length)for(var g=0,y=e.length;g<y;g++)if(w.renderer.renderers[l.prefix].canPlayType(e[g].type)){d.setAttribute("src",e[g].src),void 0!==e[g].drm&&(l.dash.drm=e[g].drm);break}d.setAttribute("id",r),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none",d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return d.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.reset()};var E=(0,P.createEvent)("rendererready",d);return s.dispatchEvent(E),s.promises.push(T.load({options:l.dash,id:r})),d}};o.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".mpd")?"application/dash+xml":null}),w.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PluginDetector=void 0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C=o(e(3)),k=o(e(2)),_=o(e(7)),N=o(e(5)),A=e(8),L=e(27),F=e(25),j=e(28);function o(e){return e&&e.__esModule?e:{default:e}}var r=n.PluginDetector={plugins:[],hasPluginVersion:function(e,t){var n=r.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,n[0]>t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,o,i){r.plugins[e]=r.detectPlugin(t,n,o,i)},detectPlugin:function(e,t,n,o){var i=[0,0,0],r=void 0,a=void 0;if(null!==F.NAV.plugins&&void 0!==F.NAV.plugins&&"object"===d(F.NAV.plugins[e])){if((r=F.NAV.plugins[e].description)&&(void 0===F.NAV.mimeTypes||!F.NAV.mimeTypes[t]||F.NAV.mimeTypes[t].enabledPlugin))for(var s=0,l=(i=r.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;s<l;s++)i[s]=parseInt(i[s].match(/\d+/),10)}else if(void 0!==C.default.ActiveXObject)try{(a=new ActiveXObject(n))&&(i=o(a))}catch(e){}return i}};r.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(e){var t=[],n=e.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),t});var i={create:function(e,t,n){var r={},o=!1;r.options=t,r.id=e.id+"_"+r.options.prefix,r.mediaElement=e,r.flashState={},r.flashApi=null,r.flashApiStack=[];for(var i=_.default.html5media.properties,a=function(t){r.flashState[t]=null;var e=""+t.substring(0,1).toUpperCase()+t.substring(1);r["get"+e]=function(){if(null!==r.flashApi){if("function"==typeof r.flashApi["get_"+t]){var e=r.flashApi["get_"+t]();return"buffered"===t?{start:function(){return 0},end:function(){return e},length:1}:e}return null}return null},r["set"+e]=function(e){if("src"===t&&(e=(0,j.absolutizeUrl)(e)),null!==r.flashApi&&void 0!==r.flashApi["set_"+t])try{r.flashApi["set_"+t](e)}catch(e){}else r.flashApiStack.push({type:"set",propName:t,value:e})}},s=0,l=i.length;s<l;s++)a(i[s]);var d=_.default.html5media.methods,u=function(e){r[e]=function(){if(o)if(null!==r.flashApi){if(r.flashApi["fire_"+e])try{r.flashApi["fire_"+e]()}catch(e){}}else r.flashApiStack.push({type:"call",methodName:e})}};d.push("stop");for(var c=0,f=d.length;c<f;c++)u(d[c]);for(var p=["rendererready"],m=0,h=p.length;m<h;m++){var v=(0,L.createEvent)(p[m],r);e.dispatchEvent(v)}C.default["__ready__"+r.id]=function(){if(r.flashReady=!0,r.flashApi=k.default.getElementById("__"+r.id),r.flashApiStack.length)for(var e=0,t=r.flashApiStack.length;e<t;e++){var n=r.flashApiStack[e];if("set"===n.type){var o=n.propName,i=""+o.substring(0,1).toUpperCase()+o.substring(1);r["set"+i](n.value)}else"call"===n.type&&r[n.methodName]()}},C.default["__event__"+r.id]=function(e,t){var n=(0,L.createEvent)(e,r);if(t)try{n.data=JSON.parse(t),n.details.data=JSON.parse(t)}catch(e){n.message=t}r.mediaElement.dispatchEvent(n)},r.flashWrapper=k.default.createElement("div"),-1===["always","sameDomain"].indexOf(r.options.shimScriptAccess)&&(r.options.shimScriptAccess="sameDomain");var g=e.originalNode.autoplay,y=["uid="+r.id,"autoplay="+g,"allowScriptAccess="+r.options.shimScriptAccess,"preload="+(e.originalNode.getAttribute("preload")||"")],E=null!==e.originalNode&&"video"===e.originalNode.tagName.toLowerCase(),b=E?e.originalNode.height:1,S=E?e.originalNode.width:1;e.originalNode.getAttribute("src")&&y.push("src="+e.originalNode.getAttribute("src")),!0===r.options.enablePseudoStreaming&&(y.push("pseudostreamstart="+r.options.pseudoStreamingStartQueryParam),y.push("pseudostreamtype="+r.options.pseudoStreamingType)),r.options.streamDelimiter&&y.push("streamdelimiter="+encodeURIComponent(r.options.streamDelimiter)),r.options.proxyType&&y.push("proxytype="+r.options.proxyType),e.appendChild(r.flashWrapper),e.originalNode.style.display="none";var x=[];if(F.IS_IE||F.IS_EDGE){var w=k.default.createElement("div");r.flashWrapper.appendChild(w),x=F.IS_EDGE?['type="application/x-shockwave-flash"','data="'+r.options.pluginPath+r.options.filename+'"','id="__'+r.id+'"','width="'+S+'"','height="'+b+"'\""]:['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+r.id+'"','width="'+S+'"','height="'+b+'"'],E||x.push('style="clip: rect(0 0 0 0); position: absolute;"'),w.outerHTML="<object "+x.join(" ")+'><param name="movie" value="'+r.options.pluginPath+r.options.filename+"?x="+new Date+'" /><param name="flashvars" value="'+y.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+r.options.shimScriptAccess+'" /><param name="allowFullScreen" value="true" /><div>'+N.default.t("mejs.install-flash")+"</div></object>"}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(x.push('width="'+S+'"'),x.push('height="'+b+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="<embed "+x.join(" ")+">";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){o=!1,E&&(r.flashNode.style.display="none")},r.show=function(){o=!0,E&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&0<n.length)for(var P=0,T=n.length;P<T;P++)if(A.renderer.renderers[t.prefix].canPlayType(n[P].type)){r.setSrc(n[P].src);break}return r}};if(r.hasPluginVersion("flash",[10,0,0])){j.typeChecks.push(function(e){return(e=e.toLowerCase()).startsWith("rtmp")?~e.indexOf(".mp3")?"audio/rtmp":"video/rtmp":/\.og(a|g)/i.test(e)?"audio/ogg":~e.indexOf(".m3u8")?"application/x-mpegURL":~e.indexOf(".mpd")?"application/dash+xml":~e.indexOf(".flv")?"video/flv":null});var a={name:"flash_video",options:{prefix:"flash_video",filename:"mediaelement-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte",proxyType:"",streamDelimiter:""},canPlayType:function(e){return~["video/mp4","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4","video/flv","video/x-flv"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(a);var s={name:"flash_hls",options:{prefix:"flash_hls",filename:"mediaelement-flash-video-hls.swf"},canPlayType:function(e){return~["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(s);var l={name:"flash_dash",options:{prefix:"flash_dash",filename:"mediaelement-flash-video-mdash.swf"},canPlayType:function(e){return~["application/dash+xml"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(l);var u={name:"flash_audio",options:{prefix:"flash_audio",filename:"mediaelement-flash-audio.swf"},canPlayType:function(e){return~["audio/mp3"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(u);var c={name:"flash_audio_ogg",options:{prefix:"flash_audio_ogg",filename:"mediaelement-flash-audio-ogg.swf"},canPlayType:function(e){return~["audio/ogg","audio/oga","audio/ogv"].indexOf(e.toLowerCase())},create:i.create};A.renderer.add(c)}},{2:2,25:25,27:27,28:28,3:3,5:5,7:7,8:8}],21:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=a(e(3)),b=a(e(7)),S=e(8),x=e(27),o=e(25),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var w={promise:null,load:function(e){return"undefined"!=typeof flvjs?w.promise=new Promise(function(e){e()}).then(function(){w._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/flv.js@latest",w.promise=w.promise||(0,r.loadScript)(e.options.path),w.promise.then(function(){w._createPlayer(e)})),w.promise},_createPlayer:function(e){flvjs.LoggingControl.enableDebug=e.options.debug,flvjs.LoggingControl.enableVerbose=e.options.debug;var t=flvjs.createPlayer(e.options,e.configs);return E.default["__ready__"+e.id](t),t}},s={name:"native_flv",options:{prefix:"native_flv",flv:{path:"https://cdn.jsdelivr.net/npm/flv.js@latest",cors:!0,debug:!1}},canPlayType:function(e){return o.HAS_MSE&&-1<["video/x-flv","video/flv"].indexOf(e.toLowerCase())},create:function(s,a,e){var t=s.originalNode,l=s.id+"_"+a.prefix,d=null,u=null;d=t.cloneNode(!0),a=Object.assign(a,s.options);for(var n=b.default.html5media.properties,c=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=function(e){var t=(0,x.createEvent)(e.type,s);s.dispatchEvent(t)},o=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);d["get"+e]=function(){return null!==u?d[r]:null},d["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(r))if("src"===r){if(d[r]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==u){var t={type:"flv"};t.url=e,t.cors=a.flv.cors,t.debug=a.flv.debug,t.path=a.flv.path;var n=a.flv.configs;u.destroy();for(var o=0,i=c.length;o<i;o++)d.removeEventListener(c[o],f);(u=w._createPlayer({options:t,configs:n,id:l})).attachMediaElement(d),u.load()}}else d[r]=e}},i=0,r=n.length;i<r;i++)o(n[i]);if(E.default["__ready__"+l]=function(e){s.flvPlayer=u=e;for(var t,i=flvjs.Events,n=0,o=c.length;n<o;n++)"loadedmetadata"===(t=c[n])&&(u.unload(),u.detachMediaElement(),u.attachMediaElement(d),u.load()),d.addEventListener(t,f);var r=function(o){i.hasOwnProperty(o)&&u.on(i[o],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("error"===e){var n=t[0]+": "+t[1]+" "+t[2].msg;s.generateError(n,d.src)}else{var o=(0,x.createEvent)(e,s);o.data=t,s.dispatchEvent(o)}}(i[o],t)})};for(var a in i)r(a)},e&&0<e.length)for(var p=0,m=e.length;p<m;p++)if(S.renderer.renderers[a.prefix].canPlayType(e[p].type)){d.setAttribute("src",e[p].src);break}d.setAttribute("id",l),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none";var h={type:"flv"};h.url=d.src,h.cors=a.flv.cors,h.debug=a.flv.debug,h.path=a.flv.path;var v=a.flv.configs;d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return null!==u&&u.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.destroy()};var g=(0,x.createEvent)("rendererready",d);return s.dispatchEvent(g),s.promises.push(w.load({options:h,configs:v,id:l})),d}};i.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".flv")?"video/flv":null}),S.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],22:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=a(e(3)),b=a(e(7)),S=e(8),x=e(27),o=e(25),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var w={promise:null,load:function(e){return"undefined"!=typeof Hls?w.promise=new Promise(function(e){e()}).then(function(){w._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/hls.js@latest",w.promise=w.promise||(0,r.loadScript)(e.options.path),w.promise.then(function(){w._createPlayer(e)})),w.promise},_createPlayer:function(e){var t=new Hls(e.options);return E.default["__ready__"+e.id](t),t}},s={name:"native_hls",options:{prefix:"native_hls",hls:{path:"https://cdn.jsdelivr.net/npm/hls.js@latest",autoStartLoad:!1,debug:!1}},canPlayType:function(e){return o.HAS_MSE&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:function(d,i,u){var e=d.originalNode,r=d.id+"_"+i.prefix,t=e.getAttribute("preload"),n=e.autoplay,c=null,f=null,p=0,m=u.length;f=e.cloneNode(!0),(i=Object.assign(i,d.options)).hls.autoStartLoad=t&&"none"!==t||n;for(var o=b.default.html5media.properties,h=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),v=function(e){var t=(0,x.createEvent)(e.type,d);d.dispatchEvent(t)},a=function(o){var e=""+o.substring(0,1).toUpperCase()+o.substring(1);f["get"+e]=function(){return null!==c?f[o]:null},f["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(o))if("src"===o){if(f[o]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==c){c.destroy();for(var t=0,n=h.length;t<n;t++)f.removeEventListener(h[t],v);(c=w._createPlayer({options:i.hls,id:r})).loadSource(e),c.attachMedia(f)}}else f[o]=e}},s=0,l=o.length;s<l;s++)a(o[s]);if(E.default["__ready__"+r]=function(e){d.hlsPlayer=c=e;for(var i=Hls.Events,t=function(e){if("loadedmetadata"===e){var t=d.originalNode.src;c.detachMedia(),c.loadSource(t),c.attachMedia(f)}f.addEventListener(e,v)},n=0,o=h.length;n<o;n++)t(h[n]);var s=void 0,l=void 0,r=function(o){i.hasOwnProperty(o)&&c.on(i[o],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("hlsError"===e&&(console.warn(t),(t=t[1]).fatal))switch(t.type){case"mediaError":var n=(new Date).getTime();if(!s||3e3<n-s)s=(new Date).getTime(),c.recoverMediaError();else if(!l||3e3<n-l)l=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),c.swapAudioCodec(),c.recoverMediaError();else{var o="Cannot recover, last media error recovery failed";d.generateError(o,f.src),console.error(o)}break;case"networkError":if("manifestLoadError"===t.details)if(p<m&&void 0!==u[p+1])f.setSrc(u[p++].src),f.load(),f.play();else{var i="Network error";d.generateError(i,u),console.error(i)}else{var r="Network error";d.generateError(r,u),console.error(r)}break;default:c.destroy()}else{var a=(0,x.createEvent)(e,d);a.data=t,d.dispatchEvent(a)}}(i[o],t)})};for(var a in i)r(a)},0<m)for(;p<m;p++)if(S.renderer.renderers[i.prefix].canPlayType(u[p].type)){f.setAttribute("src",u[p].src);break}"auto"===t||n||(f.addEventListener("play",function(){null!==c&&c.startLoad()}),f.addEventListener("pause",function(){null!==c&&c.stopLoad()})),f.setAttribute("id",r),e.parentNode.insertBefore(f,e),e.autoplay=!1,e.style.display="none",f.setSize=function(e,t){return f.style.width=e+"px",f.style.height=t+"px",f},f.hide=function(){return f.pause(),f.style.display="none",f},f.show=function(){return f.style.display="",f},f.destroy=function(){null!==c&&(c.stopLoad(),c.destroy())};var g=(0,x.createEvent)("rendererready",f);return d.dispatchEvent(g),d.promises.push(w.load({options:i.hls,id:r})),f}};i.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".m3u8")?"application/x-mpegURL":null}),S.renderer.add(s)},{25:25,26:26,27:27,28:28,3:3,7:7,8:8}],23:[function(e,t,n){"use strict";var o=r(e(3)),g=r(e(2)),y=r(e(7)),E=e(8),b=e(27),i=e(25);function r(e){return e&&e.__esModule?e:{default:e}}var a={name:"html5",options:{prefix:"html5"},canPlayType:function(e){var t=g.default.createElement("video");return i.IS_ANDROID&&/\/mp(3|4)$/i.test(e)||~["application/x-mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())&&i.SUPPORTS_NATIVE_HLS?"yes":t.canPlayType?t.canPlayType(e.toLowerCase()).replace(/no/,""):""},create:function(n,e,t){var o=n.id+"_"+e.prefix,i=!1,r=null;void 0===n.originalNode||null===n.originalNode?(r=g.default.createElement("audio"),n.appendChild(r)):r=n.originalNode,r.setAttribute("id",o);for(var a=y.default.html5media.properties,s=function(t){var e=""+t.substring(0,1).toUpperCase()+t.substring(1);r["get"+e]=function(){return r[t]},r["set"+e]=function(e){-1===y.default.html5media.readOnlyProperties.indexOf(t)&&(r[t]=e)}},l=0,d=a.length;l<d;l++)s(a[l]);for(var u,c=y.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=0,p=c.length;f<p;f++)u=c[f],r.addEventListener(u,function(e){if(i){var t=(0,b.createEvent)(e.type,e.target);n.dispatchEvent(t)}});r.setSize=function(e,t){return r.style.width=e+"px",r.style.height=t+"px",r},r.hide=function(){return i=!1,r.style.display="none",r},r.show=function(){return i=!0,r.style.display="",r};var m=0,h=t.length;if(0<h)for(;m<h;m++)if(E.renderer.renderers[e.prefix].canPlayType(t[m].type)){r.setAttribute("src",t[m].src);break}r.addEventListener("error",function(e){e&&e.target&&e.target.error&&4===e.target.error.code&&i&&(m<h&&void 0!==t[m+1]?(r.src=t[m++].src,r.load(),r.play()):n.generateError("Media error: Format(s) not supported or source(s) not found",t))});var v=(0,b.createEvent)("rendererready",r);return n.dispatchEvent(v),r}};o.default.HtmlMediaElement=y.default.HtmlMediaElement=a,E.renderer.add(a)},{2:2,25:25,27:27,3:3,7:7,8:8}],24:[function(e,t,n){"use strict";var w=a(e(3)),P=a(e(2)),T=a(e(7)),o=e(8),C=e(27),i=e(28),r=e(26);function a(e){return e&&e.__esModule?e:{default:e}}var k={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){k.isLoaded="undefined"!=typeof YT&&YT.loaded,k.isLoaded?k.createIframe(e):(k.loadIframeApi(),k.iframeQueue.push(e))},loadIframeApi:function(){k.isIframeStarted||((0,r.loadScript)("https://www.youtube.com/player_api"),k.isIframeStarted=!0)},iFrameReady:function(){for(k.isLoaded=!0,k.isIframeLoaded=!0;0<k.iframeQueue.length;){var e=k.iframeQueue.pop();k.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=k.getYouTubeIdFromParam(e))&&(t=k.getYouTubeIdFromUrl(e)):t=k.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",o=0,i=t.length;o<i;o++){var r=t[o].split("=");if("v"===r[0]){n=r[1];break}}return n},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},s={name:"youtube_iframe",options:{prefix:"youtube_iframe",youtube:{autoplay:0,controls:0,disablekb:1,end:0,loop:0,modestbranding:0,playsinline:0,rel:0,showinfo:0,start:0,iv_load_policy:3,nocookie:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(m,n,o){var h={},v=[],g=null,r=!0,a=!1,y=null;h.options=n,h.id=m.id+"_"+n.prefix,h.mediaElement=m;for(var e=T.default.html5media.properties,t=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null!==g){switch(i){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return r;case"ended":return a;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==g)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=k.getYouTubeId(t);m.originalNode.autoplay?g.loadVideoById(n):g.cueVideoById(n);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,C.createEvent)("volumechange",h);m.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,C.createEvent)("volumechange",h);m.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,C.createEvent)("ratechange",h);m.dispatchEvent(e)},50);break;case"readyState":var o=(0,C.createEvent)("canplay",h);m.dispatchEvent(o)}else v.push({type:"set",propName:i,value:e})}},i=0,s=e.length;i<s;i++)t(e[i]);for(var l=T.default.html5media.methods,d=function(e){h[e]=function(){if(null!==g)switch(e){case"play":return r=!1,g.playVideo();case"pause":return r=!0,g.pauseVideo();case"load":return null}else v.push({type:"call",methodName:e})}},u=0,c=l.length;u<c;u++)d(l[u]);var f=P.default.createElement("div");f.id=h.id,h.options.youtube.nocookie&&(m.originalNode.src=k.getYouTubeNoCookieUrl(o[0].src)),m.originalNode.parentNode.insertBefore(f,m.originalNode),m.originalNode.style.display="none";var p="audio"===m.originalNode.tagName.toLowerCase(),E=p?"1":m.originalNode.height,b=p?"1":m.originalNode.width,S=k.getYouTubeId(o[0].src),x={id:h.id,containerId:f.id,videoId:S,height:E,width:b,host:h.options.youtube&&h.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},h.options.youtube),origin:w.default.location.host,events:{onReady:function(e){if(m.youTubeApi=g=e.target,m.youTubeState={paused:!0,ended:!1},v.length)for(var t=0,n=v.length;t<n;t++){var o=v[t];if("set"===o.type){var i=o.propName,r=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+r](o.value)}else"call"===o.type&&h[o.methodName]()}y=g.getIframe(),m.originalNode.muted&&g.mute();for(var a=["mouseover","mouseout"],s=function(e){var t=(0,C.createEvent)(e.type,h);m.dispatchEvent(t)},l=0,d=a.length;l<d;l++)y.addEventListener(a[l],s,!1);for(var u=["rendererready","loadedmetadata","loadeddata","canplay"],c=0,f=u.length;c<f;c++){var p=(0,C.createEvent)(u[c],h);m.dispatchEvent(p)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],r=!0,a=!1;break;case 0:t=["ended"],r=!1,a=!h.options.youtube.loop,h.options.youtube.loop||h.stopInterval();break;case 1:t=["play","playing"],a=r=!1,h.startInterval();break;case 2:t=["pause"],r=!0,a=!1,h.stopInterval();break;case 3:t=["progress"],a=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],r=!0,a=!1}for(var n=0,o=t.length;n<o;n++){var i=(0,C.createEvent)(t[n],h);m.dispatchEvent(i)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.";break;case 5:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}m.generateError("Code "+e.data+": "+t,o)}(e)}}};return(p||m.originalNode.hasAttribute("playsinline"))&&(x.playerVars.playsinline=1),m.originalNode.controls&&(x.playerVars.controls=1),m.originalNode.autoplay&&(x.playerVars.autoplay=1),m.originalNode.loop&&(x.playerVars.loop=1),(x.playerVars.loop&&1===parseInt(x.playerVars.loop,10)||-1<m.originalNode.src.indexOf("loop="))&&!x.playerVars.playlist&&-1===m.originalNode.src.indexOf("playlist=")&&(x.playerVars.playlist=k.getYouTubeId(m.originalNode.src)),k.enqueueIframe(x),h.onEvent=function(e,t,n){null!=n&&(m.youTubeState=n)},h.setSize=function(e,t){null!==g&&g.setSize(e,t)},h.hide=function(){h.stopInterval(),h.pause(),y&&(y.style.display="none")},h.show=function(){y&&(y.style.display="")},h.destroy=function(){g.destroy()},h.interval=null,h.startInterval=function(){h.interval=setInterval(function(){var e=(0,C.createEvent)("timeupdate",h);m.dispatchEvent(e)},250)},h.stopInterval=function(){h.interval&&clearInterval(h.interval)},h.getPosterUrl=function(){var e=n.youtube.imageQuality,t=k.getYouTubeId(m.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},h}};w.default.onYouTubePlayerAPIReady=function(){k.iFrameReady()},i.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),o.renderer.add(s)},{2:2,26:26,27:27,28:28,3:3,7:7,8:8}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;var i=a(e(3)),r=a(e(2)),o=a(e(7));function a(e){return e&&e.__esModule?e:{default:e}}for(var s=n.NAV=i.default.navigator,l=n.UA=s.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(l)&&!i.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(l)&&!i.default.MSStream,c=n.IS_IPOD=/ipod/i.test(l)&&!i.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(l)&&!i.default.MSStream,n.IS_ANDROID=/android/i.test(l)),p=n.IS_IE=/(trident|microsoft)/i.test(s.appName),m=(n.IS_EDGE="msLaunchUri"in s&&!("documentMode"in r.default)),h=n.IS_CHROME=/chrome/i.test(l),v=n.IS_FIREFOX=/firefox/i.test(l),g=n.IS_SAFARI=/safari/i.test(l)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(l),E=(n.HAS_MSE="MediaSource"in i.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=r.default.createElement("x"),t=r.default.documentElement,n=i.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var o=n&&"auto"===(n(e,"")||{}).pointerEvents;return e.remove(),!!o}(),S=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});i.default.addEventListener("test",null,t)}catch(e){}return e}(),x=["source","track","audio","video"],w=void 0,P=0,T=x.length;P<T;P++)w=r.default.createElement(x[P]);var C=n.SUPPORTS_NATIVE_HLS=g||p&&/edge/i.test(l),k=void 0!==w.webkitEnterFullscreen,_=void 0!==w.requestFullscreen;k&&/mac os x 10_5/i.test(l)&&(k=_=!1);var N=void 0!==w.webkitRequestFullScreen,A=void 0!==w.mozRequestFullScreen,L=void 0!==w.msRequestFullscreen,F=N||A||L,j=F,I="",M=void 0,O=void 0,D=void 0;A?j=r.default.mozFullScreenEnabled:L&&(j=r.default.msFullscreenEnabled),h&&(k=!1),F&&(N?I="webkitfullscreenchange":A?I="fullscreenchange":L&&(I="MSFullscreenChange"),n.isFullScreen=M=function(){return A?r.default.mozFullScreen:N?r.default.webkitIsFullScreen:L?null!==r.default.msFullscreenElement:void 0},n.requestFullScreen=O=function(e){N?e.webkitRequestFullScreen():A?e.mozRequestFullScreen():L&&e.msRequestFullscreen()},n.cancelFullScreen=D=function(){N?r.default.webkitCancelFullScreen():A?r.default.mozCancelFullScreen():L&&r.default.msExitFullscreen()});var R=n.HAS_NATIVE_FULLSCREEN=_,V=n.HAS_WEBKIT_NATIVE_FULLSCREEN=N,H=n.HAS_MOZ_NATIVE_FULLSCREEN=A,U=n.HAS_MS_NATIVE_FULLSCREEN=L,q=n.HAS_IOS_FULLSCREEN=k,B=n.HAS_TRUE_NATIVE_FULLSCREEN=F,z=n.HAS_NATIVE_FULLSCREEN_ENABLED=j,W=n.FULLSCREEN_EVENT_NAME=I;n.isFullScreen=M,n.requestFullScreen=O,n.cancelFullScreen=D,o.default.Features=o.default.Features||{},o.default.Features.isiPad=d,o.default.Features.isiPod=c,o.default.Features.isiPhone=u,o.default.Features.isiOS=o.default.Features.isiPhone||o.default.Features.isiPad,o.default.Features.isAndroid=f,o.default.Features.isIE=p,o.default.Features.isEdge=m,o.default.Features.isChrome=h,o.default.Features.isFirefox=v,o.default.Features.isSafari=g,o.default.Features.isStockAndroid=y,o.default.Features.hasMSE=E,o.default.Features.supportsNativeHLS=C,o.default.Features.supportsPointerEvents=b,o.default.Features.supportsPassiveEvent=S,o.default.Features.hasiOSFullScreen=q,o.default.Features.hasNativeFullscreen=R,o.default.Features.hasWebkitNativeFullScreen=V,o.default.Features.hasMozNativeFullScreen=H,o.default.Features.hasMsNativeFullScreen=U,o.default.Features.hasTrueNativeFullScreen=B,o.default.Features.nativeFullScreenEnabled=z,o.default.Features.fullScreenEventName=W,o.default.Features.isFullScreen=M,o.default.Features.requestFullScreen=O,o.default.Features.cancelFullScreen=D},{2:2,3:3,7:7}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=a,n.offset=s,n.toggleClass=h,n.fadeOut=v,n.fadeIn=g,n.siblings=y,n.visible=E,n.ajax=b;var l=r(e(3)),i=r(e(2)),o=r(e(7));function r(e){return e&&e.__esModule?e:{default:e}}function a(o){return new Promise(function(e,t){var n=i.default.createElement("script");n.src=o,n.async=!0,n.onload=function(){n.remove(),e()},n.onerror=function(){n.remove(),t()},i.default.head.appendChild(n)})}function s(e){var t=e.getBoundingClientRect(),n=l.default.pageXOffset||i.default.documentElement.scrollLeft,o=l.default.pageYOffset||i.default.documentElement.scrollTop;return{top:t.top+o,left:t.left+n}}var d=void 0,u=void 0,c=void 0;"classList"in i.default.documentElement?(d=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},u=function(e,t){return e.classList.add(t)},c=function(e,t){return e.classList.remove(t)}):(d=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},u=function(e,t){f(e,t)||(e.className+=" "+t)},c=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var f=n.hasClass=d,p=n.addClass=u,m=n.removeClass=c;function h(e,t){f(e,t)?m(e,t):p(e,t)}function v(i){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,a=arguments[2];i.style.opacity||(i.style.opacity=1);var s=null;l.default.requestAnimationFrame(function e(t){var n=t-(s=s||t),o=parseFloat(1-n/r,2);i.style.opacity=o<0?0:o,r<n?a&&"function"==typeof a&&a():l.default.requestAnimationFrame(e)})}function g(i){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,a=arguments[2];i.style.opacity||(i.style.opacity=0);var s=null;l.default.requestAnimationFrame(function e(t){var n=t-(s=s||t),o=parseFloat(n/r,2);i.style.opacity=1<o?1:o,r<n?a&&"function"==typeof a&&a():l.default.requestAnimationFrame(e)})}function y(e,t){var n=[];for(e=e.parentNode.firstChild;t&&!t(e)||n.push(e),e=e.nextSibling;);return n}function E(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function b(e,t,n,o){var i=l.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),r="application/x-www-form-urlencoded; charset=UTF-8",a=!1,s="*/".concat("*");switch(t){case"text":r="text/plain";break;case"json":r="application/json, text/javascript";break;case"html":r="text/html";break;case"xml":r="application/xml, text/xml"}"application/x-www-form-urlencoded"!==r&&(s=r+", */*; q=0.01"),i&&(i.open("GET",e,!0),i.setRequestHeader("Accept",s),i.onreadystatechange=function(){if(!a&&4===i.readyState)if(200===i.status){a=!0;var e=void 0;switch(t){case"json":e=JSON.parse(i.responseText);break;case"xml":e=i.responseXML;break;default:e=i.responseText}n(e)}else"function"==typeof o&&o(i.status)},i.send())}o.default.Utils=o.default.Utils||{},o.default.Utils.offset=s,o.default.Utils.hasClass=f,o.default.Utils.addClass=p,o.default.Utils.removeClass=m,o.default.Utils.toggleClass=h,o.default.Utils.fadeIn=g,o.default.Utils.fadeOut=v,o.default.Utils.siblings=y,o.default.Utils.visible=E,o.default.Utils.ajax=b,o.default.Utils.loadScript=a},{2:2,3:3,7:7}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=a,n.debounce=s,n.isObjectEmpty=l,n.splitEvents=d,n.createEvent=u,n.isNodeAfter=c,n.isString=f;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o};function a(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,function(e){return t[e]})}function s(o,i){var r=this,a=arguments,s=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof o)throw new Error("First argument must be a function");if("number"!=typeof i)throw new Error("Second argument must be a numeric value");var l=void 0;return function(){var e=r,t=a,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||o.apply(e,t)},i),n&&o.apply(e,t)}}function l(e){return Object.getOwnPropertyNames(e).length<=0}function d(e,n){var o=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,i={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(n?"."+n:"");t.startsWith(".")?(i.d.push(t),i.w.push(t)):i[o.test(e)?"w":"d"].push(t)}),i.d=i.d.join(" "),i.w=i.w.join(" "),i}function u(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),o={target:t};return null!==n&&(e=n[1],o.namespace=n[2]),new window.CustomEvent(e,{detail:o})}function c(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function f(e){return"string"==typeof e}r.default.Utils=r.default.Utils||{},r.default.Utils.escapeHTML=a,r.default.Utils.debounce=s,r.default.Utils.isObjectEmpty=l,r.default.Utils.splitEvents=d,r.default.Utils.createEvent=u,r.default.Utils.isNodeAfter=c,r.default.Utils.isString=f},{7:7}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.typeChecks=void 0,n.absolutizeUrl=l,n.formatType=d,n.getMimeFromType=u,n.getTypeFromFile=c,n.getExtension=f,n.normalizeExtension=p;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o},a=e(27);var s=n.typeChecks=[];function l(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,a.escapeHTML)(e)+'">x</a>',t.firstChild.href}function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?c(e):t}function u(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=s.length;t<n;t++){var o=s[t](e);if(o)return o}var i=p(f(e)),r="video/mp4";return i&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(i)?r="video/"+i:"mov"===i?r="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(i)&&(r="audio/"+i)),r}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function p(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}r.default.Utils=r.default.Utils||{},r.default.Utils.typeChecks=s,r.default.Utils.absolutizeUrl=l,r.default.Utils.formatType=d,r.default.Utils.getMimeFromType=u,r.default.Utils.getTypeFromFile=c,r.default.Utils.getExtension=f,r.default.Utils.normalizeExtension=p},{27:27,7:7}],29:[function(e,t,n){"use strict";var o,i=a(e(2)),r=a(e(4));function a(e){return e&&e.__esModule?e:{default:e}}if([Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=i.default.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,o=arguments.length;n<o;n++){var i=arguments[n];if(null!==i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length-1;0<=--n&&t.item(n)!==this;);return-1<n}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,o=this;do{for(n=t.length;0<=--n&&t.item(n)!==o;);}while(n<0&&(o=o.parentElement));return o}),function(){for(var i=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-i)),o=window.setTimeout(function(){e(t+n)},n);return i=t+n,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),/firefox/i.test(navigator.userAgent)){var s=window.getComputedStyle;window.getComputedStyle=function(e,t){var n=s(e,t);return null===n?{getPropertyValue:function(){}}:n}}window.Promise||(window.Promise=r.default),(o=window.Node||window.Element)&&o.prototype&&null===o.prototype.children&&Object.defineProperty(o.prototype,"children",{get:function(){for(var e=0,t=void 0,n=this.childNodes,o=[];t=n[e++];)1===t.nodeType&&o.push(t);return o}})},{2:2,4:4}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isDropFrame=C,n.secondsToTimeCode=a,n.timeCodeToSeconds=s,n.calculateTimeFormat=l,n.convertSMPTEtoSeconds=d;var o,i=e(7),r=(o=i)&&o.__esModule?o:{default:o};function C(){return!((0<arguments.length&&void 0!==arguments[0]?arguments[0]:25)%1==0)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:25,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"hh:mm:ss";e=!e||"number"!=typeof e||e<0?0:e;var a=Math.round(.066666*o),s=Math.round(o),l=24*Math.round(3600*o),d=Math.round(600*o),u=C(o)?";":":",c=void 0,f=void 0,p=void 0,m=void 0,h=Math.round(e*o);if(C(o)){h<0&&(h=l+h);var v=(h%=l)%d;h+=9*a*Math.floor(h/d),a<v&&(h+=a*Math.floor((v-a)/Math.round(60*s-a)));var g=Math.floor(h/s);c=Math.floor(Math.floor(g/60)/60),f=Math.floor(g/60)%60,p=n?g%60:Math.floor(h/s%60).toFixed(i)}else c=Math.floor(e/3600)%24,f=Math.floor(e/60)%60,p=n?Math.floor(e%60):Math.floor(e%60).toFixed(i);c=c<=0?0:c,p=60===(p=p<=0?0:p)?0:p,f=60===(f=f<=0?0:f)?0:f;for(var y=r.split(":"),E={},b=0,S=y.length;b<S;++b){for(var x="",w=0,P=y[b].length;w<P;w++)x.indexOf(y[b][w])<0&&(x+=y[b][w]);~["f","s","m","h"].indexOf(x)&&(E[x]=y[b].length)}var T=t||0<c?(c<10&&1<E.h?"0"+c:c)+":":"";return T+=(f<10&&1<E.m?"0"+f:f)+":",T+=""+(p<10&&1<E.s?"0"+p:p),n&&(T+=(m=(m=(h%s).toFixed(0))<=0?0:m)<10&&E.f?u+"0"+m:""+u+m),T}function s(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:25;if("string"!=typeof e)throw new TypeError("Time must be a string");if(0<e.indexOf(";")&&(e=e.replace(";",":")),!/\d{2}(\:\d{2}){0,3}/i.test(e))throw new TypeError("Time code must have the format `00:00:00`");var n=e.split(":"),o=void 0,i=0,r=0,a=0,s=0,l=0,d=Math.round(.066666*t),u=Math.round(t),c=3600*u,f=60*u;switch(n.length){default:case 1:a=parseInt(n[0],10);break;case 2:r=parseInt(n[0],10),a=parseInt(n[1],10);break;case 3:i=parseInt(n[0],10),r=parseInt(n[1],10),a=parseInt(n[2],10);break;case 4:i=parseInt(n[0],10),r=parseInt(n[1],10),a=parseInt(n[2],10),s=parseInt(n[3],10)}return o=C(t)?c*i+f*r+u*a+s-d*((l=60*i+r)-Math.floor(l/10)):(c*i+f*r+t*a+s)/t,parseFloat(o.toFixed(3))}function l(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:25;e=!e||"number"!=typeof e||e<0?0:e;for(var o=Math.floor(e/3600)%24,i=Math.floor(e/60)%60,r=Math.floor(e%60),a=[[Math.floor((e%1*n).toFixed(3)),"f"],[r,"s"],[i,"m"],[o,"h"]],s=t.timeFormat,l=s[1]===s[0],d=l?2:1,u=s.length<d?s[d]:":",c=s[0],f=!1,p=0,m=a.length;p<m;p++)if(~s.indexOf(a[p][1]))f=!0;else if(f){for(var h=!1,v=p;v<m;v++)if(0<a[v][0]){h=!0;break}if(!h)break;l||(s=c+s),s=a[p][1]+u+s,l&&(s=a[p][1]+s),c=a[p][1]}t.timeFormat=s}function d(e){if("string"!=typeof e)throw new TypeError("Argument must be a string value");for(var t=~(e=e.replace(",",".")).indexOf(".")?e.split(".")[1].length:0,n=0,o=1,i=0,r=(e=e.split(":").reverse()).length;i<r;i++)o=1,0<i&&(o=Math.pow(60,i)),n+=Number(e[i])*o;return Number(n.toFixed(t))}r.default.Utils=r.default.Utils||{},r.default.Utils.secondsToTimeCode=a,r.default.Utils.timeCodeToSeconds=s,r.default.Utils.calculateTimeFormat=l,r.default.Utils.convertSMPTEtoSeconds=d},{7:7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelement-migrate.js b/wp-includes/js/mediaelement/mediaelement-migrate.js
new file mode 100644
index 0000000..c2dbd53
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement-migrate.js
@@ -0,0 +1,84 @@
+/* global console, MediaElementPlayer, mejs */
+(function ( window, $ ) {
+ // Reintegrate `plugins` since they don't exist in MEJS anymore; it won't affect anything in the player
+ if (mejs.plugins === undefined) {
+ mejs.plugins = {};
+ mejs.plugins.silverlight = [];
+ mejs.plugins.silverlight.push({
+ types: []
+ });
+ }
+
+ // Inclusion of old `HtmlMediaElementShim` if it doesn't exist
+ mejs.HtmlMediaElementShim = mejs.HtmlMediaElementShim || {
+ getTypeFromFile: mejs.Utils.getTypeFromFile
+ };
+
+ // Add missing global variables for backward compatibility
+ if (mejs.MediaFeatures === undefined) {
+ mejs.MediaFeatures = mejs.Features;
+ }
+ if (mejs.Utility === undefined) {
+ mejs.Utility = mejs.Utils;
+ }
+
+ /**
+ * Create missing variables and have default `classPrefix` overridden to avoid issues.
+ *
+ * `media` is now a fake wrapper needed to simplify manipulation of various media types,
+ * so in order to access the `video` or `audio` tag, use `media.originalNode` or `player.node`;
+ * `player.container` used to be jQuery but now is a HTML element, and many elements inside
+ * the player rely on it being a HTML now, so its conversion is difficult; however, a
+ * `player.$container` new variable has been added to be used as jQuery object
+ */
+ var init = MediaElementPlayer.prototype.init;
+ MediaElementPlayer.prototype.init = function () {
+ this.options.classPrefix = 'mejs-';
+ this.$media = this.$node = $( this.node );
+ init.call( this );
+ };
+
+ var ready = MediaElementPlayer.prototype._meReady;
+ MediaElementPlayer.prototype._meReady = function () {
+ this.container = $( this.container) ;
+ this.controls = $( this.controls );
+ this.layers = $( this.layers );
+ ready.apply( this, arguments );
+ };
+
+ // Override method so certain elements can be called with jQuery
+ MediaElementPlayer.prototype.getElement = function ( el ) {
+ return $ !== undefined && el instanceof $ ? el[0] : el;
+ };
+
+ // Add jQuery ONLY to most of custom features' arguments for backward compatibility; default features rely 100%
+ // on the arguments being HTML elements to work properly
+ MediaElementPlayer.prototype.buildfeatures = function ( player, controls, layers, media ) {
+ var defaultFeatures = [
+ 'playpause',
+ 'current',
+ 'progress',
+ 'duration',
+ 'tracks',
+ 'volume',
+ 'fullscreen'
+ ];
+ for (var i = 0, total = this.options.features.length; i < total; i++) {
+ var feature = this.options.features[i];
+ if (this['build' + feature]) {
+ try {
+ // Use jQuery for non-default features
+ if (defaultFeatures.indexOf(feature) === -1) {
+ this['build' + feature]( player, $(controls), $(layers), media );
+ } else {
+ this['build' + feature]( player, controls, layers, media );
+ }
+
+ } catch (e) {
+ console.error( 'error building ' + feature, e );
+ }
+ }
+ }
+ };
+
+})( window, jQuery );
diff --git a/wp-includes/js/mediaelement/mediaelement-migrate.min.js b/wp-includes/js/mediaelement/mediaelement-migrate.min.js
new file mode 100644
index 0000000..55a1068
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement-migrate.min.js
@@ -0,0 +1 @@
+!function(a){void 0===mejs.plugins&&(mejs.plugins={},mejs.plugins.silverlight=[],mejs.plugins.silverlight.push({types:[]})),mejs.HtmlMediaElementShim=mejs.HtmlMediaElementShim||{getTypeFromFile:mejs.Utils.getTypeFromFile},void 0===mejs.MediaFeatures&&(mejs.MediaFeatures=mejs.Features),void 0===mejs.Utility&&(mejs.Utility=mejs.Utils);var e=MediaElementPlayer.prototype.init,t=(MediaElementPlayer.prototype.init=function(){this.options.classPrefix="mejs-",this.$media=this.$node=a(this.node),e.call(this)},MediaElementPlayer.prototype._meReady);MediaElementPlayer.prototype._meReady=function(){this.container=a(this.container),this.controls=a(this.controls),this.layers=a(this.layers),t.apply(this,arguments)},MediaElementPlayer.prototype.getElement=function(e){return void 0!==a&&e instanceof a?e[0]:e},MediaElementPlayer.prototype.buildfeatures=function(e,t,i,s){for(var l=["playpause","current","progress","duration","tracks","volume","fullscreen"],r=0,n=this.options.features.length;r<n;r++){var o=this.options.features[r];if(this["build"+o])try{-1===l.indexOf(o)?this["build"+o](e,a(t),a(i),s):this["build"+o](e,t,i,s)}catch(e){console.error("error building "+o,e)}}}}((window,jQuery)); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelement.js b/wp-includes/js/mediaelement/mediaelement.js
new file mode 100644
index 0000000..40e3414
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement.js
@@ -0,0 +1,3984 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
+
+},{}],2:[function(_dereq_,module,exports){
+(function (global){
+var topLevel = typeof global !== 'undefined' ? global :
+ typeof window !== 'undefined' ? window : {}
+var minDoc = _dereq_(1);
+
+var doccy;
+
+if (typeof document !== 'undefined') {
+ doccy = document;
+} else {
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
+
+ if (!doccy) {
+ doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
+ }
+}
+
+module.exports = doccy;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"1":1}],3:[function(_dereq_,module,exports){
+(function (global){
+var win;
+
+if (typeof window !== "undefined") {
+ win = window;
+} else if (typeof global !== "undefined") {
+ win = global;
+} else if (typeof self !== "undefined"){
+ win = self;
+} else {
+ win = {};
+}
+
+module.exports = win;
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],4:[function(_dereq_,module,exports){
+(function (root) {
+
+ // Store setTimeout reference so promise-polyfill will be unaffected by
+ // other code modifying setTimeout (like sinon.useFakeTimers())
+ var setTimeoutFunc = setTimeout;
+
+ function noop() {}
+
+ // Polyfill for Function.prototype.bind
+ function bind(fn, thisArg) {
+ return function () {
+ fn.apply(thisArg, arguments);
+ };
+ }
+
+ function Promise(fn) {
+ if (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');
+ if (typeof fn !== 'function') throw new TypeError('not a function');
+ this._state = 0;
+ this._handled = false;
+ this._value = undefined;
+ this._deferreds = [];
+
+ doResolve(fn, this);
+ }
+
+ function handle(self, deferred) {
+ while (self._state === 3) {
+ self = self._value;
+ }
+ if (self._state === 0) {
+ self._deferreds.push(deferred);
+ return;
+ }
+ self._handled = true;
+ Promise._immediateFn(function () {
+ var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
+ if (cb === null) {
+ (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
+ return;
+ }
+ var ret;
+ try {
+ ret = cb(self._value);
+ } catch (e) {
+ reject(deferred.promise, e);
+ return;
+ }
+ resolve(deferred.promise, ret);
+ });
+ }
+
+ function resolve(self, newValue) {
+ try {
+ // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
+ if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
+ if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {
+ var then = newValue.then;
+ if (newValue instanceof Promise) {
+ self._state = 3;
+ self._value = newValue;
+ finale(self);
+ return;
+ } else if (typeof then === 'function') {
+ doResolve(bind(then, newValue), self);
+ return;
+ }
+ }
+ self._state = 1;
+ self._value = newValue;
+ finale(self);
+ } catch (e) {
+ reject(self, e);
+ }
+ }
+
+ function reject(self, newValue) {
+ self._state = 2;
+ self._value = newValue;
+ finale(self);
+ }
+
+ function finale(self) {
+ if (self._state === 2 && self._deferreds.length === 0) {
+ Promise._immediateFn(function() {
+ if (!self._handled) {
+ Promise._unhandledRejectionFn(self._value);
+ }
+ });
+ }
+
+ for (var i = 0, len = self._deferreds.length; i < len; i++) {
+ handle(self, self._deferreds[i]);
+ }
+ self._deferreds = null;
+ }
+
+ function Handler(onFulfilled, onRejected, promise) {
+ this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
+ this.onRejected = typeof onRejected === 'function' ? onRejected : null;
+ this.promise = promise;
+ }
+
+ /**
+ * Take a potentially misbehaving resolver function and make sure
+ * onFulfilled and onRejected are only called once.
+ *
+ * Makes no guarantees about asynchrony.
+ */
+ function doResolve(fn, self) {
+ var done = false;
+ try {
+ fn(function (value) {
+ if (done) return;
+ done = true;
+ resolve(self, value);
+ }, function (reason) {
+ if (done) return;
+ done = true;
+ reject(self, reason);
+ });
+ } catch (ex) {
+ if (done) return;
+ done = true;
+ reject(self, ex);
+ }
+ }
+
+ Promise.prototype['catch'] = function (onRejected) {
+ return this.then(null, onRejected);
+ };
+
+ Promise.prototype.then = function (onFulfilled, onRejected) {
+ var prom = new (this.constructor)(noop);
+
+ handle(this, new Handler(onFulfilled, onRejected, prom));
+ return prom;
+ };
+
+ Promise.all = function (arr) {
+ var args = Array.prototype.slice.call(arr);
+
+ return new Promise(function (resolve, reject) {
+ if (args.length === 0) return resolve([]);
+ var remaining = args.length;
+
+ function res(i, val) {
+ try {
+ if (val && (typeof val === 'object' || typeof val === 'function')) {
+ var then = val.then;
+ if (typeof then === 'function') {
+ then.call(val, function (val) {
+ res(i, val);
+ }, reject);
+ return;
+ }
+ }
+ args[i] = val;
+ if (--remaining === 0) {
+ resolve(args);
+ }
+ } catch (ex) {
+ reject(ex);
+ }
+ }
+
+ for (var i = 0; i < args.length; i++) {
+ res(i, args[i]);
+ }
+ });
+ };
+
+ Promise.resolve = function (value) {
+ if (value && typeof value === 'object' && value.constructor === Promise) {
+ return value;
+ }
+
+ return new Promise(function (resolve) {
+ resolve(value);
+ });
+ };
+
+ Promise.reject = function (value) {
+ return new Promise(function (resolve, reject) {
+ reject(value);
+ });
+ };
+
+ Promise.race = function (values) {
+ return new Promise(function (resolve, reject) {
+ for (var i = 0, len = values.length; i < len; i++) {
+ values[i].then(resolve, reject);
+ }
+ });
+ };
+
+ // Use polyfill for setImmediate for performance gains
+ Promise._immediateFn = (typeof setImmediate === 'function' && function (fn) { setImmediate(fn); }) ||
+ function (fn) {
+ setTimeoutFunc(fn, 0);
+ };
+
+ Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
+ if (typeof console !== 'undefined' && console) {
+ console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
+ }
+ };
+
+ /**
+ * Set the immediate function to execute callbacks
+ * @param fn {function} Function to execute
+ * @deprecated
+ */
+ Promise._setImmediateFn = function _setImmediateFn(fn) {
+ Promise._immediateFn = fn;
+ };
+
+ /**
+ * Change the function to execute on unhandled rejection
+ * @param {function} fn Function to execute on unhandled rejection
+ * @deprecated
+ */
+ Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {
+ Promise._unhandledRejectionFn = fn;
+ };
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = Promise;
+ } else if (!root.Promise) {
+ root.Promise = Promise;
+ }
+
+})(this);
+
+},{}],5:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _en = _dereq_(9);
+
+var _general = _dereq_(18);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var i18n = { lang: 'en', en: _en.EN };
+
+i18n.language = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (args !== null && args !== undefined && args.length) {
+
+ if (typeof args[0] !== 'string') {
+ throw new TypeError('Language code must be a string value');
+ }
+
+ if (!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(args[0])) {
+ throw new TypeError('Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters');
+ }
+
+ i18n.lang = args[0];
+
+ if (i18n[args[0]] === undefined) {
+ args[1] = args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object' ? args[1] : {};
+ i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN;
+ } else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === 'object') {
+ i18n[args[0]] = args[1];
+ }
+ }
+
+ return i18n.lang;
+};
+
+i18n.t = function (message) {
+ var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
+
+
+ if (typeof message === 'string' && message.length) {
+
+ var str = void 0,
+ pluralForm = void 0;
+
+ var language = i18n.language();
+
+ var _plural = function _plural(input, number, form) {
+
+ if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
+ return input;
+ }
+
+ var _pluralForms = function () {
+ return [function () {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return [3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ } else {
+ return arguments.length <= 6 ? undefined : arguments[6];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }];
+ }();
+
+ return _pluralForms[form].apply(null, [number].concat(input));
+ };
+
+ if (i18n[language] !== undefined) {
+ str = i18n[language][message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n[language]['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ if (!str && i18n.en) {
+ str = i18n.en[message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n.en['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ str = str || message;
+
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ str = str.replace('%1', pluralParam);
+ }
+
+ return (0, _general.escapeHTML)(str);
+ }
+
+ return message;
+};
+
+_mejs2.default.i18n = i18n;
+
+if (typeof mejsL10n !== 'undefined') {
+ _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
+}
+
+exports.default = i18n;
+
+},{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(18);
+
+var _media2 = _dereq_(19);
+
+var _renderer = _dereq_(8);
+
+var _constants = _dereq_(16);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var MediaElement = function MediaElement(idOrNode, options, sources) {
+ var _this = this;
+
+ _classCallCheck(this, MediaElement);
+
+ var t = this;
+
+ sources = Array.isArray(sources) ? sources : null;
+
+ t.defaults = {
+ renderers: [],
+
+ fakeNodeName: 'mediaelementwrapper',
+
+ pluginPath: 'build/',
+
+ shimScriptAccess: 'sameDomain'
+ };
+
+ options = Object.assign(t.defaults, options);
+
+ t.mediaElement = _document2.default.createElement(options.fakeNodeName);
+
+ var id = idOrNode,
+ error = false;
+
+ if (typeof idOrNode === 'string') {
+ t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
+ } else {
+ t.mediaElement.originalNode = idOrNode;
+ id = idOrNode.id;
+ }
+
+ if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
+ return null;
+ }
+
+ t.mediaElement.options = options;
+ id = id || 'mejs_' + Math.random().toString().slice(2);
+
+ t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');
+
+ var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
+ if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
+ t.mediaElement.originalNode.setAttribute('preload', 'none');
+ }
+
+ t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);
+
+ t.mediaElement.appendChild(t.mediaElement.originalNode);
+
+ var processURL = function processURL(url, type) {
+ if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4 && this.status === 200) {
+ var _url = _window2.default.URL || _window2.default.webkitURL,
+ blobUrl = _url.createObjectURL(this.response);
+ t.mediaElement.originalNode.setAttribute('src', blobUrl);
+ return blobUrl;
+ }
+ return url;
+ };
+ xhr.open('GET', url);
+ xhr.responseType = 'blob';
+ xhr.send();
+ }
+
+ return url;
+ };
+
+ var mediaFiles = void 0;
+
+ if (sources !== null) {
+ mediaFiles = sources;
+ } else if (t.mediaElement.originalNode !== null) {
+
+ mediaFiles = [];
+
+ switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
+ case 'iframe':
+ mediaFiles.push({
+ type: '',
+ src: t.mediaElement.originalNode.getAttribute('src')
+ });
+ break;
+ case 'audio':
+ case 'video':
+ var _sources = t.mediaElement.originalNode.children.length,
+ nodeSource = t.mediaElement.originalNode.getAttribute('src');
+
+ if (nodeSource) {
+ var node = t.mediaElement.originalNode,
+ type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
+ mediaFiles.push({
+ type: type,
+ src: processURL(nodeSource, type)
+ });
+ }
+
+ for (var i = 0; i < _sources; i++) {
+ var n = t.mediaElement.originalNode.children[i];
+ if (n.tagName.toLowerCase() === 'source') {
+ var src = n.getAttribute('src'),
+ _type = (0, _media2.formatType)(src, n.getAttribute('type'));
+ mediaFiles.push({ type: _type, src: processURL(src, _type) });
+ }
+ }
+ break;
+ }
+ }
+
+ t.mediaElement.id = id;
+ t.mediaElement.renderers = {};
+ t.mediaElement.events = {};
+ t.mediaElement.promises = [];
+ t.mediaElement.renderer = null;
+ t.mediaElement.rendererName = null;
+
+ t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {
+
+ var t = _this,
+ media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.show();
+ t.mediaElement.renderer.setSrc(media);
+ return true;
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.hide();
+ }
+
+ var newRenderer = t.mediaElement.renderers[rendererName],
+ newRendererType = null;
+
+ if (newRenderer !== undefined && newRenderer !== null) {
+ newRenderer.show();
+ newRenderer.setSrc(media);
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ return true;
+ }
+
+ var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;
+
+ for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
+ var index = rendererArray[_i];
+
+ if (index === rendererName) {
+ var rendererList = _renderer.renderer.renderers;
+ newRendererType = rendererList[index];
+
+ var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
+ newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
+ newRenderer.name = rendererName;
+
+ t.mediaElement.renderers[newRendererType.name] = newRenderer;
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ newRenderer.show();
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ t.mediaElement.setSize = function (width, height) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.setSize(width, height);
+ }
+ };
+
+ t.mediaElement.generateError = function (message, urlList) {
+ message = message || '';
+ urlList = Array.isArray(urlList) ? urlList : [];
+ var event = (0, _general.createEvent)('error', t.mediaElement);
+ event.message = message;
+ event.urls = urlList;
+ t.mediaElement.dispatchEvent(event);
+ error = true;
+ };
+
+ var props = _mejs2.default.html5media.properties,
+ methods = _mejs2.default.html5media.methods,
+ addProperty = function addProperty(obj, name, onGet, onSet) {
+ var oldValue = obj[name];
+ var getFn = function getFn() {
+ return onGet.apply(obj, [oldValue]);
+ },
+ setFn = function setFn(newValue) {
+ oldValue = onSet.apply(obj, [newValue]);
+ return oldValue;
+ };
+
+ Object.defineProperty(obj, name, {
+ get: getFn,
+ set: setFn
+ });
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ if (propName !== 'src') {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
+ getFn = function getFn() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
+ },
+ setFn = function setFn(value) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
+ t.mediaElement.renderer['set' + capName](value);
+ }
+ };
+
+ addProperty(t.mediaElement, propName, getFn, setFn);
+ t.mediaElement['get' + capName] = getFn;
+ t.mediaElement['set' + capName] = setFn;
+ }
+ },
+ getSrc = function getSrc() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
+ },
+ setSrc = function setSrc(value) {
+ var mediaFiles = [];
+
+ if (typeof value === 'string') {
+ mediaFiles.push({
+ src: value,
+ type: value ? (0, _media2.getTypeFromFile)(value) : ''
+ });
+ } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
+ var _src = (0, _media2.absolutizeUrl)(value.src),
+ _type2 = value.type,
+ media = Object.assign(value, {
+ src: _src,
+ type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
+ });
+ mediaFiles.push(media);
+ } else if (Array.isArray(value)) {
+ for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {
+
+ var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
+ _type3 = value[_i2].type,
+ _media = Object.assign(value[_i2], {
+ src: _src2,
+ type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
+ });
+
+ mediaFiles.push(_media);
+ }
+ }
+
+ var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
+ event = void 0;
+
+ if (!t.mediaElement.paused && !(t.mediaElement.src == null || t.mediaElement.src === '')) {
+ t.mediaElement.pause();
+ event = (0, _general.createEvent)('pause', t.mediaElement);
+ t.mediaElement.dispatchEvent(event);
+ }
+ t.mediaElement.originalNode.src = mediaFiles[0].src || '';
+
+ if (renderInfo === null && mediaFiles[0].src) {
+ t.mediaElement.generateError('No renderer found', mediaFiles);
+ return;
+ }
+
+ var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === '');
+ return shouldChangeRenderer ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
+ },
+ triggerAction = function triggerAction(methodName, args) {
+ try {
+ if (methodName === 'play' && (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls' || t.mediaElement.rendererName === 'vimeo_iframe')) {
+ var response = t.mediaElement.renderer[methodName](args);
+ if (response && typeof response.then === 'function') {
+ response.catch(function () {
+ if (t.mediaElement.paused) {
+ setTimeout(function () {
+ var tmpResponse = t.mediaElement.renderer.play();
+ if (tmpResponse !== undefined) {
+ tmpResponse.catch(function () {
+ if (!t.mediaElement.renderer.paused) {
+ t.mediaElement.renderer.pause();
+ }
+ });
+ }
+ }, 150);
+ }
+ });
+ }
+ } else {
+ t.mediaElement.renderer[methodName](args);
+ }
+ } catch (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ }
+ },
+ assignMethods = function assignMethods(methodName) {
+ t.mediaElement[methodName] = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ triggerAction(methodName, args);
+ }).catch(function (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ });
+ } else {
+ triggerAction(methodName, args);
+ }
+ }
+ return null;
+ };
+ };
+
+ addProperty(t.mediaElement, 'src', getSrc, setSrc);
+ t.mediaElement.getSrc = getSrc;
+ t.mediaElement.setSrc = setSrc;
+
+ for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
+ assignGettersSetters(props[_i3]);
+ }
+
+ for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
+ assignMethods(methods[_i4]);
+ }
+
+ t.mediaElement.addEventListener = function (eventName, callback) {
+ t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];
+
+ t.mediaElement.events[eventName].push(callback);
+ };
+ t.mediaElement.removeEventListener = function (eventName, callback) {
+ if (!eventName) {
+ t.mediaElement.events = {};
+ return true;
+ }
+
+ var callbacks = t.mediaElement.events[eventName];
+
+ if (!callbacks) {
+ return true;
+ }
+
+ if (!callback) {
+ t.mediaElement.events[eventName] = [];
+ return true;
+ }
+
+ for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
+ if (callbacks[_i5] === callback) {
+ t.mediaElement.events[eventName].splice(_i5, 1);
+ return true;
+ }
+ }
+ return false;
+ };
+
+ t.mediaElement.dispatchEvent = function (event) {
+ var callbacks = t.mediaElement.events[event.type];
+ if (callbacks) {
+ for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
+ callbacks[_i6].apply(null, [event]);
+ }
+ }
+ };
+
+ t.mediaElement.destroy = function () {
+ var mediaElement = t.mediaElement.originalNode.cloneNode(true);
+ var wrapper = t.mediaElement.parentElement;
+ mediaElement.removeAttribute('id');
+ mediaElement.remove();
+ t.mediaElement.remove();
+ wrapper.appendChild(mediaElement);
+ };
+
+ if (mediaFiles.length) {
+ t.mediaElement.src = mediaFiles;
+ }
+
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }).catch(function () {
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ });
+ } else {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }
+
+ return t.mediaElement;
+};
+
+_window2.default.MediaElement = MediaElement;
+_mejs2.default.MediaElement = MediaElement;
+
+exports.default = MediaElement;
+
+},{"16":16,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var mejs = {};
+
+mejs.version = '4.2.17';
+
+mejs.html5media = {
+ properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
+ readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],
+
+ methods: ['load', 'play', 'pause', 'canPlayType'],
+
+ events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],
+
+ mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
+};
+
+_window2.default.mejs = mejs;
+
+exports.default = mejs;
+
+},{"3":3}],8:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.renderer = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Renderer = function () {
+ function Renderer() {
+ _classCallCheck(this, Renderer);
+
+ this.renderers = {};
+ this.order = [];
+ }
+
+ _createClass(Renderer, [{
+ key: 'add',
+ value: function add(renderer) {
+ if (renderer.name === undefined) {
+ throw new TypeError('renderer must contain at least `name` property');
+ }
+
+ this.renderers[renderer.name] = renderer;
+ this.order.push(renderer.name);
+ }
+ }, {
+ key: 'select',
+ value: function select(mediaFiles) {
+ var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+
+ var renderersLength = renderers.length;
+
+ renderers = renderers.length ? renderers : this.order;
+
+ if (!renderersLength) {
+ var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
+ rendererRanking = function rendererRanking(renderer) {
+ for (var i = 0, total = rendererIndicator.length; i < total; i++) {
+ if (rendererIndicator[i].test(renderer)) {
+ return i;
+ }
+ }
+ return rendererIndicator.length;
+ };
+
+ renderers.sort(function (a, b) {
+ return rendererRanking(a) - rendererRanking(b);
+ });
+ }
+
+ for (var i = 0, total = renderers.length; i < total; i++) {
+ var key = renderers[i],
+ _renderer = this.renderers[key];
+
+ if (_renderer !== null && _renderer !== undefined) {
+ for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
+ if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
+ return {
+ rendererName: _renderer.name,
+ src: mediaFiles[j].src
+ };
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+ }, {
+ key: 'order',
+ set: function set(order) {
+ if (!Array.isArray(order)) {
+ throw new TypeError('order must be an array of strings.');
+ }
+
+ this._order = order;
+ },
+ get: function get() {
+ return this._order;
+ }
+ }, {
+ key: 'renderers',
+ set: function set(renderers) {
+ if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
+ throw new TypeError('renderers must be an array of objects.');
+ }
+
+ this._renderers = renderers;
+ },
+ get: function get() {
+ return this._renderers;
+ }
+ }]);
+
+ return Renderer;
+}();
+
+var renderer = exports.renderer = new Renderer();
+
+_mejs2.default.Renderers = renderer;
+
+},{"7":7}],9:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var EN = exports.EN = {
+ 'mejs.plural-form': 1,
+
+ 'mejs.download-file': 'Download File',
+
+ 'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',
+
+ 'mejs.fullscreen': 'Fullscreen',
+
+ 'mejs.play': 'Play',
+ 'mejs.pause': 'Pause',
+
+ 'mejs.time-slider': 'Time Slider',
+ 'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
+ 'mejs.live-broadcast': 'Live Broadcast',
+
+ 'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
+ 'mejs.unmute': 'Unmute',
+ 'mejs.mute': 'Mute',
+ 'mejs.volume-slider': 'Volume Slider',
+
+ 'mejs.video-player': 'Video Player',
+ 'mejs.audio-player': 'Audio Player',
+
+ 'mejs.captions-subtitles': 'Captions/Subtitles',
+ 'mejs.captions-chapters': 'Chapters',
+ 'mejs.none': 'None',
+ 'mejs.afrikaans': 'Afrikaans',
+ 'mejs.albanian': 'Albanian',
+ 'mejs.arabic': 'Arabic',
+ 'mejs.belarusian': 'Belarusian',
+ 'mejs.bulgarian': 'Bulgarian',
+ 'mejs.catalan': 'Catalan',
+ 'mejs.chinese': 'Chinese',
+ 'mejs.chinese-simplified': 'Chinese (Simplified)',
+ 'mejs.chinese-traditional': 'Chinese (Traditional)',
+ 'mejs.croatian': 'Croatian',
+ 'mejs.czech': 'Czech',
+ 'mejs.danish': 'Danish',
+ 'mejs.dutch': 'Dutch',
+ 'mejs.english': 'English',
+ 'mejs.estonian': 'Estonian',
+ 'mejs.filipino': 'Filipino',
+ 'mejs.finnish': 'Finnish',
+ 'mejs.french': 'French',
+ 'mejs.galician': 'Galician',
+ 'mejs.german': 'German',
+ 'mejs.greek': 'Greek',
+ 'mejs.haitian-creole': 'Haitian Creole',
+ 'mejs.hebrew': 'Hebrew',
+ 'mejs.hindi': 'Hindi',
+ 'mejs.hungarian': 'Hungarian',
+ 'mejs.icelandic': 'Icelandic',
+ 'mejs.indonesian': 'Indonesian',
+ 'mejs.irish': 'Irish',
+ 'mejs.italian': 'Italian',
+ 'mejs.japanese': 'Japanese',
+ 'mejs.korean': 'Korean',
+ 'mejs.latvian': 'Latvian',
+ 'mejs.lithuanian': 'Lithuanian',
+ 'mejs.macedonian': 'Macedonian',
+ 'mejs.malay': 'Malay',
+ 'mejs.maltese': 'Maltese',
+ 'mejs.norwegian': 'Norwegian',
+ 'mejs.persian': 'Persian',
+ 'mejs.polish': 'Polish',
+ 'mejs.portuguese': 'Portuguese',
+ 'mejs.romanian': 'Romanian',
+ 'mejs.russian': 'Russian',
+ 'mejs.serbian': 'Serbian',
+ 'mejs.slovak': 'Slovak',
+ 'mejs.slovenian': 'Slovenian',
+ 'mejs.spanish': 'Spanish',
+ 'mejs.swahili': 'Swahili',
+ 'mejs.swedish': 'Swedish',
+ 'mejs.tagalog': 'Tagalog',
+ 'mejs.thai': 'Thai',
+ 'mejs.turkish': 'Turkish',
+ 'mejs.ukrainian': 'Ukrainian',
+ 'mejs.vietnamese': 'Vietnamese',
+ 'mejs.welsh': 'Welsh',
+ 'mejs.yiddish': 'Yiddish'
+};
+
+},{}],10:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _media = _dereq_(19);
+
+var _constants = _dereq_(16);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeDash = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof dashjs !== 'undefined') {
+ NativeDash.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';
+
+ NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeDash.promise.then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ }
+
+ return NativeDash.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = dashjs.MediaPlayer().create();
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var DashNativeRenderer = {
+ name: 'native_dash',
+ options: {
+ prefix: 'native_dash',
+ dash: {
+ path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
+ debug: false,
+ drm: {},
+
+ robustnessLevel: ''
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ autoplay = originalNode.autoplay,
+ children = originalNode.children;
+
+ var node = null,
+ dashPlayer = null;
+
+ originalNode.removeAttribute('type');
+ for (var i = 0, total = children.length; i < total; i++) {
+ children[i].removeAttribute('type');
+ }
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return dashPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ node[propName] = source;
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ node.removeEventListener(events[_i], attachNativeEvents);
+ }
+ dashPlayer = NativeDash._createPlayer({
+ options: options.dash,
+ id: id
+ });
+
+ if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
+ dashPlayer.setProtectionData(value.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(source);
+ if (autoplay) {
+ dashPlayer.play();
+ }
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
+ assignGettersSetters(props[_i2]);
+ }
+
+ _window2.default['__ready__' + id] = function (_dashPlayer) {
+ mediaElement.dashPlayer = dashPlayer = _dashPlayer;
+
+ var dashEvents = dashjs.MediaPlayer.events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ dashPlayer.initialize();
+ dashPlayer.attachView(node);
+ dashPlayer.setAutoPlay(false);
+
+ if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
+ dashPlayer.setProtectionData(options.dash.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(node.getSrc());
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ assignEvents(events[_i3]);
+ }
+
+ var assignMdashEvents = function assignMdashEvents(e) {
+ if (e.type.toLowerCase() === 'error') {
+ mediaElement.generateError(e.message, node.src);
+ console.error(e);
+ } else {
+ var _event = (0, _general.createEvent)(e.type, mediaElement);
+ _event.data = e;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ for (var eventType in dashEvents) {
+ if (dashEvents.hasOwnProperty(eventType)) {
+ dashPlayer.on(dashEvents[eventType], function (e) {
+ return assignMdashEvents(e);
+ });
+ }
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ node.setAttribute('src', mediaFiles[_i4].src);
+ if (typeof mediaFiles[_i4].drm !== 'undefined') {
+ options.dash.drm = mediaFiles[_i4].drm;
+ }
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeDash.load({
+ options: options.dash,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
+});
+
+_renderer.renderer.add(DashNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PluginDetector = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var PluginDetector = exports.PluginDetector = {
+ plugins: [],
+
+ hasPluginVersion: function hasPluginVersion(plugin, v) {
+ var pv = PluginDetector.plugins[plugin];
+ v[1] = v[1] || 0;
+ v[2] = v[2] || 0;
+ return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
+ },
+
+ addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
+ PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
+ },
+
+ detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {
+
+ var version = [0, 0, 0],
+ description = void 0,
+ ax = void 0;
+
+ if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
+ description = _constants.NAV.plugins[pluginName].description;
+ if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
+ version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
+ for (var i = 0, total = version.length; i < total; i++) {
+ version[i] = parseInt(version[i].match(/\d+/), 10);
+ }
+ }
+ } else if (_window2.default.ActiveXObject !== undefined) {
+ try {
+ ax = new ActiveXObject(activeX);
+ if (ax) {
+ version = axDetect(ax);
+ }
+ } catch (e) {
+
+ }
+ }
+ return version;
+ }
+};
+
+PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
+ var version = [],
+ d = ax.GetVariable("$version");
+
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ return version;
+});
+
+var FlashMediaElementRenderer = {
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var flash = {};
+ var isActive = false;
+
+ flash.options = options;
+ flash.id = mediaElement.id + '_' + flash.options.prefix;
+ flash.mediaElement = mediaElement;
+ flash.flashState = {};
+ flash.flashApi = null;
+ flash.flashApiStack = [];
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ flash.flashState[propName] = null;
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['get' + capName] = function () {
+ if (flash.flashApi !== null) {
+ if (typeof flash.flashApi['get_' + propName] === 'function') {
+ var value = flash.flashApi['get_' + propName]();
+
+ if (propName === 'buffered') {
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return value;
+ },
+ length: 1
+ };
+ }
+ return value;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ };
+
+ flash['set' + capName] = function (value) {
+ if (propName === 'src') {
+ value = (0, _media.absolutizeUrl)(value);
+ }
+
+ if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
+ try {
+ flash.flashApi['set_' + propName](value);
+ } catch (e) {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'set',
+ propName: propName,
+ value: value
+ });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ flash[methodName] = function () {
+ if (isActive) {
+ if (flash.flashApi !== null) {
+ if (flash.flashApi['fire_' + methodName]) {
+ try {
+ flash.flashApi['fire_' + methodName]();
+ } catch (e) {
+
+ }
+ } else {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'call',
+ methodName: methodName
+ });
+ }
+ }
+ };
+ };
+ methods.push('stop');
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var initEvents = ['rendererready'];
+
+ for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
+ var event = (0, _general.createEvent)(initEvents[_i2], flash);
+ mediaElement.dispatchEvent(event);
+ }
+
+ _window2.default['__ready__' + flash.id] = function () {
+
+ flash.flashReady = true;
+ flash.flashApi = _document2.default.getElementById('__' + flash.id);
+
+ if (flash.flashApiStack.length) {
+ for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
+ var stackItem = flash.flashApiStack[_i3];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ flash[stackItem.methodName]();
+ }
+ }
+ }
+ };
+
+ _window2.default['__event__' + flash.id] = function (eventName, message) {
+ var event = (0, _general.createEvent)(eventName, flash);
+ if (message) {
+ try {
+ event.data = JSON.parse(message);
+ event.details.data = JSON.parse(message);
+ } catch (e) {
+ event.message = message;
+ }
+ }
+
+ flash.mediaElement.dispatchEvent(event);
+ };
+
+ flash.flashWrapper = _document2.default.createElement('div');
+
+ if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
+ flash.options.shimScriptAccess = 'sameDomain';
+ }
+
+ var autoplay = mediaElement.originalNode.autoplay,
+ flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
+ isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
+ flashHeight = isVideo ? mediaElement.originalNode.height : 1,
+ flashWidth = isVideo ? mediaElement.originalNode.width : 1;
+
+ if (mediaElement.originalNode.getAttribute('src')) {
+ flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
+ }
+
+ if (flash.options.enablePseudoStreaming === true) {
+ flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
+ flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
+ }
+
+ if (flash.options.streamDelimiter) {
+ flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
+ }
+
+ if (flash.options.proxyType) {
+ flashVars.push('proxytype=' + flash.options.proxyType);
+ }
+
+ mediaElement.appendChild(flash.flashWrapper);
+ mediaElement.originalNode.style.display = 'none';
+
+ var settings = [];
+
+ if (_constants.IS_IE || _constants.IS_EDGE) {
+ var specialIEContainer = _document2.default.createElement('div');
+ flash.flashWrapper.appendChild(specialIEContainer);
+
+ if (_constants.IS_EDGE) {
+ settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
+ } else {
+ settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
+ }
+
+ if (!isVideo) {
+ settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
+ }
+
+ specialIEContainer.outerHTML = '<object ' + settings.join(' ') + '>' + ('<param name="movie" value="' + flash.options.pluginPath + flash.options.filename + '?x=' + new Date() + '" />') + ('<param name="flashvars" value="' + flashVars.join('&amp;') + '" />') + '<param name="quality" value="high" />' + '<param name="bgcolor" value="#000000" />' + '<param name="wmode" value="transparent" />' + ('<param name="allowScriptAccess" value="' + flash.options.shimScriptAccess + '" />') + '<param name="allowFullScreen" value="true" />' + ('<div>' + _i18n2.default.t('mejs.install-flash') + '</div>') + '</object>';
+ } else {
+
+ settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];
+
+ if (isVideo) {
+ settings.push('width="' + flashWidth + '"');
+ settings.push('height="' + flashHeight + '"');
+ } else {
+ settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
+ }
+
+ flash.flashWrapper.innerHTML = '<embed ' + settings.join(' ') + '>';
+ }
+
+ flash.flashNode = flash.flashWrapper.lastChild;
+
+ flash.hide = function () {
+ isActive = false;
+ if (isVideo) {
+ flash.flashNode.style.display = 'none';
+ }
+ };
+ flash.show = function () {
+ isActive = true;
+ if (isVideo) {
+ flash.flashNode.style.display = '';
+ }
+ };
+ flash.setSize = function (width, height) {
+ flash.flashNode.style.width = width + 'px';
+ flash.flashNode.style.height = height + 'px';
+
+ if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
+ flash.flashApi.fire_setSize(width, height);
+ }
+ };
+
+ flash.destroy = function () {
+ flash.flashNode.remove();
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ flash.setSrc(mediaFiles[_i4].src);
+ break;
+ }
+ }
+ }
+
+ return flash;
+ }
+};
+
+var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);
+
+if (hasFlash) {
+ _media.typeChecks.push(function (url) {
+ url = url.toLowerCase();
+
+ if (url.startsWith('rtmp')) {
+ if (~url.indexOf('.mp3')) {
+ return 'audio/rtmp';
+ } else {
+ return 'video/rtmp';
+ }
+ } else if (/\.og(a|g)/i.test(url)) {
+ return 'audio/ogg';
+ } else if (~url.indexOf('.m3u8')) {
+ return 'application/x-mpegURL';
+ } else if (~url.indexOf('.mpd')) {
+ return 'application/dash+xml';
+ } else if (~url.indexOf('.flv')) {
+ return 'video/flv';
+ } else {
+ return null;
+ }
+ });
+
+ var FlashMediaElementVideoRenderer = {
+ name: 'flash_video',
+ options: {
+ prefix: 'flash_video',
+ filename: 'mediaelement-flash-video.swf',
+ enablePseudoStreaming: false,
+
+ pseudoStreamingStartQueryParam: 'start',
+
+ pseudoStreamingType: 'byte',
+
+ proxyType: '',
+
+ streamDelimiter: ''
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+
+ };
+ _renderer.renderer.add(FlashMediaElementVideoRenderer);
+
+ var FlashMediaElementHlsVideoRenderer = {
+ name: 'flash_hls',
+ options: {
+ prefix: 'flash_hls',
+ filename: 'mediaelement-flash-video-hls.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementHlsVideoRenderer);
+
+ var FlashMediaElementMdashVideoRenderer = {
+ name: 'flash_dash',
+ options: {
+ prefix: 'flash_dash',
+ filename: 'mediaelement-flash-video-mdash.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/dash+xml'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementMdashVideoRenderer);
+
+ var FlashMediaElementAudioRenderer = {
+ name: 'flash_audio',
+ options: {
+ prefix: 'flash_audio',
+ filename: 'mediaelement-flash-audio.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/mp3'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioRenderer);
+
+ var FlashMediaElementAudioOggRenderer = {
+ name: 'flash_audio_ogg',
+ options: {
+ prefix: 'flash_audio_ogg',
+ filename: 'mediaelement-flash-audio-ogg.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioOggRenderer);
+}
+
+},{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeFlv = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof flvjs !== 'undefined') {
+ NativeFlv.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';
+
+ NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeFlv.promise.then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ }
+
+ return NativeFlv.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ flvjs.LoggingControl.enableDebug = settings.options.debug;
+ flvjs.LoggingControl.enableVerbose = settings.options.debug;
+ var player = flvjs.createPlayer(settings.options, settings.configs);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var FlvNativeRenderer = {
+ name: 'native_flv',
+ options: {
+ prefix: 'native_flv',
+ flv: {
+ path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',
+
+ cors: true,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix;
+
+ var node = null,
+ flvPlayer = null;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return flvPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (flvPlayer !== null) {
+ var _flvOptions = {};
+ _flvOptions.type = 'flv';
+ _flvOptions.url = value;
+ _flvOptions.cors = options.flv.cors;
+ _flvOptions.debug = options.flv.debug;
+ _flvOptions.path = options.flv.path;
+ var _flvConfigs = options.flv.configs;
+
+ flvPlayer.destroy();
+ for (var i = 0, total = events.length; i < total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ flvPlayer = NativeFlv._createPlayer({
+ options: _flvOptions,
+ configs: _flvConfigs,
+ id: id
+ });
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_flvPlayer) {
+ mediaElement.flvPlayer = flvPlayer = _flvPlayer;
+
+ var flvEvents = flvjs.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ flvPlayer.unload();
+ flvPlayer.detachMediaElement();
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var assignFlvEvents = function assignFlvEvents(name, data) {
+ if (name === 'error') {
+ var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
+ mediaElement.generateError(message, node.src);
+ } else {
+ var _event = (0, _general.createEvent)(name, mediaElement);
+ _event.data = data;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ var _loop = function _loop(eventType) {
+ if (flvEvents.hasOwnProperty(eventType)) {
+ flvPlayer.on(flvEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignFlvEvents(flvEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in flvEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
+ node.setAttribute('src', mediaFiles[_i2].src);
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ var flvOptions = {};
+ flvOptions.type = 'flv';
+ flvOptions.url = node.src;
+ flvOptions.cors = options.flv.cors;
+ flvOptions.debug = options.flv.debug;
+ flvOptions.path = options.flv.path;
+ var flvConfigs = options.flv.configs;
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.pause();
+ }
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeFlv.load({
+ options: flvOptions,
+ configs: flvConfigs,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
+});
+
+_renderer.renderer.add(FlvNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeHls = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof Hls !== 'undefined') {
+ NativeHls.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';
+
+ NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeHls.promise.then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ }
+
+ return NativeHls.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = new Hls(settings.options);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var HlsNativeRenderer = {
+ name: 'native_hls',
+ options: {
+ prefix: 'native_hls',
+ hls: {
+ path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',
+
+ autoStartLoad: false,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ preload = originalNode.getAttribute('preload'),
+ autoplay = originalNode.autoplay;
+
+ var hlsPlayer = null,
+ node = null,
+ index = 0,
+ total = mediaFiles.length;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+ options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return hlsPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (hlsPlayer !== null) {
+ hlsPlayer.destroy();
+ for (var i = 0, _total = events.length; i < _total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ hlsPlayer = NativeHls._createPlayer({
+ options: options.hls,
+ id: id
+ });
+ hlsPlayer.loadSource(value);
+ hlsPlayer.attachMedia(node);
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, _total2 = props.length; i < _total2; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_hlsPlayer) {
+ mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
+ var hlsEvents = Hls.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ var url = mediaElement.originalNode.src;
+ hlsPlayer.detachMedia();
+ hlsPlayer.loadSource(url);
+ hlsPlayer.attachMedia(node);
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var recoverDecodingErrorDate = void 0,
+ recoverSwapAudioCodecDate = void 0;
+ var assignHlsEvents = function assignHlsEvents(name, data) {
+ if (name === 'hlsError') {
+ console.warn(data);
+ data = data[1];
+
+ if (data.fatal) {
+ switch (data.type) {
+ case 'mediaError':
+ var now = new Date().getTime();
+ if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
+ recoverDecodingErrorDate = new Date().getTime();
+ hlsPlayer.recoverMediaError();
+ } else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
+ recoverSwapAudioCodecDate = new Date().getTime();
+ console.warn('Attempting to swap Audio Codec and recover from media error');
+ hlsPlayer.swapAudioCodec();
+ hlsPlayer.recoverMediaError();
+ } else {
+ var message = 'Cannot recover, last media error recovery failed';
+ mediaElement.generateError(message, node.src);
+ console.error(message);
+ }
+ break;
+ case 'networkError':
+ if (data.details === 'manifestLoadError') {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.setSrc(mediaFiles[index++].src);
+ node.load();
+ node.play();
+ } else {
+ var _message = 'Network error';
+ mediaElement.generateError(_message, mediaFiles);
+ console.error(_message);
+ }
+ } else {
+ var _message2 = 'Network error';
+ mediaElement.generateError(_message2, mediaFiles);
+ console.error(_message2);
+ }
+ break;
+ default:
+ hlsPlayer.destroy();
+ break;
+ }
+ return;
+ }
+ }
+ var event = (0, _general.createEvent)(name, mediaElement);
+ event.data = data;
+ mediaElement.dispatchEvent(event);
+ };
+
+ var _loop = function _loop(eventType) {
+ if (hlsEvents.hasOwnProperty(eventType)) {
+ hlsPlayer.on(hlsEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignHlsEvents(hlsEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in hlsEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ if (preload !== 'auto' && !autoplay) {
+ node.addEventListener('play', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.startLoad();
+ }
+ });
+
+ node.addEventListener('pause', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ }
+ });
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ hlsPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeHls.load({
+ options: options.hls,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
+});
+
+_renderer.renderer.add(HlsNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var HtmlMediaElement = {
+ name: 'html5',
+ options: {
+ prefix: 'html5'
+ },
+
+ canPlayType: function canPlayType(type) {
+
+ var mediaElement = _document2.default.createElement('video');
+
+ if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
+ return 'yes';
+ } else if (mediaElement.canPlayType) {
+ return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
+ } else {
+ return '';
+ }
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var id = mediaElement.id + '_' + options.prefix;
+ var isActive = false;
+
+ var node = null;
+
+ if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
+ node = _document2.default.createElement('audio');
+ mediaElement.appendChild(node);
+ } else {
+ node = mediaElement.originalNode;
+ }
+
+ node.setAttribute('id', id);
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return node[propName];
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ node[propName] = value;
+ }
+ };
+ };
+
+ for (var i = 0, _total = props.length; i < _total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ assignEvents = function assignEvents(eventName) {
+ node.addEventListener(eventName, function (e) {
+ if (isActive) {
+ var _event = (0, _general.createEvent)(e.type, e.target);
+ mediaElement.dispatchEvent(_event);
+ }
+ });
+ };
+
+ for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ isActive = false;
+ node.style.display = 'none';
+
+ return node;
+ };
+
+ node.show = function () {
+ isActive = true;
+ node.style.display = '';
+
+ return node;
+ };
+
+ var index = 0,
+ total = mediaFiles.length;
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ node.addEventListener('error', function (e) {
+ if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.src = mediaFiles[index++].src;
+ node.load();
+ node.play();
+ } else {
+ mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
+ }
+ }
+ });
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ return node;
+ }
+};
+
+_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;
+
+_renderer.renderer.add(HtmlMediaElement);
+
+},{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var YouTubeApi = {
+ isIframeStarted: false,
+
+ isIframeLoaded: false,
+
+ iframeQueue: [],
+
+ enqueueIframe: function enqueueIframe(settings) {
+ YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;
+
+ if (YouTubeApi.isLoaded) {
+ YouTubeApi.createIframe(settings);
+ } else {
+ YouTubeApi.loadIframeApi();
+ YouTubeApi.iframeQueue.push(settings);
+ }
+ },
+
+ loadIframeApi: function loadIframeApi() {
+ if (!YouTubeApi.isIframeStarted) {
+ (0, _dom.loadScript)('https://www.youtube.com/player_api');
+ YouTubeApi.isIframeStarted = true;
+ }
+ },
+
+ iFrameReady: function iFrameReady() {
+
+ YouTubeApi.isLoaded = true;
+ YouTubeApi.isIframeLoaded = true;
+
+ while (YouTubeApi.iframeQueue.length > 0) {
+ var settings = YouTubeApi.iframeQueue.pop();
+ YouTubeApi.createIframe(settings);
+ }
+ },
+
+ createIframe: function createIframe(settings) {
+ return new YT.Player(settings.containerId, settings);
+ },
+
+ getYouTubeId: function getYouTubeId(url) {
+
+ var youTubeId = '';
+
+ if (url.indexOf('?') > 0) {
+ youTubeId = YouTubeApi.getYouTubeIdFromParam(url);
+
+ if (youTubeId === '') {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+ } else {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+
+ var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
+ youTubeId = id.split('?');
+ return youTubeId[0];
+ },
+
+ getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?'),
+ parameters = parts[1].split('&');
+
+ var youTubeId = '';
+
+ for (var i = 0, total = parameters.length; i < total; i++) {
+ var paramParts = parameters[i].split('=');
+ if (paramParts[0] === 'v') {
+ youTubeId = paramParts[1];
+ break;
+ }
+ }
+
+ return youTubeId;
+ },
+
+ getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?');
+ url = parts[0];
+ return url.substring(url.lastIndexOf('/') + 1);
+ },
+
+ getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
+ if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
+ return url;
+ }
+
+ var parts = url.split('/');
+ parts[2] = parts[2].replace('.com', '-nocookie.com');
+ return parts.join('/');
+ }
+};
+
+var YouTubeIframeRenderer = {
+ name: 'youtube_iframe',
+
+ options: {
+ prefix: 'youtube_iframe',
+
+ youtube: {
+ autoplay: 0,
+ controls: 0,
+ disablekb: 1,
+ end: 0,
+ loop: 0,
+ modestbranding: 0,
+ playsinline: 0,
+ rel: 0,
+ showinfo: 0,
+ start: 0,
+ iv_load_policy: 3,
+
+ nocookie: false,
+
+ imageQuality: null
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var youtube = {},
+ apiStack = [],
+ readyState = 4;
+
+ var youTubeApi = null,
+ paused = true,
+ ended = false,
+ youTubeIframe = null,
+ volume = 1;
+
+ youtube.options = options;
+ youtube.id = mediaElement.id + '_' + options.prefix;
+ youtube.mediaElement = mediaElement;
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['get' + capName] = function () {
+ if (youTubeApi !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ return youTubeApi.getCurrentTime();
+ case 'duration':
+ return youTubeApi.getDuration();
+ case 'volume':
+ volume = youTubeApi.getVolume() / 100;
+ return volume;
+ case 'playbackRate':
+ return youTubeApi.getPlaybackRate();
+ case 'paused':
+ return paused;
+ case 'ended':
+ return ended;
+ case 'muted':
+ return youTubeApi.isMuted();
+ case 'buffered':
+ var percentLoaded = youTubeApi.getVideoLoadedFraction(),
+ duration = youTubeApi.getDuration();
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return percentLoaded * duration;
+ },
+ length: 1
+ };
+ case 'src':
+ return youTubeApi.getVideoUrl();
+ case 'readyState':
+ return readyState;
+ }
+
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ youtube['set' + capName] = function (value) {
+ if (youTubeApi !== null) {
+ switch (propName) {
+ case 'src':
+ var url = typeof value === 'string' ? value : value[0].src,
+ _videoId = YouTubeApi.getYouTubeId(url);
+
+ if (mediaElement.originalNode.autoplay) {
+ youTubeApi.loadVideoById(_videoId);
+ } else {
+ youTubeApi.cueVideoById(_videoId);
+ }
+ break;
+ case 'currentTime':
+ youTubeApi.seekTo(value);
+ break;
+ case 'muted':
+ if (value) {
+ youTubeApi.mute();
+ } else {
+ youTubeApi.unMute();
+ }
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'volume':
+ volume = value;
+ youTubeApi.setVolume(value * 100);
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'playbackRate':
+ youTubeApi.setPlaybackRate(value);
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('ratechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'readyState':
+ var event = (0, _general.createEvent)('canplay', youtube);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ youtube[methodName] = function () {
+ if (youTubeApi !== null) {
+ switch (methodName) {
+ case 'play':
+ paused = false;
+ return youTubeApi.playVideo();
+ case 'pause':
+ paused = true;
+ return youTubeApi.pauseVideo();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var errorHandler = function errorHandler(error) {
+ var message = '';
+ switch (error.data) {
+ case 2:
+ message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
+ break;
+ case 5:
+ message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
+ break;
+ case 100:
+ message = 'The video requested was not found. Either video has been removed or has been marked as private.';
+ break;
+ case 101:
+ case 105:
+ message = 'The owner of the requested video does not allow it to be played in embedded players.';
+ break;
+ default:
+ message = 'Unknown error.';
+ break;
+ }
+ mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
+ };
+
+ var youtubeContainer = _document2.default.createElement('div');
+ youtubeContainer.id = youtube.id;
+
+ if (youtube.options.youtube.nocookie) {
+ mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
+ }
+
+ mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+
+ var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
+ height = isAudio ? '1' : mediaElement.originalNode.height,
+ width = isAudio ? '1' : mediaElement.originalNode.width,
+ videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
+ youtubeSettings = {
+ id: youtube.id,
+ containerId: youtubeContainer.id,
+ videoId: videoId,
+ height: height,
+ width: width,
+ host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
+ playerVars: Object.assign({
+ controls: 0,
+ rel: 0,
+ disablekb: 1,
+ showinfo: 0,
+ modestbranding: 0,
+ html5: 1,
+ iv_load_policy: 3
+ }, youtube.options.youtube),
+ origin: _window2.default.location.host,
+ events: {
+ onReady: function onReady(e) {
+ mediaElement.youTubeApi = youTubeApi = e.target;
+ mediaElement.youTubeState = {
+ paused: true,
+ ended: false
+ };
+
+ if (apiStack.length) {
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
+
+ var stackItem = apiStack[_i2];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ youtube[stackItem.methodName]();
+ }
+ }
+ }
+
+ youTubeIframe = youTubeApi.getIframe();
+
+ if (mediaElement.originalNode.muted) {
+ youTubeApi.mute();
+ }
+
+ var events = ['mouseover', 'mouseout'],
+ assignEvents = function assignEvents(e) {
+ var newEvent = (0, _general.createEvent)(e.type, youtube);
+ mediaElement.dispatchEvent(newEvent);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ youTubeIframe.addEventListener(events[_i3], assignEvents, false);
+ }
+
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
+ var event = (0, _general.createEvent)(initEvents[_i4], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onStateChange: function onStateChange(e) {
+ var events = [];
+
+ switch (e.data) {
+ case -1:
+ events = ['loadedmetadata'];
+ paused = true;
+ ended = false;
+ break;
+ case 0:
+ events = ['ended'];
+ paused = false;
+ ended = !youtube.options.youtube.loop;
+ if (!youtube.options.youtube.loop) {
+ youtube.stopInterval();
+ }
+ break;
+ case 1:
+ events = ['play', 'playing'];
+ paused = false;
+ ended = false;
+ youtube.startInterval();
+ break;
+ case 2:
+ events = ['pause'];
+ paused = true;
+ ended = false;
+ youtube.stopInterval();
+ break;
+ case 3:
+ events = ['progress'];
+ ended = false;
+ break;
+ case 5:
+ events = ['loadeddata', 'loadedmetadata', 'canplay'];
+ paused = true;
+ ended = false;
+ break;
+ }
+
+ for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
+ var event = (0, _general.createEvent)(events[_i5], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onError: function onError(e) {
+ return errorHandler(e);
+ }
+ }
+ };
+
+ if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
+ youtubeSettings.playerVars.playsinline = 1;
+ }
+
+ if (mediaElement.originalNode.controls) {
+ youtubeSettings.playerVars.controls = 1;
+ }
+ if (mediaElement.originalNode.autoplay) {
+ youtubeSettings.playerVars.autoplay = 1;
+ }
+ if (mediaElement.originalNode.loop) {
+ youtubeSettings.playerVars.loop = 1;
+ }
+
+ if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
+ youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ }
+
+ YouTubeApi.enqueueIframe(youtubeSettings);
+
+ youtube.onEvent = function (eventName, player, _youTubeState) {
+ if (_youTubeState !== null && _youTubeState !== undefined) {
+ mediaElement.youTubeState = _youTubeState;
+ }
+ };
+
+ youtube.setSize = function (width, height) {
+ if (youTubeApi !== null) {
+ youTubeApi.setSize(width, height);
+ }
+ };
+ youtube.hide = function () {
+ youtube.stopInterval();
+ youtube.pause();
+ if (youTubeIframe) {
+ youTubeIframe.style.display = 'none';
+ }
+ };
+ youtube.show = function () {
+ if (youTubeIframe) {
+ youTubeIframe.style.display = '';
+ }
+ };
+ youtube.destroy = function () {
+ youTubeApi.destroy();
+ };
+ youtube.interval = null;
+
+ youtube.startInterval = function () {
+ youtube.interval = setInterval(function () {
+ var event = (0, _general.createEvent)('timeupdate', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 250);
+ };
+ youtube.stopInterval = function () {
+ if (youtube.interval) {
+ clearInterval(youtube.interval);
+ }
+ };
+ youtube.getPosterUrl = function () {
+ var quality = options.youtube.imageQuality,
+ resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
+ id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
+ };
+
+ return youtube;
+ }
+};
+
+_window2.default.onYouTubePlayerAPIReady = function () {
+ YouTubeApi.iFrameReady();
+};
+
+_media.typeChecks.push(function (url) {
+ return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
+ );
+});
+
+_renderer.renderer.add(YouTubeIframeRenderer);
+
+},{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NAV = exports.NAV = _window2.default.navigator;
+var UA = exports.UA = NAV.userAgent.toLowerCase();
+var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
+var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
+var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
+var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
+var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
+var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
+var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
+var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
+var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
+var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
+var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
+ var element = _document2.default.createElement('x'),
+ documentElement = _document2.default.documentElement,
+ getComputedStyle = _window2.default.getComputedStyle;
+
+ if (!('pointerEvents' in element.style)) {
+ return false;
+ }
+
+ element.style.pointerEvents = 'auto';
+ element.style.pointerEvents = 'x';
+ documentElement.appendChild(element);
+ var supports = getComputedStyle && (getComputedStyle(element, '') || {}).pointerEvents === 'auto';
+ element.remove();
+ return !!supports;
+}();
+
+var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
+ var supportsPassive = false;
+ try {
+ var opts = Object.defineProperty({}, 'passive', {
+ get: function get() {
+ supportsPassive = true;
+ }
+ });
+ _window2.default.addEventListener('test', null, opts);
+ } catch (e) {}
+
+ return supportsPassive;
+}();
+
+var html5Elements = ['source', 'track', 'audio', 'video'];
+var video = void 0;
+
+for (var i = 0, total = html5Elements.length; i < total; i++) {
+ video = _document2.default.createElement(html5Elements[i]);
+}
+
+var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_IE && /edge/i.test(UA);
+
+var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;
+
+var hasNativeFullscreen = video.requestFullscreen !== undefined;
+
+if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
+ hasNativeFullscreen = false;
+ hasiOSFullScreen = false;
+}
+
+var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
+var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
+var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
+var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
+var nativeFullScreenEnabled = hasTrueNativeFullScreen;
+var fullScreenEventName = '';
+var isFullScreen = void 0,
+ requestFullScreen = void 0,
+ cancelFullScreen = void 0;
+
+if (hasMozNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
+} else if (hasMsNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
+}
+
+if (IS_CHROME) {
+ hasiOSFullScreen = false;
+}
+
+if (hasTrueNativeFullScreen) {
+ if (hasWebkitNativeFullScreen) {
+ fullScreenEventName = 'webkitfullscreenchange';
+ } else if (hasMozNativeFullScreen) {
+ fullScreenEventName = 'fullscreenchange';
+ } else if (hasMsNativeFullScreen) {
+ fullScreenEventName = 'MSFullscreenChange';
+ }
+
+ exports.isFullScreen = isFullScreen = function isFullScreen() {
+ if (hasMozNativeFullScreen) {
+ return _document2.default.mozFullScreen;
+ } else if (hasWebkitNativeFullScreen) {
+ return _document2.default.webkitIsFullScreen;
+ } else if (hasMsNativeFullScreen) {
+ return _document2.default.msFullscreenElement !== null;
+ }
+ };
+
+ exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
+ if (hasWebkitNativeFullScreen) {
+ el.webkitRequestFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ el.msRequestFullscreen();
+ }
+ };
+
+ exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
+ if (hasWebkitNativeFullScreen) {
+ _document2.default.webkitCancelFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ _document2.default.mozCancelFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ _document2.default.msExitFullscreen();
+ }
+ };
+}
+
+var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
+var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
+var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
+var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
+var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
+var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
+var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
+var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
+exports.isFullScreen = isFullScreen;
+exports.requestFullScreen = requestFullScreen;
+exports.cancelFullScreen = cancelFullScreen;
+
+
+_mejs2.default.Features = _mejs2.default.Features || {};
+_mejs2.default.Features.isiPad = IS_IPAD;
+_mejs2.default.Features.isiPod = IS_IPOD;
+_mejs2.default.Features.isiPhone = IS_IPHONE;
+_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
+_mejs2.default.Features.isAndroid = IS_ANDROID;
+_mejs2.default.Features.isIE = IS_IE;
+_mejs2.default.Features.isEdge = IS_EDGE;
+_mejs2.default.Features.isChrome = IS_CHROME;
+_mejs2.default.Features.isFirefox = IS_FIREFOX;
+_mejs2.default.Features.isSafari = IS_SAFARI;
+_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
+_mejs2.default.Features.hasMSE = HAS_MSE;
+_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
+_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
+_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
+_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
+_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
+_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
+_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
+_mejs2.default.Features.isFullScreen = isFullScreen;
+_mejs2.default.Features.requestFullScreen = requestFullScreen;
+_mejs2.default.Features.cancelFullScreen = cancelFullScreen;
+
+},{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.removeClass = exports.addClass = exports.hasClass = undefined;
+exports.loadScript = loadScript;
+exports.offset = offset;
+exports.toggleClass = toggleClass;
+exports.fadeOut = fadeOut;
+exports.fadeIn = fadeIn;
+exports.siblings = siblings;
+exports.visible = visible;
+exports.ajax = ajax;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function loadScript(url) {
+ return new Promise(function (resolve, reject) {
+ var script = _document2.default.createElement('script');
+ script.src = url;
+ script.async = true;
+ script.onload = function () {
+ script.remove();
+ resolve();
+ };
+ script.onerror = function () {
+ script.remove();
+ reject();
+ };
+ _document2.default.head.appendChild(script);
+ });
+}
+
+function offset(el) {
+ var rect = el.getBoundingClientRect(),
+ scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
+ scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
+ return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
+}
+
+var hasClassMethod = void 0,
+ addClassMethod = void 0,
+ removeClassMethod = void 0;
+
+if ('classList' in _document2.default.documentElement) {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return el.classList !== undefined && el.classList.contains(className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ return el.classList.add(className);
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ return el.classList.remove(className);
+ };
+} else {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return new RegExp('\\b' + className + '\\b').test(el.className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ if (!hasClass(el, className)) {
+ el.className += ' ' + className;
+ }
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
+ };
+}
+
+var hasClass = exports.hasClass = hasClassMethod;
+var addClass = exports.addClass = addClassMethod;
+var removeClass = exports.removeClass = removeClassMethod;
+
+function toggleClass(el, className) {
+ hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
+}
+
+function fadeOut(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 1;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(1 - progress / duration, 2);
+ el.style.opacity = opacity < 0 ? 0 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function fadeIn(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 0;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(progress / duration, 2);
+ el.style.opacity = opacity > 1 ? 1 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function siblings(el, filter) {
+ var siblings = [];
+ el = el.parentNode.firstChild;
+ do {
+ if (!filter || filter(el)) {
+ siblings.push(el);
+ }
+ } while (el = el.nextSibling);
+ return siblings;
+}
+
+function visible(elem) {
+ if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
+ return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
+ }
+ return !!(elem.offsetWidth || elem.offsetHeight);
+}
+
+function ajax(url, dataType, success, error) {
+ var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
+
+ var type = 'application/x-www-form-urlencoded; charset=UTF-8',
+ completed = false,
+ accept = '*/'.concat('*');
+
+ switch (dataType) {
+ case 'text':
+ type = 'text/plain';
+ break;
+ case 'json':
+ type = 'application/json, text/javascript';
+ break;
+ case 'html':
+ type = 'text/html';
+ break;
+ case 'xml':
+ type = 'application/xml, text/xml';
+ break;
+ }
+
+ if (type !== 'application/x-www-form-urlencoded') {
+ accept = type + ', */*; q=0.01';
+ }
+
+ if (xhr) {
+ xhr.open('GET', url, true);
+ xhr.setRequestHeader('Accept', accept);
+ xhr.onreadystatechange = function () {
+ if (completed) {
+ return;
+ }
+
+ if (xhr.readyState === 4) {
+ if (xhr.status === 200) {
+ completed = true;
+ var data = void 0;
+ switch (dataType) {
+ case 'json':
+ data = JSON.parse(xhr.responseText);
+ break;
+ case 'xml':
+ data = xhr.responseXML;
+ break;
+ default:
+ data = xhr.responseText;
+ break;
+ }
+ success(data);
+ } else if (typeof error === 'function') {
+ error(xhr.status);
+ }
+ }
+ };
+
+ xhr.send();
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.offset = offset;
+_mejs2.default.Utils.hasClass = hasClass;
+_mejs2.default.Utils.addClass = addClass;
+_mejs2.default.Utils.removeClass = removeClass;
+_mejs2.default.Utils.toggleClass = toggleClass;
+_mejs2.default.Utils.fadeIn = fadeIn;
+_mejs2.default.Utils.fadeOut = fadeOut;
+_mejs2.default.Utils.siblings = siblings;
+_mejs2.default.Utils.visible = visible;
+_mejs2.default.Utils.ajax = ajax;
+_mejs2.default.Utils.loadScript = loadScript;
+
+},{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.escapeHTML = escapeHTML;
+exports.debounce = debounce;
+exports.isObjectEmpty = isObjectEmpty;
+exports.splitEvents = splitEvents;
+exports.createEvent = createEvent;
+exports.isNodeAfter = isNodeAfter;
+exports.isString = isString;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function escapeHTML(input) {
+
+ if (typeof input !== 'string') {
+ throw new Error('Argument passed must be a string');
+ }
+
+ var map = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;'
+ };
+
+ return input.replace(/[&<>"]/g, function (c) {
+ return map[c];
+ });
+}
+
+function debounce(func, wait) {
+ var _this = this,
+ _arguments = arguments;
+
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+
+ if (typeof func !== 'function') {
+ throw new Error('First argument must be a function');
+ }
+
+ if (typeof wait !== 'number') {
+ throw new Error('Second argument must be a numeric value');
+ }
+
+ var timeout = void 0;
+ return function () {
+ var context = _this,
+ args = _arguments;
+ var later = function later() {
+ timeout = null;
+ if (!immediate) {
+ func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+
+ if (callNow) {
+ func.apply(context, args);
+ }
+ };
+}
+
+function isObjectEmpty(instance) {
+ return Object.getOwnPropertyNames(instance).length <= 0;
+}
+
+function splitEvents(events, id) {
+ var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
+
+ var ret = { d: [], w: [] };
+ (events || '').split(' ').forEach(function (v) {
+ var eventName = '' + v + (id ? '.' + id : '');
+
+ if (eventName.startsWith('.')) {
+ ret.d.push(eventName);
+ ret.w.push(eventName);
+ } else {
+ ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
+ }
+ });
+
+ ret.d = ret.d.join(' ');
+ ret.w = ret.w.join(' ');
+ return ret;
+}
+
+function createEvent(eventName, target) {
+
+ if (typeof eventName !== 'string') {
+ throw new Error('Event name must be a string');
+ }
+
+ var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
+ detail = {
+ target: target
+ };
+
+ if (eventFrags !== null) {
+ eventName = eventFrags[1];
+ detail.namespace = eventFrags[2];
+ }
+
+ return new window.CustomEvent(eventName, {
+ detail: detail
+ });
+}
+
+function isNodeAfter(sourceNode, targetNode) {
+
+ return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
+}
+
+function isString(value) {
+ return typeof value === 'string';
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.escapeHTML = escapeHTML;
+_mejs2.default.Utils.debounce = debounce;
+_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
+_mejs2.default.Utils.splitEvents = splitEvents;
+_mejs2.default.Utils.createEvent = createEvent;
+_mejs2.default.Utils.isNodeAfter = isNodeAfter;
+_mejs2.default.Utils.isString = isString;
+
+},{"7":7}],19:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.typeChecks = undefined;
+exports.absolutizeUrl = absolutizeUrl;
+exports.formatType = formatType;
+exports.getMimeFromType = getMimeFromType;
+exports.getTypeFromFile = getTypeFromFile;
+exports.getExtension = getExtension;
+exports.normalizeExtension = normalizeExtension;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(18);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var typeChecks = exports.typeChecks = [];
+
+function absolutizeUrl(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var el = document.createElement('div');
+ el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
+ return el.firstChild.href;
+}
+
+function formatType(url) {
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+
+ return url && !type ? getTypeFromFile(url) : type;
+}
+
+function getMimeFromType(type) {
+
+ if (typeof type !== 'string') {
+ throw new Error('`type` argument must be a string');
+ }
+
+ return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
+}
+
+function getTypeFromFile(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ for (var i = 0, total = typeChecks.length; i < total; i++) {
+ var type = typeChecks[i](url);
+
+ if (type) {
+ return type;
+ }
+ }
+
+ var ext = getExtension(url),
+ normalizedExt = normalizeExtension(ext);
+
+ var mime = 'video/mp4';
+
+ if (normalizedExt) {
+ if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
+ mime = 'video/' + normalizedExt;
+ } else if ('mov' === normalizedExt) {
+ mime = 'video/quicktime';
+ } else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
+ mime = 'audio/' + normalizedExt;
+ }
+ }
+
+ return mime;
+}
+
+function getExtension(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var baseUrl = url.split('?')[0],
+ baseName = baseUrl.split('\\').pop().split('/').pop();
+ return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
+}
+
+function normalizeExtension(extension) {
+
+ if (typeof extension !== 'string') {
+ throw new Error('`extension` argument must be a string');
+ }
+
+ switch (extension) {
+ case 'mp4':
+ case 'm4v':
+ return 'mp4';
+ case 'webm':
+ case 'webma':
+ case 'webmv':
+ return 'webm';
+ case 'ogg':
+ case 'oga':
+ case 'ogv':
+ return 'ogg';
+ default:
+ return extension;
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.typeChecks = typeChecks;
+_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
+_mejs2.default.Utils.formatType = formatType;
+_mejs2.default.Utils.getMimeFromType = getMimeFromType;
+_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
+_mejs2.default.Utils.getExtension = getExtension;
+_mejs2.default.Utils.normalizeExtension = normalizeExtension;
+
+},{"18":18,"7":7}],20:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _promisePolyfill = _dereq_(4);
+
+var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('remove')) {
+ return;
+ }
+ Object.defineProperty(item, 'remove', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function remove() {
+ this.parentNode.removeChild(this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+
+(function () {
+
+ if (typeof window.CustomEvent === 'function') {
+ return false;
+ }
+
+ function CustomEvent(event, params) {
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
+ var evt = _document2.default.createEvent('CustomEvent');
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
+ return evt;
+ }
+
+ CustomEvent.prototype = window.Event.prototype;
+ window.CustomEvent = CustomEvent;
+})();
+
+if (typeof Object.assign !== 'function') {
+ Object.assign = function (target) {
+
+ if (target === null || target === undefined) {
+ throw new TypeError('Cannot convert undefined or null to object');
+ }
+
+ var to = Object(target);
+
+ for (var index = 1, total = arguments.length; index < total; index++) {
+ var nextSource = arguments[index];
+
+ if (nextSource !== null) {
+ for (var nextKey in nextSource) {
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ }
+ return to;
+ };
+}
+
+if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function (searchString, position) {
+ position = position || 0;
+ return this.substr(position, searchString.length) === searchString;
+ };
+}
+
+if (!Element.prototype.matches) {
+ Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = matches.length - 1;
+ while (--i >= 0 && matches.item(i) !== this) {}
+ return i > -1;
+ };
+}
+
+if (window.Element && !Element.prototype.closest) {
+ Element.prototype.closest = function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = void 0,
+ el = this;
+ do {
+ i = matches.length;
+ while (--i >= 0 && matches.item(i) !== el) {}
+ } while (i < 0 && (el = el.parentElement));
+ return el;
+ };
+}
+
+(function () {
+ var lastTime = 0;
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
+ for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
+ window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
+ var currTime = new Date().getTime();
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function () {
+ callback(currTime + timeToCall);
+ }, timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
+ clearTimeout(id);
+ };
+})();
+
+if (/firefox/i.test(navigator.userAgent)) {
+ var getComputedStyle = window.getComputedStyle;
+ window.getComputedStyle = function (el, pseudoEl) {
+ var t = getComputedStyle(el, pseudoEl);
+ return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
+ };
+}
+
+if (!window.Promise) {
+ window.Promise = _promisePolyfill2.default;
+}
+
+(function (constructor) {
+ if (constructor && constructor.prototype && constructor.prototype.children === null) {
+ Object.defineProperty(constructor.prototype, 'children', {
+ get: function get() {
+ var i = 0,
+ node = void 0,
+ nodes = this.childNodes,
+ children = [];
+ while (node = nodes[i++]) {
+ if (node.nodeType === 1) {
+ children.push(node);
+ }
+ }
+ return children;
+ }
+ });
+ }
+})(window.Node || window.Element);
+
+},{"2":2,"4":4}]},{},[20,6,5,9,14,11,10,12,13,15]);
diff --git a/wp-includes/js/mediaelement/mediaelement.min.js b/wp-includes/js/mediaelement/mediaelement.min.js
new file mode 100644
index 0000000..5a0a55b
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelement.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function i(o,l,s){function d(n,e){if(!l[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=l[n]={exports:{}};o[n][0].call(a.exports,function(e){var t=o[n][1][e];return d(t||e)},a,a.exports,i,o,l,s)}return l[n].exports}for(var u="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({1:[function(e,t,n){},{}],2:[function(a,i,e){(function(e){var t,n=void 0!==e?e:"undefined"!=typeof window?window:{},r=a(1);"undefined"!=typeof document?t=document:(t=n["__GLOBAL_DOCUMENT_CACHE@4"])||(t=n["__GLOBAL_DOCUMENT_CACHE@4"]=r),i.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,n,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){!function(e){var t=setTimeout;function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(e,this)}function a(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e=1===n._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(e){return void l(r.promise,e)}o(r.promise,t)}else(1===n._state?o:l)(r.promise,n._value)})):n._deferreds.push(r)}function o(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void d((r=n,a=e,function(){r.apply(a,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(e){l(t,e)}var r,a}function l(e,t){e._state=2,e._value=t,s(e)}function s(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function d(e,t){var n=!1;try{e(function(e){n||(n=!0,o(t,e))},function(e){n||(n=!0,l(t,e))})}catch(e){if(n)return;n=!0,l(t,e)}}i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},i.all=function(e){var l=Array.prototype.slice.call(e);return new i(function(r,a){if(0===l.length)return r([]);var i=l.length;function o(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){o(t,e)},a)}l[t]=e,0==--i&&r(l)}catch(e){a(e)}}for(var e=0;e<l.length;e++)o(e,l[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(a){return new i(function(e,t){for(var n=0,r=a.length;n<r;n++)a[n].then(e,t)})},i._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==n&&n.exports?n.exports=i:e.Promise||(e.Promise=i)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e(7),i=(r=a)&&r.__esModule?r:{default:r},l=e(9),s=e(18);var d={lang:"en",en:l.EN,language:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!=t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");d.lang=t[0],void 0===d[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])?t[1]:{},d[t[0]]=(0,s.isObjectEmpty)(t[1])?l.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])&&(d[t[0]]=t[1])}return d.lang},t:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,r=void 0,a=d.language(),i=function(e,t,n){return"object"!==(void 0===e?"undefined":o(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||0<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:6<(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:3<=(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:11<=(arguments.length<=0?void 0:arguments[0])%100?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||1<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:10<(arguments.length<=0?void 0:arguments[0])%100&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2<=(arguments.length<=0?void 0:arguments[0])%10&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||20<=(arguments.length<=0?void 0:arguments[0])%100)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==d[a]&&(n=d[a][e],null!==t&&"number"==typeof t&&(r=d[a]["mejs.plural-form"],n=i.apply(null,[n,t,r]))),!n&&d.en&&(n=d.en[e],null!==t&&"number"==typeof t&&(r=d.en["mejs.plural-form"],n=i.apply(null,[n,t,r]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,s.escapeHTML)(n)}return e}};i.default.i18n=d,"undefined"!=typeof mejsL10n&&i.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=d},{18:18,7:7,9:9}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O=r(e(3)),C=r(e(2)),I=r(e(7)),k=e(18),U=e(19),M=e(8),R=e(16);function r(e){return e&&e.__esModule?e:{default:e}}var a=function e(t,n,r){var c=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var f=this;r=Array.isArray(r)?r:null,f.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(f.defaults,n),f.mediaElement=C.default.createElement(n.fakeNodeName);var a=t,i=!1;if("string"==typeof t?f.mediaElement.originalNode=C.default.getElementById(t):a=(f.mediaElement.originalNode=t).id,void 0===f.mediaElement.originalNode||null===f.mediaElement.originalNode)return null;f.mediaElement.options=n,a=a||"mejs_"+Math.random().toString().slice(2),f.mediaElement.originalNode.setAttribute("id",a+"_from_mejs");var o=f.mediaElement.originalNode.tagName.toLowerCase();-1<["video","audio"].indexOf(o)&&!f.mediaElement.originalNode.getAttribute("preload")&&f.mediaElement.originalNode.setAttribute("preload","none"),f.mediaElement.originalNode.parentNode.insertBefore(f.mediaElement,f.mediaElement.originalNode),f.mediaElement.appendChild(f.mediaElement.originalNode);var l=function(t,e){if("https:"===O.default.location.protocol&&0===t.indexOf("http:")&&R.IS_IOS&&-1<I.default.html5media.mediaTypes.indexOf(e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var e=(O.default.URL||O.default.webkitURL).createObjectURL(this.response);return f.mediaElement.originalNode.setAttribute("src",e),e}return t},n.open("GET",t),n.responseType="blob",n.send()}return t},s=void 0;if(null!==r)s=r;else if(null!==f.mediaElement.originalNode)switch(s=[],f.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":s.push({type:"",src:f.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var d=f.mediaElement.originalNode.children.length,u=f.mediaElement.originalNode.getAttribute("src");if(u){var m=f.mediaElement.originalNode,p=(0,U.formatType)(u,m.getAttribute("type"));s.push({type:p,src:l(u,p)})}for(var h=0;h<d;h++){var v=f.mediaElement.originalNode.children[h];if("source"===v.tagName.toLowerCase()){var g=v.getAttribute("src"),y=(0,U.formatType)(g,v.getAttribute("type"));s.push({type:y,src:l(g,y)})}}}f.mediaElement.id=a,f.mediaElement.renderers={},f.mediaElement.events={},f.mediaElement.promises=[],f.mediaElement.renderer=null,f.mediaElement.rendererName=null,f.mediaElement.changeRenderer=function(e,t){var n=c,r=2<Object.keys(t[0]).length?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(r),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var a=n.mediaElement.renderers[e],i=null;if(null!=a)return a.show(),a.setSrc(r),n.mediaElement.renderer=a,n.mediaElement.rendererName=e,!0;for(var o=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:M.renderer.order,l=0,s=o.length;l<s;l++){var d=o[l];if(d===e){i=M.renderer.renderers[d];var u=Object.assign(i.options,n.mediaElement.options);return(a=i.create(n.mediaElement,u,t)).name=e,n.mediaElement.renderers[i.name]=a,n.mediaElement.renderer=a,n.mediaElement.rendererName=e,a.show(),!0}}return!1},f.mediaElement.setSize=function(e,t){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&f.mediaElement.renderer.setSize(e,t)},f.mediaElement.generateError=function(e,t){e=e||"",t=Array.isArray(t)?t:[];var n=(0,k.createEvent)("error",f.mediaElement);n.message=e,n.urls=t,f.mediaElement.dispatchEvent(n),i=!0};var E=I.default.html5media.properties,b=I.default.html5media.methods,w=function(t,e,n,r){var a=t[e];Object.defineProperty(t,e,{get:function(){return n.apply(t,[a])},set:function(e){return a=r.apply(t,[e])}})},_=function(e){if("src"!==e){var t=""+e.substring(0,1).toUpperCase()+e.substring(1),n=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["get"+t]?f.mediaElement.renderer["get"+t]():null},r=function(e){void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer["set"+t]&&f.mediaElement.renderer["set"+t](e)};w(f.mediaElement,e,n,r),f.mediaElement["get"+t]=n,f.mediaElement["set"+t]=r}},S=function(){return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer?f.mediaElement.renderer.getSrc():null},N=function(e){var t=[];if("string"==typeof e)t.push({src:e,type:e?(0,U.getTypeFromFile)(e):""});else if("object"===(void 0===e?"undefined":L(e))&&void 0!==e.src){var n=(0,U.absolutizeUrl)(e.src),r=e.type,a=Object.assign(e,{src:n,type:""!==r&&null!=r||!n?r:(0,U.getTypeFromFile)(n)});t.push(a)}else if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++){var l=(0,U.absolutizeUrl)(e[i].src),s=e[i].type,d=Object.assign(e[i],{src:l,type:""!==s&&null!=s||!l?s:(0,U.getTypeFromFile)(l)});t.push(d)}var u=M.renderer.select(t,f.mediaElement.options.renderers.length?f.mediaElement.options.renderers:[]),c=void 0;if(f.mediaElement.paused||null==f.mediaElement.src||""===f.mediaElement.src||(f.mediaElement.pause(),c=(0,k.createEvent)("pause",f.mediaElement),f.mediaElement.dispatchEvent(c)),f.mediaElement.originalNode.src=t[0].src||"",null!==u||!t[0].src)return!(null==t[0].src||""===t[0].src)?f.mediaElement.changeRenderer(u.rendererName,t):null;f.mediaElement.generateError("No renderer found",t)},j=function(e,t){try{if("play"!==e||"native_dash"!==f.mediaElement.rendererName&&"native_hls"!==f.mediaElement.rendererName&&"vimeo_iframe"!==f.mediaElement.rendererName)f.mediaElement.renderer[e](t);else{var n=f.mediaElement.renderer[e](t);n&&"function"==typeof n.then&&n.catch(function(){f.mediaElement.paused&&setTimeout(function(){var e=f.mediaElement.renderer.play();void 0!==e&&e.catch(function(){f.mediaElement.renderer.paused||f.mediaElement.renderer.pause()})},150)})}}catch(e){f.mediaElement.generateError(e,s)}},A=function(r){f.mediaElement[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return void 0!==f.mediaElement.renderer&&null!==f.mediaElement.renderer&&"function"==typeof f.mediaElement.renderer[r]&&(f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){j(r,t)}).catch(function(e){f.mediaElement.generateError(e,s)}):j(r,t)),null}};w(f.mediaElement,"src",S,N),f.mediaElement.getSrc=S,f.mediaElement.setSrc=N;for(var T=0,F=E.length;T<F;T++)_(E[T]);for(var P=0,x=b.length;P<x;P++)A(b[P]);return f.mediaElement.addEventListener=function(e,t){f.mediaElement.events[e]=f.mediaElement.events[e]||[],f.mediaElement.events[e].push(t)},f.mediaElement.removeEventListener=function(e,t){if(!e)return f.mediaElement.events={},!0;var n=f.mediaElement.events[e];if(!n)return!0;if(!t)return f.mediaElement.events[e]=[],!0;for(var r=0;r<n.length;r++)if(n[r]===t)return f.mediaElement.events[e].splice(r,1),!0;return!1},f.mediaElement.dispatchEvent=function(e){var t=f.mediaElement.events[e.type];if(t)for(var n=0;n<t.length;n++)t[n].apply(null,[e])},f.mediaElement.destroy=function(){var e=f.mediaElement.originalNode.cloneNode(!0),t=f.mediaElement.parentElement;e.removeAttribute("id"),e.remove(),f.mediaElement.remove(),t.appendChild(e)},s.length&&(f.mediaElement.src=s),f.mediaElement.promises.length?Promise.all(f.mediaElement.promises).then(function(){f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode)}).catch(function(){i&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)}):(f.mediaElement.options.success&&f.mediaElement.options.success(f.mediaElement,f.mediaElement.originalNode),i&&f.mediaElement.options.error&&f.mediaElement.options.error(f.mediaElement,f.mediaElement.originalNode)),f.mediaElement};O.default.MediaElement=a,I.default.MediaElement=a,n.default=a},{16:16,18:18,19:19,2:2,3:3,7:7,8:8}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,a=e(3);var i={version:"4.2.17",html5media:{properties:["volume","src","currentTime","muted","duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable","currentSrc","preload","bufferedBytes","bufferedTime","initialTime","startOffsetTime","defaultPlaybackRate","playbackRate","played","autoplay","loop","controls"],readOnlyProperties:["duration","paused","ended","buffered","error","networkState","readyState","seeking","seekable"],methods:["load","play","pause","canPlayType"],events:["loadstart","durationchange","loadedmetadata","loadeddata","progress","canplay","canplaythrough","suspend","abort","error","emptied","stalled","play","playing","pause","waiting","seeking","seeked","timeupdate","ended","ratechange","volumechange"],mediaTypes:["audio/mp3","audio/ogg","audio/oga","audio/wav","audio/x-wav","audio/wave","audio/x-pn-wav","audio/mpeg","audio/mp4","video/mp4","video/webm","video/ogg","video/ogv"]}};((r=a)&&r.__esModule?r:{default:r}).default.mejs=i,n.default=i},{3:3}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderer=void 0;var r,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),o=e(7),l=(r=o)&&r.__esModule?r:{default:r};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return i(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var r=[/^(html5|native)/i,/^flash/i,/iframe$/i],a=function(e){for(var t=0,n=r.length;t<n;t++)if(r[t].test(e))return t;return r.length};t.sort(function(e,t){return a(e)-a(t)})}for(var i=0,o=t.length;i<o;i++){var l=t[i],s=this.renderers[l];if(null!=s)for(var d=0,u=e.length;d<u;d++)if("function"==typeof s.canPlayType&&"string"==typeof e[d].type&&s.canPlayType(e[d].type))return{rendererName:s.name,src:e[d].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":a(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),d=n.renderer=new s;l.default.Renderers=d},{7:7}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.EN={"mejs.plural-form":1,"mejs.download-file":"Download File","mejs.install-flash":"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/","mejs.fullscreen":"Fullscreen","mejs.play":"Play","mejs.pause":"Pause","mejs.time-slider":"Time Slider","mejs.time-help-text":"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.","mejs.live-broadcast":"Live Broadcast","mejs.volume-help-text":"Use Up/Down Arrow keys to increase or decrease volume.","mejs.unmute":"Unmute","mejs.mute":"Mute","mejs.volume-slider":"Volume Slider","mejs.video-player":"Video Player","mejs.audio-player":"Audio Player","mejs.captions-subtitles":"Captions/Subtitles","mejs.captions-chapters":"Chapters","mejs.none":"None","mejs.afrikaans":"Afrikaans","mejs.albanian":"Albanian","mejs.arabic":"Arabic","mejs.belarusian":"Belarusian","mejs.bulgarian":"Bulgarian","mejs.catalan":"Catalan","mejs.chinese":"Chinese","mejs.chinese-simplified":"Chinese (Simplified)","mejs.chinese-traditional":"Chinese (Traditional)","mejs.croatian":"Croatian","mejs.czech":"Czech","mejs.danish":"Danish","mejs.dutch":"Dutch","mejs.english":"English","mejs.estonian":"Estonian","mejs.filipino":"Filipino","mejs.finnish":"Finnish","mejs.french":"French","mejs.galician":"Galician","mejs.german":"German","mejs.greek":"Greek","mejs.haitian-creole":"Haitian Creole","mejs.hebrew":"Hebrew","mejs.hindi":"Hindi","mejs.hungarian":"Hungarian","mejs.icelandic":"Icelandic","mejs.indonesian":"Indonesian","mejs.irish":"Irish","mejs.italian":"Italian","mejs.japanese":"Japanese","mejs.korean":"Korean","mejs.latvian":"Latvian","mejs.lithuanian":"Lithuanian","mejs.macedonian":"Macedonian","mejs.malay":"Malay","mejs.maltese":"Maltese","mejs.norwegian":"Norwegian","mejs.persian":"Persian","mejs.polish":"Polish","mejs.portuguese":"Portuguese","mejs.romanian":"Romanian","mejs.russian":"Russian","mejs.serbian":"Serbian","mejs.slovak":"Slovak","mejs.slovenian":"Slovenian","mejs.spanish":"Spanish","mejs.swahili":"Swahili","mejs.swedish":"Swedish","mejs.tagalog":"Tagalog","mejs.thai":"Thai","mejs.turkish":"Turkish","mejs.ukrainian":"Ukrainian","mejs.vietnamese":"Vietnamese","mejs.welsh":"Welsh","mejs.yiddish":"Yiddish"}},{}],10:[function(e,t,n){"use strict";var b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=o(e(3)),_=o(e(7)),S=e(8),N=e(18),r=e(19),a=e(16),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var j={promise:null,load:function(e){return"undefined"!=typeof dashjs?j.promise=new Promise(function(e){e()}).then(function(){j._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.dashjs.org/latest/dash.all.min.js",j.promise=j.promise||(0,i.loadScript)(e.options.path),j.promise.then(function(){j._createPlayer(e)})),j.promise},_createPlayer:function(e){var t=dashjs.MediaPlayer().create();return w.default["__ready__"+e.id](t),t}},l={name:"native_dash",options:{prefix:"native_dash",dash:{path:"https://cdn.dashjs.org/latest/dash.all.min.js",debug:!1,drm:{},robustnessLevel:""}},canPlayType:function(e){return a.HAS_MSE&&-1<["application/dash+xml"].indexOf(e.toLowerCase())},create:function(l,s,e){var t=l.originalNode,i=l.id+"_"+s.prefix,o=t.autoplay,n=t.children,d=null,u=null;t.removeAttribute("type");for(var r=0,a=n.length;r<a;r++)n[r].removeAttribute("type");d=t.cloneNode(!0),s=Object.assign(s,l.options);for(var c=_.default.html5media.properties,f=_.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),m=function(e){var t=(0,N.createEvent)(e.type,l);l.dispatchEvent(t)},p=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);d["get"+e]=function(){return null!==u?d[a]:null},d["set"+e]=function(e){if(-1===_.default.html5media.readOnlyProperties.indexOf(a))if("src"===a){var t="object"===(void 0===e?"undefined":b(e))&&e.src?e.src:e;if(d[a]=t,null!==u){u.reset();for(var n=0,r=f.length;n<r;n++)d.removeEventListener(f[n],m);u=j._createPlayer({options:s.dash,id:i}),e&&"object"===(void 0===e?"undefined":b(e))&&"object"===b(e.drm)&&(u.setProtectionData(e.drm),(0,N.isString)(s.dash.robustnessLevel)&&s.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(s.dash.robustnessLevel)),u.attachSource(t),o&&u.play()}}else d[a]=e}},h=0,v=c.length;h<v;h++)p(c[h]);if(w.default["__ready__"+i]=function(e){l.dashPlayer=u=e;for(var t,n=dashjs.MediaPlayer.events,r=0,a=f.length;r<a;r++)"loadedmetadata"===(t=f[r])&&(u.initialize(),u.attachView(d),u.setAutoPlay(!1),"object"!==b(s.dash.drm)||_.default.Utils.isObjectEmpty(s.dash.drm)||(u.setProtectionData(s.dash.drm),(0,N.isString)(s.dash.robustnessLevel)&&s.dash.robustnessLevel&&u.getProtectionController().setRobustnessLevel(s.dash.robustnessLevel)),u.attachSource(d.getSrc())),d.addEventListener(t,m);var i=function(e){if("error"===e.type.toLowerCase())l.generateError(e.message,d.src),console.error(e);else{var t=(0,N.createEvent)(e.type,l);t.data=e,l.dispatchEvent(t)}};for(var o in n)n.hasOwnProperty(o)&&u.on(n[o],function(e){return i(e)})},e&&0<e.length)for(var g=0,y=e.length;g<y;g++)if(S.renderer.renderers[s.prefix].canPlayType(e[g].type)){d.setAttribute("src",e[g].src),void 0!==e[g].drm&&(s.dash.drm=e[g].drm);break}d.setAttribute("id",i),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none",d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return d.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.reset()};var E=(0,N.createEvent)("rendererready",d);return l.dispatchEvent(E),l.promises.push(j.load({options:s.dash,id:i})),d}};r.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".mpd")?"application/dash+xml":null}),S.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PluginDetector=void 0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A=r(e(3)),T=r(e(2)),F=r(e(7)),P=r(e(5)),x=e(8),L=e(18),O=e(16),C=e(19);function r(e){return e&&e.__esModule?e:{default:e}}var i=n.PluginDetector={plugins:[],hasPluginVersion:function(e,t){var n=i.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,n[0]>t[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,r,a){i.plugins[e]=i.detectPlugin(t,n,r,a)},detectPlugin:function(e,t,n,r){var a=[0,0,0],i=void 0,o=void 0;if(null!==O.NAV.plugins&&void 0!==O.NAV.plugins&&"object"===d(O.NAV.plugins[e])){if((i=O.NAV.plugins[e].description)&&(void 0===O.NAV.mimeTypes||!O.NAV.mimeTypes[t]||O.NAV.mimeTypes[t].enabledPlugin))for(var l=0,s=(a=i.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;l<s;l++)a[l]=parseInt(a[l].match(/\d+/),10)}else if(void 0!==A.default.ActiveXObject)try{(o=new ActiveXObject(n))&&(a=r(o))}catch(e){}return a}};i.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(e){var t=[],n=e.GetVariable("$version");return n&&(n=n.split(" ")[1].split(","),t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]),t});var a={create:function(e,t,n){var i={},r=!1;i.options=t,i.id=e.id+"_"+i.options.prefix,i.mediaElement=e,i.flashState={},i.flashApi=null,i.flashApiStack=[];for(var a=F.default.html5media.properties,o=function(t){i.flashState[t]=null;var e=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+e]=function(){if(null!==i.flashApi){if("function"==typeof i.flashApi["get_"+t]){var e=i.flashApi["get_"+t]();return"buffered"===t?{start:function(){return 0},end:function(){return e},length:1}:e}return null}return null},i["set"+e]=function(e){if("src"===t&&(e=(0,C.absolutizeUrl)(e)),null!==i.flashApi&&void 0!==i.flashApi["set_"+t])try{i.flashApi["set_"+t](e)}catch(e){}else i.flashApiStack.push({type:"set",propName:t,value:e})}},l=0,s=a.length;l<s;l++)o(a[l]);var d=F.default.html5media.methods,u=function(e){i[e]=function(){if(r)if(null!==i.flashApi){if(i.flashApi["fire_"+e])try{i.flashApi["fire_"+e]()}catch(e){}}else i.flashApiStack.push({type:"call",methodName:e})}};d.push("stop");for(var c=0,f=d.length;c<f;c++)u(d[c]);for(var m=["rendererready"],p=0,h=m.length;p<h;p++){var v=(0,L.createEvent)(m[p],i);e.dispatchEvent(v)}A.default["__ready__"+i.id]=function(){if(i.flashReady=!0,i.flashApi=T.default.getElementById("__"+i.id),i.flashApiStack.length)for(var e=0,t=i.flashApiStack.length;e<t;e++){var n=i.flashApiStack[e];if("set"===n.type){var r=n.propName,a=""+r.substring(0,1).toUpperCase()+r.substring(1);i["set"+a](n.value)}else"call"===n.type&&i[n.methodName]()}},A.default["__event__"+i.id]=function(e,t){var n=(0,L.createEvent)(e,i);if(t)try{n.data=JSON.parse(t),n.details.data=JSON.parse(t)}catch(e){n.message=t}i.mediaElement.dispatchEvent(n)},i.flashWrapper=T.default.createElement("div"),-1===["always","sameDomain"].indexOf(i.options.shimScriptAccess)&&(i.options.shimScriptAccess="sameDomain");var g=e.originalNode.autoplay,y=["uid="+i.id,"autoplay="+g,"allowScriptAccess="+i.options.shimScriptAccess,"preload="+(e.originalNode.getAttribute("preload")||"")],E=null!==e.originalNode&&"video"===e.originalNode.tagName.toLowerCase(),b=E?e.originalNode.height:1,w=E?e.originalNode.width:1;e.originalNode.getAttribute("src")&&y.push("src="+e.originalNode.getAttribute("src")),!0===i.options.enablePseudoStreaming&&(y.push("pseudostreamstart="+i.options.pseudoStreamingStartQueryParam),y.push("pseudostreamtype="+i.options.pseudoStreamingType)),i.options.streamDelimiter&&y.push("streamdelimiter="+encodeURIComponent(i.options.streamDelimiter)),i.options.proxyType&&y.push("proxytype="+i.options.proxyType),e.appendChild(i.flashWrapper),e.originalNode.style.display="none";var _=[];if(O.IS_IE||O.IS_EDGE){var S=T.default.createElement("div");i.flashWrapper.appendChild(S),_=O.IS_EDGE?['type="application/x-shockwave-flash"','data="'+i.options.pluginPath+i.options.filename+'"','id="__'+i.id+'"','width="'+w+'"','height="'+b+"'\""]:['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"','codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"','id="__'+i.id+'"','width="'+w+'"','height="'+b+'"'],E||_.push('style="clip: rect(0 0 0 0); position: absolute;"'),S.outerHTML="<object "+_.join(" ")+'><param name="movie" value="'+i.options.pluginPath+i.options.filename+"?x="+new Date+'" /><param name="flashvars" value="'+y.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+i.options.shimScriptAccess+'" /><param name="allowFullScreen" value="true" /><div>'+P.default.t("mejs.install-flash")+"</div></object>"}else _=['id="__'+i.id+'"','name="__'+i.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+i.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+i.options.pluginPath+i.options.filename+'"','flashvars="'+y.join("&")+'"'],E?(_.push('width="'+w+'"'),_.push('height="'+b+'"')):_.push('style="position: fixed; left: -9999em; top: -9999em;"'),i.flashWrapper.innerHTML="<embed "+_.join(" ")+">";if(i.flashNode=i.flashWrapper.lastChild,i.hide=function(){r=!1,E&&(i.flashNode.style.display="none")},i.show=function(){r=!0,E&&(i.flashNode.style.display="")},i.setSize=function(e,t){i.flashNode.style.width=e+"px",i.flashNode.style.height=t+"px",null!==i.flashApi&&"function"==typeof i.flashApi.fire_setSize&&i.flashApi.fire_setSize(e,t)},i.destroy=function(){i.flashNode.remove()},n&&0<n.length)for(var N=0,j=n.length;N<j;N++)if(x.renderer.renderers[t.prefix].canPlayType(n[N].type)){i.setSrc(n[N].src);break}return i}};if(i.hasPluginVersion("flash",[10,0,0])){C.typeChecks.push(function(e){return(e=e.toLowerCase()).startsWith("rtmp")?~e.indexOf(".mp3")?"audio/rtmp":"video/rtmp":/\.og(a|g)/i.test(e)?"audio/ogg":~e.indexOf(".m3u8")?"application/x-mpegURL":~e.indexOf(".mpd")?"application/dash+xml":~e.indexOf(".flv")?"video/flv":null});var o={name:"flash_video",options:{prefix:"flash_video",filename:"mediaelement-flash-video.swf",enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",pseudoStreamingType:"byte",proxyType:"",streamDelimiter:""},canPlayType:function(e){return~["video/mp4","video/rtmp","audio/rtmp","rtmp/mp4","audio/mp4","video/flv","video/x-flv"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(o);var l={name:"flash_hls",options:{prefix:"flash_hls",filename:"mediaelement-flash-video-hls.swf"},canPlayType:function(e){return~["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(l);var s={name:"flash_dash",options:{prefix:"flash_dash",filename:"mediaelement-flash-video-mdash.swf"},canPlayType:function(e){return~["application/dash+xml"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(s);var u={name:"flash_audio",options:{prefix:"flash_audio",filename:"mediaelement-flash-audio.swf"},canPlayType:function(e){return~["audio/mp3"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(u);var c={name:"flash_audio_ogg",options:{prefix:"flash_audio_ogg",filename:"mediaelement-flash-audio-ogg.swf"},canPlayType:function(e){return~["audio/ogg","audio/oga","audio/ogv"].indexOf(e.toLowerCase())},create:a.create};x.renderer.add(c)}},{16:16,18:18,19:19,2:2,3:3,5:5,7:7,8:8}],12:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=o(e(3)),b=o(e(7)),w=e(8),_=e(18),r=e(16),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var S={promise:null,load:function(e){return"undefined"!=typeof flvjs?S.promise=new Promise(function(e){e()}).then(function(){S._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/flv.js@latest",S.promise=S.promise||(0,i.loadScript)(e.options.path),S.promise.then(function(){S._createPlayer(e)})),S.promise},_createPlayer:function(e){flvjs.LoggingControl.enableDebug=e.options.debug,flvjs.LoggingControl.enableVerbose=e.options.debug;var t=flvjs.createPlayer(e.options,e.configs);return E.default["__ready__"+e.id](t),t}},l={name:"native_flv",options:{prefix:"native_flv",flv:{path:"https://cdn.jsdelivr.net/npm/flv.js@latest",cors:!0,debug:!1}},canPlayType:function(e){return r.HAS_MSE&&-1<["video/x-flv","video/flv"].indexOf(e.toLowerCase())},create:function(l,o,e){var t=l.originalNode,s=l.id+"_"+o.prefix,d=null,u=null;d=t.cloneNode(!0),o=Object.assign(o,l.options);for(var n=b.default.html5media.properties,c=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=function(e){var t=(0,_.createEvent)(e.type,l);l.dispatchEvent(t)},r=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);d["get"+e]=function(){return null!==u?d[i]:null},d["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(i))if("src"===i){if(d[i]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==u){var t={type:"flv"};t.url=e,t.cors=o.flv.cors,t.debug=o.flv.debug,t.path=o.flv.path;var n=o.flv.configs;u.destroy();for(var r=0,a=c.length;r<a;r++)d.removeEventListener(c[r],f);(u=S._createPlayer({options:t,configs:n,id:s})).attachMediaElement(d),u.load()}}else d[i]=e}},a=0,i=n.length;a<i;a++)r(n[a]);if(E.default["__ready__"+s]=function(e){l.flvPlayer=u=e;for(var t,a=flvjs.Events,n=0,r=c.length;n<r;n++)"loadedmetadata"===(t=c[n])&&(u.unload(),u.detachMediaElement(),u.attachMediaElement(d),u.load()),d.addEventListener(t,f);var i=function(r){a.hasOwnProperty(r)&&u.on(a[r],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("error"===e){var n=t[0]+": "+t[1]+" "+t[2].msg;l.generateError(n,d.src)}else{var r=(0,_.createEvent)(e,l);r.data=t,l.dispatchEvent(r)}}(a[r],t)})};for(var o in a)i(o)},e&&0<e.length)for(var m=0,p=e.length;m<p;m++)if(w.renderer.renderers[o.prefix].canPlayType(e[m].type)){d.setAttribute("src",e[m].src);break}d.setAttribute("id",s),t.parentNode.insertBefore(d,t),t.autoplay=!1,t.style.display="none";var h={type:"flv"};h.url=d.src,h.cors=o.flv.cors,h.debug=o.flv.debug,h.path=o.flv.path;var v=o.flv.configs;d.setSize=function(e,t){return d.style.width=e+"px",d.style.height=t+"px",d},d.hide=function(){return null!==u&&u.pause(),d.style.display="none",d},d.show=function(){return d.style.display="",d},d.destroy=function(){null!==u&&u.destroy()};var g=(0,_.createEvent)("rendererready",d);return l.dispatchEvent(g),l.promises.push(S.load({options:h,configs:v,id:s})),d}};a.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".flv")?"video/flv":null}),w.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],13:[function(e,t,n){"use strict";var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E=o(e(3)),b=o(e(7)),w=e(8),_=e(18),r=e(16),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var S={promise:null,load:function(e){return"undefined"!=typeof Hls?S.promise=new Promise(function(e){e()}).then(function(){S._createPlayer(e)}):(e.options.path="string"==typeof e.options.path?e.options.path:"https://cdn.jsdelivr.net/npm/hls.js@latest",S.promise=S.promise||(0,i.loadScript)(e.options.path),S.promise.then(function(){S._createPlayer(e)})),S.promise},_createPlayer:function(e){var t=new Hls(e.options);return E.default["__ready__"+e.id](t),t}},l={name:"native_hls",options:{prefix:"native_hls",hls:{path:"https://cdn.jsdelivr.net/npm/hls.js@latest",autoStartLoad:!1,debug:!1}},canPlayType:function(e){return r.HAS_MSE&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())},create:function(d,a,u){var e=d.originalNode,i=d.id+"_"+a.prefix,t=e.getAttribute("preload"),n=e.autoplay,c=null,f=null,m=0,p=u.length;f=e.cloneNode(!0),(a=Object.assign(a,d.options)).hls.autoStartLoad=t&&"none"!==t||n;for(var r=b.default.html5media.properties,h=b.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),v=function(e){var t=(0,_.createEvent)(e.type,d);d.dispatchEvent(t)},o=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);f["get"+e]=function(){return null!==c?f[r]:null},f["set"+e]=function(e){if(-1===b.default.html5media.readOnlyProperties.indexOf(r))if("src"===r){if(f[r]="object"===(void 0===e?"undefined":y(e))&&e.src?e.src:e,null!==c){c.destroy();for(var t=0,n=h.length;t<n;t++)f.removeEventListener(h[t],v);(c=S._createPlayer({options:a.hls,id:i})).loadSource(e),c.attachMedia(f)}}else f[r]=e}},l=0,s=r.length;l<s;l++)o(r[l]);if(E.default["__ready__"+i]=function(e){d.hlsPlayer=c=e;for(var a=Hls.Events,t=function(e){if("loadedmetadata"===e){var t=d.originalNode.src;c.detachMedia(),c.loadSource(t),c.attachMedia(f)}f.addEventListener(e,v)},n=0,r=h.length;n<r;n++)t(h[n]);var l=void 0,s=void 0,i=function(r){a.hasOwnProperty(r)&&c.on(a[r],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t){if("hlsError"===e&&(console.warn(t),(t=t[1]).fatal))switch(t.type){case"mediaError":var n=(new Date).getTime();if(!l||3e3<n-l)l=(new Date).getTime(),c.recoverMediaError();else if(!s||3e3<n-s)s=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),c.swapAudioCodec(),c.recoverMediaError();else{var r="Cannot recover, last media error recovery failed";d.generateError(r,f.src),console.error(r)}break;case"networkError":if("manifestLoadError"===t.details)if(m<p&&void 0!==u[m+1])f.setSrc(u[m++].src),f.load(),f.play();else{var a="Network error";d.generateError(a,u),console.error(a)}else{var i="Network error";d.generateError(i,u),console.error(i)}break;default:c.destroy()}else{var o=(0,_.createEvent)(e,d);o.data=t,d.dispatchEvent(o)}}(a[r],t)})};for(var o in a)i(o)},0<p)for(;m<p;m++)if(w.renderer.renderers[a.prefix].canPlayType(u[m].type)){f.setAttribute("src",u[m].src);break}"auto"===t||n||(f.addEventListener("play",function(){null!==c&&c.startLoad()}),f.addEventListener("pause",function(){null!==c&&c.stopLoad()})),f.setAttribute("id",i),e.parentNode.insertBefore(f,e),e.autoplay=!1,e.style.display="none",f.setSize=function(e,t){return f.style.width=e+"px",f.style.height=t+"px",f},f.hide=function(){return f.pause(),f.style.display="none",f},f.show=function(){return f.style.display="",f},f.destroy=function(){null!==c&&(c.stopLoad(),c.destroy())};var g=(0,_.createEvent)("rendererready",f);return d.dispatchEvent(g),d.promises.push(S.load({options:a.hls,id:i})),f}};a.typeChecks.push(function(e){return~e.toLowerCase().indexOf(".m3u8")?"application/x-mpegURL":null}),w.renderer.add(l)},{16:16,17:17,18:18,19:19,3:3,7:7,8:8}],14:[function(e,t,n){"use strict";var r=i(e(3)),g=i(e(2)),y=i(e(7)),E=e(8),b=e(18),a=e(16);function i(e){return e&&e.__esModule?e:{default:e}}var o={name:"html5",options:{prefix:"html5"},canPlayType:function(e){var t=g.default.createElement("video");return a.IS_ANDROID&&/\/mp(3|4)$/i.test(e)||~["application/x-mpegurl","vnd.apple.mpegurl","audio/mpegurl","audio/hls","video/hls"].indexOf(e.toLowerCase())&&a.SUPPORTS_NATIVE_HLS?"yes":t.canPlayType?t.canPlayType(e.toLowerCase()).replace(/no/,""):""},create:function(n,e,t){var r=n.id+"_"+e.prefix,a=!1,i=null;void 0===n.originalNode||null===n.originalNode?(i=g.default.createElement("audio"),n.appendChild(i)):i=n.originalNode,i.setAttribute("id",r);for(var o=y.default.html5media.properties,l=function(t){var e=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+e]=function(){return i[t]},i["set"+e]=function(e){-1===y.default.html5media.readOnlyProperties.indexOf(t)&&(i[t]=e)}},s=0,d=o.length;s<d;s++)l(o[s]);for(var u,c=y.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),f=0,m=c.length;f<m;f++)u=c[f],i.addEventListener(u,function(e){if(a){var t=(0,b.createEvent)(e.type,e.target);n.dispatchEvent(t)}});i.setSize=function(e,t){return i.style.width=e+"px",i.style.height=t+"px",i},i.hide=function(){return a=!1,i.style.display="none",i},i.show=function(){return a=!0,i.style.display="",i};var p=0,h=t.length;if(0<h)for(;p<h;p++)if(E.renderer.renderers[e.prefix].canPlayType(t[p].type)){i.setAttribute("src",t[p].src);break}i.addEventListener("error",function(e){e&&e.target&&e.target.error&&4===e.target.error.code&&a&&(p<h&&void 0!==t[p+1]?(i.src=t[p++].src,i.load(),i.play()):n.generateError("Media error: Format(s) not supported or source(s) not found",t))});var v=(0,b.createEvent)("rendererready",i);return n.dispatchEvent(v),i}};r.default.HtmlMediaElement=y.default.HtmlMediaElement=o,E.renderer.add(o)},{16:16,18:18,2:2,3:3,7:7,8:8}],15:[function(e,t,n){"use strict";var S=o(e(3)),N=o(e(2)),j=o(e(7)),r=e(8),A=e(18),a=e(19),i=e(17);function o(e){return e&&e.__esModule?e:{default:e}}var T={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){T.isLoaded="undefined"!=typeof YT&&YT.loaded,T.isLoaded?T.createIframe(e):(T.loadIframeApi(),T.iframeQueue.push(e))},loadIframeApi:function(){T.isIframeStarted||((0,i.loadScript)("https://www.youtube.com/player_api"),T.isIframeStarted=!0)},iFrameReady:function(){for(T.isLoaded=!0,T.isIframeLoaded=!0;0<T.iframeQueue.length;){var e=T.iframeQueue.pop();T.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=T.getYouTubeIdFromParam(e))&&(t=T.getYouTubeIdFromUrl(e)):t=T.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,a=t.length;r<a;r++){var i=t[r].split("=");if("v"===i[0]){n=i[1];break}}return n},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},l={name:"youtube_iframe",options:{prefix:"youtube_iframe",youtube:{autoplay:0,controls:0,disablekb:1,end:0,loop:0,modestbranding:0,playsinline:0,rel:0,showinfo:0,start:0,iv_load_policy:3,nocookie:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(p,n,r){var h={},v=[],g=null,i=!0,o=!1,y=null;h.options=n,h.id=p.id+"_"+n.prefix,h.mediaElement=p;for(var e=j.default.html5media.properties,t=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);h["get"+e]=function(){if(null!==g){switch(a){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return i;case"ended":return o;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==g)switch(a){case"src":var t="string"==typeof e?e:e[0].src,n=T.getYouTubeId(t);p.originalNode.autoplay?g.loadVideoById(n):g.cueVideoById(n);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,A.createEvent)("volumechange",h);p.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,A.createEvent)("volumechange",h);p.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,A.createEvent)("ratechange",h);p.dispatchEvent(e)},50);break;case"readyState":var r=(0,A.createEvent)("canplay",h);p.dispatchEvent(r)}else v.push({type:"set",propName:a,value:e})}},a=0,l=e.length;a<l;a++)t(e[a]);for(var s=j.default.html5media.methods,d=function(e){h[e]=function(){if(null!==g)switch(e){case"play":return i=!1,g.playVideo();case"pause":return i=!0,g.pauseVideo();case"load":return null}else v.push({type:"call",methodName:e})}},u=0,c=s.length;u<c;u++)d(s[u]);var f=N.default.createElement("div");f.id=h.id,h.options.youtube.nocookie&&(p.originalNode.src=T.getYouTubeNoCookieUrl(r[0].src)),p.originalNode.parentNode.insertBefore(f,p.originalNode),p.originalNode.style.display="none";var m="audio"===p.originalNode.tagName.toLowerCase(),E=m?"1":p.originalNode.height,b=m?"1":p.originalNode.width,w=T.getYouTubeId(r[0].src),_={id:h.id,containerId:f.id,videoId:w,height:E,width:b,host:h.options.youtube&&h.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},h.options.youtube),origin:S.default.location.host,events:{onReady:function(e){if(p.youTubeApi=g=e.target,p.youTubeState={paused:!0,ended:!1},v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var a=r.propName,i=""+a.substring(0,1).toUpperCase()+a.substring(1);h["set"+i](r.value)}else"call"===r.type&&h[r.methodName]()}y=g.getIframe(),p.originalNode.muted&&g.mute();for(var o=["mouseover","mouseout"],l=function(e){var t=(0,A.createEvent)(e.type,h);p.dispatchEvent(t)},s=0,d=o.length;s<d;s++)y.addEventListener(o[s],l,!1);for(var u=["rendererready","loadedmetadata","loadeddata","canplay"],c=0,f=u.length;c<f;c++){var m=(0,A.createEvent)(u[c],h);p.dispatchEvent(m)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],i=!0,o=!1;break;case 0:t=["ended"],i=!1,o=!h.options.youtube.loop,h.options.youtube.loop||h.stopInterval();break;case 1:t=["play","playing"],o=i=!1,h.startInterval();break;case 2:t=["pause"],i=!0,o=!1,h.stopInterval();break;case 3:t=["progress"],o=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],i=!0,o=!1}for(var n=0,r=t.length;n<r;n++){var a=(0,A.createEvent)(t[n],h);p.dispatchEvent(a)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.";break;case 5:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}p.generateError("Code "+e.data+": "+t,r)}(e)}}};return(m||p.originalNode.hasAttribute("playsinline"))&&(_.playerVars.playsinline=1),p.originalNode.controls&&(_.playerVars.controls=1),p.originalNode.autoplay&&(_.playerVars.autoplay=1),p.originalNode.loop&&(_.playerVars.loop=1),(_.playerVars.loop&&1===parseInt(_.playerVars.loop,10)||-1<p.originalNode.src.indexOf("loop="))&&!_.playerVars.playlist&&-1===p.originalNode.src.indexOf("playlist=")&&(_.playerVars.playlist=T.getYouTubeId(p.originalNode.src)),T.enqueueIframe(_),h.onEvent=function(e,t,n){null!=n&&(p.youTubeState=n)},h.setSize=function(e,t){null!==g&&g.setSize(e,t)},h.hide=function(){h.stopInterval(),h.pause(),y&&(y.style.display="none")},h.show=function(){y&&(y.style.display="")},h.destroy=function(){g.destroy()},h.interval=null,h.startInterval=function(){h.interval=setInterval(function(){var e=(0,A.createEvent)("timeupdate",h);p.dispatchEvent(e)},250)},h.stopInterval=function(){h.interval&&clearInterval(h.interval)},h.getPosterUrl=function(){var e=n.youtube.imageQuality,t=T.getYouTubeId(p.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},h}};S.default.onYouTubePlayerAPIReady=function(){T.iFrameReady()},a.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),r.renderer.add(l)},{17:17,18:18,19:19,2:2,3:3,7:7,8:8}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;var a=o(e(3)),i=o(e(2)),r=o(e(7));function o(e){return e&&e.__esModule?e:{default:e}}for(var l=n.NAV=a.default.navigator,s=n.UA=l.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(s)&&!a.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(s)&&!a.default.MSStream,c=n.IS_IPOD=/ipod/i.test(s)&&!a.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(s)&&!a.default.MSStream,n.IS_ANDROID=/android/i.test(s)),m=n.IS_IE=/(trident|microsoft)/i.test(l.appName),p=(n.IS_EDGE="msLaunchUri"in l&&!("documentMode"in i.default)),h=n.IS_CHROME=/chrome/i.test(s),v=n.IS_FIREFOX=/firefox/i.test(s),g=n.IS_SAFARI=/safari/i.test(s)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(s),E=(n.HAS_MSE="MediaSource"in a.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=i.default.createElement("x"),t=i.default.documentElement,n=a.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var r=n&&"auto"===(n(e,"")||{}).pointerEvents;return e.remove(),!!r}(),w=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});a.default.addEventListener("test",null,t)}catch(e){}return e}(),_=["source","track","audio","video"],S=void 0,N=0,j=_.length;N<j;N++)S=i.default.createElement(_[N]);var A=n.SUPPORTS_NATIVE_HLS=g||m&&/edge/i.test(s),T=void 0!==S.webkitEnterFullscreen,F=void 0!==S.requestFullscreen;T&&/mac os x 10_5/i.test(s)&&(T=F=!1);var P=void 0!==S.webkitRequestFullScreen,x=void 0!==S.mozRequestFullScreen,L=void 0!==S.msRequestFullscreen,O=P||x||L,C=O,I="",k=void 0,U=void 0,M=void 0;x?C=i.default.mozFullScreenEnabled:L&&(C=i.default.msFullscreenEnabled),h&&(T=!1),O&&(P?I="webkitfullscreenchange":x?I="fullscreenchange":L&&(I="MSFullscreenChange"),n.isFullScreen=k=function(){return x?i.default.mozFullScreen:P?i.default.webkitIsFullScreen:L?null!==i.default.msFullscreenElement:void 0},n.requestFullScreen=U=function(e){P?e.webkitRequestFullScreen():x?e.mozRequestFullScreen():L&&e.msRequestFullscreen()},n.cancelFullScreen=M=function(){P?i.default.webkitCancelFullScreen():x?i.default.mozCancelFullScreen():L&&i.default.msExitFullscreen()});var R=n.HAS_NATIVE_FULLSCREEN=F,V=n.HAS_WEBKIT_NATIVE_FULLSCREEN=P,D=n.HAS_MOZ_NATIVE_FULLSCREEN=x,H=n.HAS_MS_NATIVE_FULLSCREEN=L,q=n.HAS_IOS_FULLSCREEN=T,z=n.HAS_TRUE_NATIVE_FULLSCREEN=O,B=n.HAS_NATIVE_FULLSCREEN_ENABLED=C,Y=n.FULLSCREEN_EVENT_NAME=I;n.isFullScreen=k,n.requestFullScreen=U,n.cancelFullScreen=M,r.default.Features=r.default.Features||{},r.default.Features.isiPad=d,r.default.Features.isiPod=c,r.default.Features.isiPhone=u,r.default.Features.isiOS=r.default.Features.isiPhone||r.default.Features.isiPad,r.default.Features.isAndroid=f,r.default.Features.isIE=m,r.default.Features.isEdge=p,r.default.Features.isChrome=h,r.default.Features.isFirefox=v,r.default.Features.isSafari=g,r.default.Features.isStockAndroid=y,r.default.Features.hasMSE=E,r.default.Features.supportsNativeHLS=A,r.default.Features.supportsPointerEvents=b,r.default.Features.supportsPassiveEvent=w,r.default.Features.hasiOSFullScreen=q,r.default.Features.hasNativeFullscreen=R,r.default.Features.hasWebkitNativeFullScreen=V,r.default.Features.hasMozNativeFullScreen=D,r.default.Features.hasMsNativeFullScreen=H,r.default.Features.hasTrueNativeFullScreen=z,r.default.Features.nativeFullScreenEnabled=B,r.default.Features.fullScreenEventName=Y,r.default.Features.isFullScreen=k,r.default.Features.requestFullScreen=U,r.default.Features.cancelFullScreen=M},{2:2,3:3,7:7}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=o,n.offset=l,n.toggleClass=h,n.fadeOut=v,n.fadeIn=g,n.siblings=y,n.visible=E,n.ajax=b;var s=i(e(3)),a=i(e(2)),r=i(e(7));function i(e){return e&&e.__esModule?e:{default:e}}function o(r){return new Promise(function(e,t){var n=a.default.createElement("script");n.src=r,n.async=!0,n.onload=function(){n.remove(),e()},n.onerror=function(){n.remove(),t()},a.default.head.appendChild(n)})}function l(e){var t=e.getBoundingClientRect(),n=s.default.pageXOffset||a.default.documentElement.scrollLeft,r=s.default.pageYOffset||a.default.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}var d=void 0,u=void 0,c=void 0;"classList"in a.default.documentElement?(d=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},u=function(e,t){return e.classList.add(t)},c=function(e,t){return e.classList.remove(t)}):(d=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},u=function(e,t){f(e,t)||(e.className+=" "+t)},c=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var f=n.hasClass=d,m=n.addClass=u,p=n.removeClass=c;function h(e,t){f(e,t)?p(e,t):m(e,t)}function v(a){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,o=arguments[2];a.style.opacity||(a.style.opacity=1);var l=null;s.default.requestAnimationFrame(function e(t){var n=t-(l=l||t),r=parseFloat(1-n/i,2);a.style.opacity=r<0?0:r,i<n?o&&"function"==typeof o&&o():s.default.requestAnimationFrame(e)})}function g(a){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,o=arguments[2];a.style.opacity||(a.style.opacity=0);var l=null;s.default.requestAnimationFrame(function e(t){var n=t-(l=l||t),r=parseFloat(n/i,2);a.style.opacity=1<r?1:r,i<n?o&&"function"==typeof o&&o():s.default.requestAnimationFrame(e)})}function y(e,t){var n=[];for(e=e.parentNode.firstChild;t&&!t(e)||n.push(e),e=e.nextSibling;);return n}function E(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function b(e,t,n,r){var a=s.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),i="application/x-www-form-urlencoded; charset=UTF-8",o=!1,l="*/".concat("*");switch(t){case"text":i="text/plain";break;case"json":i="application/json, text/javascript";break;case"html":i="text/html";break;case"xml":i="application/xml, text/xml"}"application/x-www-form-urlencoded"!==i&&(l=i+", */*; q=0.01"),a&&(a.open("GET",e,!0),a.setRequestHeader("Accept",l),a.onreadystatechange=function(){if(!o&&4===a.readyState)if(200===a.status){o=!0;var e=void 0;switch(t){case"json":e=JSON.parse(a.responseText);break;case"xml":e=a.responseXML;break;default:e=a.responseText}n(e)}else"function"==typeof r&&r(a.status)},a.send())}r.default.Utils=r.default.Utils||{},r.default.Utils.offset=l,r.default.Utils.hasClass=f,r.default.Utils.addClass=m,r.default.Utils.removeClass=p,r.default.Utils.toggleClass=h,r.default.Utils.fadeIn=g,r.default.Utils.fadeOut=v,r.default.Utils.siblings=y,r.default.Utils.visible=E,r.default.Utils.ajax=b,r.default.Utils.loadScript=o},{2:2,3:3,7:7}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=o,n.debounce=l,n.isObjectEmpty=s,n.splitEvents=d,n.createEvent=u,n.isNodeAfter=c,n.isString=f;var r,a=e(7),i=(r=a)&&r.__esModule?r:{default:r};function o(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};return e.replace(/[&<>"]/g,function(e){return t[e]})}function l(r,a){var i=this,o=arguments,l=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof r)throw new Error("First argument must be a function");if("number"!=typeof a)throw new Error("Second argument must be a numeric value");var s=void 0;return function(){var e=i,t=o,n=l&&!s;clearTimeout(s),s=setTimeout(function(){s=null,l||r.apply(e,t)},a),n&&r.apply(e,t)}}function s(e){return Object.getOwnPropertyNames(e).length<=0}function d(e,n){var r=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,a={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(n?"."+n:"");t.startsWith(".")?(a.d.push(t),a.w.push(t)):a[r.test(e)?"w":"d"].push(t)}),a.d=a.d.join(" "),a.w=a.w.join(" "),a}function u(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),r={target:t};return null!==n&&(e=n[1],r.namespace=n[2]),new window.CustomEvent(e,{detail:r})}function c(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function f(e){return"string"==typeof e}i.default.Utils=i.default.Utils||{},i.default.Utils.escapeHTML=o,i.default.Utils.debounce=l,i.default.Utils.isObjectEmpty=s,i.default.Utils.splitEvents=d,i.default.Utils.createEvent=u,i.default.Utils.isNodeAfter=c,i.default.Utils.isString=f},{7:7}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.typeChecks=void 0,n.absolutizeUrl=s,n.formatType=d,n.getMimeFromType=u,n.getTypeFromFile=c,n.getExtension=f,n.normalizeExtension=m;var r,a=e(7),i=(r=a)&&r.__esModule?r:{default:r},o=e(18);var l=n.typeChecks=[];function s(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,o.escapeHTML)(e)+'">x</a>',t.firstChild.href}function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?c(e):t}function u(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=l.length;t<n;t++){var r=l[t](e);if(r)return r}var a=m(f(e)),i="video/mp4";return a&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(a)?i="video/"+a:"mov"===a?i="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(a)&&(i="audio/"+a)),i}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function m(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}i.default.Utils=i.default.Utils||{},i.default.Utils.typeChecks=l,i.default.Utils.absolutizeUrl=s,i.default.Utils.formatType=d,i.default.Utils.getMimeFromType=u,i.default.Utils.getTypeFromFile=c,i.default.Utils.getExtension=f,i.default.Utils.normalizeExtension=m},{18:18,7:7}],20:[function(e,t,n){"use strict";var r,a=o(e(2)),i=o(e(4));function o(e){return e&&e.__esModule?e:{default:e}}if([Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}),function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=a.default.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n<r;n++){var a=arguments[n];if(null!==a)for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}return t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length-1;0<=--n&&t.item(n)!==this;);return-1<n}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,r=this;do{for(n=t.length;0<=--n&&t.item(n)!==r;);}while(n<0&&(r=r.parentElement));return r}),function(){for(var a=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-a)),r=window.setTimeout(function(){e(t+n)},n);return a=t+n,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),/firefox/i.test(navigator.userAgent)){var l=window.getComputedStyle;window.getComputedStyle=function(e,t){var n=l(e,t);return null===n?{getPropertyValue:function(){}}:n}}window.Promise||(window.Promise=i.default),(r=window.Node||window.Element)&&r.prototype&&null===r.prototype.children&&Object.defineProperty(r.prototype,"children",{get:function(){for(var e=0,t=void 0,n=this.childNodes,r=[];t=n[e++];)1===t.nodeType&&r.push(t);return r}})},{2:2,4:4}]},{},[20,6,5,9,14,11,10,12,13,15]); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelementplayer-legacy.css b/wp-includes/js/mediaelement/mediaelementplayer-legacy.css
new file mode 100644
index 0000000..93114a9
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelementplayer-legacy.css
@@ -0,0 +1,774 @@
+/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages).
+Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
+.mejs-offscreen {
+ border: 0;
+ clip: rect( 1px, 1px, 1px, 1px );
+ -webkit-clip-path: inset( 50% );
+ clip-path: inset( 50% );
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+ word-wrap: normal;
+}
+
+.mejs-container {
+ background: #000;
+ box-sizing: border-box;
+ font-family: 'Helvetica', Arial, serif;
+ position: relative;
+ text-align: left;
+ text-indent: 0;
+ vertical-align: top;
+}
+
+.mejs-container * {
+ box-sizing: border-box;
+}
+
+/* Hide native play button and control bar from iOS to favor plugin button */
+.mejs-container video::-webkit-media-controls,
+.mejs-container video::-webkit-media-controls-panel,
+.mejs-container video::-webkit-media-controls-panel-container,
+.mejs-container video::-webkit-media-controls-start-playback-button {
+ -webkit-appearance: none;
+ display: none !important;
+}
+
+.mejs-fill-container,
+.mejs-fill-container .mejs-container {
+ height: 100%;
+ width: 100%;
+}
+
+.mejs-fill-container {
+ background: transparent;
+ margin: 0 auto;
+ overflow: hidden;
+ position: relative;
+}
+
+.mejs-container:focus {
+ outline: none;
+}
+
+.mejs-iframe-overlay {
+ height: 100%;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs-embed,
+.mejs-embed body {
+ background: #000;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ width: 100%;
+}
+
+.mejs-fullscreen {
+ overflow: hidden !important;
+}
+
+.mejs-container-fullscreen {
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 1000;
+}
+
+.mejs-container-fullscreen .mejs-mediaelement,
+.mejs-container-fullscreen video {
+ height: 100% !important;
+ width: 100% !important;
+}
+
+/* Start: LAYERS */
+.mejs-background {
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs-mediaelement {
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ z-index: 0;
+}
+
+.mejs-poster {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ left: 0;
+ position: absolute;
+ top: 0;
+ z-index: 1;
+}
+
+:root .mejs-poster-img {
+ display: none;
+}
+
+.mejs-poster-img {
+ border: 0;
+ padding: 0;
+}
+
+.mejs-overlay {
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs-layer {
+ z-index: 1;
+}
+
+.mejs-overlay-play {
+ cursor: pointer;
+}
+
+.mejs-overlay-button {
+ background: url('mejs-controls.svg') no-repeat;
+ background-position: 0 -39px;
+ height: 80px;
+ width: 80px;
+}
+
+.mejs-overlay:hover > .mejs-overlay-button {
+ background-position: -80px -39px;
+}
+
+.mejs-overlay-loading {
+ height: 80px;
+ width: 80px;
+}
+
+.mejs-overlay-loading-bg-img {
+ -webkit-animation: mejs-loading-spinner 1s linear infinite;
+ animation: mejs-loading-spinner 1s linear infinite;
+ background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
+ display: block;
+ height: 80px;
+ width: 80px;
+ z-index: 1;
+}
+
+@-webkit-keyframes mejs-loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes mejs-loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+/* End: LAYERS */
+
+/* Start: CONTROL BAR */
+.mejs-controls {
+ bottom: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ height: 40px;
+ left: 0;
+ list-style-type: none;
+ margin: 0;
+ padding: 0 10px;
+ position: absolute;
+ width: 100%;
+ z-index: 3;
+}
+
+.mejs-controls:not([style*='display: none']) {
+ background: rgba(255, 0, 0, 0.7);
+ background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+}
+
+.mejs-button,
+.mejs-time,
+.mejs-time-rail {
+ font-size: 10px;
+ height: 40px;
+ line-height: 10px;
+ margin: 0;
+ width: 32px;
+}
+
+.mejs-button > button {
+ background: transparent url('mejs-controls.svg');
+ border: 0;
+ cursor: pointer;
+ display: block;
+ font-size: 0;
+ height: 20px;
+ line-height: 0;
+ margin: 10px 6px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ text-decoration: none;
+ width: 20px;
+}
+
+/* :focus for accessibility */
+.mejs-button > button:focus {
+ outline: dotted 1px #999;
+}
+
+.mejs-container-keyboard-inactive a,
+.mejs-container-keyboard-inactive a:focus,
+.mejs-container-keyboard-inactive button,
+.mejs-container-keyboard-inactive button:focus,
+.mejs-container-keyboard-inactive [role=slider],
+.mejs-container-keyboard-inactive [role=slider]:focus {
+ outline: 0;
+}
+
+/* End: CONTROL BAR */
+
+/* Start: Time (Current / Duration) */
+.mejs-time {
+ box-sizing: content-box;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ height: 24px;
+ overflow: hidden;
+ padding: 16px 6px 0;
+ text-align: center;
+ width: auto;
+}
+
+/* End: Time (Current / Duration) */
+
+/* Start: Play/Pause/Stop */
+.mejs-play > button {
+ background-position: 0 0;
+}
+
+.mejs-pause > button {
+ background-position: -20px 0;
+}
+
+.mejs-replay > button {
+ background-position: -160px 0;
+}
+
+/* End: Play/Pause/Stop */
+
+/* Start: Progress Bar */
+.mejs-time-rail {
+ direction: ltr;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ height: 40px;
+ margin: 0 10px;
+ padding-top: 10px;
+ position: relative;
+}
+
+.mejs-time-total,
+.mejs-time-buffering,
+.mejs-time-loaded,
+.mejs-time-current,
+.mejs-time-float,
+.mejs-time-hovered,
+.mejs-time-float-current,
+.mejs-time-float-corner,
+.mejs-time-marker {
+ border-radius: 2px;
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ position: absolute;
+}
+
+.mejs-time-total {
+ background: rgba(255, 255, 255, 0.3);
+ margin: 5px 0 0;
+ width: 100%;
+}
+
+.mejs-time-buffering {
+ -webkit-animation: buffering-stripes 2s linear infinite;
+ animation: buffering-stripes 2s linear infinite;
+ background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background-size: 15px 15px;
+ width: 100%;
+}
+
+@-webkit-keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+@keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+.mejs-time-loaded {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.mejs-time-current,
+.mejs-time-handle-content {
+ background: rgba(255, 255, 255, 0.9);
+}
+
+.mejs-time-hovered {
+ background: rgba(255, 255, 255, 0.5);
+ z-index: 10;
+}
+
+.mejs-time-hovered.negative {
+ background: rgba(0, 0, 0, 0.2);
+}
+
+.mejs-time-current,
+.mejs-time-buffering,
+.mejs-time-loaded,
+.mejs-time-hovered {
+ left: 0;
+ -webkit-transform: scaleX(0);
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-transition: 0.15s ease-in all;
+ transition: 0.15s ease-in all;
+ width: 100%;
+}
+
+.mejs-time-buffering {
+ -webkit-transform: scaleX(1);
+ -ms-transform: scaleX(1);
+ transform: scaleX(1);
+}
+
+.mejs-time-hovered {
+ -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+ transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+}
+
+.mejs-time-hovered.no-hover {
+ -webkit-transform: scaleX(0) !important;
+ -ms-transform: scaleX(0) !important;
+ transform: scaleX(0) !important;
+}
+
+.mejs-time-handle,
+.mejs-time-handle-content {
+ border: 4px solid transparent;
+ cursor: pointer;
+ left: 0;
+ position: absolute;
+ -webkit-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ z-index: 11;
+}
+
+.mejs-time-handle-content {
+ border: 4px solid rgba(255, 255, 255, 0.9);
+ border-radius: 50%;
+ height: 10px;
+ left: -7px;
+ top: -4px;
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
+ width: 10px;
+}
+
+.mejs-time-rail:hover .mejs-time-handle-content,
+.mejs-time-rail .mejs-time-handle-content:focus,
+.mejs-time-rail .mejs-time-handle-content:active {
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
+}
+
+.mejs-time-float {
+ background: #eee;
+ border: solid 1px #333;
+ bottom: 100%;
+ color: #111;
+ display: none;
+ height: 17px;
+ margin-bottom: 9px;
+ position: absolute;
+ text-align: center;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 36px;
+}
+
+.mejs-time-float-current {
+ display: block;
+ left: 0;
+ margin: 2px;
+ text-align: center;
+ width: 30px;
+}
+
+.mejs-time-float-corner {
+ border: solid 5px #eee;
+ border-color: #eee transparent transparent;
+ border-radius: 0;
+ display: block;
+ height: 0;
+ left: 50%;
+ line-height: 0;
+ position: absolute;
+ top: 100%;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 0;
+}
+
+.mejs-long-video .mejs-time-float {
+ margin-left: -23px;
+ width: 64px;
+}
+
+.mejs-long-video .mejs-time-float-current {
+ width: 60px;
+}
+
+.mejs-broadcast {
+ color: #fff;
+ height: 10px;
+ position: absolute;
+ top: 15px;
+ width: 100%;
+}
+
+/* End: Progress Bar */
+
+/* Start: Fullscreen */
+.mejs-fullscreen-button > button {
+ background-position: -80px 0;
+}
+
+.mejs-unfullscreen > button {
+ background-position: -100px 0;
+}
+
+/* End: Fullscreen */
+
+/* Start: Mute/Volume */
+.mejs-mute > button {
+ background-position: -60px 0;
+}
+
+.mejs-unmute > button {
+ background-position: -40px 0;
+}
+
+.mejs-volume-button {
+ position: relative;
+}
+
+.mejs-volume-button > .mejs-volume-slider {
+ -webkit-backface-visibility: hidden;
+ background: rgba(50, 50, 50, 0.7);
+ border-radius: 0;
+ bottom: 100%;
+ display: none;
+ height: 115px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 25px;
+ z-index: 1;
+}
+
+.mejs-volume-button:hover {
+ border-radius: 0 0 4px 4px;
+}
+
+.mejs-volume-total {
+ background: rgba(255, 255, 255, 0.5);
+ height: 100px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ top: 8px;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 2px;
+}
+
+.mejs-volume-current {
+ background: rgba(255, 255, 255, 0.9);
+ left: 0;
+ margin: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs-volume-handle {
+ background: rgba(255, 255, 255, 0.9);
+ border-radius: 1px;
+ cursor: ns-resize;
+ height: 6px;
+ left: 50%;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 16px;
+}
+
+.mejs-horizontal-volume-slider {
+ display: block;
+ height: 36px;
+ position: relative;
+ vertical-align: middle;
+ width: 56px;
+}
+
+.mejs-horizontal-volume-total {
+ background: rgba(50, 50, 50, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 8px;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 16px;
+ width: 50px;
+}
+
+.mejs-horizontal-volume-current {
+ background: rgba(255, 255, 255, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.mejs-horizontal-volume-handle {
+ display: none;
+}
+
+/* End: Mute/Volume */
+
+/* Start: Track (Captions and Chapters) */
+.mejs-captions-button,
+.mejs-chapters-button {
+ position: relative;
+}
+
+.mejs-captions-button > button {
+ background-position: -140px 0;
+}
+
+.mejs-chapters-button > button {
+ background-position: -180px 0;
+}
+
+.mejs-captions-button > .mejs-captions-selector,
+.mejs-chapters-button > .mejs-chapters-selector {
+ background: rgba(50, 50, 50, 0.7);
+ border: solid 1px transparent;
+ border-radius: 0;
+ bottom: 100%;
+ margin-right: -43px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ right: 50%;
+ visibility: visible;
+ width: 86px;
+}
+
+.mejs-chapters-button > .mejs-chapters-selector {
+ margin-right: -55px;
+ width: 110px;
+}
+
+.mejs-captions-selector-list,
+.mejs-chapters-selector-list {
+ list-style-type: none !important;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs-captions-selector-list-item,
+.mejs-chapters-selector-list-item {
+ color: #fff;
+ cursor: pointer;
+ display: block;
+ list-style-type: none !important;
+ margin: 0 0 6px;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs-captions-selector-list-item:hover,
+.mejs-chapters-selector-list-item:hover {
+ background-color: rgb(200, 200, 200) !important;
+ background-color: rgba(255, 255, 255, 0.4) !important;
+}
+
+.mejs-captions-selector-input,
+.mejs-chapters-selector-input {
+ clear: both;
+ float: left;
+ left: -1000px;
+ margin: 3px 3px 0 5px;
+ position: absolute;
+}
+
+.mejs-captions-selector-label,
+.mejs-chapters-selector-label {
+ cursor: pointer;
+ float: left;
+ font-size: 10px;
+ line-height: 15px;
+ padding: 4px 10px 0;
+ width: 100%;
+}
+
+.mejs-captions-selected,
+.mejs-chapters-selected {
+ color: rgba(33, 248, 248, 1);
+}
+
+.mejs-captions-translations {
+ font-size: 10px;
+ margin: 0 0 5px;
+}
+
+.mejs-captions-layer {
+ bottom: 0;
+ color: #fff;
+ font-size: 16px;
+ left: 0;
+ line-height: 20px;
+ position: absolute;
+ text-align: center;
+}
+
+.mejs-captions-layer a {
+ color: #fff;
+ text-decoration: underline;
+}
+
+.mejs-captions-layer[lang=ar] {
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.mejs-captions-position {
+ bottom: 15px;
+ left: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs-captions-position-hover {
+ bottom: 35px;
+}
+
+.mejs-captions-text,
+.mejs-captions-text * {
+ background: rgba(20, 20, 20, 0.5);
+ box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
+ padding: 0;
+ white-space: pre-wrap;
+}
+
+.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container {
+ display: none;
+}
+
+/* End: Track (Captions and Chapters) */
+
+/* Start: Error */
+.mejs-overlay-error {
+ position: relative;
+}
+.mejs-overlay-error > img {
+ left: 0;
+ max-width: 100%;
+ position: absolute;
+ top: 0;
+ z-index: -1;
+}
+.mejs-cannotplay,
+.mejs-cannotplay a {
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.mejs-cannotplay {
+ position: relative;
+}
+
+.mejs-cannotplay p,
+.mejs-cannotplay a {
+ display: inline-block;
+ padding: 0 15px;
+ width: 100%;
+}
+/* End: Error */ \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css b/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css
new file mode 100644
index 0000000..2fe2327
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelementplayer-legacy.min.css
@@ -0,0 +1 @@
+.mejs-offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs-container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs-container,.mejs-container *{box-sizing:border-box}.mejs-container video::-webkit-media-controls,.mejs-container video::-webkit-media-controls-panel,.mejs-container video::-webkit-media-controls-panel-container,.mejs-container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs-fill-container,.mejs-fill-container .mejs-container{height:100%;width:100%}.mejs-fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs-container:focus{outline:none}.mejs-iframe-overlay{height:100%;position:absolute;width:100%}.mejs-embed,.mejs-embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{height:100%!important;width:100%!important}.mejs-background,.mejs-mediaelement{left:0;position:absolute;top:0}.mejs-mediaelement{height:100%;width:100%;z-index:0}.mejs-poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs-poster-img{display:none}.mejs-poster-img{border:0;padding:0}.mejs-overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs-layer{z-index:1}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs-overlay:hover>.mejs-overlay-button{background-position:-80px -39px}.mejs-overlay-loading{height:80px;width:80px}.mejs-overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs-controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs-controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs-button,.mejs-time,.mejs-time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs-button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs-button>button:focus{outline:1px dotted #999}.mejs-container-keyboard-inactive [role=slider],.mejs-container-keyboard-inactive [role=slider]:focus,.mejs-container-keyboard-inactive a,.mejs-container-keyboard-inactive a:focus,.mejs-container-keyboard-inactive button,.mejs-container-keyboard-inactive button:focus{outline:0}.mejs-time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs-play>button{background-position:0 0}.mejs-pause>button{background-position:-20px 0}.mejs-replay>button{background-position:-160px 0}.mejs-time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs-time-buffering,.mejs-time-current,.mejs-time-float,.mejs-time-float-corner,.mejs-time-float-current,.mejs-time-hovered,.mejs-time-loaded,.mejs-time-marker,.mejs-time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs-time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs-time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs-time-loaded{background:hsla(0,0%,100%,.3)}.mejs-time-current,.mejs-time-handle-content{background:hsla(0,0%,100%,.9)}.mejs-time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs-time-hovered.negative{background:rgba(0,0,0,.2)}.mejs-time-buffering,.mejs-time-current,.mejs-time-hovered,.mejs-time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs-time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs-time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs-time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs-time-handle,.mejs-time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs-time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs-time-rail .mejs-time-handle-content:active,.mejs-time-rail .mejs-time-handle-content:focus,.mejs-time-rail:hover .mejs-time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs-time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs-time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs-time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs-long-video .mejs-time-float{margin-left:-23px;width:64px}.mejs-long-video .mejs-time-float-current{width:60px}.mejs-broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs-fullscreen-button>button{background-position:-80px 0}.mejs-unfullscreen>button{background-position:-100px 0}.mejs-mute>button{background-position:-60px 0}.mejs-unmute>button{background-position:-40px 0}.mejs-volume-button{position:relative}.mejs-volume-button>.mejs-volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs-volume-button:hover{border-radius:0 0 4px 4px}.mejs-volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs-volume-current{left:0;margin:0;width:100%}.mejs-volume-current,.mejs-volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs-volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs-horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs-horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs-horizontal-volume-current,.mejs-horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs-horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs-horizontal-volume-handle{display:none}.mejs-captions-button,.mejs-chapters-button{position:relative}.mejs-captions-button>button{background-position:-140px 0}.mejs-chapters-button>button{background-position:-180px 0}.mejs-captions-button>.mejs-captions-selector,.mejs-chapters-button>.mejs-chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs-chapters-button>.mejs-chapters-selector{margin-right:-55px;width:110px}.mejs-captions-selector-list,.mejs-chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs-captions-selector-list-item,.mejs-chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs-captions-selector-list-item:hover,.mejs-chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs-captions-selector-input,.mejs-chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs-captions-selector-label,.mejs-chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs-captions-selected,.mejs-chapters-selected{color:#21f8f8}.mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text,.mejs-captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container{display:none}.mejs-overlay-error{position:relative}.mejs-overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs-cannotplay,.mejs-cannotplay a{color:#fff;font-size:.8em}.mejs-cannotplay{position:relative}.mejs-cannotplay a,.mejs-cannotplay p{display:inline-block;padding:0 15px;width:100%} \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelementplayer.css b/wp-includes/js/mediaelement/mediaelementplayer.css
new file mode 100644
index 0000000..7cd9afc
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelementplayer.css
@@ -0,0 +1,774 @@
+/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages).
+Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
+.mejs__offscreen {
+ border: 0;
+ clip: rect( 1px, 1px, 1px, 1px );
+ -webkit-clip-path: inset( 50% );
+ clip-path: inset( 50% );
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+ word-wrap: normal;
+}
+
+.mejs__container {
+ background: #000;
+ box-sizing: border-box;
+ font-family: 'Helvetica', Arial, serif;
+ position: relative;
+ text-align: left;
+ text-indent: 0;
+ vertical-align: top;
+}
+
+.mejs__container * {
+ box-sizing: border-box;
+}
+
+/* Hide native play button and control bar from iOS to favor plugin button */
+.mejs__container video::-webkit-media-controls,
+.mejs__container video::-webkit-media-controls-panel,
+.mejs__container video::-webkit-media-controls-panel-container,
+.mejs__container video::-webkit-media-controls-start-playback-button {
+ -webkit-appearance: none;
+ display: none !important;
+}
+
+.mejs__fill-container,
+.mejs__fill-container .mejs__container {
+ height: 100%;
+ width: 100%;
+}
+
+.mejs__fill-container {
+ background: transparent;
+ margin: 0 auto;
+ overflow: hidden;
+ position: relative;
+}
+
+.mejs__container:focus {
+ outline: none;
+}
+
+.mejs__iframe-overlay {
+ height: 100%;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__embed,
+.mejs__embed body {
+ background: #000;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ width: 100%;
+}
+
+.mejs__fullscreen {
+ overflow: hidden !important;
+}
+
+.mejs__container-fullscreen {
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 1000;
+}
+
+.mejs__container-fullscreen .mejs__mediaelement,
+.mejs__container-fullscreen video {
+ height: 100% !important;
+ width: 100% !important;
+}
+
+/* Start: LAYERS */
+.mejs__background {
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs__mediaelement {
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ z-index: 0;
+}
+
+.mejs__poster {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ left: 0;
+ position: absolute;
+ top: 0;
+ z-index: 1;
+}
+
+:root .mejs__poster-img {
+ display: none;
+}
+
+.mejs__poster-img {
+ border: 0;
+ padding: 0;
+}
+
+.mejs__overlay {
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs__layer {
+ z-index: 1;
+}
+
+.mejs__overlay-play {
+ cursor: pointer;
+}
+
+.mejs__overlay-button {
+ background: url('mejs-controls.svg') no-repeat;
+ background-position: 0 -39px;
+ height: 80px;
+ width: 80px;
+}
+
+.mejs__overlay:hover > .mejs__overlay-button {
+ background-position: -80px -39px;
+}
+
+.mejs__overlay-loading {
+ height: 80px;
+ width: 80px;
+}
+
+.mejs__overlay-loading-bg-img {
+ -webkit-animation: mejs__loading-spinner 1s linear infinite;
+ animation: mejs__loading-spinner 1s linear infinite;
+ background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
+ display: block;
+ height: 80px;
+ width: 80px;
+ z-index: 1;
+}
+
+@-webkit-keyframes mejs__loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes mejs__loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+/* End: LAYERS */
+
+/* Start: CONTROL BAR */
+.mejs__controls {
+ bottom: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ height: 40px;
+ left: 0;
+ list-style-type: none;
+ margin: 0;
+ padding: 0 10px;
+ position: absolute;
+ width: 100%;
+ z-index: 3;
+}
+
+.mejs__controls:not([style*='display: none']) {
+ background: rgba(255, 0, 0, 0.7);
+ background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+}
+
+.mejs__button,
+.mejs__time,
+.mejs__time-rail {
+ font-size: 10px;
+ height: 40px;
+ line-height: 10px;
+ margin: 0;
+ width: 32px;
+}
+
+.mejs__button > button {
+ background: transparent url('mejs-controls.svg');
+ border: 0;
+ cursor: pointer;
+ display: block;
+ font-size: 0;
+ height: 20px;
+ line-height: 0;
+ margin: 10px 6px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ text-decoration: none;
+ width: 20px;
+}
+
+/* :focus for accessibility */
+.mejs__button > button:focus {
+ outline: dotted 1px #999;
+}
+
+.mejs__container-keyboard-inactive a,
+.mejs__container-keyboard-inactive a:focus,
+.mejs__container-keyboard-inactive button,
+.mejs__container-keyboard-inactive button:focus,
+.mejs__container-keyboard-inactive [role=slider],
+.mejs__container-keyboard-inactive [role=slider]:focus {
+ outline: 0;
+}
+
+/* End: CONTROL BAR */
+
+/* Start: Time (Current / Duration) */
+.mejs__time {
+ box-sizing: content-box;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ height: 24px;
+ overflow: hidden;
+ padding: 16px 6px 0;
+ text-align: center;
+ width: auto;
+}
+
+/* End: Time (Current / Duration) */
+
+/* Start: Play/Pause/Stop */
+.mejs__play > button {
+ background-position: 0 0;
+}
+
+.mejs__pause > button {
+ background-position: -20px 0;
+}
+
+.mejs__replay > button {
+ background-position: -160px 0;
+}
+
+/* End: Play/Pause/Stop */
+
+/* Start: Progress Bar */
+.mejs__time-rail {
+ direction: ltr;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ height: 40px;
+ margin: 0 10px;
+ padding-top: 10px;
+ position: relative;
+}
+
+.mejs__time-total,
+.mejs__time-buffering,
+.mejs__time-loaded,
+.mejs__time-current,
+.mejs__time-float,
+.mejs__time-hovered,
+.mejs__time-float-current,
+.mejs__time-float-corner,
+.mejs__time-marker {
+ border-radius: 2px;
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ position: absolute;
+}
+
+.mejs__time-total {
+ background: rgba(255, 255, 255, 0.3);
+ margin: 5px 0 0;
+ width: 100%;
+}
+
+.mejs__time-buffering {
+ -webkit-animation: buffering-stripes 2s linear infinite;
+ animation: buffering-stripes 2s linear infinite;
+ background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background-size: 15px 15px;
+ width: 100%;
+}
+
+@-webkit-keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+@keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+.mejs__time-loaded {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.mejs__time-current,
+.mejs__time-handle-content {
+ background: rgba(255, 255, 255, 0.9);
+}
+
+.mejs__time-hovered {
+ background: rgba(255, 255, 255, 0.5);
+ z-index: 10;
+}
+
+.mejs__time-hovered.negative {
+ background: rgba(0, 0, 0, 0.2);
+}
+
+.mejs__time-current,
+.mejs__time-buffering,
+.mejs__time-loaded,
+.mejs__time-hovered {
+ left: 0;
+ -webkit-transform: scaleX(0);
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-transition: 0.15s ease-in all;
+ transition: 0.15s ease-in all;
+ width: 100%;
+}
+
+.mejs__time-buffering {
+ -webkit-transform: scaleX(1);
+ -ms-transform: scaleX(1);
+ transform: scaleX(1);
+}
+
+.mejs__time-hovered {
+ -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+ transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+}
+
+.mejs__time-hovered.no-hover {
+ -webkit-transform: scaleX(0) !important;
+ -ms-transform: scaleX(0) !important;
+ transform: scaleX(0) !important;
+}
+
+.mejs__time-handle,
+.mejs__time-handle-content {
+ border: 4px solid transparent;
+ cursor: pointer;
+ left: 0;
+ position: absolute;
+ -webkit-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ z-index: 11;
+}
+
+.mejs__time-handle-content {
+ border: 4px solid rgba(255, 255, 255, 0.9);
+ border-radius: 50%;
+ height: 10px;
+ left: -7px;
+ top: -4px;
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
+ width: 10px;
+}
+
+.mejs__time-rail:hover .mejs__time-handle-content,
+.mejs__time-rail .mejs__time-handle-content:focus,
+.mejs__time-rail .mejs__time-handle-content:active {
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
+}
+
+.mejs__time-float {
+ background: #eee;
+ border: solid 1px #333;
+ bottom: 100%;
+ color: #111;
+ display: none;
+ height: 17px;
+ margin-bottom: 9px;
+ position: absolute;
+ text-align: center;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 36px;
+}
+
+.mejs__time-float-current {
+ display: block;
+ left: 0;
+ margin: 2px;
+ text-align: center;
+ width: 30px;
+}
+
+.mejs__time-float-corner {
+ border: solid 5px #eee;
+ border-color: #eee transparent transparent;
+ border-radius: 0;
+ display: block;
+ height: 0;
+ left: 50%;
+ line-height: 0;
+ position: absolute;
+ top: 100%;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 0;
+}
+
+.mejs__long-video .mejs__time-float {
+ margin-left: -23px;
+ width: 64px;
+}
+
+.mejs__long-video .mejs__time-float-current {
+ width: 60px;
+}
+
+.mejs__broadcast {
+ color: #fff;
+ height: 10px;
+ position: absolute;
+ top: 15px;
+ width: 100%;
+}
+
+/* End: Progress Bar */
+
+/* Start: Fullscreen */
+.mejs__fullscreen-button > button {
+ background-position: -80px 0;
+}
+
+.mejs__unfullscreen > button {
+ background-position: -100px 0;
+}
+
+/* End: Fullscreen */
+
+/* Start: Mute/Volume */
+.mejs__mute > button {
+ background-position: -60px 0;
+}
+
+.mejs__unmute > button {
+ background-position: -40px 0;
+}
+
+.mejs__volume-button {
+ position: relative;
+}
+
+.mejs__volume-button > .mejs__volume-slider {
+ -webkit-backface-visibility: hidden;
+ background: rgba(50, 50, 50, 0.7);
+ border-radius: 0;
+ bottom: 100%;
+ display: none;
+ height: 115px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 25px;
+ z-index: 1;
+}
+
+.mejs__volume-button:hover {
+ border-radius: 0 0 4px 4px;
+}
+
+.mejs__volume-total {
+ background: rgba(255, 255, 255, 0.5);
+ height: 100px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ top: 8px;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 2px;
+}
+
+.mejs__volume-current {
+ background: rgba(255, 255, 255, 0.9);
+ left: 0;
+ margin: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__volume-handle {
+ background: rgba(255, 255, 255, 0.9);
+ border-radius: 1px;
+ cursor: ns-resize;
+ height: 6px;
+ left: 50%;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 16px;
+}
+
+.mejs__horizontal-volume-slider {
+ display: block;
+ height: 36px;
+ position: relative;
+ vertical-align: middle;
+ width: 56px;
+}
+
+.mejs__horizontal-volume-total {
+ background: rgba(50, 50, 50, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 8px;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 16px;
+ width: 50px;
+}
+
+.mejs__horizontal-volume-current {
+ background: rgba(255, 255, 255, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.mejs__horizontal-volume-handle {
+ display: none;
+}
+
+/* End: Mute/Volume */
+
+/* Start: Track (Captions and Chapters) */
+.mejs__captions-button,
+.mejs__chapters-button {
+ position: relative;
+}
+
+.mejs__captions-button > button {
+ background-position: -140px 0;
+}
+
+.mejs__chapters-button > button {
+ background-position: -180px 0;
+}
+
+.mejs__captions-button > .mejs__captions-selector,
+.mejs__chapters-button > .mejs__chapters-selector {
+ background: rgba(50, 50, 50, 0.7);
+ border: solid 1px transparent;
+ border-radius: 0;
+ bottom: 100%;
+ margin-right: -43px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ right: 50%;
+ visibility: visible;
+ width: 86px;
+}
+
+.mejs__chapters-button > .mejs__chapters-selector {
+ margin-right: -55px;
+ width: 110px;
+}
+
+.mejs__captions-selector-list,
+.mejs__chapters-selector-list {
+ list-style-type: none !important;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs__captions-selector-list-item,
+.mejs__chapters-selector-list-item {
+ color: #fff;
+ cursor: pointer;
+ display: block;
+ list-style-type: none !important;
+ margin: 0 0 6px;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs__captions-selector-list-item:hover,
+.mejs__chapters-selector-list-item:hover {
+ background-color: rgb(200, 200, 200) !important;
+ background-color: rgba(255, 255, 255, 0.4) !important;
+}
+
+.mejs__captions-selector-input,
+.mejs__chapters-selector-input {
+ clear: both;
+ float: left;
+ left: -1000px;
+ margin: 3px 3px 0 5px;
+ position: absolute;
+}
+
+.mejs__captions-selector-label,
+.mejs__chapters-selector-label {
+ cursor: pointer;
+ float: left;
+ font-size: 10px;
+ line-height: 15px;
+ padding: 4px 10px 0;
+ width: 100%;
+}
+
+.mejs__captions-selected,
+.mejs__chapters-selected {
+ color: rgba(33, 248, 248, 1);
+}
+
+.mejs__captions-translations {
+ font-size: 10px;
+ margin: 0 0 5px;
+}
+
+.mejs__captions-layer {
+ bottom: 0;
+ color: #fff;
+ font-size: 16px;
+ left: 0;
+ line-height: 20px;
+ position: absolute;
+ text-align: center;
+}
+
+.mejs__captions-layer a {
+ color: #fff;
+ text-decoration: underline;
+}
+
+.mejs__captions-layer[lang=ar] {
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.mejs__captions-position {
+ bottom: 15px;
+ left: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__captions-position-hover {
+ bottom: 35px;
+}
+
+.mejs__captions-text,
+.mejs__captions-text * {
+ background: rgba(20, 20, 20, 0.5);
+ box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
+ padding: 0;
+ white-space: pre-wrap;
+}
+
+.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container {
+ display: none;
+}
+
+/* End: Track (Captions and Chapters) */
+
+/* Start: Error */
+.mejs__overlay-error {
+ position: relative;
+}
+.mejs__overlay-error > img {
+ left: 0;
+ max-width: 100%;
+ position: absolute;
+ top: 0;
+ z-index: -1;
+}
+.mejs__cannotplay,
+.mejs__cannotplay a {
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.mejs__cannotplay {
+ position: relative;
+}
+
+.mejs__cannotplay p,
+.mejs__cannotplay a {
+ display: inline-block;
+ padding: 0 15px;
+ width: 100%;
+}
+/* End: Error */ \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mediaelementplayer.min.css b/wp-includes/js/mediaelement/mediaelementplayer.min.css
new file mode 100644
index 0000000..e3c08f3
--- /dev/null
+++ b/wp-includes/js/mediaelement/mediaelementplayer.min.css
@@ -0,0 +1 @@
+.mejs__offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs__container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs__container,.mejs__container *{box-sizing:border-box}.mejs__container video::-webkit-media-controls,.mejs__container video::-webkit-media-controls-panel,.mejs__container video::-webkit-media-controls-panel-container,.mejs__container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs__fill-container,.mejs__fill-container .mejs__container{height:100%;width:100%}.mejs__fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs__container:focus{outline:none}.mejs__iframe-overlay{height:100%;position:absolute;width:100%}.mejs__embed,.mejs__embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs__fullscreen{overflow:hidden!important}.mejs__container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs__container-fullscreen .mejs__mediaelement,.mejs__container-fullscreen video{height:100%!important;width:100%!important}.mejs__background,.mejs__mediaelement{left:0;position:absolute;top:0}.mejs__mediaelement{height:100%;width:100%;z-index:0}.mejs__poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs__poster-img{display:none}.mejs__poster-img{border:0;padding:0}.mejs__overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs__layer{z-index:1}.mejs__overlay-play{cursor:pointer}.mejs__overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs__overlay:hover>.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:1px dotted #999}.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus,.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-buffering,.mejs__time-current,.mejs__time-float,.mejs__time-float-corner,.mejs__time-float-current,.mejs__time-hovered,.mejs__time-loaded,.mejs__time-marker,.mejs__time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs__time-loaded{background:hsla(0,0%,100%,.3)}.mejs__time-current,.mejs__time-handle-content{background:hsla(0,0%,100%,.9)}.mejs__time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs__time-hovered.negative{background:rgba(0,0,0,.2)}.mejs__time-buffering,.mejs__time-current,.mejs__time-hovered,.mejs__time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs__time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs__time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs__time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs__time-handle,.mejs__time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs__time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs__time-rail .mejs__time-handle-content:active,.mejs__time-rail .mejs__time-handle-content:focus,.mejs__time-rail:hover .mejs__time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs__time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs__time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs__time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs__long-video .mejs__time-float{margin-left:-23px;width:64px}.mejs__long-video .mejs__time-float-current{width:60px}.mejs__broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs__fullscreen-button>button{background-position:-80px 0}.mejs__unfullscreen>button{background-position:-100px 0}.mejs__mute>button{background-position:-60px 0}.mejs__unmute>button{background-position:-40px 0}.mejs__volume-button{position:relative}.mejs__volume-button>.mejs__volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs__volume-button:hover{border-radius:0 0 4px 4px}.mejs__volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs__volume-current{left:0;margin:0;width:100%}.mejs__volume-current,.mejs__volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs__volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs__horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs__horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs__horizontal-volume-current,.mejs__horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs__horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs__horizontal-volume-handle{display:none}.mejs__captions-button,.mejs__chapters-button{position:relative}.mejs__captions-button>button{background-position:-140px 0}.mejs__chapters-button>button{background-position:-180px 0}.mejs__captions-button>.mejs__captions-selector,.mejs__chapters-button>.mejs__chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs__chapters-button>.mejs__chapters-selector{margin-right:-55px;width:110px}.mejs__captions-selector-list,.mejs__chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs__captions-selector-list-item,.mejs__chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs__captions-selector-list-item:hover,.mejs__chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs__captions-selector-input,.mejs__chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs__captions-selector-label,.mejs__chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs__captions-selected,.mejs__chapters-selected{color:#21f8f8}.mejs__captions-translations{font-size:10px;margin:0 0 5px}.mejs__captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs__captions-layer a{color:#fff;text-decoration:underline}.mejs__captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs__captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs__captions-position-hover{bottom:35px}.mejs__captions-text,.mejs__captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container{display:none}.mejs__overlay-error{position:relative}.mejs__overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs__cannotplay,.mejs__cannotplay a{color:#fff;font-size:.8em}.mejs__cannotplay{position:relative}.mejs__cannotplay a,.mejs__cannotplay p{display:inline-block;padding:0 15px;width:100%} \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/mejs-controls.png b/wp-includes/js/mediaelement/mejs-controls.png
new file mode 100644
index 0000000..d1fef0f
--- /dev/null
+++ b/wp-includes/js/mediaelement/mejs-controls.png
Binary files differ
diff --git a/wp-includes/js/mediaelement/mejs-controls.svg b/wp-includes/js/mediaelement/mejs-controls.svg
new file mode 100644
index 0000000..6f7a3b7
--- /dev/null
+++ b/wp-includes/js/mediaelement/mejs-controls.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="400" height="120" viewBox="0 0 400 120"><style>.st0{fill:#FFFFFF;width:16px;height:16px} .st1{fill:none;stroke:#FFFFFF;stroke-width:1.5;stroke-linecap:round;} .st2{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linecap:round;} .st3{fill:none;stroke:#FFFFFF;} .st4{fill:#231F20;} .st5{opacity:0.75;fill:none;stroke:#FFFFFF;stroke-width:5;enable-background:new;} .st6{fill:none;stroke:#FFFFFF;stroke-width:5;} .st7{opacity:0.4;fill:#FFFFFF;enable-background:new;} .st8{opacity:0.6;fill:#FFFFFF;enable-background:new;} .st9{opacity:0.8;fill:#FFFFFF;enable-background:new;} .st10{opacity:0.9;fill:#FFFFFF;enable-background:new;} .st11{opacity:0.3;fill:#FFFFFF;enable-background:new;} .st12{opacity:0.5;fill:#FFFFFF;enable-background:new;} .st13{opacity:0.7;fill:#FFFFFF;enable-background:new;}</style><path class="st0" d="M16.5 8.5c.3.1.4.5.2.8-.1.1-.1.2-.2.2l-11.4 7c-.5.3-.8.1-.8-.5V2c0-.5.4-.8.8-.5l11.4 7z"/><path class="st0" d="M24 1h2.2c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1H24c-.6 0-1-.4-1-1V2c0-.5.4-1 1-1zm9.8 0H36c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1h-2.2c-.6 0-1-.4-1-1V2c0-.5.4-1 1-1z"/><path class="st0" d="M81 1.4c0-.6.4-1 1-1h5.4c.6 0 .7.3.3.7l-6 6c-.4.4-.7.3-.7-.3V1.4zm0 15.8c0 .6.4 1 1 1h5.4c.6 0 .7-.3.3-.7l-6-6c-.4-.4-.7-.3-.7.3v5.4zM98.8 1.4c0-.6-.4-1-1-1h-5.4c-.6 0-.7.3-.3.7l6 6c.4.4.7.3.7-.3V1.4zm0 15.8c0 .6-.4 1-1 1h-5.4c-.6 0-.7-.3-.3-.7l6-6c.4-.4.7-.3.7.3v5.4z"/><path class="st0" d="M112.7 5c0 .6.4 1 1 1h4.1c.6 0 .7-.3.3-.7L113.4.6c-.4-.4-.7-.3-.7.3V5zm-7.1 1c.6 0 1-.4 1-1V.9c0-.6-.3-.7-.7-.3l-4.7 4.7c-.4.4-.3.7.3.7h4.1zm1 7.1c0-.6-.4-1-1-1h-4.1c-.6 0-.7.3-.3.7l4.7 4.7c.4.4.7.3.7-.3v-4.1zm7.1-1c-.6 0-1 .4-1 1v4.1c0 .5.3.7.7.3l4.7-4.7c.4-.4.3-.7-.3-.7h-4.1z"/><path class="st0" d="M67 5.8c-.5.4-1.2.6-1.8.6H62c-.6 0-1 .4-1 1v5.7c0 .6.4 1 1 1h4.2c.3.2.5.4.8.6l3.5 2.6c.4.3.8.1.8-.4V3.5c0-.5-.4-.7-.8-.4L67 5.8z"/><path class="st1" d="M73.9 2.5s3.9-.8 3.9 7.7-3.9 7.8-3.9 7.8"/><path class="st1" d="M72.6 6.4s2.6-.4 2.6 3.8-2.6 3.9-2.6 3.9"/><path class="st0" d="M47 5.8c-.5.4-1.2.6-1.8.6H42c-.6 0-1 .4-1 1v5.7c0 .6.4 1 1 1h4.2c.3.2.5.4.8.6l3.5 2.6c.4.3.8.1.8-.4V3.5c0-.5-.4-.7-.8-.4L47 5.8z"/><path class="st2" d="M52.8 7l5.4 5.4m-5.4 0L58.2 7"/><path class="st3" d="M128.7 8.6c-6.2-4.2-6.5 7.8 0 3.9m6.5-3.9c-6.2-4.2-6.5 7.8 0 3.9"/><path class="st0" d="M122.2 3.4h15.7v13.1h-15.7V3.4zM120.8 2v15.7h18.3V2h-18.3z"/><path class="st0" d="M143.2 3h14c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2h-14c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2z"/><path class="st4" d="M146.4 13.8c-.8 0-1.6-.4-2.1-1-1.1-1.4-1-3.4.1-4.8.5-.6 2-1.7 4.6.2l-.6.8c-1.4-1-2.6-1.1-3.3-.3-.8 1-.8 2.4-.1 3.5.7.9 1.9.8 3.4-.1l.5.9c-.7.5-1.6.7-2.5.8zm7.5 0c-.8 0-1.6-.4-2.1-1-1.1-1.4-1-3.4.1-4.8.5-.6 2-1.7 4.6.2l-.5.8c-1.4-1-2.6-1.1-3.3-.3-.8 1-.8 2.4-.1 3.5.7.9 1.9.8 3.4-.1l.5.9c-.8.5-1.7.7-2.6.8z"/><path class="st0" d="M60.3 77c.6.2.8.8.6 1.4-.1.3-.3.5-.6.6L30 96.5c-1 .6-1.7.1-1.7-1v-35c0-1.1.8-1.5 1.7-1L60.3 77z"/><path class="st5" d="M2.5 79c0-20.7 16.8-37.5 37.5-37.5S77.5 58.3 77.5 79 60.7 116.5 40 116.5 2.5 99.7 2.5 79z"/><path class="st0" d="M140.3 77c.6.2.8.8.6 1.4-.1.3-.3.5-.6.6L110 96.5c-1 .6-1.7.1-1.7-1v-35c0-1.1.8-1.5 1.7-1L140.3 77z"/><path class="st6" d="M82.5 79c0-20.7 16.8-37.5 37.5-37.5s37.5 16.8 37.5 37.5-16.8 37.5-37.5 37.5S82.5 99.7 82.5 79z"/><circle class="st0" cx="201.9" cy="47.1" r="8.1"/><circle class="st7" cx="233.9" cy="79" r="5"/><circle class="st8" cx="201.9" cy="110.9" r="6"/><circle class="st9" cx="170.1" cy="79" r="7"/><circle class="st10" cx="178.2" cy="56.3" r="7.5"/><circle class="st11" cx="226.3" cy="56.1" r="4.5"/><circle class="st12" cx="225.8" cy="102.8" r="5.5"/><circle class="st13" cx="178.2" cy="102.8" r="6.5"/><path class="st0" d="M178 9.4c0 .4-.4.7-.9.7-.1 0-.2 0-.2-.1L172 8.2c-.5-.2-.6-.6-.1-.8l6.2-3.6c.5-.3.8-.1.7.5l-.8 5.1z"/><path class="st0" d="M169.4 15.9c-1 0-2-.2-2.9-.7-2-1-3.2-3-3.2-5.2.1-3.4 2.9-6 6.3-6 2.5.1 4.8 1.7 5.6 4.1l.1-.1 2.1 1.1c-.6-4.4-4.7-7.5-9.1-6.9-3.9.6-6.9 3.9-7 7.9 0 2.9 1.7 5.6 4.3 7 1.2.6 2.5.9 3.8 1 2.6 0 5-1.2 6.6-3.3l-1.8-.9c-1.2 1.2-3 2-4.8 2z"/><path class="st0" d="M183.4 3.2c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5zm-5.1 5c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5zm-5.1 5c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5c0-.9.7-1.5 1.5-1.5zm5.1 0h8.5c.9 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5h-8.5c-.9 0-1.5-.7-1.5-1.5-.1-.9.6-1.5 1.5-1.5z"/></svg>
diff --git a/wp-includes/js/mediaelement/renderers/vimeo.js b/wp-includes/js/mediaelement/renderers/vimeo.js
new file mode 100644
index 0000000..a517434
--- /dev/null
+++ b/wp-includes/js/mediaelement/renderers/vimeo.js
@@ -0,0 +1,432 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){
+'use strict';
+
+var VimeoApi = {
+
+ promise: null,
+
+ load: function load(settings) {
+
+ if (typeof Vimeo !== 'undefined') {
+ VimeoApi._createPlayer(settings);
+ } else {
+ VimeoApi.promise = VimeoApi.promise || mejs.Utils.loadScript('https://player.vimeo.com/api/player.js');
+ VimeoApi.promise.then(function () {
+ VimeoApi._createPlayer(settings);
+ });
+ }
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = new Vimeo.Player(settings.iframe);
+ window['__ready__' + settings.id](player);
+ },
+
+ getVimeoId: function getVimeoId(url) {
+ if (url == null) {
+ return null;
+ }
+
+ var parts = url.split('?');
+ url = parts[0];
+
+ var playerLinkMatch = url.match(/https:\/\/player.vimeo.com\/video\/(\d+)$/);
+ if (playerLinkMatch) {
+ return parseInt(playerLinkMatch[1], 10);
+ }
+
+ var vimeoLinkMatch = url.match(/https:\/\/vimeo.com\/(\d+)$/);
+ if (vimeoLinkMatch) {
+ return parseInt(vimeoLinkMatch[1], 10);
+ }
+
+ var privateVimeoLinkMatch = url.match(/https:\/\/vimeo.com\/(\d+)\/\w+$/);
+ if (privateVimeoLinkMatch) {
+ return parseInt(privateVimeoLinkMatch[1], 10);
+ }
+
+ return NaN;
+ }
+};
+
+var vimeoIframeRenderer = {
+
+ name: 'vimeo_iframe',
+ options: {
+ prefix: 'vimeo_iframe'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/vimeo', 'video/x-vimeo'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+ var apiStack = [],
+ vimeo = {},
+ readyState = 4;
+
+ var paused = true,
+ volume = 1,
+ oldVolume = volume,
+ currentTime = 0,
+ bufferedTime = 0,
+ ended = false,
+ duration = 0,
+ vimeoPlayer = null,
+ url = '';
+
+ vimeo.options = options;
+ vimeo.id = mediaElement.id + '_' + options.prefix;
+ vimeo.mediaElement = mediaElement;
+
+ var errorHandler = function errorHandler(error) {
+ mediaElement.generateError('Code ' + error.name + ': ' + error.message, mediaFiles);
+ };
+
+ var props = mejs.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ vimeo['get' + capName] = function () {
+ if (vimeoPlayer !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ return currentTime;
+ case 'duration':
+ return duration;
+ case 'volume':
+ return volume;
+ case 'muted':
+ return volume === 0;
+ case 'paused':
+ return paused;
+ case 'ended':
+ return ended;
+ case 'src':
+ vimeoPlayer.getVideoUrl().then(function (_url) {
+ url = _url;
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ return url;
+ case 'buffered':
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return bufferedTime * duration;
+ },
+ length: 1
+ };
+ case 'readyState':
+ return readyState;
+ }
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ vimeo['set' + capName] = function (value) {
+ if (vimeoPlayer !== null) {
+ switch (propName) {
+ case 'src':
+ var _url2 = typeof value === 'string' ? value : value[0].src,
+ videoId = VimeoApi.getVimeoId(_url2);
+
+ vimeoPlayer.loadVideo(videoId).then(function () {
+ if (mediaElement.originalNode.autoplay) {
+ vimeoPlayer.play();
+ }
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ break;
+ case 'currentTime':
+ vimeoPlayer.setCurrentTime(value).then(function () {
+ currentTime = value;
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('timeupdate', vimeo);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ break;
+ case 'volume':
+ vimeoPlayer.setVolume(value).then(function () {
+ volume = value;
+ oldVolume = volume;
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', vimeo);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ break;
+ case 'loop':
+ vimeoPlayer.setLoop(value).catch(function (error) {
+ return errorHandler(error);
+ });
+ break;
+ case 'muted':
+ if (value) {
+ vimeoPlayer.setVolume(0).then(function () {
+ volume = 0;
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', vimeo);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ } else {
+ vimeoPlayer.setVolume(oldVolume).then(function () {
+ volume = oldVolume;
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', vimeo);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ }
+ break;
+ case 'readyState':
+ var event = mejs.Utils.createEvent('canplay', vimeo);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = mejs.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ vimeo[methodName] = function () {
+ if (vimeoPlayer !== null) {
+ switch (methodName) {
+ case 'play':
+ paused = false;
+ return vimeoPlayer.play();
+ case 'pause':
+ paused = true;
+ return vimeoPlayer.pause();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ window['__ready__' + vimeo.id] = function (_vimeoPlayer) {
+
+ mediaElement.vimeoPlayer = vimeoPlayer = _vimeoPlayer;
+
+ if (apiStack.length) {
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
+ var stackItem = apiStack[_i2];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ vimeo['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ vimeo[stackItem.methodName]();
+ }
+ }
+ }
+
+ if (mediaElement.originalNode.muted) {
+ vimeoPlayer.setVolume(0);
+ volume = 0;
+ }
+
+ var vimeoIframe = document.getElementById(vimeo.id);
+ var events = void 0;
+
+ events = ['mouseover', 'mouseout'];
+
+ var assignEvents = function assignEvents(e) {
+ var event = mejs.Utils.createEvent(e.type, vimeo);
+ mediaElement.dispatchEvent(event);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ vimeoIframe.addEventListener(events[_i3], assignEvents, false);
+ }
+
+ vimeoPlayer.on('loaded', function () {
+ vimeoPlayer.getDuration().then(function (loadProgress) {
+ duration = loadProgress;
+ if (duration > 0) {
+ bufferedTime = duration * loadProgress;
+ if (mediaElement.originalNode.autoplay) {
+ paused = false;
+ ended = false;
+ var event = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(event);
+ }
+ }
+ }).catch(function (error) {
+ errorHandler(error, vimeo);
+ });
+ });
+ vimeoPlayer.on('progress', function () {
+ vimeoPlayer.getDuration().then(function (loadProgress) {
+ duration = loadProgress;
+
+ if (duration > 0) {
+ bufferedTime = duration * loadProgress;
+ if (mediaElement.originalNode.autoplay) {
+ var initEvent = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(initEvent);
+
+ var playingEvent = mejs.Utils.createEvent('playing', vimeo);
+ mediaElement.dispatchEvent(playingEvent);
+ }
+ }
+
+ var event = mejs.Utils.createEvent('progress', vimeo);
+ mediaElement.dispatchEvent(event);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ });
+ vimeoPlayer.on('timeupdate', function () {
+ vimeoPlayer.getCurrentTime().then(function (seconds) {
+ currentTime = seconds;
+ var event = mejs.Utils.createEvent('timeupdate', vimeo);
+ mediaElement.dispatchEvent(event);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ });
+ vimeoPlayer.on('play', function () {
+ paused = false;
+ ended = false;
+ var event = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(event);
+
+ var playingEvent = mejs.Utils.createEvent('playing', vimeo);
+ mediaElement.dispatchEvent(playingEvent);
+ });
+ vimeoPlayer.on('pause', function () {
+ paused = true;
+ ended = false;
+
+ var event = mejs.Utils.createEvent('pause', vimeo);
+ mediaElement.dispatchEvent(event);
+ });
+ vimeoPlayer.on('ended', function () {
+ paused = false;
+ ended = true;
+
+ var event = mejs.Utils.createEvent('ended', vimeo);
+ mediaElement.dispatchEvent(event);
+ });
+
+ events = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
+ var event = mejs.Utils.createEvent(events[_i4], vimeo);
+ mediaElement.dispatchEvent(event);
+ }
+ };
+
+ var height = mediaElement.originalNode.height,
+ width = mediaElement.originalNode.width,
+ vimeoContainer = document.createElement('iframe'),
+ standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src);
+
+ var queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : '';
+ var args = [];
+
+ if (mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) {
+ args.push('autoplay=1');
+ }
+ if (mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) {
+ args.push('loop=1');
+ }
+
+ queryArgs = '' + queryArgs + (queryArgs ? '&' : '?') + args.join('&');
+
+ vimeoContainer.setAttribute('id', vimeo.id);
+ vimeoContainer.setAttribute('width', width);
+ vimeoContainer.setAttribute('height', height);
+ vimeoContainer.setAttribute('frameBorder', '0');
+ vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs);
+ vimeoContainer.setAttribute('webkitallowfullscreen', 'true');
+ vimeoContainer.setAttribute('mozallowfullscreen', 'true');
+ vimeoContainer.setAttribute('allowfullscreen', 'true');
+ vimeoContainer.setAttribute('allow', 'autoplay');
+
+ mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+
+ VimeoApi.load({
+ iframe: vimeoContainer,
+ id: vimeo.id
+ });
+
+ vimeo.hide = function () {
+ vimeo.pause();
+ if (vimeoPlayer) {
+ vimeoContainer.style.display = 'none';
+ }
+ };
+ vimeo.setSize = function (width, height) {
+ vimeoContainer.setAttribute('width', width);
+ vimeoContainer.setAttribute('height', height);
+ };
+ vimeo.show = function () {
+ if (vimeoPlayer) {
+ vimeoContainer.style.display = '';
+ }
+ };
+
+ vimeo.destroy = function () {};
+
+ return vimeo;
+ }
+};
+
+mejs.Utils.typeChecks.push(function (url) {
+ return (/(\/\/player\.vimeo|vimeo\.com)/i.test(url) ? 'video/x-vimeo' : null
+ );
+});
+
+mejs.Renderers.add(vimeoIframeRenderer);
+
+},{}]},{},[1]);
diff --git a/wp-includes/js/mediaelement/renderers/vimeo.min.js b/wp-includes/js/mediaelement/renderers/vimeo.min.js
new file mode 100644
index 0000000..fa958f6
--- /dev/null
+++ b/wp-includes/js/mediaelement/renderers/vimeo.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function a(o,s,u){function c(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return c(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){"use strict";var T={promise:null,load:function(e){"undefined"!=typeof Vimeo?T._createPlayer(e):(T.promise=T.promise||mejs.Utils.loadScript("https://player.vimeo.com/api/player.js"),T.promise.then(function(){T._createPlayer(e)}))},_createPlayer:function(e){var t=new Vimeo.Player(e.iframe);window["__ready__"+e.id](t)},getVimeoId:function(e){if(null==e)return null;var t=(e=e.split("?")[0]).match(/https:\/\/player.vimeo.com\/video\/(\d+)$/);if(t)return parseInt(t[1],10);var n=e.match(/https:\/\/vimeo.com\/(\d+)$/);if(n)return parseInt(n[1],10);var r=e.match(/https:\/\/vimeo.com\/(\d+)\/\w+$/);return r?parseInt(r[1],10):NaN}},r={name:"vimeo_iframe",options:{prefix:"vimeo_iframe"},canPlayType:function(e){return~["video/vimeo","video/x-vimeo"].indexOf(e.toLowerCase())},create:function(f,e,t){var v=[],h={},y=!0,g=1,a=g,E=0,j=0,U=!1,b=0,w=null,n="";h.options=e,h.id=f.id+"_"+e.prefix,h.mediaElement=f;for(var N=function(e){f.generateError("Code "+e.name+": "+e.message,t)},r=mejs.html5media.properties,i=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null!==w){switch(i){case"currentTime":return E;case"duration":return b;case"volume":return g;case"muted":return 0===g;case"paused":return y;case"ended":return U;case"src":return w.getVideoUrl().then(function(e){n=e}).catch(function(e){return N(e)}),n;case"buffered":return{start:function(){return 0},end:function(){return j*b},length:1};case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==w)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=T.getVimeoId(t);w.loadVideo(n).then(function(){f.originalNode.autoplay&&w.play()}).catch(function(e){return N(e)});break;case"currentTime":w.setCurrentTime(e).then(function(){E=e,setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"volume":w.setVolume(e).then(function(){a=g=e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"loop":w.setLoop(e).catch(function(e){return N(e)});break;case"muted":e?w.setVolume(0).then(function(){g=0,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)}):w.setVolume(a).then(function(){g=a,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);f.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"readyState":var r=mejs.Utils.createEvent("canplay",h);f.dispatchEvent(r)}else v.push({type:"set",propName:i,value:e})}},o=0,s=r.length;o<s;o++)i(r[o]);for(var u=mejs.html5media.methods,c=function(e){h[e]=function(){if(null!==w)switch(e){case"play":return y=!1,w.play();case"pause":return y=!0,w.pause();case"load":return null}else v.push({type:"call",methodName:e})}},l=0,d=u.length;l<d;l++)c(u[l]);window["__ready__"+h.id]=function(e){if(f.vimeoPlayer=w=e,v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+a](r.value)}else"call"===r.type&&h[r.methodName]()}f.originalNode.muted&&(w.setVolume(0),g=0);for(var o=document.getElementById(h.id),s=void 0,u=function(e){var t=mejs.Utils.createEvent(e.type,h);f.dispatchEvent(t)},c=0,l=(s=["mouseover","mouseout"]).length;c<l;c++)o.addEventListener(s[c],u,!1);w.on("loaded",function(){w.getDuration().then(function(e){if(0<(b=e)&&(j=b*e,f.originalNode.autoplay)){U=y=!1;var t=mejs.Utils.createEvent("play",h);f.dispatchEvent(t)}}).catch(function(e){N(e)})}),w.on("progress",function(){w.getDuration().then(function(e){if(0<(b=e)&&(j=b*e,f.originalNode.autoplay)){var t=mejs.Utils.createEvent("play",h);f.dispatchEvent(t);var n=mejs.Utils.createEvent("playing",h);f.dispatchEvent(n)}var r=mejs.Utils.createEvent("progress",h);f.dispatchEvent(r)}).catch(function(e){return N(e)})}),w.on("timeupdate",function(){w.getCurrentTime().then(function(e){E=e;var t=mejs.Utils.createEvent("timeupdate",h);f.dispatchEvent(t)}).catch(function(e){return N(e)})}),w.on("play",function(){U=y=!1;var e=mejs.Utils.createEvent("play",h);f.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",h);f.dispatchEvent(t)}),w.on("pause",function(){y=!0,U=!1;var e=mejs.Utils.createEvent("pause",h);f.dispatchEvent(e)}),w.on("ended",function(){y=!1,U=!0;var e=mejs.Utils.createEvent("ended",h);f.dispatchEvent(e)});for(var d=0,p=(s=["rendererready","loadedmetadata","loadeddata","canplay"]).length;d<p;d++){var m=mejs.Utils.createEvent(s[d],h);f.dispatchEvent(m)}};var p=f.originalNode.height,m=f.originalNode.width,_=document.createElement("iframe"),x="https://player.vimeo.com/video/"+T.getVimeoId(t[0].src),A=~t[0].src.indexOf("?")?"?"+t[0].src.slice(t[0].src.indexOf("?")+1):"",V=[];return f.originalNode.autoplay&&-1===A.indexOf("autoplay")&&V.push("autoplay=1"),f.originalNode.loop&&-1===A.indexOf("loop")&&V.push("loop=1"),A=A+(A?"&":"?")+V.join("&"),_.setAttribute("id",h.id),_.setAttribute("width",m),_.setAttribute("height",p),_.setAttribute("frameBorder","0"),_.setAttribute("src",""+x+A),_.setAttribute("webkitallowfullscreen","true"),_.setAttribute("mozallowfullscreen","true"),_.setAttribute("allowfullscreen","true"),_.setAttribute("allow","autoplay"),f.originalNode.parentNode.insertBefore(_,f.originalNode),f.originalNode.style.display="none",T.load({iframe:_,id:h.id}),h.hide=function(){h.pause(),w&&(_.style.display="none")},h.setSize=function(e,t){_.setAttribute("width",e),_.setAttribute("height",t)},h.show=function(){w&&(_.style.display="")},h.destroy=function(){},h}};mejs.Utils.typeChecks.push(function(e){return/(\/\/player\.vimeo|vimeo\.com)/i.test(e)?"video/x-vimeo":null}),mejs.Renderers.add(r)},{}]},{},[1]); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.css b/wp-includes/js/mediaelement/wp-mediaelement.css
new file mode 100644
index 0000000..e9dc52c
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-mediaelement.css
@@ -0,0 +1,293 @@
+.mejs-container {
+ clear: both;
+ max-width: 100%;
+}
+
+.mejs-container * {
+ font-family: Helvetica, Arial;
+}
+
+.mejs-container,
+.mejs-embed,
+.mejs-embed body,
+.mejs-container .mejs-controls {
+ background: #222;
+}
+
+.mejs-time {
+ font-weight: normal;
+ word-wrap: normal;
+}
+
+.mejs-controls a.mejs-horizontal-volume-slider {
+ display: table;
+}
+
+.mejs-controls .mejs-time-rail .mejs-time-loaded,
+.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
+ background: #fff;
+}
+
+.mejs-controls .mejs-time-rail .mejs-time-current {
+ background: #0073aa;
+}
+
+.mejs-controls .mejs-time-rail .mejs-time-total,
+.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
+ background: rgba(255, 255, 255, .33);
+}
+
+.mejs-controls .mejs-time-rail span,
+.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,
+.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current {
+ border-radius: 0;
+}
+
+.mejs-overlay-loading {
+ background: transparent;
+}
+
+/* Override theme styles that may conflict with controls. */
+.mejs-controls button:hover {
+ border: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+
+.me-cannotplay {
+ width: auto !important;
+}
+
+.media-embed-details .wp-audio-shortcode {
+ display: inline-block;
+ max-width: 400px;
+}
+
+.audio-details .embed-media-settings {
+ overflow: visible;
+}
+
+.media-embed-details .embed-media-settings .setting span:not(.button-group) {
+ max-width: 400px; /* Back-compat for pre-5.3 */
+ width: auto; /* Back-compat for pre-5.3 */
+}
+
+.media-embed-details .embed-media-settings .checkbox-setting span {
+ display: inline-block;
+}
+
+.media-embed-details .embed-media-settings {
+ padding-top: 0;
+ top: 28px;
+}
+
+.media-embed-details .instructions {
+ padding: 16px 0;
+ max-width: 600px;
+}
+
+.media-embed-details .setting p,
+.media-embed-details .setting .remove-setting {
+ color: #a00;
+ font-size: 10px;
+ text-transform: uppercase;
+}
+
+.media-embed-details .setting .remove-setting {
+ padding: 5px 0;
+}
+
+.media-embed-details .setting a:hover {
+ color: #dc3232;
+}
+
+.media-embed-details .embed-media-settings .checkbox-setting {
+ float: none;
+ margin: 0 0 10px;
+}
+
+.wp-video {
+ max-width: 100%;
+ height: auto;
+}
+
+.wp_attachment_holder .wp-video,
+.wp_attachment_holder .wp-audio-shortcode {
+ margin-top: 18px;
+}
+
+video.wp-video-shortcode,
+.wp-video-shortcode video {
+ max-width: 100%;
+ display: inline-block;
+}
+
+.video-details .wp-video-holder {
+ width: 100%;
+ max-width: 640px;
+}
+
+.wp-playlist {
+ border: 1px solid #ccc;
+ padding: 10px;
+ margin: 12px 0 18px;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+.wp-admin .wp-playlist {
+ margin: 0 0 18px;
+}
+
+.wp-playlist video {
+ display: inline-block;
+ max-width: 100%;
+}
+
+.wp-playlist audio {
+ display: none;
+ max-width: 100%;
+ width: 400px;
+}
+
+.wp-playlist .mejs-container {
+ margin: 0;
+ max-width: 100%;
+}
+
+.wp-playlist .mejs-controls .mejs-button button {
+ outline: 0;
+}
+
+.wp-playlist-light {
+ background: #fff;
+ color: #000;
+}
+
+.wp-playlist-dark {
+ color: #fff;
+ background: #000;
+}
+
+.wp-playlist-caption {
+ display: block;
+ max-width: 88%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+.wp-playlist-item .wp-playlist-caption {
+ text-decoration: none;
+ color: #000;
+ max-width: -webkit-calc(100% - 40px);
+ max-width: calc(100% - 40px);
+}
+
+.wp-playlist-item-meta {
+ display: block;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+.wp-playlist-item-title {
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+.wp-playlist-item-album {
+ font-style: italic;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.wp-playlist-item-artist {
+ font-size: 12px;
+ text-transform: uppercase;
+}
+
+.wp-playlist-item-length {
+ position: absolute;
+ right: 3px;
+ top: 0;
+ font-size: 14px;
+ line-height: 1.5;
+}
+
+.rtl .wp-playlist-item-length {
+ left: 3px;
+ right: auto;
+}
+
+.wp-playlist-tracks {
+ margin-top: 10px;
+}
+
+.wp-playlist-item {
+ position: relative;
+ cursor: pointer;
+ padding: 0 3px;
+ border-bottom: 1px solid #ccc;
+}
+
+.wp-playlist-item:last-child {
+ border-bottom: 0;
+}
+
+.wp-playlist-light .wp-playlist-caption {
+ color: #333;
+}
+
+.wp-playlist-dark .wp-playlist-caption {
+ color: #ddd;
+}
+
+.wp-playlist-playing {
+ font-weight: bold;
+ background: #f7f7f7;
+}
+
+.wp-playlist-light .wp-playlist-playing {
+ background: #fff;
+ color: #000;
+}
+
+.wp-playlist-dark .wp-playlist-playing {
+ background: #000;
+ color: #fff;
+}
+
+.wp-playlist-current-item {
+ overflow: hidden;
+ margin-bottom: 10px;
+ height: 60px;
+}
+
+.wp-playlist .wp-playlist-current-item img {
+ float: left;
+ max-width: 60px;
+ height: auto;
+ margin-right: 10px;
+ padding: 0;
+ border: 0;
+}
+
+.rtl .wp-playlist .wp-playlist-current-item img {
+ float: right;
+ margin-left: 10px;
+ margin-right: 0;
+}
+
+.wp-playlist-current-item .wp-playlist-item-title,
+.wp-playlist-current-item .wp-playlist-item-artist {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.wp-audio-playlist .me-cannotplay span {
+ padding: 5px 15px;
+}
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.js b/wp-includes/js/mediaelement/wp-mediaelement.js
new file mode 100644
index 0000000..52e1bbd
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-mediaelement.js
@@ -0,0 +1,100 @@
+/* global _wpmejsSettings, mejsL10n */
+(function( window, $ ) {
+
+ window.wp = window.wp || {};
+
+ function wpMediaElement() {
+ var settings = {};
+
+ /**
+ * Initialize media elements.
+ *
+ * Ensures media elements that have already been initialized won't be
+ * processed again.
+ *
+ * @memberOf wp.mediaelement
+ *
+ * @since 4.4.0
+ *
+ * @return {void}
+ */
+ function initialize() {
+ var selectors = [];
+
+ if ( typeof _wpmejsSettings !== 'undefined' ) {
+ settings = $.extend( true, {}, _wpmejsSettings );
+ }
+ settings.classPrefix = 'mejs-';
+ settings.success = settings.success || function ( mejs ) {
+ var autoplay, loop;
+
+ if ( mejs.rendererName && -1 !== mejs.rendererName.indexOf( 'flash' ) ) {
+ autoplay = mejs.attributes.autoplay && 'false' !== mejs.attributes.autoplay;
+ loop = mejs.attributes.loop && 'false' !== mejs.attributes.loop;
+
+ if ( autoplay ) {
+ mejs.addEventListener( 'canplay', function() {
+ mejs.play();
+ }, false );
+ }
+
+ if ( loop ) {
+ mejs.addEventListener( 'ended', function() {
+ mejs.play();
+ }, false );
+ }
+ }
+ };
+
+ /**
+ * Custom error handler.
+ *
+ * Sets up a custom error handler in case a video render fails, and provides a download
+ * link as the fallback.
+ *
+ * @since 4.9.3
+ *
+ * @param {object} media The wrapper that mimics all the native events/properties/methods for all renderers.
+ * @param {object} node The original HTML video, audio, or iframe tag where the media was loaded.
+ * @return {string}
+ */
+ settings.customError = function ( media, node ) {
+ // Make sure we only fall back to a download link for flash files.
+ if ( -1 !== media.rendererName.indexOf( 'flash' ) || -1 !== media.rendererName.indexOf( 'flv' ) ) {
+ return '<a href="' + node.src + '">' + mejsL10n.strings['mejs.download-file'] + '</a>';
+ }
+ };
+
+ if ( 'undefined' === typeof settings.videoShortcodeLibrary || 'mediaelement' === settings.videoShortcodeLibrary ) {
+ selectors.push( '.wp-video-shortcode' );
+ }
+ if ( 'undefined' === typeof settings.audioShortcodeLibrary || 'mediaelement' === settings.audioShortcodeLibrary ) {
+ selectors.push( '.wp-audio-shortcode' );
+ }
+ if ( ! selectors.length ) {
+ return;
+ }
+
+ // Only initialize new media elements.
+ $( selectors.join( ', ' ) )
+ .not( '.mejs-container' )
+ .filter(function () {
+ return ! $( this ).parent().hasClass( 'mejs-mediaelement' );
+ })
+ .mediaelementplayer( settings );
+ }
+
+ return {
+ initialize: initialize
+ };
+ }
+
+ /**
+ * @namespace wp.mediaelement
+ * @memberOf wp
+ */
+ window.wp.mediaelement = new wpMediaElement();
+
+ $( window.wp.mediaelement.initialize );
+
+})( window, jQuery );
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.min.css b/wp-includes/js/mediaelement/wp-mediaelement.min.css
new file mode 100644
index 0000000..4bdba92
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-mediaelement.min.css
@@ -0,0 +1 @@
+.mejs-container{clear:both;max-width:100%}.mejs-container *{font-family:Helvetica,Arial}.mejs-container,.mejs-container .mejs-controls,.mejs-embed,.mejs-embed body{background:#222}.mejs-time{font-weight:400;word-wrap:normal}.mejs-controls a.mejs-horizontal-volume-slider{display:table}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current,.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#fff}.mejs-controls .mejs-time-rail .mejs-time-current{background:#0073aa}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,.mejs-controls .mejs-time-rail .mejs-time-total{background:rgba(255,255,255,.33)}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current,.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total,.mejs-controls .mejs-time-rail span{border-radius:0}.mejs-overlay-loading{background:0 0}.mejs-controls button:hover{border:none;-webkit-box-shadow:none;box-shadow:none}.me-cannotplay{width:auto!important}.media-embed-details .wp-audio-shortcode{display:inline-block;max-width:400px}.audio-details .embed-media-settings{overflow:visible}.media-embed-details .embed-media-settings .setting span:not(.button-group){max-width:400px;width:auto}.media-embed-details .embed-media-settings .checkbox-setting span{display:inline-block}.media-embed-details .embed-media-settings{padding-top:0;top:28px}.media-embed-details .instructions{padding:16px 0;max-width:600px}.media-embed-details .setting .remove-setting,.media-embed-details .setting p{color:#a00;font-size:10px;text-transform:uppercase}.media-embed-details .setting .remove-setting{padding:5px 0}.media-embed-details .setting a:hover{color:#dc3232}.media-embed-details .embed-media-settings .checkbox-setting{float:none;margin:0 0 10px}.wp-video{max-width:100%;height:auto}.wp_attachment_holder .wp-audio-shortcode,.wp_attachment_holder .wp-video{margin-top:18px}.wp-video-shortcode video,video.wp-video-shortcode{max-width:100%;display:inline-block}.video-details .wp-video-holder{width:100%;max-width:640px}.wp-playlist{border:1px solid #ccc;padding:10px;margin:12px 0 18px;font-size:14px;line-height:1.5}.wp-admin .wp-playlist{margin:0 0 18px}.wp-playlist video{display:inline-block;max-width:100%}.wp-playlist audio{display:none;max-width:100%;width:400px}.wp-playlist .mejs-container{margin:0;max-width:100%}.wp-playlist .mejs-controls .mejs-button button{outline:0}.wp-playlist-light{background:#fff;color:#000}.wp-playlist-dark{color:#fff;background:#000}.wp-playlist-caption{display:block;max-width:88%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.5}.wp-playlist-item .wp-playlist-caption{text-decoration:none;color:#000;max-width:-webkit-calc(100% - 40px);max-width:calc(100% - 40px)}.wp-playlist-item-meta{display:block;font-size:14px;line-height:1.5}.wp-playlist-item-title{font-size:14px;line-height:1.5}.wp-playlist-item-album{font-style:italic;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-playlist-item-artist{font-size:12px;text-transform:uppercase}.wp-playlist-item-length{position:absolute;right:3px;top:0;font-size:14px;line-height:1.5}.rtl .wp-playlist-item-length{left:3px;right:auto}.wp-playlist-tracks{margin-top:10px}.wp-playlist-item{position:relative;cursor:pointer;padding:0 3px;border-bottom:1px solid #ccc}.wp-playlist-item:last-child{border-bottom:0}.wp-playlist-light .wp-playlist-caption{color:#333}.wp-playlist-dark .wp-playlist-caption{color:#ddd}.wp-playlist-playing{font-weight:700;background:#f7f7f7}.wp-playlist-light .wp-playlist-playing{background:#fff;color:#000}.wp-playlist-dark .wp-playlist-playing{background:#000;color:#fff}.wp-playlist-current-item{overflow:hidden;margin-bottom:10px;height:60px}.wp-playlist .wp-playlist-current-item img{float:left;max-width:60px;height:auto;margin-right:10px;padding:0;border:0}.rtl .wp-playlist .wp-playlist-current-item img{float:right;margin-left:10px;margin-right:0}.wp-playlist-current-item .wp-playlist-item-artist,.wp-playlist-current-item .wp-playlist-item-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wp-audio-playlist .me-cannotplay span{padding:5px 15px} \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/wp-mediaelement.min.js b/wp-includes/js/mediaelement/wp-mediaelement.min.js
new file mode 100644
index 0000000..f83fbee
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-mediaelement.min.js
@@ -0,0 +1 @@
+!function(e,n){e.wp=e.wp||{},e.wp.mediaelement=new function(){var t={};return{initialize:function(){var e=[];(t="undefined"!=typeof _wpmejsSettings?n.extend(!0,{},_wpmejsSettings):t).classPrefix="mejs-",t.success=t.success||function(e){var t,n;e.rendererName&&-1!==e.rendererName.indexOf("flash")&&(t=e.attributes.autoplay&&"false"!==e.attributes.autoplay,n=e.attributes.loop&&"false"!==e.attributes.loop,t&&e.addEventListener("canplay",function(){e.play()},!1),n)&&e.addEventListener("ended",function(){e.play()},!1)},t.customError=function(e,t){if(-1!==e.rendererName.indexOf("flash")||-1!==e.rendererName.indexOf("flv"))return'<a href="'+t.src+'">'+mejsL10n.strings["mejs.download-file"]+"</a>"},void 0!==t.videoShortcodeLibrary&&"mediaelement"!==t.videoShortcodeLibrary||e.push(".wp-video-shortcode"),void 0!==t.audioShortcodeLibrary&&"mediaelement"!==t.audioShortcodeLibrary||e.push(".wp-audio-shortcode"),e.length&&n(e.join(", ")).not(".mejs-container").filter(function(){return!n(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(t)}}},n(e.wp.mediaelement.initialize)}(window,jQuery); \ No newline at end of file
diff --git a/wp-includes/js/mediaelement/wp-playlist.js b/wp-includes/js/mediaelement/wp-playlist.js
new file mode 100644
index 0000000..85c6d0b
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-playlist.js
@@ -0,0 +1,205 @@
+/* global _wpmejsSettings, MediaElementPlayer */
+
+(function ($, _, Backbone) {
+ 'use strict';
+
+ /** @namespace wp */
+ window.wp = window.wp || {};
+
+ var WPPlaylistView = Backbone.View.extend(/** @lends WPPlaylistView.prototype */{
+ /**
+ * @constructs
+ *
+ * @param {Object} options The options to create this playlist view with.
+ * @param {Object} options.metadata The metadata
+ */
+ initialize : function (options) {
+ this.index = 0;
+ this.settings = {};
+ this.data = options.metadata || $.parseJSON( this.$('script.wp-playlist-script').html() );
+ this.playerNode = this.$( this.data.type );
+
+ this.tracks = new Backbone.Collection( this.data.tracks );
+ this.current = this.tracks.first();
+
+ if ( 'audio' === this.data.type ) {
+ this.currentTemplate = wp.template( 'wp-playlist-current-item' );
+ this.currentNode = this.$( '.wp-playlist-current-item' );
+ }
+
+ this.renderCurrent();
+
+ if ( this.data.tracklist ) {
+ this.itemTemplate = wp.template( 'wp-playlist-item' );
+ this.playingClass = 'wp-playlist-playing';
+ this.renderTracks();
+ }
+
+ this.playerNode.attr( 'src', this.current.get( 'src' ) );
+
+ _.bindAll( this, 'bindPlayer', 'bindResetPlayer', 'setPlayer', 'ended', 'clickTrack' );
+
+ if ( ! _.isUndefined( window._wpmejsSettings ) ) {
+ this.settings = _.clone( _wpmejsSettings );
+ }
+ this.settings.success = this.bindPlayer;
+ this.setPlayer();
+ },
+
+ bindPlayer : function (mejs) {
+ this.mejs = mejs;
+ this.mejs.addEventListener( 'ended', this.ended );
+ },
+
+ bindResetPlayer : function (mejs) {
+ this.bindPlayer( mejs );
+ this.playCurrentSrc();
+ },
+
+ setPlayer: function (force) {
+ if ( this.player ) {
+ this.player.pause();
+ this.player.remove();
+ this.playerNode = this.$( this.data.type );
+ }
+
+ if (force) {
+ this.playerNode.attr( 'src', this.current.get( 'src' ) );
+ this.settings.success = this.bindResetPlayer;
+ }
+
+ // This is also our bridge to the outside world.
+ this.player = new MediaElementPlayer( this.playerNode.get(0), this.settings );
+ },
+
+ playCurrentSrc : function () {
+ this.renderCurrent();
+ this.mejs.setSrc( this.playerNode.attr( 'src' ) );
+ this.mejs.load();
+ this.mejs.play();
+ },
+
+ renderCurrent : function () {
+ var dimensions, defaultImage = 'wp-includes/images/media/video.png';
+ if ( 'video' === this.data.type ) {
+ if ( this.data.images && this.current.get( 'image' ) && -1 === this.current.get( 'image' ).src.indexOf( defaultImage ) ) {
+ this.playerNode.attr( 'poster', this.current.get( 'image' ).src );
+ }
+ dimensions = this.current.get( 'dimensions' );
+ if ( dimensions && dimensions.resized ) {
+ this.playerNode.attr( dimensions.resized );
+ }
+ } else {
+ if ( ! this.data.images ) {
+ this.current.set( 'image', false );
+ }
+ this.currentNode.html( this.currentTemplate( this.current.toJSON() ) );
+ }
+ },
+
+ renderTracks : function () {
+ var self = this, i = 1, tracklist = $( '<div class="wp-playlist-tracks"></div>' );
+ this.tracks.each(function (model) {
+ if ( ! self.data.images ) {
+ model.set( 'image', false );
+ }
+ model.set( 'artists', self.data.artists );
+ model.set( 'index', self.data.tracknumbers ? i : false );
+ tracklist.append( self.itemTemplate( model.toJSON() ) );
+ i += 1;
+ });
+ this.$el.append( tracklist );
+
+ this.$( '.wp-playlist-item' ).eq(0).addClass( this.playingClass );
+ },
+
+ events : {
+ 'click .wp-playlist-item' : 'clickTrack',
+ 'click .wp-playlist-next' : 'next',
+ 'click .wp-playlist-prev' : 'prev'
+ },
+
+ clickTrack : function (e) {
+ e.preventDefault();
+
+ this.index = this.$( '.wp-playlist-item' ).index( e.currentTarget );
+ this.setCurrent();
+ },
+
+ ended : function () {
+ if ( this.index + 1 < this.tracks.length ) {
+ this.next();
+ } else {
+ this.index = 0;
+ this.setCurrent();
+ }
+ },
+
+ next : function () {
+ this.index = this.index + 1 >= this.tracks.length ? 0 : this.index + 1;
+ this.setCurrent();
+ },
+
+ prev : function () {
+ this.index = this.index - 1 < 0 ? this.tracks.length - 1 : this.index - 1;
+ this.setCurrent();
+ },
+
+ loadCurrent : function () {
+ var last = this.playerNode.attr( 'src' ) && this.playerNode.attr( 'src' ).split('.').pop(),
+ current = this.current.get( 'src' ).split('.').pop();
+
+ this.mejs && this.mejs.pause();
+
+ if ( last !== current ) {
+ this.setPlayer( true );
+ } else {
+ this.playerNode.attr( 'src', this.current.get( 'src' ) );
+ this.playCurrentSrc();
+ }
+ },
+
+ setCurrent : function () {
+ this.current = this.tracks.at( this.index );
+
+ if ( this.data.tracklist ) {
+ this.$( '.wp-playlist-item' )
+ .removeClass( this.playingClass )
+ .eq( this.index )
+ .addClass( this.playingClass );
+ }
+
+ this.loadCurrent();
+ }
+ });
+
+ /**
+ * Initialize media playlists in the document.
+ *
+ * Only initializes new playlists not previously-initialized.
+ *
+ * @since 4.9.3
+ * @return {void}
+ */
+ function initialize() {
+ $( '.wp-playlist:not(:has(.mejs-container))' ).each( function() {
+ new WPPlaylistView( { el: this } );
+ } );
+ }
+
+ /**
+ * Expose the API publicly on window.wp.playlist.
+ *
+ * @namespace wp.playlist
+ * @since 4.9.3
+ * @type {object}
+ */
+ window.wp.playlist = {
+ initialize: initialize
+ };
+
+ $( document ).ready( initialize );
+
+ window.WPPlaylistView = WPPlaylistView;
+
+}(jQuery, _, Backbone));
diff --git a/wp-includes/js/mediaelement/wp-playlist.min.js b/wp-includes/js/mediaelement/wp-playlist.min.js
new file mode 100644
index 0000000..7ecb663
--- /dev/null
+++ b/wp-includes/js/mediaelement/wp-playlist.min.js
@@ -0,0 +1 @@
+!function(r,e,i){"use strict";window.wp=window.wp||{};var t=i.View.extend({initialize:function(t){this.index=0,this.settings={},this.data=t.metadata||r.parseJSON(this.$("script.wp-playlist-script").html()),this.playerNode=this.$(this.data.type),this.tracks=new i.Collection(this.data.tracks),this.current=this.tracks.first(),"audio"===this.data.type&&(this.currentTemplate=wp.template("wp-playlist-current-item"),this.currentNode=this.$(".wp-playlist-current-item")),this.renderCurrent(),this.data.tracklist&&(this.itemTemplate=wp.template("wp-playlist-item"),this.playingClass="wp-playlist-playing",this.renderTracks()),this.playerNode.attr("src",this.current.get("src")),e.bindAll(this,"bindPlayer","bindResetPlayer","setPlayer","ended","clickTrack"),e.isUndefined(window._wpmejsSettings)||(this.settings=e.clone(_wpmejsSettings)),this.settings.success=this.bindPlayer,this.setPlayer()},bindPlayer:function(t){this.mejs=t,this.mejs.addEventListener("ended",this.ended)},bindResetPlayer:function(t){this.bindPlayer(t),this.playCurrentSrc()},setPlayer:function(t){this.player&&(this.player.pause(),this.player.remove(),this.playerNode=this.$(this.data.type)),t&&(this.playerNode.attr("src",this.current.get("src")),this.settings.success=this.bindResetPlayer),this.player=new MediaElementPlayer(this.playerNode.get(0),this.settings)},playCurrentSrc:function(){this.renderCurrent(),this.mejs.setSrc(this.playerNode.attr("src")),this.mejs.load(),this.mejs.play()},renderCurrent:function(){var t;"video"===this.data.type?(this.data.images&&this.current.get("image")&&-1===this.current.get("image").src.indexOf("wp-includes/images/media/video.png")&&this.playerNode.attr("poster",this.current.get("image").src),(t=this.current.get("dimensions"))&&t.resized&&this.playerNode.attr(t.resized)):(this.data.images||this.current.set("image",!1),this.currentNode.html(this.currentTemplate(this.current.toJSON())))},renderTracks:function(){var e=this,i=1,s=r('<div class="wp-playlist-tracks"></div>');this.tracks.each(function(t){e.data.images||t.set("image",!1),t.set("artists",e.data.artists),t.set("index",!!e.data.tracknumbers&&i),s.append(e.itemTemplate(t.toJSON())),i+=1}),this.$el.append(s),this.$(".wp-playlist-item").eq(0).addClass(this.playingClass)},events:{"click .wp-playlist-item":"clickTrack","click .wp-playlist-next":"next","click .wp-playlist-prev":"prev"},clickTrack:function(t){t.preventDefault(),this.index=this.$(".wp-playlist-item").index(t.currentTarget),this.setCurrent()},ended:function(){this.index+1<this.tracks.length?this.next():(this.index=0,this.setCurrent())},next:function(){this.index=this.index+1>=this.tracks.length?0:this.index+1,this.setCurrent()},prev:function(){this.index=this.index-1<0?this.tracks.length-1:this.index-1,this.setCurrent()},loadCurrent:function(){var t=this.playerNode.attr("src")&&this.playerNode.attr("src").split(".").pop(),e=this.current.get("src").split(".").pop();this.mejs&&this.mejs.pause(),t!==e?this.setPlayer(!0):(this.playerNode.attr("src",this.current.get("src")),this.playCurrentSrc())},setCurrent:function(){this.current=this.tracks.at(this.index),this.data.tracklist&&this.$(".wp-playlist-item").removeClass(this.playingClass).eq(this.index).addClass(this.playingClass),this.loadCurrent()}});function s(){r(".wp-playlist:not(:has(.mejs-container))").each(function(){new t({el:this})})}window.wp.playlist={initialize:s},r(document).ready(s),window.WPPlaylistView=t}(jQuery,_,Backbone); \ No newline at end of file