From 152082d3525c9627c5b1c435ffe3d05807148784 Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Fri, 22 Dec 2017 21:18:13 +0100 Subject: update clapprio and plugins --- assets/clapprio/clappr.js | 30602 ++++++++++++++++++++++---------------------- 1 file changed, 15607 insertions(+), 14995 deletions(-) (limited to 'assets/clapprio/clappr.js') diff --git a/assets/clapprio/clappr.js b/assets/clapprio/clappr.js index 1b7d42f..954893a 100644 --- a/assets/clapprio/clappr.js +++ b/assets/clapprio/clappr.js @@ -67,10 +67,10 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "<%=baseUrl%>/"; +/******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 87); +/******/ return __webpack_require__(__webpack_require__.s = 88); /******/ }) /************************************************************************/ /******/ ([ @@ -120,7 +120,7 @@ exports.default = function (self, call) { exports.__esModule = true; -var _setPrototypeOf = __webpack_require__(119); +var _setPrototypeOf = __webpack_require__(120); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); @@ -223,16 +223,13 @@ var slice = Array.prototype.slice; var eventSplitter = /\s+/; var eventsApi = function eventsApi(obj, action, name, rest) { - if (!name) { - return true; - } + if (!name) return true; // Handle event maps. if ((typeof name === 'undefined' ? 'undefined' : (0, _typeof3.default)(name)) === 'object') { for (var key in name) { obj[action].apply(obj, [key, name[key]].concat(rest)); - } - return false; + }return false; } // Handle space separated event names. @@ -240,8 +237,7 @@ var eventsApi = function eventsApi(obj, action, name, rest) { var names = name.split(eventSplitter); for (var i = 0, l = names.length; i < l; i++) { obj[action].apply(obj, [names[i]].concat(rest)); - } - return false; + }return false; } return true; @@ -259,6 +255,7 @@ var triggerEvents = function triggerEvents(events, args, klass, name) { function run() { try { switch (args.length) { + /* eslint-disable curly */ case 0: while (++i < l) { (ev = events[i]).callback.call(ev.ctx); @@ -306,9 +303,7 @@ var Events = function () { * @param {Object} context */ Events.prototype.on = function on(name, callback, context) { - if (!eventsApi(this, 'on', name, [callback, context]) || !callback) { - return this; - } + if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; this._events || (this._events = {}); var events = this._events[name] || (this._events[name] = []); events.push({ callback: callback, context: context, ctx: context || this }); @@ -327,17 +322,16 @@ var Events = function () { Events.prototype.once = function once(name, callback, context) { var _this = this; - if (!eventsApi(this, 'once', name, [callback, context]) || !callback) { - return this; - } + var _once = void 0; + if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; var off = function off() { - return _this.off(name, once); + return _this.off(name, _once); }; - var once = function once() { - off(name, once); + _once = function once() { + off(name, _once); callback.apply(this, arguments); }; - return this.on(name, once, context); + return this.on(name, _once, context); }; /** @@ -358,9 +352,7 @@ var Events = function () { l = void 0, j = void 0, k = void 0; - if (!this._events || !eventsApi(this, 'off', name, [callback, context])) { - return this; - } + if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; if (!name && !callback && !context) { this._events = void 0; return this; @@ -375,14 +367,10 @@ var Events = function () { if (callback || context) { for (j = 0, k = events.length; j < k; j++) { ev = events[j]; - if (callback && callback !== ev.callback && callback !== ev.callback._callback || context && context !== ev.context) { - retain.push(ev); - } + if (callback && callback !== ev.callback && callback !== ev.callback._callback || context && context !== ev.context) retain.push(ev); } } - if (!retain.length) { - delete this._events[name]; - } + if (!retain.length) delete this._events[name]; } } return this; @@ -398,21 +386,13 @@ var Events = function () { Events.prototype.trigger = function trigger(name) { var klass = this.name || this.constructor.name; _log2.default.debug.apply(_log2.default, [klass].concat(Array.prototype.slice.call(arguments))); - if (!this._events) { - return this; - } + if (!this._events) return this; var args = slice.call(arguments, 1); - if (!eventsApi(this, 'trigger', name, args)) { - return this; - } + if (!eventsApi(this, 'trigger', name, args)) return this; var events = this._events[name]; var allEvents = this._events.all; - if (events) { - triggerEvents(events, args, klass, name); - } - if (allEvents) { - triggerEvents(allEvents, arguments, klass, name); - } + if (events) triggerEvents(events, args, klass, name); + if (allEvents) triggerEvents(allEvents, arguments, klass, name); return this; }; @@ -427,22 +407,14 @@ var Events = function () { Events.prototype.stopListening = function stopListening(obj, name, callback) { var listeningTo = this._listeningTo; - if (!listeningTo) { - return this; - } + if (!listeningTo) return this; var remove = !name && !callback; - if (!callback && (typeof name === 'undefined' ? 'undefined' : (0, _typeof3.default)(name)) === 'object') { - callback = this; - } - if (obj) { - (listeningTo = {})[obj._listenId] = obj; - } + if (!callback && (typeof name === 'undefined' ? 'undefined' : (0, _typeof3.default)(name)) === 'object') callback = this; + if (obj) (listeningTo = {})[obj._listenId] = obj; for (var id in listeningTo) { obj = listeningTo[id]; obj.off(name, callback, this); - if (remove || (0, _keys2.default)(obj._events).length === 0) { - delete this._listeningTo[id]; - } + if (remove || (0, _keys2.default)(obj._events).length === 0) delete this._listeningTo[id]; } return this; }; @@ -453,11 +425,9 @@ var Events = function () { if (property && !Events.Custom[property]) { Events.Custom[property] = property.toLowerCase().split('_').map(function (value, index) { - return index == 0 ? value : value = value[0].toUpperCase() + value.slice(1); + return index === 0 ? value : value = value[0].toUpperCase() + value.slice(1); }).join(''); - } else { - _log2.default.error('Events', 'Error when register event: ' + eventName); - } + } else _log2.default.error('Events', 'Error when register event: ' + eventName); }; Events.listAvailableCustomEvents = function listAvailableCustomEvents() { @@ -504,9 +474,7 @@ var listenMethods = { listenTo: 'on', listenToOnce: 'once' }; var listeningTo = this._listeningTo || (this._listeningTo = {}); var id = obj._listenId || (obj._listenId = (0, _utils.uniqueId)('l')); listeningTo[id] = obj; - if (!callback && (typeof name === 'undefined' ? 'undefined' : (0, _typeof3.default)(name)) === 'object') { - callback = this; - } + if (!callback && (typeof name === 'undefined' ? 'undefined' : (0, _typeof3.default)(name)) === 'object') callback = this; obj[listenMethods[method]](name, callback, this); return this; }; @@ -771,6 +739,12 @@ Events.PLAYBACK_PLAY = 'playback:play'; * @event PLAYBACK_PAUSE */ Events.PLAYBACK_PAUSE = 'playback:pause'; +/** + * Fired when the media for a playback is seeked. + * + * @event PLAYBACK_SEEKED + */ +Events.PLAYBACK_SEEKED = 'playback:seeked'; /** * Fired when the media for a playback is stopped. * @@ -957,6 +931,13 @@ Events.CONTAINER_MOUSE_LEAVE = 'container:mouseleave'; * @param {Number} time the current time in seconds */ Events.CONTAINER_SEEK = 'container:seek'; +/** + * Fired when the container was finished the seek video + * + * @event CONTAINER_SEEKED + * @param {Number} time the current time in seconds + */ +Events.CONTAINER_SEEKED = 'container:seeked'; Events.CONTAINER_VOLUME = 'container:volume'; Events.CONTAINER_FULLSCREEN = 'container:fullscreen'; /** @@ -1097,7 +1078,7 @@ var _defineProperty = __webpack_require__(70); var _defineProperty2 = _interopRequireDefault(_defineProperty); -var _getOwnPropertyDescriptor = __webpack_require__(125); +var _getOwnPropertyDescriptor = __webpack_require__(126); var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); @@ -1111,7 +1092,7 @@ exports.getBrowserLanguage = getBrowserLanguage; exports.now = now; exports.removeArrayItem = removeArrayItem; -__webpack_require__(128); +__webpack_require__(129); var _browser = __webpack_require__(13); @@ -1149,9 +1130,8 @@ function extend(parent, properties) { var _this = (0, _possibleConstructorReturn3.default)(this, _parent.call.apply(_parent, [this].concat(args))); - if (properties.initialize) { - properties.initialize.apply(_this, args); - } + if (properties.initialize) properties.initialize.apply(_this, args); + return _this; } @@ -1163,9 +1143,8 @@ function extend(parent, properties) { } function formatTime(time, paddedHours) { - if (!isFinite(time)) { - return '--:--'; - } + if (!isFinite(time)) return '--:--'; + time = time * 1000; time = parseInt(time / 1000); var seconds = time % 60; @@ -1177,13 +1156,9 @@ function formatTime(time, paddedHours) { var out = ''; if (days && days > 0) { out += days + ':'; - if (hours < 1) { - out += '00:'; - } - } - if (hours && hours > 0 || paddedHours) { - out += ('0' + hours).slice(-2) + ':'; + if (hours < 1) out += '00:'; } + if (hours && hours > 0 || paddedHours) out += ('0' + hours).slice(-2) + ':'; out += ('0' + minutes).slice(-2) + ':'; out += ('0' + seconds).slice(-2); return out.trim(); @@ -1194,34 +1169,12 @@ var Fullscreen = exports.Fullscreen = { return !!(document.webkitFullscreenElement || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement); }, requestFullscreen: function requestFullscreen(el) { - if (el.requestFullscreen) { - el.requestFullscreen(); - } else if (el.webkitRequestFullscreen) { - el.webkitRequestFullscreen(); - } else if (el.mozRequestFullScreen) { - el.mozRequestFullScreen(); - } else if (el.msRequestFullscreen) { - el.msRequestFullscreen(); - } else if (el.querySelector && el.querySelector('video') && el.querySelector('video').webkitEnterFullScreen) { - el.querySelector('video').webkitEnterFullScreen(); - } else if (el.webkitEnterFullScreen) { - el.webkitEnterFullScreen(); - } + if (el.requestFullscreen) el.requestFullscreen();else if (el.webkitRequestFullscreen) el.webkitRequestFullscreen();else if (el.mozRequestFullScreen) el.mozRequestFullScreen();else if (el.msRequestFullscreen) el.msRequestFullscreen();else if (el.querySelector && el.querySelector('video') && el.querySelector('video').webkitEnterFullScreen) el.querySelector('video').webkitEnterFullScreen();else if (el.webkitEnterFullScreen) el.webkitEnterFullScreen(); }, cancelFullscreen: function cancelFullscreen() { var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document; - if (el.exitFullscreen) { - el.exitFullscreen(); - } else if (el.webkitCancelFullScreen) { - el.webkitCancelFullScreen(); - } else if (el.webkitExitFullscreen) { - el.webkitExitFullscreen(); - } else if (el.mozCancelFullScreen) { - el.mozCancelFullScreen(); - } else if (el.msExitFullscreen) { - el.msExitFullscreen(); - } + if (el.exitFullscreen) el.exitFullscreen();else if (el.webkitCancelFullScreen) el.webkitCancelFullScreen();else if (el.webkitExitFullscreen) el.webkitExitFullscreen();else if (el.mozCancelFullScreen) el.mozCancelFullScreen();else if (el.msExitFullscreen) el.msExitFullscreen(); }, fullscreenEnabled: function fullscreenEnabled() { return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled); @@ -1255,9 +1208,8 @@ var Config = exports.Config = function () { }; Config.restore = function restore(key) { - if (_browser2.default.hasLocalstorage && localStorage[this._createKeyspace(key)]) { - return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]); - } + if (_browser2.default.hasLocalstorage && localStorage[this._createKeyspace(key)]) return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]); + return this._defaultValueFor(key); }; @@ -1340,6 +1292,7 @@ function seekStringToSeconds() { } else if (seekString) { seconds = parseInt(seekString, 10); } + return seconds; } @@ -1371,18 +1324,15 @@ function getBrowserLanguage() { } function now() { - if (window.performance && window.performance.now) { - return performance.now(); - } + if (window.performance && window.performance.now) return performance.now(); + return Date.now(); } // remove the item from the array if it exists in the array function removeArrayItem(arr, item) { var i = arr.indexOf(item); - if (i >= 0) { - arr.splice(i, 1); - } + if (i >= 0) arr.splice(i, 1); } // Simple Zepto element factory with video recycle feature. @@ -1398,9 +1348,8 @@ var DomRecycler = exports.DomRecycler = function () { }; DomRecycler.create = function create(name) { - if (this.options.recycleVideo && name === 'video' && videoStack.length > 0) { - return videoStack.shift(); - } + if (this.options.recycleVideo && name === 'video' && videoStack.length > 0) return videoStack.shift(); + return (0, _clapprZepto2.default)('<' + name + '>'); }; @@ -3364,39 +3313,85 @@ module.exports = Zepto /***/ }), /* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - +/***/ (function(module, exports) { -Object.defineProperty(exports, "__esModule", { - value: true -}); +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function(useSourceMap) { + var list = []; -var _clapprZepto = __webpack_require__(6); + // return the list of modules as css string + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item, useSourceMap); + if(item[2]) { + return "@media " + item[2] + "{" + content + "}"; + } else { + return content; + } + }).join(""); + }; -var _clapprZepto2 = _interopRequireDefault(_clapprZepto); + // import a list of modules into the list + list.i = function(modules, mediaQuery) { + if(typeof modules === "string") + modules = [[null, modules, ""]]; + var alreadyImportedModules = {}; + for(var i = 0; i < this.length; i++) { + var id = this[i][0]; + if(typeof id === "number") + alreadyImportedModules[id] = true; + } + for(i = 0; i < modules.length; i++) { + var item = modules[i]; + // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { + if(mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if(mediaQuery) { + item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; + } + list.push(item); + } + } + }; + return list; +}; -var _template = __webpack_require__(8); +function cssWithMappingToString(item, useSourceMap) { + var content = item[1] || ''; + var cssMapping = item[3]; + if (!cssMapping) { + return content; + } -var _template2 = _interopRequireDefault(_template); + if (useSourceMap && typeof btoa === 'function') { + var sourceMapping = toComment(cssMapping); + var sourceURLs = cssMapping.sources.map(function (source) { + return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' + }); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + } -// Copyright 2014 Globo.com Player authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. + return [content].join('\n'); +} -var Styler = { - getStyleFor: function getStyleFor(style) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { baseUrl: '' }; +// Adapted from convert-source-map (MIT) +function toComment(sourceMap) { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - return (0, _clapprZepto2.default)('').html((0, _template2.default)(style.toString())(options)); - } -}; + return '/*# ' + data + ' */'; +} -exports.default = Styler; -module.exports = exports['default']; /***/ }), /* 8 */ @@ -3453,9 +3448,7 @@ var htmlEntities = { var entityRe = new RegExp('[&<>"\']', 'g'); var escapeExpr = function escapeExpr(string) { - if (string === null) { - return ''; - } + if (string === null) return ''; return ('' + string).replace(entityRe, function (match) { return htmlEntities[match]; }); @@ -3480,24 +3473,19 @@ var tmpl = function tmpl(text, data) { return '\\' + escapes[match]; }); - if (escape) { - source += '\'+\n((__t=(' + escape + '))==null?\'\':escapeExpr(__t))+\n\''; - } - if (interpolate) { - source += '\'+\n((__t=(' + interpolate + '))==null?\'\':__t)+\n\''; - } - if (evaluate) { - source += '\';\n' + evaluate + '\n__p+=\''; - } + if (escape) source += '\'+\n((__t=(' + escape + '))==null?\'\':escapeExpr(__t))+\n\''; + + if (interpolate) source += '\'+\n((__t=(' + interpolate + '))==null?\'\':__t)+\n\''; + + if (evaluate) source += '\';\n' + evaluate + '\n__p+=\''; + index = offset + match.length; return match; }); source += '\';\n'; // If a variable is not specified, place data values in local scope. - if (!settings.variable) { - source = 'with(obj||{}){\n' + source + '}\n'; - } + if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = 'var __t,__p=\'\',__j=Array.prototype.join,' + 'print=function(){__p+=__j.call(arguments,\'\');};\n' + source + 'return __p;\n//# sourceURL=/microtemplates/source[' + counter++ + ']'; @@ -3510,9 +3498,7 @@ var tmpl = function tmpl(text, data) { throw e; } - if (data) { - return render(data, escapeExpr); - } + if (data) return render(data, escapeExpr); var template = function template(data) { return render.call(this, data, escapeExpr); }; @@ -3899,128 +3885,418 @@ module.exports = exports['default']; /***/ }), /* 10 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ -// css base code, injected by the css-loader -module.exports = function(useSourceMap) { - var list = []; - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - if(item[2]) { - return "@media " + item[2] + "{" + content + "}"; - } else { - return content; - } - }).join(""); +var stylesInDom = {}; + +var memoize = function (fn) { + var memo; + + return function () { + if (typeof memo === "undefined") memo = fn.apply(this, arguments); + return memo; }; +}; - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; +var isOldIE = memoize(function () { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + return window && document && document.all && !window.atob; +}); + +var getElement = (function (fn) { + var memo = {}; + + return function(selector) { + if (typeof memo[selector] === "undefined") { + var styleTarget = fn.call(this, selector); + // Special case to return head of iframe instead of iframe itself + if (styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch(e) { + styleTarget = null; } - list.push(item); } + memo[selector] = styleTarget; } + return memo[selector] }; - return list; -}; +})(function (target) { + return document.querySelector(target) +}); -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; - var cssMapping = item[3]; - if (!cssMapping) { - return content; - } +var singleton = null; +var singletonCounter = 0; +var stylesInsertedAtTop = []; - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' - }); +var fixUrls = __webpack_require__(140); - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); +module.exports = function(list, options) { + if (typeof DEBUG !== "undefined" && DEBUG) { + if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } - return [content].join('\n'); -} + options = options || {}; -// Adapted from convert-source-map (MIT) -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + options.attrs = typeof options.attrs === "object" ? options.attrs : {}; - return '/*# ' + data + ' */'; -} + // Force single-tag solution on IE6-9, which has a hard limit on the # of ').html((0, _template2.default)(style.toString())(options)); + } +}; + +exports.default = Styler; module.exports = exports['default']; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(153), __esModule: true }; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _loader = __webpack_require__(157); + +var _loader2 = _interopRequireDefault(_loader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _loader2.default; +module.exports = exports['default']; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(159), __esModule: true }; + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; exports.__esModule = true; -var _from = __webpack_require__(78); +var _from = __webpack_require__(79); var _from2 = _interopRequireDefault(_from); @@ -5981,7 +6270,7 @@ exports.default = function (arr) { }; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5991,7 +6280,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _flash = __webpack_require__(163); +var _flash = __webpack_require__(170); var _flash2 = _interopRequireDefault(_flash); @@ -6001,7 +6290,7 @@ exports.default = _flash2.default; module.exports = exports['default']; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6011,7 +6300,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _html5_audio = __webpack_require__(168); +var _html5_audio = __webpack_require__(176); var _html5_audio2 = _interopRequireDefault(_html5_audio); @@ -6021,7 +6310,7 @@ exports.default = _html5_audio2.default; module.exports = exports['default']; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6031,7 +6320,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _flashls = __webpack_require__(169); +var _flashls = __webpack_require__(177); var _flashls2 = _interopRequireDefault(_flashls); @@ -6041,7 +6330,7 @@ exports.default = _flashls2.default; module.exports = exports['default']; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6051,7 +6340,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _hls = __webpack_require__(172); +var _hls = __webpack_require__(180); var _hls2 = _interopRequireDefault(_hls); @@ -6061,7 +6350,7 @@ exports.default = _hls2.default; module.exports = exports['default']; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6071,7 +6360,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _html_img = __webpack_require__(174); +var _html_img = __webpack_require__(182); var _html_img2 = _interopRequireDefault(_html_img); @@ -6081,7 +6370,7 @@ exports.default = _html_img2.default; module.exports = exports['default']; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6091,7 +6380,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _no_op = __webpack_require__(176); +var _no_op = __webpack_require__(185); var _no_op2 = _interopRequireDefault(_no_op); @@ -6101,7 +6390,7 @@ exports.default = _no_op2.default; module.exports = exports['default']; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6111,7 +6400,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _poster = __webpack_require__(189); +var _poster = __webpack_require__(201); var _poster2 = _interopRequireDefault(_poster); @@ -6121,7 +6410,7 @@ exports.default = _poster2.default; module.exports = exports['default']; /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6131,7 +6420,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _player = __webpack_require__(88); +var _player = __webpack_require__(89); var _player2 = _interopRequireDefault(_player); @@ -6183,7 +6472,7 @@ var _core = __webpack_require__(72); var _core2 = _interopRequireDefault(_core); -var _loader = __webpack_require__(77); +var _loader = __webpack_require__(78); var _loader2 = _interopRequireDefault(_loader); @@ -6203,19 +6492,19 @@ var _base_flash_playback = __webpack_require__(59); var _base_flash_playback2 = _interopRequireDefault(_base_flash_playback); -var _flash = __webpack_require__(80); +var _flash = __webpack_require__(81); var _flash2 = _interopRequireDefault(_flash); -var _flashls = __webpack_require__(82); +var _flashls = __webpack_require__(83); var _flashls2 = _interopRequireDefault(_flashls); -var _hls = __webpack_require__(83); +var _hls = __webpack_require__(84); var _hls2 = _interopRequireDefault(_hls); -var _html5_audio = __webpack_require__(81); +var _html5_audio = __webpack_require__(82); var _html5_audio2 = _interopRequireDefault(_html5_audio); @@ -6223,15 +6512,15 @@ var _html5_video = __webpack_require__(35); var _html5_video2 = _interopRequireDefault(_html5_video); -var _html_img = __webpack_require__(84); +var _html_img = __webpack_require__(85); var _html_img2 = _interopRequireDefault(_html_img); -var _no_op = __webpack_require__(85); +var _no_op = __webpack_require__(86); var _no_op2 = _interopRequireDefault(_no_op); -var _poster = __webpack_require__(86); +var _poster = __webpack_require__(87); var _poster2 = _interopRequireDefault(_poster); @@ -6239,7 +6528,7 @@ var _log = __webpack_require__(55); var _log2 = _interopRequireDefault(_log); -var _styler = __webpack_require__(7); +var _styler = __webpack_require__(77); var _styler2 = _interopRequireDefault(_styler); @@ -6257,7 +6546,7 @@ var _clapprZepto2 = _interopRequireDefault(_clapprZepto); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var version = "0.2.71"; // Copyright 2014 Globo.com Player authors. All rights reserved. +var version = "0.2.80"; // Copyright 2014 Globo.com Player authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -6298,7 +6587,7 @@ exports.default = { module.exports = exports['default']; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6342,11 +6631,11 @@ var _browser = __webpack_require__(13); var _browser2 = _interopRequireDefault(_browser); -var _core_factory = __webpack_require__(131); +var _core_factory = __webpack_require__(132); var _core_factory2 = _interopRequireDefault(_core_factory); -var _loader = __webpack_require__(77); +var _loader = __webpack_require__(78); var _loader2 = _interopRequireDefault(_loader); @@ -6399,9 +6688,8 @@ var Player = function (_BaseObject) { this._loader = loader; }, get: function get() { - if (!this._loader) { - this._loader = new _loader2.default(this.options.plugins || {}, this.options.playerId); - } + if (!this._loader) this._loader = new _loader2.default(this.options.plugins || {}, this.options.playerId); + return this._loader; } @@ -6501,7 +6789,7 @@ var Player = function (_BaseObject) { * whether or not the player should handle click events when in chromeless mode **default**: `false` on desktops browsers, `true` on mobile. * @param {Boolean} [options.disableKeyboardShortcuts] * disable keyboard shortcuts. **default**: `false`. `true` if `allowUserInteraction` is `false`. - * @param {Boolean} [options.muted] + * @param {Boolean} [options.mute] * start the video muted **default**: `false` * @param {String} [options.mimeType] * add `mimeType: "application/vnd.apple.mpegurl"` if you need to use a url without extension. @@ -6570,11 +6858,8 @@ var Player = function (_BaseObject) { _this.playerInfo = _player_info2.default.getInstance(_this.options.playerId); _this.playerInfo.currentSize = { width: options.width, height: options.height }; _this.playerInfo.options = _this.options; - if (_this.options.parentId) { - _this.setParentId(_this.options.parentId); - } else if (_this.options.parent) { - _this.attachTo(_this.options.parent); - } + if (_this.options.parentId) _this.setParentId(_this.options.parentId);else if (_this.options.parent) _this.attachTo(_this.options.parent); + return _this; } @@ -6588,9 +6873,8 @@ var Player = function (_BaseObject) { Player.prototype.setParentId = function setParentId(parentId) { var el = document.querySelector(parentId); - if (el) { - this.attachTo(el); - } + if (el) this.attachTo(el); + return this; }; @@ -6610,11 +6894,8 @@ var Player = function (_BaseObject) { }; Player.prototype._addEventListeners = function _addEventListeners() { - if (!this.core.isReady) { - this.listenToOnce(this.core, _events2.default.CORE_READY, this._onReady); - } else { - this._onReady(); - } + if (!this.core.isReady) this.listenToOnce(this.core, _events2.default.CORE_READY, this._onReady);else this._onReady(); + this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this._containerChanged); this.listenTo(this.core, _events2.default.CORE_FULLSCREEN, this._onFullscreenChange); return this; @@ -6736,9 +7017,8 @@ var Player = function (_BaseObject) { Player.prototype.load = function load(sources, mimeType, autoPlay) { - if (autoPlay !== undefined) { - this.configure({ autoPlay: !!autoPlay }); - } + if (autoPlay !== undefined) this.configure({ autoPlay: !!autoPlay }); + this.core.load(sources, mimeType); return this; }; @@ -6838,9 +7118,8 @@ var Player = function (_BaseObject) { Player.prototype.setVolume = function setVolume(volume) { - if (this.core && this.core.mediaControl) { - this.core.mediaControl.setVolume(volume); - } + if (this.core && this.core.mediaControl) this.core.mediaControl.setVolume(volume); + return this; }; @@ -6989,14 +7268,14 @@ exports.default = Player; module.exports = exports['default']; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(90); +__webpack_require__(91); module.exports = __webpack_require__(11).Object.keys; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) @@ -7010,7 +7289,7 @@ __webpack_require__(62)('keys', function(){ }); /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings @@ -7020,14 +7299,14 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ }; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(14) , toLength = __webpack_require__(61) - , toIndex = __webpack_require__(93); + , toIndex = __webpack_require__(94); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) @@ -7046,7 +7325,7 @@ module.exports = function(IS_INCLUDES){ }; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(42) @@ -7058,7 +7337,7 @@ module.exports = function(index, length){ }; /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports) { module.exports = function(it){ @@ -7067,21 +7346,21 @@ module.exports = function(it){ }; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(96), __esModule: true }; +module.exports = { "default": __webpack_require__(97), __esModule: true }; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(65); -__webpack_require__(102); +__webpack_require__(103); module.exports = __webpack_require__(51).f('iterator'); /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(42) @@ -7103,7 +7382,7 @@ module.exports = function(TO_STRING){ }; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7122,7 +7401,7 @@ module.exports = function(Constructor, NAME, next){ }; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(16) @@ -7140,13 +7419,13 @@ module.exports = __webpack_require__(20) ? Object.defineProperties : function de }; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(15).document && document.documentElement; /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) @@ -7164,10 +7443,10 @@ module.exports = Object.getPrototypeOf || function(O){ }; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(103); +__webpack_require__(104); var global = __webpack_require__(15) , hide = __webpack_require__(22) , Iterators = __webpack_require__(29) @@ -7182,13 +7461,13 @@ for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList' } /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(104) - , step = __webpack_require__(105) +var addToUnscopables = __webpack_require__(105) + , step = __webpack_require__(106) , Iterators = __webpack_require__(29) , toIObject = __webpack_require__(14); @@ -7222,13 +7501,13 @@ addToUnscopables('values'); addToUnscopables('entries'); /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports) { module.exports = function(){ /* empty */ }; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports) { module.exports = function(done, value){ @@ -7236,23 +7515,23 @@ module.exports = function(done, value){ }; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(107), __esModule: true }; +module.exports = { "default": __webpack_require__(108), __esModule: true }; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(108); -__webpack_require__(114); +__webpack_require__(109); __webpack_require__(115); __webpack_require__(116); +__webpack_require__(117); module.exports = __webpack_require__(11).Symbol; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7263,7 +7542,7 @@ var global = __webpack_require__(15) , DESCRIPTORS = __webpack_require__(20) , $export = __webpack_require__(19) , redefine = __webpack_require__(67) - , META = __webpack_require__(109).KEY + , META = __webpack_require__(110).KEY , $fails = __webpack_require__(27) , shared = __webpack_require__(44) , setToStringTag = __webpack_require__(50) @@ -7271,15 +7550,15 @@ var global = __webpack_require__(15) , wks = __webpack_require__(12) , wksExt = __webpack_require__(51) , wksDefine = __webpack_require__(52) - , keyOf = __webpack_require__(110) - , enumKeys = __webpack_require__(111) - , isArray = __webpack_require__(112) + , keyOf = __webpack_require__(111) + , enumKeys = __webpack_require__(112) + , isArray = __webpack_require__(113) , anObject = __webpack_require__(23) , toIObject = __webpack_require__(14) , toPrimitive = __webpack_require__(47) , createDesc = __webpack_require__(28) , _create = __webpack_require__(49) - , gOPNExt = __webpack_require__(113) + , gOPNExt = __webpack_require__(114) , $GOPD = __webpack_require__(54) , $DP = __webpack_require__(16) , $keys = __webpack_require__(25) @@ -7493,7 +7772,7 @@ setToStringTag(Math, 'Math', true); setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(32)('meta') @@ -7551,7 +7830,7 @@ var meta = module.exports = { }; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(25) @@ -7566,7 +7845,7 @@ module.exports = function(object, el){ }; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols @@ -7586,7 +7865,7 @@ module.exports = function(it){ }; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) @@ -7596,7 +7875,7 @@ module.exports = Array.isArray || function isArray(arg){ }; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window @@ -7621,35 +7900,35 @@ module.exports.f = function getOwnPropertyNames(it){ /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports) { /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(52)('asyncIterator'); /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(52)('observable'); /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(118); +__webpack_require__(119); var $Object = __webpack_require__(11).Object; module.exports = function defineProperty(it, key, desc){ return $Object.defineProperty(it, key, desc); }; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(19); @@ -7657,28 +7936,28 @@ var $export = __webpack_require__(19); $export($export.S + $export.F * !__webpack_require__(20), 'Object', {defineProperty: __webpack_require__(16).f}); /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(120), __esModule: true }; +module.exports = { "default": __webpack_require__(121), __esModule: true }; /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(121); +__webpack_require__(122); module.exports = __webpack_require__(11).Object.setPrototypeOf; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(19); -$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(122).set}); +$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(123).set}); /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. @@ -7708,17 +7987,17 @@ module.exports = { }; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(124); +__webpack_require__(125); var $Object = __webpack_require__(11).Object; module.exports = function create(P, D){ return $Object.create(P, D); }; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(19) @@ -7726,23 +8005,23 @@ var $export = __webpack_require__(19) $export($export.S, 'Object', {create: __webpack_require__(49)}); /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(126), __esModule: true }; +module.exports = { "default": __webpack_require__(127), __esModule: true }; /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(127); +__webpack_require__(128); var $Object = __webpack_require__(11).Object; module.exports = function getOwnPropertyDescriptor(it, key){ return $Object.getOwnPropertyDescriptor(it, key); }; /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) @@ -7756,7 +8035,7 @@ __webpack_require__(62)('getOwnPropertyDescriptor', function(){ }); /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7773,13 +8052,12 @@ __webpack_require__(62)('getOwnPropertyDescriptor', function(){ * See also : https://tc39.github.io/ecma262/#sec-array.prototype.find */ if (!Array.prototype.find) { + // eslint-disable-next-line Object.defineProperty(Array.prototype, 'find', { // Note: ES6 arrow function syntax is not used on purpose to avoid this to be undefined value: function value(predicate) { // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } + if (this == null) throw new TypeError('"this" is null or not defined'); var o = Object(this); @@ -7787,9 +8065,7 @@ if (!Array.prototype.find) { var len = o.length >>> 0; // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } + if (typeof predicate !== 'function') throw new TypeError('predicate must be a function'); // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. var thisArg = arguments[1]; @@ -7804,9 +8080,8 @@ if (!Array.prototype.find) { // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). // d. If testResult is true, return kValue. var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return kValue; - } + if (predicate.call(thisArg, kValue, k, o)) return kValue; + // e. Increase k by 1. k++; } @@ -7818,7 +8093,7 @@ if (!Array.prototype.find) { } /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7895,9 +8170,7 @@ var Log = function () { this.level = this.offLevel; } // handle instances where console.log is unavailable - if (window.console && window.console.log) { - window.console.log('%c[Clappr.Log] set log level to ' + DESCRIPTIONS[this.level], WARN); - } + if (window.console && window.console.log) window.console.log('%c[Clappr.Log] set log level to ' + DESCRIPTIONS[this.level], WARN); }; Log.prototype.level = function level(newLevel) { @@ -7914,12 +8187,9 @@ var Log = function () { } var color = COLORS[level]; var klassDescription = ''; - if (klass) { - klassDescription = '[' + klass + ']'; - } - if (window.console && window.console.log) { - window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message)); - } + if (klass) klassDescription = '[' + klass + ']'; + + if (window.console && window.console.log) window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message)); }; return Log; @@ -7961,7 +8231,7 @@ Log.error = function () { module.exports = exports['default']; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8267,7 +8537,7 @@ exports.default = Kibo; module.exports = exports['default']; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8277,7 +8547,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _core_factory = __webpack_require__(132); +var _core_factory = __webpack_require__(133); var _core_factory2 = _interopRequireDefault(_core_factory); @@ -8287,7 +8557,7 @@ exports.default = _core_factory2.default; module.exports = exports['default']; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8407,7 +8677,7 @@ exports.default = CoreFactory; module.exports = exports['default']; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8439,10 +8709,6 @@ var _events = __webpack_require__(4); var _events2 = _interopRequireDefault(_events); -var _styler = __webpack_require__(7); - -var _styler2 = _interopRequireDefault(_styler); - var _ui_object = __webpack_require__(21); var _ui_object2 = _interopRequireDefault(_ui_object); @@ -8451,7 +8717,7 @@ var _browser = __webpack_require__(13); var _browser2 = _interopRequireDefault(_browser); -var _container_factory = __webpack_require__(134); +var _container_factory = __webpack_require__(135); var _container_factory2 = _interopRequireDefault(_container_factory); @@ -8467,16 +8733,28 @@ var _player_info = __webpack_require__(34); var _player_info2 = _interopRequireDefault(_player_info); +var _styler = __webpack_require__(77); + +var _styler2 = _interopRequireDefault(_styler); + var _clapprZepto = __webpack_require__(6); var _clapprZepto2 = _interopRequireDefault(_clapprZepto); -var _style = __webpack_require__(149); +__webpack_require__(153); + +var _fonts = __webpack_require__(155); -var _style2 = _interopRequireDefault(_style); +var _fonts2 = _interopRequireDefault(_fonts); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +// Copyright 2014 Globo.com Player authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +var style = void 0; + /** * The Core is responsible to manage Containers, the mediator, MediaControl * and the player state. @@ -8485,6 +8763,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @extends UIObject * @module components */ + var Core = function (_UIObject) { (0, _inherits3.default)(Core, _UIObject); (0, _createClass3.default)(Core, [{ @@ -8577,11 +8856,7 @@ var Core = function (_UIObject) { }; Core.prototype.updateSize = function updateSize() { - if (_utils.Fullscreen.isFullscreen()) { - this.setFullscreen(); - } else { - this.setPlayerSize(); - } + if (_utils.Fullscreen.isFullscreen()) this.setFullscreen();else this.setPlayerSize(); }; Core.prototype.setFullscreen = function setFullscreen() { @@ -8619,7 +8894,7 @@ var Core = function (_UIObject) { var _this3 = this; var checkSizeCallback = function checkSizeCallback() { - if (_this3.playerInfo.computedSize.width != _this3.el.clientWidth || _this3.playerInfo.computedSize.height != _this3.el.clientHeight) { + if (_this3.playerInfo.computedSize.width !== _this3.el.clientWidth || _this3.playerInfo.computedSize.height !== _this3.el.clientHeight) { _this3.playerInfo.computedSize = { width: _this3.el.clientWidth, height: _this3.el.clientHeight }; _this3.triggerResize(_this3.playerInfo.computedSize); } @@ -8744,7 +9019,7 @@ var Core = function (_UIObject) { this.renderContainers(); this.setupMediaControl(this.getCurrentContainer()); this.render(); - this.$el.appendTo(this.options.parentElement); + this.appendToParent(); return this.containers; }; @@ -8775,17 +9050,12 @@ var Core = function (_UIObject) { }; Core.prototype.createMediaControl = function createMediaControl(options) { - if (options.mediacontrol && options.mediacontrol.external) { - return new options.mediacontrol.external(options).render(); - } else { - return new _media_control2.default(options).render(); - } + if (options.mediacontrol && options.mediacontrol.external) return new options.mediacontrol.external(options).render();else return new _media_control2.default(options).render(); }; Core.prototype.getCurrentContainer = function getCurrentContainer() { - if (!this.mediaControl || !this.mediaControl.container) { - return this.containers[0]; - } + if (!this.mediaControl || !this.mediaControl.container) return this.containers[0]; + return this.mediaControl.container; }; @@ -8802,14 +9072,10 @@ var Core = function (_UIObject) { Core.prototype.toggleFullscreen = function toggleFullscreen() { if (!_utils.Fullscreen.isFullscreen()) { _utils.Fullscreen.requestFullscreen(this.el); - if (!_browser2.default.isiOS) { - this.$el.addClass('fullscreen'); - } + if (!_browser2.default.isiOS) this.$el.addClass('fullscreen'); } else { _utils.Fullscreen.cancelFullscreen(); - if (!_browser2.default.isiOS) { - this.$el.removeClass('fullscreen nocursor'); - } + if (!_browser2.default.isiOS) this.$el.removeClass('fullscreen nocursor'); } this.mediaControl.show(); }; @@ -8853,12 +9119,18 @@ var Core = function (_UIObject) { } }; + Core.prototype.appendToParent = function appendToParent() { + var hasCoreParent = this.$el.parent() && this.$el.parent().length; + !hasCoreParent && this.$el.appendTo(this.options.parentElement); + }; + Core.prototype.render = function render() { - this.$style && this.$style.remove(); - this.$style = _styler2.default.getStyleFor(_style2.default, { baseUrl: this.options.baseUrl }); - this.$el.append(this.$style); this.$el.append(this.mediaControl.render().el); + if (!style) style = _styler2.default.getStyleFor(_fonts2.default, { baseUrl: this.options.baseUrl }); + + (0, _clapprZepto2.default)('head').append(style); + this.options.width = this.options.width || this.$el.width(); this.options.height = this.options.height || this.$el.height(); var size = { width: this.options.width, height: this.options.height }; @@ -8873,15 +9145,13 @@ var Core = function (_UIObject) { }; return Core; -}(_ui_object2.default); // Copyright 2014 Globo.com Player authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +}(_ui_object2.default); exports.default = Core; module.exports = exports['default']; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8891,7 +9161,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _container_factory = __webpack_require__(135); +var _container_factory = __webpack_require__(136); var _container_factory2 = _interopRequireDefault(_container_factory); @@ -8901,7 +9171,7 @@ exports.default = _container_factory2.default; module.exports = exports['default']; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9000,9 +9270,7 @@ var ContainerFactory = function (_BaseObject) { mimeType = this.options.mimeType; if ((typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) === 'object') { resolvedSource = source.source.toString(); - if (source.mimeType) { - mimeType = source.mimeType; - } + if (source.mimeType) mimeType = source.mimeType; } else { resolvedSource = source.toString(); } @@ -9041,7 +9309,7 @@ exports.default = ContainerFactory; module.exports = exports['default']; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -9075,13 +9343,7 @@ var _ui_object = __webpack_require__(21); var _ui_object2 = _interopRequireDefault(_ui_object); -var _styler = __webpack_require__(7); - -var _styler2 = _interopRequireDefault(_styler); - -var _style = __webpack_require__(137); - -var _style2 = _interopRequireDefault(_style); +__webpack_require__(138); var _clapprZepto = __webpack_require__(6); @@ -9097,6 +9359,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @extends UIObject * @module base */ +// Copyright 2014 Globo.com Player authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/** + * Container is responsible for the video rendering and state + */ + var Container = function (_UIObject) { (0, _inherits3.default)(Container, _UIObject); (0, _createClass3.default)(Container, [{ @@ -9283,6 +9553,7 @@ var Container = function (_UIObject) { this.listenTo(this.playback, _events2.default.PLAYBACK_DVR, this.playbackDvrStateChanged); this.listenTo(this.playback, _events2.default.PLAYBACK_MEDIACONTROL_DISABLE, this.disableMediaControl); this.listenTo(this.playback, _events2.default.PLAYBACK_MEDIACONTROL_ENABLE, this.enableMediaControl); + this.listenTo(this.playback, _events2.default.PLAYBACK_SEEKED, this.onSeeked); this.listenTo(this.playback, _events2.default.PLAYBACK_ENDED, this.onEnded); this.listenTo(this.playback, _events2.default.PLAYBACK_PLAY, this.playing); this.listenTo(this.playback, _events2.default.PLAYBACK_PAUSE, this.paused); @@ -9389,9 +9660,8 @@ var Container = function (_UIObject) { }; Container.prototype.error = function error(errorObj) { - if (!this.isReady) { - this.ready(); - } + if (!this.isReady) this.ready(); + this.trigger(_events2.default.CONTAINER_ERROR, { error: errorObj, container: this }, this.name); }; @@ -9461,21 +9731,15 @@ var Container = function (_UIObject) { }; Container.prototype.clicked = function clicked() { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.trigger(_events2.default.CONTAINER_CLICK, this, this.name); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(_events2.default.CONTAINER_CLICK, this, this.name); }; Container.prototype.dblClicked = function dblClicked() { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.trigger(_events2.default.CONTAINER_DBLCLICK, this, this.name); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(_events2.default.CONTAINER_DBLCLICK, this, this.name); }; Container.prototype.onContextMenu = function onContextMenu(event) { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.trigger(_events2.default.CONTAINER_CONTEXTMENU, event, this.name); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(_events2.default.CONTAINER_CONTEXTMENU, event, this.name); }; Container.prototype.seek = function seek(time) { @@ -9483,6 +9747,10 @@ var Container = function (_UIObject) { this.playback.seek(time); }; + Container.prototype.onSeeked = function onSeeked() { + this.trigger(_events2.default.CONTAINER_SEEKED, this.name); + }; + Container.prototype.seekPercentage = function seekPercentage(percentage) { var duration = this.getDuration(); if (percentage >= 0 && percentage <= 100) { @@ -9546,15 +9814,11 @@ var Container = function (_UIObject) { }; Container.prototype.mouseEnter = function mouseEnter() { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.trigger(_events2.default.CONTAINER_MOUSE_ENTER); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(_events2.default.CONTAINER_MOUSE_ENTER); }; Container.prototype.mouseLeave = function mouseLeave() { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.trigger(_events2.default.CONTAINER_MOUSE_LEAVE); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.trigger(_events2.default.CONTAINER_MOUSE_LEAVE); }; Container.prototype.settingsUpdate = function settingsUpdate() { @@ -9585,11 +9849,7 @@ var Container = function (_UIObject) { }; Container.prototype.updateStyle = function updateStyle() { - if (!this.options.chromeless || this.options.allowUserInteraction) { - this.$el.removeClass('chromeless'); - } else { - this.$el.addClass('chromeless'); - } + if (!this.options.chromeless || this.options.allowUserInteraction) this.$el.removeClass('chromeless');else this.$el.addClass('chromeless'); }; /** @@ -9606,30 +9866,53 @@ var Container = function (_UIObject) { }; Container.prototype.render = function render() { - var s = _styler2.default.getStyleFor(_style2.default); - this.$el.append(s); this.$el.append(this.playback.render().el); this.updateStyle(); return this; }; return Container; -}(_ui_object2.default); // Copyright 2014 Globo.com Player authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/** - * Container is responsible for the video rendering and state - */ +}(_ui_object2.default); exports.default = Container; module.exports = exports['default']; /***/ }), -/* 137 */ +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// style-loader: Adds some css to the DOM by adding a