aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorMaZderMind2016-12-29 02:27:48 +0100
committerMaZderMind2016-12-29 02:27:48 +0100
commit5faaebf0454e2d35b5fccc55ef9685328680f780 (patch)
tree1054d3ea270b749215b4d381020e4ae014b8e5e9 /assets
parentb802ead38b52fa2306b480572518da20687d0d94 (diff)
parentca2b184b87dba5c0f382332116b277d5ed156878 (diff)
Merge branch 'feature/relive-js' into events/33c3
Diffstat (limited to 'assets')
-rw-r--r--assets/clapprio/38861cba61c66739c1452c3a71e39852.ttfbin0 -> 32652 bytes
-rw-r--r--assets/clapprio/4b76590b32dab62bc95c1b7951efae78.swfbin0 -> 3204 bytes
-rw-r--r--assets/clapprio/809981e5b09d5336c45d72d0869ada2a.swfbin0 -> 63602 bytes
-rw-r--r--assets/clapprio/a8c874b93b3d848f39a71260c57e3863.curbin0 -> 326 bytes
-rw-r--r--assets/clapprio/clappr.js31516
-rw-r--r--assets/clapprio/clappr.min.js16
-rw-r--r--assets/clapprio/clappr.min.js.map1
-rw-r--r--assets/css/_relive.less13
-rw-r--r--assets/js/lustiges-script.js36
9 files changed, 31565 insertions, 17 deletions
diff --git a/assets/clapprio/38861cba61c66739c1452c3a71e39852.ttf b/assets/clapprio/38861cba61c66739c1452c3a71e39852.ttf
new file mode 100644
index 0000000..7b25f3c
--- /dev/null
+++ b/assets/clapprio/38861cba61c66739c1452c3a71e39852.ttf
Binary files differ
diff --git a/assets/clapprio/4b76590b32dab62bc95c1b7951efae78.swf b/assets/clapprio/4b76590b32dab62bc95c1b7951efae78.swf
new file mode 100644
index 0000000..30bdf3d
--- /dev/null
+++ b/assets/clapprio/4b76590b32dab62bc95c1b7951efae78.swf
Binary files differ
diff --git a/assets/clapprio/809981e5b09d5336c45d72d0869ada2a.swf b/assets/clapprio/809981e5b09d5336c45d72d0869ada2a.swf
new file mode 100644
index 0000000..68619a7
--- /dev/null
+++ b/assets/clapprio/809981e5b09d5336c45d72d0869ada2a.swf
Binary files differ
diff --git a/assets/clapprio/a8c874b93b3d848f39a71260c57e3863.cur b/assets/clapprio/a8c874b93b3d848f39a71260c57e3863.cur
new file mode 100644
index 0000000..41aaa62
--- /dev/null
+++ b/assets/clapprio/a8c874b93b3d848f39a71260c57e3863.cur
Binary files differ
diff --git a/assets/clapprio/clappr.js b/assets/clapprio/clappr.js
new file mode 100644
index 0000000..1ee0b0a
--- /dev/null
+++ b/assets/clapprio/clappr.js
@@ -0,0 +1,31516 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["Clappr"] = factory();
+ else
+ root["Clappr"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "<%=baseUrl%>/";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _player = __webpack_require__(1);
+
+ var _player2 = _interopRequireDefault(_player);
+
+ var _utils = __webpack_require__(2);
+
+ var _utils2 = _interopRequireDefault(_utils);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _container_plugin = __webpack_require__(85);
+
+ var _container_plugin2 = _interopRequireDefault(_container_plugin);
+
+ var _core_plugin = __webpack_require__(105);
+
+ var _core_plugin2 = _interopRequireDefault(_core_plugin);
+
+ var _ui_core_plugin = __webpack_require__(100);
+
+ var _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);
+
+ var _ui_container_plugin = __webpack_require__(80);
+
+ var _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _container = __webpack_require__(22);
+
+ var _container2 = _interopRequireDefault(_container);
+
+ var _core = __webpack_require__(13);
+
+ var _core2 = _interopRequireDefault(_core);
+
+ var _loader = __webpack_require__(48);
+
+ var _loader2 = _interopRequireDefault(_loader);
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ var _media_control = __webpack_require__(27);
+
+ var _media_control2 = _interopRequireDefault(_media_control);
+
+ var _player_info = __webpack_require__(45);
+
+ var _player_info2 = _interopRequireDefault(_player_info);
+
+ var _base_flash_playback = __webpack_require__(56);
+
+ var _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);
+
+ var _flash = __webpack_require__(54);
+
+ var _flash2 = _interopRequireDefault(_flash);
+
+ var _flashls = __webpack_require__(63);
+
+ var _flashls2 = _interopRequireDefault(_flashls);
+
+ var _hls = __webpack_require__(67);
+
+ var _hls2 = _interopRequireDefault(_hls);
+
+ var _html5_audio = __webpack_require__(61);
+
+ var _html5_audio2 = _interopRequireDefault(_html5_audio);
+
+ var _html5_video = __webpack_require__(51);
+
+ var _html5_video2 = _interopRequireDefault(_html5_video);
+
+ var _html_img = __webpack_require__(71);
+
+ var _html_img2 = _interopRequireDefault(_html_img);
+
+ var _no_op = __webpack_require__(74);
+
+ var _no_op2 = _interopRequireDefault(_no_op);
+
+ var _poster = __webpack_require__(90);
+
+ var _poster2 = _interopRequireDefault(_poster);
+
+ var _log = __webpack_require__(6);
+
+ var _log2 = _interopRequireDefault(_log);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _vendor = __webpack_require__(8);
+
+ var _vendor2 = _interopRequireDefault(_vendor);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var version = ("0.2.64"); // 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.
+
+ exports.default = {
+ Player: _player2.default,
+ Mediator: _mediator2.default,
+ Events: _events2.default,
+ Browser: _browser2.default,
+ PlayerInfo: _player_info2.default,
+ MediaControl: _media_control2.default,
+ ContainerPlugin: _container_plugin2.default,
+ UIContainerPlugin: _ui_container_plugin2.default,
+ CorePlugin: _core_plugin2.default,
+ UICorePlugin: _ui_core_plugin2.default,
+ Playback: _playback2.default,
+ Container: _container2.default,
+ Core: _core2.default,
+ Loader: _loader2.default,
+ BaseObject: _base_object2.default,
+ UIObject: _ui_object2.default,
+ Utils: _utils2.default,
+ BaseFlashPlayback: _base_flash_playback2.default,
+ Flash: _flash2.default,
+ FlasHLS: _flashls2.default,
+ HLS: _hls2.default,
+ HTML5Audio: _html5_audio2.default,
+ HTML5Video: _html5_video2.default,
+ HTMLImg: _html_img2.default,
+ NoOp: _no_op2.default,
+ Poster: _poster2.default,
+ Log: _log2.default,
+ Styler: _styler2.default,
+ Vendor: _vendor2.default,
+ version: version,
+ template: _template2.default,
+ $: _clapprZepto2.default
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _core_factory = __webpack_require__(11);
+
+ var _core_factory2 = _interopRequireDefault(_core_factory);
+
+ var _loader = __webpack_require__(48);
+
+ var _loader2 = _interopRequireDefault(_loader);
+
+ var _player_info = __webpack_require__(45);
+
+ var _player_info2 = _interopRequireDefault(_player_info);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 baseUrl = (0, _utils.currentScriptUrl)().replace(/\/[^\/]+$/, '');
+
+ /**
+ * @class Player
+ * @constructor
+ * @extends BaseObject
+ * @module components
+ * @example
+ * ### Using the Player
+ *
+ * Add the following script on your HTML:
+ * ```html
+ * <head>
+ * <script type="text/javascript" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
+ * </head>
+ * ```
+ * Now, create the player:
+ * ```html
+ * <body>
+ * <div id="player"></div>
+ * <script>
+ * var player = new Clappr.Player({source: "http://your.video/here.mp4", parentId: "#player"});
+ * </script>
+ * </body>
+ * ```
+ */
+
+ var Player = function (_BaseObject) {
+ _inherits(Player, _BaseObject);
+
+ _createClass(Player, [{
+ key: 'loader',
+ set: function set(loader) {
+ this._loader = loader;
+ },
+ get: function get() {
+ if (!this._loader) {
+ this._loader = new _loader2.default(this.options.plugins || {}, this.options.playerId);
+ }
+ return this._loader;
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this.core.mediaControl.container.ended;
+ }
+
+ /**
+ * Determine if the playback is having to buffer in order for
+ * playback to be smooth.
+ * (i.e if a live stream is playing smoothly, this will be false)
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return this.core.mediaControl.container.buffering;
+ }
+
+ /*
+ * determine if the player is ready.
+ * @property isReady
+ * @type {Boolean} `true` if the player is ready. ie PLAYER_READY event has fired
+ */
+
+ }, {
+ key: 'isReady',
+ get: function get() {
+ return !!this._ready;
+ }
+
+ /**
+ * An events map that allows the user to add custom callbacks in player's options.
+ * @property eventsMapping
+ * @type {Object}
+ */
+
+ }, {
+ key: 'eventsMapping',
+ get: function get() {
+ return {
+ onReady: _events2.default.PLAYER_READY,
+ onResize: _events2.default.PLAYER_RESIZE,
+ onPlay: _events2.default.PLAYER_PLAY,
+ onPause: _events2.default.PLAYER_PAUSE,
+ onStop: _events2.default.PLAYER_STOP,
+ onEnded: _events2.default.PLAYER_ENDED,
+ onSeek: _events2.default.PLAYER_SEEK,
+ onError: _events2.default.PLAYER_ERROR,
+ onTimeUpdate: _events2.default.PLAYER_TIMEUPDATE,
+ onVolumeUpdate: _events2.default.PLAYER_VOLUMEUPDATE
+ };
+ }
+
+ /**
+ * ## Player's constructor
+ *
+ * You might pass the options object to build the player.
+ * ```javascript
+ * var options = {source: "http://example.com/video.mp4", param1: "val1"};
+ * var player = new Clappr.Player(options);
+ * ```
+ *
+ * @method constructor
+ * @param {Object} options Data
+ * options to build a player instance
+ * @param {Number} [options.width]
+ * player's width **default**: `640`
+ * @param {Number} [options.height]
+ * player's height **default**: `360`
+ * @param {String} [options.parentId]
+ * the id of the element on the page that the player should be inserted into
+ * @param {Object} [options.parent]
+ * a reference to a dom element that the player should be inserted into
+ * @param {String} [options.source]
+ * The media source URL, or {source: <<source URL>>, mimeType: <<source mime type>>}
+ * @param {Object} [options.sources]
+ * An array of media source URL's, or an array of {source: <<source URL>>, mimeType: <<source mime type>>}
+ * @param {Boolean} [options.autoPlay]
+ * automatically play after page load **default**: `false`
+ * @param {Boolean} [options.loop]
+ * automatically replay after it ends **default**: `false`
+ * @param {Boolean} [options.chromeless]
+ * player acts in chromeless mode **default**: `false`
+ * @param {Boolean} [options.allowUserInteraction]
+ * 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]
+ * 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.
+ * @param {String} [options.actualLiveTime]
+ * show duration and seek time relative to actual time.
+ * @param {String} [options.actualLiveServerTime]
+ * specify server time as a string, format: "2015/11/26 06:01:03". This option is meant to be used with actualLiveTime.
+ * @param {Boolean} [options.persistConfig]
+ * persist player's settings (volume) through the same domain **default**: `true`
+ * @param {String} [options.preload]
+ * video will be preloaded according to `preload` attribute options **default**: `'metadata'`
+ * @param {Number} [options.maxBufferLength]
+ * the default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.
+ * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.
+ * To change this behavior use `maxBufferLength` where **value is in seconds**.
+ * @param {String} [options.gaAccount]
+ * enable Google Analytics events dispatch **(play/pause/stop/buffering/etc)** by adding your `gaAccount`
+ * @param {String} [options.gaTrackerName]
+ * besides `gaAccount` you can optionally, pass your favorite trackerName as `gaTrackerName`
+ * @param {Object} [options.mediacontrol]
+ * customize control bar colors, example: `mediacontrol: {seekbar: "#E113D3", buttons: "#66B2FF"}`
+ * @param {Boolean} [options.hideMediaControl]
+ * control media control auto hide **default**: `true`
+ * @param {Boolean} [options.hideVolumeBar]
+ * when embedded with width less than 320, volume bar will hide. You can force this behavior for all sizes by adding `true` **default**: `false`
+ * @param {String} [options.watermark]
+ * put `watermark: 'http://url/img.png'` on your embed parameters to automatically add watermark on your video.
+ * You can customize corner position by defining position parameter. Positions can be `bottom-left`, `bottom-right`, `top-left` and `top-right`.
+ * @param {String} [options.watermarkLink]
+ * `watermarkLink: 'http://example.net/'` - define URL to open when the watermark is clicked. If not provided watermark will not be clickable.
+ * @param {Boolean} [options.disableVideoTagContextMenu]
+ * disables the context menu (right click) on the video element if a HTML5Video playback is used.
+ * @param {Boolean} [options.autoSeekFromUrl]
+ * Automatically seek to the seconds provided in the url (e.g example.com?t=100) **default**: `true`
+ * @param {Boolean} [options.exitFullscreenOnEnd]
+ * Automatically exit full screen when the media finishes. **default**: `true`
+ * @param {String} [options.poster]
+ * define a poster by adding its address `poster: 'http://url/img.png'`. It will appear after video embed, disappear on play and go back when user stops the video.
+ * @param {String} [options.playbackNotSupportedMessage]
+ * define a custom message to be displayed when a playback is not supported.
+ * @param {Object} [options.events]
+ * Specify listeners which will be registered with their corresponding player events.
+ * E.g. onReady -> "PLAYER_READY", onTimeUpdate -> "PLAYER_TIMEUPDATE"
+ */
+
+ }]);
+
+ function Player(options) {
+ _classCallCheck(this, Player);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));
+
+ var defaultOptions = { playerId: (0, _utils.uniqueId)(''), persistConfig: true, width: 640, height: 360, baseUrl: baseUrl, allowUserInteraction: _browser2.default.isMobile };
+ _this._options = _clapprZepto2.default.extend(defaultOptions, options);
+ _this.options.sources = _this._normalizeSources(options);
+ if (!_this.options.chromeless) {
+ // "allowUserInteraction" cannot be false if not in chromeless mode.
+ _this.options.allowUserInteraction = true;
+ }
+ if (!_this.options.allowUserInteraction) {
+ // if user iteraction is not allowed ensure keyboard shortcuts are disabled
+ _this.options.disableKeyboardShortcuts = true;
+ }
+ _this._registerOptionEventListeners();
+ _this._coreFactory = new _core_factory2.default(_this);
+ _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);
+ }
+ return _this;
+ }
+
+ /**
+ * Specify a `parentId` to the player.
+ * @method setParentId
+ * @param {String} parentId the element parent id.
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.setParentId = function setParentId(parentId) {
+ var el = document.querySelector(parentId);
+ if (el) {
+ this.attachTo(el);
+ }
+ return this;
+ };
+
+ /**
+ * You can use this method to attach the player to a given element. You don't need to do this when you specify it during the player instantiation passing the `parentId` param.
+ * @method attachTo
+ * @param {Object} element a given element.
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.attachTo = function attachTo(element) {
+ this.options.parentElement = element;
+ this.core = this._coreFactory.create();
+ this._addEventListeners();
+ return this;
+ };
+
+ Player.prototype._addEventListeners = function _addEventListeners() {
+ 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;
+ };
+
+ Player.prototype._addContainerEventListeners = function _addContainerEventListeners() {
+ var container = this.core.mediaControl.container;
+ if (container) {
+ this.listenTo(container, _events2.default.CONTAINER_PLAY, this._onPlay);
+ this.listenTo(container, _events2.default.CONTAINER_PAUSE, this._onPause);
+ this.listenTo(container, _events2.default.CONTAINER_STOP, this._onStop);
+ this.listenTo(container, _events2.default.CONTAINER_ENDED, this._onEnded);
+ this.listenTo(container, _events2.default.CONTAINER_SEEK, this._onSeek);
+ this.listenTo(container, _events2.default.CONTAINER_ERROR, this._onError);
+ this.listenTo(container, _events2.default.CONTAINER_TIMEUPDATE, this._onTimeUpdate);
+ this.listenTo(container, _events2.default.CONTAINER_VOLUME, this._onVolumeUpdate);
+ }
+ return this;
+ };
+
+ Player.prototype._registerOptionEventListeners = function _registerOptionEventListeners() {
+ var _this2 = this;
+
+ var userEvents = this.options.events || {};
+ Object.keys(userEvents).forEach(function (userEvent) {
+ var eventType = _this2.eventsMapping[userEvent];
+ if (eventType) {
+ var eventFunction = userEvents[userEvent];
+ eventFunction = typeof eventFunction === 'function' && eventFunction;
+ eventFunction && _this2.on(eventType, eventFunction);
+ }
+ });
+ return this;
+ };
+
+ Player.prototype._containerChanged = function _containerChanged() {
+ this.stopListening();
+ this._addEventListeners();
+ };
+
+ Player.prototype._onReady = function _onReady() {
+ this._ready = true;
+ this._addContainerEventListeners();
+ this.trigger(_events2.default.PLAYER_READY);
+ };
+
+ Player.prototype._onFullscreenChange = function _onFullscreenChange(fullscreen) {
+ this.trigger(_events2.default.PLAYER_FULLSCREEN, fullscreen);
+ };
+
+ Player.prototype._onVolumeUpdate = function _onVolumeUpdate(volume) {
+ this.trigger(_events2.default.PLAYER_VOLUMEUPDATE, volume);
+ };
+
+ Player.prototype._onPlay = function _onPlay() {
+ this.trigger(_events2.default.PLAYER_PLAY);
+ };
+
+ Player.prototype._onPause = function _onPause() {
+ this.trigger(_events2.default.PLAYER_PAUSE);
+ };
+
+ Player.prototype._onStop = function _onStop() {
+ this.trigger(_events2.default.PLAYER_STOP, this.getCurrentTime());
+ };
+
+ Player.prototype._onEnded = function _onEnded() {
+ this.trigger(_events2.default.PLAYER_ENDED);
+ };
+
+ Player.prototype._onSeek = function _onSeek(time) {
+ this.trigger(_events2.default.PLAYER_SEEK, time);
+ };
+
+ Player.prototype._onTimeUpdate = function _onTimeUpdate(timeProgress) {
+ this.trigger(_events2.default.PLAYER_TIMEUPDATE, timeProgress);
+ };
+
+ Player.prototype._onError = function _onError(error) {
+ this.trigger(_events2.default.PLAYER_ERROR, error);
+ };
+
+ Player.prototype._normalizeSources = function _normalizeSources(options) {
+ var sources = options.sources || (options.source !== undefined ? [options.source] : []);
+ return sources.length === 0 ? [{ source: '', mimeType: '' }] : sources;
+ };
+
+ /**
+ * resizes the current player canvas.
+ * @method resize
+ * @param {Object} size should be a literal object with `height` and `width`.
+ * @return {Player} itself
+ * @example
+ * ```javascript
+ * player.resize({height: 360, width: 640})
+ * ```
+ */
+
+
+ Player.prototype.resize = function resize(size) {
+ this.core.resize(size);
+ return this;
+ };
+
+ /**
+ * loads a new source.
+ * @method load
+ * @param {Array|String} sources source or sources of video.
+ * An array item can be a string or {source: <<source URL>>, mimeType: <<source mime type>>}
+ * @param {String} mimeType a mime type, example: `'application/vnd.apple.mpegurl'`
+ * @param {Boolean} [autoPlay=false] whether playing should be started immediately
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.load = function load(sources, mimeType, autoPlay) {
+ if (autoPlay !== undefined) {
+ this.configure({ autoPlay: !!autoPlay });
+ }
+ this.core.load(sources, mimeType);
+ return this;
+ };
+
+ /**
+ * destroys the current player and removes it from the DOM.
+ * @method destroy
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.destroy = function destroy() {
+ this.core.destroy();
+ return this;
+ };
+
+ /**
+ * plays the current video (`source`).
+ * @method play
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.play = function play() {
+ this.core.mediaControl.container.play();
+ return this;
+ };
+
+ /**
+ * pauses the current video (`source`).
+ * @method pause
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.pause = function pause() {
+ this.core.mediaControl.container.pause();
+ return this;
+ };
+
+ /**
+ * stops the current video (`source`).
+ * @method stop
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.stop = function stop() {
+ this.core.mediaControl.container.stop();
+ return this;
+ };
+
+ /**
+ * seeks the current video (`source`). For example, `player.seek(120)` will seek to second 120 (2minutes) of the current video.
+ * @method seek
+ * @param {Number} time should be a number between 0 and the video duration.
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.seek = function seek(time) {
+ this.core.mediaControl.container.seek(time);
+ return this;
+ };
+
+ /**
+ * seeks the current video (`source`). For example, `player.seek(50)` will seek to the middle of the current video.
+ * @method seekPercentage
+ * @param {Number} time should be a number between 0 and 100.
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.seekPercentage = function seekPercentage(percentage) {
+ this.core.mediaControl.container.seekPercentage(percentage);
+ return this;
+ };
+
+ /**
+ * Set the volume for the current video (`source`).
+ * @method setVolume
+ * @param {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.setVolume = function setVolume(volume) {
+ if (this.core && this.core.mediaControl) {
+ this.core.mediaControl.setVolume(volume);
+ }
+ return this;
+ };
+
+ /**
+ * Get the volume for the current video
+ * @method getVolume
+ * @return {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.
+ */
+
+
+ Player.prototype.getVolume = function getVolume() {
+ return this.core && this.core.mediaControl ? this.core.mediaControl.volume : 0;
+ };
+
+ /**
+ * mutes the current video (`source`).
+ * @method mute
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.mute = function mute() {
+ this._mutedVolume = this.getVolume();
+ this.setVolume(0);
+ return this;
+ };
+
+ /**
+ * unmutes the current video (`source`).
+ * @method unmute
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.unmute = function unmute() {
+ this.setVolume(typeof this._mutedVolume === 'number' ? this._mutedVolume : 100);
+ this._mutedVolume = null;
+ return this;
+ };
+
+ /**
+ * checks if the player is playing.
+ * @method isPlaying
+ * @return {Boolean} `true` if the current source is playing, otherwise `false`
+ */
+
+
+ Player.prototype.isPlaying = function isPlaying() {
+ return this.core.mediaControl.container.isPlaying();
+ };
+
+ /**
+ * returns `true` if DVR is enable otherwise `false`.
+ * @method isDvrEnabled
+ * @return {Boolean}
+ */
+
+
+ Player.prototype.isDvrEnabled = function isDvrEnabled() {
+ return this.core.mediaControl.container.isDvrEnabled();
+ };
+
+ /**
+ * returns `true` if DVR is in use otherwise `false`.
+ * @method isDvrInUse
+ * @return {Boolean}
+ */
+
+
+ Player.prototype.isDvrInUse = function isDvrInUse() {
+ return this.core.mediaControl.container.isDvrInUse();
+ };
+
+ /**
+ * enables to configure a player after its creation
+ * @method configure
+ * @param {Object} options all the options to change in form of a javascript object
+ * @return {Player} itself
+ */
+
+
+ Player.prototype.configure = function configure(options) {
+ this.core.configure(options);
+ return this;
+ };
+
+ /**
+ * get a plugin by its name.
+ * @method getPlugin
+ * @param {String} name of the plugin.
+ * @return {Object} the plugin instance
+ * @example
+ * ```javascript
+ * var poster = player.getPlugin('poster');
+ * poster.hidePlayButton();
+ * ```
+ */
+
+
+ Player.prototype.getPlugin = function getPlugin(name) {
+ var plugins = this.core.plugins.concat(this.core.mediaControl.container.plugins);
+ return plugins.filter(function (plugin) {
+ return plugin.name === name;
+ })[0];
+ };
+
+ /**
+ * the current time in seconds.
+ * @method getCurrentTime
+ * @return {Number} current time (in seconds) of the current source
+ */
+
+
+ Player.prototype.getCurrentTime = function getCurrentTime() {
+ return this.core.mediaControl.container.getCurrentTime();
+ };
+
+ /**
+ * The time that "0" now represents relative to when playback started.
+ * For a stream with a sliding window this will increase as content is
+ * removed from the beginning.
+ * @method getStartTimeOffset
+ * @return {Number} time (in seconds) that time "0" represents.
+ */
+
+
+ Player.prototype.getStartTimeOffset = function getStartTimeOffset() {
+ return this.core.mediaControl.container.getStartTimeOffset();
+ };
+
+ /**
+ * the duration time in seconds.
+ * @method getDuration
+ * @return {Number} duration time (in seconds) of the current source
+ */
+
+
+ Player.prototype.getDuration = function getDuration() {
+ return this.core.mediaControl.container.getDuration();
+ };
+
+ return Player;
+ }(_base_object2.default);
+
+ exports.default = Player;
+ module.exports = exports['default'];
+
+/***/ },
+/* 2 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.cancelAnimationFrame = exports.requestAnimationFrame = exports.QueryString = exports.Config = exports.Fullscreen = undefined;
+
+ 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; }; }();
+
+ exports.extend = extend;
+ exports.formatTime = formatTime;
+ exports.seekStringToSeconds = seekStringToSeconds;
+ exports.uniqueId = uniqueId;
+ exports.isNumber = isNumber;
+ exports.currentScriptUrl = currentScriptUrl;
+ exports.getBrowserLanguage = getBrowserLanguage;
+ exports.now = now;
+ exports.removeArrayItem = removeArrayItem;
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+ /*jshint -W079 */
+
+ function assign(obj, source) {
+ if (source) {
+ for (var prop in source) {
+ var propDescriptor = Object.getOwnPropertyDescriptor(source, prop);
+ propDescriptor ? Object.defineProperty(obj, prop, propDescriptor) : obj[prop] = source[prop];
+ }
+ }
+ return obj;
+ }
+
+ function extend(parent, properties) {
+ var Surrogate = function (_parent) {
+ _inherits(Surrogate, _parent);
+
+ function Surrogate() {
+ _classCallCheck(this, Surrogate);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var _this = _possibleConstructorReturn(this, _parent.call.apply(_parent, [this].concat(args)));
+
+ if (properties.initialize) {
+ properties.initialize.apply(_this, args);
+ }
+ return _this;
+ }
+
+ return Surrogate;
+ }(parent);
+
+ assign(Surrogate.prototype, properties);
+ return Surrogate;
+ }
+
+ function formatTime(time, paddedHours) {
+ if (!isFinite(time)) {
+ return '--:--';
+ }
+ time = time * 1000;
+ time = parseInt(time / 1000);
+ var seconds = time % 60;
+ time = parseInt(time / 60);
+ var minutes = time % 60;
+ time = parseInt(time / 60);
+ var hours = time % 24;
+ var days = parseInt(time / 24);
+ var out = '';
+ if (days && days > 0) {
+ out += days + ':';
+ 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();
+ }
+
+ var Fullscreen = exports.Fullscreen = {
+ isFullscreen: function isFullscreen() {
+ 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();
+ }
+ },
+ cancelFullscreen: function cancelFullscreen() {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.webkitCancelFullScreen) {
+ document.webkitCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ }
+ },
+ fullscreenEnabled: function fullscreenEnabled() {
+ return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
+ }
+ };
+
+ var Config = exports.Config = function () {
+ function Config() {
+ _classCallCheck(this, Config);
+ }
+
+ Config._defaultConfig = function _defaultConfig() {
+ return {
+ volume: {
+ value: 100,
+ parse: parseInt
+ }
+ };
+ };
+
+ Config._defaultValueFor = function _defaultValueFor(key) {
+ try {
+ return this._defaultConfig()[key].parse(this._defaultConfig()[key].value);
+ } catch (e) {
+ return undefined;
+ }
+ };
+
+ Config._createKeyspace = function _createKeyspace(key) {
+ return 'clappr.' + document.domain + '.' + key;
+ };
+
+ Config.restore = function restore(key) {
+ if (_browser2.default.hasLocalstorage && localStorage[this._createKeyspace(key)]) {
+ return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]);
+ }
+ return this._defaultValueFor(key);
+ };
+
+ Config.persist = function persist(key, value) {
+ if (_browser2.default.hasLocalstorage) {
+ try {
+ localStorage[this._createKeyspace(key)] = value;
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
+ };
+
+ return Config;
+ }();
+
+ var QueryString = exports.QueryString = function () {
+ function QueryString() {
+ _classCallCheck(this, QueryString);
+ }
+
+ QueryString.parse = function parse(paramsString) {
+ var match = void 0;
+ var pl = /\+/g,
+ // Regex for replacing addition symbol with a space
+ search = /([^&=]+)=?([^&]*)/g,
+ decode = function decode(s) {
+ return decodeURIComponent(s.replace(pl, ' '));
+ },
+ params = {};
+ while (match = search.exec(paramsString)) {
+ // eslint-disable-line no-cond-assign
+ params[decode(match[1]).toLowerCase()] = decode(match[2]);
+ }
+ return params;
+ };
+
+ _createClass(QueryString, null, [{
+ key: 'params',
+ get: function get() {
+ var query = window.location.search.substring(1);
+ if (query !== this.query) {
+ this._urlParams = this.parse(query);
+ this.query = query;
+ }
+ return this._urlParams;
+ }
+ }, {
+ key: 'hashParams',
+ get: function get() {
+ var hash = window.location.hash.substring(1);
+ if (hash !== this.hash) {
+ this._hashParams = this.parse(hash);
+ this.hash = hash;
+ }
+ return this._hashParams;
+ }
+ }]);
+
+ return QueryString;
+ }();
+
+ function seekStringToSeconds() {
+ var paramName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 't';
+
+ var seconds = 0;
+ var seekString = QueryString.params[paramName] || QueryString.hashParams[paramName] || '';
+ var parts = seekString.match(/[0-9]+[hms]+/g) || [];
+ if (parts.length > 0) {
+ (function () {
+ var factor = { 'h': 3600, 'm': 60, 's': 1 };
+ parts.forEach(function (el) {
+ if (el) {
+ var suffix = el[el.length - 1];
+ var time = parseInt(el.slice(0, el.length - 1), 10);
+ seconds += time * factor[suffix];
+ }
+ });
+ })();
+ } else if (seekString) {
+ seconds = parseInt(seekString, 10);
+ }
+ return seconds;
+ }
+
+ var idsCounter = {};
+
+ function uniqueId(prefix) {
+ idsCounter[prefix] || (idsCounter[prefix] = 0);
+ var id = ++idsCounter[prefix];
+ return prefix + id;
+ }
+
+ function isNumber(value) {
+ return value - parseFloat(value) + 1 >= 0;
+ }
+
+ function currentScriptUrl() {
+ var scripts = document.getElementsByTagName('script');
+ return scripts.length ? scripts[scripts.length - 1].src : '';
+ }
+
+ var requestAnimationFrame = exports.requestAnimationFrame = (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
+ window.setTimeout(fn, 1000 / 60);
+ }).bind(window);
+
+ var cancelAnimationFrame = exports.cancelAnimationFrame = (window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout).bind(window);
+
+ function getBrowserLanguage() {
+ return window.navigator && window.navigator.language;
+ }
+
+ function 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);
+ }
+ }
+
+ exports.default = {
+ Config: Config,
+ Fullscreen: Fullscreen,
+ QueryString: QueryString,
+ extend: extend,
+ formatTime: formatTime,
+ seekStringToSeconds: seekStringToSeconds,
+ uniqueId: uniqueId,
+ currentScriptUrl: currentScriptUrl,
+ isNumber: isNumber,
+ requestAnimationFrame: requestAnimationFrame,
+ cancelAnimationFrame: cancelAnimationFrame,
+ getBrowserLanguage: getBrowserLanguage,
+ now: now,
+ removeArrayItem: removeArrayItem
+ };
+
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ // 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 Browser = {};
+
+ var hasLocalstorage = function hasLocalstorage() {
+ try {
+ localStorage.setItem('clappr', 'clappr');
+ localStorage.removeItem('clappr');
+ return true;
+ } catch (e) {
+ return false;
+ }
+ };
+
+ var hasFlash = function hasFlash() {
+ try {
+ var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
+ return !!fo;
+ } catch (e) {
+ return !!(navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] !== undefined && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin);
+ }
+ };
+
+ var getBrowserInfo = function getBrowserInfo() {
+ var ua = navigator.userAgent;
+ var parts = ua.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [],
+ extra = void 0;
+ if (/trident/i.test(parts[1])) {
+ extra = /\brv[ :]+(\d+)/g.exec(ua) || [];
+ return { name: 'IE', version: parseInt(extra[1] || '') };
+ } else if (parts[1] === 'Chrome') {
+ extra = ua.match(/\bOPR\/(\d+)/);
+ if (extra != null) {
+ return { name: 'Opera', version: parseInt(extra[1]) };
+ }
+ }
+ parts = parts[2] ? [parts[1], parts[2]] : [navigator.appName, navigator.appVersion, '-?'];
+
+ if (extra = ua.match(/version\/(\d+)/i)) {
+ parts.splice(1, 1, extra[1]);
+ }
+ return { name: parts[0], version: parseInt(parts[1]) };
+ };
+
+ var browserInfo = getBrowserInfo();
+
+ Browser.isSafari = /safari/i.test(navigator.userAgent) && navigator.userAgent.indexOf('Chrome') === -1;
+ Browser.isChrome = /chrome/i.test(navigator.userAgent);
+ Browser.isFirefox = /firefox/i.test(navigator.userAgent);
+ Browser.isLegacyIE = !!window.ActiveXObject;
+ Browser.isIE = Browser.isLegacyIE || /trident.*rv:1\d/i.test(navigator.userAgent);
+ Browser.isIE11 = /trident.*rv:11/i.test(navigator.userAgent);
+ Browser.isChromecast = Browser.isChrome && /CrKey/i.test(navigator.userAgent);
+ Browser.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Opera Mini/i.test(navigator.userAgent);
+ Browser.isiOS = /iPad|iPhone|iPod/i.test(navigator.userAgent);
+ Browser.isAndroid = /Android/i.test(navigator.userAgent);
+ Browser.isWindowsPhone = /Windows Phone/i.test(navigator.userAgent);
+ Browser.isWin8App = /MSAppHost/i.test(navigator.userAgent);
+ Browser.isWiiU = /WiiU/i.test(navigator.userAgent);
+ Browser.isPS4 = /PlayStation 4/i.test(navigator.userAgent);
+ Browser.hasLocalstorage = hasLocalstorage();
+ Browser.hasFlash = hasFlash();
+
+ Browser.name = browserInfo.name;
+ Browser.version = browserInfo.version;
+
+ exports.default = Browser;
+ module.exports = exports['default'];
+
+/***/ },
+/* 4 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * @class BaseObject
+ * @constructor
+ * @extends Events
+ * @module base
+ */
+ var BaseObject = function (_Events) {
+ _inherits(BaseObject, _Events);
+
+ _createClass(BaseObject, [{
+ key: 'options',
+
+ /**
+ * returns the object options
+ * @property options
+ * @type Object
+ */
+ get: function get() {
+ return this._options;
+ }
+
+ /**
+ * @method constructor
+ * @param {Object} options
+ */
+
+ }]);
+
+ function BaseObject() {
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+ _classCallCheck(this, BaseObject);
+
+ var _this = _possibleConstructorReturn(this, _Events.call(this, options));
+
+ _this._options = options;
+ _this.uniqueId = (0, _utils.uniqueId)('o');
+ return _this;
+ }
+ /**
+ * a unique id prefixed with `'o'`, `o1, o232`
+ *
+ * @property uniqueId
+ * @type String
+ */
+
+
+ return BaseObject;
+ }(_events2.default);
+
+ exports.default = BaseObject;
+ module.exports = exports['default'];
+
+/***/ },
+/* 5 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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; }; // 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 _log = __webpack_require__(6);
+
+ var _log2 = _interopRequireDefault(_log);
+
+ var _utils = __webpack_require__(2);
+
+ var _lodash = __webpack_require__(10);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ 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 slice = Array.prototype.slice;
+
+ var eventSplitter = /\s+/;
+
+ var eventsApi = function eventsApi(obj, action, name, rest) {
+ if (!name) {
+ return true;
+ }
+
+ // Handle event maps.
+ if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
+ for (var key in name) {
+ obj[action].apply(obj, [key, name[key]].concat(rest));
+ }
+ return false;
+ }
+
+ // Handle space separated event names.
+ if (eventSplitter.test(name)) {
+ 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 true;
+ };
+
+ var triggerEvents = function triggerEvents(events, args, klass, name) {
+ var ev = void 0,
+ i = -1;
+ var l = events.length,
+ a1 = args[0],
+ a2 = args[1],
+ a3 = args[2];
+ run();
+
+ function run() {
+ try {
+ switch (args.length) {
+ case 0:
+ while (++i < l) {
+ (ev = events[i]).callback.call(ev.ctx);
+ }return;
+ case 1:
+ while (++i < l) {
+ (ev = events[i]).callback.call(ev.ctx, a1);
+ }return;
+ case 2:
+ while (++i < l) {
+ (ev = events[i]).callback.call(ev.ctx, a1, a2);
+ }return;
+ case 3:
+ while (++i < l) {
+ (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);
+ }return;
+ default:
+ while (++i < l) {
+ (ev = events[i]).callback.apply(ev.ctx, args);
+ }return;
+ }
+ } catch (exception) {
+ _log2.default.error.apply(_log2.default, [klass, 'error on event', name, 'trigger', '-', exception]);
+ run();
+ }
+ }
+ };
+
+ /**
+ * @class Events
+ * @constructor
+ * @module base
+ */
+
+ var Events = function () {
+ function Events() {
+ _classCallCheck(this, Events);
+ }
+
+ /**
+ * listen to an event indefinitely, if you want to stop you need to call `off`
+ * @method on
+ * @param {String} name
+ * @param {Function} callback
+ * @param {Object} context
+ */
+ Events.prototype.on = function on(name, callback, context) {
+ 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 });
+ return this;
+ };
+
+ /**
+ * listen to an event only once
+ * @method once
+ * @param {String} name
+ * @param {Function} callback
+ * @param {Object} context
+ */
+
+
+ Events.prototype.once = function once(name, callback, context) {
+ if (!eventsApi(this, 'once', name, [callback, context]) || !callback) {
+ return this;
+ }
+ var self = this;
+ var once = (0, _lodash2.default)(function () {
+ self.off(name, once);
+ callback.apply(this, arguments);
+ });
+ once._callback = callback;
+ return this.on(name, once, context);
+ };
+
+ /**
+ * stop listening to an event
+ * @method off
+ * @param {String} name
+ * @param {Function} callback
+ * @param {Object} context
+ */
+
+
+ Events.prototype.off = function off(name, callback, context) {
+ var retain = void 0,
+ ev = void 0,
+ events = void 0,
+ names = void 0,
+ i = void 0,
+ l = void 0,
+ j = void 0,
+ k = void 0;
+ if (!this._events || !eventsApi(this, 'off', name, [callback, context])) {
+ return this;
+ }
+ if (!name && !callback && !context) {
+ this._events = void 0;
+ return this;
+ }
+ names = name ? [name] : Object.keys(this._events);
+ // jshint maxdepth:5
+ for (i = 0, l = names.length; i < l; i++) {
+ name = names[i];
+ events = this._events[name];
+ if (events) {
+ this._events[name] = retain = [];
+ 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 (!retain.length) {
+ delete this._events[name];
+ }
+ }
+ }
+ return this;
+ };
+
+ /**
+ * triggers an event given its `name`
+ * @method trigger
+ * @param {String} name
+ */
+
+
+ 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;
+ }
+ var args = slice.call(arguments, 1);
+ 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);
+ }
+ return this;
+ };
+
+ /**
+ * stop listening an event for a given object
+ * @method stopListening
+ * @param {Object} obj
+ * @param {String} name
+ * @param {Function} callback
+ */
+
+
+ Events.prototype.stopListening = function stopListening(obj, name, callback) {
+ var listeningTo = this._listeningTo;
+ if (!listeningTo) {
+ return this;
+ }
+ var remove = !name && !callback;
+ if (!callback && (typeof name === 'undefined' ? 'undefined' : _typeof(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 || Object.keys(obj._events).length === 0) {
+ delete this._listeningTo[id];
+ }
+ }
+ return this;
+ };
+
+ return Events;
+ }();
+
+ /**
+ * listen to an event indefinitely for a given `obj`
+ * @method listenTo
+ * @param {Object} obj
+ * @param {String} name
+ * @param {Function} callback
+ * @param {Object} context
+ * @example
+ * ```javascript
+ * this.listenTo(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)
+ * ```
+ */
+ /**
+ * listen to an event once for a given `obj`
+ * @method listenToOnce
+ * @param {Object} obj
+ * @param {String} name
+ * @param {Function} callback
+ * @param {Object} context
+ * @example
+ * ```javascript
+ * this.listenToOnce(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)
+ * ```
+ */
+
+
+ exports.default = Events;
+ var listenMethods = { listenTo: 'on', listenToOnce: 'once' };
+
+ Object.keys(listenMethods).forEach(function (method) {
+ Events.prototype[method] = function (obj, name, callback) {
+ 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' : _typeof(name)) === 'object') {
+ callback = this;
+ }
+ obj[listenMethods[method]](name, callback, this);
+ return this;
+ };
+ });
+
+ // PLAYER EVENTS
+ /**
+ * Fired when the player is ready on startup
+ *
+ * @event PLAYER_READY
+ */
+ Events.PLAYER_READY = 'ready';
+ /**
+ * Fired when player resizes
+ *
+ * @event PLAYER_RESIZE
+ * @param {Object} currentSize an object with the current size
+ */
+ Events.PLAYER_RESIZE = 'resize';
+ /**
+ * Fired when player changes its fullscreen state
+ *
+ * @event PLAYER_FULLSCREEN
+ * @param {Boolean} whether or not the player is on fullscreen mode
+ */
+ Events.PLAYER_FULLSCREEN = 'fullscreen';
+ /**
+ * Fired when player starts to play
+ *
+ * @event PLAYER_PLAY
+ */
+ Events.PLAYER_PLAY = 'play';
+ /**
+ * Fired when player pauses
+ *
+ * @event PLAYER_PAUSE
+ */
+ Events.PLAYER_PAUSE = 'pause';
+ /**
+ * Fired when player stops
+ *
+ * @event PLAYER_STOP
+ */
+ Events.PLAYER_STOP = 'stop';
+ /**
+ * Fired when player ends the video
+ *
+ * @event PLAYER_ENDED
+ */
+ Events.PLAYER_ENDED = 'ended';
+ /**
+ * Fired when player seeks the video
+ *
+ * @event PLAYER_SEEK
+ * @param {Number} time the current time in seconds
+ */
+ Events.PLAYER_SEEK = 'seek';
+ /**
+ * Fired when player receives an error
+ *
+ * @event PLAYER_ERROR
+ * @param {Object} error the error
+ */
+ Events.PLAYER_ERROR = 'error';
+ /**
+ * Fired when the time is updated on player
+ *
+ * @event PLAYER_TIMEUPDATE
+ * @param {Object} progress Data
+ * progress object
+ * @param {Number} [progress.current]
+ * current time
+ * @param {Number} [progress.total]
+ * total time
+ */
+ Events.PLAYER_TIMEUPDATE = 'timeupdate';
+ /**
+ * Fired when player updates its volume
+ *
+ * @event PLAYER_VOLUMEUPDATE
+ * @param {Number} volume the current volume
+ */
+ Events.PLAYER_VOLUMEUPDATE = 'volumeupdate';
+
+ // Playback Events
+ /**
+ * Fired when the playback is downloading the media
+ *
+ * @event PLAYBACK_PROGRESS
+ * @param progress {Object}
+ * Data progress object
+ * @param [progress.start] {Number}
+ * start position of buffered content at current position
+ * @param [progress.current] {Number}
+ * end position of buffered content at current position
+ * @param [progress.total] {Number}
+ * total content to be downloaded
+ * @param buffered {Array}
+ * array of buffered segments ({start, end}). [Only for supported playbacks]
+ */
+ Events.PLAYBACK_PROGRESS = 'playback:progress';
+ /**
+ * Fired when the time is updated on playback
+ *
+ * @event PLAYBACK_TIMEUPDATE
+ * @param {Object} progress Data
+ * progress object
+ * @param {Number} [progress.current]
+ * current time
+ * @param {Number} [progress.total]
+ * total time
+ */
+ Events.PLAYBACK_TIMEUPDATE = 'playback:timeupdate';
+ /**
+ * Fired when playback is ready
+ *
+ * @event PLAYBACK_READY
+ */
+ Events.PLAYBACK_READY = 'playback:ready';
+ /**
+ * Fired when the playback starts having to buffer because
+ * playback can currently not be smooth.
+ *
+ * This corresponds to the playback `buffering` property being
+ * `true`.
+ *
+ * @event PLAYBACK_BUFFERING
+ */
+ Events.PLAYBACK_BUFFERING = 'playback:buffering';
+ /**
+ * Fired when the playback has enough in the buffer to be
+ * able to play smoothly, after previously being unable to
+ * do this.
+ *
+ * This corresponds to the playback `buffering` property being
+ * `false`.
+ *
+ * @event PLAYBACK_BUFFERFULL
+ */
+ Events.PLAYBACK_BUFFERFULL = 'playback:bufferfull';
+ /**
+ * Fired when playback changes any settings (volume, seek and etc)
+ *
+ * @event PLAYBACK_SETTINGSUPDATE
+ */
+ Events.PLAYBACK_SETTINGSUPDATE = 'playback:settingsupdate';
+ /**
+ * Fired when playback loaded its metadata
+ *
+ * @event PLAYBACK_LOADEDMETADATA
+ * @param {Object} metadata Data
+ * settings object
+ * @param {Number} [metadata.duration]
+ * the playback duration
+ * @param {Object} [metadata.data]
+ * extra meta data
+ */
+ Events.PLAYBACK_LOADEDMETADATA = 'playback:loadedmetadata';
+ /**
+ * Fired when playback updates its video quality
+ *
+ * @event PLAYBACK_HIGHDEFINITIONUPDATE
+ * @param {Boolean} isHD
+ * true when is on HD, false otherwise
+ */
+ Events.PLAYBACK_HIGHDEFINITIONUPDATE = 'playback:highdefinitionupdate';
+ /**
+ * Fired when playback updates its bitrate
+ *
+ * @event PLAYBACK_BITRATE
+ * @param {Object} bitrate Data
+ * bitrate object
+ * @param {Number} [bitrate.bandwidth]
+ * bitrate bandwidth when it's available
+ * @param {Number} [bitrate.width]
+ * playback width (ex: 720, 640, 1080)
+ * @param {Number} [bitrate.height]
+ * playback height (ex: 240, 480, 720)
+ * @param {Number} [bitrate.level]
+ * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)
+ */
+ Events.PLAYBACK_BITRATE = 'playback:bitrate';
+ /**
+ * Fired when the playback has its levels
+ *
+ * @event PLAYBACK_LEVELS_AVAILABLE
+ * @param {Array} levels
+ * the ordered levels, each one with the following format `{id: 1, label: '500kbps'}` ps: id should be a number >= 0
+ * @param {Number} initial
+ * the initial level otherwise -1 (AUTO)
+ */
+ Events.PLAYBACK_LEVELS_AVAILABLE = 'playback:levels:available';
+ /**
+ * Fired when the playback starts to switch level
+ *
+ * @event PLAYBACK_LEVEL_SWITCH_START
+ *
+ */
+ Events.PLAYBACK_LEVEL_SWITCH_START = 'playback:levels:switch:start';
+ /**
+ * Fired when the playback ends the level switch
+ *
+ * @event PLAYBACK_LEVEL_SWITCH_END
+ *
+ */
+ Events.PLAYBACK_LEVEL_SWITCH_END = 'playback:levels:switch:end';
+
+ /**
+ * Fired when playback internal state changes
+ *
+ * @event PLAYBACK_PLAYBACKSTATE
+ * @param {Object} state Data
+ * state object
+ * @param {String} [state.type]
+ * the playback type
+ */
+ Events.PLAYBACK_PLAYBACKSTATE = 'playback:playbackstate';
+ /**
+ * Fired when DVR becomes enabled/disabled.
+ *
+ * @event PLAYBACK_DVR
+ * @param {boolean} state true if dvr enabled
+ */
+ Events.PLAYBACK_DVR = 'playback:dvr';
+ // TODO doc
+ Events.PLAYBACK_MEDIACONTROL_DISABLE = 'playback:mediacontrol:disable';
+ // TODO doc
+ Events.PLAYBACK_MEDIACONTROL_ENABLE = 'playback:mediacontrol:enable';
+ /**
+ * Fired when the media for a playback ends.
+ *
+ * @event PLAYBACK_ENDED
+ * @param {String} name the name of the playback
+ */
+ Events.PLAYBACK_ENDED = 'playback:ended';
+ /**
+ * Fired when user requests `play()`
+ *
+ * @event PLAYBACK_PLAY_INTENT
+ */
+ Events.PLAYBACK_PLAY_INTENT = 'playback:play:intent';
+ /**
+ * Fired when the media for a playback starts playing.
+ * This is not necessarily when the user requests `play()`
+ * The media may have to buffer first.
+ * I.e. `isPlaying()` might return `true` before this event is fired,
+ * because `isPlaying()` represents the intended state.
+ *
+ * @event PLAYBACK_PLAY
+ */
+ Events.PLAYBACK_PLAY = 'playback:play';
+ /**
+ * Fired when the media for a playback pauses.
+ *
+ * @event PLAYBACK_PAUSE
+ */
+ Events.PLAYBACK_PAUSE = 'playback:pause';
+ /**
+ * Fired when the media for a playback is stopped.
+ *
+ * @event PLAYBACK_STOP
+ */
+ Events.PLAYBACK_STOP = 'playback:stop';
+ /**
+ * Fired if an error occurs in the playback.
+ *
+ * @event PLAYBACK_ERROR
+ * @param {Object} error An object containing the error details
+ * @param {String} name Playback name
+ */
+ Events.PLAYBACK_ERROR = 'playback:error';
+ // TODO doc
+ Events.PLAYBACK_STATS_ADD = 'playback:stats:add';
+ // TODO doc
+ Events.PLAYBACK_FRAGMENT_LOADED = 'playback:fragment:loaded';
+ // TODO doc
+ Events.PLAYBACK_LEVEL_SWITCH = 'playback:level:switch';
+
+ /**
+ * Fired when the options were changed for the core
+ *
+ * @event CORE_OPTIONS_CHANGE
+ */
+ Events.CORE_OPTIONS_CHANGE = 'core:options:change';
+ /**
+ * Fired after creating containers, when the core is ready
+ *
+ * @event CORE_READY
+ */
+ Events.CORE_READY = 'core:ready';
+ /**
+ * Fired when the fullscreen state change
+ *
+ * @param {Boolean} whether or not the player is on fullscreen mode
+ * @event CORE_READY
+ */
+ Events.CORE_FULLSCREEN = 'core:fullscreen';
+
+ // Container Events
+ /**
+ * Fired when the container internal state changes
+ *
+ * @event CONTAINER_PLAYBACKSTATE
+ * @param {Object} state Data
+ * state object
+ * @param {String} [state.type]
+ * the playback type
+ */
+ Events.CONTAINER_PLAYBACKSTATE = 'container:playbackstate';
+ Events.CONTAINER_PLAYBACKDVRSTATECHANGED = 'container:dvr';
+ /**
+ * Fired when the container updates its bitrate
+ *
+ * @event CONTAINER_BITRATE
+ * @param {Object} bitrate Data
+ * bitrate object
+ * @param {Number} [bitrate.bandwidth]
+ * bitrate bandwidth when it's available
+ * @param {Number} [bitrate.width]
+ * playback width (ex: 720, 640, 1080)
+ * @param {Number} [bitrate.height]
+ * playback height (ex: 240, 480, 720)
+ * @param {Number} [bitrate.level]
+ * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)
+ */
+ Events.CONTAINER_BITRATE = 'container:bitrate';
+ Events.CONTAINER_STATS_REPORT = 'container:stats:report';
+ Events.CONTAINER_DESTROYED = 'container:destroyed';
+ /**
+ * Fired when the container is ready
+ *
+ * @event CONTAINER_READY
+ */
+ Events.CONTAINER_READY = 'container:ready';
+ Events.CONTAINER_ERROR = 'container:error';
+ /**
+ * Fired when the container loaded its metadata
+ *
+ * @event CONTAINER_LOADEDMETADATA
+ * @param {Object} metadata Data
+ * settings object
+ * @param {Number} [metadata.duration]
+ * the playback duration
+ * @param {Object} [metadata.data]
+ * extra meta data
+ */
+ Events.CONTAINER_LOADEDMETADATA = 'container:loadedmetadata';
+ /**
+ * Fired when the time is updated on container
+ *
+ * @event CONTAINER_TIMEUPDATE
+ * @param {Object} progress Data
+ * progress object
+ * @param {Number} [progress.current]
+ * current time
+ * @param {Number} [progress.total]
+ * total time
+ */
+ Events.CONTAINER_TIMEUPDATE = 'container:timeupdate';
+ /**
+ * Fired when the container is downloading the media
+ *
+ * @event CONTAINER_PROGRESS
+ * @param {Object} progress Data
+ * progress object
+ * @param {Number} [progress.start]
+ * initial downloaded content
+ * @param {Number} [progress.current]
+ * current dowloaded content
+ * @param {Number} [progress.total]
+ * total content to be downloaded
+ */
+ Events.CONTAINER_PROGRESS = 'container:progress';
+ Events.CONTAINER_PLAY = 'container:play';
+ Events.CONTAINER_STOP = 'container:stop';
+ Events.CONTAINER_PAUSE = 'container:pause';
+ Events.CONTAINER_ENDED = 'container:ended';
+ Events.CONTAINER_CLICK = 'container:click';
+ Events.CONTAINER_DBLCLICK = 'container:dblclick';
+ Events.CONTAINER_CONTEXTMENU = 'container:contextmenu';
+ Events.CONTAINER_MOUSE_ENTER = 'container:mouseenter';
+ Events.CONTAINER_MOUSE_LEAVE = 'container:mouseleave';
+ /**
+ * Fired when the container seeks the video
+ *
+ * @event CONTAINER_SEEK
+ * @param {Number} time the current time in seconds
+ */
+ Events.CONTAINER_SEEK = 'container:seek';
+ Events.CONTAINER_VOLUME = 'container:volume';
+ Events.CONTAINER_FULLSCREEN = 'container:fullscreen';
+ /**
+ * Fired when container is buffering
+ *
+ * @event CONTAINER_STATE_BUFFERING
+ */
+ Events.CONTAINER_STATE_BUFFERING = 'container:state:buffering';
+ /**
+ * Fired when the container filled the buffer
+ *
+ * @event CONTAINER_STATE_BUFFERFULL
+ */
+ Events.CONTAINER_STATE_BUFFERFULL = 'container:state:bufferfull';
+ /**
+ * Fired when the container changes any settings (volume, seek and etc)
+ *
+ * @event CONTAINER_SETTINGSUPDATE
+ */
+ Events.CONTAINER_SETTINGSUPDATE = 'container:settingsupdate';
+ /**
+ * Fired when container updates its video quality
+ *
+ * @event CONTAINER_HIGHDEFINITIONUPDATE
+ * @param {Boolean} isHD
+ * true when is on HD, false otherwise
+ */
+ Events.CONTAINER_HIGHDEFINITIONUPDATE = 'container:highdefinitionupdate';
+
+ /**
+ * Fired when the media control shows
+ *
+ * @event CONTAINER_MEDIACONTROL_SHOW
+ */
+ Events.CONTAINER_MEDIACONTROL_SHOW = 'container:mediacontrol:show';
+ /**
+ * Fired when the media control hides
+ *
+ * @event CONTAINER_MEDIACONTROL_HIDE
+ */
+ Events.CONTAINER_MEDIACONTROL_HIDE = 'container:mediacontrol:hide';
+
+ Events.CONTAINER_MEDIACONTROL_DISABLE = 'container:mediacontrol:disable';
+ Events.CONTAINER_MEDIACONTROL_ENABLE = 'container:mediacontrol:enable';
+ Events.CONTAINER_STATS_ADD = 'container:stats:add';
+ /**
+ * Fired when the options were changed for the container
+ *
+ * @event CONTAINER_OPTIONS_CHANGE
+ */
+ Events.CONTAINER_OPTIONS_CHANGE = 'container:options:change';
+
+ // MediaControl Events
+ Events.MEDIACONTROL_RENDERED = 'mediacontrol:rendered';
+ /**
+ * Fired when the player enters/exit on fullscreen
+ *
+ * @event MEDIACONTROL_FULLSCREEN
+ */
+ Events.MEDIACONTROL_FULLSCREEN = 'mediacontrol:fullscreen';
+ /**
+ * Fired when the media control shows
+ *
+ * @event MEDIACONTROL_SHOW
+ */
+ Events.MEDIACONTROL_SHOW = 'mediacontrol:show';
+ /**
+ * Fired when the media control hides
+ *
+ * @event MEDIACONTROL_HIDE
+ */
+ Events.MEDIACONTROL_HIDE = 'mediacontrol:hide';
+ /**
+ * Fired when mouse enters on the seekbar
+ *
+ * @event MEDIACONTROL_MOUSEMOVE_SEEKBAR
+ * @param {Object} event
+ * the javascript event
+ */
+ Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR = 'mediacontrol:mousemove:seekbar';
+ /**
+ * Fired when mouse leaves the seekbar
+ *
+ * @event MEDIACONTROL_MOUSELEAVE_SEEKBAR
+ * @param {Object} event
+ * the javascript event
+ */
+ Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR = 'mediacontrol:mouseleave:seekbar';
+ /**
+ * Fired when the media is being played
+ *
+ * @event MEDIACONTROL_PLAYING
+ */
+ Events.MEDIACONTROL_PLAYING = 'mediacontrol:playing';
+ /**
+ * Fired when the media is not being played
+ *
+ * @event MEDIACONTROL_NOTPLAYING
+ */
+ Events.MEDIACONTROL_NOTPLAYING = 'mediacontrol:notplaying';
+ /**
+ * Fired when the container was changed
+ *
+ * @event MEDIACONTROL_CONTAINERCHANGED
+ */
+ Events.MEDIACONTROL_CONTAINERCHANGED = 'mediacontrol:containerchanged';
+
+ // Core Events
+ Events.CORE_CONTAINERS_CREATED = 'core:containers:created';
+ module.exports = exports['default'];
+
+/***/ },
+/* 6 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(7);
+
+/***/ },
+/* 7 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _vendor = __webpack_require__(8);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+
+ var BOLD = 'font-weight: bold; font-size: 13px;';
+ var INFO = 'color: #006600;' + BOLD;
+ var DEBUG = 'color: #0000ff;' + BOLD;
+ var WARN = 'color: #ff8000;' + BOLD;
+ var ERROR = 'color: #ff0000;' + BOLD;
+
+ var LEVEL_DEBUG = 0;
+ var LEVEL_INFO = 1;
+ var LEVEL_WARN = 2;
+ var LEVEL_ERROR = 3;
+ var LEVEL_DISABLED = LEVEL_ERROR;
+
+ var COLORS = [DEBUG, INFO, WARN, ERROR, ERROR];
+ var DESCRIPTIONS = ['debug', 'info', 'warn', 'error', 'disabled'];
+
+ var Log = function () {
+ function Log() {
+ var _this = this;
+
+ var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LEVEL_INFO;
+ var offLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LEVEL_DISABLED;
+
+ _classCallCheck(this, Log);
+
+ this.kibo = new _vendor.Kibo();
+ this.kibo.down(['ctrl shift d'], function () {
+ return _this.onOff();
+ });
+ this.BLACKLIST = ['timeupdate', 'playback:timeupdate', 'playback:progress', 'container:hover', 'container:timeupdate', 'container:progress'];
+ this.level = level;
+ this.offLevel = offLevel;
+ }
+
+ Log.prototype.debug = function debug(klass) {
+ this.log(klass, LEVEL_DEBUG, Array.prototype.slice.call(arguments, 1));
+ };
+
+ Log.prototype.info = function info(klass) {
+ this.log(klass, LEVEL_INFO, Array.prototype.slice.call(arguments, 1));
+ };
+
+ Log.prototype.warn = function warn(klass) {
+ this.log(klass, LEVEL_WARN, Array.prototype.slice.call(arguments, 1));
+ };
+
+ Log.prototype.error = function error(klass) {
+ this.log(klass, LEVEL_ERROR, Array.prototype.slice.call(arguments, 1));
+ };
+
+ Log.prototype.onOff = function onOff() {
+ if (this.level === this.offLevel) {
+ this.level = this.previousLevel;
+ } else {
+ this.previousLevel = this.level;
+ 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);
+ }
+ };
+
+ Log.prototype.level = function level(newLevel) {
+ this.level = newLevel;
+ };
+
+ Log.prototype.log = function log(klass, level, message) {
+ if (this.BLACKLIST.indexOf(message[0]) >= 0) return;
+ if (level < this.level) return;
+
+ if (!message) {
+ message = klass;
+ klass = null;
+ }
+ 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));
+ }
+ };
+
+ return Log;
+ }();
+
+ exports.default = Log;
+
+
+ Log.LEVEL_DEBUG = LEVEL_DEBUG;
+ Log.LEVEL_INFO = LEVEL_INFO;
+ Log.LEVEL_WARN = LEVEL_WARN;
+ Log.LEVEL_ERROR = LEVEL_ERROR;
+
+ Log.getInstance = function () {
+ if (this._instance === undefined) {
+ this._instance = new this();
+ this._instance.previousLevel = this._instance.level;
+ this._instance.level = this._instance.offLevel;
+ }
+ return this._instance;
+ };
+
+ Log.setLevel = function (level) {
+ this.getInstance().level = level;
+ };
+
+ Log.debug = function () {
+ this.getInstance().debug.apply(this.getInstance(), arguments);
+ };
+ Log.info = function () {
+ this.getInstance().info.apply(this.getInstance(), arguments);
+ };
+ Log.warn = function () {
+ this.getInstance().warn.apply(this.getInstance(), arguments);
+ };
+ Log.error = function () {
+ this.getInstance().error.apply(this.getInstance(), arguments);
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 8 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _kibo = __webpack_require__(9);
+
+ var _kibo2 = _interopRequireDefault(_kibo);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = { Kibo: _kibo2.default };
+ module.exports = exports['default'];
+
+/***/ },
+/* 9 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ /* eslint-disable */
+ // Kibo is released under the MIT License. Copyright (c) 2013 marquete.
+ // see https://github.com/marquete/kibo
+
+ var Kibo = function Kibo(element) {
+ this.element = element || window.document;
+ this.initialize();
+ };
+
+ Kibo.KEY_NAMES_BY_CODE = {
+ 8: 'backspace', 9: 'tab', 13: 'enter',
+ 16: 'shift', 17: 'ctrl', 18: 'alt',
+ 20: 'caps_lock',
+ 27: 'esc',
+ 32: 'space',
+ 37: 'left', 38: 'up', 39: 'right', 40: 'down',
+ 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9',
+ 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j',
+ 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't',
+ 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 112: 'f1', 113: 'f2', 114: 'f3',
+ 115: 'f4', 116: 'f5', 117: 'f6', 118: 'f7', 119: 'f8', 120: 'f9', 121: 'f10', 122: 'f11', 123: 'f12'
+ };
+
+ Kibo.KEY_CODES_BY_NAME = {};
+ (function () {
+ for (var key in Kibo.KEY_NAMES_BY_CODE) {
+ if (Object.prototype.hasOwnProperty.call(Kibo.KEY_NAMES_BY_CODE, key)) {
+ Kibo.KEY_CODES_BY_NAME[Kibo.KEY_NAMES_BY_CODE[key]] = +key;
+ }
+ }
+ })();
+
+ Kibo.MODIFIERS = ['shift', 'ctrl', 'alt'];
+
+ Kibo.registerEvent = function () {
+ if (document.addEventListener) {
+ return function (element, eventName, func) {
+ element.addEventListener(eventName, func, false);
+ };
+ } else if (document.attachEvent) {
+ return function (element, eventName, func) {
+ element.attachEvent('on' + eventName, func);
+ };
+ }
+ }();
+
+ Kibo.unregisterEvent = function () {
+ if (document.removeEventListener) {
+ return function (element, eventName, func) {
+ element.removeEventListener(eventName, func, false);
+ };
+ } else if (document.detachEvent) {
+ return function (element, eventName, func) {
+ element.detachEvent('on' + eventName, func);
+ };
+ }
+ }();
+
+ Kibo.stringContains = function (string, substring) {
+ return string.indexOf(substring) !== -1;
+ };
+
+ Kibo.neatString = function (string) {
+ return string.replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ');
+ };
+
+ Kibo.capitalize = function (string) {
+ return string.toLowerCase().replace(/^./, function (match) {
+ return match.toUpperCase();
+ });
+ };
+
+ Kibo.isString = function (what) {
+ return Kibo.stringContains(Object.prototype.toString.call(what), 'String');
+ };
+
+ Kibo.arrayIncludes = function () {
+ if (Array.prototype.indexOf) {
+ return function (haystack, needle) {
+ return haystack.indexOf(needle) !== -1;
+ };
+ } else {
+ return function (haystack, needle) {
+ for (var i = 0; i < haystack.length; i++) {
+ if (haystack[i] === needle) {
+ return true;
+ }
+ }
+ return false;
+ };
+ }
+ }();
+
+ Kibo.extractModifiers = function (keyCombination) {
+ var modifiers, i;
+ modifiers = [];
+ for (i = 0; i < Kibo.MODIFIERS.length; i++) {
+ if (Kibo.stringContains(keyCombination, Kibo.MODIFIERS[i])) {
+ modifiers.push(Kibo.MODIFIERS[i]);
+ }
+ }
+ return modifiers;
+ };
+
+ Kibo.extractKey = function (keyCombination) {
+ var keys, i;
+ keys = Kibo.neatString(keyCombination).split(' ');
+ for (i = 0; i < keys.length; i++) {
+ if (!Kibo.arrayIncludes(Kibo.MODIFIERS, keys[i])) {
+ return keys[i];
+ }
+ }
+ };
+
+ Kibo.modifiersAndKey = function (keyCombination) {
+ var result, key;
+
+ if (Kibo.stringContains(keyCombination, 'any')) {
+ return Kibo.neatString(keyCombination).split(' ').slice(0, 2).join(' ');
+ }
+
+ result = Kibo.extractModifiers(keyCombination);
+
+ key = Kibo.extractKey(keyCombination);
+ if (key && !Kibo.arrayIncludes(Kibo.MODIFIERS, key)) {
+ result.push(key);
+ }
+
+ return result.join(' ');
+ };
+
+ Kibo.keyName = function (keyCode) {
+ return Kibo.KEY_NAMES_BY_CODE[keyCode + ''];
+ };
+
+ Kibo.keyCode = function (keyName) {
+ return +Kibo.KEY_CODES_BY_NAME[keyName];
+ };
+
+ Kibo.prototype.initialize = function () {
+ var i,
+ that = this;
+
+ this.lastKeyCode = -1;
+ this.lastModifiers = {};
+ for (i = 0; i < Kibo.MODIFIERS.length; i++) {
+ this.lastModifiers[Kibo.MODIFIERS[i]] = false;
+ }
+
+ this.keysDown = { any: [] };
+ this.keysUp = { any: [] };
+ this.downHandler = this.handler('down');
+ this.upHandler = this.handler('up');
+
+ Kibo.registerEvent(this.element, 'keydown', this.downHandler);
+ Kibo.registerEvent(this.element, 'keyup', this.upHandler);
+ Kibo.registerEvent(window, 'unload', function unloader() {
+ Kibo.unregisterEvent(that.element, 'keydown', that.downHandler);
+ Kibo.unregisterEvent(that.element, 'keyup', that.upHandler);
+ Kibo.unregisterEvent(window, 'unload', unloader);
+ });
+ };
+
+ Kibo.prototype.handler = function (upOrDown) {
+ var that = this;
+ return function (e) {
+ var i, registeredKeys, lastModifiersAndKey;
+
+ e = e || window.event;
+
+ that.lastKeyCode = e.keyCode;
+ for (i = 0; i < Kibo.MODIFIERS.length; i++) {
+ that.lastModifiers[Kibo.MODIFIERS[i]] = e[Kibo.MODIFIERS[i] + 'Key'];
+ }
+ if (Kibo.arrayIncludes(Kibo.MODIFIERS, Kibo.keyName(that.lastKeyCode))) {
+ that.lastModifiers[Kibo.keyName(that.lastKeyCode)] = true;
+ }
+
+ registeredKeys = that['keys' + Kibo.capitalize(upOrDown)];
+
+ for (i = 0; i < registeredKeys.any.length; i++) {
+ if (registeredKeys.any[i](e) === false && e.preventDefault) {
+ e.preventDefault();
+ }
+ }
+
+ lastModifiersAndKey = that.lastModifiersAndKey();
+ if (registeredKeys[lastModifiersAndKey]) {
+ for (i = 0; i < registeredKeys[lastModifiersAndKey].length; i++) {
+ if (registeredKeys[lastModifiersAndKey][i](e) === false && e.preventDefault) {
+ e.preventDefault();
+ }
+ }
+ }
+ };
+ };
+
+ Kibo.prototype.registerKeys = function (upOrDown, newKeys, func) {
+ var i,
+ keys,
+ registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];
+
+ if (Kibo.isString(newKeys)) {
+ newKeys = [newKeys];
+ }
+
+ for (i = 0; i < newKeys.length; i++) {
+ keys = newKeys[i];
+ keys = Kibo.modifiersAndKey(keys + '');
+
+ if (registeredKeys[keys]) {
+ registeredKeys[keys].push(func);
+ } else {
+ registeredKeys[keys] = [func];
+ }
+ }
+
+ return this;
+ };
+
+ // jshint maxdepth:5
+ Kibo.prototype.unregisterKeys = function (upOrDown, newKeys, func) {
+ var i,
+ j,
+ keys,
+ registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];
+
+ if (Kibo.isString(newKeys)) {
+ newKeys = [newKeys];
+ }
+
+ for (i = 0; i < newKeys.length; i++) {
+ keys = newKeys[i];
+ keys = Kibo.modifiersAndKey(keys + '');
+
+ if (func === null) {
+ delete registeredKeys[keys];
+ } else {
+ if (registeredKeys[keys]) {
+ for (j = 0; j < registeredKeys[keys].length; j++) {
+ if (String(registeredKeys[keys][j]) === String(func)) {
+ registeredKeys[keys].splice(j, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ };
+
+ Kibo.prototype.off = function (keys) {
+ return this.unregisterKeys('down', keys, null);
+ };
+
+ Kibo.prototype.delegate = function (upOrDown, keys, func) {
+ return func !== null || func !== undefined ? this.registerKeys(upOrDown, keys, func) : this.unregisterKeys(upOrDown, keys, func);
+ };
+
+ Kibo.prototype.down = function (keys, func) {
+ return this.delegate('down', keys, func);
+ };
+
+ Kibo.prototype.up = function (keys, func) {
+ return this.delegate('up', keys, func);
+ };
+
+ Kibo.prototype.lastKey = function (modifier) {
+ if (!modifier) {
+ return Kibo.keyName(this.lastKeyCode);
+ }
+
+ return this.lastModifiers[modifier];
+ };
+
+ Kibo.prototype.lastModifiersAndKey = function () {
+ var result, i;
+
+ result = [];
+ for (i = 0; i < Kibo.MODIFIERS.length; i++) {
+ if (this.lastKey(Kibo.MODIFIERS[i])) {
+ result.push(Kibo.MODIFIERS[i]);
+ }
+ }
+
+ if (!Kibo.arrayIncludes(result, this.lastKey())) {
+ result.push(this.lastKey());
+ }
+
+ return result.join(' ');
+ };
+
+ exports.default = Kibo;
+ module.exports = exports['default'];
+
+/***/ },
+/* 10 */
+/***/ function(module, exports) {
+
+ /**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** `Object#toString` result references. */
+ var symbolTag = '[object Symbol]';
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseInt = parseInt;
+
+ /** Used for built-in method references. */
+ var objectProto = Object.prototype;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => Allows adding up to 4 contacts to the list.
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // => `createApplication` is invoked once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+ }
+
+ /**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+ function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+ function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ module.exports = once;
+
+
+/***/ },
+/* 11 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(12);
+
+/***/ },
+/* 12 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _core = __webpack_require__(13);
+
+ var _core2 = _interopRequireDefault(_core);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * The Core Factory is responsible for instantiate the core and it's plugins.
+ * @class CoreFactory
+ * @constructor
+ * @extends BaseObject
+ * @module components
+ */
+ var CoreFactory = function (_BaseObject) {
+ _inherits(CoreFactory, _BaseObject);
+
+ _createClass(CoreFactory, [{
+ key: 'loader',
+ get: function get() {
+ return this.player.loader;
+ }
+
+ /**
+ * it builds the core factory
+ * @method constructor
+ * @param {Player} player the player object
+ */
+
+ }]);
+
+ function CoreFactory(player) {
+ _classCallCheck(this, CoreFactory);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this));
+
+ _this.player = player;
+ _this._options = player.options;
+ return _this;
+ }
+
+ /**
+ * creates a core and its plugins
+ * @method create
+ * @return {Core} created core
+ */
+
+
+ CoreFactory.prototype.create = function create() {
+ this.options.loader = this.loader;
+ this.core = new _core2.default(this.options);
+ this.addCorePlugins();
+ this.core.createContainers(this.options);
+ return this.core;
+ };
+
+ /**
+ * given the core plugins (`loader.corePlugins`) it builds each one
+ * @method addCorePlugins
+ * @return {Core} the core with all plugins
+ */
+
+
+ CoreFactory.prototype.addCorePlugins = function addCorePlugins() {
+ var _this2 = this;
+
+ this.loader.corePlugins.forEach(function (Plugin) {
+ var plugin = new Plugin(_this2.core);
+ _this2.core.addPlugin(plugin);
+ _this2.setupExternalInterface(plugin);
+ });
+ return this.core;
+ };
+
+ CoreFactory.prototype.setupExternalInterface = function setupExternalInterface(plugin) {
+ var externalFunctions = plugin.getExternalInterface();
+ for (var key in externalFunctions) {
+ this.player[key] = externalFunctions[key].bind(plugin);
+ }
+ };
+
+ return CoreFactory;
+ }(_base_object2.default);
+
+ exports.default = CoreFactory;
+ module.exports = exports['default'];
+
+/***/ },
+/* 13 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(14);
+
+/***/ },
+/* 14 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _container_factory = __webpack_require__(20);
+
+ var _container_factory2 = _interopRequireDefault(_container_factory);
+
+ var _media_control = __webpack_require__(27);
+
+ var _media_control2 = _interopRequireDefault(_media_control);
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ var _player_info = __webpack_require__(45);
+
+ var _player_info2 = _interopRequireDefault(_player_info);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _style = __webpack_require__(46);
+
+ var _style2 = _interopRequireDefault(_style);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * The Core is responsible to manage Containers, the mediator, MediaControl
+ * and the player state.
+ * @class Core
+ * @constructor
+ * @extends UIObject
+ * @module components
+ */
+ var Core = function (_UIObject) {
+ _inherits(Core, _UIObject);
+
+ _createClass(Core, [{
+ key: 'events',
+ get: function get() {
+ return {
+ 'webkitfullscreenchange': 'handleFullscreenChange',
+ 'mousemove': 'showMediaControl',
+ 'mouseleave': 'hideMediaControl'
+ };
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'data-player': '',
+ tabindex: 9999
+ };
+ }
+
+ /**
+ * checks if the core is ready.
+ * @property isReady
+ * @type {Boolean} `true` if the core is ready, otherwise `false`
+ */
+
+ }, {
+ key: 'isReady',
+ get: function get() {
+ return !!this.ready;
+ }
+
+ /**
+ * The internationalization plugin.
+ * @property i18n
+ * @type {Strings}
+ */
+
+ }, {
+ key: 'i18n',
+ get: function get() {
+ return this.getPlugin('strings') || { t: function t(key) {
+ return key;
+ } };
+ }
+ }]);
+
+ function Core(options) {
+ _classCallCheck(this, Core);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));
+
+ _this.playerInfo = _player_info2.default.getInstance(options.playerId);
+ _this.firstResize = true;
+ _this.plugins = [];
+ _this.containers = [];
+ _this.setupMediaControl(null);
+ //FIXME fullscreen api sucks
+ _this._boundFullscreenHandler = function () {
+ return _this.handleFullscreenChange();
+ };
+ (0, _clapprZepto2.default)(document).bind('fullscreenchange', _this._boundFullscreenHandler);
+ (0, _clapprZepto2.default)(document).bind('MSFullscreenChange', _this._boundFullscreenHandler);
+ (0, _clapprZepto2.default)(document).bind('mozfullscreenchange', _this._boundFullscreenHandler);
+ return _this;
+ }
+
+ Core.prototype.createContainers = function createContainers(options) {
+ var _this2 = this;
+
+ this.defer = _clapprZepto2.default.Deferred();
+ this.defer.promise(this);
+ this.containerFactory = new _container_factory2.default(options, options.loader, this.i18n);
+ this.containerFactory.createContainers().then(function (containers) {
+ return _this2.setupContainers(containers);
+ }).then(function (containers) {
+ return _this2.resolveOnContainersReady(containers);
+ });
+ };
+
+ Core.prototype.updateSize = function updateSize() {
+ if (_utils.Fullscreen.isFullscreen()) {
+ this.setFullscreen();
+ } else {
+ this.setPlayerSize();
+ }
+ };
+
+ Core.prototype.setFullscreen = function setFullscreen() {
+ if (!_browser2.default.isiOS) {
+ this.$el.addClass('fullscreen');
+ this.$el.removeAttr('style');
+ this.playerInfo.previousSize = { width: this.options.width, height: this.options.height };
+ this.playerInfo.currentSize = { width: (0, _clapprZepto2.default)(window).width(), height: (0, _clapprZepto2.default)(window).height() };
+ }
+ };
+
+ Core.prototype.setPlayerSize = function setPlayerSize() {
+ this.$el.removeClass('fullscreen');
+ this.playerInfo.currentSize = this.playerInfo.previousSize;
+ this.playerInfo.previousSize = { width: (0, _clapprZepto2.default)(window).width(), height: (0, _clapprZepto2.default)(window).height() };
+ this.resize(this.playerInfo.currentSize);
+ };
+
+ Core.prototype.resize = function resize(options) {
+ if (!(0, _utils.isNumber)(options.height) && !(0, _utils.isNumber)(options.width)) {
+ this.el.style.height = '' + options.height;
+ this.el.style.width = '' + options.width;
+ } else {
+ this.el.style.height = options.height + 'px';
+ this.el.style.width = options.width + 'px';
+ }
+ this.playerInfo.previousSize = { width: this.options.width, height: this.options.height };
+ this.options.width = options.width;
+ this.options.height = options.height;
+ this.playerInfo.currentSize = options;
+ this.triggerResize(this.playerInfo.currentSize);
+ };
+
+ Core.prototype.enableResizeObserver = function enableResizeObserver() {
+ var _this3 = this;
+
+ var checkSizeCallback = function checkSizeCallback() {
+ 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);
+ }
+ };
+ this.resizeObserverInterval = setInterval(checkSizeCallback, 500);
+ };
+
+ Core.prototype.triggerResize = function triggerResize(newSize) {
+ var thereWasChange = this.firstResize || this.oldHeight !== newSize.height || this.oldWidth !== newSize.width;
+ if (thereWasChange) {
+ _mediator2.default.trigger(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, newSize);
+ this.oldHeight = newSize.height;
+ this.oldWidth = newSize.width;
+ this.firstResize = false;
+ }
+ };
+
+ Core.prototype.disableResizeObserver = function disableResizeObserver() {
+ if (this.resizeObserverInterval) clearInterval(this.resizeObserverInterval);
+ };
+
+ Core.prototype.resolveOnContainersReady = function resolveOnContainersReady(containers) {
+ var _this4 = this;
+
+ _clapprZepto2.default.when.apply(_clapprZepto2.default, containers).done(function () {
+ _this4.defer.resolve(_this4);
+ _this4.ready = true;
+ _this4.trigger(_events2.default.CORE_READY);
+ });
+ };
+
+ Core.prototype.addPlugin = function addPlugin(plugin) {
+ this.plugins.push(plugin);
+ };
+
+ Core.prototype.hasPlugin = function hasPlugin(name) {
+ return !!this.getPlugin(name);
+ };
+
+ Core.prototype.getPlugin = function getPlugin(name) {
+ return this.plugins.filter(function (plugin) {
+ return plugin.name === name;
+ })[0];
+ };
+
+ Core.prototype.load = function load(sources, mimeType) {
+ var _this5 = this;
+
+ this.options.mimeType = mimeType;
+ sources = sources && sources.constructor === Array ? sources : [sources];
+ this.containers.forEach(function (container) {
+ return container.destroy();
+ });
+ this.mediaControl.container = null;
+ this.containerFactory.options = _clapprZepto2.default.extend(this.options, { sources: sources });
+ this.containerFactory.createContainers().then(function (containers) {
+ _this5.setupContainers(containers);
+ });
+ };
+
+ Core.prototype.destroy = function destroy() {
+ this.disableResizeObserver();
+ this.containers.forEach(function (container) {
+ return container.destroy();
+ });
+ this.plugins.forEach(function (plugin) {
+ return plugin.destroy();
+ });
+ this.$el.remove();
+ this.mediaControl.destroy();
+ (0, _clapprZepto2.default)(document).unbind('fullscreenchange', this._boundFullscreenHandler);
+ (0, _clapprZepto2.default)(document).unbind('MSFullscreenChange', this._boundFullscreenHandler);
+ (0, _clapprZepto2.default)(document).unbind('mozfullscreenchange', this._boundFullscreenHandler);
+ };
+
+ Core.prototype.handleFullscreenChange = function handleFullscreenChange() {
+ this.trigger(_events2.default.CORE_FULLSCREEN, _utils.Fullscreen.isFullscreen());
+ this.updateSize();
+ this.mediaControl.show();
+ };
+
+ Core.prototype.setMediaControlContainer = function setMediaControlContainer(container) {
+ this.mediaControl.setContainer(container);
+ this.mediaControl.render();
+ };
+
+ Core.prototype.disableMediaControl = function disableMediaControl() {
+ this.mediaControl.disable();
+ this.$el.removeClass('nocursor');
+ };
+
+ Core.prototype.enableMediaControl = function enableMediaControl() {
+ this.mediaControl.enable();
+ };
+
+ Core.prototype.removeContainer = function removeContainer(container) {
+ this.stopListening(container);
+ this.containers = this.containers.filter(function (c) {
+ return c !== container;
+ });
+ };
+
+ Core.prototype.appendContainer = function appendContainer(container) {
+ this.listenTo(container, _events2.default.CONTAINER_DESTROYED, this.removeContainer);
+ this.containers.push(container);
+ };
+
+ Core.prototype.setupContainers = function setupContainers(containers) {
+ containers.map(this.appendContainer.bind(this));
+ this.trigger(_events2.default.CORE_CONTAINERS_CREATED);
+ this.renderContainers();
+ this.setupMediaControl(this.getCurrentContainer());
+ this.render();
+ this.$el.appendTo(this.options.parentElement);
+ return this.containers;
+ };
+
+ Core.prototype.renderContainers = function renderContainers() {
+ var _this6 = this;
+
+ this.containers.map(function (container) {
+ return _this6.el.appendChild(container.render().el);
+ });
+ };
+
+ Core.prototype.createContainer = function createContainer(source, options) {
+ var container = this.containerFactory.createContainer(source, options);
+ this.appendContainer(container);
+ this.el.appendChild(container.render().el);
+ return container;
+ };
+
+ Core.prototype.setupMediaControl = function setupMediaControl(container) {
+ if (this.mediaControl) {
+ this.mediaControl.setContainer(container);
+ } else {
+ this.mediaControl = this.createMediaControl(_clapprZepto2.default.extend({ container: container, focusElement: this.el }, this.options));
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_FULLSCREEN, this.toggleFullscreen);
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_SHOW, this.onMediaControlShow.bind(this, true));
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_HIDE, this.onMediaControlShow.bind(this, false));
+ }
+ };
+
+ 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();
+ }
+ };
+
+ Core.prototype.getCurrentContainer = function getCurrentContainer() {
+ if (!this.mediaControl || !this.mediaControl.container) {
+ return this.containers[0];
+ }
+ return this.mediaControl.container;
+ };
+
+ Core.prototype.getCurrentPlayback = function getCurrentPlayback() {
+ var container = this.getCurrentContainer();
+ return container && container.playback;
+ };
+
+ Core.prototype.getPlaybackType = function getPlaybackType() {
+ var container = this.getCurrentContainer();
+ return container && container.getPlaybackType();
+ };
+
+ Core.prototype.toggleFullscreen = function toggleFullscreen() {
+ if (!_utils.Fullscreen.isFullscreen()) {
+ _utils.Fullscreen.requestFullscreen(this.el);
+ if (!_browser2.default.isiOS) {
+ this.$el.addClass('fullscreen');
+ }
+ } else {
+ _utils.Fullscreen.cancelFullscreen();
+ if (!_browser2.default.isiOS) {
+ this.$el.removeClass('fullscreen nocursor');
+ }
+ }
+ this.mediaControl.show();
+ };
+
+ Core.prototype.showMediaControl = function showMediaControl(event) {
+ this.mediaControl.show(event);
+ };
+
+ Core.prototype.hideMediaControl = function hideMediaControl() {
+ this.mediaControl.hide(this.options.hideMediaControlDelay);
+ };
+
+ Core.prototype.onMediaControlShow = function onMediaControlShow(showing) {
+ this.getCurrentContainer().trigger(showing ? _events2.default.CONTAINER_MEDIACONTROL_SHOW : _events2.default.CONTAINER_MEDIACONTROL_HIDE);
+
+ if (showing) this.$el.removeClass('nocursor');else if (_utils.Fullscreen.isFullscreen()) this.$el.addClass('nocursor');
+ };
+
+ /**
+ * enables to configure the container after its creation
+ * @method configure
+ * @param {Object} options all the options to change in form of a javascript object
+ */
+
+
+ Core.prototype.configure = function configure(options) {
+ var _this7 = this;
+
+ this._options = _clapprZepto2.default.extend(this._options, options);
+ var sources = options.source || options.sources;
+
+ if (sources) {
+ this.load(sources, options.mimeType || this.options.mimeType);
+ } else {
+ this.trigger(_events2.default.CORE_OPTIONS_CHANGE);
+
+ this.containers.forEach(function (container) {
+ container.configure(_this7.options);
+ });
+ }
+ };
+
+ Core.prototype.render = function render() {
+ var style = _styler2.default.getStyleFor(_style2.default, { baseUrl: this.options.baseUrl });
+ this.$el.append(style);
+ this.$el.append(this.mediaControl.render().el);
+
+ 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 };
+ this.playerInfo.previousSize = this.playerInfo.currentSize = this.playerInfo.computedSize = size;
+ this.updateSize();
+
+ this.previousSize = { width: this.$el.width(), height: this.$el.height() };
+
+ this.enableResizeObserver();
+
+ return this;
+ };
+
+ return Core;
+ }(_ui_object2.default);
+
+ exports.default = Core;
+ module.exports = exports['default'];
+
+/***/ },
+/* 15 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ 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 Styler = {
+ getStyleFor: function getStyleFor(style) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { baseUrl: '' };
+
+ return (0, _clapprZepto2.default)('<style class="clappr-style"></style>').html((0, _template2.default)(style.toString())(options));
+ }
+ };
+
+ exports.default = Styler;
+ module.exports = exports['default'];
+
+/***/ },
+/* 16 */
+/***/ function(module, exports) {
+
+ /* Zepto v1.1.4-80-ga9184b2 - zepto event ajax callbacks deferred touch selector ie - zeptojs.com/license */
+ var Zepto=function(){function D(t){return null==t?String(t):j[S.call(t)]||"object"}function L(t){return"function"==D(t)}function k(t){return null!=t&&t==t.window}function Z(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return"object"==D(t)}function F(t){return $(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return"number"==typeof t.length}function q(t){return s.call(t,function(t){return null!=t})}function W(t){return t.length>0?n.fn.concat.apply([],t):t}function z(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function H(t){return t in c?c[t]:c[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||l[z(t)]?e:e+"px"}function I(t){var e,n;return f[t]||(e=u.createElement(t),u.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),f[t]=n),f[t]}function U(t){return"children"in t?a.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||""}function B(n,i,r){for(e in i)r&&(F(i[e])||A(i[e]))?(F(i[e])&&!F(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),B(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function V(t,e){return null==e?n(t):n(t).filter(e)}function Y(t,e,n,i){return L(e)?e.call(t,n,i):e}function J(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function G(e,n){var i=e.className||"",r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function K(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function Q(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)Q(t.childNodes[n],e)}var t,e,n,i,N,P,r=[],o=r.concat,s=r.filter,a=r.slice,u=window.document,f={},c={},l={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,d=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/^(?:body|html)$/i,g=/([A-Z])/g,v=["val","css","html","text","data","width","height","offset"],y=["after","prepend","before","append"],w=u.createElement("table"),x=u.createElement("tr"),b={tr:u.createElement("tbody"),tbody:w,thead:w,tfoot:w,td:x,th:x,"*":u.createElement("div")},E=/complete|loaded|interactive/,T=/^[\w-]*$/,j={},S=j.toString,C={},O=u.createElement("div"),M={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},A=Array.isArray||function(t){return t instanceof Array};return C.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~C.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},N=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},C.fragment=function(e,i,r){var o,s,f;return p.test(e)&&(o=n(u.createElement(RegExp.$1))),o||(e.replace&&(e=e.replace(d,"<$1></$2>")),i===t&&(i=h.test(e)&&RegExp.$1),i in b||(i="*"),f=b[i],f.innerHTML=""+e,o=n.each(a.call(f.childNodes),function(){f.removeChild(this)})),F(r)&&(s=n(o),n.each(r,function(t,e){v.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},C.Z=function(t,e){return new X(t,e)},C.isZ=function(t){return t instanceof C.Z},C.init=function(e,i){var r;if(!e)return C.Z();if("string"==typeof e)if(e=e.trim(),"<"==e[0]&&h.test(e))r=C.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}else{if(L(e))return n(u).ready(e);if(C.isZ(e))return e;if(A(e))r=q(e);else if($(e))r=[e],e=null;else if(h.test(e))r=C.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}}return C.Z(r,e)},n=function(t,e){return C.init(t,e)},n.extend=function(t){var e,n=a.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){B(t,n,e)}),t},C.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],o=i||r?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:a.call(s&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=u.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=D,n.isFunction=L,n.isWindow=k,n.isArray=A,n.isPlainObject=F,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=N,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var n,r,o,i=[];if(R(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&i.push(n);else for(o in t)n=e(t[o],o),null!=n&&i.push(n);return W(i)},n.each=function(t,e){var n,i;if(R(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},n.grep=function(t,e){return s.call(t,e)},window.JSON&&(n.parseJSON=JSON.parse),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){j["[object "+e+"]"]=e.toLowerCase()}),n.fn={constructor:C.Z,length:0,forEach:r.forEach,reduce:r.reduce,push:r.push,sort:r.sort,splice:r.splice,indexOf:r.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=C.isZ(e)?e.toArray():e;return o.apply(C.isZ(this)?this.toArray():this,n)},map:function(t){return n(n.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return n(a.apply(this,arguments))},ready:function(t){return E.test(u.readyState)&&u.body?t(n):u.addEventListener("DOMContentLoaded",function(){t(n)},!1),this},get:function(e){return e===t?a.call(this):this[e>=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return L(t)?this.not(this.not(t)):n(s.call(this,function(e){return C.matches(e,t)}))},add:function(t,e){return n(P(this.concat(n(t,e))))},is:function(t){return this.length>0&&C.matches(this[0],t)},not:function(e){var i=[];if(L(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r="string"==typeof e?this.filter(e):R(e)&&L(e.item)?a.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return $(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:n(t)},find:function(t){var e,i=this;return e=t?"object"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(C.qsa(this[0],t)):this.map(function(){return C.qsa(this,t)}):n()},closest:function(t,e){var i=this[0],r=!1;for("object"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:C.matches(i,t));)i=i!==e&&!Z(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!Z(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return V(e,t)},parent:function(t){return V(P(this.pluck("parentNode")),t)},children:function(t){return V(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||a.call(this.childNodes)})},siblings:function(t){return V(this.map(function(t,e){return s.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=L(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=L(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?"none"==i.css("display"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;n(this).empty().append(Y(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(n,i){var r;return"string"!=typeof n||1 in arguments?this.each(function(t){if(1===this.nodeType)if($(n))for(e in n)J(this,e,n[e]);else J(this,n,Y(this,i,t,this.getAttribute(n)))}):this.length&&1===this[0].nodeType?!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:t},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){J(this,t)},this)})},prop:function(t,e){return t=M[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(e,n){var i="data-"+e.replace(g,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?K(r):t},val:function(t){return 0 in arguments?this.each(function(e){this.value=Y(this,t,e,this.value)}):this[0]&&(this[0].multiple?n(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=Y(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)});if(!this.length)return null;if(!n.contains(u.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,""),"string"==typeof t)return o.style[N(t)]||r.getPropertyValue(t);if(A(t)){var s={};return n.each(t,function(t,e){s[e]=o.style[N(e)]||r.getPropertyValue(e)}),s}}var a="";if("string"==D(t))i||0===i?a=z(t)+":"+_(t,i):this.each(function(){this.style.removeProperty(z(t))});else for(e in t)t[e]||0===t[e]?a+=z(e)+":"+_(e,t[e])+";":this.each(function(){this.style.removeProperty(z(e))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(G(t))},H(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var r=G(this),o=Y(this,t,e,r);o.split(/\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&G(this,r+(r?" ":"")+i.join(" "))}}):this},removeClass:function(e){return this.each(function(n){if("className"in this){if(e===t)return G(this,"");i=G(this),Y(this,e,n,i).split(/\s+/g).forEach(function(t){i=i.replace(H(t)," ")}),G(this,i.trim())}})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=Y(this,e,r,G(this));s.split(/\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=m.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,r.top+=parseFloat(n(e[0]).css("border-top-width"))||0,r.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||u.body;t&&!m.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,["width","height"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?k(s)?s["inner"+i]:Z(s)?s.documentElement["scroll"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,Y(this,r,t,s[e]()))})}}),y.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=D(e),"object"==t||"array"==t||null==e?e:C.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,a){o=i?a:a.parentNode,a=0==e?a.nextSibling:1==e?a.firstChild:2==e?a:null;var f=n.contains(u.documentElement,o);r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,a),f&&Q(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+"To":"insert"+(e?"Before":"After")]=function(e){return n(e)[t](this),this}}),C.Z.prototype=X.prototype=n.fn,C.uniq=P,C.deserializeValue=K,n.zepto=C,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\s/).forEach(function(i){if("ready"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=T(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),"addEventListener"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||"").split(/\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function T(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=w,r&&r.apply(i,arguments)},e[n]=x}),(i.defaultPrevented!==n?i.defaultPrevented:"returnValue"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function j(t){var e,i={originalEvent:t};for(e in t)b.test(e)||t[e]===n||(i[e]=t[e]);return T(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return"string"==typeof t},s={},a={},u="onfocusin"in window,f={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",t.event={add:v,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=l(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var w=function(){return!0},x=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(u===n||a===!1)&&(u=a,a=n),u===!1&&(u=x),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(j(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=x),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):T(e),e._args=n,this.each(function(){e.type in f&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=j(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),T(n)}}(Zepto),function(t){function h(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function p(t,e,i,r){return t.global?h(e||n,i,r):void 0}function d(e){e.global&&0===t.active++&&p(e,null,"ajaxStart")}function m(e){e.global&&!--t.active&&p(e,null,"ajaxStop")}function g(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||p(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void p(e,n,"ajaxSend",[t,e])}function v(t,e,n,i){var r=n.context,o="success";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),p(n,r,"ajaxSuccess",[e,n,t]),w(o,e,n)}function y(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),p(i,o,"ajaxError",[n,i,t||e]),w(e,n,i)}function w(t,e,n){var i=n.context;n.complete.call(i,e,t),p(n,i,"ajaxComplete",[e,n]),m(n)}function x(){}function b(t){return t&&(t=t.split(";",2)[0]),t&&(t==f?"html":t==u?"json":s.test(t)?"script":a.test(t)&&"xml")||"text"}function E(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function T(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=E(e.url,e.data),e.data=void 0)}function j(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function C(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?C(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,a=/^(?:text|application)\/xml/i,u="application/json",f="text/html",c=/^\s*$/,l=n.createElement("a");l.href=window.location.href,t.active=0,t.ajaxJSONP=function(i,r){if(!("type"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||"jsonp"+ ++e,a=n.createElement("script"),u=window[s],c=function(e){t(a).triggerHandler("error",e||"abort")},l={abort:c};return r&&r.promise(l),t(a).on("load error",function(e,n){clearTimeout(h),t(a).off().remove(),"error"!=e.type&&f?v(f[0],l,i,r):y(null,n||"error",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),g(l,i)===!1?(c("abort"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\?(.+)=\?/,"?$1="+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c("timeout")},i.timeout)),l)},t.ajaxSettings={type:"GET",beforeSend:x,success:x,error:x,complete:x,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:u,xml:"application/xml, text/xml",html:f,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var a,u,o=t.extend({},e||{}),s=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===o[i]&&(o[i]=t.ajaxSettings[i]);d(o),o.crossDomain||(a=n.createElement("a"),a.href=o.url,a.href=a.href,o.crossDomain=l.protocol+"//"+l.host!=a.protocol+"//"+a.host),o.url||(o.url=window.location.toString()),(u=o.url.indexOf("#"))>-1&&(o.url=o.url.slice(0,u)),T(o);var f=o.dataType,h=/\?.+=\?/.test(o.url);if(h&&(f="jsonp"),o.cache!==!1&&(e&&e.cache===!0||"script"!=f&&"jsonp"!=f)||(o.url=E(o.url,"_="+Date.now())),"jsonp"==f)return h||(o.url=E(o.url,o.jsonp?o.jsonp+"=?":o.jsonp===!1?"":"callback=?")),t.ajaxJSONP(o,s);var N,p=o.accepts[f],m={},w=function(t,e){m[t.toLowerCase()]=[t,e]},j=/^([\w-]+:)\/\//.test(o.url)?RegExp.$1:window.location.protocol,S=o.xhr(),C=S.setRequestHeader;if(s&&s.promise(S),o.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",p||"*/*"),(p=o.mimeType||p)&&(p.indexOf(",")>-1&&(p=p.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(p)),(o.contentType||o.contentType!==!1&&o.data&&"GET"!=o.type.toUpperCase())&&w("Content-Type",o.contentType||"application/x-www-form-urlencoded"),o.headers)for(r in o.headers)w(r,o.headers[r]);if(S.setRequestHeader=w,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=x,clearTimeout(N);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==j){f=f||b(o.mimeType||S.getResponseHeader("content-type")),e=S.responseText;try{"script"==f?(1,eval)(e):"xml"==f?e=S.responseXML:"json"==f&&(e=c.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?y(n,"parsererror",S,o,s):v(e,S,o,s)}else y(S.statusText||null,S.status?"error":"abort",S,o,s)}},g(S,o)===!1)return S.abort(),y(null,"abort",S,o,s),S;if(o.xhrFields)for(r in o.xhrFields)S[r]=o.xhrFields[r];var P="async"in o?o.async:!0;S.open(o.type,o.url,P,o.username,o.password);for(r in m)C.apply(S,m[r]);return o.timeout>0&&(N=setTimeout(function(){S.onreadystatechange=x,S.abort(),y(null,"timeout",S,o,s)},o.timeout)),S.send(o.data?o.data:null),S},t.get=function(){return t.ajax(j.apply(null,arguments))},t.post=function(){var e=j.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=j.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\s/),u=j(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t("<div>").html(e.replace(o,"")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var S=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(S(e)+"="+S(n))},C(i,e,n),i.join("&").replace(/%20/g,"+")}}(Zepto),function(t){t.Callbacks=function(e){e=t.extend({},e);var n,i,r,o,s,a,u=[],f=!e.once&&[],c=function(t){for(n=e.memory&&t,i=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;++a)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}r=!1,u&&(f?f.length&&c(f.shift()):n?u.length=0:l.disable())},l={add:function(){if(u){var i=u.length,a=function(n){t.each(n,function(t,n){"function"==typeof n?e.unique&&l.has(n)||u.push(n):n&&n.length&&"string"!=typeof n&&a(n)})};a(arguments),r?s=u.length:n&&(o=i,c(n))}return this},remove:function(){return u&&t.each(arguments,function(e,n){for(var i;(i=t.inArray(n,u,i))>-1;)u.splice(i,1),r&&(s>=i&&--s,a>=i&&--a)}),this},has:function(e){return!(!u||!(e?t.inArray(e,u)>-1:u.length))},empty:function(){return s=u.length=0,this},disable:function(){return u=f=n=void 0,this},disabled:function(){return!u},lock:function(){return f=void 0,n||l.disable(),this},locked:function(){return!f},fireWith:function(t,e){return!u||i&&!f||(e=e||[],e=[t,e.slice?e.slice():e],r?f.push(e):c(e)),this},fire:function(){return l.fireWith(this,arguments)},fired:function(){return!!i}};return l}}(Zepto),function(t){function n(e){var i=[["resolve","done",t.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",t.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",t.Callbacks({memory:1})]],r="pending",o={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n(function(n){t.each(i,function(i,r){var a=t.isFunction(e[i])&&e[i];s[r[1]](function(){var e=a&&a.apply(this,arguments);if(e&&t.isFunction(e.promise))e.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var i=this===o?n.promise():this,s=a?[e]:arguments;n[r[0]+"With"](i,s)}})}),e=null}).promise()},promise:function(e){return null!=e?t.extend(e,o):o}},s={};return t.each(i,function(t,e){var n=e[2],a=e[3];o[e[1]]=n.add,a&&n.add(function(){r=a},i[1^t][2].disable,i[2][2].lock),s[e[0]]=function(){return s[e[0]+"With"](this===s?o:this,arguments),this},s[e[0]+"With"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s}var e=Array.prototype.slice;t.when=function(i){var f,c,l,r=e.call(arguments),o=r.length,s=0,a=1!==o||i&&t.isFunction(i.promise)?o:0,u=1===a?i:n(),h=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?e.call(arguments):r,i===f?u.notifyWith(n,i):--a||u.resolveWith(n,i)}};if(o>1)for(f=new Array(o),c=new Array(o),l=new Array(o);o>s;++s)r[s]&&t.isFunction(r[s].promise)?r[s].promise().done(h(s,l,r)).fail(u.reject).progress(h(s,c,f)):--a;return a||u.resolveWith(l,r),u.promise()},t.Deferred=n}(Zepto),function(t){function u(t,e,n,i){return Math.abs(t-e)>=Math.abs(n-i)?t-e>0?"Left":"Right":n-i>0?"Up":"Down"}function f(){o=null,e.last&&(e.el.trigger("longTap"),e={})}function c(){o&&clearTimeout(o),o=null}function l(){n&&clearTimeout(n),i&&clearTimeout(i),r&&clearTimeout(r),o&&clearTimeout(o),n=i=r=o=null,e={}}function h(t){return("touch"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function p(t,e){return t.type=="pointer"+e||t.type.toLowerCase()=="mspointer"+e}var n,i,r,o,a,e={},s=750;t(document).ready(function(){var d,m,y,w,g=0,v=0;"MSGesture"in window&&(a=new MSGesture,a.target=document.body),t(document).bind("MSGestureEnd",function(t){var n=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;n&&(e.el.trigger("swipe"),e.el.trigger("swipe"+n))}).on("touchstart MSPointerDown pointerdown",function(i){(!(w=p(i,"down"))||h(i))&&(y=w?i:i.touches[0],i.touches&&1===i.touches.length&&e.x2&&(e.x2=void 0,e.y2=void 0),d=Date.now(),m=d-(e.last||d),e.el=t("tagName"in y.target?y.target:y.target.parentNode),n&&clearTimeout(n),e.x1=y.pageX,e.y1=y.pageY,m>0&&250>=m&&(e.isDoubleTap=!0),e.last=d,o=setTimeout(f,s),a&&w&&a.addPointer(i.pointerId))}).on("touchmove MSPointerMove pointermove",function(t){(!(w=p(t,"move"))||h(t))&&(y=w?t:t.touches[0],c(),e.x2=y.pageX,e.y2=y.pageY,g+=Math.abs(e.x1-e.x2),v+=Math.abs(e.y1-e.y2))}).on("touchend MSPointerUp pointerup",function(o){(!(w=p(o,"up"))||h(o))&&(c(),e.x2&&Math.abs(e.x1-e.x2)>30||e.y2&&Math.abs(e.y1-e.y2)>30?r=setTimeout(function(){e.el.trigger("swipe"),e.el.trigger("swipe"+u(e.x1,e.x2,e.y1,e.y2)),e={}},0):"last"in e&&(30>g&&30>v?i=setTimeout(function(){var i=t.Event("tap");i.cancelTouch=l,e.el.trigger(i),e.isDoubleTap?(e.el&&e.el.trigger("doubleTap"),e={}):n=setTimeout(function(){n=null,e.el&&e.el.trigger("singleTap"),e={}},250)},0):e={}),g=v=0)}).on("touchcancel MSPointerCancel pointercancel",l),t(window).on("scroll",l)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(Zepto),function(t){function r(e){return e=t(e),!(!e.width()&&!e.height())&&"none"!==e.css("display")}function f(t,e){t=t.replace(/=#\]/g,'="#"]');var n,i,r=s.exec(t);if(r&&r[2]in o&&(n=o[r[2]],i=r[3],t=r[1],i)){var a=Number(i);i=isNaN(a)?i.replace(/^["']|["']$/g,""):a}return e(t,n,i)}var e=t.zepto,n=e.qsa,i=e.matches,o=t.expr[":"]={visible:function(){return r(this)?this:void 0},hidden:function(){return r(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,i){return t(this).text().indexOf(i)>-1?this:void 0},has:function(t,n,i){return e.qsa(this,i).length?this:void 0}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),a=/^\s*>/,u="Zepto"+ +new Date;e.qsa=function(i,r){return f(r,function(o,s,f){try{var c;!o&&s?o="*":a.test(o)&&(c=t(i).addClass(u),o="."+u+" "+o);var l=n(i,o)}catch(h){throw console.error("error performing selector: %o",r),h}finally{c&&c.removeClass(u)}return s?e.uniq(t.map(l,function(t,e){return s.call(t,e,l,f)})):l})},e.matches=function(t,e){return f(e,function(e,n,r){return!(e&&!i(t,e)||n&&n.call(t,null,r)!==t)})}}(Zepto),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(n){return null}}}}();
+ module.exports = Zepto;
+
+
+/***/ },
+/* 17 */
+/***/ function(module, exports) {
+
+ 'use strict';
+
+ /* eslint-disable no-var */
+ // Simple JavaScript Templating
+ // Paul Miller (http://paulmillr.com)
+ // http://underscorejs.org
+ // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ var settings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ '\'': '\'',
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\t': 't',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+ // List of HTML entities for escaping.
+ var htmlEntities = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ '\'': '&#x27;'
+ };
+
+ var entityRe = new RegExp('[&<>"\']', 'g');
+
+ var escapeExpr = function escapeExpr(string) {
+ if (string === null) {
+ return '';
+ }
+ return ('' + string).replace(entityRe, function (match) {
+ return htmlEntities[match];
+ });
+ };
+
+ var counter = 0;
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ var tmpl = function tmpl(text, data) {
+ var render;
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = new RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = '__p+=\'';
+ text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escaper, function (match) {
+ 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+=\'';
+ }
+ 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';
+ }
+
+ source = 'var __t,__p=\'\',__j=Array.prototype.join,' + 'print=function(){__p+=__j.call(arguments,\'\');};\n' + source + 'return __p;\n//# sourceURL=/microtemplates/source[' + counter++ + ']';
+
+ try {
+ /*jshint -W054 */
+ // TODO: find a way to avoid eval
+ render = new Function(settings.variable || 'obj', 'escapeExpr', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ if (data) {
+ return render(data, escapeExpr);
+ }
+ var template = function template(data) {
+ return render.call(this, data, escapeExpr);
+ };
+
+ // Provide the compiled function source as a convenience for precompilation.
+ template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+ return template;
+ };
+ tmpl.settings = settings;
+
+ module.exports = tmpl;
+
+/***/ },
+/* 18 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _lodash = __webpack_require__(19);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ /**
+ * A base class to create ui object.
+ * @class UIObject
+ * @constructor
+ * @extends BaseObject
+ * @module base
+ */
+
+ var UIObject = function (_BaseObject) {
+ _inherits(UIObject, _BaseObject);
+
+ _createClass(UIObject, [{
+ key: 'tagName',
+
+ /**
+ * a unique id prefixed with `'c'`, `c1, c232`
+ *
+ * @property cid
+ * @type String
+ */
+ /**
+ * the dom element itself
+ *
+ * @property el
+ * @type HTMLElement
+ */
+ /**
+ * the dom element wrapped by `$`
+ *
+ * @property $el
+ * @type HTMLElement
+ */
+
+ /**
+ * gets the tag name for the ui component
+ * @method tagName
+ * @default div
+ * @return {String} tag's name
+ */
+ get: function get() {
+ return 'div';
+ }
+ /**
+ * a literal object mapping element's events to methods
+ * @property events
+ * @type Object
+ * @example
+ *
+ *```javascript
+ *
+ * class MyButton extends UIObject {
+ * constructor(options) {
+ * super(options)
+ * this.myId = 0
+ * }
+ * get events() { return { 'click': 'myClick' } }
+ * myClick(){ this.myId = 42 }
+ * }
+ *
+ * // when you click on MyButton the method `myClick` will be called
+ *```
+ */
+
+ }, {
+ key: 'events',
+ get: function get() {
+ return {};
+ }
+ /**
+ * a literal object mapping attributes and values to the element
+ * element's attribute name and the value the attribute value
+ * @property attributes
+ * @type Object
+ * @example
+ *
+ *```javascript
+ *
+ * class MyButton extends UIObject {
+ * constructor(options) { super(options) }
+ * get attributes() { return { class: 'my-button'} }
+ * }
+ *
+ * // MyButton.el.className will be 'my-button'
+ * ```
+ */
+
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {};
+ }
+
+ /**
+ * it builds an ui component by:
+ * * creating an id for the component `cid`
+ * * making sure the element is created `$el`
+ * * delegating all `events` to the element
+ * @method constructor
+ * @param {Object} options the options object
+ */
+
+ }]);
+
+ function UIObject(options) {
+ _classCallCheck(this, UIObject);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));
+
+ _this.cid = (0, _utils.uniqueId)('c');
+ _this._ensureElement();
+ _this.delegateEvents();
+ return _this;
+ }
+
+ /**
+ * selects within the component.
+ * @method $
+ * @param {String} selector a selector to find within the component.
+ * @return {HTMLElement} an element, if it exists.
+ * @example
+ * ```javascript
+ * fullScreenBarUIComponent.$('.button-full') //will return only `.button-full` within the component
+ * ```
+ */
+
+
+ UIObject.prototype.$ = function $(selector) {
+ return this.$el.find(selector);
+ };
+
+ /**
+ * render the component, usually attach it to a real existent `element`
+ * @method render
+ * @return {UIObject} itself
+ */
+
+
+ UIObject.prototype.render = function render() {
+ return this;
+ };
+
+ /**
+ * removes the ui component from DOM
+ * @method remove
+ * @return {UIObject} itself
+ */
+
+
+ UIObject.prototype.remove = function remove() {
+ this.$el.remove();
+ this.stopListening();
+ this.undelegateEvents();
+ return this;
+ };
+
+ /**
+ * set element to `el` and `$el`
+ * @method setElement
+ * @param {HTMLElement} element
+ * @param {Boolean} delegate whether is delegate or not
+ * @return {UIObject} itself
+ */
+
+
+ UIObject.prototype.setElement = function setElement(element, delegate) {
+ if (this.$el) {
+ this.undelegateEvents();
+ }
+ this.$el = element instanceof _clapprZepto2.default ? element : (0, _clapprZepto2.default)(element);
+ this.el = this.$el[0];
+ if (delegate !== false) {
+ this.delegateEvents();
+ }
+ return this;
+ };
+
+ /**
+ * delegates all the original `events` on `element` to its callbacks
+ * @method delegateEvents
+ * @param {Object} events
+ * @return {UIObject} itself
+ */
+
+
+ UIObject.prototype.delegateEvents = function delegateEvents(events) {
+ if (!(events || (events = (0, _lodash2.default)(this, 'events')))) {
+ return this;
+ }
+ this.undelegateEvents();
+ for (var key in events) {
+ var method = events[key];
+ if (method && method.constructor !== Function) {
+ method = this[events[key]];
+ }
+ if (!method) {
+ continue;
+ }
+
+ var match = key.match(delegateEventSplitter);
+ var eventName = match[1],
+ selector = match[2];
+ //method = _.bind(method, this)
+ eventName += '.delegateEvents' + this.cid;
+ if (selector === '') {
+ this.$el.on(eventName, method.bind(this));
+ } else {
+ this.$el.on(eventName, selector, method.bind(this));
+ }
+ }
+ return this;
+ };
+
+ /**
+ * undelegats all the `events`
+ * @method undelegateEvents
+ * @return {UIObject} itself
+ */
+
+
+ UIObject.prototype.undelegateEvents = function undelegateEvents() {
+ this.$el.off('.delegateEvents' + this.cid);
+ return this;
+ };
+
+ /**
+ * ensures the creation of this ui component
+ * @method _ensureElement
+ * @private
+ */
+
+
+ UIObject.prototype._ensureElement = function _ensureElement() {
+ if (!this.el) {
+ var attrs = _clapprZepto2.default.extend({}, (0, _lodash2.default)(this, 'attributes'));
+ if (this.id) {
+ attrs.id = (0, _lodash2.default)(this, 'id');
+ }
+ if (this.className) {
+ attrs['class'] = (0, _lodash2.default)(this, 'className');
+ }
+ var $el = (0, _clapprZepto2.default)('<' + (0, _lodash2.default)(this, 'tagName') + '>').attr(attrs);
+ this.setElement($el, false);
+ } else {
+ this.setElement((0, _lodash2.default)(this, 'el'), false);
+ }
+ };
+
+ return UIObject;
+ }(_base_object2.default);
+
+ exports.default = UIObject;
+ module.exports = exports['default'];
+
+/***/ },
+/* 19 */
+/***/ function(module, exports) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0;
+
+ /** `Object#toString` result references. */
+ var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = root['__core-js_shared__'];
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Symbol = root.Symbol,
+ splice = arrayProto.splice;
+
+ /* Built-in method references that are verified to be native. */
+ var Map = getNative(root, 'Map'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoize(function(string) {
+ string = toString(string);
+
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Assign cache to `_.memoize`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ object = undefined;
+ length = 1;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ module.exports = result;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ },
+/* 20 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(21);
+
+/***/ },
+/* 21 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _container = __webpack_require__(22);
+
+ var _container2 = _interopRequireDefault(_container);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _lodash = __webpack_require__(26);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * The ContainerFactory is responsible for manage playback bootstrap and create containers.
+ */
+
+ var ContainerFactory = function (_BaseObject) {
+ _inherits(ContainerFactory, _BaseObject);
+
+ _createClass(ContainerFactory, [{
+ key: 'options',
+ get: function get() {
+ return this._options;
+ },
+ set: function set(options) {
+ this._options = options;
+ }
+ }]);
+
+ function ContainerFactory(options, loader, i18n) {
+ _classCallCheck(this, ContainerFactory);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));
+
+ _this._i18n = i18n;
+ _this.loader = loader;
+ return _this;
+ }
+
+ ContainerFactory.prototype.createContainers = function createContainers() {
+ var _this2 = this;
+
+ return _clapprZepto2.default.Deferred(function (promise) {
+ promise.resolve(_this2.options.sources.map(function (source) {
+ return _this2.createContainer(source);
+ }));
+ });
+ };
+
+ ContainerFactory.prototype.findPlaybackPlugin = function findPlaybackPlugin(source, mimeType) {
+ return this.loader.playbackPlugins.filter(function (p) {
+ return p.canPlay(source, mimeType);
+ })[0];
+ };
+
+ ContainerFactory.prototype.createContainer = function createContainer(source) {
+ var resolvedSource = null,
+ mimeType = this.options.mimeType;
+ if ((0, _lodash2.default)(source)) {
+ resolvedSource = source.source.toString();
+ if (source.mimeType) {
+ mimeType = source.mimeType;
+ }
+ } else {
+ resolvedSource = source.toString();
+ }
+
+ if (resolvedSource.match(/^\/\//)) resolvedSource = window.location.protocol + resolvedSource;
+
+ var options = _clapprZepto2.default.extend({}, this.options, {
+ src: resolvedSource,
+ mimeType: mimeType
+ });
+ var playbackPlugin = this.findPlaybackPlugin(resolvedSource, mimeType);
+ var playback = new playbackPlugin(options, this._i18n);
+
+ options = _clapprZepto2.default.extend({}, options, { playback: playback });
+
+ var container = new _container2.default(options, this._i18n);
+ var defer = _clapprZepto2.default.Deferred();
+ defer.promise(container);
+ this.addContainerPlugins(container);
+ this.listenToOnce(container, _events2.default.CONTAINER_READY, function () {
+ return defer.resolve(container);
+ });
+ return container;
+ };
+
+ ContainerFactory.prototype.addContainerPlugins = function addContainerPlugins(container) {
+ this.loader.containerPlugins.forEach(function (Plugin) {
+ container.addPlugin(new Plugin(container));
+ });
+ };
+
+ return ContainerFactory;
+ }(_base_object2.default);
+
+ exports.default = ContainerFactory;
+ module.exports = exports['default'];
+
+/***/ },
+/* 22 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(23);
+
+/***/ },
+/* 23 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _style = __webpack_require__(24);
+
+ var _style2 = _interopRequireDefault(_style);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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
+ */
+
+ /**
+ * An abstraction to represent a container for a given playback
+ * TODO: describe its responsabilities
+ * @class Container
+ * @constructor
+ * @extends UIObject
+ * @module base
+ */
+ var Container = function (_UIObject) {
+ _inherits(Container, _UIObject);
+
+ _createClass(Container, [{
+ key: 'name',
+
+ /**
+ * container's name
+ * @method name
+ * @default Container
+ * @return {String} container's name
+ */
+ get: function get() {
+ return 'Container';
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return { class: 'container', 'data-container': '' };
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'click': 'clicked',
+ 'dblclick': 'dblClicked',
+ 'doubleTap': 'dblClicked',
+ 'contextmenu': 'onContextMenu',
+ 'mouseenter': 'mouseEnter',
+ 'mouseleave': 'mouseLeave'
+ };
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this.playback.ended;
+ }
+
+ /**
+ * Determine if the playback is having to buffer in order for
+ * playback to be smooth.
+ * (i.e if a live stream is playing smoothly, this will be false)
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return this.playback.buffering;
+ }
+
+ /**
+ * The internationalization plugin.
+ * @property i18n
+ * @type {Strings}
+ */
+
+ }, {
+ key: 'i18n',
+ get: function get() {
+ return this._i18n;
+ }
+
+ /**
+ * it builds a container
+ * @method constructor
+ * @param {Object} options the options object
+ * @param {Strings} i18n the internationalization component
+ */
+
+ }]);
+
+ function Container(options, i18n) {
+ _classCallCheck(this, Container);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));
+
+ _this._i18n = i18n;
+ _this.currentTime = 0;
+ _this.volume = 100;
+ _this.playback = options.playback;
+ _this.settings = _clapprZepto2.default.extend({}, _this.playback.settings);
+ _this.isReady = false;
+ _this.mediaControlDisabled = false;
+ _this.plugins = [_this.playback];
+ _this.bindEvents();
+ return _this;
+ }
+
+ /**
+ * binds playback events to the methods of the container.
+ * it listens to playback's events and triggers them as container events.
+ *
+ * | Playback |
+ * |----------|
+ * | progress |
+ * | timeupdate |
+ * | ready |
+ * | buffering |
+ * | bufferfull |
+ * | settingsupdate |
+ * | loadedmetadata |
+ * | highdefinitionupdate |
+ * | bitrate |
+ * | playbackstate |
+ * | dvr |
+ * | mediacontrol_disable |
+ * | mediacontrol_enable |
+ * | ended |
+ * | play |
+ * | pause |
+ * | error |
+ *
+ * ps: the events usually translate from PLABACK_x to CONTAINER_x, you can check all the events at `Event` class.
+ *
+ * @method bindEvents
+ */
+
+
+ Container.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.playback, _events2.default.PLAYBACK_PROGRESS, this.progress);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_TIMEUPDATE, this.timeUpdated);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_READY, this.ready);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_BUFFERING, this.onBuffering);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_BUFFERFULL, this.bufferfull);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_SETTINGSUPDATE, this.settingsUpdate);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_LOADEDMETADATA, this.loadedMetadata);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_BITRATE, this.updateBitrate);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_PLAYBACKSTATE, this.playbackStateChanged);
+ 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_ENDED, this.onEnded);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_PLAY, this.playing);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_PAUSE, this.paused);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_STOP, this.stopped);
+ this.listenTo(this.playback, _events2.default.PLAYBACK_ERROR, this.error);
+ };
+
+ Container.prototype.playbackStateChanged = function playbackStateChanged(state) {
+ this.trigger(_events2.default.CONTAINER_PLAYBACKSTATE, state);
+ };
+
+ Container.prototype.playbackDvrStateChanged = function playbackDvrStateChanged(dvrInUse) {
+ this.settings = this.playback.settings;
+ this.dvrInUse = dvrInUse;
+ this.trigger(_events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, dvrInUse);
+ };
+
+ Container.prototype.updateBitrate = function updateBitrate(newBitrate) {
+ this.trigger(_events2.default.CONTAINER_BITRATE, newBitrate);
+ };
+
+ Container.prototype.statsReport = function statsReport(metrics) {
+ this.trigger(_events2.default.CONTAINER_STATS_REPORT, metrics);
+ };
+
+ Container.prototype.getPlaybackType = function getPlaybackType() {
+ return this.playback.getPlaybackType();
+ };
+
+ /**
+ * returns `true` if DVR is enable otherwise `false`.
+ * @method isDvrEnabled
+ * @return {Boolean}
+ */
+
+
+ Container.prototype.isDvrEnabled = function isDvrEnabled() {
+ return !!this.playback.dvrEnabled;
+ };
+
+ /**
+ * returns `true` if DVR is in use otherwise `false`.
+ * @method isDvrInUse
+ * @return {Boolean}
+ */
+
+
+ Container.prototype.isDvrInUse = function isDvrInUse() {
+ return !!this.dvrInUse;
+ };
+
+ /**
+ * destroys the container
+ * @method destroy
+ */
+
+
+ Container.prototype.destroy = function destroy() {
+ this.trigger(_events2.default.CONTAINER_DESTROYED, this, this.name);
+ this.stopListening();
+ this.plugins.forEach(function (plugin) {
+ return plugin.destroy();
+ });
+ this.$el.remove();
+ };
+
+ Container.prototype.setStyle = function setStyle(style) {
+ this.$el.css(style);
+ };
+
+ Container.prototype.animate = function animate(style, duration) {
+ return this.$el.animate(style, duration).promise();
+ };
+
+ Container.prototype.ready = function ready() {
+ this.isReady = true;
+ this.trigger(_events2.default.CONTAINER_READY, this.name);
+ };
+
+ Container.prototype.isPlaying = function isPlaying() {
+ return this.playback.isPlaying();
+ };
+
+ Container.prototype.getStartTimeOffset = function getStartTimeOffset() {
+ return this.playback.getStartTimeOffset();
+ };
+
+ Container.prototype.getCurrentTime = function getCurrentTime() {
+ return this.currentTime;
+ };
+
+ Container.prototype.getDuration = function getDuration() {
+ return this.playback.getDuration();
+ };
+
+ Container.prototype.error = function error(errorObj) {
+ if (!this.isReady) {
+ this.ready();
+ }
+ this.trigger(_events2.default.CONTAINER_ERROR, { error: errorObj, container: this }, this.name);
+ };
+
+ Container.prototype.loadedMetadata = function loadedMetadata(metadata) {
+ this.trigger(_events2.default.CONTAINER_LOADEDMETADATA, metadata);
+ };
+
+ Container.prototype.timeUpdated = function timeUpdated(timeProgress) {
+ this.currentTime = timeProgress.current;
+ this.trigger(_events2.default.CONTAINER_TIMEUPDATE, timeProgress, this.name);
+ };
+
+ Container.prototype.progress = function progress() {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ this.trigger.apply(this, [_events2.default.CONTAINER_PROGRESS].concat(args, [this.name]));
+ };
+
+ Container.prototype.playing = function playing() {
+ this.trigger(_events2.default.CONTAINER_PLAY, this.name);
+ };
+
+ Container.prototype.paused = function paused() {
+ this.trigger(_events2.default.CONTAINER_PAUSE, this.name);
+ };
+
+ /**
+ * plays the playback
+ * @method play
+ */
+
+
+ Container.prototype.play = function play() {
+ this.playback.play();
+ };
+
+ /**
+ * stops the playback
+ * @method stop
+ */
+
+
+ Container.prototype.stop = function stop() {
+ this.playback.stop();
+ this.currentTime = 0;
+ };
+
+ /**
+ * pauses the playback
+ * @method pause
+ */
+
+
+ Container.prototype.pause = function pause() {
+ this.playback.pause();
+ };
+
+ Container.prototype.onEnded = function onEnded() {
+ this.trigger(_events2.default.CONTAINER_ENDED, this, this.name);
+ this.currentTime = 0;
+ };
+
+ Container.prototype.stopped = function stopped() {
+ this.trigger(_events2.default.CONTAINER_STOP);
+ };
+
+ Container.prototype.clicked = function clicked() {
+ 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);
+ }
+ };
+
+ Container.prototype.onContextMenu = function onContextMenu() {
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
+ this.trigger(_events2.default.CONTAINER_CONTEXTMENU, this, this.name);
+ }
+ };
+
+ Container.prototype.seek = function seek(time) {
+ this.trigger(_events2.default.CONTAINER_SEEK, time, this.name);
+ this.playback.seek(time);
+ };
+
+ Container.prototype.seekPercentage = function seekPercentage(percentage) {
+ var duration = this.getDuration();
+ if (percentage >= 0 && percentage <= 100) {
+ var time = duration * (percentage / 100);
+ this.seek(time);
+ }
+ };
+
+ Container.prototype.setVolume = function setVolume(value) {
+ this.volume = parseInt(value, 10);
+ this.trigger(_events2.default.CONTAINER_VOLUME, value, this.name);
+ this.playback.volume(value);
+ };
+
+ Container.prototype.fullscreen = function fullscreen() {
+ this.trigger(_events2.default.CONTAINER_FULLSCREEN, this.name);
+ };
+
+ Container.prototype.onBuffering = function onBuffering() {
+ this.trigger(_events2.default.CONTAINER_STATE_BUFFERING, this.name);
+ };
+
+ Container.prototype.bufferfull = function bufferfull() {
+ this.trigger(_events2.default.CONTAINER_STATE_BUFFERFULL, this.name);
+ };
+
+ /**
+ * adds plugin to the container
+ * @method addPlugin
+ * @param {Object} plugin
+ */
+
+
+ Container.prototype.addPlugin = function addPlugin(plugin) {
+ this.plugins.push(plugin);
+ };
+
+ /**
+ * checks if a plugin, given its name, exist
+ * @method hasPlugin
+ * @param {String} name
+ * @return {Boolean}
+ */
+
+
+ Container.prototype.hasPlugin = function hasPlugin(name) {
+ return !!this.getPlugin(name);
+ };
+
+ /**
+ * get the plugin given its name
+ * @method getPlugin
+ * @param {String} name
+ */
+
+
+ Container.prototype.getPlugin = function getPlugin(name) {
+ return this.plugins.filter(function (plugin) {
+ return plugin.name === name;
+ })[0];
+ };
+
+ Container.prototype.mouseEnter = function mouseEnter() {
+ 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);
+ }
+ };
+
+ Container.prototype.settingsUpdate = function settingsUpdate() {
+ this.settings = this.playback.settings;
+ this.trigger(_events2.default.CONTAINER_SETTINGSUPDATE);
+ };
+
+ Container.prototype.highDefinitionUpdate = function highDefinitionUpdate(isHD) {
+ this.trigger(_events2.default.CONTAINER_HIGHDEFINITIONUPDATE, isHD);
+ };
+
+ Container.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {
+ return this.playback.isHighDefinitionInUse();
+ };
+
+ Container.prototype.disableMediaControl = function disableMediaControl() {
+ if (!this.mediaControlDisabled) {
+ this.mediaControlDisabled = true;
+ this.trigger(_events2.default.CONTAINER_MEDIACONTROL_DISABLE);
+ }
+ };
+
+ Container.prototype.enableMediaControl = function enableMediaControl() {
+ if (this.mediaControlDisabled) {
+ this.mediaControlDisabled = false;
+ this.trigger(_events2.default.CONTAINER_MEDIACONTROL_ENABLE);
+ }
+ };
+
+ Container.prototype.updateStyle = function updateStyle() {
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
+ this.$el.removeClass('chromeless');
+ } else {
+ this.$el.addClass('chromeless');
+ }
+ };
+
+ /**
+ * enables to configure the container after its creation
+ * @method configure
+ * @param {Object} options all the options to change in form of a javascript object
+ */
+
+
+ Container.prototype.configure = function configure(options) {
+ this._options = _clapprZepto2.default.extend(this._options, options);
+ this.updateStyle();
+ this.trigger(_events2.default.CONTAINER_OPTIONS_CHANGE);
+ };
+
+ 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);
+
+ exports.default = Container;
+ module.exports = exports['default'];
+
+/***/ },
+/* 24 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 25 */
+/***/ function(module, exports) {
+
+ /*
+ 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() {
+ var list = [];
+
+ // return the list of modules as css string
+ list.toString = function toString() {
+ var result = [];
+ for(var i = 0; i < this.length; i++) {
+ var item = this[i];
+ if(item[2]) {
+ result.push("@media " + item[2] + "{" + item[1] + "}");
+ } else {
+ result.push(item[1]);
+ }
+ }
+ return result.join("");
+ };
+
+ // 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;
+ };
+
+
+/***/ },
+/* 26 */
+/***/ function(module, exports) {
+
+ /**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** `Object#toString` result references. */
+ var objectTag = '[object Object]';
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /** Used for built-in method references. */
+ var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Built-in value references. */
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
+
+ module.exports = isPlainObject;
+
+
+/***/ },
+/* 27 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(28);
+
+/***/ },
+/* 28 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {'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 _utils = __webpack_require__(2);
+
+ var _vendor = __webpack_require__(8);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _lodash = __webpack_require__(32);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ var _mediaControl = __webpack_require__(34);
+
+ var _mediaControl2 = _interopRequireDefault(_mediaControl);
+
+ var _mediaControl3 = __webpack_require__(36);
+
+ var _mediaControl4 = _interopRequireDefault(_mediaControl3);
+
+ var _play = __webpack_require__(37);
+
+ var _play2 = _interopRequireDefault(_play);
+
+ var _pause = __webpack_require__(38);
+
+ var _pause2 = _interopRequireDefault(_pause);
+
+ var _stop = __webpack_require__(39);
+
+ var _stop2 = _interopRequireDefault(_stop);
+
+ var _volume = __webpack_require__(40);
+
+ var _volume2 = _interopRequireDefault(_volume);
+
+ var _mute = __webpack_require__(41);
+
+ var _mute2 = _interopRequireDefault(_mute);
+
+ var _expand = __webpack_require__(42);
+
+ var _expand2 = _interopRequireDefault(_expand);
+
+ var _shrink = __webpack_require__(43);
+
+ var _shrink2 = _interopRequireDefault(_shrink);
+
+ var _hd = __webpack_require__(44);
+
+ var _hd2 = _interopRequireDefault(_hd);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * The MediaControl is responsible for displaying the Player controls.
+ */
+
+ var MediaControl = function (_UIObject) {
+ _inherits(MediaControl, _UIObject);
+
+ _createClass(MediaControl, [{
+ key: 'name',
+ get: function get() {
+ return 'MediaControl';
+ }
+ }, {
+ key: 'disabled',
+ get: function get() {
+ return this.userDisabled || this.container && this.container.getPlaybackType() === _playback2.default.NO_OP;
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'class': 'media-control',
+ 'data-media-control': ''
+ };
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'click [data-play]': 'play',
+ 'click [data-pause]': 'pause',
+ 'click [data-playpause]': 'togglePlayPause',
+ 'click [data-stop]': 'stop',
+ 'click [data-playstop]': 'togglePlayStop',
+ 'click [data-fullscreen]': 'toggleFullscreen',
+ 'click .bar-container[data-seekbar]': 'seek',
+ 'click .bar-container[data-volume]': 'onVolumeClick',
+ 'click .drawer-icon[data-volume]': 'toggleMute',
+ 'mouseenter .drawer-container[data-volume]': 'showVolumeBar',
+ 'mouseleave .drawer-container[data-volume]': 'hideVolumeBar',
+ 'mousedown .bar-container[data-volume]': 'startVolumeDrag',
+ 'mousemove .bar-container[data-volume]': 'mousemoveOnVolumeBar',
+ 'mousedown .bar-scrubber[data-seekbar]': 'startSeekDrag',
+ 'mousemove .bar-container[data-seekbar]': 'mousemoveOnSeekBar',
+ 'mouseleave .bar-container[data-seekbar]': 'mouseleaveOnSeekBar',
+ 'mouseenter .media-control-layer[data-controls]': 'setUserKeepVisible',
+ 'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible'
+ };
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_mediaControl4.default);
+ }
+ }, {
+ key: 'stylesheet',
+ get: function get() {
+ return _styler2.default.getStyleFor(_mediaControl2.default, { baseUrl: this.options.baseUrl });
+ }
+ }, {
+ key: 'volume',
+ get: function get() {
+ return this.container && this.container.isReady ? this.container.volume : this.intendedVolume;
+ }
+ }, {
+ key: 'muted',
+ get: function get() {
+ return this.volume === 0;
+ }
+ }]);
+
+ function MediaControl(options) {
+ _classCallCheck(this, MediaControl);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));
+
+ _this.persistConfig = _this.options.persistConfig;
+ _this.container = options.container;
+ _this.currentPositionValue = null;
+ _this.currentDurationValue = null;
+ var initialVolume = _this.persistConfig ? _utils.Config.restore('volume') : 100;
+ _this.setVolume(_this.options.mute ? 0 : initialVolume);
+ _this.keepVisible = false;
+ _this.fullScreenOnVideoTagSupported = null; // unknown
+ _this.addEventListeners();
+ _this.settings = {
+ left: ['play', 'stop', 'pause'],
+ right: ['volume'],
+ default: ['position', 'seekbar', 'duration']
+ };
+
+ if (_this.container) {
+ if (!_clapprZepto2.default.isEmptyObject(_this.container.settings)) {
+ _this.settings = _clapprZepto2.default.extend({}, _this.container.settings);
+ }
+ } else {
+ _this.settings = {};
+ }
+
+ _this.userDisabled = false;
+ if (_this.container && _this.container.mediaControlDisabled || _this.options.chromeless) {
+ _this.disable();
+ }
+ _this.stopDragHandler = function (event) {
+ return _this.stopDrag(event);
+ };
+ _this.updateDragHandler = function (event) {
+ return _this.updateDrag(event);
+ };
+ (0, _clapprZepto2.default)(document).bind('mouseup', _this.stopDragHandler);
+ (0, _clapprZepto2.default)(document).bind('mousemove', _this.updateDragHandler);
+ return _this;
+ }
+
+ MediaControl.prototype.addEventListeners = function addEventListeners() {
+ if (this.container) {
+ _mediator2.default.on(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.changeTogglePlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.changeTogglePlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_DBLCLICK, this.toggleFullscreen);
+ this.listenTo(this.container, _events2.default.CONTAINER_TIMEUPDATE, this.onTimeUpdate);
+ this.listenTo(this.container, _events2.default.CONTAINER_PROGRESS, this.updateProgressBar);
+ this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.settingsUpdate);
+ this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);
+ this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_DISABLE, this.disable);
+ this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_ENABLE, this.enable);
+ this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.ended);
+ this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, this.onVolumeChanged);
+ if (this.container.playback.el.nodeName.toLowerCase() === 'video') {
+ // wait until the metadata has loaded and then check if fullscreen on video tag is supported
+ this.listenToOnce(this.container, _events2.default.CONTAINER_LOADEDMETADATA, this.onLoadedMetadataOnVideoTag);
+ }
+ }
+ };
+
+ MediaControl.prototype.disable = function disable() {
+ this.userDisabled = true;
+ this.hide();
+ this.$el.hide();
+ };
+
+ MediaControl.prototype.enable = function enable() {
+ if (this.options.chromeless) return;
+ this.userDisabled = false;
+ this.show();
+ };
+
+ MediaControl.prototype.play = function play() {
+ this.container.play();
+ };
+
+ MediaControl.prototype.pause = function pause() {
+ this.container.pause();
+ };
+
+ MediaControl.prototype.stop = function stop() {
+ this.container.stop();
+ };
+
+ MediaControl.prototype.onVolumeChanged = function onVolumeChanged() {
+ this.updateVolumeUI();
+ };
+
+ MediaControl.prototype.onLoadedMetadataOnVideoTag = function onLoadedMetadataOnVideoTag() {
+ var video = this.container.playback.el;
+ // video.webkitSupportsFullscreen is deprecated but iOS appears to only use this
+ // see https://github.com/clappr/clappr/issues/1127
+ if (!_utils.Fullscreen.fullscreenEnabled() && video.webkitSupportsFullscreen) {
+ this.fullScreenOnVideoTagSupported = true;
+ this.settingsUpdate();
+ }
+ };
+
+ MediaControl.prototype.updateVolumeUI = function updateVolumeUI() {
+ if (!this.rendered) {
+ // this will be called after a render
+ return;
+ }
+ // update volume bar scrubber/fill on bar mode
+ this.$volumeBarContainer.find('.bar-fill-2').css({});
+ var containerWidth = this.$volumeBarContainer.width();
+ var barWidth = this.$volumeBarBackground.width();
+ var offset = (containerWidth - barWidth) / 2.0;
+ var pos = barWidth * this.volume / 100.0 + offset;
+ this.$volumeBarFill.css({ width: this.volume + '%' });
+ this.$volumeBarScrubber.css({ left: pos });
+
+ // update volume bar segments on segmented bar mode
+ this.$volumeBarContainer.find('.segmented-bar-element').removeClass('fill');
+ var item = Math.ceil(this.volume / 10.0);
+ this.$volumeBarContainer.find('.segmented-bar-element').slice(0, item).addClass('fill');
+ this.$volumeIcon.html('');
+ this.$volumeIcon.removeClass('muted');
+ if (!this.muted) {
+ this.$volumeIcon.append(_volume2.default);
+ } else {
+ this.$volumeIcon.append(_mute2.default);
+ this.$volumeIcon.addClass('muted');
+ }
+ this.applyButtonStyle(this.$volumeIcon);
+ };
+
+ MediaControl.prototype.changeTogglePlay = function changeTogglePlay() {
+ this.$playPauseToggle.html('');
+ this.$playStopToggle.html('');
+ if (this.container && this.container.isPlaying()) {
+ this.$playPauseToggle.append(_pause2.default);
+ this.$playStopToggle.append(_stop2.default);
+ this.trigger(_events2.default.MEDIACONTROL_PLAYING);
+ } else {
+ this.$playPauseToggle.append(_play2.default);
+ this.$playStopToggle.append(_play2.default);
+ this.trigger(_events2.default.MEDIACONTROL_NOTPLAYING);
+ if (_browser2.default.isMobile) {
+ this.show();
+ }
+ }
+ this.applyButtonStyle(this.$playPauseToggle);
+ this.applyButtonStyle(this.$playStopToggle);
+ };
+
+ MediaControl.prototype.mousemoveOnSeekBar = function mousemoveOnSeekBar(event) {
+ if (this.settings.seekEnabled) {
+ var offsetX = event.pageX - this.$seekBarContainer.offset().left - this.$seekBarHover.width() / 2;
+ this.$seekBarHover.css({ left: offsetX });
+ }
+ this.trigger(_events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, event);
+ };
+
+ MediaControl.prototype.mouseleaveOnSeekBar = function mouseleaveOnSeekBar(event) {
+ this.trigger(_events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, event);
+ };
+
+ MediaControl.prototype.onVolumeClick = function onVolumeClick(event) {
+ this.setVolume(this.getVolumeFromUIEvent(event));
+ };
+
+ MediaControl.prototype.mousemoveOnVolumeBar = function mousemoveOnVolumeBar(event) {
+ if (this.draggingVolumeBar) {
+ this.setVolume(this.getVolumeFromUIEvent(event));
+ }
+ };
+
+ MediaControl.prototype.playerResize = function playerResize(size) {
+ this.$fullscreenToggle.html('');
+ if (_utils.Fullscreen.isFullscreen()) {
+ this.$fullscreenToggle.append(_shrink2.default);
+ } else {
+ this.$fullscreenToggle.append(_expand2.default);
+ }
+ this.applyButtonStyle(this.$fullscreenToggle);
+ this.$el.removeClass('w320');
+ if (size.width <= 320 || this.options.hideVolumeBar) {
+ this.$el.addClass('w320');
+ }
+ };
+
+ MediaControl.prototype.togglePlayPause = function togglePlayPause() {
+ if (this.container.isPlaying()) {
+ this.container.pause();
+ } else {
+ this.container.play();
+ }
+ return false;
+ };
+
+ MediaControl.prototype.togglePlayStop = function togglePlayStop() {
+ if (this.container.isPlaying()) {
+ this.container.stop();
+ } else {
+ this.container.play();
+ }
+ };
+
+ MediaControl.prototype.startSeekDrag = function startSeekDrag(event) {
+ if (!this.settings.seekEnabled) return;
+ this.draggingSeekBar = true;
+ this.$el.addClass('dragging');
+ this.$seekBarLoaded.addClass('media-control-notransition');
+ this.$seekBarPosition.addClass('media-control-notransition');
+ this.$seekBarScrubber.addClass('media-control-notransition');
+ if (event) {
+ event.preventDefault();
+ }
+ };
+
+ MediaControl.prototype.startVolumeDrag = function startVolumeDrag(event) {
+ this.draggingVolumeBar = true;
+ this.$el.addClass('dragging');
+ if (event) {
+ event.preventDefault();
+ }
+ };
+
+ MediaControl.prototype.stopDrag = function stopDrag(event) {
+ if (this.draggingSeekBar) {
+ this.seek(event);
+ }
+ this.$el.removeClass('dragging');
+ this.$seekBarLoaded.removeClass('media-control-notransition');
+ this.$seekBarPosition.removeClass('media-control-notransition');
+ this.$seekBarScrubber.removeClass('media-control-notransition dragging');
+ this.draggingSeekBar = false;
+ this.draggingVolumeBar = false;
+ };
+
+ MediaControl.prototype.updateDrag = function updateDrag(event) {
+ if (this.draggingSeekBar) {
+ event.preventDefault();
+ var offsetX = event.pageX - this.$seekBarContainer.offset().left;
+ var pos = offsetX / this.$seekBarContainer.width() * 100;
+ pos = Math.min(100, Math.max(pos, 0));
+ this.setSeekPercentage(pos);
+ } else if (this.draggingVolumeBar) {
+ event.preventDefault();
+ this.setVolume(this.getVolumeFromUIEvent(event));
+ }
+ };
+
+ MediaControl.prototype.getVolumeFromUIEvent = function getVolumeFromUIEvent(event) {
+ var offsetY = event.pageX - this.$volumeBarContainer.offset().left;
+ var volumeFromUI = offsetY / this.$volumeBarContainer.width() * 100;
+ return volumeFromUI;
+ };
+
+ MediaControl.prototype.toggleMute = function toggleMute() {
+ this.setVolume(this.muted ? 100 : 0);
+ };
+
+ MediaControl.prototype.setVolume = function setVolume(value) {
+ var _this2 = this;
+
+ value = Math.min(100, Math.max(value, 0));
+ // this will hold the intended volume
+ // it may not actually get set to this straight away
+ // if the container is not ready etc
+ this.intendedVolume = value;
+ this.persistConfig && _utils.Config.persist('volume', value);
+ var setWhenContainerReady = function setWhenContainerReady() {
+ if (_this2.container.isReady) {
+ _this2.container.setVolume(value);
+ } else {
+ _this2.listenToOnce(_this2.container, _events2.default.CONTAINER_READY, function () {
+ _this2.container.setVolume(value);
+ });
+ }
+ };
+
+ if (!this.container) {
+ this.listenToOnce(this, _events2.default.MEDIACONTROL_CONTAINERCHANGED, function () {
+ setWhenContainerReady();
+ });
+ } else {
+ setWhenContainerReady();
+ }
+ };
+
+ MediaControl.prototype.toggleFullscreen = function toggleFullscreen() {
+ this.trigger(_events2.default.MEDIACONTROL_FULLSCREEN, this.name);
+ this.container.fullscreen();
+ this.resetUserKeepVisible();
+ };
+
+ MediaControl.prototype.setContainer = function setContainer(container) {
+ if (this.container) {
+ this.stopListening(this.container);
+ this.fullScreenOnVideoTagSupported = null;
+ }
+ _mediator2.default.off(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);
+ this.container = container;
+ // set the new container to match the volume of the last one
+ this.setVolume(this.intendedVolume);
+ this.changeTogglePlay();
+ this.addEventListeners();
+ this.settingsUpdate();
+ this.container.trigger(_events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.container.isDvrInUse());
+ if (this.container.mediaControlDisabled) {
+ this.disable();
+ }
+ this.trigger(_events2.default.MEDIACONTROL_CONTAINERCHANGED);
+ };
+
+ MediaControl.prototype.showVolumeBar = function showVolumeBar() {
+ if (this.hideVolumeId) {
+ clearTimeout(this.hideVolumeId);
+ }
+ this.$volumeBarContainer.removeClass('volume-bar-hide');
+ };
+
+ MediaControl.prototype.hideVolumeBar = function hideVolumeBar() {
+ var _this3 = this;
+
+ var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 400;
+
+ if (!this.$volumeBarContainer) return;
+ if (this.draggingVolumeBar) {
+ this.hideVolumeId = setTimeout(function () {
+ return _this3.hideVolumeBar();
+ }, timeout);
+ } else {
+ if (this.hideVolumeId) {
+ clearTimeout(this.hideVolumeId);
+ }
+ this.hideVolumeId = setTimeout(function () {
+ return _this3.$volumeBarContainer.addClass('volume-bar-hide');
+ }, timeout);
+ }
+ };
+
+ MediaControl.prototype.ended = function ended() {
+ this.changeTogglePlay();
+ };
+
+ MediaControl.prototype.updateProgressBar = function updateProgressBar(progress) {
+ var loadedStart = progress.start / progress.total * 100;
+ var loadedEnd = progress.current / progress.total * 100;
+ this.$seekBarLoaded.css({ left: loadedStart + '%', width: loadedEnd - loadedStart + '%' });
+ };
+
+ MediaControl.prototype.onTimeUpdate = function onTimeUpdate(timeProgress) {
+ if (this.draggingSeekBar) return;
+ // TODO why should current time ever be negative?
+ var position = timeProgress.current < 0 ? timeProgress.total : timeProgress.current;
+
+ this.currentPositionValue = position;
+ this.currentDurationValue = timeProgress.total;
+ this.renderSeekBar();
+ };
+
+ MediaControl.prototype.renderSeekBar = function renderSeekBar() {
+ if (this.currentPositionValue === null || this.currentDurationValue === null) {
+ // this will be triggered as soon as these beocome available
+ return;
+ }
+
+ // default to 100%
+ this.currentSeekBarPercentage = 100;
+ if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrInUse()) {
+ this.currentSeekBarPercentage = this.currentPositionValue / this.currentDurationValue * 100;
+ }
+ this.setSeekPercentage(this.currentSeekBarPercentage);
+
+ var newPosition = (0, _utils.formatTime)(this.currentPositionValue);
+ var newDuration = (0, _utils.formatTime)(this.currentDurationValue);
+ if (newPosition !== this.displayedPosition) {
+ this.$position.text(newPosition);
+ this.displayedPosition = newPosition;
+ }
+ if (newDuration !== this.displayedDuration) {
+ this.$duration.text(newDuration);
+ this.displayedDuration = newDuration;
+ }
+ };
+
+ MediaControl.prototype.seek = function seek(event) {
+ if (!this.settings.seekEnabled) return;
+ var offsetX = event.pageX - this.$seekBarContainer.offset().left;
+ var pos = offsetX / this.$seekBarContainer.width() * 100;
+ pos = Math.min(100, Math.max(pos, 0));
+ this.container.seekPercentage(pos);
+ this.setSeekPercentage(pos);
+ return false;
+ };
+
+ MediaControl.prototype.setKeepVisible = function setKeepVisible() {
+ this.keepVisible = true;
+ };
+
+ MediaControl.prototype.resetKeepVisible = function resetKeepVisible() {
+ this.keepVisible = false;
+ };
+
+ MediaControl.prototype.setUserKeepVisible = function setUserKeepVisible() {
+ this.userKeepVisible = true;
+ };
+
+ MediaControl.prototype.resetUserKeepVisible = function resetUserKeepVisible() {
+ this.userKeepVisible = false;
+ };
+
+ MediaControl.prototype.isVisible = function isVisible() {
+ return !this.$el.hasClass('media-control-hide');
+ };
+
+ MediaControl.prototype.show = function show(event) {
+ var _this4 = this;
+
+ if (this.disabled) {
+ return;
+ }
+ var timeout = 2000;
+ if (!event || event.clientX !== this.lastMouseX && event.clientY !== this.lastMouseY || navigator.userAgent.match(/firefox/i)) {
+ clearTimeout(this.hideId);
+ this.$el.show();
+ this.trigger(_events2.default.MEDIACONTROL_SHOW, this.name);
+ this.$el.removeClass('media-control-hide');
+ this.hideId = setTimeout(function () {
+ return _this4.hide();
+ }, timeout);
+ if (event) {
+ this.lastMouseX = event.clientX;
+ this.lastMouseY = event.clientY;
+ }
+ }
+ };
+
+ MediaControl.prototype.hide = function hide() {
+ var _this5 = this;
+
+ var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
+
+ if (!this.isVisible() || _browser2.default.isMobile && !this.container.isPlaying()) {
+ return;
+ }
+ var timeout = delay || 2000;
+ clearTimeout(this.hideId);
+ if (!this.disabled && this.options.hideMediaControl === false) {
+ return;
+ }
+ if (!this.disabled && (delay || this.userKeepVisible || this.keepVisible || this.draggingSeekBar || this.draggingVolumeBar)) {
+ this.hideId = setTimeout(function () {
+ return _this5.hide();
+ }, timeout);
+ } else {
+ this.trigger(_events2.default.MEDIACONTROL_HIDE, this.name);
+ this.$el.addClass('media-control-hide');
+ this.hideVolumeBar(0);
+ }
+ };
+
+ MediaControl.prototype.settingsUpdate = function settingsUpdate() {
+ var newSettings = this.getSettings();
+ if (newSettings && !this.fullScreenOnVideoTagSupported && !_utils.Fullscreen.fullscreenEnabled()) {
+ // remove fullscreen from settings if it is present
+ newSettings.default && (0, _utils.removeArrayItem)(newSettings.default, 'fullscreen');
+ newSettings.left && (0, _utils.removeArrayItem)(newSettings.left, 'fullscreen');
+ newSettings.right && (0, _utils.removeArrayItem)(newSettings.right, 'fullscreen');
+ }
+ var settingsChanged = JSON.stringify(this.settings) !== JSON.stringify(newSettings);
+ if (settingsChanged) {
+ this.settings = newSettings;
+ this.render();
+ }
+ };
+
+ MediaControl.prototype.getSettings = function getSettings() {
+ return (0, _lodash2.default)({}, this.container.settings);
+ };
+
+ MediaControl.prototype.highDefinitionUpdate = function highDefinitionUpdate(isHD) {
+ var method = isHD ? 'addClass' : 'removeClass';
+ this.$hdIndicator[method]('enabled');
+ };
+
+ MediaControl.prototype.createCachedElements = function createCachedElements() {
+ var $layer = this.$el.find('.media-control-layer');
+ this.$duration = $layer.find('.media-control-indicator[data-duration]');
+ this.$fullscreenToggle = $layer.find('button.media-control-button[data-fullscreen]');
+ this.$playPauseToggle = $layer.find('button.media-control-button[data-playpause]');
+ this.$playStopToggle = $layer.find('button.media-control-button[data-playstop]');
+ this.$position = $layer.find('.media-control-indicator[data-position]');
+ this.$seekBarContainer = $layer.find('.bar-container[data-seekbar]');
+ this.$seekBarHover = $layer.find('.bar-hover[data-seekbar]');
+ this.$seekBarLoaded = $layer.find('.bar-fill-1[data-seekbar]');
+ this.$seekBarPosition = $layer.find('.bar-fill-2[data-seekbar]');
+ this.$seekBarScrubber = $layer.find('.bar-scrubber[data-seekbar]');
+ this.$volumeBarContainer = $layer.find('.bar-container[data-volume]');
+ this.$volumeContainer = $layer.find('.drawer-container[data-volume]');
+ this.$volumeIcon = $layer.find('.drawer-icon[data-volume]');
+ this.$volumeBarBackground = this.$el.find('.bar-background[data-volume]');
+ this.$volumeBarFill = this.$el.find('.bar-fill-1[data-volume]');
+ this.$volumeBarScrubber = this.$el.find('.bar-scrubber[data-volume]');
+ this.$hdIndicator = this.$el.find('button.media-control-button[data-hd-indicator]');
+ this.resetIndicators();
+ this.initializeIcons();
+ };
+
+ MediaControl.prototype.resetIndicators = function resetIndicators() {
+ this.displayedPosition = this.$position.text();
+ this.displayedDuration = this.$duration.text();
+ };
+
+ MediaControl.prototype.initializeIcons = function initializeIcons() {
+ var $layer = this.$el.find('.media-control-layer');
+ $layer.find('button.media-control-button[data-play]').append(_play2.default);
+ $layer.find('button.media-control-button[data-pause]').append(_pause2.default);
+ $layer.find('button.media-control-button[data-stop]').append(_stop2.default);
+ this.$playPauseToggle.append(_play2.default);
+ this.$playStopToggle.append(_play2.default);
+ this.$volumeIcon.append(_volume2.default);
+ this.$fullscreenToggle.append(_expand2.default);
+ this.$hdIndicator.append(_hd2.default);
+ };
+
+ MediaControl.prototype.setSeekPercentage = function setSeekPercentage(value) {
+ value = Math.max(Math.min(value, 100.0), 0);
+ if (this.displayedSeekBarPercentage === value) {
+ // not changed since last update
+ return;
+ }
+ this.displayedSeekBarPercentage = value;
+
+ this.$seekBarPosition.removeClass('media-control-notransition');
+ this.$seekBarScrubber.removeClass('media-control-notransition');
+ this.$seekBarPosition.css({ width: value + '%' });
+ this.$seekBarScrubber.css({ left: value + '%' });
+ };
+
+ MediaControl.prototype.seekRelative = function seekRelative(delta) {
+ if (!this.settings.seekEnabled) return;
+ var currentTime = this.container.getCurrentTime();
+ var duration = this.container.getDuration();
+ var position = Math.min(Math.max(currentTime + delta, 0), duration);
+ position = Math.min(position * 100 / duration, 100);
+ this.container.seekPercentage(position);
+ };
+
+ MediaControl.prototype.bindKeyEvents = function bindKeyEvents() {
+ var _this6 = this;
+
+ this.unbindKeyEvents();
+ this.kibo = new _vendor.Kibo(this.options.focusElement);
+ this.kibo.down(['space'], function () {
+ return _this6.togglePlayPause();
+ });
+ this.kibo.down(['left'], function () {
+ return _this6.seekRelative(-15);
+ });
+ this.kibo.down(['right'], function () {
+ return _this6.seekRelative(15);
+ });
+ var keys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
+ keys.forEach(function (i) {
+ _this6.kibo.down(i.toString(), function () {
+ return _this6.settings.seekEnabled && _this6.container.seekPercentage(i * 10);
+ });
+ });
+ };
+
+ MediaControl.prototype.unbindKeyEvents = function unbindKeyEvents() {
+ if (this.kibo) {
+ this.kibo.off('space');
+ this.kibo.off('left');
+ this.kibo.off('right');
+ this.kibo.off([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
+ }
+ };
+
+ MediaControl.prototype.parseColors = function parseColors() {
+ if (this.options.mediacontrol) {
+ this.buttonsColor = this.options.mediacontrol.buttons;
+ var seekbarColor = this.options.mediacontrol.seekbar;
+ this.$el.find('.bar-fill-2[data-seekbar]').css('background-color', seekbarColor);
+ this.$el.find('.media-control-icon svg path').css('fill', this.buttonsColor);
+ this.$el.find('.segmented-bar-element[data-volume]').css('boxShadow', 'inset 2px 0 0 ' + this.buttonsColor);
+ }
+ };
+
+ MediaControl.prototype.applyButtonStyle = function applyButtonStyle(element) {
+ if (this.buttonsColor && element) {
+ (0, _clapprZepto2.default)(element).find('svg path').css('fill', this.buttonsColor);
+ }
+ };
+
+ MediaControl.prototype.destroy = function destroy() {
+ this.remove();
+ (0, _clapprZepto2.default)(document).unbind('mouseup', this.stopDragHandler);
+ (0, _clapprZepto2.default)(document).unbind('mousemove', this.updateDragHandler);
+ this.unbindKeyEvents();
+ };
+
+ MediaControl.prototype.render = function render() {
+ var _this7 = this;
+
+ var timeout = 1000;
+ this.$el.html(this.template({ settings: this.settings }));
+ this.$el.append(this.stylesheet);
+ this.createCachedElements();
+ this.$playPauseToggle.addClass('paused');
+ this.$playStopToggle.addClass('stopped');
+
+ this.changeTogglePlay();
+ this.hideId = setTimeout(function () {
+ return _this7.hide();
+ }, timeout);
+ if (this.disabled) {
+ this.hide();
+ }
+
+ if (_browser2.default.isSafari && _browser2.default.isMobile) {
+ this.$volumeContainer.css('display', 'none');
+ }
+
+ this.$seekBarPosition.addClass('media-control-notransition');
+ this.$seekBarScrubber.addClass('media-control-notransition');
+
+ var previousSeekPercentage = 0;
+ if (this.displayedSeekBarPercentage) {
+ previousSeekPercentage = this.displayedSeekBarPercentage;
+ }
+ this.displayedSeekBarPercentage = null;
+ this.setSeekPercentage(previousSeekPercentage);
+
+ process.nextTick(function () {
+ if (!_this7.settings.seekEnabled) {
+ _this7.$seekBarContainer.addClass('seek-disabled');
+ }
+ if (!_this7.options.disableKeyboardShortcuts) {
+ _this7.bindKeyEvents();
+ }
+ _this7.playerResize({ width: _this7.options.width, height: _this7.options.height });
+ _this7.hideVolumeBar(0);
+ });
+
+ this.parseColors();
+ this.highDefinitionUpdate();
+
+ this.rendered = true;
+ this.updateVolumeUI();
+ this.trigger(_events2.default.MEDIACONTROL_RENDERED);
+ return this;
+ };
+
+ return MediaControl;
+ }(_ui_object2.default);
+
+ exports.default = MediaControl;
+
+
+ MediaControl.extend = function (properties) {
+ return (0, _utils.extend)(MediaControl, properties);
+ };
+ module.exports = exports['default'];
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29)))
+
+/***/ },
+/* 29 */
+/***/ function(module, exports) {
+
+ // shim for using process in browser
+ var process = module.exports = {};
+
+ // cached from whatever global is present so that test runners that stub it
+ // don't break things. But we need to wrap it in a try catch in case it is
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
+ // function because try/catches deoptimize in certain engines.
+
+ var cachedSetTimeout;
+ var cachedClearTimeout;
+
+ function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+ }
+ function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+ }
+ (function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } ())
+ function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+ }
+ function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+ }
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
+
+ function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
+
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+ };
+
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
+/***/ },
+/* 30 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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"); } } // 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.
+
+ /**
+ * The mediator is a singleton for handling global events.
+ */
+
+ var events = new _events2.default();
+
+ var Mediator = function Mediator() {
+ _classCallCheck(this, Mediator);
+ };
+
+ exports.default = Mediator;
+
+
+ Mediator.on = function (name, callback, context) {
+ events.on(name, callback, context);
+ return;
+ };
+
+ Mediator.once = function (name, callback, context) {
+ events.once(name, callback, context);
+ return;
+ };
+
+ Mediator.off = function (name, callback, context) {
+ events.off(name, callback, context);
+ return;
+ };
+
+ Mediator.trigger = function (name) {
+ for (var _len = arguments.length, opts = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ opts[_key - 1] = arguments[_key];
+ }
+
+ events.trigger.apply(events, [name].concat(opts));
+ return;
+ };
+
+ Mediator.stopListening = function (obj, name, callback) {
+ events.stopListening(obj, name, callback);
+ return;
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 31 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ /**
+ * An abstraction to represent a generic playback, it's like an interface to be implemented by subclasses.
+ * @class Playback
+ * @constructor
+ * @extends UIObject
+ * @module base
+ */
+ var Playback = function (_UIObject) {
+ _inherits(Playback, _UIObject);
+
+ _createClass(Playback, [{
+ key: 'isAudioOnly',
+
+ /**
+ * Determine if the playback does not contain video/has video but video should be ignored.
+ * @property isAudioOnly
+ * @type Boolean
+ */
+ get: function get() {
+ return false;
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return false;
+ }
+
+ /**
+ * The internationalization plugin.
+ * @property i18n
+ * @type {Strings}
+ */
+
+ }, {
+ key: 'i18n',
+ get: function get() {
+ return this._i18n;
+ }
+
+ /**
+ * Determine if the playback is having to buffer in order for
+ * playback to be smooth.
+ * (i.e if a live stream is playing smoothly, this will be false)
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return false;
+ }
+
+ /**
+ * @method constructor
+ * @param {Object} options the options object
+ * @param {Strings} i18n the internationalization component
+ */
+
+ }]);
+
+ function Playback(options, i18n) {
+ _classCallCheck(this, Playback);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));
+
+ _this.settings = {};
+ _this._i18n = i18n;
+ return _this;
+ }
+
+ /**
+ * plays the playback.
+ * @method play
+ */
+
+
+ Playback.prototype.play = function play() {};
+
+ /**
+ * pauses the playback.
+ * @method pause
+ */
+
+
+ Playback.prototype.pause = function pause() {};
+
+ /**
+ * stops the playback.
+ * @method stop
+ */
+
+
+ Playback.prototype.stop = function stop() {};
+
+ /**
+ * seeks the playback to a given `time` in seconds
+ * @method seek
+ * @param {Number} time should be a number between 0 and the video duration
+ */
+
+
+ Playback.prototype.seek = function seek(time) {}; // eslint-disable-line no-unused-vars
+
+ /**
+ * seeks the playback to a given `percentage` in percentage
+ * @method seekPercentage
+ * @param {Number} time should be a number between 0 and 100
+ */
+
+
+ Playback.prototype.seekPercentage = function seekPercentage(percentage) {}; // eslint-disable-line no-unused-vars
+
+
+ /**
+ * The time that "0" now represents relative to when playback started.
+ * For a stream with a sliding window this will increase as content is
+ * removed from the beginning.
+ * @method getStartTimeOffset
+ * @return {Number} time (in seconds) that time "0" represents.
+ */
+
+
+ Playback.prototype.getStartTimeOffset = function getStartTimeOffset() {
+ return 0;
+ };
+
+ /**
+ * gets the duration in seconds
+ * @method getDuration
+ * @return {Number} duration (in seconds) of the current source
+ */
+
+
+ Playback.prototype.getDuration = function getDuration() {
+ return 0;
+ };
+
+ /**
+ * checks if the playback is playing.
+ * @method isPlaying
+ * @return {Boolean} `true` if the current playback is playing, otherwise `false`
+ */
+
+
+ Playback.prototype.isPlaying = function isPlaying() {
+ return false;
+ };
+
+ /**
+ * checks if the playback is ready.
+ * @property isReady
+ * @type {Boolean} `true` if the current playback is ready, otherwise `false`
+ */
+
+
+ /**
+ * gets the playback type (`'vod', 'live', 'aod'`)
+ * @method getPlaybackType
+ * @return {String} you should write the playback type otherwise it'll assume `'no_op'`
+ * @example
+ * ```javascript
+ * html5VideoPlayback.getPlaybackType() //vod
+ * html5AudioPlayback.getPlaybackType() //aod
+ * html5VideoPlayback.getPlaybackType() //live
+ * flashHlsPlayback.getPlaybackType() //live
+ * ```
+ */
+ Playback.prototype.getPlaybackType = function getPlaybackType() {
+ return Playback.NO_OP;
+ };
+
+ /**
+ * checks if the playback is in HD.
+ * @method isHighDefinitionInUse
+ * @return {Boolean} `true` if the playback is playing in HD, otherwise `false`
+ */
+
+
+ Playback.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {
+ return false;
+ };
+
+ /**
+ * sets the volume for the playback
+ * @method volume
+ * @param {Number} value a number between 0 (`muted`) to 100 (`max`)
+ */
+
+
+ Playback.prototype.volume = function volume(value) {}; // eslint-disable-line no-unused-vars
+
+ /**
+ * destroys the playback, removing it from DOM
+ * @method destroy
+ */
+
+
+ Playback.prototype.destroy = function destroy() {
+ this.$el.remove();
+ };
+
+ _createClass(Playback, [{
+ key: 'isReady',
+ get: function get() {
+ return false;
+ }
+ }]);
+
+ return Playback;
+ }(_ui_object2.default);
+
+ exports.default = Playback;
+
+
+ Playback.extend = function (properties) {
+ return (0, _utils.extend)(Playback, properties);
+ };
+
+ /**
+ * checks if the playback can play a given `source`
+ * If a mimeType is provided then this will be used instead of inferring the mimetype
+ * from the source extension.
+ * @method canPlay
+ * @static
+ * @param {String} source the given source ex: `http://example.com/play.mp4`
+ * @param {String} [mimeType] the given mime type, ex: `'application/vnd.apple.mpegurl'`
+ * @return {Boolean} `true` if the playback is playable, otherwise `false`
+ */
+ Playback.canPlay = function (source, mimeType) {
+ // eslint-disable-line no-unused-vars
+ return false;
+ };
+
+ /**
+ * a playback type for video on demand
+ *
+ * @property VOD
+ * @static
+ * @type String
+ */
+ Playback.VOD = 'vod';
+ /**
+ * a playback type for audio on demand
+ *
+ * @property AOD
+ * @static
+ * @type String
+ */
+ Playback.AOD = 'aod';
+ /**
+ * a playback type for live video
+ *
+ * @property LIVE
+ * @static
+ * @type String
+ */
+ Playback.LIVE = 'live';
+ /**
+ * a default playback type
+ *
+ * @property NO_OP
+ * @static
+ * @type String
+ */
+ Playback.NO_OP = 'no_op';
+ /**
+ * the plugin type
+ *
+ * @property type
+ * @static
+ * @type String
+ */
+ Playback.type = 'playback';
+ module.exports = exports['default'];
+
+/***/ },
+/* 32 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, module) {/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `map.set` because it's not chainable in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+ }
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ // Don't return `set.add` because it's not chainable in IE 11.
+ set.add(value);
+ return set;
+ }
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = root['__core-js_shared__'];
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? root.Buffer : undefined,
+ Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(root, 'DataView'),
+ Map = getNative(root, 'Map'),
+ Promise = getNative(root, 'Promise'),
+ Set = getNative(root, 'Set'),
+ WeakMap = getNative(root, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ this.__data__ = new ListCache(entries);
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ return this.__data__['delete'](key);
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var cache = this.__data__;
+ if (cache instanceof ListCache) {
+ var pairs = cache.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ return this;
+ }
+ cache = this.__data__ = new MapCache(pairs);
+ }
+ cache.set(key, value);
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (!isArr) {
+ var props = isFull ? getAllKeys(value) : keys(value);
+ }
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `getTag`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString.call(value);
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
+
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ if (!(isArray(source) || isTypedArray(source))) {
+ var props = baseKeysIn(source);
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ });
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ else {
+ newValue = objValue;
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+ function baseRest(func, start) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
+
+ assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * Creates an array of the own enumerable symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge < 14, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = nativeIsBuffer || stubFalse;
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+ function stubArray() {
+ return [];
+ }
+
+ /**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+ function stubFalse() {
+ return false;
+ }
+
+ module.exports = merge;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(33)(module)))
+
+/***/ },
+/* 33 */
+/***/ function(module, exports) {
+
+ module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
+
+/***/ },
+/* 34 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".media-control-notransition {\n -webkit-transition: none !important;\n -moz-transition: none !important;\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url(" + __webpack_require__(35) + "), move; }\n .media-control[data-media-control].dragging * {\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url(" + __webpack_require__(35) + "), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n -webkit-transition: opacity 0.6s ease-out;\n -moz-transition: opacity 0.6s ease-out;\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n -webkit-transition: all 0.1s ease;\n -moz-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n bottom: -50px; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n bottom: 7px;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n -webkit-transition: bottom 0.4s ease-out;\n -moz-transition: bottom 0.4s ease-out;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n cursor: default;\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%;\n display: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n opacity: 1.0;\n display: block; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: \"|\";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n -ms-transform: translateX(-50%);\n -o-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n -webkit-transition: width 0.2s ease-out;\n -moz-transition: width 0.2s ease-out;\n transition: width 0.2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n -moz-transform: translateX(-50%);\n -ms-transform: translateX(-50%);\n -o-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n -webkit-transition: all 0.1s ease-out;\n -moz-transition: all 0.1s ease-out;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n -webkit-transition: -webkit-transform 0.2s ease-out;\n -moz-transition: -moz-transform 0.2s ease-out;\n transition: transform 0.2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n -webkit-transform: scaleY(1.5);\n -moz-transform: scaleY(1.5);\n -ms-transform: scaleY(1.5);\n -o-transform: scaleY(1.5);\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 35 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__.p + "a8c874b93b3d848f39a71260c57e3863.cur";
+
+/***/ },
+/* 36 */
+/***/ function(module, exports) {
+
+ module.exports = "<div class=\"media-control-background\" data-background></div>\n<div class=\"media-control-layer\" data-controls>\n <% var renderBar = function(name) { %>\n <div class=\"bar-container\" data-<%= name %>>\n <div class=\"bar-background\" data-<%= name %>>\n <div class=\"bar-fill-1\" data-<%= name %>></div>\n <div class=\"bar-fill-2\" data-<%= name %>></div>\n <div class=\"bar-hover\" data-<%= name %>></div>\n </div>\n <div class=\"bar-scrubber\" data-<%= name %>>\n <div class=\"bar-scrubber-icon\" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class=\"bar-container\" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class=\"segmented-bar-element\" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class=\"drawer-container\" data-<%= name %>>\n <div class=\"drawer-icon-container\" data-<%= name %>>\n <div class=\"drawer-icon media-control-icon\" data-<%= name %>></div>\n <span class=\"drawer-text\" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class=\"media-control-indicator\" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type=\"button\" class=\"media-control-button media-control-icon\" data-<%= name %>></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === \"seekbar\") {\n renderBar(setting);\n } else if (setting === \"volume\") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === \"duration\" || setting === \"position\") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class=\"media-control-center-panel\" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class=\"media-control-left-panel\" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class=\"media-control-right-panel\" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n";
+
+/***/ },
+/* 37 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"#010101\" d=\"M1.425.35L14.575 8l-13.15 7.65V.35z\"></path></svg>"
+
+/***/ },
+/* 38 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z\"></path></svg>"
+
+/***/ },
+/* 39 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M1.712 1.24h12.6v13.52h-12.6z\"></path></svg>"
+
+/***/ },
+/* 40 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z\"></path></svg>"
+
+/***/ },
+/* 41 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" fill=\"#010101\" d=\"M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z\"></path></svg>"
+
+/***/ },
+/* 42 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"#010101\" d=\"M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z\"></path></svg>"
+
+/***/ },
+/* 43 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"#010101\" d=\"M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z\"></path></svg>"
+
+/***/ },
+/* 44 */
+/***/ function(module, exports) {
+
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path fill=\"#010101\" d=\"M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z\"></path></svg>"
+
+/***/ },
+/* 45 */
+/***/ function(module, exports) {
+
+ "use strict";
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ // 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 PlayerInfo = function PlayerInfo() {
+ _classCallCheck(this, PlayerInfo);
+
+ this.options = {};
+ this.playbackPlugins = [];
+ this.currentSize = { width: 0, height: 0 };
+ };
+
+ PlayerInfo._players = {};
+
+ PlayerInfo.getInstance = function (playerId) {
+ return PlayerInfo._players[playerId] || (PlayerInfo._players[playerId] = new PlayerInfo());
+ };
+
+ exports.default = PlayerInfo;
+ module.exports = exports["default"];
+
+/***/ },
+/* 46 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, "@font-face {\n font-family: \"Roboto\";\n font-style: normal;\n font-weight: 400;\n src: local(\"Roboto\"), local(\"Roboto-Regular\"), url(" + __webpack_require__(47) + ") format(\"truetype\"); }\n\n[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n -ms-transform: translate3d(0, 0, 0);\n -o-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n [data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n [data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n [data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n [data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n [data-player] b, [data-player] u, [data-player] i, [data-player] center,\n [data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n [data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n [data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n [data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n [data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n [data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n [data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n [data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n [data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n [data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: \"\";\n content: none; }\n [data-player] a img {\n border: none; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n max-width: none;\n box-sizing: inherit;\n float: none; }\n [data-player] div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 47 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__.p + "38861cba61c66739c1452c3a71e39852.ttf";
+
+/***/ },
+/* 48 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(49);
+
+/***/ },
+/* 49 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _player_info = __webpack_require__(45);
+
+ var _player_info2 = _interopRequireDefault(_player_info);
+
+ var _lodash = __webpack_require__(50);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ var _html5_video = __webpack_require__(51);
+
+ var _html5_video2 = _interopRequireDefault(_html5_video);
+
+ var _flash = __webpack_require__(54);
+
+ var _flash2 = _interopRequireDefault(_flash);
+
+ var _html5_audio = __webpack_require__(61);
+
+ var _html5_audio2 = _interopRequireDefault(_html5_audio);
+
+ var _flashls = __webpack_require__(63);
+
+ var _flashls2 = _interopRequireDefault(_flashls);
+
+ var _hls = __webpack_require__(67);
+
+ var _hls2 = _interopRequireDefault(_hls);
+
+ var _html_img = __webpack_require__(71);
+
+ var _html_img2 = _interopRequireDefault(_html_img);
+
+ var _no_op = __webpack_require__(74);
+
+ var _no_op2 = _interopRequireDefault(_no_op);
+
+ var _spinner_three_bounce = __webpack_require__(78);
+
+ var _spinner_three_bounce2 = _interopRequireDefault(_spinner_three_bounce);
+
+ var _stats = __webpack_require__(83);
+
+ var _stats2 = _interopRequireDefault(_stats);
+
+ var _watermark = __webpack_require__(86);
+
+ var _watermark2 = _interopRequireDefault(_watermark);
+
+ var _poster = __webpack_require__(90);
+
+ var _poster2 = _interopRequireDefault(_poster);
+
+ var _google_analytics = __webpack_require__(94);
+
+ var _google_analytics2 = _interopRequireDefault(_google_analytics);
+
+ var _click_to_pause = __webpack_require__(96);
+
+ var _click_to_pause2 = _interopRequireDefault(_click_to_pause);
+
+ var _dvr_controls = __webpack_require__(98);
+
+ var _dvr_controls2 = _interopRequireDefault(_dvr_controls);
+
+ var _favicon = __webpack_require__(103);
+
+ var _favicon2 = _interopRequireDefault(_favicon);
+
+ var _seek_time = __webpack_require__(106);
+
+ var _seek_time2 = _interopRequireDefault(_seek_time);
+
+ var _sources = __webpack_require__(110);
+
+ var _sources2 = _interopRequireDefault(_sources);
+
+ var _end_video = __webpack_require__(111);
+
+ var _end_video2 = _interopRequireDefault(_end_video);
+
+ var _strings = __webpack_require__(112);
+
+ var _strings2 = _interopRequireDefault(_strings);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /* Playback Plugins */
+
+
+ /* Container Plugins */
+
+
+ /* Core Plugins */
+
+
+ /**
+ * It keeps a list of the default plugins (playback, container, core) and it merges external plugins with its internals.
+ * @class Loader
+ * @constructor
+ * @extends BaseObject
+ * @module components
+ */
+ var Loader = function (_BaseObject) {
+ _inherits(Loader, _BaseObject);
+
+ /**
+ * builds the loader
+ * @method constructor
+ * @param {Object} externalPlugins the external plugins
+ * @param {Number} playerId you can embed multiple instances of clappr, therefore this is the unique id of each one.
+ */
+ function Loader(externalPlugins, playerId) {
+ _classCallCheck(this, Loader);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this));
+
+ _this.playerId = playerId;
+ _this.playbackPlugins = [_hls2.default, _html5_video2.default, _html5_audio2.default, _flash2.default, _flashls2.default, _html_img2.default, _no_op2.default];
+ _this.containerPlugins = [_spinner_three_bounce2.default, _watermark2.default, _poster2.default, _stats2.default, _google_analytics2.default, _click_to_pause2.default];
+ _this.corePlugins = [_dvr_controls2.default, _favicon2.default, _seek_time2.default, _sources2.default, _end_video2.default, _strings2.default];
+ if (externalPlugins) {
+ if (!Array.isArray(externalPlugins)) {
+ _this.validateExternalPluginsType(externalPlugins);
+ }
+ _this.addExternalPlugins(externalPlugins);
+ }
+ return _this;
+ }
+
+ /**
+ * groups by type the external plugins that were passed through `options.plugins` it they're on a flat array
+ * @method addExternalPlugins
+ * @private
+ * @param {Object} an config object or an array of plugins
+ * @return {Object} plugins the config object with the plugins separated by type
+ */
+
+
+ Loader.prototype.groupPluginsByType = function groupPluginsByType(plugins) {
+ if (Array.isArray(plugins)) {
+ plugins = plugins.reduce(function (memo, plugin) {
+ memo[plugin.type] || (memo[plugin.type] = []);
+ memo[plugin.type].push(plugin);
+ return memo;
+ }, {});
+ }
+ return plugins;
+ };
+
+ /**
+ * adds all the external plugins that were passed through `options.plugins`
+ * @method addExternalPlugins
+ * @private
+ * @param {Object} plugins the config object with all plugins
+ */
+
+
+ Loader.prototype.addExternalPlugins = function addExternalPlugins(plugins) {
+ plugins = this.groupPluginsByType(plugins);
+ var pluginName = function pluginName(plugin) {
+ return plugin.prototype.name;
+ };
+ if (plugins.playback) {
+ this.playbackPlugins = (0, _lodash2.default)(plugins.playback.concat(this.playbackPlugins), pluginName);
+ }
+ if (plugins.container) {
+ this.containerPlugins = (0, _lodash2.default)(plugins.container.concat(this.containerPlugins), pluginName);
+ }
+ if (plugins.core) {
+ this.corePlugins = (0, _lodash2.default)(plugins.core.concat(this.corePlugins), pluginName);
+ }
+ _player_info2.default.getInstance(this.playerId).playbackPlugins = this.playbackPlugins;
+ };
+
+ /**
+ * validate if the external plugins that were passed through `options.plugins` are associated to the correct type
+ * @method validateExternalPluginsType
+ * @private
+ * @param {Object} plugins the config object with all plugins
+ */
+
+
+ Loader.prototype.validateExternalPluginsType = function validateExternalPluginsType(plugins) {
+ var plugintypes = ['playback', 'container', 'core'];
+ plugintypes.forEach(function (type) {
+ (plugins[type] || []).forEach(function (el) {
+ var errorMessage = 'external ' + el.type + ' plugin on ' + type + ' array';
+ if (el.type !== type) {
+ throw new ReferenceError(errorMessage);
+ }
+ });
+ });
+ };
+
+ return Loader;
+ }(_base_object2.default);
+
+ exports.default = Loader;
+ module.exports = exports['default'];
+
+/***/ },
+/* 50 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, module) {/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ var length = array ? array.length : 0;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return baseFindIndex(array, baseIsNaN, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+ function baseIsNaN(value) {
+ return value !== value;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * Checks if a cache value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function cacheHas(cache, key) {
+ return cache.has(key);
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = root['__core-js_shared__'];
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeKeys = overArg(Object.keys, Object);
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(root, 'DataView'),
+ Map = getNative(root, 'Map'),
+ Promise = getNative(root, 'Promise'),
+ Set = getNative(root, 'Set'),
+ WeakMap = getNative(root, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ this.__data__ = new ListCache(entries);
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ return this.__data__['delete'](key);
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var cache = this.__data__;
+ if (cache instanceof ListCache) {
+ var pairs = cache.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ return this;
+ }
+ cache = this.__data__ = new MapCache(pairs);
+ }
+ cache.set(key, value);
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getTag`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString.call(value);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
+ };
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+ }
+
+ /**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!seen.has(othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
+ return seen.add(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= UNORDERED_COMPARE_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
+
+ while (length--) {
+ var key = result[length],
+ value = object[key];
+
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge < 14, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var result,
+ index = -1,
+ length = path.length;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result) {
+ return result;
+ }
+ var length = object ? object.length : 0;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoize(function(string) {
+ string = toString(string);
+
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseUniq(array, baseIteratee(iteratee, 2))
+ : [];
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Assign cache to `_.memoize`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ /**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ module.exports = uniqBy;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(33)(module)))
+
+/***/ },
+/* 51 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(52);
+
+/***/ },
+/* 52 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {'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 _utils = __webpack_require__(2);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _style = __webpack_require__(53);
+
+ var _style2 = _interopRequireDefault(_style);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // 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 MIMETYPES = {
+ 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {
+ return 'video/mp4; codecs="' + codec + ', mp4a.40.2"';
+ }),
+ 'ogg': ['video/ogg; codecs="theora, vorbis"', 'video/ogg; codecs="dirac"', 'video/ogg; codecs="theora, speex"'],
+ '3gpp': ['video/3gpp; codecs="mp4v.20.8, samr"'],
+ 'webm': ['video/webm; codecs="vp8, vorbis"'],
+ 'mkv': ['video/x-matroska; codecs="theora, vorbis"'],
+ 'm3u8': ['application/x-mpegurl']
+ };
+ MIMETYPES['ogv'] = MIMETYPES['ogg'];
+ MIMETYPES['3gp'] = MIMETYPES['3gpp'];
+
+ var AUDIO_MIMETYPES = {
+ 'wav': ['audio/wav'],
+ 'mp3': ['audio/mp3', 'audio/mpeg;codecs="mp3"'],
+ 'aac': ['audio/mp4;codecs="mp4a.40.5"'],
+ 'oga': ['audio/ogg']
+ };
+
+ var KNOWN_AUDIO_MIMETYPES = Object.keys(AUDIO_MIMETYPES).reduce(function (acc, k) {
+ return [].concat(_toConsumableArray(acc), _toConsumableArray(AUDIO_MIMETYPES[k]));
+ }, []);
+
+ // TODO: rename this Playback to HTML5Playback (breaking change, only after 0.3.0)
+
+ var HTML5Video = function (_Playback) {
+ _inherits(HTML5Video, _Playback);
+
+ _createClass(HTML5Video, [{
+ key: 'name',
+ get: function get() {
+ return 'html5_video';
+ }
+ }, {
+ key: 'tagName',
+ get: function get() {
+ return this.isAudioOnly ? 'audio' : 'video';
+ }
+ }, {
+ key: 'isAudioOnly',
+ get: function get() {
+ var resourceUrl = this.options.src;
+ var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, AUDIO_MIMETYPES, this.options.mimeType);
+ return this.options.playback && this.options.playback.audioOnly || this.options.audioOnly || KNOWN_AUDIO_MIMETYPES.indexOf(mimeTypes[0]) >= 0;
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'data-html5-video': ''
+ };
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'canplay': '_onCanPlay',
+ 'canplaythrough': '_handleBufferingEvents',
+ 'durationchange': '_onDurationChange',
+ 'ended': '_onEnded',
+ 'error': '_onError',
+ 'loadeddata': '_onLoadedData',
+ 'loadedmetadata': '_onLoadedMetadata',
+ 'pause': '_onPause',
+ 'playing': '_onPlaying',
+ 'progress': '_onProgress',
+ 'seeked': '_handleBufferingEvents',
+ 'seeking': '_handleBufferingEvents',
+ 'stalled': '_handleBufferingEvents',
+ 'timeupdate': '_onTimeUpdate',
+ 'waiting': '_onWaiting'
+ };
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this.el.ended;
+ }
+
+ /**
+ * Determine if the playback is having to buffer in order for
+ * playback to be smooth.
+ * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return !!this._bufferingState;
+ }
+ }]);
+
+ function HTML5Video() {
+ _classCallCheck(this, HTML5Video);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var _this = _possibleConstructorReturn(this, _Playback.call.apply(_Playback, [this].concat(args)));
+
+ _this._loadStarted = false;
+ _this._playheadMoving = false;
+ _this._playheadMovingTimer = null;
+ _this._stopped = false;
+ _this._setupSrc(_this.options.src);
+ // backwards compatibility (TODO: remove on 0.3.0)
+ _this.options.playback || (_this.options.playback = _this.options || {});
+ _this.options.playback.disableContextMenu = _this.options.playback.disableContextMenu || _this.options.disableVideoTagContextMenu;
+
+ var playbackConfig = _this.options.playback;
+ var preload = playbackConfig.preload || (_browser2.default.isSafari ? 'auto' : _this.options.preload);
+
+ _clapprZepto2.default.extend(_this.el, {
+ loop: _this.options.loop,
+ poster: _this.options.poster,
+ preload: preload || 'metadata',
+ controls: (playbackConfig.controls || _this.options.useVideoTagDefaultControls) && 'controls',
+ crossOrigin: playbackConfig.crossOrigin,
+ 'x-webkit-playsinline': playbackConfig.playInline
+ });
+
+ // TODO should settings be private?
+ _this.settings = { default: ['seekbar'] };
+ _this.settings.left = ['playpause', 'position', 'duration'];
+ _this.settings.right = ['fullscreen', 'volume', 'hd-indicator'];
+
+ // https://github.com/clappr/clappr/issues/1076
+ _this.options.autoPlay && process.nextTick(function () {
+ return _this.play();
+ });
+ return _this;
+ }
+
+ /**
+ * Sets the source url on the <video> element, and also the 'src' property.
+ * @method setupSrc
+ * @private
+ * @param {String} srcUrl The source URL.
+ */
+
+
+ HTML5Video.prototype._setupSrc = function _setupSrc(srcUrl) {
+ if (this.el.src === srcUrl) {
+ return;
+ }
+ this._src = srcUrl;
+ this.el.src = srcUrl;
+ };
+
+ HTML5Video.prototype._onLoadedMetadata = function _onLoadedMetadata(e) {
+ this._handleBufferingEvents();
+ this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: e.target.duration, data: e });
+ this._updateSettings();
+ var autoSeekFromUrl = typeof this._options.autoSeekFromUrl === 'undefined' || this._options.autoSeekFromUrl;
+ if (this.getPlaybackType() !== _playback2.default.LIVE && autoSeekFromUrl) {
+ this._checkInitialSeek();
+ }
+ };
+
+ HTML5Video.prototype._onDurationChange = function _onDurationChange() {
+ this._updateSettings();
+ this._onTimeUpdate();
+ // onProgress uses the duration
+ this._onProgress();
+ };
+
+ HTML5Video.prototype._updateSettings = function _updateSettings() {
+ // we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.
+ // that's why we check it again and update media control accordingly.
+ if (this.getPlaybackType() === _playback2.default.VOD || this.getPlaybackType() === _playback2.default.AOD) {
+ this.settings.left = ['playpause', 'position', 'duration'];
+ } else {
+ this.settings.left = ['playstop'];
+ }
+ this.settings.seekEnabled = this.isSeekEnabled();
+ this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);
+ };
+
+ HTML5Video.prototype.isSeekEnabled = function isSeekEnabled() {
+ return isFinite(this.getDuration());
+ };
+
+ HTML5Video.prototype.getPlaybackType = function getPlaybackType() {
+ var onDemandType = this.tagName === 'audio' ? _playback2.default.AOD : _playback2.default.VOD;
+ return [0, undefined, Infinity].indexOf(this.el.duration) >= 0 ? _playback2.default.LIVE : onDemandType;
+ };
+
+ HTML5Video.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {
+ return false;
+ };
+
+ HTML5Video.prototype.play = function play() {
+ this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);
+ this._stopped = false;
+ this._setupSrc(this._src);
+ this._handleBufferingEvents();
+ this.el.play();
+ };
+
+ HTML5Video.prototype.pause = function pause() {
+ this.el.pause();
+ };
+
+ HTML5Video.prototype.stop = function stop() {
+ this.pause();
+ this._stopped = true;
+ // src will be added again in play()
+ this.el.removeAttribute('src');
+ this._stopPlayheadMovingChecks();
+ this._handleBufferingEvents();
+ this.trigger(_events2.default.PLAYBACK_STOP);
+ };
+
+ HTML5Video.prototype.volume = function volume(value) {
+ this.el.volume = value / 100;
+ };
+
+ HTML5Video.prototype.mute = function mute() {
+ this.el.volume = 0;
+ };
+
+ HTML5Video.prototype.unmute = function unmute() {
+ this.el.volume = 1;
+ };
+
+ HTML5Video.prototype.isMuted = function isMuted() {
+ return !!this.el.volume;
+ };
+
+ HTML5Video.prototype.isPlaying = function isPlaying() {
+ return !this.el.paused && !this.el.ended;
+ };
+
+ HTML5Video.prototype._startPlayheadMovingChecks = function _startPlayheadMovingChecks() {
+ if (this._playheadMovingTimer !== null) {
+ return;
+ }
+ this._playheadMovingTimeOnCheck = null;
+ this._determineIfPlayheadMoving();
+ this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), 500);
+ };
+
+ HTML5Video.prototype._stopPlayheadMovingChecks = function _stopPlayheadMovingChecks() {
+ if (this._playheadMovingTimer === null) {
+ return;
+ }
+ clearInterval(this._playheadMovingTimer);
+ this._playheadMovingTimer = null;
+ this._playheadMoving = false;
+ };
+
+ HTML5Video.prototype._determineIfPlayheadMoving = function _determineIfPlayheadMoving() {
+ var before = this._playheadMovingTimeOnCheck;
+ var now = this.el.currentTime;
+ this._playheadMoving = before !== now;
+ this._playheadMovingTimeOnCheck = now;
+ this._handleBufferingEvents();
+ };
+
+ // this seems to happen when the user is having to wait
+ // for something to happen AFTER A USER INTERACTION
+ // e.g the player might be buffering, but when `play()` is called
+ // only at this point will this be called.
+ // Or the user may seek somewhere but the new area requires buffering,
+ // so it will fire then as well.
+ // On devices where playing is blocked until requested with a user action,
+ // buffering may start, but never finish until the user initiates a play,
+ // but this only happens when play is actually requested
+
+
+ HTML5Video.prototype._onWaiting = function _onWaiting() {
+ this._loadStarted = true;
+ this._handleBufferingEvents();
+ };
+
+ // called after the first frame has loaded
+ // note this doesn't fire on ios before the user has requested play
+ // ideally the "loadstart" event would be used instead, but this fires
+ // before a user has requested play on iOS, and also this is always fired
+ // even if the preload setting is "none". In both these cases this causes
+ // infinite buffering until the user does something which isn't great.
+
+
+ HTML5Video.prototype._onLoadedData = function _onLoadedData() {
+ this._loadStarted = true;
+ this._handleBufferingEvents();
+ };
+
+ // note this doesn't fire on ios before user has requested play
+
+
+ HTML5Video.prototype._onCanPlay = function _onCanPlay() {
+ this._handleBufferingEvents();
+ };
+
+ HTML5Video.prototype._onPlaying = function _onPlaying() {
+ this._startPlayheadMovingChecks();
+ this._handleBufferingEvents();
+ this.trigger(_events2.default.PLAYBACK_PLAY);
+ };
+
+ HTML5Video.prototype._onPause = function _onPause() {
+ this._stopPlayheadMovingChecks();
+ this._handleBufferingEvents();
+ this.trigger(_events2.default.PLAYBACK_PAUSE);
+ };
+
+ HTML5Video.prototype._onEnded = function _onEnded() {
+ this._handleBufferingEvents();
+ this.trigger(_events2.default.PLAYBACK_ENDED, this.name);
+ };
+
+ // The playback should be classed as buffering if the following are true:
+ // - the ready state is less then HAVE_FUTURE_DATA or the playhead isn't moving and it should be
+ // - the media hasn't "ended",
+ // - the media hasn't been stopped
+ // - loading has started
+
+
+ HTML5Video.prototype._handleBufferingEvents = function _handleBufferingEvents() {
+ var playheadShouldBeMoving = !this.el.ended && !this.el.paused;
+ var buffering = this._loadStarted && !this.el.ended && !this._stopped && (playheadShouldBeMoving && !this._playheadMoving || this.el.readyState < this.el.HAVE_FUTURE_DATA);
+ if (this._bufferingState !== buffering) {
+ this._bufferingState = buffering;
+ if (buffering) {
+ this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);
+ } else {
+ this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);
+ }
+ }
+ };
+
+ HTML5Video.prototype._onError = function _onError() {
+ this.trigger(_events2.default.PLAYBACK_ERROR, this.el.error, this.name);
+ };
+
+ HTML5Video.prototype.destroy = function destroy() {
+ this.$el.remove();
+ this.el.src = '';
+ this._src = null;
+ };
+
+ HTML5Video.prototype.seek = function seek(time) {
+ this.el.currentTime = time;
+ };
+
+ HTML5Video.prototype.seekPercentage = function seekPercentage(percentage) {
+ var time = this.el.duration * (percentage / 100);
+ this.seek(time);
+ };
+
+ HTML5Video.prototype._checkInitialSeek = function _checkInitialSeek() {
+ var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);
+ if (seekTime !== 0) {
+ this.seek(seekTime);
+ }
+ };
+
+ HTML5Video.prototype.getCurrentTime = function getCurrentTime() {
+ return this.el.currentTime;
+ };
+
+ HTML5Video.prototype.getDuration = function getDuration() {
+ return this.el.duration;
+ };
+
+ HTML5Video.prototype._onTimeUpdate = function _onTimeUpdate() {
+ this._handleBufferingEvents();
+ if (this.getPlaybackType() === _playback2.default.LIVE) {
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 1, total: 1 }, this.name);
+ } else {
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.currentTime, total: this.el.duration }, this.name);
+ }
+ };
+
+ HTML5Video.prototype._onProgress = function _onProgress() {
+ if (!this.el.buffered.length) {
+ return;
+ }
+ var buffered = [];
+ var bufferedPos = 0;
+ for (var i = 0; i < this.el.buffered.length; i++) {
+ buffered = [].concat(_toConsumableArray(buffered), [{ start: this.el.buffered.start(i), end: this.el.buffered.end(i) }]);
+ if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {
+ bufferedPos = i;
+ }
+ }
+ var progress = {
+ start: buffered[bufferedPos].start,
+ current: buffered[bufferedPos].end,
+ total: this.el.duration
+ };
+ this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);
+ };
+
+ HTML5Video.prototype._typeFor = function _typeFor(src) {
+ var mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType);
+ if (mimeTypes.length == 0) {
+ mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);
+ }
+ var mimeType = mimeTypes[0] || '';
+ return mimeType.split(';')[0];
+ };
+
+ HTML5Video.prototype._ready = function _ready() {
+ if (this._isReadyState) {
+ return;
+ }
+ this._isReadyState = true;
+ this.trigger(_events2.default.PLAYBACK_READY, this.name);
+ };
+
+ HTML5Video.prototype.render = function render() {
+ var style = _styler2.default.getStyleFor(_style2.default);
+
+ if (this.options.playback.disableContextMenu) {
+ this.$el.on('contextmenu', function () {
+ return false;
+ });
+ }
+
+ this.$el.append(style);
+ this._ready();
+ return this;
+ };
+
+ _createClass(HTML5Video, [{
+ key: 'isReady',
+ get: function get() {
+ return this._isReadyState;
+ }
+ }]);
+
+ return HTML5Video;
+ }(_playback2.default);
+
+ exports.default = HTML5Video;
+
+
+ HTML5Video._mimeTypesForUrl = function (resourceUrl, mimeTypesByExtension, mimeType) {
+ var extension = (resourceUrl.split('?')[0].match(/.*\.(.*)$/) || [])[1];
+ var mimeTypes = mimeType || extension && mimeTypesByExtension[extension.toLowerCase()] || [];
+ return mimeTypes.constructor === Array ? mimeTypes : [mimeTypes];
+ };
+
+ HTML5Video._canPlay = function (type, mimeTypesByExtension, resourceUrl, mimeType) {
+ var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, mimeTypesByExtension, mimeType);
+ var media = document.createElement(type);
+ return !!mimeTypes.filter(function (mediaType) {
+ return !!media.canPlayType(mediaType).replace(/no/, '');
+ })[0];
+ };
+
+ HTML5Video.canPlay = function (resourceUrl, mimeType) {
+ return HTML5Video._canPlay('audio', AUDIO_MIMETYPES, resourceUrl, mimeType) || HTML5Video._canPlay('video', MIMETYPES, resourceUrl, mimeType);
+ };
+
+ module.exports = HTML5Video;
+ module.exports = exports['default'];
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29)))
+
+/***/ },
+/* 53 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, "[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 54 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(55);
+
+/***/ },
+/* 55 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _base_flash_playback = __webpack_require__(56);
+
+ var _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _Player = __webpack_require__(60);
+
+ var _Player2 = _interopRequireDefault(_Player);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 MAX_ATTEMPTS = 60;
+
+ var Flash = function (_BaseFlashPlayback) {
+ _inherits(Flash, _BaseFlashPlayback);
+
+ _createClass(Flash, [{
+ key: 'name',
+ get: function get() {
+ return 'flash';
+ }
+ }, {
+ key: 'swfPath',
+ get: function get() {
+ return (0, _template2.default)(_Player2.default)({ baseUrl: this._baseUrl });
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this._currentState === 'ENDED';
+ }
+
+ /**
+ * Determine if the playback is buffering.
+ * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return !!this._bufferingState && this._currentState !== 'ENDED';
+ }
+ }]);
+
+ function Flash() {
+ _classCallCheck(this, Flash);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var _this = _possibleConstructorReturn(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));
+
+ _this._src = _this.options.src;
+ _this._baseUrl = _this.options.baseUrl;
+ _this._autoPlay = _this.options.autoPlay;
+ _this.settings = { default: ['seekbar'] };
+ _this.settings.left = ['playpause', 'position', 'duration'];
+ _this.settings.right = ['fullscreen', 'volume'];
+ _this.settings.seekEnabled = true;
+ _this._isReadyState = false;
+ _this._addListeners();
+ return _this;
+ }
+
+ Flash.prototype._bootstrap = function _bootstrap() {
+ var _this2 = this;
+
+ if (this.el.playerPlay) {
+ this.el.width = '100%';
+ this.el.height = '100%';
+ if (this._currentState === 'PLAYING') {
+ this._firstPlay();
+ } else {
+ this._currentState = 'IDLE';
+ this._autoPlay && this.play();
+ }
+ (0, _clapprZepto2.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el);
+ if (this.getDuration() > 0) {
+ this._metadataLoaded();
+ } else {
+ _mediator2.default.once(this.uniqueId + ':timeupdate', this._metadataLoaded, this);
+ }
+ } else {
+ this._attempts = this._attempts || 0;
+ if (++this._attempts <= MAX_ATTEMPTS) {
+ setTimeout(function () {
+ return _this2._bootstrap();
+ }, 50);
+ } else {
+ this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);
+ }
+ }
+ };
+
+ Flash.prototype._metadataLoaded = function _metadataLoaded() {
+ this._isReadyState = true;
+ this.trigger(_events2.default.PLAYBACK_READY, this.name);
+ this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);
+ };
+
+ Flash.prototype.getPlaybackType = function getPlaybackType() {
+ return _playback2.default.VOD;
+ };
+
+ Flash.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {
+ return false;
+ };
+
+ Flash.prototype._updateTime = function _updateTime() {
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.getPosition(), total: this.el.getDuration() }, this.name);
+ };
+
+ Flash.prototype._addListeners = function _addListeners() {
+ _mediator2.default.on(this.uniqueId + ':progress', this._progress, this);
+ _mediator2.default.on(this.uniqueId + ':timeupdate', this._updateTime, this);
+ _mediator2.default.on(this.uniqueId + ':statechanged', this._checkState, this);
+ _mediator2.default.on(this.uniqueId + ':flashready', this._bootstrap, this);
+ };
+
+ Flash.prototype.stopListening = function stopListening() {
+ _BaseFlashPlayback.prototype.stopListening.call(this);
+ _mediator2.default.off(this.uniqueId + ':progress');
+ _mediator2.default.off(this.uniqueId + ':timeupdate');
+ _mediator2.default.off(this.uniqueId + ':statechanged');
+ _mediator2.default.off(this.uniqueId + ':flashready');
+ };
+
+ Flash.prototype._checkState = function _checkState() {
+ if (this._isIdle || this._currentState === 'PAUSED') {
+ return;
+ } else if (this._currentState !== 'PLAYING_BUFFERING' && this.el.getState() === 'PLAYING_BUFFERING') {
+ this._bufferingState = true;
+ this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);
+ this._currentState = 'PLAYING_BUFFERING';
+ } else if (this.el.getState() === 'PLAYING') {
+ this._bufferingState = false;
+ this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);
+ this._currentState = 'PLAYING';
+ } else if (this.el.getState() === 'IDLE') {
+ this._currentState = 'IDLE';
+ } else if (this.el.getState() === 'ENDED') {
+ this.trigger(_events2.default.PLAYBACK_ENDED, this.name);
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.el.getDuration() }, this.name);
+ this._currentState = 'ENDED';
+ this._isIdle = true;
+ }
+ };
+
+ Flash.prototype._progress = function _progress() {
+ if (this._currentState !== 'IDLE' && this._currentState !== 'ENDED') {
+ this.trigger(_events2.default.PLAYBACK_PROGRESS, {
+ start: 0,
+ current: this.el.getBytesLoaded(),
+ total: this.el.getBytesTotal()
+ });
+ }
+ };
+
+ Flash.prototype._firstPlay = function _firstPlay() {
+ var _this3 = this;
+
+ if (this.el.playerPlay) {
+ this._isIdle = false;
+ this.el.playerPlay(this._src);
+ this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {
+ return _this3._checkInitialSeek();
+ });
+ this._currentState = 'PLAYING';
+ } else {
+ this.listenToOnce(this, _events2.default.PLAYBACK_READY, this._firstPlay);
+ }
+ };
+
+ Flash.prototype._checkInitialSeek = function _checkInitialSeek() {
+ var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);
+ if (seekTime !== 0) {
+ this.seekSeconds(seekTime);
+ }
+ };
+
+ Flash.prototype.play = function play() {
+ this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);
+ if (this._currentState === 'PAUSED' || this._currentState === 'PLAYING_BUFFERING') {
+ this._currentState = 'PLAYING';
+ this.el.playerResume();
+ this.trigger(_events2.default.PLAYBACK_PLAY, this.name);
+ } else if (this._currentState !== 'PLAYING') {
+ this._firstPlay();
+ this.trigger(_events2.default.PLAYBACK_PLAY, this.name);
+ }
+ };
+
+ Flash.prototype.volume = function volume(value) {
+ var _this4 = this;
+
+ if (this.isReady) {
+ this.el.playerVolume(value);
+ } else {
+ this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {
+ return _this4.volume(value);
+ });
+ }
+ };
+
+ Flash.prototype.pause = function pause() {
+ this._currentState = 'PAUSED';
+ this.el.playerPause();
+ this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);
+ };
+
+ Flash.prototype.stop = function stop() {
+ this.el.playerStop();
+ this.trigger(_events2.default.PLAYBACK_STOP);
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);
+ };
+
+ Flash.prototype.isPlaying = function isPlaying() {
+ return !!(this.isReady && this._currentState.indexOf('PLAYING') > -1);
+ };
+
+ Flash.prototype.getDuration = function getDuration() {
+ return this.el.getDuration();
+ };
+
+ Flash.prototype.seekPercentage = function seekPercentage(percentage) {
+ var _this5 = this;
+
+ if (this.el.getDuration() > 0) {
+ var seekSeconds = this.el.getDuration() * (percentage / 100);
+ this.seek(seekSeconds);
+ } else {
+ this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {
+ return _this5.seekPercentage(percentage);
+ });
+ }
+ };
+
+ Flash.prototype.seek = function seek(time) {
+ var _this6 = this;
+
+ if (this.isReady && this.el.playerSeek) {
+ this.el.playerSeek(time);
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: this.el.getDuration() }, this.name);
+ if (this._currentState === 'PAUSED') {
+ this.el.playerPause();
+ }
+ } else {
+ this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {
+ return _this6.seek(time);
+ });
+ }
+ };
+
+ Flash.prototype.destroy = function destroy() {
+ clearInterval(this.bootstrapId);
+ _BaseFlashPlayback.prototype.stopListening.call(this);
+ this.$el.remove();
+ };
+
+ _createClass(Flash, [{
+ key: 'isReady',
+ get: function get() {
+ return this._isReadyState;
+ }
+ }]);
+
+ return Flash;
+ }(_base_flash_playback2.default);
+
+ exports.default = Flash;
+
+
+ Flash.canPlay = function (resource) {
+ if (!_browser2.default.hasFlash || !resource || resource.constructor !== String) {
+ return false;
+ } else {
+ var resourceParts = resource.split('?')[0].match(/.*\.(.*)$/) || [];
+ return resourceParts.length > 1 && !_browser2.default.isMobile && resourceParts[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/);
+ }
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 56 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.default = __webpack_require__(57);
+ module.exports = exports['default'];
+
+/***/ },
+/* 57 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _flash = __webpack_require__(58);
+
+ var _flash2 = _interopRequireDefault(_flash);
+
+ var _flash3 = __webpack_require__(59);
+
+ var _flash4 = _interopRequireDefault(_flash3);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2015 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 IE_CLASSID = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
+
+ var BaseFlashPlayback = function (_Playback) {
+ _inherits(BaseFlashPlayback, _Playback);
+
+ function BaseFlashPlayback() {
+ _classCallCheck(this, BaseFlashPlayback);
+
+ return _possibleConstructorReturn(this, _Playback.apply(this, arguments));
+ }
+
+ BaseFlashPlayback.prototype.setElement = function setElement(element) {
+ this.$el = element;
+ this.el = element[0];
+ };
+
+ BaseFlashPlayback.prototype._setupFirefox = function _setupFirefox() {
+ var $el = this.$('embed');
+ $el.attr('data-flash-playback', this.name);
+ $el.addClass(this.attributes.class);
+ this.setElement($el);
+ };
+
+ BaseFlashPlayback.prototype.render = function render() {
+ this.$el.html(this.template({
+ cid: this.cid,
+ swfPath: this.swfPath,
+ baseUrl: this.baseUrl,
+ playbackId: this.uniqueId,
+ wmode: this.wmode,
+ callbackName: 'window.Clappr.flashlsCallbacks.' + this.cid }));
+
+ if (_browser2.default.isIE) {
+ this.$('embed').remove();
+
+ if (_browser2.default.isLegacyIE) {
+ this.$el.attr('classid', IE_CLASSID);
+ }
+ }
+
+ if (_browser2.default.isFirefox) {
+ this._setupFirefox();
+ }
+
+ this.el.id = this.cid;
+ this.$el.append(_styler2.default.getStyleFor(_flash4.default));
+
+ return this;
+ };
+
+ _createClass(BaseFlashPlayback, [{
+ key: 'tagName',
+ get: function get() {
+ return 'object';
+ }
+ }, {
+ key: 'swfPath',
+ get: function get() {
+ return '';
+ }
+ }, {
+ key: 'wmode',
+ get: function get() {
+ return 'transparent';
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_flash2.default);
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ var type = 'application/x-shockwave-flash';
+
+ if (_browser2.default.isLegacyIE) {
+ type = '';
+ }
+
+ return {
+ class: 'clappr-flash-playback',
+ type: type,
+ width: '100%',
+ height: '100%',
+ 'data-flash-playback': this.name
+ };
+ }
+ }]);
+
+ return BaseFlashPlayback;
+ }(_playback2.default);
+
+ exports.default = BaseFlashPlayback;
+ module.exports = exports['default'];
+
+/***/ },
+/* 58 */
+/***/ function(module, exports) {
+
+ module.exports = "<param name=\"movie\" value=\"<%= swfPath %>?inline=1\">\n<param name=\"quality\" value=\"autohigh\">\n<param name=\"swliveconnect\" value=\"true\">\n<param name=\"allowScriptAccess\" value=\"always\">\n<param name=\"bgcolor\" value=\"#000000\">\n<param name=\"allowFullScreen\" value=\"false\">\n<param name=\"wmode\" value=\"<%= wmode %>\">\n<param name=\"tabindex\" value=\"1\">\n<param name=\"FlashVars\" value=\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\">\n<embed\n name=\"<%= cid %>\"\n type=\"application/x-shockwave-flash\"\n disabled=\"disabled\"\n tabindex=\"-1\"\n enablecontextmenu=\"false\"\n allowScriptAccess=\"always\"\n quality=\"autohigh\"\n pluginspage=\"http://www.macromedia.com/go/getflashplayer\"\n wmode=\"<%= wmode %>\"\n swliveconnect=\"true\"\n allowfullscreen=\"false\"\n bgcolor=\"#000000\"\n FlashVars=\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\"\n src=\"<%= swfPath %>\"\n width=\"100%\"\n height=\"100%\">\n</embed>\n";
+
+/***/ },
+/* 59 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".clappr-flash-playback[data-flash-playback] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 60 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__.p + "4b76590b32dab62bc95c1b7951efae78.swf";
+
+/***/ },
+/* 61 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(62);
+
+/***/ },
+/* 62 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _html5_video = __webpack_require__(51);
+
+ var _html5_video2 = _interopRequireDefault(_html5_video);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ // TODO: remove this playback and change HTML5Video to HTML5Playback (breaking change, only after 0.3.0)
+ var HTML5Audio = function (_HTML5Video) {
+ _inherits(HTML5Audio, _HTML5Video);
+
+ function HTML5Audio() {
+ _classCallCheck(this, HTML5Audio);
+
+ return _possibleConstructorReturn(this, _HTML5Video.apply(this, arguments));
+ }
+
+ HTML5Audio.prototype.updateSettings = function updateSettings() {
+ this.settings.left = ['playpause', 'position', 'duration'];
+ this.settings.seekEnabled = this.isSeekEnabled();
+ this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);
+ };
+
+ HTML5Audio.prototype.getPlaybackType = function getPlaybackType() {
+ return _playback2.default.AOD;
+ };
+
+ _createClass(HTML5Audio, [{
+ key: 'name',
+ get: function get() {
+ return 'html5_audio';
+ }
+ }, {
+ key: 'tagName',
+ get: function get() {
+ return 'audio';
+ }
+ }, {
+ key: 'isAudioOnly',
+ get: function get() {
+ return true;
+ }
+ }]);
+
+ return HTML5Audio;
+ }(_html5_video2.default);
+
+ exports.default = HTML5Audio;
+
+
+ HTML5Audio.canPlay = function (resourceUrl, mimeType) {
+ var mimetypes = {
+ 'wav': ['audio/wav'],
+ 'mp3': ['audio/mp3', 'audio/mpeg;codecs="mp3"'],
+ 'aac': ['audio/mp4;codecs="mp4a.40.5"'],
+ 'oga': ['audio/ogg']
+ };
+ return _html5_video2.default._canPlay('audio', mimetypes, resourceUrl, mimeType);
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 63 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(64);
+
+/***/ },
+/* 64 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _base_flash_playback = __webpack_require__(56);
+
+ var _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _flashls_events = __webpack_require__(65);
+
+ var _flashls_events2 = _interopRequireDefault(_flashls_events);
+
+ var _HLSPlayer = __webpack_require__(66);
+
+ var _HLSPlayer2 = _interopRequireDefault(_HLSPlayer);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 MAX_ATTEMPTS = 60;
+ var AUTO = -1;
+
+ var FlasHLS = function (_BaseFlashPlayback) {
+ _inherits(FlasHLS, _BaseFlashPlayback);
+
+ _createClass(FlasHLS, [{
+ key: 'name',
+ get: function get() {
+ return 'flashls';
+ }
+ }, {
+ key: 'swfPath',
+ get: function get() {
+ return (0, _template2.default)(_HLSPlayer2.default)({ baseUrl: this._baseUrl });
+ }
+ }, {
+ key: 'levels',
+ get: function get() {
+ return this._levels || [];
+ }
+ }, {
+ key: 'currentLevel',
+ get: function get() {
+ if (this._currentLevel === null || this._currentLevel === undefined) {
+ return AUTO;
+ } else {
+ return this._currentLevel; //0 is a valid level ID
+ }
+ },
+ set: function set(id) {
+ this._currentLevel = id;
+ this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);
+ this.el.playerSetCurrentLevel(id);
+ }
+
+ /**
+ * Determine if the playback has ended.
+ * @property ended
+ * @type Boolean
+ */
+
+ }, {
+ key: 'ended',
+ get: function get() {
+ return this._hasEnded;
+ }
+
+ /**
+ * Determine if the playback is buffering.
+ * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events
+ * @property buffering
+ * @type Boolean
+ */
+
+ }, {
+ key: 'buffering',
+ get: function get() {
+ return !!this._bufferingState && !this._hasEnded;
+ }
+ }]);
+
+ function FlasHLS() {
+ _classCallCheck(this, FlasHLS);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var _this = _possibleConstructorReturn(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));
+
+ _this._src = _this.options.src;
+ _this._baseUrl = _this.options.baseUrl;
+ _this._initHlsParameters(_this.options);
+ // TODO can this be private?
+ _this.highDefinition = false;
+ _this._autoPlay = _this.options.autoPlay;
+ _this._loop = _this.options.loop;
+ _this._defaultSettings = {
+ left: ['playstop'],
+ default: ['seekbar'],
+ right: ['fullscreen', 'volume', 'hd-indicator'],
+ seekEnabled: false
+ };
+ _this.settings = _clapprZepto2.default.extend({}, _this._defaultSettings);
+ _this._playbackType = _playback2.default.LIVE;
+ _this._hasEnded = false;
+ _this._addListeners();
+ return _this;
+ }
+
+ FlasHLS.prototype._initHlsParameters = function _initHlsParameters(options) {
+ this._autoStartLoad = options.autoStartLoad === undefined ? true : options.autoStartLoad;
+ this._capLevelToStage = options.capLevelToStage === undefined ? false : options.capLevelToStage;
+ this._maxLevelCappingMode = options.maxLevelCappingMode === undefined ? 'downscale' : options.maxLevelCappingMode;
+ this._minBufferLength = options.minBufferLength === undefined ? -1 : options.minBufferLength;
+ this._minBufferLengthCapping = options.minBufferLengthCapping === undefined ? -1 : options.minBufferLengthCapping;
+ this._maxBufferLength = options.maxBufferLength === undefined ? 120 : options.maxBufferLength;
+ this._maxBackBufferLength = options.maxBackBufferLength === undefined ? 30 : options.maxBackBufferLength;
+ this._lowBufferLength = options.lowBufferLength === undefined ? 3 : options.lowBufferLength;
+ this._mediaTimePeriod = options.mediaTimePeriod === undefined ? 100 : options.mediaTimePeriod;
+ this._fpsDroppedMonitoringPeriod = options.fpsDroppedMonitoringPeriod === undefined ? 5000 : options.fpsDroppedMonitoringPeriod;
+ this._fpsDroppedMonitoringThreshold = options.fpsDroppedMonitoringThreshold === undefined ? 0.2 : options.fpsDroppedMonitoringThreshold;
+ this._capLevelonFPSDrop = options.capLevelonFPSDrop === undefined ? false : options.capLevelonFPSDrop;
+ this._smoothAutoSwitchonFPSDrop = options.smoothAutoSwitchonFPSDrop === undefined ? this.capLevelonFPSDrop : options.smoothAutoSwitchonFPSDrop;
+ this._switchDownOnLevelError = options.switchDownOnLevelError === undefined ? true : options.switchDownOnLevelError;
+ this._seekMode = options.seekMode === undefined ? 'ACCURATE' : options.seekMode;
+ this._keyLoadMaxRetry = options.keyLoadMaxRetry === undefined ? 3 : options.keyLoadMaxRetry;
+ this._keyLoadMaxRetryTimeout = options.keyLoadMaxRetryTimeout === undefined ? 64000 : options.keyLoadMaxRetryTimeout;
+ this._fragmentLoadMaxRetry = options.fragmentLoadMaxRetry === undefined ? 3 : options.fragmentLoadMaxRetry;
+ this._fragmentLoadMaxRetryTimeout = options.fragmentLoadMaxRetryTimeout === undefined ? 4000 : options.fragmentLoadMaxRetryTimeout;
+ this._fragmentLoadSkipAfterMaxRetry = options.fragmentLoadSkipAfterMaxRetry === undefined ? true : options.fragmentLoadSkipAfterMaxRetry;
+ this._maxSkippedFragments = options.maxSkippedFragments === undefined ? 5 : options.maxSkippedFragments;
+ this._flushLiveURLCache = options.flushLiveURLCache === undefined ? false : options.flushLiveURLCache;
+ this._initialLiveManifestSize = options.initialLiveManifestSize === undefined ? 1 : options.initialLiveManifestSize;
+ this._manifestLoadMaxRetry = options.manifestLoadMaxRetry === undefined ? 3 : options.manifestLoadMaxRetry;
+ this._manifestLoadMaxRetryTimeout = options.manifestLoadMaxRetryTimeout === undefined ? 64000 : options.manifestLoadMaxRetryTimeout;
+ this._manifestRedundantLoadmaxRetry = options.manifestRedundantLoadmaxRetry === undefined ? 3 : options.manifestRedundantLoadmaxRetry;
+ this._startFromBitrate = options.startFromBitrate === undefined ? -1 : options.startFromBitrate;
+ this._startFromLevel = options.startFromLevel === undefined ? -1 : options.startFromLevel;
+ this._autoStartMaxDuration = options.autoStartMaxDuration === undefined ? -1 : options.autoStartMaxDuration;
+ this._seekFromLevel = options.seekFromLevel === undefined ? -1 : options.seekFromLevel;
+ this._useHardwareVideoDecoder = options.useHardwareVideoDecoder === undefined ? false : options.useHardwareVideoDecoder;
+ this._hlsLogEnabled = options.hlsLogEnabled === undefined ? true : options.hlsLogEnabled;
+ this._logDebug = options.logDebug === undefined ? false : options.logDebug;
+ this._logDebug2 = options.logDebug2 === undefined ? false : options.logDebug2;
+ this._logWarn = options.logWarn === undefined ? true : options.logWarn;
+ this._logError = options.logError === undefined ? true : options.logError;
+ this._hlsMinimumDvrSize = options.hlsMinimumDvrSize === undefined ? 60 : options.hlsMinimumDvrSize;
+ };
+
+ FlasHLS.prototype._addListeners = function _addListeners() {
+ var _this2 = this;
+
+ _mediator2.default.on(this.cid + ':flashready', function () {
+ return _this2._bootstrap();
+ });
+ _mediator2.default.on(this.cid + ':timeupdate', function (timeMetrics) {
+ return _this2._updateTime(timeMetrics);
+ });
+ _mediator2.default.on(this.cid + ':playbackstate', function (state) {
+ return _this2._setPlaybackState(state);
+ });
+ _mediator2.default.on(this.cid + ':levelchanged', function (level) {
+ return _this2._levelChanged(level);
+ });
+ _mediator2.default.on(this.cid + ':error', function (code, url, message) {
+ return _this2._flashPlaybackError(code, url, message);
+ });
+ _mediator2.default.on(this.cid + ':fragmentloaded', function (loadmetrics) {
+ return _this2._onFragmentLoaded(loadmetrics);
+ });
+ _mediator2.default.on(this.cid + ':levelendlist', function (level) {
+ return _this2._onLevelEndlist(level);
+ });
+ };
+
+ FlasHLS.prototype.stopListening = function stopListening() {
+ _BaseFlashPlayback.prototype.stopListening.call(this);
+ _mediator2.default.off(this.cid + ':flashready');
+ _mediator2.default.off(this.cid + ':timeupdate');
+ _mediator2.default.off(this.cid + ':playbackstate');
+ _mediator2.default.off(this.cid + ':levelchanged');
+ _mediator2.default.off(this.cid + ':playbackerror');
+ _mediator2.default.off(this.cid + ':fragmentloaded');
+ _mediator2.default.off(this.cid + ':manifestloaded');
+ _mediator2.default.off(this.cid + ':levelendlist');
+ };
+
+ FlasHLS.prototype._bootstrap = function _bootstrap() {
+ var _this3 = this;
+
+ if (this.el.playerLoad) {
+ this.el.width = '100%';
+ this.el.height = '100%';
+ this._isReadyState = true;
+ this._srcLoaded = false;
+ this._currentState = 'IDLE';
+ this._setFlashSettings();
+ this._updatePlaybackType();
+ if (this._autoPlay || this._shouldPlayOnManifestLoaded) {
+ this.play();
+ }
+ this.trigger(_events2.default.PLAYBACK_READY, this.name);
+ } else {
+ this._bootstrapAttempts = this._bootstrapAttempts || 0;
+ if (++this._bootstrapAttempts <= MAX_ATTEMPTS) {
+ setTimeout(function () {
+ return _this3._bootstrap();
+ }, 50);
+ } else {
+ this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);
+ }
+ }
+ };
+
+ FlasHLS.prototype._setFlashSettings = function _setFlashSettings() {
+ this.el.playerSetAutoStartLoad(this._autoStartLoad);
+ this.el.playerSetCapLevelToStage(this._capLevelToStage);
+ this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);
+ this.el.playerSetMinBufferLength(this._minBufferLength);
+ this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);
+ this.el.playerSetMaxBufferLength(this._maxBufferLength);
+ this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);
+ this.el.playerSetLowBufferLength(this._lowBufferLength);
+ this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);
+ this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);
+ this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);
+ this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);
+ this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);
+ this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);
+ this.el.playerSetSeekMode(this._seekMode);
+ this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);
+ this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);
+ this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);
+ this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);
+ this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);
+ this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);
+ this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);
+ this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);
+ this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);
+ this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);
+ this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);
+ this.el.playerSetStartFromBitrate(this._startFromBitrate);
+ this.el.playerSetStartFromLevel(this._startFromLevel);
+ this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);
+ this.el.playerSetSeekFromLevel(this._seekFromLevel);
+ this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);
+ this.el.playerSetLogInfo(this._hlsLogEnabled);
+ this.el.playerSetLogDebug(this._logDebug);
+ this.el.playerSetLogDebug2(this._logDebug2);
+ this.el.playerSetLogWarn(this._logWarn);
+ this.el.playerSetLogError(this._logError);
+ };
+
+ FlasHLS.prototype.setAutoStartLoad = function setAutoStartLoad(autoStartLoad) {
+ this._autoStartLoad = autoStartLoad;
+ this.el.playerSetAutoStartLoad(this._autoStartLoad);
+ };
+
+ FlasHLS.prototype.setCapLevelToStage = function setCapLevelToStage(capLevelToStage) {
+ this._capLevelToStage = capLevelToStage;
+ this.el.playerSetCapLevelToStage(this._capLevelToStage);
+ };
+
+ FlasHLS.prototype.setMaxLevelCappingMode = function setMaxLevelCappingMode(maxLevelCappingMode) {
+ this._maxLevelCappingMode = maxLevelCappingMode;
+ this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);
+ };
+
+ FlasHLS.prototype.setSetMinBufferLength = function setSetMinBufferLength(minBufferLength) {
+ this._minBufferLength = minBufferLength;
+ this.el.playerSetMinBufferLength(this._minBufferLength);
+ };
+
+ FlasHLS.prototype.setMinBufferLengthCapping = function setMinBufferLengthCapping(minBufferLengthCapping) {
+ this._minBufferLengthCapping = minBufferLengthCapping;
+ this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);
+ };
+
+ FlasHLS.prototype.setMaxBufferLength = function setMaxBufferLength(maxBufferLength) {
+ this._maxBufferLength = maxBufferLength;
+ this.el.playerSetMaxBufferLength(this._maxBufferLength);
+ };
+
+ FlasHLS.prototype.setMaxBackBufferLength = function setMaxBackBufferLength(maxBackBufferLength) {
+ this._maxBackBufferLength = maxBackBufferLength;
+ this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);
+ };
+
+ FlasHLS.prototype.setLowBufferLength = function setLowBufferLength(lowBufferLength) {
+ this._lowBufferLength = lowBufferLength;
+ this.el.playerSetLowBufferLength(this._lowBufferLength);
+ };
+
+ FlasHLS.prototype.setMediaTimePeriod = function setMediaTimePeriod(mediaTimePeriod) {
+ this._mediaTimePeriod = mediaTimePeriod;
+ this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);
+ };
+
+ FlasHLS.prototype.setFpsDroppedMonitoringPeriod = function setFpsDroppedMonitoringPeriod(fpsDroppedMonitoringPeriod) {
+ this._fpsDroppedMonitoringPeriod = fpsDroppedMonitoringPeriod;
+ this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);
+ };
+
+ FlasHLS.prototype.setFpsDroppedMonitoringThreshold = function setFpsDroppedMonitoringThreshold(fpsDroppedMonitoringThreshold) {
+ this._fpsDroppedMonitoringThreshold = fpsDroppedMonitoringThreshold;
+ this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);
+ };
+
+ FlasHLS.prototype.setCapLevelonFPSDrop = function setCapLevelonFPSDrop(capLevelonFPSDrop) {
+ this._capLevelonFPSDrop = capLevelonFPSDrop;
+ this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);
+ };
+
+ FlasHLS.prototype.setSmoothAutoSwitchonFPSDrop = function setSmoothAutoSwitchonFPSDrop(smoothAutoSwitchonFPSDrop) {
+ this._smoothAutoSwitchonFPSDrop = smoothAutoSwitchonFPSDrop;
+ this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);
+ };
+
+ FlasHLS.prototype.setSwitchDownOnLevelError = function setSwitchDownOnLevelError(switchDownOnLevelError) {
+ this._switchDownOnLevelError = switchDownOnLevelError;
+ this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);
+ };
+
+ FlasHLS.prototype.setSeekMode = function setSeekMode(seekMode) {
+ this._seekMode = seekMode;
+ this.el.playerSetSeekMode(this._seekMode);
+ };
+
+ FlasHLS.prototype.setKeyLoadMaxRetry = function setKeyLoadMaxRetry(keyLoadMaxRetry) {
+ this._keyLoadMaxRetry = keyLoadMaxRetry;
+ this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);
+ };
+
+ FlasHLS.prototype.setKeyLoadMaxRetryTimeout = function setKeyLoadMaxRetryTimeout(keyLoadMaxRetryTimeout) {
+ this._keyLoadMaxRetryTimeout = keyLoadMaxRetryTimeout;
+ this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);
+ };
+
+ FlasHLS.prototype.setFragmentLoadMaxRetry = function setFragmentLoadMaxRetry(fragmentLoadMaxRetry) {
+ this._fragmentLoadMaxRetry = fragmentLoadMaxRetry;
+ this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);
+ };
+
+ FlasHLS.prototype.setFragmentLoadMaxRetryTimeout = function setFragmentLoadMaxRetryTimeout(fragmentLoadMaxRetryTimeout) {
+ this._fragmentLoadMaxRetryTimeout = fragmentLoadMaxRetryTimeout;
+ this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);
+ };
+
+ FlasHLS.prototype.setFragmentLoadSkipAfterMaxRetry = function setFragmentLoadSkipAfterMaxRetry(fragmentLoadSkipAfterMaxRetry) {
+ this._fragmentLoadSkipAfterMaxRetry = fragmentLoadSkipAfterMaxRetry;
+ this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);
+ };
+
+ FlasHLS.prototype.setMaxSkippedFragments = function setMaxSkippedFragments(maxSkippedFragments) {
+ this._maxSkippedFragments = maxSkippedFragments;
+ this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);
+ };
+
+ FlasHLS.prototype.setFlushLiveURLCache = function setFlushLiveURLCache(flushLiveURLCache) {
+ this._flushLiveURLCache = flushLiveURLCache;
+ this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);
+ };
+
+ FlasHLS.prototype.setInitialLiveManifestSize = function setInitialLiveManifestSize(initialLiveManifestSize) {
+ this._initialLiveManifestSize = initialLiveManifestSize;
+ this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);
+ };
+
+ FlasHLS.prototype.setManifestLoadMaxRetry = function setManifestLoadMaxRetry(manifestLoadMaxRetry) {
+ this._manifestLoadMaxRetry = manifestLoadMaxRetry;
+ this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);
+ };
+
+ FlasHLS.prototype.setManifestLoadMaxRetryTimeout = function setManifestLoadMaxRetryTimeout(manifestLoadMaxRetryTimeout) {
+ this._manifestLoadMaxRetryTimeout = manifestLoadMaxRetryTimeout;
+ this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);
+ };
+
+ FlasHLS.prototype.setManifestRedundantLoadmaxRetry = function setManifestRedundantLoadmaxRetry(manifestRedundantLoadmaxRetry) {
+ this._manifestRedundantLoadmaxRetry = manifestRedundantLoadmaxRetry;
+ this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);
+ };
+
+ FlasHLS.prototype.setStartFromBitrate = function setStartFromBitrate(startFromBitrate) {
+ this._startFromBitrate = startFromBitrate;
+ this.el.playerSetStartFromBitrate(this._startFromBitrate);
+ };
+
+ FlasHLS.prototype.setStartFromLevel = function setStartFromLevel(startFromLevel) {
+ this._startFromLevel = startFromLevel;
+ this.el.playerSetStartFromLevel(this._startFromLevel);
+ };
+
+ FlasHLS.prototype.setAutoStartMaxDuration = function setAutoStartMaxDuration(autoStartMaxDuration) {
+ this._autoStartMaxDuration = autoStartMaxDuration;
+ this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);
+ };
+
+ FlasHLS.prototype.setSeekFromLevel = function setSeekFromLevel(seekFromLevel) {
+ this._seekFromLevel = seekFromLevel;
+ this.el.playerSetSeekFromLevel(this._seekFromLevel);
+ };
+
+ FlasHLS.prototype.setUseHardwareVideoDecoder = function setUseHardwareVideoDecoder(useHardwareVideoDecoder) {
+ this._useHardwareVideoDecoder = useHardwareVideoDecoder;
+ this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);
+ };
+
+ FlasHLS.prototype.setSetLogInfo = function setSetLogInfo(hlsLogEnabled) {
+ this._hlsLogEnabled = hlsLogEnabled;
+ this.el.playerSetLogInfo(this._hlsLogEnabled);
+ };
+
+ FlasHLS.prototype.setLogDebug = function setLogDebug(logDebug) {
+ this._logDebug = logDebug;
+ this.el.playerSetLogDebug(this._logDebug);
+ };
+
+ FlasHLS.prototype.setLogDebug2 = function setLogDebug2(logDebug2) {
+ this._logDebug2 = logDebug2;
+ this.el.playerSetLogDebug2(this._logDebug2);
+ };
+
+ FlasHLS.prototype.setLogWarn = function setLogWarn(logWarn) {
+ this._logWarn = logWarn;
+ this.el.playerSetLogWarn(this._logWarn);
+ };
+
+ FlasHLS.prototype.setLogError = function setLogError(logError) {
+ this._logError = logError;
+ this.el.playerSetLogError(this._logError);
+ };
+
+ FlasHLS.prototype._levelChanged = function _levelChanged(level) {
+ var currentLevel = this.el.getLevels()[level];
+ if (currentLevel) {
+ this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;
+ this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);
+
+ if (!this._levels || this._levels.length === 0) this._fillLevels();
+
+ this.trigger(_events2.default.PLAYBACK_BITRATE, {
+ height: currentLevel.height,
+ width: currentLevel.width,
+ bandwidth: currentLevel.bitrate,
+ bitrate: currentLevel.bitrate,
+ level: level
+ });
+ this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);
+ }
+ };
+
+ FlasHLS.prototype._updateTime = function _updateTime(timeMetrics) {
+ if (this._currentState === 'IDLE') {
+ return;
+ }
+
+ var duration = this._normalizeDuration(timeMetrics.duration);
+ var position = Math.min(Math.max(timeMetrics.position, 0), duration);
+ var previousDVRStatus = this._dvrEnabled;
+ var livePlayback = this._playbackType === _playback2.default.LIVE;
+ this._dvrEnabled = livePlayback && duration > this._hlsMinimumDvrSize;
+
+ if (duration === 100 || livePlayback === undefined) {
+ return;
+ }
+
+ if (this._dvrEnabled !== previousDVRStatus) {
+ this._updateSettings();
+ this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);
+ }
+
+ if (livePlayback && (!this._dvrEnabled || !this._dvrInUse)) {
+ position = duration;
+ }
+
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: position, total: duration }, this.name);
+ };
+
+ FlasHLS.prototype.play = function play() {
+ this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);
+ if (this._currentState === 'PAUSED') {
+ this.el.playerResume();
+ } else if (!this._srcLoaded && this._currentState !== 'PLAYING') {
+ this._firstPlay();
+ } else {
+ this.el.playerPlay();
+ }
+ };
+
+ FlasHLS.prototype.getPlaybackType = function getPlaybackType() {
+ return this._playbackType ? this._playbackType : null;
+ };
+
+ FlasHLS.prototype.getCurrentLevelIndex = function getCurrentLevelIndex() {
+ return this._currentLevel;
+ };
+
+ FlasHLS.prototype.getCurrentLevel = function getCurrentLevel() {
+ return this.levels[this.currentLevel];
+ };
+
+ FlasHLS.prototype.getCurrentBitrate = function getCurrentBitrate() {
+ return this.levels[this.currentLevel].bitrate;
+ };
+
+ FlasHLS.prototype.setCurrentLevel = function setCurrentLevel(level) {
+ this.currentLevel = level;
+ };
+
+ FlasHLS.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {
+ return this.highDefinition;
+ };
+
+ FlasHLS.prototype.getLevels = function getLevels() {
+ return this.levels;
+ };
+
+ FlasHLS.prototype._setPlaybackState = function _setPlaybackState(state) {
+ if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING'].indexOf(state) >= 0) {
+ this._bufferingState = true;
+ this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);
+ this._updateCurrentState(state);
+ } else if (['PLAYING', 'PAUSED'].indexOf(state) >= 0) {
+ if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING', 'IDLE'].indexOf(this._currentState) >= 0) {
+ this._bufferingState = false;
+ this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);
+ }
+ this._updateCurrentState(state);
+ } else if (state === 'IDLE') {
+ this._srcLoaded = false;
+ if (this._loop && ['PLAYING_BUFFERING', 'PLAYING'].indexOf(this._currentState) >= 0) {
+ this.play();
+ this.seek(0);
+ } else {
+ this._updateCurrentState(state);
+ this._hasEnded = true;
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.getDuration() }, this.name);
+ this.trigger(_events2.default.PLAYBACK_ENDED, this.name);
+ }
+ }
+ };
+
+ FlasHLS.prototype._updateCurrentState = function _updateCurrentState(state) {
+ this._currentState = state;
+ if (state !== 'IDLE') {
+ this._hasEnded = false;
+ }
+ this._updatePlaybackType();
+ if (state === 'PLAYING') {
+ this.trigger(_events2.default.PLAYBACK_PLAY, this.name);
+ } else if (state === 'PAUSED') {
+ this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);
+ }
+ };
+
+ FlasHLS.prototype._updatePlaybackType = function _updatePlaybackType() {
+ this._playbackType = this.el.getType();
+ if (this._playbackType) {
+ this._playbackType = this._playbackType.toLowerCase();
+ if (this._playbackType === _playback2.default.VOD) {
+ this._startReportingProgress();
+ } else {
+ this._stopReportingProgress();
+ }
+ }
+ this.trigger(_events2.default.PLAYBACK_PLAYBACKSTATE, { type: this._playbackType });
+ };
+
+ FlasHLS.prototype._startReportingProgress = function _startReportingProgress() {
+ if (!this._reportingProgress) {
+ this._reportingProgress = true;
+ }
+ };
+
+ FlasHLS.prototype._stopReportingProgress = function _stopReportingProgress() {
+ this._reportingProgress = false;
+ };
+
+ FlasHLS.prototype._onFragmentLoaded = function _onFragmentLoaded(loadmetrics) {
+ this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, loadmetrics);
+ if (this._reportingProgress && this.el.getPosition) {
+ var buffered = this.el.getPosition() + this.el.getbufferLength();
+ this.trigger(_events2.default.PLAYBACK_PROGRESS, {
+ start: this.el.getPosition(),
+ current: buffered,
+ total: this.el.getDuration()
+ });
+ }
+ };
+
+ FlasHLS.prototype._onLevelEndlist = function _onLevelEndlist() {
+ this._updatePlaybackType();
+ };
+
+ FlasHLS.prototype._firstPlay = function _firstPlay() {
+ var _this4 = this;
+
+ this._shouldPlayOnManifestLoaded = true;
+ if (this.el.playerLoad) {
+ _mediator2.default.once(this.cid + ':manifestloaded', function (duration, loadmetrics) {
+ return _this4._manifestLoaded(duration, loadmetrics);
+ });
+ this._setFlashSettings(); //ensure flushLiveURLCache will work (#327)
+ this.el.playerLoad(this._src);
+ this._srcLoaded = true;
+ }
+ };
+
+ FlasHLS.prototype.volume = function volume(value) {
+ var _this5 = this;
+
+ if (this.isReady) {
+ this.el.playerVolume(value);
+ } else {
+ this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {
+ return _this5.volume(value);
+ });
+ }
+ };
+
+ FlasHLS.prototype.pause = function pause() {
+ if (this._playbackType !== _playback2.default.LIVE || this._dvrEnabled) {
+ this.el.playerPause();
+ if (this._playbackType === _playback2.default.LIVE && this._dvrEnabled) {
+ this._updateDvr(true);
+ }
+ }
+ };
+
+ FlasHLS.prototype.stop = function stop() {
+ this._srcLoaded = false;
+ this.el.playerStop();
+ this.trigger(_events2.default.PLAYBACK_STOP);
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);
+ };
+
+ FlasHLS.prototype.isPlaying = function isPlaying() {
+ if (this._currentState) {
+ return !!this._currentState.match(/playing/i);
+ }
+ return false;
+ };
+
+ FlasHLS.prototype.getDuration = function getDuration() {
+ return this._normalizeDuration(this.el.getDuration());
+ };
+
+ FlasHLS.prototype._normalizeDuration = function _normalizeDuration(duration) {
+ if (this._playbackType === _playback2.default.LIVE) {
+ // estimate 10 seconds of buffer time for live streams for seek positions
+ duration = Math.max(0, duration - 10);
+ }
+ return duration;
+ };
+
+ FlasHLS.prototype.seekPercentage = function seekPercentage(percentage) {
+ var duration = this.el.getDuration();
+ var time = 0;
+ if (percentage > 0) {
+ time = duration * percentage / 100;
+ }
+ this.seek(time);
+ };
+
+ FlasHLS.prototype.seek = function seek(time) {
+ var duration = this.getDuration();
+ if (this._playbackType === _playback2.default.LIVE) {
+ // seek operations to a time within 3 seconds from live stream will position playhead back to live
+ var dvrInUse = duration - time > 3;
+ this._updateDvr(dvrInUse);
+ }
+ this.el.playerSeek(time);
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: duration }, this.name);
+ };
+
+ FlasHLS.prototype._updateDvr = function _updateDvr(dvrInUse) {
+ var previousDvrInUse = !!this._dvrInUse;
+ this._dvrInUse = dvrInUse;
+ if (this._dvrInUse !== previousDvrInUse) {
+ this._updateSettings();
+ this.trigger(_events2.default.PLAYBACK_DVR, this._dvrInUse);
+ this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': this._dvrInUse });
+ }
+ };
+
+ FlasHLS.prototype._flashPlaybackError = function _flashPlaybackError(code, url, message) {
+ this.trigger(_events2.default.PLAYBACK_ERROR, { code: code, url: url, message: message });
+ this.trigger(_events2.default.PLAYBACK_STOP);
+ };
+
+ FlasHLS.prototype._manifestLoaded = function _manifestLoaded(duration, loadmetrics) {
+ if (this._shouldPlayOnManifestLoaded) {
+ this._shouldPlayOnManifestLoaded = false;
+ // this method initialises the player (and starts playback)
+ // this needs to happen before PLAYBACK_LOADEDMETADATA is fired
+ // as the user may call seek() in a LOADEDMETADATA listener.
+ /// when playerPlay() is called the player seeks to 0
+ this.el.playerPlay();
+ }
+
+ this._fillLevels();
+ this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: duration, data: loadmetrics });
+ };
+
+ FlasHLS.prototype._fillLevels = function _fillLevels() {
+ var levels = this.el.getLevels();
+ var levelsLength = levels.length;
+ this._levels = [];
+
+ for (var index = 0; index < levelsLength; index++) {
+ this._levels.push({ id: index, label: levels[index].height + 'p', level: levels[index] });
+ }
+ this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);
+ };
+
+ FlasHLS.prototype.destroy = function destroy() {
+ this.stopListening();
+ this.$el.remove();
+ };
+
+ FlasHLS.prototype._updateSettings = function _updateSettings() {
+ this.settings = _clapprZepto2.default.extend({}, this._defaultSettings);
+ if (this._playbackType === _playback2.default.VOD || this._dvrInUse) {
+ this.settings.left = ['playpause', 'position', 'duration'];
+ this.settings.seekEnabled = true;
+ } else if (this._dvrEnabled) {
+ this.settings.left = ['playpause'];
+ this.settings.seekEnabled = true;
+ } else {
+ this.settings.seekEnabled = false;
+ }
+ };
+
+ FlasHLS.prototype._createCallbacks = function _createCallbacks() {
+ var _this6 = this;
+
+ if (!window.Clappr) {
+ window.Clappr = {};
+ }
+ if (!window.Clappr.flashlsCallbacks) {
+ window.Clappr.flashlsCallbacks = {};
+ }
+ this.flashlsEvents = new _flashls_events2.default(this.cid);
+ window.Clappr.flashlsCallbacks[this.cid] = function (eventName, args) {
+ _this6.flashlsEvents[eventName].apply(_this6.flashlsEvents, args);
+ };
+ };
+
+ FlasHLS.prototype.render = function render() {
+ _BaseFlashPlayback.prototype.render.call(this);
+ this._createCallbacks();
+ return this;
+ };
+
+ _createClass(FlasHLS, [{
+ key: 'isReady',
+ get: function get() {
+ return this._isReadyState;
+ }
+ }, {
+ key: 'dvrEnabled',
+ get: function get() {
+ return !!this._dvrEnabled;
+ }
+ }]);
+
+ return FlasHLS;
+ }(_base_flash_playback2.default);
+
+ exports.default = FlasHLS;
+
+
+ FlasHLS.canPlay = function (resource, mimeType) {
+ var resourceParts = resource.split('?')[0].match(/.*\.(.*)$/) || [];
+ return _browser2.default.hasFlash && (resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl');
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 65 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _mediator = __webpack_require__(30);
+
+ var _mediator2 = _interopRequireDefault(_mediator);
+
+ 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 HLSEvents = function () {
+ function HLSEvents(instanceId) {
+ _classCallCheck(this, HLSEvents);
+
+ this.instanceId = instanceId;
+ }
+
+ HLSEvents.prototype.ready = function ready() {
+ _mediator2.default.trigger(this.instanceId + ':flashready');
+ };
+
+ HLSEvents.prototype.videoSize = function videoSize(width, height) {
+ _mediator2.default.trigger(this.instanceId + ':videosizechanged', width, height);
+ };
+
+ HLSEvents.prototype.complete = function complete() {
+ _mediator2.default.trigger(this.instanceId + ':complete');
+ };
+
+ HLSEvents.prototype.error = function error(code, url, message) {
+ _mediator2.default.trigger(this.instanceId + ':error', code, url, message);
+ };
+
+ HLSEvents.prototype.manifest = function manifest(duration, loadmetrics) {
+ _mediator2.default.trigger(this.instanceId + ':manifestloaded', duration, loadmetrics);
+ };
+
+ HLSEvents.prototype.audioLevelLoaded = function audioLevelLoaded(loadmetrics) {
+ _mediator2.default.trigger(this.instanceId + ':audiolevelloaded', loadmetrics);
+ };
+
+ HLSEvents.prototype.levelLoaded = function levelLoaded(loadmetrics) {
+ _mediator2.default.trigger(this.instanceId + ':levelloaded', loadmetrics);
+ };
+
+ HLSEvents.prototype.levelEndlist = function levelEndlist(level) {
+ _mediator2.default.trigger(this.instanceId + ':levelendlist', level);
+ };
+
+ HLSEvents.prototype.fragmentLoaded = function fragmentLoaded(loadmetrics) {
+ _mediator2.default.trigger(this.instanceId + ':fragmentloaded', loadmetrics);
+ };
+
+ HLSEvents.prototype.fragmentPlaying = function fragmentPlaying(playmetrics) {
+ _mediator2.default.trigger(this.instanceId + ':fragmentplaying', playmetrics);
+ };
+
+ HLSEvents.prototype.position = function position(timemetrics) {
+ _mediator2.default.trigger(this.instanceId + ':timeupdate', timemetrics);
+ };
+
+ HLSEvents.prototype.state = function state(newState) {
+ _mediator2.default.trigger(this.instanceId + ':playbackstate', newState);
+ };
+
+ HLSEvents.prototype.seekState = function seekState(newState) {
+ _mediator2.default.trigger(this.instanceId + ':seekstate', newState);
+ };
+
+ HLSEvents.prototype.switch = function _switch(newLevel) {
+ _mediator2.default.trigger(this.instanceId + ':levelchanged', newLevel);
+ };
+
+ HLSEvents.prototype.audioTracksListChange = function audioTracksListChange(trackList) {
+ _mediator2.default.trigger(this.instanceId + ':audiotracklistchanged', trackList);
+ };
+
+ HLSEvents.prototype.audioTrackChange = function audioTrackChange(trackId) {
+ _mediator2.default.trigger(this.instanceId + ':audiotrackchanged', trackId);
+ };
+
+ return HLSEvents;
+ }();
+
+ exports.default = HLSEvents;
+ module.exports = exports['default'];
+
+/***/ },
+/* 66 */
+/***/ function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__.p + "809981e5b09d5336c45d72d0869ada2a.swf";
+
+/***/ },
+/* 67 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(68);
+
+/***/ },
+/* 68 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _html5_video = __webpack_require__(51);
+
+ var _html5_video2 = _interopRequireDefault(_html5_video);
+
+ var _hls = __webpack_require__(69);
+
+ var _hls2 = _interopRequireDefault(_hls);
+
+ var _lodash = __webpack_require__(70);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _browser = __webpack_require__(3);
+
+ var _browser2 = _interopRequireDefault(_browser);
+
+ var _utils = __webpack_require__(2);
+
+ var _log = __webpack_require__(6);
+
+ var _log2 = _interopRequireDefault(_log);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 AUTO = -1;
+
+ var HLS = function (_HTML5VideoPlayback) {
+ _inherits(HLS, _HTML5VideoPlayback);
+
+ _createClass(HLS, [{
+ key: 'name',
+ get: function get() {
+ return 'hls';
+ }
+ }, {
+ key: 'levels',
+ get: function get() {
+ return this._levels || [];
+ }
+ }, {
+ key: 'currentLevel',
+ get: function get() {
+ if (this._currentLevel === null || this._currentLevel === undefined) {
+ return AUTO;
+ } else {
+ return this._currentLevel; //0 is a valid level ID
+ }
+ },
+ set: function set(id) {
+ this._currentLevel = id;
+ this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);
+ this._hls.currentLevel = this._currentLevel;
+ }
+ }, {
+ key: '_startTime',
+ get: function get() {
+ if (this._playbackType === _playback2.default.LIVE && this._playlistType !== 'EVENT') {
+ return this._extrapolatedStartTime;
+ }
+ return this._playableRegionStartTime;
+ }
+ }, {
+ key: '_now',
+ get: function get() {
+ return (0, _utils.now)();
+ }
+
+ // the time in the video element which should represent the start of the sliding window
+ // extrapolated to increase in real time (instead of jumping as the early segments are removed)
+
+ }, {
+ key: '_extrapolatedStartTime',
+ get: function get() {
+ if (!this._localStartTimeCorrelation) {
+ return this._playableRegionStartTime;
+ }
+ var corr = this._localStartTimeCorrelation;
+ var timePassed = this._now - corr.local;
+ var extrapolatedWindowStartTime = (corr.remote + timePassed) / 1000;
+ // cap at the end of the extrapolated window duration
+ return Math.min(extrapolatedWindowStartTime, this._playableRegionStartTime + this._extrapolatedWindowDuration);
+ }
+
+ // the time in the video element which should represent the end of the content
+ // extrapolated to increase in real time (instead of jumping as segments are added)
+
+ }, {
+ key: '_extrapolatedEndTime',
+ get: function get() {
+ var actualEndTime = this._playableRegionStartTime + this._playableRegionDuration;
+ if (!this._localEndTimeCorrelation) {
+ return actualEndTime;
+ }
+ var corr = this._localEndTimeCorrelation;
+ var timePassed = this._now - corr.local;
+ var extrapolatedEndTime = (corr.remote + timePassed) / 1000;
+ return Math.max(actualEndTime - this._extrapolatedWindowDuration, Math.min(extrapolatedEndTime, actualEndTime));
+ }
+ }, {
+ key: '_duration',
+ get: function get() {
+ return this._extrapolatedEndTime - this._startTime;
+ }
+
+ // Returns the duration (seconds) of the window that the extrapolated start time is allowed
+ // to move in before being capped.
+ // The extrapolated start time should never reach the cap at the end of the window as the
+ // window should slide as chunks are removed from the start.
+ // This also applies to the extrapolated end time in the same way.
+ //
+ // If chunks aren't being removed for some reason that the start time will reach and remain fixed at
+ // playableRegionStartTime + extrapolatedWindowDuration
+ //
+ // <-- window duration -->
+ // I.e playableRegionStartTime |-----------------------|
+ // | --> . . .
+ // . --> | --> . .
+ // . . --> | --> .
+ // . . . --> |
+ // . . . .
+ // extrapolatedStartTime
+
+ }, {
+ key: '_extrapolatedWindowDuration',
+ get: function get() {
+ if (this._segmentTargetDuration === null) {
+ return 0;
+ }
+ return this._extrapolatedWindowNumSegments * this._segmentTargetDuration;
+ }
+ }]);
+
+ function HLS() {
+ _classCallCheck(this, HLS);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ // backwards compatibility (TODO: remove on 0.3.0)
+ var _this = _possibleConstructorReturn(this, _HTML5VideoPlayback.call.apply(_HTML5VideoPlayback, [this].concat(args)));
+
+ _this.options.playback || (_this.options.playback = _this.options);
+ _this._minDvrSize = typeof _this.options.hlsMinimumDvrSize === 'undefined' ? 60 : _this.options.hlsMinimumDvrSize;
+ // The size of the start time extrapolation window measured as a multiple of segments.
+ // Should be 2 or higher, or 0 to disable. Should only need to be increased above 2 if more than one segment is
+ // removed from the start of the playlist at a time. E.g if the playlist is cached for 10 seconds and new chunks are
+ // added/removed every 5.
+ _this._extrapolatedWindowNumSegments = !_this.options.playback || typeof _this.options.playback.extrapolatedWindowNumSegments === 'undefined' ? 2 : _this.options.playback.extrapolatedWindowNumSegments;
+
+ _this._playbackType = _playback2.default.VOD;
+ _this._lastTimeUpdate = null;
+ _this._lastDuration = null;
+ // for hls streams which have dvr with a sliding window,
+ // the content at the start of the playlist is removed as new
+ // content is appended at the end.
+ // this means the actual playable start time will increase as the
+ // start content is deleted
+ // For streams with dvr where the entire recording is kept from the
+ // beginning this should stay as 0
+ _this._playableRegionStartTime = 0;
+ // {local, remote} remote is the time in the video element that should represent 0
+ // local is the system time when the 'remote' measurment took place
+ _this._localStartTimeCorrelation = null;
+ // {local, remote} remote is the time in the video element that should represents the end
+ // local is the system time when the 'remote' measurment took place
+ _this._localEndTimeCorrelation = null;
+ // if content is removed from the beginning then this empty area should
+ // be ignored. "playableRegionDuration" excludes the empty area
+ _this._playableRegionDuration = 0;
+ // true when the actual duration is longer than hlsjs's live sync point
+ // when this is false playableRegionDuration will be the actual duration
+ // when this is true playableRegionDuration will exclude the time after the sync point
+ _this._durationExcludesAfterLiveSyncPoint = false;
+ // #EXT-X-TARGETDURATION
+ _this._segmentTargetDuration = null;
+ // #EXT-X-PLAYLIST-TYPE
+ _this._playlistType = null;
+ _this._recoverAttemptsRemaining = _this.options.hlsRecoverAttempts || 16;
+ _this._startTimeUpdateTimer();
+ return _this;
+ }
+
+ HLS.prototype._setupHls = function _setupHls() {
+ var _this2 = this;
+
+ this._hls = new _hls2.default(this.options.playback.hlsjsConfig || {});
+ this._hls.on(_hls2.default.Events.MEDIA_ATTACHED, function () {
+ return _this2._hls.loadSource(_this2.options.src);
+ });
+ this._hls.on(_hls2.default.Events.LEVEL_LOADED, function (evt, data) {
+ return _this2._updatePlaybackType(evt, data);
+ });
+ this._hls.on(_hls2.default.Events.LEVEL_UPDATED, function (evt, data) {
+ return _this2._onLevelUpdated(evt, data);
+ });
+ this._hls.on(_hls2.default.Events.LEVEL_SWITCH, function (evt, data) {
+ return _this2._onLevelSwitch(evt, data);
+ });
+ this._hls.on(_hls2.default.Events.FRAG_LOADED, function (evt, data) {
+ return _this2._onFragmentLoaded(evt, data);
+ });
+ this._hls.on(_hls2.default.Events.ERROR, function (evt, data) {
+ return _this2._onHLSJSError(evt, data);
+ });
+ this._hls.attachMedia(this.el);
+ };
+
+ HLS.prototype._recover = function _recover(evt, data) {
+ if (!this._recoveredDecodingError) {
+ this._recoveredDecodingError = true;
+ this._hls.recoverMediaError();
+ } else if (!this._recoveredAudioCodecError) {
+ this._recoveredAudioCodecError = true;
+ this._hls.swapAudioCodec();
+ this._hls.recoverMediaError();
+ } else {
+ _log2.default.error('hlsjs: failed to recover');
+ this.trigger(_events2.default.PLAYBACK_ERROR, 'hlsjs: could not recover from error, evt ' + evt + ', data ' + data + ' ', this.name);
+ }
+ };
+
+ // override
+
+
+ HLS.prototype._setupSrc = function _setupSrc(srcUrl) {// eslint-disable-line no-unused-vars
+ // this playback manages the src on the video element itself
+ };
+
+ HLS.prototype._startTimeUpdateTimer = function _startTimeUpdateTimer() {
+ var _this3 = this;
+
+ this._timeUpdateTimer = setInterval(function () {
+ _this3._onDurationChange();
+ _this3._onTimeUpdate();
+ }, 100);
+ };
+
+ HLS.prototype._stopTimeUpdateTimer = function _stopTimeUpdateTimer() {
+ clearInterval(this._timeUpdateTimer);
+ };
+
+ // the duration on the video element itself should not be used
+ // as this does not necesarily represent the duration of the stream
+ // https://github.com/clappr/clappr/issues/668#issuecomment-157036678
+
+
+ HLS.prototype.getDuration = function getDuration() {
+ return this._duration;
+ };
+
+ HLS.prototype.getCurrentTime = function getCurrentTime() {
+ // e.g. can be < 0 if user pauses near the start
+ // eventually they will then be kicked to the end by hlsjs if they run out of buffer
+ // before the official start time
+ return Math.max(0, this.el.currentTime - this._startTime);
+ };
+
+ // the time that "0" now represents relative to when playback started
+ // for a stream with a sliding window this will increase as content is
+ // removed from the beginning
+
+
+ HLS.prototype.getStartTimeOffset = function getStartTimeOffset() {
+ return this._startTime;
+ };
+
+ HLS.prototype.seekPercentage = function seekPercentage(percentage) {
+ var seekTo = this._duration;
+ if (percentage > 0) {
+ seekTo = this._duration * (percentage / 100);
+ }
+ this.seek(seekTo);
+ };
+
+ HLS.prototype.seek = function seek(time) {
+ if (time < 0) {
+ _log2.default.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');
+ time = this.getDuration();
+ }
+ // assume live if time within 3 seconds of end of stream
+ this.dvrEnabled && this._updateDvr(time < this.getDuration() - 3);
+ time += this._startTime;
+ _HTML5VideoPlayback.prototype.seek.call(this, time);
+ };
+
+ HLS.prototype.seekToLivePoint = function seekToLivePoint() {
+ this.seek(this.getDuration());
+ };
+
+ HLS.prototype._updateDvr = function _updateDvr(status) {
+ this.trigger(_events2.default.PLAYBACK_DVR, status);
+ this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': status });
+ };
+
+ HLS.prototype._updateSettings = function _updateSettings() {
+ if (this._playbackType === _playback2.default.VOD) {
+ this.settings.left = ['playpause', 'position', 'duration'];
+ } else if (this.dvrEnabled) {
+ this.settings.left = ['playpause'];
+ } else {
+ this.settings.left = ['playstop'];
+ }
+ this.settings.seekEnabled = this.isSeekEnabled();
+ this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);
+ };
+
+ HLS.prototype._onHLSJSError = function _onHLSJSError(evt, data) {
+ // only report/handle errors if they are fatal
+ // hlsjs should automatically handle non fatal errors
+ if (data.fatal) {
+ if (this._recoverAttemptsRemaining > 0) {
+ this._recoverAttemptsRemaining -= 1;
+ switch (data.type) {
+ case _hls2.default.ErrorTypes.NETWORK_ERROR:
+ _log2.default.warn('hlsjs: trying to recover from network error, evt ' + evt + ', data ' + data + ' ');
+ this._hls.startLoad();
+ break;
+ case _hls2.default.ErrorTypes.MEDIA_ERROR:
+ _log2.default.warn('hlsjs: trying to recover from media error, evt ' + evt + ', data ' + data + ' ');
+ this._recover(evt, data);
+ break;
+ default:
+ _log2.default.error('hlsjs: trying to recover from error, evt ' + evt + ', data ' + data + ' ');
+ this.trigger(_events2.default.PLAYBACK_ERROR, 'hlsjs: could not recover from error, evt ' + evt + ', data ' + data + ' ', this.name);
+ break;
+ }
+ } else {
+ _log2.default.error('hlsjs: could not recover from error after maximum number of attempts, evt ' + evt + ', data ' + data + ' ');
+ this.trigger(_events2.default.PLAYBACK_ERROR, { evt: evt, data: data }, this.name);
+ }
+ } else {
+ _log2.default.warn('hlsjs: non-fatal error occurred, evt ' + evt + ', data ' + data + ' ');
+ }
+ };
+
+ HLS.prototype._onTimeUpdate = function _onTimeUpdate() {
+ var update = { current: this.getCurrentTime(), total: this.getDuration() };
+ if ((0, _lodash2.default)(update, this._lastTimeUpdate)) {
+ return;
+ }
+ this._lastTimeUpdate = update;
+ this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, update, this.name);
+ };
+
+ HLS.prototype._onDurationChange = function _onDurationChange() {
+ var duration = this.getDuration();
+ if (this._lastDuration === duration) {
+ return;
+ }
+ this._lastDuration = duration;
+ _HTML5VideoPlayback.prototype._onDurationChange.call(this);
+ };
+
+ HLS.prototype._onProgress = function _onProgress() {
+ if (!this.el.buffered.length) {
+ return;
+ }
+ var buffered = [];
+ var bufferedPos = 0;
+ for (var i = 0; i < this.el.buffered.length; i++) {
+ buffered = [].concat(_toConsumableArray(buffered), [{
+ // for a stream with sliding window dvr something that is buffered my slide off the start of the timeline
+ start: Math.max(0, this.el.buffered.start(i) - this._playableRegionStartTime),
+ end: Math.max(0, this.el.buffered.end(i) - this._playableRegionStartTime)
+ }]);
+ if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {
+ bufferedPos = i;
+ }
+ }
+ var progress = {
+ start: buffered[bufferedPos].start,
+ current: buffered[bufferedPos].end,
+ total: this.getDuration()
+ };
+ this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);
+ };
+
+ HLS.prototype.play = function play() {
+ if (!this._hls) {
+ this._setupHls();
+ }
+ _HTML5VideoPlayback.prototype.play.call(this);
+ };
+
+ HLS.prototype.pause = function pause() {
+ if (!this._hls) {
+ return;
+ }
+ _HTML5VideoPlayback.prototype.pause.call(this);
+ if (this.dvrEnabled) {
+ this._updateDvr(true);
+ }
+ };
+
+ HLS.prototype.stop = function stop() {
+ if (this._hls) {
+ _HTML5VideoPlayback.prototype.stop.call(this);
+ this._hls.destroy();
+ delete this._hls;
+ }
+ };
+
+ HLS.prototype.destroy = function destroy() {
+ this._stopTimeUpdateTimer();
+ if (this._hls) {
+ this._hls.destroy();
+ delete this._hls;
+ }
+ _HTML5VideoPlayback.prototype.destroy.call(this);
+ };
+
+ HLS.prototype._updatePlaybackType = function _updatePlaybackType(evt, data) {
+ this._playbackType = data.details.live ? _playback2.default.LIVE : _playback2.default.VOD;
+ this._fillLevels();
+ this._onLevelUpdated(evt, data);
+ };
+
+ HLS.prototype._fillLevels = function _fillLevels() {
+ this._levels = this._hls.levels.map(function (level, index) {
+ return { id: index, level: level, label: level.bitrate / 1000 + 'Kbps' };
+ });
+ this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);
+ };
+
+ HLS.prototype._onLevelUpdated = function _onLevelUpdated(evt, data) {
+ this._segmentTargetDuration = data.details.targetduration;
+ this._playlistType = data.details.type || null;
+
+ var startTimeChanged = false;
+ var durationChanged = false;
+ var fragments = data.details.fragments;
+ var previousPlayableRegionStartTime = this._playableRegionStartTime;
+ var previousPlayableRegionDuration = this._playableRegionDuration;
+
+ if (fragments.length === 0) {
+ return;
+ }
+
+ if (this._playableRegionStartTime !== fragments[0].start) {
+ startTimeChanged = true;
+ this._playableRegionStartTime = fragments[0].start;
+ }
+
+ if (startTimeChanged) {
+ if (!this._localStartTimeCorrelation) {
+ // set the correlation to map to middle of the extrapolation window
+ this._localStartTimeCorrelation = {
+ local: this._now,
+ remote: (fragments[0].start + this._extrapolatedWindowDuration / 2) * 1000
+ };
+ } else {
+ // check if the correlation still works
+ var corr = this._localStartTimeCorrelation;
+ var timePassed = this._now - corr.local;
+ // this should point to a time within the extrapolation window
+ var startTime = (corr.remote + timePassed) / 1000;
+ if (startTime < fragments[0].start) {
+ // our start time is now earlier than the first chunk
+ // (maybe the chunk was removed early)
+ // reset correlation so that it sits at the beginning of the first available chunk
+ this._localStartTimeCorrelation = {
+ local: this._now,
+ remote: fragments[0].start * 1000
+ };
+ } else if (startTime > previousPlayableRegionStartTime + this._extrapolatedWindowDuration) {
+ // start time was past the end of the old extrapolation window (so would have been capped)
+ // see if now that time would be inside the window, and if it would be set the correlation
+ // so that it resumes from the time it was at at the end of the old window
+ // update the correlation so that the time starts counting again from the value it's on now
+ this._localStartTimeCorrelation = {
+ local: this._now,
+ remote: Math.max(fragments[0].start, previousPlayableRegionStartTime + this._extrapolatedWindowDuration) * 1000
+ };
+ }
+ }
+ }
+
+ var newDuration = data.details.totalduration;
+ // if it's a live stream then shorten the duration to remove access
+ // to the area after hlsjs's live sync point
+ // seeks to areas after this point sometimes have issues
+ if (this._playbackType === _playback2.default.LIVE) {
+ var fragmentTargetDuration = data.details.targetduration;
+ var hlsjsConfig = this.options.playback || {};
+ var liveSyncDurationCount = hlsjsConfig.liveSyncDurationCount || _hls2.default.DefaultConfig.liveSyncDurationCount;
+ var hiddenAreaDuration = fragmentTargetDuration * liveSyncDurationCount;
+ if (hiddenAreaDuration <= newDuration) {
+ newDuration -= hiddenAreaDuration;
+ this._durationExcludesAfterLiveSyncPoint = true;
+ } else {
+ this._durationExcludesAfterLiveSyncPoint = false;
+ }
+ }
+
+ if (newDuration !== this._playableRegionDuration) {
+ durationChanged = true;
+ this._playableRegionDuration = newDuration;
+ }
+
+ // Note the end time is not the playableRegionDuration
+ // The end time will always increase even if content is removed from the beginning
+ var endTime = fragments[0].start + newDuration;
+ var previousEndTime = previousPlayableRegionStartTime + previousPlayableRegionDuration;
+ var endTimeChanged = endTime !== previousEndTime;
+ if (endTimeChanged) {
+ if (!this._localEndTimeCorrelation) {
+ // set the correlation to map to the end
+ this._localEndTimeCorrelation = {
+ local: this._now,
+ remote: endTime * 1000
+ };
+ } else {
+ // check if the correlation still works
+ var _corr = this._localEndTimeCorrelation;
+ var _timePassed = this._now - _corr.local;
+ // this should point to a time within the extrapolation window from the end
+ var extrapolatedEndTime = (_corr.remote + _timePassed) / 1000;
+ if (extrapolatedEndTime > endTime) {
+ this._localEndTimeCorrelation = {
+ local: this._now,
+ remote: endTime * 1000
+ };
+ } else if (extrapolatedEndTime < endTime - this._extrapolatedWindowDuration) {
+ // our extrapolated end time is now earlier than the extrapolation window from the actual end time
+ // (maybe a chunk became available early)
+ // reset correlation so that it sits at the beginning of the extrapolation window from the end time
+ this._localEndTimeCorrelation = {
+ local: this._now,
+ remote: (endTime - this._extrapolatedWindowDuration) * 1000
+ };
+ } else if (extrapolatedEndTime > previousEndTime) {
+ // end time was past the old end time (so would have been capped)
+ // set the correlation so that it resumes from the time it was at at the end of the old window
+ this._localEndTimeCorrelation = {
+ local: this._now,
+ remote: previousEndTime * 1000
+ };
+ }
+ }
+ }
+
+ // now that the values have been updated call any methods that use on them so they get the updated values
+ // immediately
+ durationChanged && this._onDurationChange();
+ startTimeChanged && this._onProgress();
+ };
+
+ HLS.prototype._onFragmentLoaded = function _onFragmentLoaded(evt, data) {
+ this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, data);
+ };
+
+ HLS.prototype._onLevelSwitch = function _onLevelSwitch(evt, data) {
+ if (!this.levels.length) {
+ this._fillLevels();
+ }
+ this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);
+ this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH, data);
+ var currentLevel = this._hls.levels[data.level];
+ if (currentLevel) {
+ // TODO should highDefinition be private and maybe have a read only accessor if it's used somewhere
+ this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;
+ this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);
+ this.trigger(_events2.default.PLAYBACK_BITRATE, {
+ height: currentLevel.height,
+ width: currentLevel.width,
+ bandwidth: currentLevel.bitrate,
+ bitrate: currentLevel.bitrate,
+ level: data.level
+ });
+ }
+ };
+
+ HLS.prototype.getPlaybackType = function getPlaybackType() {
+ return this._playbackType;
+ };
+
+ HLS.prototype.isSeekEnabled = function isSeekEnabled() {
+ return this._playbackType === _playback2.default.VOD || this.dvrEnabled;
+ };
+
+ _createClass(HLS, [{
+ key: 'dvrEnabled',
+ get: function get() {
+ // enabled when:
+ // - the duration does not include content after hlsjs's live sync point
+ // - the playable region duration is longer than the configured duration to enable dvr after
+ // - the playback type is LIVE.
+ return this._durationExcludesAfterLiveSyncPoint && this._duration >= this._minDvrSize && this.getPlaybackType() === _playback2.default.LIVE;
+ }
+ }]);
+
+ return HLS;
+ }(_html5_video2.default);
+
+ exports.default = HLS;
+
+
+ HLS.canPlay = function (resource, mimeType) {
+ var resourceParts = resource.split('?')[0].match(/.*\.(.*)$/) || [];
+ var isHls = resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl';
+
+ return !!(_hls2.default.isSupported() && isHls && !_browser2.default.isSafari);
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 69 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var require;var require;(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Hls = f()}})(function(){var define,module,exports;return (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 require(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})({1:[function(_dereq_,module,exports){
+ // Copyright Joyent, Inc. and other Node contributors.
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining a
+ // copy of this software and associated documentation files (the
+ // "Software"), to deal in the Software without restriction, including
+ // without limitation the rights to use, copy, modify, merge, publish,
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
+ // persons to whom the Software is furnished to do so, subject to the
+ // following conditions:
+ //
+ // The above copyright notice and this permission notice shall be included
+ // in all copies or substantial portions of the Software.
+ //
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+ }
+ module.exports = EventEmitter;
+
+ // Backwards-compat with node 0.10.x
+ EventEmitter.EventEmitter = EventEmitter;
+
+ EventEmitter.prototype._events = undefined;
+ EventEmitter.prototype._maxListeners = undefined;
+
+ // By default EventEmitters will print a warning if more than 10 listeners are
+ // added to it. This is a useful default which helps finding memory leaks.
+ EventEmitter.defaultMaxListeners = 10;
+
+ // Obviously not all Emitters should be limited to 10. This function allows
+ // that to be increased. Set to zero for unlimited.
+ EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+ };
+
+ EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ args = Array.prototype.slice.call(arguments, 1);
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ args = Array.prototype.slice.call(arguments, 1);
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+ };
+
+ EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+ };
+
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+ EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+ };
+
+ // emits a 'removeListener' event iff the listener was removed
+ EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+ };
+
+ EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else if (listeners) {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+ };
+
+ EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+ };
+
+ EventEmitter.prototype.listenerCount = function(type) {
+ if (this._events) {
+ var evlistener = this._events[type];
+
+ if (isFunction(evlistener))
+ return 1;
+ else if (evlistener)
+ return evlistener.length;
+ }
+ return 0;
+ };
+
+ EventEmitter.listenerCount = function(emitter, type) {
+ return emitter.listenerCount(type);
+ };
+
+ function isFunction(arg) {
+ return typeof arg === 'function';
+ }
+
+ function isNumber(arg) {
+ return typeof arg === 'number';
+ }
+
+ function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+ }
+
+ function isUndefined(arg) {
+ return arg === void 0;
+ }
+
+ },{}],2:[function(_dereq_,module,exports){
+ var bundleFn = arguments[3];
+ var sources = arguments[4];
+ var cache = arguments[5];
+
+ var stringify = JSON.stringify;
+
+ module.exports = function (fn, options) {
+ var wkey;
+ var cacheKeys = Object.keys(cache);
+
+ for (var i = 0, l = cacheKeys.length; i < l; i++) {
+ var key = cacheKeys[i];
+ var exp = cache[key].exports;
+ // Using babel as a transpiler to use esmodule, the export will always
+ // be an object with the default export as a property of it. To ensure
+ // the existing api and babel esmodule exports are both supported we
+ // check for both
+ if (exp === fn || exp && exp.default === fn) {
+ wkey = key;
+ break;
+ }
+ }
+
+ if (!wkey) {
+ wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
+ var wcache = {};
+ for (var i = 0, l = cacheKeys.length; i < l; i++) {
+ var key = cacheKeys[i];
+ wcache[key] = key;
+ }
+ sources[wkey] = [
+ Function(['require','module','exports'], '(' + fn + ')(self)'),
+ wcache
+ ];
+ }
+ var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
+
+ var scache = {}; scache[wkey] = wkey;
+ sources[skey] = [
+ Function(['require'], (
+ // try to call default if defined to also support babel esmodule
+ // exports
+ 'var f = require(' + stringify(wkey) + ');' +
+ '(f.default ? f.default : f)(self);'
+ )),
+ scache
+ ];
+
+ var workerSources = {};
+ resolveSources(skey);
+
+ function resolveSources(key) {
+ workerSources[key] = true;
+
+ for (var depPath in sources[key][1]) {
+ var depKey = sources[key][1][depPath];
+ if (!workerSources[depKey]) {
+ resolveSources(depKey);
+ }
+ }
+ }
+
+ var src = '(' + bundleFn + ')({'
+ + Object.keys(workerSources).map(function (key) {
+ return stringify(key) + ':['
+ + sources[key][0]
+ + ',' + stringify(sources[key][1]) + ']'
+ ;
+ }).join(',')
+ + '},{},[' + stringify(skey) + '])'
+ ;
+
+ var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
+
+ var blob = new Blob([src], { type: 'text/javascript' });
+ if (options && options.bare) { return blob; }
+ var workerUrl = URL.createObjectURL(blob);
+ var worker = new Worker(workerUrl);
+ worker.objectURL = workerUrl;
+ return worker;
+ };
+
+ },{}],3:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _bufferHelper = _dereq_(28);
+
+ var _bufferHelper2 = _interopRequireDefault(_bufferHelper);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ var _ewmaBandwidthEstimator = _dereq_(8);
+
+ var _ewmaBandwidthEstimator2 = _interopRequireDefault(_ewmaBandwidthEstimator);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * simple ABR Controller
+ * - compute next level based on last fragment bw heuristics
+ * - implement an abandon rules triggered if we have less than 2 frag buffered and if computed bw shows that we risk buffer stalling
+ */
+
+ var AbrController = function (_EventHandler) {
+ _inherits(AbrController, _EventHandler);
+
+ function AbrController(hls) {
+ _classCallCheck(this, AbrController);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AbrController).call(this, hls, _events2.default.FRAG_LOADING, _events2.default.FRAG_LOADED, _events2.default.FRAG_BUFFERED, _events2.default.ERROR));
+
+ _this.lastLoadedFragLevel = 0;
+ _this._autoLevelCapping = -1;
+ _this._nextAutoLevel = -1;
+ _this.hls = hls;
+ _this.onCheck = _this.abandonRulesCheck.bind(_this);
+ return _this;
+ }
+
+ _createClass(AbrController, [{
+ key: 'destroy',
+ value: function destroy() {
+ this.clearTimer();
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onFragLoading',
+ value: function onFragLoading(data) {
+ var frag = data.frag;
+ if (frag.type === 'main') {
+ if (!this.timer) {
+ this.timer = setInterval(this.onCheck, 100);
+ }
+ // lazy init of bw Estimator, rationale is that we use different params for Live/VoD
+ // so we need to wait for stream manifest / playlist type to instantiate it.
+ if (!this.bwEstimator) {
+ var hls = this.hls,
+ level = data.frag.level,
+ isLive = hls.levels[level].details.live,
+ config = hls.config,
+ ewmaFast = void 0,
+ ewmaSlow = void 0;
+
+ if (isLive) {
+ ewmaFast = config.abrEwmaFastLive;
+ ewmaSlow = config.abrEwmaSlowLive;
+ } else {
+ ewmaFast = config.abrEwmaFastVoD;
+ ewmaSlow = config.abrEwmaSlowVoD;
+ }
+ this.bwEstimator = new _ewmaBandwidthEstimator2.default(hls, ewmaSlow, ewmaFast, config.abrEwmaDefaultEstimate);
+ }
+ this.fragCurrent = frag;
+ }
+ }
+ }, {
+ key: 'abandonRulesCheck',
+ value: function abandonRulesCheck() {
+ /*
+ monitor fragment retrieval time...
+ we compute expected time of arrival of the complete fragment.
+ we compare it to expected time of buffer starvation
+ */
+ var hls = this.hls,
+ v = hls.media,
+ frag = this.fragCurrent,
+ loader = frag.loader;
+
+ // if loader has been destroyed or loading has been aborted, stop timer and return
+ if (!loader || loader.stats && loader.stats.aborted) {
+ _logger.logger.warn('frag loader destroy or aborted, disarm abandonRules');
+ this.clearTimer();
+ return;
+ }
+ var stats = loader.stats;
+ /* only monitor frag retrieval time if
+ (video not paused OR first fragment being loaded(ready state === HAVE_NOTHING = 0)) AND autoswitching enabled AND not lowest level (=> means that we have several levels) */
+ if (v && (!v.paused && v.playbackRate !== 0 || !v.readyState) && frag.autoLevel && frag.level) {
+ var requestDelay = performance.now() - stats.trequest,
+ playbackRate = Math.abs(v.playbackRate);
+ // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate
+ if (requestDelay > 500 * frag.duration / playbackRate) {
+ var levels = hls.levels,
+ loadRate = Math.max(1, stats.bw ? stats.bw / 8 : stats.loaded * 1000 / requestDelay),
+ // byte/s; at least 1 byte/s to avoid division by zero
+ // compute expected fragment length using frag duration and level bitrate. also ensure that expected len is gte than already loaded size
+ expectedLen = stats.total ? stats.total : Math.max(stats.loaded, Math.round(frag.duration * levels[frag.level].bitrate / 8)),
+ pos = v.currentTime,
+ fragLoadedDelay = (expectedLen - stats.loaded) / loadRate,
+ bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, hls.config.maxBufferHole).end - pos) / playbackRate;
+ // consider emergency switch down only if we have less than 2 frag buffered AND
+ // time to finish loading current fragment is bigger than buffer starvation delay
+ // ie if we risk buffer starvation if bw does not increase quickly
+ if (bufferStarvationDelay < 2 * frag.duration / playbackRate && fragLoadedDelay > bufferStarvationDelay) {
+ var fragLevelNextLoadedDelay = void 0,
+ nextLoadLevel = void 0;
+ // lets iterate through lower level and try to find the biggest one that could avoid rebuffering
+ // we start from current level - 1 and we step down , until we find a matching level
+ for (nextLoadLevel = frag.level - 1; nextLoadLevel >= 0; nextLoadLevel--) {
+ // compute time to load next fragment at lower level
+ // 0.8 : consider only 80% of current bw to be conservative
+ // 8 = bits per byte (bps/Bps)
+ fragLevelNextLoadedDelay = frag.duration * levels[nextLoadLevel].bitrate / (8 * 0.8 * loadRate);
+ if (fragLevelNextLoadedDelay < bufferStarvationDelay) {
+ // we found a lower level that be rebuffering free with current estimated bw !
+ break;
+ }
+ }
+ // only emergency switch down if it takes less time to load new fragment at lowest level instead
+ // of finishing loading current one ...
+ if (fragLevelNextLoadedDelay < fragLoadedDelay) {
+ // ensure nextLoadLevel is not negative
+ nextLoadLevel = Math.max(0, nextLoadLevel);
+ _logger.logger.warn('loading too slow, abort fragment loading and switch to level ' + nextLoadLevel + ':fragLoadedDelay[' + nextLoadLevel + ']<fragLoadedDelay[' + (frag.level - 1) + '];bufferStarvationDelay:' + fragLevelNextLoadedDelay.toFixed(1) + '<' + fragLoadedDelay.toFixed(1) + ':' + bufferStarvationDelay.toFixed(1));
+ // force next load level in auto mode
+ hls.nextLoadLevel = nextLoadLevel;
+ // update bw estimate for this fragment before cancelling load (this will help reducing the bw)
+ this.bwEstimator.sample(requestDelay, stats.loaded);
+ //abort fragment loading
+ loader.abort();
+ // stop abandon rules timer
+ this.clearTimer();
+ hls.trigger(_events2.default.FRAG_LOAD_EMERGENCY_ABORTED, { frag: frag, stats: stats });
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'onFragLoaded',
+ value: function onFragLoaded(data) {
+ var frag = data.frag;
+ if (frag.type === 'main') {
+ // stop monitoring bw once frag loaded
+ this.clearTimer();
+ // store level id after successful fragment load
+ this.lastLoadedFragLevel = frag.level;
+ // reset forced auto level value so that next level will be selected
+ this._nextAutoLevel = -1;
+ // if fragment has been loaded to perform a bitrate test,
+ if (data.frag.bitrateTest) {
+ var stats = data.stats;
+ stats.tparsed = stats.tbuffered = stats.tload;
+ this.onFragBuffered(data);
+ }
+ }
+ }
+ }, {
+ key: 'onFragBuffered',
+ value: function onFragBuffered(data) {
+ var stats = data.stats,
+ frag = data.frag;
+ // only update stats on first frag buffering
+ // if same frag is loaded multiple times, it might be in browser cache, and loaded quickly
+ // and leading to wrong bw estimation
+ // on bitrate test, also only update stats once (if tload = tbuffered == on FRAG_LOADED)
+ if (stats.aborted !== true && frag.loadCounter === 1 && frag.type === 'main' && (!frag.bitrateTest || stats.tload === stats.tbuffered)) {
+ var fragLoadingProcessingMs = stats.tbuffered - stats.trequest;
+ _logger.logger.log('latency/loading/parsing/append/kbps:' + Math.round(stats.tfirst - stats.trequest) + '/' + Math.round(stats.tload - stats.tfirst) + '/' + Math.round(stats.tparsed - stats.tload) + '/' + Math.round(stats.tbuffered - stats.tparsed) + '/' + Math.round(8 * stats.loaded / (stats.tbuffered - stats.trequest)));
+ this.bwEstimator.sample(fragLoadingProcessingMs, stats.loaded);
+ // if fragment has been loaded to perform a bitrate test, (hls.startLevel = -1), store bitrate test delay duration
+ if (frag.bitrateTest) {
+ this.bitrateTestDelay = fragLoadingProcessingMs / 1000;
+ } else {
+ this.bitrateTestDelay = 0;
+ }
+ }
+ }
+ }, {
+ key: 'onError',
+ value: function onError(data) {
+ // stop timer in case of frag loading error
+ switch (data.details) {
+ case _errors.ErrorDetails.FRAG_LOAD_ERROR:
+ case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:
+ this.clearTimer();
+ break;
+ default:
+ break;
+ }
+ }
+ }, {
+ key: 'clearTimer',
+ value: function clearTimer() {
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ }
+
+ /** Return the capping/max level value that could be used by automatic level selection algorithm **/
+
+ }, {
+ key: 'findBestLevel',
+ value: function findBestLevel(currentLevel, currentFragDuration, currentBw, minAutoLevel, maxAutoLevel, maxFetchDuration, bwFactor, bwUpFactor, levels) {
+ for (var i = maxAutoLevel; i >= minAutoLevel; i--) {
+ var levelInfo = levels[i],
+ levelDetails = levelInfo.details,
+ avgDuration = levelDetails ? levelDetails.totalduration / levelDetails.fragments.length : currentFragDuration,
+ adjustedbw = void 0;
+ // follow algorithm captured from stagefright :
+ // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp
+ // Pick the highest bandwidth stream below or equal to estimated bandwidth.
+ // consider only 80% of the available bandwidth, but if we are switching up,
+ // be even more conservative (70%) to avoid overestimating and immediately
+ // switching back.
+ if (i <= currentLevel) {
+ adjustedbw = bwFactor * currentBw;
+ } else {
+ adjustedbw = bwUpFactor * currentBw;
+ }
+ var bitrate = levels[i].bitrate,
+ fetchDuration = bitrate * avgDuration / adjustedbw;
+
+ _logger.logger.trace('level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: ' + i + '/' + Math.round(adjustedbw) + '/' + bitrate + '/' + avgDuration + '/' + maxFetchDuration + '/' + fetchDuration);
+ // if adjusted bw is greater than level bitrate AND
+ if (adjustedbw > bitrate && (
+ // fragment fetchDuration unknown or fragment fetchDuration less than max allowed fetch duration, then this level matches
+ !fetchDuration || fetchDuration < maxFetchDuration)) {
+ // as we are looping from highest to lowest, this will return the best achievable quality level
+
+ return i;
+ }
+ }
+ // not enough time budget even with quality level 0 ... rebuffering might happen
+ return -1;
+ }
+ }, {
+ key: 'autoLevelCapping',
+ get: function get() {
+ return this._autoLevelCapping;
+ }
+
+ /** set the capping/max level value that could be used by automatic level selection algorithm **/
+ ,
+ set: function set(newLevel) {
+ this._autoLevelCapping = newLevel;
+ }
+ }, {
+ key: 'nextAutoLevel',
+ get: function get() {
+ var nextAutoLevel = this._nextAutoLevel,
+ bwEstimator = this.bwEstimator,
+ hls = this.hls,
+ levels = hls.levels,
+ minAutoBitrate = hls.config.minAutoBitrate;
+ // in case next auto level has been forced, and bw not available or not reliable
+ if (nextAutoLevel !== -1 && (!bwEstimator || !bwEstimator.canEstimate())) {
+ // cap next auto level by max auto level
+ return Math.min(nextAutoLevel, this.maxAutoLevel);
+ }
+ // compute next level using ABR logic
+ var nextABRAutoLevel = this.nextABRAutoLevel;
+ if (nextAutoLevel !== -1) {
+ // nextAutoLevel is defined, use it to cap ABR computed quality level
+ nextABRAutoLevel = Math.min(nextAutoLevel, nextABRAutoLevel);
+ }
+ if (minAutoBitrate !== undefined) {
+ while (levels[nextABRAutoLevel].bitrate < minAutoBitrate) {
+ nextABRAutoLevel++;
+ }
+ }
+ return nextABRAutoLevel;
+ },
+ set: function set(nextLevel) {
+ this._nextAutoLevel = nextLevel;
+ }
+ }, {
+ key: 'minAutoLevel',
+ get: function get() {
+ var hls = this.hls,
+ levels = hls.levels,
+ minAutoBitrate = hls.config.minAutoBitrate;
+ for (var i = 0; i < levels.length; i++) {
+ if (levels[i].bitrate > minAutoBitrate) {
+ return i;
+ }
+ }
+ return 0;
+ }
+ }, {
+ key: 'maxAutoLevel',
+ get: function get() {
+ var levels = this.hls.levels,
+ autoLevelCapping = this._autoLevelCapping,
+ maxAutoLevel;
+ if (autoLevelCapping === -1 && levels && levels.length) {
+ maxAutoLevel = levels.length - 1;
+ } else {
+ maxAutoLevel = autoLevelCapping;
+ }
+ return maxAutoLevel;
+ }
+ }, {
+ key: 'nextABRAutoLevel',
+ get: function get() {
+ var hls = this.hls,
+ maxAutoLevel = this.maxAutoLevel,
+ levels = hls.levels,
+ config = hls.config,
+ minAutoLevel = this.minAutoLevel;
+ var v = hls.media,
+ currentLevel = this.lastLoadedFragLevel,
+ currentFragDuration = this.fragCurrent ? this.fragCurrent.duration : 0,
+ pos = v ? v.currentTime : 0,
+
+ // playbackRate is the absolute value of the playback rate; if v.playbackRate is 0, we use 1 to load as
+ // if we're playing back at the normal rate.
+ playbackRate = v && v.playbackRate !== 0 ? Math.abs(v.playbackRate) : 1.0,
+ avgbw = this.bwEstimator ? this.bwEstimator.getEstimate() : config.abrEwmaDefaultEstimate,
+
+ // bufferStarvationDelay is the wall-clock time left until the playback buffer is exhausted.
+ bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, config.maxBufferHole).end - pos) / playbackRate;
+
+ // First, look to see if we can find a level matching with our avg bandwidth AND that could also guarantee no rebuffering at all
+ var bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, config.abrBandWidthFactor, config.abrBandWidthUpFactor, levels);
+ if (bestLevel >= 0) {
+ return bestLevel;
+ } else {
+ _logger.logger.trace('rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering');
+ // not possible to get rid of rebuffering ... let's try to find level that will guarantee less than maxStarvationDelay of rebuffering
+ // if no matching level found, logic will return 0
+ var maxStarvationDelay = config.maxStarvationDelay,
+ bwFactor = config.abrBandWidthFactor,
+ bwUpFactor = config.abrBandWidthUpFactor;
+ if (bufferStarvationDelay === 0) {
+ // in case buffer is empty, let's check if previous fragment was loaded to perform a bitrate test
+ var bitrateTestDelay = this.bitrateTestDelay;
+ if (bitrateTestDelay) {
+ // if it is the case, then we need to adjust our max starvation delay using maxLoadingDelay config value
+ // max video loading delay used in automatic start level selection :
+ // in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level +
+ // the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )
+ maxStarvationDelay = config.maxLoadingDelay - bitrateTestDelay;
+ _logger.logger.trace('bitrate test took ' + Math.round(1000 * bitrateTestDelay) + 'ms, set first fragment max fetchDuration to ' + Math.round(1000 * maxStarvationDelay) + ' ms');
+ // don't use conservative factor on bitrate test
+ bwFactor = bwUpFactor = 1;
+ }
+ }
+ bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay + maxStarvationDelay, bwFactor, bwUpFactor, levels);
+ return Math.max(bestLevel, 0);
+ }
+ }
+ }]);
+
+ return AbrController;
+ }(_eventHandler2.default);
+
+ exports.default = AbrController;
+
+ },{"24":24,"25":25,"26":26,"28":28,"43":43,"8":8}],4:[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 _binarySearch = _dereq_(39);
+
+ var _binarySearch2 = _interopRequireDefault(_binarySearch);
+
+ var _bufferHelper = _dereq_(28);
+
+ var _bufferHelper2 = _interopRequireDefault(_bufferHelper);
+
+ var _demuxer = _dereq_(20);
+
+ var _demuxer2 = _interopRequireDefault(_demuxer);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _levelHelper = _dereq_(29);
+
+ var _levelHelper2 = _interopRequireDefault(_levelHelper);
+
+ var _timeRanges = _dereq_(45);
+
+ var _timeRanges2 = _interopRequireDefault(_timeRanges);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Audio Stream Controller
+ */
+
+ var State = {
+ STOPPED: 'STOPPED',
+ STARTING: 'STARTING',
+ IDLE: 'IDLE',
+ PAUSED: 'PAUSED',
+ KEY_LOADING: 'KEY_LOADING',
+ FRAG_LOADING: 'FRAG_LOADING',
+ FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',
+ WAITING_TRACK: 'WAITING_TRACK',
+ PARSING: 'PARSING',
+ PARSED: 'PARSED',
+ ENDED: 'ENDED',
+ ERROR: 'ERROR'
+ };
+
+ var AudioStreamController = function (_EventHandler) {
+ _inherits(AudioStreamController, _EventHandler);
+
+ function AudioStreamController(hls) {
+ _classCallCheck(this, AudioStreamController);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AudioStreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.AUDIO_TRACKS_UPDATED, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.AUDIO_TRACK_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));
+
+ _this.config = hls.config;
+ _this.audioCodecSwap = false;
+ _this.ticks = 0;
+ _this.ontick = _this.tick.bind(_this);
+ return _this;
+ }
+
+ _createClass(AudioStreamController, [{
+ key: 'destroy',
+ value: function destroy() {
+ this.stopLoad();
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ _eventHandler2.default.prototype.destroy.call(this);
+ this.state = State.STOPPED;
+ }
+ }, {
+ key: 'startLoad',
+ value: function startLoad(startPosition) {
+ if (this.tracks) {
+ var media = this.media,
+ lastCurrentTime = this.lastCurrentTime;
+ this.stopLoad();
+ if (!this.timer) {
+ this.timer = setInterval(this.ontick, 100);
+ }
+ this.fragLoadError = 0;
+ if (media && lastCurrentTime) {
+ _logger.logger.log('configure startPosition @' + lastCurrentTime);
+ this.state = State.IDLE;
+ } else {
+ this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;
+ this.state = State.STARTING;
+ }
+ this.nextLoadPosition = this.startPosition = this.lastCurrentTime;
+ this.tick();
+ } else {
+ this.startPosition = startPosition;
+ this.state = State.STOPPED;
+ }
+ }
+ }, {
+ key: 'stopLoad',
+ value: function stopLoad() {
+ var frag = this.fragCurrent;
+ if (frag) {
+ if (frag.loader) {
+ frag.loader.abort();
+ }
+ this.fragCurrent = null;
+ }
+ this.fragPrevious = null;
+ if (this.demuxer) {
+ this.demuxer.destroy();
+ this.demuxer = null;
+ }
+ this.state = State.STOPPED;
+ }
+ }, {
+ key: 'tick',
+ value: function tick() {
+ this.ticks++;
+ if (this.ticks === 1) {
+ this.doTick();
+ if (this.ticks > 1) {
+ setTimeout(this.tick, 1);
+ }
+ this.ticks = 0;
+ }
+ }
+ }, {
+ key: 'doTick',
+ value: function doTick() {
+ var pos,
+ track,
+ trackDetails,
+ hls = this.hls,
+ config = hls.config;
+ //logger.log('audioStream:' + this.state);
+ switch (this.state) {
+ case State.ERROR:
+ //don't do anything in error state to avoid breaking further ...
+ case State.PAUSED:
+ //don't do anything in paused state either ...
+ break;
+ case State.STARTING:
+ this.state = State.WAITING_TRACK;
+ this.loadedmetadata = false;
+ break;
+ case State.IDLE:
+ // if video not attached AND
+ // start fragment already requested OR start frag prefetch disable
+ // exit loop
+ // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop
+ if (!this.media && (this.startFragRequested || !config.startFragPrefetch)) {
+ break;
+ }
+ // determine next candidate fragment to be loaded, based on current position and
+ // end of buffer position
+ // if we have not yet loaded any fragment, start loading from start position
+ if (this.loadedmetadata) {
+ pos = this.media.currentTime;
+ } else {
+ pos = this.nextLoadPosition;
+ }
+ var media = this.mediaBuffer ? this.mediaBuffer : this.media;
+ var bufferInfo = _bufferHelper2.default.bufferInfo(media, pos, config.maxBufferHole),
+ bufferLen = bufferInfo.len,
+ bufferEnd = bufferInfo.end,
+ fragPrevious = this.fragPrevious,
+ maxBufLen = config.maxMaxBufferLength;
+
+ // if buffer length is less than maxBufLen try to load a new fragment
+ if (bufferLen < maxBufLen && this.trackId < this.tracks.length) {
+ trackDetails = this.tracks[this.trackId].details;
+ // if track info not retrieved yet, switch state and wait for track retrieval
+ if (typeof trackDetails === 'undefined') {
+ this.state = State.WAITING_TRACK;
+ break;
+ }
+
+ // we just got done loading the final fragment, check if we need to finalize media stream
+ if (!trackDetails.live && fragPrevious && fragPrevious.sn === trackDetails.endSN) {
+ // if we are not seeking or if we are seeking but everything (almost) til the end is buffered, let's signal eos
+ // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching
+ // between different renditions. using half frag duration should help cope with these cases.
+ if (!this.media.seeking || this.media.duration - bufferEnd < fragPrevious.duration / 2) {
+ // Finalize the media stream
+ this.hls.trigger(_events2.default.BUFFER_EOS, { type: 'audio' });
+ this.state = State.ENDED;
+ break;
+ }
+ }
+
+ // find fragment index, contiguous with end of buffer position
+ var fragments = trackDetails.fragments,
+ fragLen = fragments.length,
+ start = fragments[0].start,
+ end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,
+ frag = void 0;
+
+ // if bufferEnd before start of playlist, load first fragment
+ if (bufferEnd < start) {
+ frag = fragments[0];
+ } else {
+ (function () {
+ var foundFrag = void 0;
+ var maxFragLookUpTolerance = config.maxFragLookUpTolerance;
+ if (bufferEnd < end) {
+ if (bufferEnd > end - maxFragLookUpTolerance) {
+ maxFragLookUpTolerance = 0;
+ }
+ foundFrag = _binarySearch2.default.search(fragments, function (candidate) {
+ // offset should be within fragment boundary - config.maxFragLookUpTolerance
+ // this is to cope with situations like
+ // bufferEnd = 9.991
+ // frag[Ø] : [0,10]
+ // frag[1] : [10,20]
+ // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here
+ // frag start frag start+duration
+ // |-----------------------------|
+ // <---> <--->
+ // ...--------><-----------------------------><---------....
+ // previous frag matching fragment next frag
+ // return -1 return 0 return 1
+ //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);
+ if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {
+ return 1;
+ } else if (candidate.start - maxFragLookUpTolerance > bufferEnd) {
+ return -1;
+ }
+ return 0;
+ });
+ } else {
+ // reach end of playlist
+ foundFrag = fragments[fragLen - 1];
+ }
+ if (foundFrag) {
+ frag = foundFrag;
+ start = foundFrag.start;
+ //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);
+ if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {
+ if (frag.sn < trackDetails.endSN) {
+ frag = fragments[frag.sn + 1 - trackDetails.startSN];
+ _logger.logger.log('SN just loaded, load next one: ' + frag.sn);
+ } else {
+ frag = null;
+ }
+ }
+ }
+ })();
+ }
+ if (frag) {
+ //logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));
+ if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {
+ _logger.logger.log('Loading key for ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId);
+ this.state = State.KEY_LOADING;
+ hls.trigger(_events2.default.KEY_LOADING, { frag: frag });
+ } else {
+ _logger.logger.log('Loading ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId + ', currentTime:' + pos + ',bufferEnd:' + bufferEnd.toFixed(3));
+ // ensure that we are not reloading the same fragments in loop ...
+ if (this.fragLoadIdx !== undefined) {
+ this.fragLoadIdx++;
+ } else {
+ this.fragLoadIdx = 0;
+ }
+ if (frag.loadCounter) {
+ frag.loadCounter++;
+ var maxThreshold = config.fragLoadingLoopThreshold;
+ // if this frag has already been loaded 3 times, and if it has been reloaded recently
+ if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });
+ return;
+ }
+ } else {
+ frag.loadCounter = 1;
+ }
+ frag.loadIdx = this.fragLoadIdx;
+ this.fragCurrent = frag;
+ this.startFragRequested = true;
+ hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });
+ this.state = State.FRAG_LOADING;
+ }
+ }
+ }
+ break;
+ case State.WAITING_TRACK:
+ track = this.tracks[this.trackId];
+ // check if playlist is already loaded
+ if (track && track.details) {
+ this.state = State.IDLE;
+ }
+ break;
+ case State.FRAG_LOADING_WAITING_RETRY:
+ var now = performance.now();
+ var retryDate = this.retryDate;
+ media = this.media;
+ var isSeeking = media && media.seeking;
+ // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading
+ if (!retryDate || now >= retryDate || isSeeking) {
+ _logger.logger.log('audioStreamController: retryDate reached, switch back to IDLE state');
+ this.state = State.IDLE;
+ }
+ break;
+ case State.STOPPED:
+ case State.FRAG_LOADING:
+ case State.PARSING:
+ case State.PARSED:
+ case State.ENDED:
+ break;
+ default:
+ break;
+ }
+ }
+ }, {
+ key: 'onMediaAttached',
+ value: function onMediaAttached(data) {
+ var media = this.media = this.mediaBuffer = data.media;
+ this.onvseeking = this.onMediaSeeking.bind(this);
+ this.onvended = this.onMediaEnded.bind(this);
+ media.addEventListener('seeking', this.onvseeking);
+ media.addEventListener('ended', this.onvended);
+ var config = this.config;
+ if (this.tracks && config.autoStartLoad) {
+ this.startLoad(config.startPosition);
+ }
+ }
+ }, {
+ key: 'onMediaDetaching',
+ value: function onMediaDetaching() {
+ var media = this.media;
+ if (media && media.ended) {
+ _logger.logger.log('MSE detaching and video ended, reset startPosition');
+ this.startPosition = this.lastCurrentTime = 0;
+ }
+
+ // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery
+ var tracks = this.tracks;
+ if (tracks) {
+ // reset fragment load counter
+ tracks.forEach(function (track) {
+ if (track.details) {
+ track.details.fragments.forEach(function (fragment) {
+ fragment.loadCounter = undefined;
+ });
+ }
+ });
+ }
+ // remove video listeners
+ if (media) {
+ media.removeEventListener('seeking', this.onvseeking);
+ media.removeEventListener('ended', this.onvended);
+ this.onvseeking = this.onvseeked = this.onvended = null;
+ }
+ this.media = null;
+ this.loadedmetadata = false;
+ this.stopLoad();
+ }
+ }, {
+ key: 'onMediaSeeking',
+ value: function onMediaSeeking() {
+ if (this.state === State.ENDED) {
+ // switch to IDLE state to check for potential new fragment
+ this.state = State.IDLE;
+ }
+ if (this.media) {
+ this.lastCurrentTime = this.media.currentTime;
+ }
+ // avoid reporting fragment loop loading error in case user is seeking several times on same position
+ if (this.fragLoadIdx !== undefined) {
+ this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;
+ }
+ // tick to speed up processing
+ this.tick();
+ }
+ }, {
+ key: 'onMediaEnded',
+ value: function onMediaEnded() {
+ // reset startPosition and lastCurrentTime to restart playback @ stream beginning
+ this.startPosition = this.lastCurrentTime = 0;
+ }
+ }, {
+ key: 'onAudioTracksUpdated',
+ value: function onAudioTracksUpdated(data) {
+ _logger.logger.log('audio tracks updated');
+ this.tracks = data.audioTracks;
+ }
+ }, {
+ key: 'onAudioTrackSwitch',
+ value: function onAudioTrackSwitch(data) {
+ // if any URL found on new audio track, it is an alternate audio track
+ var altAudio = !!data.url;
+ this.trackId = data.id;
+ this.state = State.IDLE;
+
+ this.fragCurrent = null;
+ this.state = State.PAUSED;
+ // destroy useless demuxer when switching audio to main
+ if (!altAudio) {
+ if (this.demuxer) {
+ this.demuxer.destroy();
+ this.demuxer = null;
+ }
+ } else {
+ // switching to audio track, start timer if not already started
+ if (!this.timer) {
+ this.timer = setInterval(this.ontick, 100);
+ }
+ }
+ // flush audio source buffer
+ this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });
+ this.tick();
+ }
+ }, {
+ key: 'onAudioTrackLoaded',
+ value: function onAudioTrackLoaded(data) {
+ var details = data.details,
+ trackId = data.id,
+ track = this.tracks[trackId],
+ duration = details.totalduration;
+
+ _logger.logger.log('track ' + trackId + ' loaded [' + details.startSN + ',' + details.endSN + '],duration:' + duration);
+ details.PTSKnown = false;
+ track.details = details;
+
+ // compute start position
+ if (!this.startFragRequested) {
+ // compute start position if set to -1. use it straight away if value is defined
+ if (this.startPosition === -1) {
+ // first, check if start time offset has been set in playlist, if yes, use this value
+ var startTimeOffset = details.startTimeOffset;
+ if (!isNaN(startTimeOffset)) {
+ _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);
+ this.startPosition = startTimeOffset;
+ } else {
+ this.startPosition = 0;
+ }
+ }
+ this.nextLoadPosition = this.startPosition;
+ }
+ // only switch batck to IDLE state if we were waiting for track to start downloading a new fragment
+ if (this.state === State.WAITING_TRACK) {
+ this.state = State.IDLE;
+ }
+ //trigger handler right now
+ this.tick();
+ }
+ }, {
+ key: 'onKeyLoaded',
+ value: function onKeyLoaded() {
+ if (this.state === State.KEY_LOADING) {
+ this.state = State.IDLE;
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onFragLoaded',
+ value: function onFragLoaded(data) {
+ var fragCurrent = this.fragCurrent;
+ if (this.state === State.FRAG_LOADING && fragCurrent && data.frag.type === 'audio' && data.frag.level === fragCurrent.level && data.frag.sn === fragCurrent.sn) {
+ this.state = State.PARSING;
+ // transmux the MPEG-TS data to ISO-BMFF segments
+ this.stats = data.stats;
+ var track = this.tracks[this.trackId],
+ details = track.details,
+ duration = details.totalduration,
+ start = fragCurrent.start,
+ trackId = fragCurrent.level,
+ sn = fragCurrent.sn,
+ audioCodec = this.config.defaultAudioCodec || track.audioCodec;
+ this.pendingAppending = 0;
+ if (!this.demuxer) {
+ this.demuxer = new _demuxer2.default(this.hls, 'audio');
+ }
+ _logger.logger.log('Demuxing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],track ' + trackId);
+ // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
+ var accurateTimeOffset = details.PTSKnown || !details.live;
+ this.demuxer.push(data.payload, audioCodec, null, start, fragCurrent.cc, trackId, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);
+ }
+ this.fragLoadError = 0;
+ }
+ }, {
+ key: 'onFragParsingInitSegment',
+ value: function onFragParsingInitSegment(data) {
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {
+ var tracks = data.tracks,
+ track = void 0;
+
+ // include levelCodec in audio and video tracks
+ track = tracks.audio;
+ if (track) {
+ track.levelCodec = 'mp4a.40.2';
+ track.id = data.id;
+ this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);
+ _logger.logger.log('audio track:audio,container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');
+ var initSegment = track.initSegment;
+ if (initSegment) {
+ this.pendingAppending++;
+ this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: 'audio', data: initSegment, parent: 'audio', content: 'initSegment' });
+ }
+ //trigger handler right now
+ this.tick();
+ }
+ }
+ }
+ }, {
+ key: 'onFragParsingData',
+ value: function onFragParsingData(data) {
+ var _this2 = this;
+
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {
+ var track = this.tracks[this.trackId],
+ frag = this.fragCurrent;
+
+ _logger.logger.log('parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb);
+ _levelHelper2.default.updateFragPTSDTS(track.details, frag.sn, data.startPTS, data.endPTS);
+
+ [data.data1, data.data2].forEach(function (buffer) {
+ if (buffer) {
+ _this2.pendingAppending++;
+ _this2.hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'audio', content: 'data' });
+ }
+ });
+ this.nextLoadPosition = data.endPTS;
+ //trigger handler right now
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onFragParsed',
+ value: function onFragParsed(data) {
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {
+ this.stats.tparsed = performance.now();
+ this.state = State.PARSED;
+ this._checkAppendedParsed();
+ }
+ }
+ }, {
+ key: 'onBufferCreated',
+ value: function onBufferCreated(data) {
+ var audioTrack = data.tracks.audio;
+ if (audioTrack) {
+ this.mediaBuffer = audioTrack.buffer;
+ this.loadedmetadata = true;
+ }
+ }
+ }, {
+ key: 'onBufferAppended',
+ value: function onBufferAppended(data) {
+ if (data.parent === 'audio') {
+ switch (this.state) {
+ case State.PARSING:
+ case State.PARSED:
+ this.pendingAppending--;
+ this._checkAppendedParsed();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }, {
+ key: '_checkAppendedParsed',
+ value: function _checkAppendedParsed() {
+ //trigger handler right now
+ if (this.state === State.PARSED && this.pendingAppending === 0) {
+ var frag = this.fragCurrent,
+ stats = this.stats;
+ if (frag) {
+ this.fragPrevious = frag;
+ stats.tbuffered = performance.now();
+ this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'audio' });
+ var media = this.mediaBuffer ? this.mediaBuffer : this.media;
+ _logger.logger.log('audio buffered : ' + _timeRanges2.default.toString(media.buffered));
+ this.state = State.IDLE;
+ }
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onError',
+ value: function onError(data) {
+ var frag = data.frag;
+ // don't handle frag error not related to audio fragment
+ if (frag && frag.type !== 'audio') {
+ return;
+ }
+ switch (data.details) {
+ case _errors.ErrorDetails.FRAG_LOAD_ERROR:
+ case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:
+ if (!data.fatal) {
+ var loadError = this.fragLoadError;
+ if (loadError) {
+ loadError++;
+ } else {
+ loadError = 1;
+ }
+ var config = this.config;
+ if (loadError <= config.fragLoadingMaxRetry) {
+ this.fragLoadError = loadError;
+ // reset load counter to avoid frag loop loading error
+ frag.loadCounter = 0;
+ // exponential backoff capped to config.fragLoadingMaxRetryTimeout
+ var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);
+ _logger.logger.warn('audioStreamController: frag loading failed, retry in ' + delay + ' ms');
+ this.retryDate = performance.now() + delay;
+ // retry loading state
+ this.state = State.FRAG_LOADING_WAITING_RETRY;
+ } else {
+ _logger.logger.error('audioStreamController: ' + data.details + ' reaches max retry, redispatch as fatal ...');
+ // redispatch same error but with fatal set to true
+ data.fatal = true;
+ this.hls.trigger(_events2.default.ERROR, data);
+ this.state = State.ERROR;
+ }
+ }
+ break;
+ case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
+ case _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:
+ case _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:
+ case _errors.ErrorDetails.KEY_LOAD_ERROR:
+ case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:
+ // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received
+ if (this.state !== State.ERROR) {
+ // if fatal error, stop processing, otherwise move to IDLE to retry loading
+ this.state = data.fatal ? State.ERROR : State.IDLE;
+ _logger.logger.warn('audioStreamController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }, {
+ key: 'onBufferFlushed',
+ value: function onBufferFlushed() {
+ // increase fragment load Index to avoid frag loop loading error after buffer flush
+ this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;
+ // move to IDLE once flush complete. this should trigger new fragment loading
+ this.state = State.IDLE;
+ // reset reference to frag
+ this.fragPrevious = null;
+ this.tick();
+ }
+ }]);
+
+ return AudioStreamController;
+ }(_eventHandler2.default);
+
+ exports.default = AudioStreamController;
+
+ },{"20":20,"24":24,"25":25,"26":26,"28":28,"29":29,"39":39,"43":43,"45":45}],5:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * audio track controller
+ */
+
+ var AudioTrackController = function (_EventHandler) {
+ _inherits(AudioTrackController, _EventHandler);
+
+ function AudioTrackController(hls) {
+ _classCallCheck(this, AudioTrackController);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(AudioTrackController).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_LOADED, _events2.default.AUDIO_TRACK_LOADED));
+ }
+
+ _createClass(AudioTrackController, [{
+ key: 'destroy',
+ value: function destroy() {
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onManifestLoading',
+ value: function onManifestLoading() {
+ // reset audio tracks on manifest loading
+ this.tracks = [];
+ this.trackId = -1;
+ }
+ }, {
+ key: 'onManifestLoaded',
+ value: function onManifestLoaded(data) {
+ var _this2 = this;
+
+ var tracks = data.audioTracks || [];
+ var defaultFound = false;
+ this.tracks = tracks;
+ this.hls.trigger(_events2.default.AUDIO_TRACKS_UPDATED, { audioTracks: tracks });
+ // loop through available audio tracks and autoselect default if needed
+ var id = 0;
+ tracks.forEach(function (track) {
+ if (track.default) {
+ _this2.audioTrack = id;
+ defaultFound = true;
+ return;
+ }
+ id++;
+ });
+ if (defaultFound === false && tracks.length) {
+ _logger.logger.log('no default audio track defined, use first audio track as default');
+ this.audioTrack = 0;
+ }
+ }
+ }, {
+ key: 'onAudioTrackLoaded',
+ value: function onAudioTrackLoaded(data) {
+ if (data.id < this.tracks.length) {
+ _logger.logger.log('audioTrack ' + data.id + ' loaded');
+ this.tracks[data.id].details = data.details;
+ // check if current playlist is a live playlist
+ if (data.details.live && !this.timer) {
+ // if live playlist we will have to reload it periodically
+ // set reload period to playlist target duration
+ this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);
+ }
+ if (!data.details.live && this.timer) {
+ // playlist is not live and timer is armed : stopping it
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ }
+ }
+
+ /** get alternate audio tracks list from playlist **/
+
+ }, {
+ key: 'setAudioTrackInternal',
+ value: function setAudioTrackInternal(newId) {
+ // check if level idx is valid
+ if (newId >= 0 && newId < this.tracks.length) {
+ // stopping live reloading timer if any
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ this.trackId = newId;
+ _logger.logger.log('switching to audioTrack ' + newId);
+ var audioTrack = this.tracks[newId],
+ type = audioTrack.type,
+ url = audioTrack.url;
+ this.hls.trigger(_events2.default.AUDIO_TRACK_SWITCH, { id: newId, type: type, url: url });
+ // check if we need to load playlist for this audio Track
+ var details = audioTrack.details;
+ if (url && (details === undefined || details.live === true)) {
+ // track not retrieved yet, or live playlist we need to (re)load it
+ _logger.logger.log('(re)loading playlist for audioTrack ' + newId);
+ this.hls.trigger(_events2.default.AUDIO_TRACK_LOADING, { url: url, id: newId });
+ }
+ }
+ }
+ }, {
+ key: 'audioTracks',
+ get: function get() {
+ return this.tracks;
+ }
+
+ /** get index of the selected audio track (index in audio track lists) **/
+
+ }, {
+ key: 'audioTrack',
+ get: function get() {
+ return this.trackId;
+ }
+
+ /** select an audio track, based on its index in audio track lists**/
+ ,
+ set: function set(audioTrackId) {
+ if (this.trackId !== audioTrackId || this.tracks[audioTrackId].details === undefined) {
+ this.setAudioTrackInternal(audioTrackId);
+ }
+ }
+ }]);
+
+ return AudioTrackController;
+ }(_eventHandler2.default);
+
+ exports.default = AudioTrackController;
+
+ },{"25":25,"26":26,"43":43}],6:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _logger = _dereq_(43);
+
+ var _errors = _dereq_(24);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Buffer Controller
+ */
+
+ var BufferController = function (_EventHandler) {
+ _inherits(BufferController, _EventHandler);
+
+ function BufferController(hls) {
+ _classCallCheck(this, BufferController);
+
+ // the value that we have set mediasource.duration to
+ // (the actual duration may be tweaked slighly by the browser)
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(BufferController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_PARSED, _events2.default.BUFFER_RESET, _events2.default.BUFFER_APPENDING, _events2.default.BUFFER_CODECS, _events2.default.BUFFER_EOS, _events2.default.BUFFER_FLUSHING, _events2.default.LEVEL_UPDATED));
+
+ _this._msDuration = null;
+ // the value that we want to set mediaSource.duration to
+ _this._levelDuration = null;
+
+ // Source Buffer listeners
+ _this.onsbue = _this.onSBUpdateEnd.bind(_this);
+ _this.onsbe = _this.onSBUpdateError.bind(_this);
+ _this.pendingTracks = {};
+ return _this;
+ }
+
+ _createClass(BufferController, [{
+ key: 'destroy',
+ value: function destroy() {
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onManifestParsed',
+ value: function onManifestParsed(data) {
+ var audioExpected = data.audio,
+ videoExpected = data.video,
+ sourceBufferNb = 0;
+ // in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller
+ // sourcebuffers will be created all at once when the expected nb of tracks will be reached
+ // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
+ // it will contain the expected nb of source buffers, no need to compute it
+ if (data.altAudio && (audioExpected || videoExpected)) {
+ sourceBufferNb = (audioExpected ? 1 : 0) + (videoExpected ? 1 : 0);
+ _logger.logger.log(sourceBufferNb + ' sourceBuffer(s) expected');
+ }
+ this.sourceBufferNb = sourceBufferNb;
+ }
+ }, {
+ key: 'onMediaAttaching',
+ value: function onMediaAttaching(data) {
+ var media = this.media = data.media;
+ if (media) {
+ // setup the media source
+ var ms = this.mediaSource = new MediaSource();
+ //Media Source listeners
+ this.onmso = this.onMediaSourceOpen.bind(this);
+ this.onmse = this.onMediaSourceEnded.bind(this);
+ this.onmsc = this.onMediaSourceClose.bind(this);
+ ms.addEventListener('sourceopen', this.onmso);
+ ms.addEventListener('sourceended', this.onmse);
+ ms.addEventListener('sourceclose', this.onmsc);
+ // link video and media Source
+ media.src = URL.createObjectURL(ms);
+ }
+ }
+ }, {
+ key: 'onMediaDetaching',
+ value: function onMediaDetaching() {
+ _logger.logger.log('media source detaching');
+ var ms = this.mediaSource;
+ if (ms) {
+ if (ms.readyState === 'open') {
+ try {
+ // endOfStream could trigger exception if any sourcebuffer is in updating state
+ // we don't really care about checking sourcebuffer state here,
+ // as we are anyway detaching the MediaSource
+ // let's just avoid this exception to propagate
+ ms.endOfStream();
+ } catch (err) {
+ _logger.logger.warn('onMediaDetaching:' + err.message + ' while calling endOfStream');
+ }
+ }
+ ms.removeEventListener('sourceopen', this.onmso);
+ ms.removeEventListener('sourceended', this.onmse);
+ ms.removeEventListener('sourceclose', this.onmsc);
+
+ // Detach properly the MediaSource from the HTMLMediaElement as
+ // suggested in https://github.com/w3c/media-source/issues/53.
+ if (this.media) {
+ this.media.removeAttribute('src');
+ this.media.load();
+ }
+
+ this.mediaSource = null;
+ this.media = null;
+ this.pendingTracks = {};
+ this.sourceBuffer = {};
+ this.flushRange = [];
+ this.segments = [];
+ this.appended = 0;
+ }
+ this.onmso = this.onmse = this.onmsc = null;
+ this.hls.trigger(_events2.default.MEDIA_DETACHED);
+ }
+ }, {
+ key: 'onMediaSourceOpen',
+ value: function onMediaSourceOpen() {
+ _logger.logger.log('media source opened');
+ this.hls.trigger(_events2.default.MEDIA_ATTACHED, { media: this.media });
+ var mediaSource = this.mediaSource;
+ if (mediaSource) {
+ // once received, don't listen anymore to sourceopen event
+ mediaSource.removeEventListener('sourceopen', this.onmso);
+ }
+ this.checkPendingTracks();
+ }
+ }, {
+ key: 'checkPendingTracks',
+ value: function checkPendingTracks() {
+ // if any buffer codecs pending, check if we have enough to create sourceBuffers
+ var pendingTracks = this.pendingTracks,
+ pendingTracksNb = Object.keys(pendingTracks).length;
+ // if any pending tracks and (if nb of pending tracks gt or equal than expected nb or if unknown expected nb)
+ if (pendingTracksNb && (this.sourceBufferNb <= pendingTracksNb || this.sourceBufferNb === 0)) {
+ // ok, let's create them now !
+ this.createSourceBuffers(pendingTracks);
+ this.pendingTracks = {};
+ // append any pending segments now !
+ this.doAppending();
+ }
+ }
+ }, {
+ key: 'onMediaSourceClose',
+ value: function onMediaSourceClose() {
+ _logger.logger.log('media source closed');
+ }
+ }, {
+ key: 'onMediaSourceEnded',
+ value: function onMediaSourceEnded() {
+ _logger.logger.log('media source ended');
+ }
+ }, {
+ key: 'onSBUpdateEnd',
+ value: function onSBUpdateEnd() {
+
+ if (this._needsFlush) {
+ this.doFlush();
+ }
+
+ if (this._needsEos) {
+ this.checkEos();
+ }
+ this.appending = false;
+ this.hls.trigger(_events2.default.BUFFER_APPENDED, { parent: this.parent });
+
+ // don't append in flushing mode
+ if (!this._needsFlush) {
+ this.doAppending();
+ }
+
+ this.updateMediaElementDuration();
+ }
+ }, {
+ key: 'onSBUpdateError',
+ value: function onSBUpdateError(event) {
+ _logger.logger.error('sourceBuffer error:' + event);
+ // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
+ // this error might not always be fatal (it is fatal if decode error is set, in that case
+ // it will be followed by a mediaElement error ...)
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });
+ // we don't need to do more than that, as accordin to the spec, updateend will be fired just after
+ }
+ }, {
+ key: 'onBufferReset',
+ value: function onBufferReset() {
+ var sourceBuffer = this.sourceBuffer;
+ for (var type in sourceBuffer) {
+ var sb = sourceBuffer[type];
+ try {
+ this.mediaSource.removeSourceBuffer(sb);
+ sb.removeEventListener('updateend', this.onsbue);
+ sb.removeEventListener('error', this.onsbe);
+ } catch (err) {}
+ }
+ this.sourceBuffer = {};
+ this.flushRange = [];
+ this.segments = [];
+ this.appended = 0;
+ }
+ }, {
+ key: 'onBufferCodecs',
+ value: function onBufferCodecs(tracks) {
+ // if source buffer(s) not created yet, appended buffer tracks in this.pendingTracks
+ // if sourcebuffers already created, do nothing ...
+ if (Object.keys(this.sourceBuffer).length === 0) {
+ for (var trackName in tracks) {
+ this.pendingTracks[trackName] = tracks[trackName];
+ }
+ var mediaSource = this.mediaSource;
+ if (mediaSource && mediaSource.readyState === 'open') {
+ // try to create sourcebuffers if mediasource opened
+ this.checkPendingTracks();
+ }
+ }
+ }
+ }, {
+ key: 'createSourceBuffers',
+ value: function createSourceBuffers(tracks) {
+ var sourceBuffer = this.sourceBuffer,
+ mediaSource = this.mediaSource;
+
+ for (var trackName in tracks) {
+ if (!sourceBuffer[trackName]) {
+ var track = tracks[trackName];
+ // use levelCodec as first priority
+ var codec = track.levelCodec || track.codec;
+ var mimeType = track.container + ';codecs=' + codec;
+ _logger.logger.log('creating sourceBuffer(' + mimeType + ')');
+ try {
+ var sb = sourceBuffer[trackName] = mediaSource.addSourceBuffer(mimeType);
+ sb.addEventListener('updateend', this.onsbue);
+ sb.addEventListener('error', this.onsbe);
+ track.buffer = sb;
+ } catch (err) {
+ _logger.logger.error('error while trying to add sourceBuffer:' + err.message);
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_ADD_CODEC_ERROR, fatal: false, err: err, mimeType: mimeType });
+ }
+ }
+ }
+ this.hls.trigger(_events2.default.BUFFER_CREATED, { tracks: tracks });
+ }
+ }, {
+ key: 'onBufferAppending',
+ value: function onBufferAppending(data) {
+ if (!this._needsFlush) {
+ if (!this.segments) {
+ this.segments = [data];
+ } else {
+ this.segments.push(data);
+ }
+ this.doAppending();
+ }
+ }
+ }, {
+ key: 'onBufferAppendFail',
+ value: function onBufferAppendFail(data) {
+ _logger.logger.error('sourceBuffer error:' + data.event);
+ // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error
+ // this error might not always be fatal (it is fatal if decode error is set, in that case
+ // it will be followed by a mediaElement error ...)
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false, frag: this.fragCurrent });
+ }
+
+ // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()
+
+ }, {
+ key: 'onBufferEos',
+ value: function onBufferEos(data) {
+ var sb = this.sourceBuffer;
+ var dataType = data.type;
+ for (var type in sb) {
+ if (!dataType || type === dataType) {
+ if (!sb[type].ended) {
+ sb[type].ended = true;
+ _logger.logger.log(type + ' sourceBuffer now EOS');
+ }
+ }
+ }
+ this.checkEos();
+ }
+
+ // if all source buffers are marked as ended, signal endOfStream() to MediaSource.
+
+ }, {
+ key: 'checkEos',
+ value: function checkEos() {
+ var sb = this.sourceBuffer,
+ mediaSource = this.mediaSource;
+ if (!mediaSource || mediaSource.readyState !== 'open') {
+ this._needsEos = false;
+ return;
+ }
+ for (var type in sb) {
+ if (!sb[type].ended) {
+ return;
+ }
+ if (sb[type].updating) {
+ this._needsEos = true;
+ return;
+ }
+ }
+ _logger.logger.log('all media data available, signal endOfStream() to MediaSource and stop loading fragment');
+ //Notify the media element that it now has all of the media data
+ mediaSource.endOfStream();
+ this._needsEos = false;
+ }
+ }, {
+ key: 'onBufferFlushing',
+ value: function onBufferFlushing(data) {
+ this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: data.type });
+ // attempt flush immediatly
+ this.flushBufferCounter = 0;
+ this.doFlush();
+ }
+ }, {
+ key: 'onLevelUpdated',
+ value: function onLevelUpdated(event) {
+ var details = event.details;
+ if (details.fragments.length === 0) {
+ return;
+ }
+ this._levelDuration = details.totalduration + details.fragments[0].start;
+ this.updateMediaElementDuration();
+ }
+
+ // https://github.com/dailymotion/hls.js/issues/355
+
+ }, {
+ key: 'updateMediaElementDuration',
+ value: function updateMediaElementDuration() {
+ if (this._levelDuration === null) {
+ return;
+ }
+ var media = this.media,
+ mediaSource = this.mediaSource,
+ sourceBuffer = this.sourceBuffer;
+ if (!media || !mediaSource || !sourceBuffer || media.readyState === 0 || mediaSource.readyState !== 'open') {
+ return;
+ }
+ for (var type in sourceBuffer) {
+ if (sourceBuffer[type].updating) {
+ // can't set duration whilst a buffer is updating
+ return;
+ }
+ }
+ if (this._msDuration === null) {
+ // initialise to the value that the media source is reporting
+ this._msDuration = mediaSource.duration;
+ }
+ // this._levelDuration was the last value we set.
+ // not using mediaSource.duration as the browser may tweak this value
+ // only update mediasource duration if its value increase, this is to avoid
+ // flushing already buffered portion when switching between quality level, as they
+ if (this._levelDuration > this._msDuration) {
+ _logger.logger.log('Updating mediasource duration to ' + this._levelDuration);
+ mediaSource.duration = this._levelDuration;
+ this._msDuration = this._levelDuration;
+ }
+ }
+ }, {
+ key: 'doFlush',
+ value: function doFlush() {
+ // loop through all buffer ranges to flush
+ while (this.flushRange.length) {
+ var range = this.flushRange[0];
+ // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer
+ if (this.flushBuffer(range.start, range.end, range.type)) {
+ // range flushed, remove from flush array
+ this.flushRange.shift();
+ this.flushBufferCounter = 0;
+ } else {
+ this._needsFlush = true;
+ // avoid looping, wait for SB update end to retrigger a flush
+ return;
+ }
+ }
+ if (this.flushRange.length === 0) {
+ // everything flushed
+ this._needsFlush = false;
+
+ // let's recompute this.appended, which is used to avoid flush looping
+ var appended = 0;
+ var sourceBuffer = this.sourceBuffer;
+ for (var type in sourceBuffer) {
+ appended += sourceBuffer[type].buffered.length;
+ }
+ this.appended = appended;
+ this.hls.trigger(_events2.default.BUFFER_FLUSHED);
+ }
+ }
+ }, {
+ key: 'doAppending',
+ value: function doAppending() {
+ var hls = this.hls,
+ sourceBuffer = this.sourceBuffer,
+ segments = this.segments;
+ if (Object.keys(sourceBuffer).length) {
+ if (this.media.error) {
+ this.segments = [];
+ _logger.logger.error('trying to append although a media error occured, flush segment and abort');
+ return;
+ }
+ if (this.appending) {
+ //logger.log(`sb appending in progress`);
+ return;
+ }
+ if (segments && segments.length) {
+ var segment = segments.shift();
+ try {
+ var type = segment.type;
+ if (sourceBuffer[type]) {
+ // reset sourceBuffer ended flag before appending segment
+ sourceBuffer[type].ended = false;
+ //logger.log(`appending ${segment.content} ${segment.type} SB, size:${segment.data.length}, ${segment.parent}`);
+ this.parent = segment.parent;
+ sourceBuffer[type].appendBuffer(segment.data);
+ this.appendError = 0;
+ this.appended++;
+ this.appending = true;
+ } else {
+ // in case we don't have any source buffer matching with this segment type,
+ // it means that Mediasource fails to create sourcebuffer
+ // discard this segment, and trigger update end
+ this.onSBUpdateEnd();
+ }
+ } catch (err) {
+ // in case any error occured while appending, put back segment in segments table
+ _logger.logger.error('error while trying to append buffer:' + err.message);
+ segments.unshift(segment);
+ var event = { type: _errors.ErrorTypes.MEDIA_ERROR };
+ if (err.code !== 22) {
+ if (this.appendError) {
+ this.appendError++;
+ } else {
+ this.appendError = 1;
+ }
+ event.details = _errors.ErrorDetails.BUFFER_APPEND_ERROR;
+ event.frag = this.fragCurrent;
+ /* with UHD content, we could get loop of quota exceeded error until
+ browser is able to evict some data from sourcebuffer. retrying help recovering this
+ */
+ if (this.appendError > hls.config.appendErrorMaxRetry) {
+ _logger.logger.log('fail ' + hls.config.appendErrorMaxRetry + ' times to append segment in sourceBuffer');
+ segments = [];
+ event.fatal = true;
+ hls.trigger(_events2.default.ERROR, event);
+ return;
+ } else {
+ event.fatal = false;
+ hls.trigger(_events2.default.ERROR, event);
+ }
+ } else {
+ // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
+ // let's stop appending any segments, and report BUFFER_FULL_ERROR error
+ this.segments = [];
+ event.details = _errors.ErrorDetails.BUFFER_FULL_ERROR;
+ hls.trigger(_events2.default.ERROR, event);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ flush specified buffered range,
+ return true once range has been flushed.
+ as sourceBuffer.remove() is asynchronous, flushBuffer will be retriggered on sourceBuffer update end
+ */
+
+ }, {
+ key: 'flushBuffer',
+ value: function flushBuffer(startOffset, endOffset, typeIn) {
+ var sb,
+ i,
+ bufStart,
+ bufEnd,
+ flushStart,
+ flushEnd,
+ sourceBuffer = this.sourceBuffer;
+ if (Object.keys(sourceBuffer).length) {
+ _logger.logger.log('flushBuffer,pos/start/end: ' + this.media.currentTime + '/' + startOffset + '/' + endOffset);
+ // safeguard to avoid infinite looping : don't try to flush more than the nb of appended segments
+ if (this.flushBufferCounter < this.appended) {
+ for (var type in sourceBuffer) {
+ // check if sourcebuffer type is defined (typeIn): if yes, let's only flush this one
+ // if no, let's flush all sourcebuffers
+ if (typeIn && type !== typeIn) {
+ continue;
+ }
+ sb = sourceBuffer[type];
+ // we are going to flush buffer, mark source buffer as 'not ended'
+ sb.ended = false;
+ if (!sb.updating) {
+ for (i = 0; i < sb.buffered.length; i++) {
+ bufStart = sb.buffered.start(i);
+ bufEnd = sb.buffered.end(i);
+ // workaround firefox not able to properly flush multiple buffered range.
+ if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1 && endOffset === Number.POSITIVE_INFINITY) {
+ flushStart = startOffset;
+ flushEnd = endOffset;
+ } else {
+ flushStart = Math.max(bufStart, startOffset);
+ flushEnd = Math.min(bufEnd, endOffset);
+ }
+ /* sometimes sourcebuffer.remove() does not flush
+ the exact expected time range.
+ to avoid rounding issues/infinite loop,
+ only flush buffer range of length greater than 500ms.
+ */
+ if (Math.min(flushEnd, bufEnd) - flushStart > 0.5) {
+ this.flushBufferCounter++;
+ _logger.logger.log('flush ' + type + ' [' + flushStart + ',' + flushEnd + '], of [' + bufStart + ',' + bufEnd + '], pos:' + this.media.currentTime);
+ sb.remove(flushStart, flushEnd);
+ return false;
+ }
+ }
+ } else {
+ //logger.log('abort ' + type + ' append in progress');
+ // this will abort any appending in progress
+ //sb.abort();
+ _logger.logger.warn('cannot flush, sb updating in progress');
+ return false;
+ }
+ }
+ } else {
+ _logger.logger.warn('abort flushing too many retries');
+ }
+ _logger.logger.log('buffer flushed');
+ }
+ // everything flushed !
+ return true;
+ }
+ }]);
+
+ return BufferController;
+ }(_eventHandler2.default);
+
+ exports.default = BufferController;
+
+ },{"24":24,"25":25,"26":26,"43":43}],7:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * cap stream level to media size dimension controller
+ */
+
+ var CapLevelController = function (_EventHandler) {
+ _inherits(CapLevelController, _EventHandler);
+
+ function CapLevelController(hls) {
+ _classCallCheck(this, CapLevelController);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(CapLevelController).call(this, hls, _events2.default.FPS_DROP_LEVEL_CAPPING, _events2.default.MEDIA_ATTACHING, _events2.default.MANIFEST_PARSED));
+ }
+
+ _createClass(CapLevelController, [{
+ key: 'destroy',
+ value: function destroy() {
+ if (this.hls.config.capLevelToPlayerSize) {
+ this.media = this.restrictedLevels = null;
+ this.autoLevelCapping = Number.POSITIVE_INFINITY;
+ if (this.timer) {
+ this.timer = clearInterval(this.timer);
+ }
+ }
+ }
+ }, {
+ key: 'onFpsDropLevelCapping',
+ value: function onFpsDropLevelCapping(data) {
+ if (!this.restrictedLevels) {
+ this.restrictedLevels = [];
+ }
+ if (!this.isLevelRestricted(data.droppedLevel)) {
+ this.restrictedLevels.push(data.droppedLevel);
+ }
+ }
+ }, {
+ key: 'onMediaAttaching',
+ value: function onMediaAttaching(data) {
+ this.media = data.media instanceof HTMLVideoElement ? data.media : null;
+ }
+ }, {
+ key: 'onManifestParsed',
+ value: function onManifestParsed(data) {
+ if (this.hls.config.capLevelToPlayerSize) {
+ this.autoLevelCapping = Number.POSITIVE_INFINITY;
+ this.levels = data.levels;
+ this.hls.firstLevel = this.getMaxLevel(data.firstLevel);
+ clearInterval(this.timer);
+ this.timer = setInterval(this.detectPlayerSize.bind(this), 1000);
+ this.detectPlayerSize();
+ }
+ }
+ }, {
+ key: 'detectPlayerSize',
+ value: function detectPlayerSize() {
+ if (this.media) {
+ var levelsLength = this.levels ? this.levels.length : 0;
+ if (levelsLength) {
+ this.hls.autoLevelCapping = this.getMaxLevel(levelsLength - 1);
+ if (this.hls.autoLevelCapping > this.autoLevelCapping) {
+ // if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch
+ // usually happen when the user go to the fullscreen mode.
+ this.hls.streamController.nextLevelSwitch();
+ }
+ this.autoLevelCapping = this.hls.autoLevelCapping;
+ }
+ }
+ }
+
+ /*
+ * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)
+ */
+
+ }, {
+ key: 'getMaxLevel',
+ value: function getMaxLevel(capLevelIndex) {
+ var result = 0,
+ i = void 0,
+ level = void 0,
+ mWidth = this.mediaWidth,
+ mHeight = this.mediaHeight,
+ lWidth = 0,
+ lHeight = 0;
+
+ for (i = 0; i <= capLevelIndex; i++) {
+ level = this.levels[i];
+ if (this.isLevelRestricted(i)) {
+ break;
+ }
+ result = i;
+ lWidth = level.width;
+ lHeight = level.height;
+ if (mWidth <= lWidth || mHeight <= lHeight) {
+ break;
+ }
+ }
+ return result;
+ }
+ }, {
+ key: 'isLevelRestricted',
+ value: function isLevelRestricted(level) {
+ return this.restrictedLevels && this.restrictedLevels.indexOf(level) !== -1 ? true : false;
+ }
+ }, {
+ key: 'contentScaleFactor',
+ get: function get() {
+ var pixelRatio = 1;
+ try {
+ pixelRatio = window.devicePixelRatio;
+ } catch (e) {}
+ return pixelRatio;
+ }
+ }, {
+ key: 'mediaWidth',
+ get: function get() {
+ var width = void 0;
+ if (this.media) {
+ width = this.media.width || this.media.clientWidth || this.media.offsetWidth;
+ width *= this.contentScaleFactor;
+ }
+ return width;
+ }
+ }, {
+ key: 'mediaHeight',
+ get: function get() {
+ var height = void 0;
+ if (this.media) {
+ height = this.media.height || this.media.clientHeight || this.media.offsetHeight;
+ height *= this.contentScaleFactor;
+ }
+ return height;
+ }
+ }]);
+
+ return CapLevelController;
+ }(_eventHandler2.default);
+
+ exports.default = CapLevelController;
+
+ },{"25":25,"26":26}],8:[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; }; }(); /*
+ * EWMA Bandwidth Estimator
+ * - heavily inspired from shaka-player
+ * Tracks bandwidth samples and estimates available bandwidth.
+ * Based on the minimum of two exponentially-weighted moving averages with
+ * different half-lives.
+ */
+
+ var _ewma = _dereq_(42);
+
+ var _ewma2 = _interopRequireDefault(_ewma);
+
+ 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 EwmaBandWidthEstimator = function () {
+ function EwmaBandWidthEstimator(hls, slow, fast, defaultEstimate) {
+ _classCallCheck(this, EwmaBandWidthEstimator);
+
+ this.hls = hls;
+ this.defaultEstimate_ = defaultEstimate;
+ this.minWeight_ = 0.001;
+ this.minDelayMs_ = 50;
+ this.slow_ = new _ewma2.default(slow);
+ this.fast_ = new _ewma2.default(fast);
+ }
+
+ _createClass(EwmaBandWidthEstimator, [{
+ key: 'sample',
+ value: function sample(durationMs, numBytes) {
+ durationMs = Math.max(durationMs, this.minDelayMs_);
+ var bandwidth = 8000 * numBytes / durationMs,
+
+ //console.log('instant bw:'+ Math.round(bandwidth));
+ // we weight sample using loading duration....
+ weight = durationMs / 1000;
+ this.fast_.sample(weight, bandwidth);
+ this.slow_.sample(weight, bandwidth);
+ }
+ }, {
+ key: 'canEstimate',
+ value: function canEstimate() {
+ var fast = this.fast_;
+ return fast && fast.getTotalWeight() >= this.minWeight_;
+ }
+ }, {
+ key: 'getEstimate',
+ value: function getEstimate() {
+ if (this.canEstimate()) {
+ //console.log('slow estimate:'+ Math.round(this.slow_.getEstimate()));
+ //console.log('fast estimate:'+ Math.round(this.fast_.getEstimate()));
+ // Take the minimum of these two estimates. This should have the effect of
+ // adapting down quickly, but up more slowly.
+ return Math.min(this.fast_.getEstimate(), this.slow_.getEstimate());
+ } else {
+ return this.defaultEstimate_;
+ }
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy() {}
+ }]);
+
+ return EwmaBandWidthEstimator;
+ }();
+
+ exports.default = EwmaBandWidthEstimator;
+
+ },{"42":42}],9:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * FPS Controller
+ */
+
+ var FPSController = function (_EventHandler) {
+ _inherits(FPSController, _EventHandler);
+
+ function FPSController(hls) {
+ _classCallCheck(this, FPSController);
+
+ return _possibleConstructorReturn(this, Object.getPrototypeOf(FPSController).call(this, hls, _events2.default.MEDIA_ATTACHING));
+ }
+
+ _createClass(FPSController, [{
+ key: 'destroy',
+ value: function destroy() {
+ if (this.timer) {
+ clearInterval(this.timer);
+ }
+ this.isVideoPlaybackQualityAvailable = false;
+ }
+ }, {
+ key: 'onMediaAttaching',
+ value: function onMediaAttaching(data) {
+ if (this.hls.config.capLevelOnFPSDrop) {
+ this.video = data.media instanceof HTMLVideoElement ? data.media : null;
+ if (typeof this.video.getVideoPlaybackQuality === 'function') {
+ this.isVideoPlaybackQualityAvailable = true;
+ }
+ clearInterval(this.timer);
+ this.timer = setInterval(this.checkFPSInterval.bind(this), this.hls.config.fpsDroppedMonitoringPeriod);
+ }
+ }
+ }, {
+ key: 'checkFPS',
+ value: function checkFPS(video, decodedFrames, droppedFrames) {
+ var currentTime = performance.now();
+ if (decodedFrames) {
+ if (this.lastTime) {
+ var currentPeriod = currentTime - this.lastTime,
+ currentDropped = droppedFrames - this.lastDroppedFrames,
+ currentDecoded = decodedFrames - this.lastDecodedFrames,
+ droppedFPS = 1000 * currentDropped / currentPeriod;
+ this.hls.trigger(_events2.default.FPS_DROP, { currentDropped: currentDropped, currentDecoded: currentDecoded, totalDroppedFrames: droppedFrames });
+ if (droppedFPS > 0) {
+ //logger.log('checkFPS : droppedFPS/decodedFPS:' + droppedFPS/(1000 * currentDecoded / currentPeriod));
+ if (currentDropped > this.hls.config.fpsDroppedMonitoringThreshold * currentDecoded) {
+ var currentLevel = this.hls.currentLevel;
+ _logger.logger.warn('drop FPS ratio greater than max allowed value for currentLevel: ' + currentLevel);
+ if (currentLevel > 0 && (this.hls.autoLevelCapping === -1 || this.hls.autoLevelCapping >= currentLevel)) {
+ currentLevel = currentLevel - 1;
+ this.hls.trigger(_events2.default.FPS_DROP_LEVEL_CAPPING, { level: currentLevel, droppedLevel: this.hls.currentLevel });
+ this.hls.autoLevelCapping = currentLevel;
+ this.hls.streamController.nextLevelSwitch();
+ }
+ }
+ }
+ }
+ this.lastTime = currentTime;
+ this.lastDroppedFrames = droppedFrames;
+ this.lastDecodedFrames = decodedFrames;
+ }
+ }
+ }, {
+ key: 'checkFPSInterval',
+ value: function checkFPSInterval() {
+ if (this.video) {
+ if (this.isVideoPlaybackQualityAvailable) {
+ var videoPlaybackQuality = this.video.getVideoPlaybackQuality();
+ this.checkFPS(this.video, videoPlaybackQuality.totalVideoFrames, videoPlaybackQuality.droppedVideoFrames);
+ } else {
+ this.checkFPS(this.video, this.video.webkitDecodedFrameCount, this.video.webkitDroppedFrameCount);
+ }
+ }
+ }
+ }]);
+
+ return FPSController;
+ }(_eventHandler2.default);
+
+ exports.default = FPSController;
+
+ },{"25":25,"26":26,"43":43}],10:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _logger = _dereq_(43);
+
+ var _errors = _dereq_(24);
+
+ var _bufferHelper = _dereq_(28);
+
+ var _bufferHelper2 = _interopRequireDefault(_bufferHelper);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Level Controller
+ */
+
+ var LevelController = function (_EventHandler) {
+ _inherits(LevelController, _EventHandler);
+
+ function LevelController(hls) {
+ _classCallCheck(this, LevelController);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(LevelController).call(this, hls, _events2.default.MANIFEST_LOADED, _events2.default.LEVEL_LOADED, _events2.default.ERROR));
+
+ _this.ontick = _this.tick.bind(_this);
+ _this._manualLevel = _this._autoLevelCapping = -1;
+ return _this;
+ }
+
+ _createClass(LevelController, [{
+ key: 'destroy',
+ value: function destroy() {
+ if (this.timer) {
+ clearTimeout(this.timer);
+ this.timer = null;
+ }
+ this._manualLevel = -1;
+ }
+ }, {
+ key: 'startLoad',
+ value: function startLoad() {
+ this.canload = true;
+ // speed up live playlist refresh if timer exists
+ if (this.timer) {
+ this.tick();
+ }
+ }
+ }, {
+ key: 'stopLoad',
+ value: function stopLoad() {
+ this.canload = false;
+ }
+ }, {
+ key: 'onManifestLoaded',
+ value: function onManifestLoaded(data) {
+ var levels0 = [],
+ levels = [],
+ bitrateStart,
+ i,
+ bitrateSet = {},
+ videoCodecFound = false,
+ audioCodecFound = false,
+ hls = this.hls;
+
+ // regroup redundant level together
+ data.levels.forEach(function (level) {
+ if (level.videoCodec) {
+ videoCodecFound = true;
+ }
+ if (level.audioCodec || level.attrs && level.attrs.AUDIO) {
+ audioCodecFound = true;
+ }
+ var redundantLevelId = bitrateSet[level.bitrate];
+ if (redundantLevelId === undefined) {
+ bitrateSet[level.bitrate] = levels0.length;
+ level.url = [level.url];
+ level.urlId = 0;
+ levels0.push(level);
+ } else {
+ levels0[redundantLevelId].url.push(level.url);
+ }
+ });
+
+ // remove audio-only level if we also have levels with audio+video codecs signalled
+ if (videoCodecFound && audioCodecFound) {
+ levels0.forEach(function (level) {
+ if (level.videoCodec) {
+ levels.push(level);
+ }
+ });
+ } else {
+ levels = levels0;
+ }
+
+ // only keep level with supported audio/video codecs
+ levels = levels.filter(function (level) {
+ var checkSupportedAudio = function checkSupportedAudio(codec) {
+ return MediaSource.isTypeSupported('audio/mp4;codecs=' + codec);
+ };
+ var checkSupportedVideo = function checkSupportedVideo(codec) {
+ return MediaSource.isTypeSupported('video/mp4;codecs=' + codec);
+ };
+ var audioCodec = level.audioCodec,
+ videoCodec = level.videoCodec;
+
+ return (!audioCodec || checkSupportedAudio(audioCodec)) && (!videoCodec || checkSupportedVideo(videoCodec));
+ });
+
+ if (levels.length) {
+ // start bitrate is the first bitrate of the manifest
+ bitrateStart = levels[0].bitrate;
+ // sort level on bitrate
+ levels.sort(function (a, b) {
+ return a.bitrate - b.bitrate;
+ });
+ this._levels = levels;
+ // find index of first level in sorted levels
+ for (i = 0; i < levels.length; i++) {
+ if (levels[i].bitrate === bitrateStart) {
+ this._firstLevel = i;
+ _logger.logger.log('manifest loaded,' + levels.length + ' level(s) found, first bitrate:' + bitrateStart);
+ break;
+ }
+ }
+ hls.trigger(_events2.default.MANIFEST_PARSED, { levels: this._levels, firstLevel: this._firstLevel, stats: data.stats, audio: audioCodecFound, video: videoCodecFound, altAudio: data.audioTracks.length > 0 });
+ } else {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR, fatal: true, url: hls.url, reason: 'no level with compatible codecs found in manifest' });
+ }
+ return;
+ }
+ }, {
+ key: 'setLevelInternal',
+ value: function setLevelInternal(newLevel) {
+ var levels = this._levels;
+ // check if level idx is valid
+ if (newLevel >= 0 && newLevel < levels.length) {
+ // stopping live reloading timer if any
+ if (this.timer) {
+ clearTimeout(this.timer);
+ this.timer = null;
+ }
+ if (this._level !== newLevel) {
+ _logger.logger.log('switching to level ' + newLevel);
+ this._level = newLevel;
+ }
+ this.hls.trigger(_events2.default.LEVEL_SWITCH, { level: newLevel });
+ var level = levels[newLevel],
+ levelDetails = level.details;
+ // check if we need to load playlist for this level
+ if (!levelDetails || levelDetails.live === true) {
+ // level not retrieved yet, or live playlist we need to (re)load it
+ var urlId = level.urlId;
+ this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: newLevel, id: urlId });
+ }
+ } else {
+ // invalid level id given, trigger error
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.LEVEL_SWITCH_ERROR, level: newLevel, fatal: false, reason: 'invalid level idx' });
+ }
+ }
+ }, {
+ key: 'onError',
+ value: function onError(data) {
+ if (data.fatal) {
+ return;
+ }
+
+ var details = data.details,
+ hls = this.hls,
+ levelId = void 0,
+ level = void 0,
+ levelError = false;
+ // try to recover not fatal errors
+ switch (details) {
+ case _errors.ErrorDetails.FRAG_LOAD_ERROR:
+ case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:
+ case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
+ case _errors.ErrorDetails.KEY_LOAD_ERROR:
+ case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:
+ levelId = data.frag.level;
+ break;
+ case _errors.ErrorDetails.LEVEL_LOAD_ERROR:
+ case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:
+ levelId = data.context.level;
+ levelError = true;
+ break;
+ default:
+ break;
+ }
+ /* try to switch to a redundant stream if any available.
+ * if no redundant stream available, emergency switch down (if in auto mode and current level not 0)
+ * otherwise, we cannot recover this network error ...
+ */
+ if (levelId !== undefined) {
+ level = this._levels[levelId];
+ if (level.urlId < level.url.length - 1) {
+ level.urlId++;
+ level.details = undefined;
+ _logger.logger.warn('level controller,' + details + ' for level ' + levelId + ': switching to redundant stream id ' + level.urlId);
+ } else {
+ // we could try to recover if in auto mode and current level not lowest level (0)
+ var recoverable = this._manualLevel === -1 && levelId;
+ if (recoverable) {
+ _logger.logger.warn('level controller,' + details + ': emergency switch-down for next fragment');
+ hls.abrController.nextAutoLevel = 0;
+ } else if (level && level.details && level.details.live) {
+ _logger.logger.warn('level controller,' + details + ' on live stream, discard');
+ if (levelError) {
+ // reset this._level so that another call to set level() will retrigger a frag load
+ this._level = undefined;
+ }
+ // other errors are handled by stream controller
+ } else if (details === _errors.ErrorDetails.LEVEL_LOAD_ERROR || details === _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT) {
+ var _hls = this.hls,
+ media = _hls.media,
+
+ // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end
+ mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);
+ if (mediaBuffered) {
+ var retryDelay = _hls.config.levelLoadingRetryDelay;
+ _logger.logger.warn('level controller,' + details + ', but media buffered, retry in ' + retryDelay + 'ms');
+ this.timer = setTimeout(this.ontick, retryDelay);
+ } else {
+ _logger.logger.error('cannot recover ' + details + ' error');
+ this._level = undefined;
+ // stopping live reloading timer if any
+ if (this.timer) {
+ clearTimeout(this.timer);
+ this.timer = null;
+ }
+ // redispatch same error but with fatal set to true
+ data.fatal = true;
+ _hls.trigger(_events2.default.ERROR, data);
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'onLevelLoaded',
+ value: function onLevelLoaded(data) {
+ // only process level loaded events matching with expected level
+ if (data.level === this._level) {
+ var newDetails = data.details;
+ // if current playlist is a live playlist, arm a timer to reload it
+ if (newDetails.live) {
+ var reloadInterval = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration),
+ curLevel = this._levels[data.level],
+ curDetails = curLevel.details;
+ if (curDetails && newDetails.endSN === curDetails.endSN) {
+ // follow HLS Spec, If the client reloads a Playlist file and finds that it has not
+ // changed then it MUST wait for a period of one-half the target
+ // duration before retrying.
+ reloadInterval /= 2;
+ _logger.logger.log('same live playlist, reload twice faster');
+ }
+ // decrement reloadInterval with level loading delay
+ reloadInterval -= performance.now() - data.stats.trequest;
+ // in any case, don't reload more than every second
+ reloadInterval = Math.max(1000, Math.round(reloadInterval));
+ _logger.logger.log('live playlist, reload in ' + reloadInterval + ' ms');
+ this.timer = setTimeout(this.ontick, reloadInterval);
+ } else {
+ this.timer = null;
+ }
+ }
+ }
+ }, {
+ key: 'tick',
+ value: function tick() {
+ var levelId = this._level;
+ if (levelId !== undefined && this.canload) {
+ var level = this._levels[levelId],
+ urlId = level.urlId;
+ this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: levelId, id: urlId });
+ }
+ }
+ }, {
+ key: 'levels',
+ get: function get() {
+ return this._levels;
+ }
+ }, {
+ key: 'level',
+ get: function get() {
+ return this._level;
+ },
+ set: function set(newLevel) {
+ var levels = this._levels;
+ if (levels && levels.length > newLevel) {
+ if (this._level !== newLevel || levels[newLevel].details === undefined) {
+ this.setLevelInternal(newLevel);
+ }
+ }
+ }
+ }, {
+ key: 'manualLevel',
+ get: function get() {
+ return this._manualLevel;
+ },
+ set: function set(newLevel) {
+ this._manualLevel = newLevel;
+ if (this._startLevel === undefined) {
+ this._startLevel = newLevel;
+ }
+ if (newLevel !== -1) {
+ this.level = newLevel;
+ }
+ }
+ }, {
+ key: 'firstLevel',
+ get: function get() {
+ return this._firstLevel;
+ },
+ set: function set(newLevel) {
+ this._firstLevel = newLevel;
+ }
+ }, {
+ key: 'startLevel',
+ get: function get() {
+ // hls.startLevel takes precedence over config.startLevel
+ // if none of these values are defined, fallback on this._firstLevel (first quality level appearing in variant manifest)
+ if (this._startLevel === undefined) {
+ var configStartLevel = this.hls.config.startLevel;
+ if (configStartLevel !== undefined) {
+ return configStartLevel;
+ } else {
+ return this._firstLevel;
+ }
+ } else {
+ return this._startLevel;
+ }
+ },
+ set: function set(newLevel) {
+ this._startLevel = newLevel;
+ }
+ }, {
+ key: 'nextLoadLevel',
+ get: function get() {
+ if (this._manualLevel !== -1) {
+ return this._manualLevel;
+ } else {
+ return this.hls.abrController.nextAutoLevel;
+ }
+ },
+ set: function set(nextLevel) {
+ this.level = nextLevel;
+ if (this._manualLevel === -1) {
+ this.hls.abrController.nextAutoLevel = nextLevel;
+ }
+ }
+ }]);
+
+ return LevelController;
+ }(_eventHandler2.default);
+
+ exports.default = LevelController;
+
+ },{"24":24,"25":25,"26":26,"28":28,"43":43}],11:[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 _binarySearch = _dereq_(39);
+
+ var _binarySearch2 = _interopRequireDefault(_binarySearch);
+
+ var _bufferHelper = _dereq_(28);
+
+ var _bufferHelper2 = _interopRequireDefault(_bufferHelper);
+
+ var _demuxer = _dereq_(20);
+
+ var _demuxer2 = _interopRequireDefault(_demuxer);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _levelHelper = _dereq_(29);
+
+ var _levelHelper2 = _interopRequireDefault(_levelHelper);
+
+ var _timeRanges = _dereq_(45);
+
+ var _timeRanges2 = _interopRequireDefault(_timeRanges);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Stream Controller
+ */
+
+ var State = {
+ STOPPED: 'STOPPED',
+ IDLE: 'IDLE',
+ PAUSED: 'PAUSED',
+ KEY_LOADING: 'KEY_LOADING',
+ FRAG_LOADING: 'FRAG_LOADING',
+ FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',
+ WAITING_LEVEL: 'WAITING_LEVEL',
+ PARSING: 'PARSING',
+ PARSED: 'PARSED',
+ ENDED: 'ENDED',
+ ERROR: 'ERROR'
+ };
+
+ var StreamController = function (_EventHandler) {
+ _inherits(StreamController, _EventHandler);
+
+ function StreamController(hls) {
+ _classCallCheck(this, StreamController);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(StreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_PARSED, _events2.default.LEVEL_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_LOAD_EMERGENCY_ABORTED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));
+
+ _this.config = hls.config;
+ _this.audioCodecSwap = false;
+ _this.ticks = 0;
+ _this.ontick = _this.tick.bind(_this);
+ return _this;
+ }
+
+ _createClass(StreamController, [{
+ key: 'destroy',
+ value: function destroy() {
+ this.stopLoad();
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ _eventHandler2.default.prototype.destroy.call(this);
+ this.state = State.STOPPED;
+ }
+ }, {
+ key: 'startLoad',
+ value: function startLoad(startPosition) {
+ if (this.levels) {
+ var media = this.media,
+ lastCurrentTime = this.lastCurrentTime,
+ hls = this.hls;
+ this.stopLoad();
+ if (!this.timer) {
+ this.timer = setInterval(this.ontick, 100);
+ }
+ this.level = -1;
+ this.fragLoadError = 0;
+ if (media && lastCurrentTime > 0) {
+ _logger.logger.log('configure startPosition @' + lastCurrentTime.toFixed(3));
+ if (!this.lastPaused) {
+ _logger.logger.log('resuming video');
+ media.play();
+ }
+ } else {
+ this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;
+ }
+ if (!this.startFragRequested) {
+ // determine load level
+ var startLevel = hls.startLevel;
+ if (startLevel === -1) {
+ // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level
+ startLevel = 0;
+ this.bitrateTest = true;
+ }
+ // set new level to playlist loader : this will trigger start level load
+ // hls.nextLoadLevel remains until it is set to a new value or until a new frag is successfully loaded
+ this.level = hls.nextLoadLevel = startLevel;
+ this.loadedmetadata = false;
+ }
+ this.state = State.IDLE;
+ this.nextLoadPosition = this.startPosition = this.lastCurrentTime;
+ this.tick();
+ } else {
+ _logger.logger.warn('cannot start loading as manifest not parsed yet');
+ this.state = State.STOPPED;
+ }
+ }
+ }, {
+ key: 'stopLoad',
+ value: function stopLoad() {
+ var frag = this.fragCurrent;
+ if (frag) {
+ if (frag.loader) {
+ frag.loader.abort();
+ }
+ this.fragCurrent = null;
+ }
+ this.fragPrevious = null;
+ if (this.demuxer) {
+ this.demuxer.destroy();
+ this.demuxer = null;
+ }
+ this.state = State.STOPPED;
+ }
+ }, {
+ key: 'tick',
+ value: function tick() {
+ this.ticks++;
+ if (this.ticks === 1) {
+ this.doTick();
+ if (this.ticks > 1) {
+ setTimeout(this.tick, 1);
+ }
+ this.ticks = 0;
+ }
+ }
+ }, {
+ key: 'doTick',
+ value: function doTick() {
+ switch (this.state) {
+ case State.ERROR:
+ //don't do anything in error state to avoid breaking further ...
+ case State.PAUSED:
+ //don't do anything in paused state either ...
+ break;
+ case State.IDLE:
+ // when this returns false there was an error and we shall return immediatly
+ // from current tick
+ if (!this._doTickIdle()) {
+ return;
+ }
+ break;
+ case State.WAITING_LEVEL:
+ var level = this.levels[this.level];
+ // check if playlist is already loaded
+ if (level && level.details) {
+ this.state = State.IDLE;
+ }
+ break;
+ case State.FRAG_LOADING_WAITING_RETRY:
+ var now = performance.now();
+ var retryDate = this.retryDate;
+ // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading
+ if (!retryDate || now >= retryDate || this.media && this.media.seeking) {
+ _logger.logger.log('mediaController: retryDate reached, switch back to IDLE state');
+ this.state = State.IDLE;
+ }
+ break;
+ case State.ERROR:
+ case State.PAUSED:
+ case State.STOPPED:
+ case State.FRAG_LOADING:
+ case State.PARSING:
+ case State.PARSED:
+ case State.ENDED:
+ break;
+ default:
+ break;
+ }
+ // check buffer
+ this._checkBuffer();
+ // check/update current fragment
+ this._checkFragmentChanged();
+ }
+
+ // Ironically the "idle" state is the on we do the most logic in it seems ....
+ // NOTE: Maybe we could rather schedule a check for buffer length after half of the currently
+ // played segment, or on pause/play/seek instead of naively checking every 100ms?
+
+ }, {
+ key: '_doTickIdle',
+ value: function _doTickIdle() {
+ var hls = this.hls,
+ config = hls.config,
+ media = this.media;
+
+ // if video not attached AND
+ // start fragment already requested OR start frag prefetch disable
+ // exit loop
+ // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop
+ if (!media && (this.startFragRequested || !config.startFragPrefetch)) {
+ return true;
+ }
+
+ // if we have not yet loaded any fragment, start loading from start position
+ var pos = void 0;
+ if (this.loadedmetadata) {
+ pos = media.currentTime;
+ } else {
+ pos = this.nextLoadPosition;
+ }
+ // determine next load level
+ var level = hls.nextLoadLevel;
+
+ // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s
+ var maxBufLen = void 0;
+ if (this.levels[level].hasOwnProperty('bitrate')) {
+ maxBufLen = Math.max(8 * config.maxBufferSize / this.levels[level].bitrate, config.maxBufferLength);
+ } else {
+ maxBufLen = config.maxBufferLength;
+ }
+ maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);
+
+ // determine next candidate fragment to be loaded, based on current position and end of buffer position
+ // ensure up to `config.maxMaxBufferLength` of buffer upfront
+
+ var bufferInfo = _bufferHelper2.default.bufferInfo(this.mediaBuffer ? this.mediaBuffer : media, pos, config.maxBufferHole),
+ bufferLen = bufferInfo.len;
+ // Stay idle if we are still with buffer margins
+ if (bufferLen >= maxBufLen) {
+ return true;
+ }
+
+ // if buffer length is less than maxBufLen try to load a new fragment ...
+ _logger.logger.trace('buffer length of ' + bufferLen.toFixed(3) + ' is below max of ' + maxBufLen.toFixed(3) + '. checking for more payload ...');
+
+ // set next load level : this will trigger a playlist load if needed
+ hls.nextLoadLevel = level;
+ this.level = level;
+
+ var levelDetails = this.levels[level].details;
+ // if level info not retrieved yet, switch state and wait for level retrieval
+ // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load
+ // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)
+ if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) {
+ this.state = State.WAITING_LEVEL;
+ return true;
+ }
+
+ // we just got done loading the final fragment, check if we need to finalize media stream
+ var fragPrevious = this.fragPrevious;
+ if (!levelDetails.live && fragPrevious && fragPrevious.sn === levelDetails.endSN) {
+ // if (we are not seeking AND current position is buffered) OR (if we are seeking but everything (almost) til the end is buffered), let's signal eos
+ // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching
+ // between different renditions. using half frag duration should help cope with these cases.
+ if (!media.seeking && bufferInfo.len || media.duration - bufferInfo.end <= fragPrevious.duration / 2) {
+ // Finalize the media stream
+ var data = {};
+ if (this.altAudio) {
+ data.type = 'video';
+ }
+ this.hls.trigger(_events2.default.BUFFER_EOS, data);
+ this.state = State.ENDED;
+ return true;
+ }
+ }
+
+ // if we have the levelDetails for the selected variant, lets continue enrichen our stream (load keys/fragments or trigger EOS, etc..)
+ return this._fetchPayloadOrEos({ pos: pos, bufferInfo: bufferInfo, levelDetails: levelDetails });
+ }
+ }, {
+ key: '_fetchPayloadOrEos',
+ value: function _fetchPayloadOrEos(_ref) {
+ var pos = _ref.pos;
+ var bufferInfo = _ref.bufferInfo;
+ var levelDetails = _ref.levelDetails;
+
+ var fragPrevious = this.fragPrevious,
+ level = this.level,
+ fragments = levelDetails.fragments,
+ fragLen = fragments.length;
+
+ // empty playlist
+ if (fragLen === 0) {
+ return false;
+ }
+
+ // find fragment index, contiguous with end of buffer position
+ var start = fragments[0].start,
+ end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,
+ bufferEnd = bufferInfo.end,
+ frag = void 0;
+
+ // in case of live playlist we need to ensure that requested position is not located before playlist start
+ if (levelDetails.live) {
+ frag = this._ensureFragmentAtLivePoint({ levelDetails: levelDetails, bufferEnd: bufferEnd, start: start, end: end, fragPrevious: fragPrevious, fragments: fragments, fragLen: fragLen });
+ // if it explicitely returns null don't load any fragment and exit function now
+ if (frag === null) {
+ return false;
+ }
+ } else {
+ // VoD playlist: if bufferEnd before start of playlist, load first fragment
+ if (bufferEnd < start) {
+ frag = fragments[0];
+ }
+ }
+ if (!frag) {
+ frag = this._findFragment({ start: start, fragPrevious: fragPrevious, fragLen: fragLen, fragments: fragments, bufferEnd: bufferEnd, end: end, levelDetails: levelDetails });
+ }
+ if (frag) {
+ return this._loadFragmentOrKey({ frag: frag, level: level, levelDetails: levelDetails, pos: pos, bufferEnd: bufferEnd });
+ }
+ return true;
+ }
+ }, {
+ key: '_ensureFragmentAtLivePoint',
+ value: function _ensureFragmentAtLivePoint(_ref2) {
+ var levelDetails = _ref2.levelDetails;
+ var bufferEnd = _ref2.bufferEnd;
+ var start = _ref2.start;
+ var end = _ref2.end;
+ var fragPrevious = _ref2.fragPrevious;
+ var fragments = _ref2.fragments;
+ var fragLen = _ref2.fragLen;
+
+ var config = this.hls.config,
+ media = this.media;
+
+ var frag = void 0;
+
+ // check if requested position is within seekable boundaries :
+ //logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);
+ var maxLatency = config.liveMaxLatencyDuration !== undefined ? config.liveMaxLatencyDuration : config.liveMaxLatencyDurationCount * levelDetails.targetduration;
+
+ if (bufferEnd < Math.max(start, end - maxLatency)) {
+ var liveSyncPosition = this.liveSyncPosition = this.computeLivePosition(start, levelDetails);
+ _logger.logger.log('buffer end: ' + bufferEnd.toFixed(3) + ' is located too far from the end of live sliding playlist, reset currentTime to : ' + liveSyncPosition.toFixed(3));
+ bufferEnd = liveSyncPosition;
+ if (media && media.readyState && media.duration > liveSyncPosition) {
+ media.currentTime = liveSyncPosition;
+ }
+ }
+
+ // if end of buffer greater than live edge, don't load any fragment
+ // this could happen if live playlist intermittently slides in the past.
+ // level 1 loaded [182580161,182580167]
+ // level 1 loaded [182580162,182580169]
+ // Loading 182580168 of [182580162 ,182580169],level 1 ..
+ // Loading 182580169 of [182580162 ,182580169],level 1 ..
+ // level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168
+ // level 1 loaded [182580164,182580171]
+ //
+ // don't return null in case media not loaded yet (readystate === 0)
+ if (levelDetails.PTSKnown && bufferEnd > end && media && media.readyState) {
+ return null;
+ }
+
+ if (this.startFragRequested && !levelDetails.PTSKnown) {
+ /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...
+ try to load frag matching with next SN.
+ even if SN are not synchronized between playlists, loading this frag will help us
+ compute playlist sliding and find the right one after in case it was not the right consecutive one */
+ if (fragPrevious) {
+ var targetSN = fragPrevious.sn + 1;
+ if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {
+ frag = fragments[targetSN - levelDetails.startSN];
+ _logger.logger.log('live playlist, switching playlist, load frag with next SN: ' + frag.sn);
+ }
+ }
+ if (!frag) {
+ /* we have no idea about which fragment should be loaded.
+ so let's load mid fragment. it will help computing playlist sliding and find the right one
+ */
+ frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];
+ _logger.logger.log('live playlist, switching playlist, unknown, load middle frag : ' + frag.sn);
+ }
+ }
+ return frag;
+ }
+ }, {
+ key: '_findFragment',
+ value: function _findFragment(_ref3) {
+ var start = _ref3.start;
+ var fragPrevious = _ref3.fragPrevious;
+ var fragLen = _ref3.fragLen;
+ var fragments = _ref3.fragments;
+ var bufferEnd = _ref3.bufferEnd;
+ var end = _ref3.end;
+ var levelDetails = _ref3.levelDetails;
+
+ var config = this.hls.config;
+
+ var frag = void 0,
+ foundFrag = void 0,
+ maxFragLookUpTolerance = config.maxFragLookUpTolerance;
+
+ if (bufferEnd < end) {
+ if (bufferEnd > end - maxFragLookUpTolerance) {
+ maxFragLookUpTolerance = 0;
+ }
+ foundFrag = _binarySearch2.default.search(fragments, function (candidate) {
+ // offset should be within fragment boundary - config.maxFragLookUpTolerance
+ // this is to cope with situations like
+ // bufferEnd = 9.991
+ // frag[Ø] : [0,10]
+ // frag[1] : [10,20]
+ // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here
+ // frag start frag start+duration
+ // |-----------------------------|
+ // <---> <--->
+ // ...--------><-----------------------------><---------....
+ // previous frag matching fragment next frag
+ // return -1 return 0 return 1
+ //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);
+ if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {
+ return 1;
+ } // if maxFragLookUpTolerance will have negative value then don't return -1 for first element
+ else if (candidate.start - maxFragLookUpTolerance > bufferEnd && candidate.start) {
+ return -1;
+ }
+ return 0;
+ });
+ } else {
+ // reach end of playlist
+ foundFrag = fragments[fragLen - 1];
+ }
+ if (foundFrag) {
+ frag = foundFrag;
+ start = foundFrag.start;
+ //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);
+ if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {
+ if (frag.sn < levelDetails.endSN) {
+ var deltaPTS = fragPrevious.deltaPTS,
+ curSNIdx = frag.sn - levelDetails.startSN;
+ // if there is a significant delta between audio and video, larger than max allowed hole,
+ // and if previous remuxed fragment did not start with a keyframe. (fragPrevious.dropped)
+ // let's try to load previous fragment again to get last keyframe
+ // then we will reload again current fragment (that way we should be able to fill the buffer hole ...)
+ if (deltaPTS && deltaPTS > config.maxBufferHole && fragPrevious.dropped && curSNIdx) {
+ frag = fragments[curSNIdx - 1];
+ _logger.logger.warn('SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this');
+ // decrement previous frag load counter to avoid frag loop loading error when next fragment will get reloaded
+ fragPrevious.loadCounter--;
+ } else {
+ frag = fragments[curSNIdx + 1];
+ _logger.logger.log('SN just loaded, load next one: ' + frag.sn);
+ }
+ } else {
+ frag = null;
+ }
+ }
+ }
+ return frag;
+ }
+ }, {
+ key: '_loadFragmentOrKey',
+ value: function _loadFragmentOrKey(_ref4) {
+ var frag = _ref4.frag;
+ var level = _ref4.level;
+ var levelDetails = _ref4.levelDetails;
+ var pos = _ref4.pos;
+ var bufferEnd = _ref4.bufferEnd;
+
+ var hls = this.hls,
+ config = hls.config;
+
+ //logger.log('loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));
+ if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {
+ _logger.logger.log('Loading key for ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level);
+ this.state = State.KEY_LOADING;
+ hls.trigger(_events2.default.KEY_LOADING, { frag: frag });
+ } else {
+ _logger.logger.log('Loading ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level + ', currentTime:' + pos.toFixed(3) + ',bufferEnd:' + bufferEnd.toFixed(3));
+ // ensure that we are not reloading the same fragments in loop ...
+ if (this.fragLoadIdx !== undefined) {
+ this.fragLoadIdx++;
+ } else {
+ this.fragLoadIdx = 0;
+ }
+ if (frag.loadCounter) {
+ frag.loadCounter++;
+ var maxThreshold = config.fragLoadingLoopThreshold;
+ // if this frag has already been loaded 3 times, and if it has been reloaded recently
+ if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });
+ return false;
+ }
+ } else {
+ frag.loadCounter = 1;
+ }
+ frag.loadIdx = this.fragLoadIdx;
+ this.fragCurrent = frag;
+ this.startFragRequested = true;
+ frag.autoLevel = hls.autoLevelEnabled;
+ frag.bitrateTest = this.bitrateTest;
+ hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });
+ this.state = State.FRAG_LOADING;
+ return true;
+ }
+ }
+ }, {
+ key: 'getBufferRange',
+ value: function getBufferRange(position) {
+ var i,
+ range,
+ bufferRange = this.bufferRange;
+ if (bufferRange) {
+ for (i = bufferRange.length - 1; i >= 0; i--) {
+ range = bufferRange[i];
+ if (position >= range.start && position <= range.end) {
+ return range;
+ }
+ }
+ }
+ return null;
+ }
+ }, {
+ key: 'followingBufferRange',
+ value: function followingBufferRange(range) {
+ if (range) {
+ // try to get range of next fragment (500ms after this range)
+ return this.getBufferRange(range.end + 0.5);
+ }
+ return null;
+ }
+ }, {
+ key: '_checkFragmentChanged',
+ value: function _checkFragmentChanged() {
+ var rangeCurrent,
+ currentTime,
+ video = this.media;
+ if (video && video.readyState && video.seeking === false) {
+ currentTime = video.currentTime;
+ /* if video element is in seeked state, currentTime can only increase.
+ (assuming that playback rate is positive ...)
+ As sometimes currentTime jumps back to zero after a
+ media decode error, check this, to avoid seeking back to
+ wrong position after a media decode error
+ */
+ if (currentTime > video.playbackRate * this.lastCurrentTime) {
+ this.lastCurrentTime = currentTime;
+ }
+ if (_bufferHelper2.default.isBuffered(video, currentTime)) {
+ rangeCurrent = this.getBufferRange(currentTime);
+ } else if (_bufferHelper2.default.isBuffered(video, currentTime + 0.1)) {
+ /* ensure that FRAG_CHANGED event is triggered at startup,
+ when first video frame is displayed and playback is paused.
+ add a tolerance of 100ms, in case current position is not buffered,
+ check if current pos+100ms is buffered and use that buffer range
+ for FRAG_CHANGED event reporting */
+ rangeCurrent = this.getBufferRange(currentTime + 0.1);
+ }
+ if (rangeCurrent) {
+ var fragPlaying = rangeCurrent.frag;
+ if (fragPlaying !== this.fragPlaying) {
+ this.fragPlaying = fragPlaying;
+ this.hls.trigger(_events2.default.FRAG_CHANGED, { frag: fragPlaying });
+ }
+ }
+ }
+ }
+
+ /*
+ on immediate level switch :
+ - pause playback if playing
+ - cancel any pending load request
+ - and trigger a buffer flush
+ */
+
+ }, {
+ key: 'immediateLevelSwitch',
+ value: function immediateLevelSwitch() {
+ _logger.logger.log('immediateLevelSwitch');
+ if (!this.immediateSwitch) {
+ this.immediateSwitch = true;
+ var media = this.media,
+ previouslyPaused = void 0;
+ if (media) {
+ previouslyPaused = media.paused;
+ media.pause();
+ } else {
+ // don't restart playback after instant level switch in case media not attached
+ previouslyPaused = true;
+ }
+ this.previouslyPaused = previouslyPaused;
+ }
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && fragCurrent.loader) {
+ fragCurrent.loader.abort();
+ }
+ this.fragCurrent = null;
+ this.state = State.PAUSED;
+ // flush everything
+ this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });
+ }
+
+ /*
+ on immediate level switch end, after new fragment has been buffered :
+ - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)
+ - resume the playback if needed
+ */
+
+ }, {
+ key: 'immediateLevelSwitchEnd',
+ value: function immediateLevelSwitchEnd() {
+ var media = this.media;
+ if (media && media.buffered.length) {
+ this.immediateSwitch = false;
+ if (_bufferHelper2.default.isBuffered(media, media.currentTime)) {
+ // only nudge if currentTime is buffered
+ media.currentTime -= 0.0001;
+ }
+ if (!this.previouslyPaused) {
+ media.play();
+ }
+ }
+ }
+ }, {
+ key: 'nextLevelSwitch',
+ value: function nextLevelSwitch() {
+ /* try to switch ASAP without breaking video playback :
+ in order to ensure smooth but quick level switching,
+ we need to find the next flushable buffer range
+ we should take into account new segment fetch time
+ */
+ var media = this.media;
+ // ensure that media is defined and that metadata are available (to retrieve currentTime)
+ if (media && media.readyState) {
+ var fetchdelay = void 0,
+ currentRange = void 0,
+ nextRange = void 0;
+ // increase fragment load Index to avoid frag loop loading error after buffer flush
+ this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;
+ currentRange = this.getBufferRange(media.currentTime);
+ if (currentRange && currentRange.start > 1) {
+ // flush buffer preceding current fragment (flush until current fragment start offset)
+ // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...
+ this.state = State.PAUSED;
+ this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: currentRange.start - 1 });
+ }
+ if (!media.paused) {
+ // add a safety delay of 1s
+ var nextLevelId = this.hls.nextLoadLevel,
+ nextLevel = this.levels[nextLevelId],
+ fragLastKbps = this.fragLastKbps;
+ if (fragLastKbps && this.fragCurrent) {
+ fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;
+ } else {
+ fetchdelay = 0;
+ }
+ } else {
+ fetchdelay = 0;
+ }
+ //logger.log('fetchdelay:'+fetchdelay);
+ // find buffer range that will be reached once new fragment will be fetched
+ nextRange = this.getBufferRange(media.currentTime + fetchdelay);
+ if (nextRange) {
+ // we can flush buffer range following this one without stalling playback
+ nextRange = this.followingBufferRange(nextRange);
+ if (nextRange) {
+ // if we are here, we can also cancel any loading/demuxing in progress, as they are useless
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && fragCurrent.loader) {
+ fragCurrent.loader.abort();
+ }
+ this.fragCurrent = null;
+ // flush position is the start position of this new buffer
+ this.state = State.PAUSED;
+ this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: nextRange.start, endOffset: Number.POSITIVE_INFINITY });
+ }
+ }
+ }
+ }
+ }, {
+ key: 'onMediaAttached',
+ value: function onMediaAttached(data) {
+ var media = this.media = this.mediaBuffer = data.media;
+ this.onvseeking = this.onMediaSeeking.bind(this);
+ this.onvseeked = this.onMediaSeeked.bind(this);
+ this.onvended = this.onMediaEnded.bind(this);
+ media.addEventListener('seeking', this.onvseeking);
+ media.addEventListener('seeked', this.onvseeked);
+ media.addEventListener('ended', this.onvended);
+ var config = this.config;
+ if (this.levels && config.autoStartLoad) {
+ this.hls.startLoad(config.startPosition);
+ }
+ }
+ }, {
+ key: 'onMediaDetaching',
+ value: function onMediaDetaching() {
+ var media = this.media;
+ if (media && media.ended) {
+ _logger.logger.log('MSE detaching and video ended, reset startPosition');
+ this.startPosition = this.lastCurrentTime = 0;
+ }
+
+ // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery
+ var levels = this.levels;
+ if (levels) {
+ // reset fragment load counter
+ levels.forEach(function (level) {
+ if (level.details) {
+ level.details.fragments.forEach(function (fragment) {
+ fragment.loadCounter = undefined;
+ });
+ }
+ });
+ }
+ // remove video listeners
+ if (media) {
+ media.removeEventListener('seeking', this.onvseeking);
+ media.removeEventListener('seeked', this.onvseeked);
+ media.removeEventListener('ended', this.onvended);
+ this.onvseeking = this.onvseeked = this.onvended = null;
+ }
+ this.media = null;
+ this.loadedmetadata = false;
+ this.stopLoad();
+ }
+ }, {
+ key: 'onMediaSeeking',
+ value: function onMediaSeeking() {
+ var media = this.media,
+ currentTime = media ? media.currentTime : undefined,
+ config = this.config;
+ _logger.logger.log('media seeking to ' + currentTime.toFixed(3));
+ if (this.state === State.FRAG_LOADING) {
+ var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, this.config.maxBufferHole),
+ fragCurrent = this.fragCurrent;
+ // check if we are seeking to a unbuffered area AND if frag loading is in progress
+ if (bufferInfo.len === 0 && fragCurrent) {
+ var tolerance = config.maxFragLookUpTolerance,
+ fragStartOffset = fragCurrent.start - tolerance,
+ fragEndOffset = fragCurrent.start + fragCurrent.duration + tolerance;
+ // check if we seek position will be out of currently loaded frag range : if out cancel frag load, if in, don't do anything
+ if (currentTime < fragStartOffset || currentTime > fragEndOffset) {
+ if (fragCurrent.loader) {
+ _logger.logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');
+ fragCurrent.loader.abort();
+ }
+ this.fragCurrent = null;
+ this.fragPrevious = null;
+ // switch to IDLE state to load new fragment
+ this.state = State.IDLE;
+ } else {
+ _logger.logger.log('seeking outside of buffer but within currently loaded fragment range');
+ }
+ }
+ } else if (this.state === State.ENDED) {
+ // switch to IDLE state to check for potential new fragment
+ this.state = State.IDLE;
+ }
+ if (media) {
+ this.lastCurrentTime = currentTime;
+ }
+ // avoid reporting fragment loop loading error in case user is seeking several times on same position
+ if (this.state !== State.FRAG_LOADING && this.fragLoadIdx !== undefined) {
+ this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;
+ }
+ // tick to speed up processing
+ this.tick();
+ }
+ }, {
+ key: 'onMediaSeeked',
+ value: function onMediaSeeked() {
+ _logger.logger.log('media seeked to ' + this.media.currentTime.toFixed(3));
+ // tick to speed up FRAGMENT_PLAYING triggering
+ this.tick();
+ }
+ }, {
+ key: 'onMediaEnded',
+ value: function onMediaEnded() {
+ _logger.logger.log('media ended');
+ // reset startPosition and lastCurrentTime to restart playback @ stream beginning
+ this.startPosition = this.lastCurrentTime = 0;
+ }
+ }, {
+ key: 'onManifestLoading',
+ value: function onManifestLoading() {
+ // reset buffer on manifest loading
+ _logger.logger.log('trigger BUFFER_RESET');
+ this.hls.trigger(_events2.default.BUFFER_RESET);
+ this.bufferRange = [];
+ this.stalled = false;
+ this.startPosition = this.lastCurrentTime = 0;
+ }
+ }, {
+ key: 'onManifestParsed',
+ value: function onManifestParsed(data) {
+ var aac = false,
+ heaac = false,
+ codec;
+ data.levels.forEach(function (level) {
+ // detect if we have different kind of audio codecs used amongst playlists
+ codec = level.audioCodec;
+ if (codec) {
+ if (codec.indexOf('mp4a.40.2') !== -1) {
+ aac = true;
+ }
+ if (codec.indexOf('mp4a.40.5') !== -1) {
+ heaac = true;
+ }
+ }
+ });
+ this.audioCodecSwitch = aac && heaac;
+ if (this.audioCodecSwitch) {
+ _logger.logger.log('both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC');
+ }
+ this.levels = data.levels;
+ this.startLevelLoaded = false;
+ this.startFragRequested = false;
+ var config = this.config;
+ if (config.autoStartLoad) {
+ this.hls.startLoad(config.startPosition);
+ }
+ }
+ }, {
+ key: 'onLevelLoaded',
+ value: function onLevelLoaded(data) {
+ var newDetails = data.details,
+ newLevelId = data.level,
+ curLevel = this.levels[newLevelId],
+ duration = newDetails.totalduration,
+ sliding = 0;
+
+ _logger.logger.log('level ' + newLevelId + ' loaded [' + newDetails.startSN + ',' + newDetails.endSN + '],duration:' + duration);
+ this.levelLastLoaded = newLevelId;
+
+ if (newDetails.live) {
+ var curDetails = curLevel.details;
+ if (curDetails && newDetails.fragments.length > 0) {
+ // we already have details for that level, merge them
+ _levelHelper2.default.mergeDetails(curDetails, newDetails);
+ sliding = newDetails.fragments[0].start;
+ this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);
+ if (newDetails.PTSKnown) {
+ _logger.logger.log('live playlist sliding:' + sliding.toFixed(3));
+ } else {
+ _logger.logger.log('live playlist - outdated PTS, unknown sliding');
+ }
+ } else {
+ newDetails.PTSKnown = false;
+ _logger.logger.log('live playlist - first load, unknown sliding');
+ }
+ } else {
+ newDetails.PTSKnown = false;
+ }
+ // override level info
+ curLevel.details = newDetails;
+ this.hls.trigger(_events2.default.LEVEL_UPDATED, { details: newDetails, level: newLevelId });
+
+ if (this.startFragRequested === false) {
+ // compute start position if set to -1. use it straight away if value is defined
+ if (this.startPosition === -1 || this.lastCurrentTime === -1) {
+ // first, check if start time offset has been set in playlist, if yes, use this value
+ var startTimeOffset = newDetails.startTimeOffset;
+ if (!isNaN(startTimeOffset)) {
+ if (startTimeOffset < 0) {
+ _logger.logger.log('negative start time offset ' + startTimeOffset + ', count from end of last fragment');
+ startTimeOffset = sliding + duration + startTimeOffset;
+ }
+ _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);
+ this.startPosition = startTimeOffset;
+ } else {
+ // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)
+ if (newDetails.live) {
+ this.startPosition = this.computeLivePosition(sliding, newDetails);
+ _logger.logger.log('configure startPosition to ' + this.startPosition);
+ } else {
+ this.startPosition = 0;
+ }
+ }
+ }
+ this.nextLoadPosition = this.startPosition;
+ }
+ // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment
+ if (this.state === State.WAITING_LEVEL) {
+ this.state = State.IDLE;
+ }
+ //trigger handler right now
+ this.tick();
+ }
+ }, {
+ key: 'onKeyLoaded',
+ value: function onKeyLoaded() {
+ if (this.state === State.KEY_LOADING) {
+ this.state = State.IDLE;
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onFragLoaded',
+ value: function onFragLoaded(data) {
+ var fragCurrent = this.fragCurrent,
+ fragLoaded = data.frag;
+ if (this.state === State.FRAG_LOADING && fragCurrent && fragLoaded.type === 'main' && fragLoaded.level === fragCurrent.level && fragLoaded.sn === fragCurrent.sn) {
+ var stats = data.stats,
+ currentLevel = this.levels[fragCurrent.level],
+ details = currentLevel.details;
+ _logger.logger.log('Loaded ' + fragCurrent.sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + fragCurrent.level);
+ // reset frag bitrate test in any case after frag loaded event
+ this.bitrateTest = false;
+ // if this frag was loaded to perform a bitrate test AND if hls.nextLoadLevel is greater than 0
+ // then this means that we should be able to load a fragment at a higher quality level
+ if (fragLoaded.bitrateTest === true && this.hls.nextLoadLevel) {
+ // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo
+ this.state = State.IDLE;
+ this.startFragRequested = false;
+ stats.tparsed = stats.tbuffered = performance.now();
+ this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });
+ this.tick();
+ } else {
+ this.state = State.PARSING;
+ // transmux the MPEG-TS data to ISO-BMFF segments
+ this.stats = stats;
+ var duration = details.totalduration,
+ start = !isNaN(fragCurrent.startDTS) ? fragCurrent.startDTS : fragCurrent.start,
+ level = fragCurrent.level,
+ sn = fragCurrent.sn,
+ audioCodec = this.config.defaultAudioCodec || currentLevel.audioCodec;
+ if (this.audioCodecSwap) {
+ _logger.logger.log('swapping playlist audio codec');
+ if (audioCodec === undefined) {
+ audioCodec = this.lastAudioCodec;
+ }
+ if (audioCodec) {
+ if (audioCodec.indexOf('mp4a.40.5') !== -1) {
+ audioCodec = 'mp4a.40.2';
+ } else {
+ audioCodec = 'mp4a.40.5';
+ }
+ }
+ }
+ this.pendingAppending = 0;
+ _logger.logger.log('Parsing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + level + ', cc ' + fragCurrent.cc);
+ var demuxer = this.demuxer;
+ if (!demuxer) {
+ demuxer = this.demuxer = new _demuxer2.default(this.hls, 'main');
+ }
+ // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)
+ var accurateTimeOffset = details.PTSKnown || !details.live;
+ demuxer.push(data.payload, audioCodec, currentLevel.videoCodec, start, fragCurrent.cc, level, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);
+ }
+ }
+ this.fragLoadError = 0;
+ }
+ }, {
+ key: 'onFragParsingInitSegment',
+ value: function onFragParsingInitSegment(data) {
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {
+ var tracks = data.tracks,
+ trackName,
+ track;
+
+ // if audio track is expected to come from audio stream controller, discard any coming from main
+ if (tracks.audio && this.altAudio) {
+ delete tracks.audio;
+ }
+ // include levelCodec in audio and video tracks
+ track = tracks.audio;
+ if (track) {
+ var audioCodec = this.levels[this.level].audioCodec,
+ ua = navigator.userAgent.toLowerCase();
+ if (audioCodec && this.audioCodecSwap) {
+ _logger.logger.log('swapping playlist audio codec');
+ if (audioCodec.indexOf('mp4a.40.5') !== -1) {
+ audioCodec = 'mp4a.40.2';
+ } else {
+ audioCodec = 'mp4a.40.5';
+ }
+ }
+ // in case AAC and HE-AAC audio codecs are signalled in manifest
+ // force HE-AAC , as it seems that most browsers prefers that way,
+ // except for mono streams OR on FF
+ // these conditions might need to be reviewed ...
+ if (this.audioCodecSwitch) {
+ // don't force HE-AAC if mono stream
+ if (track.metadata.channelCount !== 1 &&
+ // don't force HE-AAC if firefox
+ ua.indexOf('firefox') === -1) {
+ audioCodec = 'mp4a.40.5';
+ }
+ }
+ // HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise
+ if (ua.indexOf('android') !== -1) {
+ audioCodec = 'mp4a.40.2';
+ _logger.logger.log('Android: force audio codec to' + audioCodec);
+ }
+ track.levelCodec = audioCodec;
+ track.id = data.id;
+ }
+ track = tracks.video;
+ if (track) {
+ track.levelCodec = this.levels[this.level].videoCodec;
+ track.id = data.id;
+ }
+
+ // if remuxer specify that a unique track needs to generated,
+ // let's merge all tracks together
+ if (data.unique) {
+ var mergedTrack = {
+ codec: '',
+ levelCodec: ''
+ };
+ for (trackName in data.tracks) {
+ track = tracks[trackName];
+ mergedTrack.container = track.container;
+ if (mergedTrack.codec) {
+ mergedTrack.codec += ',';
+ mergedTrack.levelCodec += ',';
+ }
+ if (track.codec) {
+ mergedTrack.codec += track.codec;
+ }
+ if (track.levelCodec) {
+ mergedTrack.levelCodec += track.levelCodec;
+ }
+ }
+ tracks = { audiovideo: mergedTrack };
+ }
+ this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);
+ // loop through tracks that are going to be provided to bufferController
+ for (trackName in tracks) {
+ track = tracks[trackName];
+ _logger.logger.log('main track:' + trackName + ',container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');
+ var initSegment = track.initSegment;
+ if (initSegment) {
+ this.pendingAppending++;
+ this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: trackName, data: initSegment, parent: 'main', content: 'initSegment' });
+ }
+ }
+ //trigger handler right now
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onFragParsingData',
+ value: function onFragParsingData(data) {
+ var _this2 = this;
+
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && !(data.type === 'audio' && this.altAudio) && // filter out main audio if audio track is loaded through audio stream controller
+ this.state === State.PARSING) {
+ var level = this.levels[this.level],
+ frag = this.fragCurrent;
+
+ _logger.logger.log('Parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb + ',dropped:' + (data.dropped || 0));
+
+ var drift = _levelHelper2.default.updateFragPTSDTS(level.details, frag.sn, data.startPTS, data.endPTS, data.startDTS, data.endDTS),
+ hls = this.hls;
+ hls.trigger(_events2.default.LEVEL_PTS_UPDATED, { details: level.details, level: this.level, drift: drift });
+
+ // has remuxer dropped video frames located before first keyframe ?
+ if (data.type === 'video') {
+ frag.dropped = data.dropped;
+ }
+
+ [data.data1, data.data2].forEach(function (buffer) {
+ if (buffer) {
+ _this2.pendingAppending++;
+ hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'main', content: 'data' });
+ }
+ });
+
+ this.nextLoadPosition = data.endPTS;
+ this.bufferRange.push({ type: data.type, start: data.startPTS, end: data.endPTS, frag: frag });
+
+ //trigger handler right now
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onFragParsed',
+ value: function onFragParsed(data) {
+ var fragCurrent = this.fragCurrent;
+ if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {
+ this.stats.tparsed = performance.now();
+ this.state = State.PARSED;
+ this._checkAppendedParsed();
+ }
+ }
+ }, {
+ key: 'onAudioTrackSwitch',
+ value: function onAudioTrackSwitch(data) {
+ // if any URL found on new audio track, it is an alternate audio track
+ var altAudio = !!data.url;
+ // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered
+ if (!altAudio) {
+ if (this.mediaBuffer !== this.media) {
+ _logger.logger.log('switching on main audio, use media.buffered to schedule main fragment loading');
+ this.mediaBuffer = this.media;
+ var fragCurrent = this.fragCurrent;
+ // we need to refill audio buffer from main: cancel any frag loading to speed up audio switch
+ if (fragCurrent.loader) {
+ _logger.logger.log('switching to main audio track, cancel main fragment load');
+ fragCurrent.loader.abort();
+ }
+ this.fragCurrent = null;
+ this.fragPrevious = null;
+ // destroy demuxer to force init segment generation (following audio switch)
+ if (this.demuxer) {
+ this.demuxer.destroy();
+ this.demuxer = null;
+ }
+ // switch to IDLE state to load new fragment
+ this.state = State.IDLE;
+ }
+ } else {
+ // if we switch on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered
+ if (this.videoBuffer && this.mediaBuffer !== this.videoBuffer) {
+ _logger.logger.log('switching on alternate audio, use video.buffered to schedule main fragment loading');
+ this.mediaBuffer = this.videoBuffer;
+ }
+ }
+ this.altAudio = altAudio;
+ }
+ }, {
+ key: 'onBufferCreated',
+ value: function onBufferCreated(data) {
+ var tracks = data.tracks,
+ mediaTrack = void 0,
+ name = void 0,
+ alternate = false;
+ for (var type in tracks) {
+ var track = tracks[type];
+ if (track.id === 'main') {
+ name = type;
+ mediaTrack = track;
+ // keep video source buffer reference
+ if (type === 'video') {
+ this.videoBuffer = tracks[type].buffer;
+ }
+ } else {
+ alternate = true;
+ }
+ }
+ if (alternate && mediaTrack) {
+ _logger.logger.log('alternate track found, use ' + name + '.buffered to schedule main fragment loading');
+ this.mediaBuffer = mediaTrack.buffer;
+ } else {
+ this.mediaBuffer = this.media;
+ }
+ }
+ }, {
+ key: 'onBufferAppended',
+ value: function onBufferAppended(data) {
+ if (data.parent === 'main') {
+ switch (this.state) {
+ case State.PARSING:
+ case State.PARSED:
+ this.pendingAppending--;
+ this._checkAppendedParsed();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }, {
+ key: '_checkAppendedParsed',
+ value: function _checkAppendedParsed() {
+ //trigger handler right now
+ if (this.state === State.PARSED && this.pendingAppending === 0) {
+ var frag = this.fragCurrent,
+ stats = this.stats;
+ if (frag) {
+ this.fragPrevious = frag;
+ stats.tbuffered = performance.now();
+ // we should get rid of this.fragLastKbps
+ this.fragLastKbps = Math.round(8 * stats.total / (stats.tbuffered - stats.tfirst));
+ this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'main' });
+ var media = this.mediaBuffer ? this.mediaBuffer : this.media;
+ _logger.logger.log('main buffered : ' + _timeRanges2.default.toString(media.buffered));
+ this.state = State.IDLE;
+ }
+ this.tick();
+ }
+ }
+ }, {
+ key: 'onError',
+ value: function onError(data) {
+ var frag = data.frag || this.fragCurrent;
+ // don't handle frag error not related to main fragment
+ if (frag && frag.type !== 'main') {
+ return;
+ }
+ var media = this.media,
+
+ // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end
+ mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);
+ switch (data.details) {
+ case _errors.ErrorDetails.FRAG_LOAD_ERROR:
+ case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:
+ if (!data.fatal) {
+ var loadError = this.fragLoadError;
+ if (loadError) {
+ loadError++;
+ } else {
+ loadError = 1;
+ }
+ var config = this.config;
+ // keep retrying / don't raise fatal network error if current position is buffered
+ if (loadError <= config.fragLoadingMaxRetry || mediaBuffered) {
+ this.fragLoadError = loadError;
+ // reset load counter to avoid frag loop loading error
+ frag.loadCounter = 0;
+ // exponential backoff capped to config.fragLoadingMaxRetryTimeout
+ var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);
+ _logger.logger.warn('mediaController: frag loading failed, retry in ' + delay + ' ms');
+ this.retryDate = performance.now() + delay;
+ // retry loading state
+ this.state = State.FRAG_LOADING_WAITING_RETRY;
+ } else {
+ _logger.logger.error('mediaController: ' + data.details + ' reaches max retry, redispatch as fatal ...');
+ // redispatch same error but with fatal set to true
+ data.fatal = true;
+ this.hls.trigger(_events2.default.ERROR, data);
+ this.state = State.ERROR;
+ }
+ }
+ break;
+ case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:
+ if (!data.fatal) {
+ // if buffer is not empty
+ if (mediaBuffered) {
+ // try to reduce max buffer length : rationale is that we could get
+ // frag loop loading error because of buffer eviction
+ this._reduceMaxBufferLength(frag.duration);
+ this.state = State.IDLE;
+ } else {
+ // buffer empty. report as fatal if in manual mode or if lowest level.
+ // level controller takes care of emergency switch down logic
+ if (!frag.autoLevel || frag.level === 0) {
+ // redispatch same error but with fatal set to true
+ data.fatal = true;
+ this.hls.trigger(_events2.default.ERROR, data);
+ this.state = State.ERROR;
+ }
+ }
+ }
+ break;
+ case _errors.ErrorDetails.LEVEL_LOAD_ERROR:
+ case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:
+ case _errors.ErrorDetails.KEY_LOAD_ERROR:
+ case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:
+ // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received
+ if (this.state !== State.ERROR) {
+ // if fatal error, stop processing, otherwise move to IDLE to retry loading
+ this.state = data.fatal ? State.ERROR : State.IDLE;
+ _logger.logger.warn('mediaController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');
+ }
+ break;
+ case _errors.ErrorDetails.BUFFER_FULL_ERROR:
+ // if in appending state
+ if (this.state === State.PARSING || this.state === State.PARSED) {
+ // reduce max buf len if current position is buffered
+ if (mediaBuffered) {
+ this._reduceMaxBufferLength(frag.duration);
+ this.state = State.IDLE;
+ } else {
+ // current position is not buffered, but browser is still complaining about buffer full error
+ // this happens on IE/Edge, refer to https://github.com/dailymotion/hls.js/pull/708
+ // in that case flush the whole buffer to recover
+ _logger.logger.warn('buffer full error also media.currentTime is not buffered, flush everything');
+ this.fragCurrent = null;
+ this.state = State.PAUSED;
+ // flush everything
+ this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }, {
+ key: '_reduceMaxBufferLength',
+ value: function _reduceMaxBufferLength(minLength) {
+ var config = this.config;
+ if (config.maxMaxBufferLength >= minLength) {
+ // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...
+ config.maxMaxBufferLength /= 2;
+ _logger.logger.warn('reduce max buffer length to ' + config.maxMaxBufferLength + 's and switch to IDLE state');
+ // increase fragment load Index to avoid frag loop loading error after buffer flush
+ this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;
+ }
+ }
+ }, {
+ key: '_checkBuffer',
+ value: function _checkBuffer() {
+ var media = this.media;
+ // if ready state different from HAVE_NOTHING (numeric value 0), we are allowed to seek
+ if (media && media.readyState) {
+ var currentTime = media.currentTime,
+ buffered = media.buffered;
+ // adjust currentTime to start position on loaded metadata
+ if (!this.loadedmetadata && buffered.length) {
+ this.loadedmetadata = true;
+ // only adjust currentTime if different from startPosition or if startPosition not buffered
+ // at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered
+ var startPosition = this.startPosition,
+ startPositionBuffered = _bufferHelper2.default.isBuffered(media, startPosition);
+ // if currentTime not matching with expected startPosition or startPosition not buffered
+ if (currentTime !== startPosition || !startPositionBuffered) {
+ _logger.logger.log('target start position:' + startPosition);
+ // if startPosition not buffered, let's seek to buffered.start(0)
+ if (!startPositionBuffered) {
+ startPosition = buffered.start(0);
+ _logger.logger.log('target start position not buffered, seek to buffered.start(0) ' + startPosition);
+ }
+ _logger.logger.log('adjust currentTime from ' + currentTime + ' to ' + startPosition);
+ media.currentTime = startPosition;
+ }
+ } else if (this.immediateSwitch) {
+ this.immediateLevelSwitchEnd();
+ } else {
+ var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, 0),
+ expectedPlaying = !(media.paused || // not playing when media is paused
+ media.ended || // not playing when media is ended
+ media.buffered.length === 0),
+ // not playing if nothing buffered
+ jumpThreshold = 0.5,
+ // tolerance needed as some browsers stalls playback before reaching buffered range end
+ playheadMoving = currentTime > media.playbackRate * this.lastCurrentTime,
+ config = this.config;
+
+ if (this.stalled && playheadMoving) {
+ this.stalled = false;
+ _logger.logger.log('playback not stuck anymore @' + currentTime);
+ }
+ // check buffer upfront
+ // if less than jumpThreshold second is buffered, let's check in more details
+ if (expectedPlaying && bufferInfo.len <= jumpThreshold) {
+ if (playheadMoving) {
+ // playhead moving
+ jumpThreshold = 0;
+ this.seekHoleNudgeDuration = 0;
+ } else {
+ // playhead not moving AND media expected to play
+ if (!this.stalled) {
+ this.seekHoleNudgeDuration = 0;
+ _logger.logger.log('playback seems stuck @' + currentTime);
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_STALLED_ERROR, fatal: false });
+ this.stalled = true;
+ } else {
+ this.seekHoleNudgeDuration += config.seekHoleNudgeDuration;
+ }
+ }
+ // if we are below threshold, try to jump to start of next buffer range if close
+ if (bufferInfo.len <= jumpThreshold) {
+ // no buffer available @ currentTime, check if next buffer is close (within a config.maxSeekHole second range)
+ var nextBufferStart = bufferInfo.nextStart,
+ delta = nextBufferStart - currentTime;
+ if (nextBufferStart && delta < config.maxSeekHole && delta > 0) {
+ // next buffer is close ! adjust currentTime to nextBufferStart
+ // this will ensure effective video decoding
+ _logger.logger.log('adjust currentTime from ' + media.currentTime + ' to next buffered @ ' + nextBufferStart + ' + nudge ' + this.seekHoleNudgeDuration);
+ var hole = nextBufferStart + this.seekHoleNudgeDuration - media.currentTime;
+ media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false, hole: hole });
+ }
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'onFragLoadEmergencyAborted',
+ value: function onFragLoadEmergencyAborted() {
+ this.state = State.IDLE;
+ // if loadedmetadata is not set, it means that we are emergency switch down on first frag
+ // in that case, reset startFragRequested flag
+ if (!this.loadedmetadata) {
+ this.startFragRequested = false;
+ }
+ this.tick();
+ }
+ }, {
+ key: 'onBufferFlushed',
+ value: function onBufferFlushed() {
+ /* after successful buffer flushing, rebuild buffer Range array
+ loop through existing buffer range and check if
+ corresponding range is still buffered. only push to new array already buffered range
+ use mediaBuffered instead of media (so that we will check against video.buffered ranges in case of alt audio track)
+ */
+ var media = this.mediaBuffer ? this.mediaBuffer : this.media,
+ bufferRange = this.bufferRange,
+ newRange = [],
+ range = void 0,
+ i = void 0;
+ for (i = 0; i < bufferRange.length; i++) {
+ range = bufferRange[i];
+ if (_bufferHelper2.default.isBuffered(media, (range.start + range.end) / 2)) {
+ newRange.push(range);
+ }
+ }
+ this.bufferRange = newRange;
+
+ // increase fragment load Index to avoid frag loop loading error after buffer flush
+ this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;
+ // move to IDLE once flush complete. this should trigger new fragment loading
+ this.state = State.IDLE;
+ // reset reference to frag
+ this.fragPrevious = null;
+ }
+ }, {
+ key: 'swapAudioCodec',
+ value: function swapAudioCodec() {
+ this.audioCodecSwap = !this.audioCodecSwap;
+ }
+ }, {
+ key: 'computeLivePosition',
+ value: function computeLivePosition(sliding, levelDetails) {
+ var targetLatency = this.config.liveSyncDuration !== undefined ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * levelDetails.targetduration;
+ return sliding + Math.max(0, levelDetails.totalduration - targetLatency);
+ }
+ }, {
+ key: 'state',
+ set: function set(nextState) {
+ if (this.state !== nextState) {
+ var previousState = this.state;
+ this._state = nextState;
+ _logger.logger.log('engine state transition from ' + previousState + ' to ' + nextState);
+ this.hls.trigger(_events2.default.STREAM_STATE_TRANSITION, { previousState: previousState, nextState: nextState });
+ }
+ },
+ get: function get() {
+ return this._state;
+ }
+ }, {
+ key: 'currentLevel',
+ get: function get() {
+ var media = this.media;
+ if (media) {
+ var range = this.getBufferRange(media.currentTime);
+ if (range) {
+ return range.frag.level;
+ }
+ }
+ return -1;
+ }
+ }, {
+ key: 'nextBufferRange',
+ get: function get() {
+ var media = this.media;
+ if (media) {
+ // first get end range of current fragment
+ return this.followingBufferRange(this.getBufferRange(media.currentTime));
+ } else {
+ return null;
+ }
+ }
+ }, {
+ key: 'nextLevel',
+ get: function get() {
+ var range = this.nextBufferRange;
+ if (range) {
+ return range.frag.level;
+ } else {
+ return -1;
+ }
+ }
+ }, {
+ key: 'liveSyncPosition',
+ get: function get() {
+ return this._liveSyncPosition;
+ },
+ set: function set(value) {
+ this._liveSyncPosition = value;
+ }
+ }]);
+
+ return StreamController;
+ }(_eventHandler2.default);
+
+ exports.default = StreamController;
+
+ },{"20":20,"24":24,"25":25,"26":26,"28":28,"29":29,"39":39,"43":43,"45":45}],12:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _cea608Parser = _dereq_(40);
+
+ var _cea608Parser2 = _interopRequireDefault(_cea608Parser);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Timeline Controller
+ */
+
+ var TimelineController = function (_EventHandler) {
+ _inherits(TimelineController, _EventHandler);
+
+ function TimelineController(hls) {
+ _classCallCheck(this, TimelineController);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(TimelineController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.FRAG_PARSING_USERDATA, _events2.default.MANIFEST_LOADING, _events2.default.FRAG_LOADED, _events2.default.LEVEL_SWITCH));
+
+ _this.hls = hls;
+ _this.config = hls.config;
+ _this.enabled = true;
+ _this.Cues = hls.config.cueHandler;
+
+ if (_this.config.enableCEA708Captions) {
+ var self = _this;
+
+ var channel1 = {
+ 'newCue': function newCue(startTime, endTime, screen) {
+ if (!self.textTrack1) {
+ //Enable reuse of existing text track.
+ var existingTrack1 = self.getExistingTrack('1');
+ if (!existingTrack1) {
+ self.textTrack1 = self.createTextTrack('captions', 'English', 'en');
+ self.textTrack1.textTrack1 = true;
+ } else {
+ self.textTrack1 = existingTrack1;
+ self.clearCurrentCues(self.textTrack1);
+
+ var e = new window.Event('addtrack');
+ e.track = self.textTrack1;
+ self.media.dispatchEvent(e);
+ }
+ }
+
+ self.Cues.newCue(self.textTrack1, startTime, endTime, screen);
+ }
+ };
+
+ var channel2 = {
+ 'newCue': function newCue(startTime, endTime, screen) {
+ if (!self.textTrack2) {
+ //Enable reuse of existing text track.
+ var existingTrack2 = self.getExistingTrack('2');
+ if (!existingTrack2) {
+ self.textTrack2 = self.createTextTrack('captions', 'Spanish', 'es');
+ self.textTrack2.textTrack2 = true;
+ } else {
+ self.textTrack2 = existingTrack2;
+ self.clearCurrentCues(self.textTrack2);
+
+ var e = new window.Event('addtrack');
+ e.track = self.textTrack2;
+ self.media.dispatchEvent(e);
+ }
+ }
+
+ self.Cues.newCue(self.textTrack2, startTime, endTime, screen);
+ }
+ };
+
+ _this.cea608Parser = new _cea608Parser2.default(0, channel1, channel2);
+ }
+ return _this;
+ }
+
+ _createClass(TimelineController, [{
+ key: 'clearCurrentCues',
+ value: function clearCurrentCues(track) {
+ if (track && track.cues) {
+ while (track.cues.length > 0) {
+ track.removeCue(track.cues[0]);
+ }
+ }
+ }
+ }, {
+ key: 'getExistingTrack',
+ value: function getExistingTrack(channelNumber) {
+ var media = this.media;
+ if (media) {
+ for (var i = 0; i < media.textTracks.length; i++) {
+ var textTrack = media.textTracks[i];
+ var propName = 'textTrack' + channelNumber;
+ if (textTrack[propName] === true) {
+ return textTrack;
+ }
+ }
+ }
+ return null;
+ }
+ }, {
+ key: 'createTextTrack',
+ value: function createTextTrack(kind, label, lang) {
+ if (this.media) {
+ return this.media.addTextTrack(kind, label, lang);
+ }
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy() {
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onMediaAttaching',
+ value: function onMediaAttaching(data) {
+ this.media = data.media;
+ }
+ }, {
+ key: 'onMediaDetaching',
+ value: function onMediaDetaching() {}
+ }, {
+ key: 'onManifestLoading',
+ value: function onManifestLoading() {
+ this.lastPts = Number.NEGATIVE_INFINITY;
+ }
+ }, {
+ key: 'onLevelSwitch',
+ value: function onLevelSwitch() {
+ if (this.hls.currentLevel.closedCaptions === 'NONE') {
+ this.enabled = false;
+ } else {
+ this.enabled = true;
+ }
+ }
+ }, {
+ key: 'onFragLoaded',
+ value: function onFragLoaded(data) {
+ if (data.frag.type === 'main') {
+ var pts = data.frag.start; //Number.POSITIVE_INFINITY;
+ // if this is a frag for a previously loaded timerange, remove all captions
+ // TODO: consider just removing captions for the timerange
+ if (pts <= this.lastPts) {
+ this.clearCurrentCues(this.textTrack1);
+ this.clearCurrentCues(this.textTrack2);
+ }
+ this.lastPts = pts;
+ }
+ }
+ }, {
+ key: 'onFragParsingUserdata',
+ value: function onFragParsingUserdata(data) {
+ // push all of the CEA-708 messages into the interpreter
+ // immediately. It will create the proper timestamps based on our PTS value
+ if (this.enabled) {
+ for (var i = 0; i < data.samples.length; i++) {
+ var ccdatas = this.extractCea608Data(data.samples[i].bytes);
+ this.cea608Parser.addData(data.samples[i].pts, ccdatas);
+ }
+ }
+ }
+ }, {
+ key: 'extractCea608Data',
+ value: function extractCea608Data(byteArray) {
+ var count = byteArray[0] & 31;
+ var position = 2;
+ var tmpByte, ccbyte1, ccbyte2, ccValid, ccType;
+ var actualCCBytes = [];
+
+ for (var j = 0; j < count; j++) {
+ tmpByte = byteArray[position++];
+ ccbyte1 = 0x7F & byteArray[position++];
+ ccbyte2 = 0x7F & byteArray[position++];
+ ccValid = (4 & tmpByte) === 0 ? false : true;
+ ccType = 3 & tmpByte;
+
+ if (ccbyte1 === 0 && ccbyte2 === 0) {
+ continue;
+ }
+
+ if (ccValid) {
+ if (ccType === 0) // || ccType === 1
+ {
+ actualCCBytes.push(ccbyte1);
+ actualCCBytes.push(ccbyte2);
+ }
+ }
+ }
+ return actualCCBytes;
+ }
+ }]);
+
+ return TimelineController;
+ }(_eventHandler2.default);
+
+ exports.default = TimelineController;
+
+ },{"25":25,"26":26,"40":40}],13:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ *
+ * This file contains an adaptation of the AES decryption algorithm
+ * from the Standford Javascript Cryptography Library. That work is
+ * covered by the following copyright and permissions notice:
+ *
+ * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * official policies, either expressed or implied, of the authors.
+ */
+
+ var AES = function () {
+
+ /**
+ * Schedule out an AES key for both encryption and decryption. This
+ * is a low-level class. Use a cipher mode to do bulk encryption.
+ *
+ * @constructor
+ * @param key {Array} The key as an array of 4, 6 or 8 words.
+ */
+
+ function AES(key) {
+ _classCallCheck(this, AES);
+
+ /**
+ * The expanded S-box and inverse S-box tables. These will be computed
+ * on the client so that we don't have to send them down the wire.
+ *
+ * There are two tables, _tables[0] is for encryption and
+ * _tables[1] is for decryption.
+ *
+ * The first 4 sub-tables are the expanded S-box with MixColumns. The
+ * last (_tables[01][4]) is the S-box itself.
+ *
+ * @private
+ */
+ this._tables = [[[], [], [], [], []], [[], [], [], [], []]];
+
+ this._precompute();
+
+ var i,
+ j,
+ tmp,
+ encKey,
+ decKey,
+ sbox = this._tables[0][4],
+ decTable = this._tables[1],
+ keyLen = key.length,
+ rcon = 1;
+
+ if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {
+ throw new Error('Invalid aes key size=' + keyLen);
+ }
+
+ encKey = key.slice(0);
+ decKey = [];
+ this._key = [encKey, decKey];
+
+ // schedule encryption keys
+ for (i = keyLen; i < 4 * keyLen + 28; i++) {
+ tmp = encKey[i - 1];
+
+ // apply sbox
+ if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {
+ tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];
+
+ // shift rows and add rcon
+ if (i % keyLen === 0) {
+ tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;
+ rcon = rcon << 1 ^ (rcon >> 7) * 283;
+ }
+ }
+
+ encKey[i] = encKey[i - keyLen] ^ tmp;
+ }
+
+ // schedule decryption keys
+ for (j = 0; i; j++, i--) {
+ tmp = encKey[j & 3 ? i : i - 4];
+ if (i <= 4 || j < 4) {
+ decKey[j] = tmp;
+ } else {
+ decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];
+ }
+ }
+ }
+
+ /**
+ * Expand the S-box tables.
+ *
+ * @private
+ */
+
+
+ _createClass(AES, [{
+ key: '_precompute',
+ value: function _precompute() {
+ var encTable = this._tables[0],
+ decTable = this._tables[1],
+ sbox = encTable[4],
+ sboxInv = decTable[4],
+ i,
+ x,
+ xInv,
+ d = [],
+ th = [],
+ x2,
+ x4,
+ x8,
+ s,
+ tEnc,
+ tDec;
+
+ // Compute double and third tables
+ for (i = 0; i < 256; i++) {
+ th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;
+ }
+
+ for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {
+ // Compute sbox
+ s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;
+ s = s >> 8 ^ s & 255 ^ 99;
+ sbox[x] = s;
+ sboxInv[s] = x;
+
+ // Compute MixColumns
+ x8 = d[x4 = d[x2 = d[x]]];
+ tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;
+ tEnc = d[s] * 0x101 ^ s * 0x1010100;
+
+ for (i = 0; i < 4; i++) {
+ encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;
+ decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;
+ }
+ }
+
+ // Compactify. Considerable speedup on Firefox.
+ for (i = 0; i < 5; i++) {
+ encTable[i] = encTable[i].slice(0);
+ decTable[i] = decTable[i].slice(0);
+ }
+ }
+
+ /**
+ * Decrypt 16 bytes, specified as four 32-bit words.
+ * @param encrypted0 {number} the first word to decrypt
+ * @param encrypted1 {number} the second word to decrypt
+ * @param encrypted2 {number} the third word to decrypt
+ * @param encrypted3 {number} the fourth word to decrypt
+ * @param out {Int32Array} the array to write the decrypted words
+ * into
+ * @param offset {number} the offset into the output array to start
+ * writing results
+ * @return {Array} The plaintext.
+ */
+
+ }, {
+ key: 'decrypt',
+ value: function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {
+ var key = this._key[1],
+
+ // state variables a,b,c,d are loaded with pre-whitened data
+ a = encrypted0 ^ key[0],
+ b = encrypted3 ^ key[1],
+ c = encrypted2 ^ key[2],
+ d = encrypted1 ^ key[3],
+ a2,
+ b2,
+ c2,
+ nInnerRounds = key.length / 4 - 2,
+ // key.length === 2 ?
+ i,
+ kIndex = 4,
+ table = this._tables[1],
+
+
+ // load up the tables
+ table0 = table[0],
+ table1 = table[1],
+ table2 = table[2],
+ table3 = table[3],
+ sbox = table[4];
+
+ // Inner rounds. Cribbed from OpenSSL.
+ for (i = 0; i < nInnerRounds; i++) {
+ a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];
+ b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];
+ c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];
+ d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];
+ kIndex += 4;
+ a = a2;b = b2;c = c2;
+ }
+
+ // Last round.
+ for (i = 0; i < 4; i++) {
+ out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];
+ a2 = a;a = b;b = c;c = d;d = a2;
+ }
+ }
+ }]);
+
+ return AES;
+ }();
+
+ exports.default = AES;
+
+ },{}],14:[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; }; }(); /*
+ *
+ * This file contains an adaptation of the AES decryption algorithm
+ * from the Standford Javascript Cryptography Library. That work is
+ * covered by the following copyright and permissions notice:
+ *
+ * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * official policies, either expressed or implied, of the authors.
+ */
+
+ var _aes = _dereq_(13);
+
+ var _aes2 = _interopRequireDefault(_aes);
+
+ 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 AES128Decrypter = function () {
+ function AES128Decrypter(key, initVector) {
+ _classCallCheck(this, AES128Decrypter);
+
+ this.key = key;
+ this.iv = initVector;
+ }
+
+ /**
+ * Convert network-order (big-endian) bytes into their little-endian
+ * representation.
+ */
+
+
+ _createClass(AES128Decrypter, [{
+ key: 'ntoh',
+ value: function ntoh(word) {
+ return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;
+ }
+
+ /**
+ * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.
+ * @param encrypted {Uint8Array} the encrypted bytes
+ * @param key {Uint32Array} the bytes of the decryption key
+ * @param initVector {Uint32Array} the initialization vector (IV) to
+ * use for the first round of CBC.
+ * @return {Uint8Array} the decrypted bytes
+ *
+ * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard
+ * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29
+ * @see https://tools.ietf.org/html/rfc2315
+ */
+
+ }, {
+ key: 'doDecrypt',
+ value: function doDecrypt(encrypted, key, initVector) {
+ var
+ // word-level access to the encrypted bytes
+ encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2),
+ decipher = new _aes2.default(Array.prototype.slice.call(key)),
+
+
+ // byte and word-level access for the decrypted output
+ decrypted = new Uint8Array(encrypted.byteLength),
+ decrypted32 = new Int32Array(decrypted.buffer),
+
+
+ // temporary variables for working with the IV, encrypted, and
+ // decrypted data
+ init0,
+ init1,
+ init2,
+ init3,
+ encrypted0,
+ encrypted1,
+ encrypted2,
+ encrypted3,
+
+
+ // iteration variable
+ wordIx;
+
+ // pull out the words of the IV to ensure we don't modify the
+ // passed-in reference and easier access
+ init0 = ~ ~initVector[0];
+ init1 = ~ ~initVector[1];
+ init2 = ~ ~initVector[2];
+ init3 = ~ ~initVector[3];
+
+ // decrypt four word sequences, applying cipher-block chaining (CBC)
+ // to each decrypted block
+ for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {
+ // convert big-endian (network order) words into little-endian
+ // (javascript order)
+ encrypted0 = ~ ~this.ntoh(encrypted32[wordIx]);
+ encrypted1 = ~ ~this.ntoh(encrypted32[wordIx + 1]);
+ encrypted2 = ~ ~this.ntoh(encrypted32[wordIx + 2]);
+ encrypted3 = ~ ~this.ntoh(encrypted32[wordIx + 3]);
+
+ // decrypt the block
+ decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx);
+
+ // XOR with the IV, and restore network byte-order to obtain the
+ // plaintext
+ decrypted32[wordIx] = this.ntoh(decrypted32[wordIx] ^ init0);
+ decrypted32[wordIx + 1] = this.ntoh(decrypted32[wordIx + 1] ^ init1);
+ decrypted32[wordIx + 2] = this.ntoh(decrypted32[wordIx + 2] ^ init2);
+ decrypted32[wordIx + 3] = this.ntoh(decrypted32[wordIx + 3] ^ init3);
+
+ // setup the IV for the next round
+ init0 = encrypted0;
+ init1 = encrypted1;
+ init2 = encrypted2;
+ init3 = encrypted3;
+ }
+
+ return decrypted;
+ }
+ }, {
+ key: 'localDecrypt',
+ value: function localDecrypt(encrypted, key, initVector, decrypted) {
+ var bytes = this.doDecrypt(encrypted, key, initVector);
+ decrypted.set(bytes, encrypted.byteOffset);
+ }
+ }, {
+ key: 'decrypt',
+ value: function decrypt(encrypted) {
+ var step = 4 * 8000,
+
+ //encrypted32 = new Int32Array(encrypted.buffer),
+ encrypted32 = new Int32Array(encrypted),
+ decrypted = new Uint8Array(encrypted.byteLength),
+ i = 0;
+
+ // split up the encryption job and do the individual chunks asynchronously
+ var key = this.key;
+ var initVector = this.iv;
+ this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);
+
+ for (i = step; i < encrypted32.length; i += step) {
+ initVector = new Uint32Array([this.ntoh(encrypted32[i - 4]), this.ntoh(encrypted32[i - 3]), this.ntoh(encrypted32[i - 2]), this.ntoh(encrypted32[i - 1])]);
+ this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);
+ }
+
+ return decrypted;
+ }
+ }]);
+
+ return AES128Decrypter;
+ }();
+
+ exports.default = AES128Decrypter;
+
+ },{"13":13}],15:[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; }; }(); /*
+ * AES128 decryption.
+ */
+
+ var _aes128Decrypter = _dereq_(14);
+
+ var _aes128Decrypter2 = _interopRequireDefault(_aes128Decrypter);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ 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 Decrypter = function () {
+ function Decrypter(hls) {
+ _classCallCheck(this, Decrypter);
+
+ this.hls = hls;
+ try {
+ var browserCrypto = window ? window.crypto : crypto;
+ this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;
+ this.disableWebCrypto = !this.subtle;
+ } catch (e) {
+ this.disableWebCrypto = true;
+ }
+ }
+
+ _createClass(Decrypter, [{
+ key: 'destroy',
+ value: function destroy() {}
+ }, {
+ key: 'decrypt',
+ value: function decrypt(data, key, iv, callback) {
+ if (this.disableWebCrypto && this.hls.config.enableSoftwareAES) {
+ this.decryptBySoftware(data, key, iv, callback);
+ } else {
+ this.decryptByWebCrypto(data, key, iv, callback);
+ }
+ }
+ }, {
+ key: 'decryptByWebCrypto',
+ value: function decryptByWebCrypto(data, key, iv, callback) {
+ var _this = this;
+
+ _logger.logger.log('decrypting by WebCrypto API');
+
+ this.subtle.importKey('raw', key, { name: 'AES-CBC', length: 128 }, false, ['decrypt']).then(function (importedKey) {
+ _this.subtle.decrypt({ name: 'AES-CBC', iv: iv.buffer }, importedKey, data).then(callback).catch(function (err) {
+ _this.onWebCryptoError(err, data, key, iv, callback);
+ });
+ }).catch(function (err) {
+ _this.onWebCryptoError(err, data, key, iv, callback);
+ });
+ }
+ }, {
+ key: 'decryptBySoftware',
+ value: function decryptBySoftware(data, key8, iv8, callback) {
+ _logger.logger.log('decrypting by JavaScript Implementation');
+
+ var view = new DataView(key8.buffer);
+ var key = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);
+
+ view = new DataView(iv8.buffer);
+ var iv = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);
+
+ var decrypter = new _aes128Decrypter2.default(key, iv);
+ callback(decrypter.decrypt(data).buffer);
+ }
+ }, {
+ key: 'onWebCryptoError',
+ value: function onWebCryptoError(err, data, key, iv, callback) {
+ if (this.hls.config.enableSoftwareAES) {
+ _logger.logger.log('disabling to use WebCrypto API');
+ this.disableWebCrypto = true;
+ this.decryptBySoftware(data, key, iv, callback);
+ } else {
+ _logger.logger.error('decrypting error : ' + err.message);
+ this.hls.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_DECRYPT_ERROR, fatal: true, reason: err.message });
+ }
+ }
+ }]);
+
+ return Decrypter;
+ }();
+
+ exports.default = Decrypter;
+
+ },{"14":14,"24":24,"43":43}],16:[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; }; }(); /**
+ * AAC demuxer
+ */
+
+
+ var _adts = _dereq_(17);
+
+ var _adts2 = _interopRequireDefault(_adts);
+
+ var _logger = _dereq_(43);
+
+ var _id = _dereq_(22);
+
+ var _id2 = _interopRequireDefault(_id);
+
+ 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 AACDemuxer = function () {
+ function AACDemuxer(observer, id, remuxerClass, config) {
+ _classCallCheck(this, AACDemuxer);
+
+ this.observer = observer;
+ this.id = id;
+ this.remuxerClass = remuxerClass;
+ this.config = config;
+ this.remuxer = new this.remuxerClass(observer, id, config);
+ this.insertDiscontinuity();
+ }
+
+ _createClass(AACDemuxer, [{
+ key: 'insertDiscontinuity',
+ value: function insertDiscontinuity() {
+ this._aacTrack = { container: 'audio/adts', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };
+ }
+ }, {
+ key: 'push',
+
+
+ // feed incoming data to the front of the parsing pipeline
+ value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {
+ var track,
+ id3 = new _id2.default(data),
+ pts = 90 * id3.timeStamp,
+ config,
+ frameLength,
+ frameDuration,
+ frameIndex,
+ offset,
+ headerLength,
+ stamp,
+ len,
+ aacSample;
+
+ var contiguous = false;
+ if (cc !== this.lastCC) {
+ _logger.logger.log(this.id + ' discontinuity detected');
+ this.lastCC = cc;
+ this.insertDiscontinuity();
+ this.remuxer.switchLevel();
+ this.remuxer.insertDiscontinuity();
+ } else if (level !== this.lastLevel) {
+ _logger.logger.log('audio track switch detected');
+ this.lastLevel = level;
+ this.remuxer.switchLevel();
+ this.insertDiscontinuity();
+ } else if (sn === this.lastSN + 1) {
+ contiguous = true;
+ }
+ track = this._aacTrack;
+ this.lastSN = sn;
+ this.lastLevel = level;
+
+ // look for ADTS header (0xFFFx)
+ for (offset = id3.length, len = data.length; offset < len - 1; offset++) {
+ if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {
+ break;
+ }
+ }
+
+ if (!track.audiosamplerate) {
+ config = _adts2.default.getAudioConfig(this.observer, data, offset, audioCodec);
+ track.config = config.config;
+ track.audiosamplerate = config.samplerate;
+ track.channelCount = config.channelCount;
+ track.codec = config.codec;
+ track.duration = duration;
+ _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);
+ }
+ frameIndex = 0;
+ frameDuration = 1024 * 90000 / track.audiosamplerate;
+ while (offset + 5 < len) {
+ // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header
+ headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;
+ // retrieve frame size
+ frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;
+ frameLength -= headerLength;
+ //stamp = pes.pts;
+
+ if (frameLength > 0 && offset + headerLength + frameLength <= len) {
+ stamp = pts + frameIndex * frameDuration;
+ //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);
+ aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };
+ track.samples.push(aacSample);
+ track.len += frameLength;
+ offset += frameLength + headerLength;
+ frameIndex++;
+ // look for ADTS header (0xFFFx)
+ for (; offset < len - 1; offset++) {
+ if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {
+ break;
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ this.remuxer.remux(level, sn, this._aacTrack, { samples: [] }, { samples: [{ pts: pts, dts: pts, unit: id3.payload }] }, { samples: [] }, timeOffset, contiguous, accurateTimeOffset);
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy() {}
+ }], [{
+ key: 'probe',
+ value: function probe(data) {
+ // check if data contains ID3 timestamp and ADTS sync worc
+ var id3 = new _id2.default(data),
+ offset,
+ len;
+ if (id3.hasTimeStamp) {
+ // look for ADTS header (0xFFFx)
+ for (offset = id3.length, len = data.length; offset < len - 1; offset++) {
+ if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {
+ //logger.log('ADTS sync word found !');
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }]);
+
+ return AACDemuxer;
+ }();
+
+ exports.default = AACDemuxer;
+
+ },{"17":17,"22":22,"43":43}],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; }; }(); /**
+ * ADTS parser helper
+ */
+
+
+ var _logger = _dereq_(43);
+
+ var _errors = _dereq_(24);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var ADTS = function () {
+ function ADTS() {
+ _classCallCheck(this, ADTS);
+ }
+
+ _createClass(ADTS, null, [{
+ key: 'getAudioConfig',
+ value: function getAudioConfig(observer, data, offset, audioCodec) {
+ var adtsObjectType,
+ // :int
+ adtsSampleingIndex,
+ // :int
+ adtsExtensionSampleingIndex,
+ // :int
+ adtsChanelConfig,
+ // :int
+ config,
+ userAgent = navigator.userAgent.toLowerCase(),
+ adtsSampleingRates = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];
+ // byte 2
+ adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;
+ adtsSampleingIndex = (data[offset + 2] & 0x3C) >>> 2;
+ if (adtsSampleingIndex > adtsSampleingRates.length - 1) {
+ observer.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'invalid ADTS sampling index:' + adtsSampleingIndex });
+ return;
+ }
+ adtsChanelConfig = (data[offset + 2] & 0x01) << 2;
+ // byte 3
+ adtsChanelConfig |= (data[offset + 3] & 0xC0) >>> 6;
+ _logger.logger.log('manifest codec:' + audioCodec + ',ADTS data:type:' + adtsObjectType + ',sampleingIndex:' + adtsSampleingIndex + '[' + adtsSampleingRates[adtsSampleingIndex] + 'Hz],channelConfig:' + adtsChanelConfig);
+ // firefox/Opera: freq less than 24kHz = AAC SBR (HE-AAC)
+ if (/firefox|OPR/i.test(userAgent)) {
+ if (adtsSampleingIndex >= 6) {
+ adtsObjectType = 5;
+ config = new Array(4);
+ // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
+ // there is a factor 2 between frame sample rate and output sample rate
+ // multiply frequency by 2 (see table below, equivalent to substract 3)
+ adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
+ } else {
+ adtsObjectType = 2;
+ config = new Array(2);
+ adtsExtensionSampleingIndex = adtsSampleingIndex;
+ }
+ // Android : always use AAC
+ } else if (userAgent.indexOf('android') !== -1) {
+ adtsObjectType = 2;
+ config = new Array(2);
+ adtsExtensionSampleingIndex = adtsSampleingIndex;
+ } else {
+ /* for other browsers (Chrome/Vivaldi ...)
+ always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)
+ */
+ adtsObjectType = 5;
+ config = new Array(4);
+ // if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)
+ if (audioCodec && (audioCodec.indexOf('mp4a.40.29') !== -1 || audioCodec.indexOf('mp4a.40.5') !== -1) || !audioCodec && adtsSampleingIndex >= 6) {
+ // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies
+ // there is a factor 2 between frame sample rate and output sample rate
+ // multiply frequency by 2 (see table below, equivalent to substract 3)
+ adtsExtensionSampleingIndex = adtsSampleingIndex - 3;
+ } else {
+ // if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)
+ // Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.
+ if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && adtsSampleingIndex >= 6 && adtsChanelConfig === 1 || !audioCodec && adtsChanelConfig === 1) {
+ adtsObjectType = 2;
+ config = new Array(2);
+ }
+ adtsExtensionSampleingIndex = adtsSampleingIndex;
+ }
+ }
+ /* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config
+ ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()
+ Audio Profile / Audio Object Type
+ 0: Null
+ 1: AAC Main
+ 2: AAC LC (Low Complexity)
+ 3: AAC SSR (Scalable Sample Rate)
+ 4: AAC LTP (Long Term Prediction)
+ 5: SBR (Spectral Band Replication)
+ 6: AAC Scalable
+ sampling freq
+ 0: 96000 Hz
+ 1: 88200 Hz
+ 2: 64000 Hz
+ 3: 48000 Hz
+ 4: 44100 Hz
+ 5: 32000 Hz
+ 6: 24000 Hz
+ 7: 22050 Hz
+ 8: 16000 Hz
+ 9: 12000 Hz
+ 10: 11025 Hz
+ 11: 8000 Hz
+ 12: 7350 Hz
+ 13: Reserved
+ 14: Reserved
+ 15: frequency is written explictly
+ Channel Configurations
+ These are the channel configurations:
+ 0: Defined in AOT Specifc Config
+ 1: 1 channel: front-center
+ 2: 2 channels: front-left, front-right
+ */
+ // audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1
+ config[0] = adtsObjectType << 3;
+ // samplingFrequencyIndex
+ config[0] |= (adtsSampleingIndex & 0x0E) >> 1;
+ config[1] |= (adtsSampleingIndex & 0x01) << 7;
+ // channelConfiguration
+ config[1] |= adtsChanelConfig << 3;
+ if (adtsObjectType === 5) {
+ // adtsExtensionSampleingIndex
+ config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;
+ config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;
+ // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???
+ // https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc
+ config[2] |= 2 << 2;
+ config[3] = 0;
+ }
+ return { config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: 'mp4a.40.' + adtsObjectType };
+ }
+ }]);
+
+ return ADTS;
+ }();
+
+ exports.default = ADTS;
+
+ },{"24":24,"43":43}],18:[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; }; }(); /* inline demuxer.
+ * probe fragments and instantiate appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...)
+ */
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _errors = _dereq_(24);
+
+ var _aacdemuxer = _dereq_(16);
+
+ var _aacdemuxer2 = _interopRequireDefault(_aacdemuxer);
+
+ var _tsdemuxer = _dereq_(23);
+
+ var _tsdemuxer2 = _interopRequireDefault(_tsdemuxer);
+
+ var _mp4Remuxer = _dereq_(36);
+
+ var _mp4Remuxer2 = _interopRequireDefault(_mp4Remuxer);
+
+ var _passthroughRemuxer = _dereq_(37);
+
+ var _passthroughRemuxer2 = _interopRequireDefault(_passthroughRemuxer);
+
+ 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 DemuxerInline = function () {
+ function DemuxerInline(hls, id, typeSupported) {
+ var config = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];
+
+ _classCallCheck(this, DemuxerInline);
+
+ this.hls = hls;
+ this.id = id;
+ this.config = this.hls.config || config;
+ this.typeSupported = typeSupported;
+ }
+
+ _createClass(DemuxerInline, [{
+ key: 'destroy',
+ value: function destroy() {
+ var demuxer = this.demuxer;
+ if (demuxer) {
+ demuxer.destroy();
+ }
+ }
+ }, {
+ key: 'push',
+ value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {
+ var demuxer = this.demuxer;
+ if (!demuxer) {
+ var hls = this.hls,
+ id = this.id;
+ // probe for content type
+ if (_tsdemuxer2.default.probe(data)) {
+ if (this.typeSupported.mp2t === true) {
+ demuxer = new _tsdemuxer2.default(hls, id, _passthroughRemuxer2.default, this.config);
+ } else {
+ demuxer = new _tsdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);
+ }
+ } else if (_aacdemuxer2.default.probe(data)) {
+ demuxer = new _aacdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);
+ } else {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'no demux matching with content found' });
+ return;
+ }
+ this.demuxer = demuxer;
+ }
+ demuxer.push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);
+ }
+ }]);
+
+ return DemuxerInline;
+ }();
+
+ exports.default = DemuxerInline;
+
+ },{"16":16,"23":23,"24":24,"26":26,"36":36,"37":37}],19:[function(_dereq_,module,exports){
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _demuxerInline = _dereq_(18);
+
+ var _demuxerInline2 = _interopRequireDefault(_demuxerInline);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _logger = _dereq_(43);
+
+ var _events3 = _dereq_(1);
+
+ var _events4 = _interopRequireDefault(_events3);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /* demuxer web worker.
+ * - listen to worker message, and trigger DemuxerInline upon reception of Fragments.
+ * - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead.
+ */
+
+ var DemuxerWorker = function DemuxerWorker(self) {
+ // observer setup
+ var observer = new _events4.default();
+ observer.trigger = function trigger(event) {
+ for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ data[_key - 1] = arguments[_key];
+ }
+
+ observer.emit.apply(observer, [event, event].concat(data));
+ };
+
+ observer.off = function off(event) {
+ for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ data[_key2 - 1] = arguments[_key2];
+ }
+
+ observer.removeListener.apply(observer, [event].concat(data));
+ };
+
+ var forwardMessage = function forwardMessage(ev, data) {
+ self.postMessage({ event: ev, data: data });
+ };
+
+ self.addEventListener('message', function (ev) {
+ var data = ev.data;
+ //console.log('demuxer cmd:' + data.cmd);
+ switch (data.cmd) {
+ case 'init':
+ var config = JSON.parse(data.config);
+ self.demuxer = new _demuxerInline2.default(observer, data.id, data.typeSupported, config);
+ try {
+ (0, _logger.enableLogs)(config.debug);
+ } catch (err) {
+ console.warn('demuxerWorker: unable to enable logs');
+ }
+ // signal end of worker init
+ forwardMessage('init', null);
+ break;
+ case 'demux':
+ self.demuxer.push(new Uint8Array(data.data), data.audioCodec, data.videoCodec, data.timeOffset, data.cc, data.level, data.sn, data.duration, data.accurateTimeOffset);
+ break;
+ default:
+ break;
+ }
+ });
+
+ // forward events to main thread
+ observer.on(_events2.default.FRAG_PARSING_INIT_SEGMENT, forwardMessage);
+ observer.on(_events2.default.FRAG_PARSED, forwardMessage);
+ observer.on(_events2.default.ERROR, forwardMessage);
+ observer.on(_events2.default.FRAG_PARSING_METADATA, forwardMessage);
+ observer.on(_events2.default.FRAG_PARSING_USERDATA, forwardMessage);
+
+ // special case for FRAG_PARSING_DATA: pass data1/data2 as transferable object (no copy)
+ observer.on(_events2.default.FRAG_PARSING_DATA, function (ev, data) {
+ var data1 = data.data1.buffer,
+ data2 = data.data2.buffer;
+ // remove data1 and data2 reference from data to avoid copying them ...
+ delete data.data1;
+ delete data.data2;
+ self.postMessage({ event: ev, data: data, data1: data1, data2: data2 }, [data1, data2]);
+ });
+ };
+
+ exports.default = DemuxerWorker;
+
+ },{"1":1,"18":18,"26":26,"43":43}],20:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _demuxerInline = _dereq_(18);
+
+ var _demuxerInline2 = _interopRequireDefault(_demuxerInline);
+
+ var _demuxerWorker = _dereq_(19);
+
+ var _demuxerWorker2 = _interopRequireDefault(_demuxerWorker);
+
+ var _logger = _dereq_(43);
+
+ var _decrypter = _dereq_(15);
+
+ var _decrypter2 = _interopRequireDefault(_decrypter);
+
+ var _errors = _dereq_(24);
+
+ 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 Demuxer = function () {
+ function Demuxer(hls, id) {
+ _classCallCheck(this, Demuxer);
+
+ this.hls = hls;
+ this.id = id;
+ var typeSupported = {
+ mp4: MediaSource.isTypeSupported('video/mp4'),
+ mp2t: hls.config.enableMP2TPassThrough && MediaSource.isTypeSupported('video/mp2t')
+ };
+ if (hls.config.enableWorker && typeof Worker !== 'undefined') {
+ _logger.logger.log('demuxing in webworker');
+ var w = void 0;
+ try {
+ var work = _dereq_(2);
+ w = this.w = work(_demuxerWorker2.default);
+ this.onwmsg = this.onWorkerMessage.bind(this);
+ w.addEventListener('message', this.onwmsg);
+ w.onerror = function (event) {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: true, event: 'demuxerWorker', err: { message: event.message + ' (' + event.filename + ':' + event.lineno + ')' } });
+ };
+ w.postMessage({ cmd: 'init', typeSupported: typeSupported, id: id, config: JSON.stringify(hls.config) });
+ } catch (err) {
+ _logger.logger.error('error while initializing DemuxerWorker, fallback on DemuxerInline');
+ if (w) {
+ // revoke the Object URL that was used to create demuxer worker, so as not to leak it
+ URL.revokeObjectURL(w.objectURL);
+ }
+ this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);
+ }
+ } else {
+ this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);
+ }
+ this.demuxInitialized = true;
+ }
+
+ _createClass(Demuxer, [{
+ key: 'destroy',
+ value: function destroy() {
+ var w = this.w;
+ if (w) {
+ w.removeEventListener('message', this.onwmsg);
+ w.terminate();
+ this.w = null;
+ } else {
+ var demuxer = this.demuxer;
+ if (demuxer) {
+ demuxer.destroy();
+ this.demuxer = null;
+ }
+ }
+ var decrypter = this.decrypter;
+ if (decrypter) {
+ decrypter.destroy();
+ this.decrypter = null;
+ }
+ }
+ }, {
+ key: 'pushDecrypted',
+ value: function pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {
+ var w = this.w;
+ if (w) {
+ // post fragment payload as transferable objects (no copy)
+ w.postMessage({ cmd: 'demux', data: data, audioCodec: audioCodec, videoCodec: videoCodec, timeOffset: timeOffset, cc: cc, level: level, sn: sn, duration: duration, accurateTimeOffset: accurateTimeOffset }, [data]);
+ } else {
+ var demuxer = this.demuxer;
+ if (demuxer) {
+ demuxer.push(new Uint8Array(data), audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);
+ }
+ }
+ }
+ }, {
+ key: 'push',
+ value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, decryptdata, accurateTimeOffset) {
+ if (data.byteLength > 0 && decryptdata != null && decryptdata.key != null && decryptdata.method === 'AES-128') {
+ if (this.decrypter == null) {
+ this.decrypter = new _decrypter2.default(this.hls);
+ }
+
+ var localthis = this;
+ this.decrypter.decrypt(data, decryptdata.key, decryptdata.iv, function (decryptedData) {
+ localthis.pushDecrypted(decryptedData, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);
+ });
+ } else {
+ this.pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);
+ }
+ }
+ }, {
+ key: 'onWorkerMessage',
+ value: function onWorkerMessage(ev) {
+ var data = ev.data,
+ hls = this.hls;
+ //console.log('onWorkerMessage:' + data.event);
+ switch (data.event) {
+ case 'init':
+ // revoke the Object URL that was used to create demuxer worker, so as not to leak it
+ URL.revokeObjectURL(this.w.objectURL);
+ break;
+ // special case for FRAG_PARSING_DATA: data1 and data2 are transferable objects
+ case _events2.default.FRAG_PARSING_DATA:
+ data.data.data1 = new Uint8Array(data.data1);
+ data.data.data2 = new Uint8Array(data.data2);
+ /* falls through */
+ default:
+ hls.trigger(data.event, data.data);
+ break;
+ }
+ }
+ }]);
+
+ return Demuxer;
+ }();
+
+ exports.default = Demuxer;
+
+ },{"15":15,"18":18,"19":19,"2":2,"24":24,"26":26,"43":43}],21:[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; }; }(); /**
+ * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.
+ */
+
+ var _logger = _dereq_(43);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var ExpGolomb = function () {
+ function ExpGolomb(data) {
+ _classCallCheck(this, ExpGolomb);
+
+ this.data = data;
+ // the number of bytes left to examine in this.data
+ this.bytesAvailable = this.data.byteLength;
+ // the current word being examined
+ this.word = 0; // :uint
+ // the number of bits left to examine in the current word
+ this.bitsAvailable = 0; // :uint
+ }
+
+ // ():void
+
+
+ _createClass(ExpGolomb, [{
+ key: 'loadWord',
+ value: function loadWord() {
+ var position = this.data.byteLength - this.bytesAvailable,
+ workingBytes = new Uint8Array(4),
+ availableBytes = Math.min(4, this.bytesAvailable);
+ if (availableBytes === 0) {
+ throw new Error('no bytes available');
+ }
+ workingBytes.set(this.data.subarray(position, position + availableBytes));
+ this.word = new DataView(workingBytes.buffer).getUint32(0);
+ // track the amount of this.data that has been processed
+ this.bitsAvailable = availableBytes * 8;
+ this.bytesAvailable -= availableBytes;
+ }
+
+ // (count:int):void
+
+ }, {
+ key: 'skipBits',
+ value: function skipBits(count) {
+ var skipBytes; // :int
+ if (this.bitsAvailable > count) {
+ this.word <<= count;
+ this.bitsAvailable -= count;
+ } else {
+ count -= this.bitsAvailable;
+ skipBytes = count >> 3;
+ count -= skipBytes >> 3;
+ this.bytesAvailable -= skipBytes;
+ this.loadWord();
+ this.word <<= count;
+ this.bitsAvailable -= count;
+ }
+ }
+
+ // (size:int):uint
+
+ }, {
+ key: 'readBits',
+ value: function readBits(size) {
+ var bits = Math.min(this.bitsAvailable, size),
+ // :uint
+ valu = this.word >>> 32 - bits; // :uint
+ if (size > 32) {
+ _logger.logger.error('Cannot read more than 32 bits at a time');
+ }
+ this.bitsAvailable -= bits;
+ if (this.bitsAvailable > 0) {
+ this.word <<= bits;
+ } else if (this.bytesAvailable > 0) {
+ this.loadWord();
+ }
+ bits = size - bits;
+ if (bits > 0 && this.bitsAvailable) {
+ return valu << bits | this.readBits(bits);
+ } else {
+ return valu;
+ }
+ }
+
+ // ():uint
+
+ }, {
+ key: 'skipLZ',
+ value: function skipLZ() {
+ var leadingZeroCount; // :uint
+ for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {
+ if (0 !== (this.word & 0x80000000 >>> leadingZeroCount)) {
+ // the first bit of working word is 1
+ this.word <<= leadingZeroCount;
+ this.bitsAvailable -= leadingZeroCount;
+ return leadingZeroCount;
+ }
+ }
+ // we exhausted word and still have not found a 1
+ this.loadWord();
+ return leadingZeroCount + this.skipLZ();
+ }
+
+ // ():void
+
+ }, {
+ key: 'skipUEG',
+ value: function skipUEG() {
+ this.skipBits(1 + this.skipLZ());
+ }
+
+ // ():void
+
+ }, {
+ key: 'skipEG',
+ value: function skipEG() {
+ this.skipBits(1 + this.skipLZ());
+ }
+
+ // ():uint
+
+ }, {
+ key: 'readUEG',
+ value: function readUEG() {
+ var clz = this.skipLZ(); // :uint
+ return this.readBits(clz + 1) - 1;
+ }
+
+ // ():int
+
+ }, {
+ key: 'readEG',
+ value: function readEG() {
+ var valu = this.readUEG(); // :int
+ if (0x01 & valu) {
+ // the number is odd if the low order bit is set
+ return 1 + valu >>> 1; // add 1 to make it even, and divide by 2
+ } else {
+ return -1 * (valu >>> 1); // divide by two then make it negative
+ }
+ }
+
+ // Some convenience functions
+ // :Boolean
+
+ }, {
+ key: 'readBoolean',
+ value: function readBoolean() {
+ return 1 === this.readBits(1);
+ }
+
+ // ():int
+
+ }, {
+ key: 'readUByte',
+ value: function readUByte() {
+ return this.readBits(8);
+ }
+
+ // ():int
+
+ }, {
+ key: 'readUShort',
+ value: function readUShort() {
+ return this.readBits(16);
+ }
+ // ():int
+
+ }, {
+ key: 'readUInt',
+ value: function readUInt() {
+ return this.readBits(32);
+ }
+
+ /**
+ * Advance the ExpGolomb decoder past a scaling list. The scaling
+ * list is optionally transmitted as part of a sequence parameter
+ * set and is not relevant to transmuxing.
+ * @param count {number} the number of entries in this scaling list
+ * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1
+ */
+
+ }, {
+ key: 'skipScalingList',
+ value: function skipScalingList(count) {
+ var lastScale = 8,
+ nextScale = 8,
+ j,
+ deltaScale;
+ for (j = 0; j < count; j++) {
+ if (nextScale !== 0) {
+ deltaScale = this.readEG();
+ nextScale = (lastScale + deltaScale + 256) % 256;
+ }
+ lastScale = nextScale === 0 ? lastScale : nextScale;
+ }
+ }
+
+ /**
+ * Read a sequence parameter set and return some interesting video
+ * properties. A sequence parameter set is the H264 metadata that
+ * describes the properties of upcoming video frames.
+ * @param data {Uint8Array} the bytes of a sequence parameter set
+ * @return {object} an object with configuration parsed from the
+ * sequence parameter set, including the dimensions of the
+ * associated video frames.
+ */
+
+ }, {
+ key: 'readSPS',
+ value: function readSPS() {
+ var frameCropLeftOffset = 0,
+ frameCropRightOffset = 0,
+ frameCropTopOffset = 0,
+ frameCropBottomOffset = 0,
+ sarScale = 1,
+ profileIdc,
+ profileCompat,
+ levelIdc,
+ numRefFramesInPicOrderCntCycle,
+ picWidthInMbsMinus1,
+ picHeightInMapUnitsMinus1,
+ frameMbsOnlyFlag,
+ scalingListCount,
+ i;
+ this.readUByte();
+ profileIdc = this.readUByte(); // profile_idc
+ profileCompat = this.readBits(5); // constraint_set[0-4]_flag, u(5)
+ this.skipBits(3); // reserved_zero_3bits u(3),
+ levelIdc = this.readUByte(); //level_idc u(8)
+ this.skipUEG(); // seq_parameter_set_id
+ // some profiles have more optional data we don't need
+ if (profileIdc === 100 || profileIdc === 110 || profileIdc === 122 || profileIdc === 244 || profileIdc === 44 || profileIdc === 83 || profileIdc === 86 || profileIdc === 118 || profileIdc === 128) {
+ var chromaFormatIdc = this.readUEG();
+ if (chromaFormatIdc === 3) {
+ this.skipBits(1); // separate_colour_plane_flag
+ }
+ this.skipUEG(); // bit_depth_luma_minus8
+ this.skipUEG(); // bit_depth_chroma_minus8
+ this.skipBits(1); // qpprime_y_zero_transform_bypass_flag
+ if (this.readBoolean()) {
+ // seq_scaling_matrix_present_flag
+ scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;
+ for (i = 0; i < scalingListCount; i++) {
+ if (this.readBoolean()) {
+ // seq_scaling_list_present_flag[ i ]
+ if (i < 6) {
+ this.skipScalingList(16);
+ } else {
+ this.skipScalingList(64);
+ }
+ }
+ }
+ }
+ }
+ this.skipUEG(); // log2_max_frame_num_minus4
+ var picOrderCntType = this.readUEG();
+ if (picOrderCntType === 0) {
+ this.readUEG(); //log2_max_pic_order_cnt_lsb_minus4
+ } else if (picOrderCntType === 1) {
+ this.skipBits(1); // delta_pic_order_always_zero_flag
+ this.skipEG(); // offset_for_non_ref_pic
+ this.skipEG(); // offset_for_top_to_bottom_field
+ numRefFramesInPicOrderCntCycle = this.readUEG();
+ for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {
+ this.skipEG(); // offset_for_ref_frame[ i ]
+ }
+ }
+ this.skipUEG(); // max_num_ref_frames
+ this.skipBits(1); // gaps_in_frame_num_value_allowed_flag
+ picWidthInMbsMinus1 = this.readUEG();
+ picHeightInMapUnitsMinus1 = this.readUEG();
+ frameMbsOnlyFlag = this.readBits(1);
+ if (frameMbsOnlyFlag === 0) {
+ this.skipBits(1); // mb_adaptive_frame_field_flag
+ }
+ this.skipBits(1); // direct_8x8_inference_flag
+ if (this.readBoolean()) {
+ // frame_cropping_flag
+ frameCropLeftOffset = this.readUEG();
+ frameCropRightOffset = this.readUEG();
+ frameCropTopOffset = this.readUEG();
+ frameCropBottomOffset = this.readUEG();
+ }
+ if (this.readBoolean()) {
+ // vui_parameters_present_flag
+ if (this.readBoolean()) {
+ // aspect_ratio_info_present_flag
+ var sarRatio = void 0;
+ var aspectRatioIdc = this.readUByte();
+ switch (aspectRatioIdc) {
+ case 1:
+ sarRatio = [1, 1];break;
+ case 2:
+ sarRatio = [12, 11];break;
+ case 3:
+ sarRatio = [10, 11];break;
+ case 4:
+ sarRatio = [16, 11];break;
+ case 5:
+ sarRatio = [40, 33];break;
+ case 6:
+ sarRatio = [24, 11];break;
+ case 7:
+ sarRatio = [20, 11];break;
+ case 8:
+ sarRatio = [32, 11];break;
+ case 9:
+ sarRatio = [80, 33];break;
+ case 10:
+ sarRatio = [18, 11];break;
+ case 11:
+ sarRatio = [15, 11];break;
+ case 12:
+ sarRatio = [64, 33];break;
+ case 13:
+ sarRatio = [160, 99];break;
+ case 14:
+ sarRatio = [4, 3];break;
+ case 15:
+ sarRatio = [3, 2];break;
+ case 16:
+ sarRatio = [2, 1];break;
+ case 255:
+ {
+ sarRatio = [this.readUByte() << 8 | this.readUByte(), this.readUByte() << 8 | this.readUByte()];
+ break;
+ }
+ }
+ if (sarRatio) {
+ sarScale = sarRatio[0] / sarRatio[1];
+ }
+ }
+ }
+ return {
+ width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),
+ height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - (frameMbsOnlyFlag ? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset)
+ };
+ }
+ }, {
+ key: 'readSliceType',
+ value: function readSliceType() {
+ // skip NALu type
+ this.readUByte();
+ // discard first_mb_in_slice
+ this.readUEG();
+ // return slice_type
+ return this.readUEG();
+ }
+ }]);
+
+ return ExpGolomb;
+ }();
+
+ exports.default = ExpGolomb;
+
+ },{"43":43}],22:[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; }; }(); /**
+ * ID3 parser
+ */
+
+
+ var _logger = _dereq_(43);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ //import Hex from '../utils/hex';
+
+ var ID3 = function () {
+ function ID3(data) {
+ _classCallCheck(this, ID3);
+
+ this._hasTimeStamp = false;
+ var offset = 0,
+ byte1,
+ byte2,
+ byte3,
+ byte4,
+ tagSize,
+ endPos,
+ header,
+ len;
+ do {
+ header = this.readUTF(data, offset, 3);
+ offset += 3;
+ // first check for ID3 header
+ if (header === 'ID3') {
+ // skip 24 bits
+ offset += 3;
+ // retrieve tag(s) length
+ byte1 = data[offset++] & 0x7f;
+ byte2 = data[offset++] & 0x7f;
+ byte3 = data[offset++] & 0x7f;
+ byte4 = data[offset++] & 0x7f;
+ tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;
+ endPos = offset + tagSize;
+ //logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);
+
+ // read ID3 tags
+ this._parseID3Frames(data, offset, endPos);
+ offset = endPos;
+ } else if (header === '3DI') {
+ // http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer
+ offset += 7;
+ _logger.logger.log('3DI footer found, end: ' + offset);
+ } else {
+ offset -= 3;
+ len = offset;
+ if (len) {
+ //logger.log(`ID3 len: ${len}`);
+ if (!this.hasTimeStamp) {
+ _logger.logger.warn('ID3 tag found, but no timestamp');
+ }
+ this._length = len;
+ this._payload = data.subarray(0, len);
+ }
+ return;
+ }
+ } while (true);
+ }
+
+ _createClass(ID3, [{
+ key: 'readUTF',
+ value: function readUTF(data, start, len) {
+
+ var result = '',
+ offset = start,
+ end = start + len;
+ do {
+ result += String.fromCharCode(data[offset++]);
+ } while (offset < end);
+ return result;
+ }
+ }, {
+ key: '_parseID3Frames',
+ value: function _parseID3Frames(data, offset, endPos) {
+ var tagId, tagLen, tagStart, tagFlags, timestamp;
+ while (offset + 8 <= endPos) {
+ tagId = this.readUTF(data, offset, 4);
+ offset += 4;
+
+ tagLen = data[offset++] << 24 + data[offset++] << 16 + data[offset++] << 8 + data[offset++];
+
+ tagFlags = data[offset++] << 8 + data[offset++];
+
+ tagStart = offset;
+ //logger.log("ID3 tag id:" + tagId);
+ switch (tagId) {
+ case 'PRIV':
+ //logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));
+ // owner should be "com.apple.streaming.transportStreamTimestamp"
+ if (this.readUTF(data, offset, 44) === 'com.apple.streaming.transportStreamTimestamp') {
+ offset += 44;
+ // smelling even better ! we found the right descriptor
+ // skip null character (string end) + 3 first bytes
+ offset += 4;
+
+ // timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.
+ var pts33Bit = data[offset++] & 0x1;
+ this._hasTimeStamp = true;
+
+ timestamp = ((data[offset++] << 23) + (data[offset++] << 15) + (data[offset++] << 7) + data[offset++]) / 45;
+
+ if (pts33Bit) {
+ timestamp += 47721858.84; // 2^32 / 90
+ }
+ timestamp = Math.round(timestamp);
+ _logger.logger.trace('ID3 timestamp found: ' + timestamp);
+ this._timeStamp = timestamp;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }, {
+ key: 'hasTimeStamp',
+ get: function get() {
+ return this._hasTimeStamp;
+ }
+ }, {
+ key: 'timeStamp',
+ get: function get() {
+ return this._timeStamp;
+ }
+ }, {
+ key: 'length',
+ get: function get() {
+ return this._length;
+ }
+ }, {
+ key: 'payload',
+ get: function get() {
+ return this._payload;
+ }
+ }]);
+
+ return ID3;
+ }();
+
+ exports.default = ID3;
+
+ },{"43":43}],23:[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; }; }(); /**
+ * highly optimized TS demuxer:
+ * parse PAT, PMT
+ * extract PES packet from audio and video PIDs
+ * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet
+ * trigger the remuxer upon parsing completion
+ * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.
+ * it also controls the remuxing process :
+ * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.
+ */
+
+ // import Hex from '../utils/hex';
+
+
+ var _adts = _dereq_(17);
+
+ var _adts2 = _interopRequireDefault(_adts);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _expGolomb = _dereq_(21);
+
+ var _expGolomb2 = _interopRequireDefault(_expGolomb);
+
+ var _logger = _dereq_(43);
+
+ var _errors = _dereq_(24);
+
+ 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 TSDemuxer = function () {
+ function TSDemuxer(observer, id, remuxerClass, config) {
+ _classCallCheck(this, TSDemuxer);
+
+ this.observer = observer;
+ this.id = id;
+ this.remuxerClass = remuxerClass;
+ this.config = config;
+ this.lastCC = 0;
+ this.remuxer = new this.remuxerClass(observer, id, config);
+ }
+
+ _createClass(TSDemuxer, [{
+ key: 'switchLevel',
+ value: function switchLevel() {
+ this.pmtParsed = false;
+ this._pmtId = -1;
+ this._avcTrack = { container: 'video/mp2t', type: 'video', id: -1, sequenceNumber: 0, samples: [], len: 0, dropped: 0 };
+ this._aacTrack = { container: 'video/mp2t', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };
+ this._id3Track = { type: 'id3', id: -1, sequenceNumber: 0, samples: [], len: 0 };
+ this._txtTrack = { type: 'text', id: -1, sequenceNumber: 0, samples: [], len: 0 };
+ // flush any partial content
+ this.aacOverFlow = null;
+ this.aacLastPTS = null;
+ this.avcSample = null;
+ this.remuxer.switchLevel();
+ }
+ }, {
+ key: 'insertDiscontinuity',
+ value: function insertDiscontinuity() {
+ this.switchLevel();
+ this.remuxer.insertDiscontinuity();
+ }
+
+ // feed incoming data to the front of the parsing pipeline
+
+ }, {
+ key: 'push',
+ value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {
+ var start,
+ len = data.length,
+ stt,
+ pid,
+ atf,
+ offset,
+ pes,
+ codecsOnly = this.remuxer.passthrough,
+ unknownPIDs = false;
+
+ this.audioCodec = audioCodec;
+ this.videoCodec = videoCodec;
+ this._duration = duration;
+ this.contiguous = false;
+ this.accurateTimeOffset = accurateTimeOffset;
+ if (cc !== this.lastCC) {
+ _logger.logger.log('discontinuity detected');
+ this.insertDiscontinuity();
+ this.lastCC = cc;
+ }
+ if (level !== this.lastLevel) {
+ _logger.logger.log('level switch detected');
+ this.switchLevel();
+ this.lastLevel = level;
+ } else if (sn === this.lastSN + 1) {
+ this.contiguous = true;
+ }
+ this.lastSN = sn;
+
+ var pmtParsed = this.pmtParsed,
+ avcTrack = this._avcTrack,
+ aacTrack = this._aacTrack,
+ id3Track = this._id3Track,
+ avcId = avcTrack.id,
+ aacId = aacTrack.id,
+ id3Id = id3Track.id,
+ pmtId = this._pmtId,
+ avcData = avcTrack.pesData,
+ aacData = aacTrack.pesData,
+ id3Data = id3Track.pesData,
+ parsePAT = this._parsePAT,
+ parsePMT = this._parsePMT,
+ parsePES = this._parsePES,
+ parseAVCPES = this._parseAVCPES.bind(this),
+ parseAACPES = this._parseAACPES.bind(this),
+ parseID3PES = this._parseID3PES.bind(this);
+
+ // don't parse last TS packet if incomplete
+ len -= len % 188;
+ // loop through TS packets
+ for (start = 0; start < len; start += 188) {
+ if (data[start] === 0x47) {
+ stt = !!(data[start + 1] & 0x40);
+ // pid is a 13-bit field starting at the last bit of TS[1]
+ pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];
+ atf = (data[start + 3] & 0x30) >> 4;
+ // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.
+ if (atf > 1) {
+ offset = start + 5 + data[start + 4];
+ // continue if there is only adaptation field
+ if (offset === start + 188) {
+ continue;
+ }
+ } else {
+ offset = start + 4;
+ }
+ switch (pid) {
+ case avcId:
+ if (stt) {
+ if (avcData && (pes = parsePES(avcData))) {
+ parseAVCPES(pes, false);
+ if (codecsOnly) {
+ // if we have video codec info AND
+ // if audio PID is undefined OR if we have audio codec info,
+ // we have all codec info !
+ if (avcTrack.codec && (aacId === -1 || aacTrack.codec)) {
+ this.remux(level, sn, data, timeOffset);
+ return;
+ }
+ }
+ }
+ avcData = { data: [], size: 0 };
+ }
+ if (avcData) {
+ avcData.data.push(data.subarray(offset, start + 188));
+ avcData.size += start + 188 - offset;
+ }
+ break;
+ case aacId:
+ if (stt) {
+ if (aacData && (pes = parsePES(aacData))) {
+ parseAACPES(pes);
+ if (codecsOnly) {
+ // here we now that we have audio codec info
+ // if video PID is undefined OR if we have video codec info,
+ // we have all codec infos !
+ if (aacTrack.codec && (avcId === -1 || avcTrack.codec)) {
+ this.remux(level, sn, data, timeOffset);
+ return;
+ }
+ }
+ }
+ aacData = { data: [], size: 0 };
+ }
+ if (aacData) {
+ aacData.data.push(data.subarray(offset, start + 188));
+ aacData.size += start + 188 - offset;
+ }
+ break;
+ case id3Id:
+ if (stt) {
+ if (id3Data && (pes = parsePES(id3Data))) {
+ parseID3PES(pes);
+ }
+ id3Data = { data: [], size: 0 };
+ }
+ if (id3Data) {
+ id3Data.data.push(data.subarray(offset, start + 188));
+ id3Data.size += start + 188 - offset;
+ }
+ break;
+ case 0:
+ if (stt) {
+ offset += data[offset] + 1;
+ }
+ pmtId = this._pmtId = parsePAT(data, offset);
+ break;
+ case pmtId:
+ if (stt) {
+ offset += data[offset] + 1;
+ }
+ var parsedPIDs = parsePMT(data, offset);
+ avcId = avcTrack.id = parsedPIDs.avc;
+ aacId = aacTrack.id = parsedPIDs.aac;
+ id3Id = id3Track.id = parsedPIDs.id3;
+ if (unknownPIDs && !pmtParsed) {
+ _logger.logger.log('reparse from beginning');
+ unknownPIDs = false;
+ // we set it to -188, the += 188 in the for loop will reset start to 0
+ start = -188;
+ }
+ pmtParsed = this.pmtParsed = true;
+ break;
+ case 17:
+ case 0x1fff:
+ break;
+ default:
+ unknownPIDs = true;
+ break;
+ }
+ } else {
+ this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47' });
+ }
+ }
+ // try to parse last PES packets
+ if (avcData && (pes = parsePES(avcData))) {
+ parseAVCPES(pes, true);
+ avcTrack.pesData = null;
+ } else {
+ // either avcData null or PES truncated, keep it for next frag parsing
+ avcTrack.pesData = avcData;
+ }
+
+ if (aacData && (pes = parsePES(aacData))) {
+ parseAACPES(pes);
+ aacTrack.pesData = null;
+ } else {
+ if (aacData && aacData.size) {
+ _logger.logger.log('last AAC PES packet truncated,might overlap between fragments');
+ }
+ // either aacData null or PES truncated, keep it for next frag parsing
+ aacTrack.pesData = aacData;
+ }
+
+ if (id3Data && (pes = parsePES(id3Data))) {
+ parseID3PES(pes);
+ id3Track.pesData = null;
+ } else {
+ // either id3Data null or PES truncated, keep it for next frag parsing
+ id3Track.pesData = id3Data;
+ }
+ this.remux(level, sn, null, timeOffset);
+ }
+ }, {
+ key: 'remux',
+ value: function remux(level, sn, data, timeOffset) {
+ var avcTrack = this._avcTrack,
+ samples = avcTrack.samples;
+
+ // compute total/avc sample length and nb of NAL units
+ var trackData = samples.reduce(function (prevSampleData, curSample) {
+ var sampleData = curSample.units.units.reduce(function (prevUnitData, curUnit) {
+ return {
+ len: prevUnitData.len + curUnit.data.length,
+ nbNalu: prevUnitData.nbNalu + 1
+ };
+ }, { len: 0, nbNalu: 0 });
+ curSample.length = sampleData.len;
+ return {
+ len: prevSampleData.len + sampleData.len,
+ nbNalu: prevSampleData.nbNalu + sampleData.nbNalu
+ };
+ }, { len: 0, nbNalu: 0 });
+ avcTrack.len = trackData.len;
+ avcTrack.nbNalu = trackData.nbNalu;
+ this.remuxer.remux(level, sn, this._aacTrack, this._avcTrack, this._id3Track, this._txtTrack, timeOffset, this.contiguous, this.accurateTimeOffset, data);
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy() {
+ this.switchLevel();
+ this._initPTS = this._initDTS = undefined;
+ this._duration = 0;
+ }
+ }, {
+ key: '_parsePAT',
+ value: function _parsePAT(data, offset) {
+ // skip the PSI header and parse the first PMT entry
+ return (data[offset + 10] & 0x1F) << 8 | data[offset + 11];
+ //logger.log('PMT PID:' + this._pmtId);
+ }
+ }, {
+ key: '_parsePMT',
+ value: function _parsePMT(data, offset) {
+ var sectionLength,
+ tableEnd,
+ programInfoLength,
+ pid,
+ result = { aac: -1, avc: -1, id3: -1 };
+ sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];
+ tableEnd = offset + 3 + sectionLength - 4;
+ // to determine where the table is, we have to figure out how
+ // long the program info descriptors are
+ programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];
+ // advance the offset to the first entry in the mapping table
+ offset += 12 + programInfoLength;
+ while (offset < tableEnd) {
+ pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];
+ switch (data[offset]) {
+ // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)
+ case 0x0f:
+ //logger.log('AAC PID:' + pid);
+ if (result.aac === -1) {
+ result.aac = pid;
+ }
+ break;
+ // Packetized metadata (ID3)
+ case 0x15:
+ //logger.log('ID3 PID:' + pid);
+ if (result.id3 === -1) {
+ result.id3 = pid;
+ }
+ break;
+ // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)
+ case 0x1b:
+ //logger.log('AVC PID:' + pid);
+ if (result.avc === -1) {
+ result.avc = pid;
+ }
+ break;
+ case 0x24:
+ _logger.logger.warn('HEVC stream type found, not supported for now');
+ break;
+ default:
+ _logger.logger.log('unkown stream type:' + data[offset]);
+ break;
+ }
+ // move to the next table entry
+ // skip past the elementary stream descriptors, if present
+ offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;
+ }
+ return result;
+ }
+ }, {
+ key: '_parsePES',
+ value: function _parsePES(stream) {
+ var i = 0,
+ frag,
+ pesFlags,
+ pesPrefix,
+ pesLen,
+ pesHdrLen,
+ pesData,
+ pesPts,
+ pesDts,
+ payloadStartOffset,
+ data = stream.data;
+ // safety check
+ if (!stream || stream.size === 0) {
+ return null;
+ }
+
+ // we might need up to 19 bytes to read PES header
+ // if first chunk of data is less than 19 bytes, let's merge it with following ones until we get 19 bytes
+ // usually only one merge is needed (and this is rare ...)
+ while (data[0].length < 19 && data.length > 1) {
+ var newData = new Uint8Array(data[0].length + data[1].length);
+ newData.set(data[0]);
+ newData.set(data[1], data[0].length);
+ data[0] = newData;
+ data.splice(1, 1);
+ }
+ //retrieve PTS/DTS from first fragment
+ frag = data[0];
+ pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];
+ if (pesPrefix === 1) {
+ pesLen = (frag[4] << 8) + frag[5];
+ // if PES len is not zero and not matching with total len, stop parsing. PES might be truncated
+ // minus 6 : PES header size
+ if (pesLen && pesLen !== stream.size - 6) {
+ return null;
+ }
+ pesFlags = frag[7];
+ if (pesFlags & 0xC0) {
+ /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html
+ as PTS / DTS is 33 bit we cannot use bitwise operator in JS,
+ as Bitwise operators treat their operands as a sequence of 32 bits */
+ pesPts = (frag[9] & 0x0E) * 536870912 + // 1 << 29
+ (frag[10] & 0xFF) * 4194304 + // 1 << 22
+ (frag[11] & 0xFE) * 16384 + // 1 << 14
+ (frag[12] & 0xFF) * 128 + // 1 << 7
+ (frag[13] & 0xFE) / 2;
+ // check if greater than 2^32 -1
+ if (pesPts > 4294967295) {
+ // decrement 2^33
+ pesPts -= 8589934592;
+ }
+ if (pesFlags & 0x40) {
+ pesDts = (frag[14] & 0x0E) * 536870912 + // 1 << 29
+ (frag[15] & 0xFF) * 4194304 + // 1 << 22
+ (frag[16] & 0xFE) * 16384 + // 1 << 14
+ (frag[17] & 0xFF) * 128 + // 1 << 7
+ (frag[18] & 0xFE) / 2;
+ // check if greater than 2^32 -1
+ if (pesDts > 4294967295) {
+ // decrement 2^33
+ pesDts -= 8589934592;
+ }
+ } else {
+ pesDts = pesPts;
+ }
+ }
+ pesHdrLen = frag[8];
+ // 9 bytes : 6 bytes for PES header + 3 bytes for PES extension
+ payloadStartOffset = pesHdrLen + 9;
+
+ stream.size -= payloadStartOffset;
+ //reassemble PES packet
+ pesData = new Uint8Array(stream.size);
+ while (data.length) {
+ frag = data.shift();
+ var len = frag.byteLength;
+ if (payloadStartOffset) {
+ if (payloadStartOffset > len) {
+ // trim full frag if PES header bigger than frag
+ payloadStartOffset -= len;
+ continue;
+ } else {
+ // trim partial frag if PES header smaller than frag
+ frag = frag.subarray(payloadStartOffset);
+ len -= payloadStartOffset;
+ payloadStartOffset = 0;
+ }
+ }
+ pesData.set(frag, i);
+ i += len;
+ }
+ if (pesLen) {
+ // payload size : remove PES header + PES extension
+ pesLen -= pesHdrLen + 3;
+ }
+ return { data: pesData, pts: pesPts, dts: pesDts, len: pesLen };
+ } else {
+ return null;
+ }
+ }
+ }, {
+ key: 'pushAccesUnit',
+ value: function pushAccesUnit(avcSample, avcTrack) {
+ if (avcSample.units.units.length) {
+ // only push AVC sample if starting with a keyframe is not mandatory OR
+ // if keyframe already found in this fragment OR
+ // keyframe found in last fragment (track.sps) AND
+ // samples already appended (we already found a keyframe in this fragment) OR fragment is contiguous
+ if (!this.config.forceKeyFrameOnDiscontinuity || avcSample.key === true || avcTrack.sps && (avcTrack.samples.length || this.contiguous)) {
+ avcTrack.samples.push(avcSample);
+ } else {
+ // dropped samples, track it
+ avcTrack.dropped++;
+ }
+ }
+ if (avcSample.debug.length) {
+ _logger.logger.log(avcSample.pts + '/' + avcSample.dts + ':' + avcSample.debug + ',' + avcSample.units.length);
+ }
+ }
+ }, {
+ key: '_parseAVCPES',
+ value: function _parseAVCPES(pes, last) {
+ var _this = this;
+
+ //logger.log('parse new PES');
+ var track = this._avcTrack,
+ units = this._parseAVCNALu(pes.data),
+ debug = false,
+ expGolombDecoder,
+ avcSample = this.avcSample,
+ push,
+ i;
+ //free pes.data to save up some memory
+ pes.data = null;
+
+ units.forEach(function (unit) {
+ switch (unit.type) {
+ //NDR
+ case 1:
+ push = true;
+ if (debug && avcSample) {
+ avcSample.debug += 'NDR ';
+ }
+ break;
+ //IDR
+ case 5:
+ push = true;
+ // handle PES not starting with AUD
+ if (!avcSample) {
+ avcSample = _this.avcSample = _this._createAVCSample(true, pes.pts, pes.dts, '');
+ }
+ if (debug) {
+ avcSample.debug += 'IDR ';
+ }
+ avcSample.key = true;
+ break;
+ //SEI
+ case 6:
+ push = true;
+ if (debug && avcSample) {
+ avcSample.debug += 'SEI ';
+ }
+ expGolombDecoder = new _expGolomb2.default(_this.discardEPB(unit.data));
+
+ // skip frameType
+ expGolombDecoder.readUByte();
+
+ var payloadType = 0;
+ var payloadSize = 0;
+ var endOfCaptions = false;
+ var b = 0;
+
+ while (!endOfCaptions && expGolombDecoder.bytesAvailable > 1) {
+ payloadType = 0;
+ do {
+ b = expGolombDecoder.readUByte();
+ payloadType += b;
+ } while (b === 0xFF);
+
+ // Parse payload size.
+ payloadSize = 0;
+ do {
+ b = expGolombDecoder.readUByte();
+ payloadSize += b;
+ } while (b === 0xFF);
+
+ // TODO: there can be more than one payload in an SEI packet...
+ // TODO: need to read type and size in a while loop to get them all
+ if (payloadType === 4 && expGolombDecoder.bytesAvailable !== 0) {
+
+ endOfCaptions = true;
+
+ var countryCode = expGolombDecoder.readUByte();
+
+ if (countryCode === 181) {
+ var providerCode = expGolombDecoder.readUShort();
+
+ if (providerCode === 49) {
+ var userStructure = expGolombDecoder.readUInt();
+
+ if (userStructure === 0x47413934) {
+ var userDataType = expGolombDecoder.readUByte();
+
+ // Raw CEA-608 bytes wrapped in CEA-708 packet
+ if (userDataType === 3) {
+ var firstByte = expGolombDecoder.readUByte();
+ var secondByte = expGolombDecoder.readUByte();
+
+ var totalCCs = 31 & firstByte;
+ var byteArray = [firstByte, secondByte];
+
+ for (i = 0; i < totalCCs; i++) {
+ // 3 bytes per CC
+ byteArray.push(expGolombDecoder.readUByte());
+ byteArray.push(expGolombDecoder.readUByte());
+ byteArray.push(expGolombDecoder.readUByte());
+ }
+
+ _this._insertSampleInOrder(_this._txtTrack.samples, { type: 3, pts: pes.pts, bytes: byteArray });
+ }
+ }
+ }
+ }
+ } else if (payloadSize < expGolombDecoder.bytesAvailable) {
+ for (i = 0; i < payloadSize; i++) {
+ expGolombDecoder.readUByte();
+ }
+ }
+ }
+ break;
+ //SPS
+ case 7:
+ push = true;
+ if (debug && avcSample) {
+ avcSample.debug += 'SPS ';
+ }
+ if (!track.sps) {
+ expGolombDecoder = new _expGolomb2.default(unit.data);
+ var config = expGolombDecoder.readSPS();
+ track.width = config.width;
+ track.height = config.height;
+ track.sps = [unit.data];
+ track.duration = _this._duration;
+ var codecarray = unit.data.subarray(1, 4);
+ var codecstring = 'avc1.';
+ for (i = 0; i < 3; i++) {
+ var h = codecarray[i].toString(16);
+ if (h.length < 2) {
+ h = '0' + h;
+ }
+ codecstring += h;
+ }
+ track.codec = codecstring;
+ }
+ break;
+ //PPS
+ case 8:
+ push = true;
+ if (debug && avcSample) {
+ avcSample.debug += 'PPS ';
+ }
+ if (!track.pps) {
+ track.pps = [unit.data];
+ }
+ break;
+ // AUD
+ case 9:
+ push = false;
+ if (avcSample) {
+ _this.pushAccesUnit(avcSample, track);
+ }
+ avcSample = _this.avcSample = _this._createAVCSample(false, pes.pts, pes.dts, debug ? 'AUD ' : '');
+ break;
+ // Filler Data
+ case 12:
+ push = false;
+ break;
+ default:
+ push = false;
+ if (avcSample) {
+ avcSample.debug += 'unknown NAL ' + unit.type + ' ';
+ }
+ break;
+ }
+ if (avcSample && push) {
+ var _units = avcSample.units;
+ _units.units.push(unit);
+ }
+ });
+ // if last PES packet, push samples
+ if (last && avcSample) {
+ this.pushAccesUnit(avcSample, track);
+ this.avcSample = null;
+ }
+ }
+ }, {
+ key: '_createAVCSample',
+ value: function _createAVCSample(key, pts, dts, debug) {
+ return { key: key, pts: pts, dts: dts, units: { units: [], length: 0 }, debug: debug };
+ }
+ }, {
+ key: '_insertSampleInOrder',
+ value: function _insertSampleInOrder(arr, data) {
+ var len = arr.length;
+ if (len > 0) {
+ if (data.pts >= arr[len - 1].pts) {
+ arr.push(data);
+ } else {
+ for (var pos = len - 1; pos >= 0; pos--) {
+ if (data.pts < arr[pos].pts) {
+ arr.splice(pos, 0, data);
+ break;
+ }
+ }
+ }
+ } else {
+ arr.push(data);
+ }
+ }
+ }, {
+ key: '_getLastNalUnit',
+ value: function _getLastNalUnit() {
+ var avcSample = this.avcSample,
+ lastUnit = void 0;
+ // try to fallback to previous sample if current one is empty
+ if (!avcSample || avcSample.units.units.length === 0) {
+ var track = this._avcTrack,
+ samples = track.samples;
+ avcSample = samples[samples.length - 1];
+ }
+ if (avcSample) {
+ var units = avcSample.units.units;
+ lastUnit = units[units.length - 1];
+ }
+ return lastUnit;
+ }
+ }, {
+ key: '_parseAVCNALu',
+ value: function _parseAVCNALu(array) {
+ var i = 0,
+ len = array.byteLength,
+ value,
+ overflow,
+ track = this._avcTrack,
+ state = track.naluState || 0,
+ lastState = state;
+ var units = [],
+ unit,
+ unitType,
+ lastUnitStart = -1,
+ lastUnitType;
+ //logger.log('PES:' + Hex.hexDump(array));
+ while (i < len) {
+ value = array[i++];
+ // finding 3 or 4-byte start codes (00 00 01 OR 00 00 00 01)
+ switch (state) {
+ case 0:
+ if (value === 0) {
+ state = 1;
+ }
+ break;
+ case 1:
+ if (value === 0) {
+ state = 2;
+ } else {
+ state = 0;
+ }
+ break;
+ case 2:
+ case 3:
+ if (value === 0) {
+ state = 3;
+ } else if (value === 1) {
+ if (lastUnitStart >= 0) {
+ unit = { data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType };
+ //logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);
+ units.push(unit);
+ } else {
+ // lastUnitStart is undefined => this is the first start code found in this PES packet
+ // first check if start code delimiter is overlapping between 2 PES packets,
+ // ie it started in last packet (lastState not zero)
+ // and ended at the beginning of this PES packet (i <= 4 - lastState)
+ var lastUnit = this._getLastNalUnit();
+ if (lastUnit) {
+ if (lastState && i <= 4 - lastState) {
+ // start delimiter overlapping between PES packets
+ // strip start delimiter bytes from the end of last NAL unit
+ // check if lastUnit had a state different from zero
+ if (lastUnit.state) {
+ // strip last bytes
+ lastUnit.data = lastUnit.data.subarray(0, lastUnit.data.byteLength - lastState);
+ }
+ }
+ // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.
+ overflow = i - state - 1;
+ if (overflow > 0) {
+ //logger.log('first NALU found with overflow:' + overflow);
+ var tmp = new Uint8Array(lastUnit.data.byteLength + overflow);
+ tmp.set(lastUnit.data, 0);
+ tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);
+ lastUnit.data = tmp;
+ }
+ }
+ }
+ // check if we can read unit type
+ if (i < len) {
+ unitType = array[i] & 0x1f;
+ //logger.log('find NALU @ offset:' + i + ',type:' + unitType);
+ lastUnitStart = i;
+ lastUnitType = unitType;
+ state = 0;
+ } else {
+ // not enough byte to read unit type. let's read it on next PES parsing
+ state = -1;
+ }
+ } else {
+ state = 0;
+ }
+ break;
+ case -1:
+ // special use case where we found 3 or 4-byte start codes exactly at the end of previous PES packet
+ lastUnitStart = 0;
+ // NALu type is value read from offset 0
+ lastUnitType = value & 0x1f;
+ state = 0;
+ break;
+ default:
+ break;
+ }
+ }
+ if (lastUnitStart >= 0 && state >= 0) {
+ unit = { data: array.subarray(lastUnitStart, len), type: lastUnitType, state: state };
+ units.push(unit);
+ //logger.log('pushing NALU, type/size/state:' + unit.type + '/' + unit.data.byteLength + '/' + state);
+ }
+ // no NALu found
+ if (units.length === 0) {
+ // append pes.data to previous NAL unit
+ var _lastUnit = this._getLastNalUnit();
+ if (_lastUnit) {
+ var _tmp = new Uint8Array(_lastUnit.data.byteLength + array.byteLength);
+ _tmp.set(_lastUnit.data, 0);
+ _tmp.set(array, _lastUnit.data.byteLength);
+ _lastUnit.data = _tmp;
+ }
+ }
+ track.naluState = state;
+ return units;
+ }
+
+ /**
+ * remove Emulation Prevention bytes from a RBSP
+ */
+
+ }, {
+ key: 'discardEPB',
+ value: function discardEPB(data) {
+ var length = data.byteLength,
+ EPBPositions = [],
+ i = 1,
+ newLength,
+ newData;
+
+ // Find all `Emulation Prevention Bytes`
+ while (i < length - 2) {
+ if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {
+ EPBPositions.push(i + 2);
+ i += 2;
+ } else {
+ i++;
+ }
+ }
+
+ // If no Emulation Prevention Bytes were found just return the original
+ // array
+ if (EPBPositions.length === 0) {
+ return data;
+ }
+
+ // Create a new array to hold the NAL unit data
+ newLength = length - EPBPositions.length;
+ newData = new Uint8Array(newLength);
+ var sourceIndex = 0;
+
+ for (i = 0; i < newLength; sourceIndex++, i++) {
+ if (sourceIndex === EPBPositions[0]) {
+ // Skip this byte
+ sourceIndex++;
+ // Remove this position index
+ EPBPositions.shift();
+ }
+ newData[i] = data[sourceIndex];
+ }
+ return newData;
+ }
+ }, {
+ key: '_parseAACPES',
+ value: function _parseAACPES(pes) {
+ var track = this._aacTrack,
+ data = pes.data,
+ pts = pes.pts,
+ startOffset = 0,
+ aacOverFlow = this.aacOverFlow,
+ aacLastPTS = this.aacLastPTS,
+ config,
+ frameLength,
+ frameDuration,
+ frameIndex,
+ offset,
+ headerLength,
+ stamp,
+ len,
+ aacSample;
+ if (aacOverFlow) {
+ var tmp = new Uint8Array(aacOverFlow.byteLength + data.byteLength);
+ tmp.set(aacOverFlow, 0);
+ tmp.set(data, aacOverFlow.byteLength);
+ //logger.log(`AAC: append overflowing ${aacOverFlow.byteLength} bytes to beginning of new PES`);
+ data = tmp;
+ }
+ // look for ADTS header (0xFFFx)
+ for (offset = startOffset, len = data.length; offset < len - 1; offset++) {
+ if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {
+ break;
+ }
+ }
+ // if ADTS header does not start straight from the beginning of the PES payload, raise an error
+ if (offset) {
+ var reason, fatal;
+ if (offset < len - 1) {
+ reason = 'AAC PES did not start with ADTS header,offset:' + offset;
+ fatal = false;
+ } else {
+ reason = 'no ADTS header found in AAC PES';
+ fatal = true;
+ }
+ _logger.logger.warn('parsing error:' + reason);
+ this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason });
+ if (fatal) {
+ return;
+ }
+ }
+ if (!track.audiosamplerate) {
+ config = _adts2.default.getAudioConfig(this.observer, data, offset, this.audioCodec);
+ track.config = config.config;
+ track.audiosamplerate = config.samplerate;
+ track.channelCount = config.channelCount;
+ track.codec = config.codec;
+ track.duration = this._duration;
+ _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);
+ }
+ frameIndex = 0;
+ frameDuration = 1024 * 90000 / track.audiosamplerate;
+
+ // if last AAC frame is overflowing, we should ensure timestamps are contiguous:
+ // first sample PTS should be equal to last sample PTS + frameDuration
+ if (aacOverFlow && aacLastPTS) {
+ var newPTS = aacLastPTS + frameDuration;
+ if (Math.abs(newPTS - pts) > 1) {
+ _logger.logger.log('AAC: align PTS for overlapping frames by ' + Math.round((newPTS - pts) / 90));
+ pts = newPTS;
+ }
+ }
+
+ while (offset + 5 < len) {
+ // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header
+ headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;
+ // retrieve frame size
+ frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;
+ frameLength -= headerLength;
+ //stamp = pes.pts;
+
+ if (frameLength > 0 && offset + headerLength + frameLength <= len) {
+ stamp = pts + frameIndex * frameDuration;
+ //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);
+ aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };
+ track.samples.push(aacSample);
+ track.len += frameLength;
+ offset += frameLength + headerLength;
+ frameIndex++;
+ // look for ADTS header (0xFFFx)
+ for (; offset < len - 1; offset++) {
+ if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {
+ break;
+ }
+ }
+ } else {
+ break;
+ }
+ }
+ if (offset < len) {
+ aacOverFlow = data.subarray(offset, len);
+ //logger.log(`AAC: overflow detected:${len-offset}`);
+ } else {
+ aacOverFlow = null;
+ }
+ this.aacOverFlow = aacOverFlow;
+ this.aacLastPTS = stamp;
+ }
+ }, {
+ key: '_parseID3PES',
+ value: function _parseID3PES(pes) {
+ this._id3Track.samples.push(pes);
+ }
+ }], [{
+ key: 'probe',
+ value: function probe(data) {
+ // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47
+ if (data.length >= 3 * 188 && data[0] === 0x47 && data[188] === 0x47 && data[2 * 188] === 0x47) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }]);
+
+ return TSDemuxer;
+ }();
+
+ exports.default = TSDemuxer;
+
+ },{"17":17,"21":21,"24":24,"26":26,"43":43}],24:[function(_dereq_,module,exports){
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ var ErrorTypes = exports.ErrorTypes = {
+ // Identifier for a network error (loading error / timeout ...)
+ NETWORK_ERROR: 'networkError',
+ // Identifier for a media Error (video/parsing/mediasource error)
+ MEDIA_ERROR: 'mediaError',
+ // Identifier for all other errors
+ OTHER_ERROR: 'otherError'
+ };
+
+ var ErrorDetails = exports.ErrorDetails = {
+ // Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}
+ MANIFEST_LOAD_ERROR: 'manifestLoadError',
+ // Identifier for a manifest load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}
+ MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',
+ // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}
+ MANIFEST_PARSING_ERROR: 'manifestParsingError',
+ // Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}
+ MANIFEST_INCOMPATIBLE_CODECS_ERROR: 'manifestIncompatibleCodecsError',
+ // Identifier for a level load error - data: { url : faulty URL, response : { code: error code, text: error text }}
+ LEVEL_LOAD_ERROR: 'levelLoadError',
+ // Identifier for a level load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}
+ LEVEL_LOAD_TIMEOUT: 'levelLoadTimeOut',
+ // Identifier for a level switch error - data: { level : faulty level Id, event : error description}
+ LEVEL_SWITCH_ERROR: 'levelSwitchError',
+ // Identifier for an audio track load error - data: { url : faulty URL, response : { code: error code, text: error text }}
+ AUDIO_TRACK_LOAD_ERROR: 'audioTrackLoadError',
+ // Identifier for an audio track load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}
+ AUDIO_TRACK_LOAD_TIMEOUT: 'audioTrackLoadTimeOut',
+ // Identifier for fragment load error - data: { frag : fragment object, response : { code: error code, text: error text }}
+ FRAG_LOAD_ERROR: 'fragLoadError',
+ // Identifier for fragment loop loading error - data: { frag : fragment object}
+ FRAG_LOOP_LOADING_ERROR: 'fragLoopLoadingError',
+ // Identifier for fragment load timeout error - data: { frag : fragment object}
+ FRAG_LOAD_TIMEOUT: 'fragLoadTimeOut',
+ // Identifier for a fragment decryption error event - data: parsing error description
+ FRAG_DECRYPT_ERROR: 'fragDecryptError',
+ // Identifier for a fragment parsing error event - data: parsing error description
+ FRAG_PARSING_ERROR: 'fragParsingError',
+ // Identifier for decrypt key load error - data: { frag : fragment object, response : { code: error code, text: error text }}
+ KEY_LOAD_ERROR: 'keyLoadError',
+ // Identifier for decrypt key load timeout error - data: { frag : fragment object}
+ KEY_LOAD_TIMEOUT: 'keyLoadTimeOut',
+ // Triggered when an exception occurs while adding a sourceBuffer to MediaSource - data : { err : exception , mimeType : mimeType }
+ BUFFER_ADD_CODEC_ERROR: 'bufferAddCodecError',
+ // Identifier for a buffer append error - data: append error description
+ BUFFER_APPEND_ERROR: 'bufferAppendError',
+ // Identifier for a buffer appending error event - data: appending error description
+ BUFFER_APPENDING_ERROR: 'bufferAppendingError',
+ // Identifier for a buffer stalled error event
+ BUFFER_STALLED_ERROR: 'bufferStalledError',
+ // Identifier for a buffer full event
+ BUFFER_FULL_ERROR: 'bufferFullError',
+ // Identifier for a buffer seek over hole event
+ BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',
+ // Identifier for an internal exception happening inside hls.js while handling an event
+ INTERNAL_EXCEPTION: 'internalException'
+ };
+
+ },{}],25:[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 ? "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; }; }(); /*
+ *
+ * All objects in the event handling chain should inherit from this class
+ *
+ */
+
+ var _logger = _dereq_(43);
+
+ var _errors = _dereq_(24);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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 EventHandler = function () {
+ function EventHandler(hls) {
+ _classCallCheck(this, EventHandler);
+
+ this.hls = hls;
+ this.onEvent = this.onEvent.bind(this);
+
+ for (var _len = arguments.length, events = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ events[_key - 1] = arguments[_key];
+ }
+
+ this.handledEvents = events;
+ this.useGenericHandler = true;
+
+ this.registerListeners();
+ }
+
+ _createClass(EventHandler, [{
+ key: 'destroy',
+ value: function destroy() {
+ this.unregisterListeners();
+ }
+ }, {
+ key: 'isEventHandler',
+ value: function isEventHandler() {
+ return _typeof(this.handledEvents) === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';
+ }
+ }, {
+ key: 'registerListeners',
+ value: function registerListeners() {
+ if (this.isEventHandler()) {
+ this.handledEvents.forEach(function (event) {
+ if (event === 'hlsEventGeneric') {
+ throw new Error('Forbidden event name: ' + event);
+ }
+ this.hls.on(event, this.onEvent);
+ }.bind(this));
+ }
+ }
+ }, {
+ key: 'unregisterListeners',
+ value: function unregisterListeners() {
+ if (this.isEventHandler()) {
+ this.handledEvents.forEach(function (event) {
+ this.hls.off(event, this.onEvent);
+ }.bind(this));
+ }
+ }
+
+ /**
+ * arguments: event (string), data (any)
+ */
+
+ }, {
+ key: 'onEvent',
+ value: function onEvent(event, data) {
+ this.onEventGeneric(event, data);
+ }
+ }, {
+ key: 'onEventGeneric',
+ value: function onEventGeneric(event, data) {
+ var eventToFunction = function eventToFunction(event, data) {
+ var funcName = 'on' + event.replace('hls', '');
+ if (typeof this[funcName] !== 'function') {
+ throw new Error('Event ' + event + ' has no generic handler in this ' + this.constructor.name + ' class (tried ' + funcName + ')');
+ }
+ return this[funcName].bind(this, data);
+ };
+ try {
+ eventToFunction.call(this, event, data).call();
+ } catch (err) {
+ _logger.logger.error('internal error happened while processing ' + event + ':' + err.message);
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });
+ }
+ }
+ }]);
+
+ return EventHandler;
+ }();
+
+ exports.default = EventHandler;
+
+ },{"24":24,"26":26,"43":43}],26:[function(_dereq_,module,exports){
+ 'use strict';
+
+ module.exports = {
+ // fired before MediaSource is attaching to media element - data: { media }
+ MEDIA_ATTACHING: 'hlsMediaAttaching',
+ // fired when MediaSource has been succesfully attached to media element - data: { }
+ MEDIA_ATTACHED: 'hlsMediaAttached',
+ // fired before detaching MediaSource from media element - data: { }
+ MEDIA_DETACHING: 'hlsMediaDetaching',
+ // fired when MediaSource has been detached from media element - data: { }
+ MEDIA_DETACHED: 'hlsMediaDetached',
+ // fired when we buffer is going to be resetted
+ BUFFER_RESET: 'hlsBufferReset',
+ // fired when we know about the codecs that we need buffers for to push into - data: {tracks : { container, codec, levelCodec, initSegment, metadata }}
+ BUFFER_CODECS: 'hlsBufferCodecs',
+ // fired when sourcebuffers have been created data: { tracks : tracks}
+ BUFFER_CREATED: 'hlsBufferCreated',
+ // fired when we append a segment to the buffer - data: { segment: segment object }
+ BUFFER_APPENDING: 'hlsBufferAppending',
+ // fired when we are done with appending a media segment to the buffer data : { parent : segment parent that triggered BUFFER_APPENDING }
+ BUFFER_APPENDED: 'hlsBufferAppended',
+ // fired when the stream is finished and we want to notify the media buffer that there will be no more data
+ BUFFER_EOS: 'hlsBufferEos',
+ // fired when the media buffer should be flushed - data {startOffset, endOffset}
+ BUFFER_FLUSHING: 'hlsBufferFlushing',
+ // fired when the media has been flushed
+ BUFFER_FLUSHED: 'hlsBufferFlushed',
+ // fired to signal that a manifest loading starts - data: { url : manifestURL}
+ MANIFEST_LOADING: 'hlsManifestLoading',
+ // fired after manifest has been loaded - data: { levels : [available quality levels] , audioTracks : [ available audio tracks], url : manifestURL, stats : { trequest, tfirst, tload, mtime}}
+ MANIFEST_LOADED: 'hlsManifestLoaded',
+ // fired after manifest has been parsed - data: { levels : [available quality levels] , firstLevel : index of first quality level appearing in Manifest}
+ MANIFEST_PARSED: 'hlsManifestParsed',
+ // fired when a level playlist loading starts - data: { url : level URL level : id of level being loaded}
+ LEVEL_LOADING: 'hlsLevelLoading',
+ // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }
+ LEVEL_LOADED: 'hlsLevelLoaded',
+ // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level }
+ LEVEL_UPDATED: 'hlsLevelUpdated',
+ // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }
+ LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',
+ // fired when a level switch is requested - data: { level : id of new level }
+ LEVEL_SWITCH: 'hlsLevelSwitch',
+ // fired to notify that audio track lists has been updated data: { audioTracks : audioTracks}
+ AUDIO_TRACKS_UPDATED: 'hlsAudioTracksUpdated',
+ // fired when an audio track switch occurs - data: { id : audio track id}
+ AUDIO_TRACK_SWITCH: 'hlsAudioTrackSwitch',
+ // fired when an audio track loading starts - data: { url : audio track URL id : audio track id}
+ AUDIO_TRACK_LOADING: 'hlsAudioTrackLoading',
+ // fired when an audio track loading finishes - data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime} }
+ AUDIO_TRACK_LOADED: 'hlsAudioTrackLoaded',
+ // fired when a fragment loading starts - data: { frag : fragment object}
+ FRAG_LOADING: 'hlsFragLoading',
+ // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded}}
+ FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',
+ // Identifier for fragment load aborting for emergency switch down - data: {frag : fragment object}
+ FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',
+ // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}
+ FRAG_LOADED: 'hlsFragLoaded',
+ // fired when Init Segment has been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, moov : moov MP4 box, codecs : codecs found while parsing fragment}
+ FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',
+ // fired when parsing sei text is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ sei samples pes ] }
+ FRAG_PARSING_USERDATA: 'hlsFragParsingUserdata',
+ // fired when parsing id3 is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ id3 samples pes ] }
+ FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',
+ // fired when data have been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, data1 : moof MP4 box or TS fragments, data2 : mdat MP4 box or null}
+ FRAG_PARSING_DATA: 'hlsFragParsingData',
+ // fired when fragment parsing is completed - data: { id : demuxer id; level : levelId, sn : sequence number, }
+ FRAG_PARSED: 'hlsFragParsed',
+ // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { id : demuxer id,frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length} }
+ FRAG_BUFFERED: 'hlsFragBuffered',
+ // fired when fragment matching with current media position is changing - data : { id : demuxer id, frag : fragment object }
+ FRAG_CHANGED: 'hlsFragChanged',
+ // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames}
+ FPS_DROP: 'hlsFpsDrop',
+ //triggered when FPS drop triggers auto level capping - data: {level, droppedlevel}
+ FPS_DROP_LEVEL_CAPPING: 'hlsFpsDropLevelCapping',
+ // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data}
+ ERROR: 'hlsError',
+ // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example
+ DESTROYING: 'hlsDestroying',
+ // fired when a decrypt key loading starts - data: { frag : fragment object}
+ KEY_LOADING: 'hlsKeyLoading',
+ // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}}
+ KEY_LOADED: 'hlsKeyLoaded',
+ // fired upon stream controller state transitions - data: {previousState, nextState}
+ STREAM_STATE_TRANSITION: 'hlsStreamStateTransition'
+ };
+
+ },{}],27:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /**
+ * AAC helper
+ */
+
+ var AAC = function () {
+ function AAC() {
+ _classCallCheck(this, AAC);
+ }
+
+ _createClass(AAC, null, [{
+ key: "getSilentFrame",
+ value: function getSilentFrame(channelCount) {
+ if (channelCount === 1) {
+ return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);
+ } else if (channelCount === 2) {
+ return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);
+ } else if (channelCount === 3) {
+ return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);
+ } else if (channelCount === 4) {
+ return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);
+ } else if (channelCount === 5) {
+ return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);
+ } else if (channelCount === 6) {
+ return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);
+ }
+ return null;
+ }
+ }]);
+
+ return AAC;
+ }();
+
+ exports.default = AAC;
+
+ },{}],28:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /**
+ * Buffer Helper class, providing methods dealing buffer length retrieval
+ */
+
+ var BufferHelper = function () {
+ function BufferHelper() {
+ _classCallCheck(this, BufferHelper);
+ }
+
+ _createClass(BufferHelper, null, [{
+ key: "isBuffered",
+ value: function isBuffered(media, position) {
+ if (media) {
+ var buffered = media.buffered;
+ for (var i = 0; i < buffered.length; i++) {
+ if (position >= buffered.start(i) && position <= buffered.end(i)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }, {
+ key: "bufferInfo",
+ value: function bufferInfo(media, pos, maxHoleDuration) {
+ if (media) {
+ var vbuffered = media.buffered,
+ buffered = [],
+ i;
+ for (i = 0; i < vbuffered.length; i++) {
+ buffered.push({ start: vbuffered.start(i), end: vbuffered.end(i) });
+ }
+ return this.bufferedInfo(buffered, pos, maxHoleDuration);
+ } else {
+ return { len: 0, start: 0, end: 0, nextStart: undefined };
+ }
+ }
+ }, {
+ key: "bufferedInfo",
+ value: function bufferedInfo(buffered, pos, maxHoleDuration) {
+ var buffered2 = [],
+
+ // bufferStart and bufferEnd are buffer boundaries around current video position
+ bufferLen,
+ bufferStart,
+ bufferEnd,
+ bufferStartNext,
+ i;
+ // sort on buffer.start/smaller end (IE does not always return sorted buffered range)
+ buffered.sort(function (a, b) {
+ var diff = a.start - b.start;
+ if (diff) {
+ return diff;
+ } else {
+ return b.end - a.end;
+ }
+ });
+ // there might be some small holes between buffer time range
+ // consider that holes smaller than maxHoleDuration are irrelevant and build another
+ // buffer time range representations that discards those holes
+ for (i = 0; i < buffered.length; i++) {
+ var buf2len = buffered2.length;
+ if (buf2len) {
+ var buf2end = buffered2[buf2len - 1].end;
+ // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)
+ if (buffered[i].start - buf2end < maxHoleDuration) {
+ // merge overlapping time ranges
+ // update lastRange.end only if smaller than item.end
+ // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)
+ // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])
+ if (buffered[i].end > buf2end) {
+ buffered2[buf2len - 1].end = buffered[i].end;
+ }
+ } else {
+ // big hole
+ buffered2.push(buffered[i]);
+ }
+ } else {
+ // first value
+ buffered2.push(buffered[i]);
+ }
+ }
+ for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {
+ var start = buffered2[i].start,
+ end = buffered2[i].end;
+ //logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));
+ if (pos + maxHoleDuration >= start && pos < end) {
+ // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length
+ bufferStart = start;
+ bufferEnd = end;
+ bufferLen = bufferEnd - pos;
+ } else if (pos + maxHoleDuration < start) {
+ bufferStartNext = start;
+ break;
+ }
+ }
+ return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext };
+ }
+ }]);
+
+ return BufferHelper;
+ }();
+
+ exports.default = BufferHelper;
+
+ },{}],29:[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; }; }(); /**
+ * Level Helper class, providing methods dealing with playlist sliding and drift
+ */
+
+ var _logger = _dereq_(43);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var LevelHelper = function () {
+ function LevelHelper() {
+ _classCallCheck(this, LevelHelper);
+ }
+
+ _createClass(LevelHelper, null, [{
+ key: 'mergeDetails',
+ value: function mergeDetails(oldDetails, newDetails) {
+ var start = Math.max(oldDetails.startSN, newDetails.startSN) - newDetails.startSN,
+ end = Math.min(oldDetails.endSN, newDetails.endSN) - newDetails.startSN,
+ delta = newDetails.startSN - oldDetails.startSN,
+ oldfragments = oldDetails.fragments,
+ newfragments = newDetails.fragments,
+ ccOffset = 0,
+ PTSFrag;
+
+ // check if old/new playlists have fragments in common
+ if (end < start) {
+ newDetails.PTSKnown = false;
+ return;
+ }
+ // loop through overlapping SN and update startPTS , cc, and duration if any found
+ for (var i = start; i <= end; i++) {
+ var oldFrag = oldfragments[delta + i],
+ newFrag = newfragments[i];
+ if (newFrag && oldFrag) {
+ ccOffset = oldFrag.cc - newFrag.cc;
+ if (!isNaN(oldFrag.startPTS)) {
+ newFrag.start = newFrag.startPTS = oldFrag.startPTS;
+ newFrag.endPTS = oldFrag.endPTS;
+ newFrag.duration = oldFrag.duration;
+ PTSFrag = newFrag;
+ }
+ }
+ }
+
+ if (ccOffset) {
+ _logger.logger.log('discontinuity sliding from playlist, take drift into account');
+ for (i = 0; i < newfragments.length; i++) {
+ newfragments[i].cc += ccOffset;
+ }
+ }
+
+ // if at least one fragment contains PTS info, recompute PTS information for all fragments
+ if (PTSFrag) {
+ LevelHelper.updateFragPTSDTS(newDetails, PTSFrag.sn, PTSFrag.startPTS, PTSFrag.endPTS, PTSFrag.startDTS, PTSFrag.endDTS);
+ } else {
+ // ensure that delta is within oldfragments range
+ // also adjust sliding in case delta is 0 (we could have old=[50-60] and new=old=[50-61])
+ // in that case we also need to adjust start offset of all fragments
+ if (delta >= 0 && delta < oldfragments.length) {
+ // adjust start by sliding offset
+ var sliding = oldfragments[delta].start;
+ for (i = 0; i < newfragments.length; i++) {
+ newfragments[i].start += sliding;
+ }
+ }
+ }
+ // if we are here, it means we have fragments overlapping between
+ // old and new level. reliable PTS info is thus relying on old level
+ newDetails.PTSKnown = oldDetails.PTSKnown;
+ return;
+ }
+ }, {
+ key: 'updateFragPTSDTS',
+ value: function updateFragPTSDTS(details, sn, startPTS, endPTS, startDTS, endDTS) {
+ var fragIdx, fragments, frag, i;
+ // exit if sn out of range
+ if (sn < details.startSN || sn > details.endSN) {
+ return 0;
+ }
+ fragIdx = sn - details.startSN;
+ fragments = details.fragments;
+ frag = fragments[fragIdx];
+ if (!isNaN(frag.startPTS)) {
+ // delta PTS between audio and video
+ var deltaPTS = Math.abs(frag.startPTS - startPTS);
+ if (isNaN(frag.deltaPTS)) {
+ frag.deltaPTS = deltaPTS;
+ } else {
+ frag.deltaPTS = Math.max(deltaPTS, frag.deltaPTS);
+ }
+ startPTS = Math.min(startPTS, frag.startPTS);
+ endPTS = Math.max(endPTS, frag.endPTS);
+ startDTS = Math.min(startDTS, frag.startDTS);
+ endDTS = Math.max(endDTS, frag.endDTS);
+ }
+
+ var drift = startPTS - frag.start;
+
+ frag.start = frag.startPTS = startPTS;
+ frag.endPTS = endPTS;
+ frag.startDTS = startDTS;
+ frag.endDTS = endDTS;
+ frag.duration = endPTS - startPTS;
+ // adjust fragment PTS/duration from seqnum-1 to frag 0
+ for (i = fragIdx; i > 0; i--) {
+ LevelHelper.updatePTS(fragments, i, i - 1);
+ }
+
+ // adjust fragment PTS/duration from seqnum to last frag
+ for (i = fragIdx; i < fragments.length - 1; i++) {
+ LevelHelper.updatePTS(fragments, i, i + 1);
+ }
+ details.PTSKnown = true;
+ //logger.log(` frag start/end:${startPTS.toFixed(3)}/${endPTS.toFixed(3)}`);
+
+ return drift;
+ }
+ }, {
+ key: 'updatePTS',
+ value: function updatePTS(fragments, fromIdx, toIdx) {
+ var fragFrom = fragments[fromIdx],
+ fragTo = fragments[toIdx],
+ fragToPTS = fragTo.startPTS;
+ // if we know startPTS[toIdx]
+ if (!isNaN(fragToPTS)) {
+ // update fragment duration.
+ // it helps to fix drifts between playlist reported duration and fragment real duration
+ if (toIdx > fromIdx) {
+ fragFrom.duration = fragToPTS - fragFrom.start;
+ if (fragFrom.duration < 0) {
+ _logger.logger.warn('negative duration computed for frag ' + fragFrom.sn + ',level ' + fragFrom.level + ', there should be some duration drift between playlist and fragment!');
+ }
+ } else {
+ fragTo.duration = fragFrom.start - fragToPTS;
+ if (fragTo.duration < 0) {
+ _logger.logger.warn('negative duration computed for frag ' + fragTo.sn + ',level ' + fragTo.level + ', there should be some duration drift between playlist and fragment!');
+ }
+ }
+ } else {
+ // we dont know startPTS[toIdx]
+ if (toIdx > fromIdx) {
+ fragTo.start = fragFrom.start + fragFrom.duration;
+ } else {
+ fragTo.start = fragFrom.start - fragTo.duration;
+ }
+ }
+ }
+ }]);
+
+ return LevelHelper;
+ }();
+
+ exports.default = LevelHelper;
+
+ },{"43":43}],30:[function(_dereq_,module,exports){
+ /**
+ * HLS interface
+ */
+ '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; }; }();
+ //import FetchLoader from './utils/fetch-loader';
+
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _errors = _dereq_(24);
+
+ var _playlistLoader = _dereq_(34);
+
+ var _playlistLoader2 = _interopRequireDefault(_playlistLoader);
+
+ var _fragmentLoader = _dereq_(32);
+
+ var _fragmentLoader2 = _interopRequireDefault(_fragmentLoader);
+
+ var _abrController = _dereq_(3);
+
+ var _abrController2 = _interopRequireDefault(_abrController);
+
+ var _bufferController = _dereq_(6);
+
+ var _bufferController2 = _interopRequireDefault(_bufferController);
+
+ var _capLevelController = _dereq_(7);
+
+ var _capLevelController2 = _interopRequireDefault(_capLevelController);
+
+ var _audioStreamController = _dereq_(4);
+
+ var _audioStreamController2 = _interopRequireDefault(_audioStreamController);
+
+ var _streamController = _dereq_(11);
+
+ var _streamController2 = _interopRequireDefault(_streamController);
+
+ var _levelController = _dereq_(10);
+
+ var _levelController2 = _interopRequireDefault(_levelController);
+
+ var _timelineController = _dereq_(12);
+
+ var _timelineController2 = _interopRequireDefault(_timelineController);
+
+ var _fpsController = _dereq_(9);
+
+ var _fpsController2 = _interopRequireDefault(_fpsController);
+
+ var _audioTrackController = _dereq_(5);
+
+ var _audioTrackController2 = _interopRequireDefault(_audioTrackController);
+
+ var _logger = _dereq_(43);
+
+ var _xhrLoader = _dereq_(47);
+
+ var _xhrLoader2 = _interopRequireDefault(_xhrLoader);
+
+ var _events3 = _dereq_(1);
+
+ var _events4 = _interopRequireDefault(_events3);
+
+ var _keyLoader = _dereq_(33);
+
+ var _keyLoader2 = _interopRequireDefault(_keyLoader);
+
+ var _cues = _dereq_(41);
+
+ var _cues2 = _interopRequireDefault(_cues);
+
+ 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 Hls = function () {
+ _createClass(Hls, null, [{
+ key: 'isSupported',
+ value: function isSupported() {
+ return window.MediaSource && typeof window.MediaSource.isTypeSupported === 'function' && window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');
+ }
+ }, {
+ key: 'version',
+ get: function get() {
+ // replaced with browserify-versionify transform
+ return '0.6.7';
+ }
+ }, {
+ key: 'Events',
+ get: function get() {
+ return _events2.default;
+ }
+ }, {
+ key: 'ErrorTypes',
+ get: function get() {
+ return _errors.ErrorTypes;
+ }
+ }, {
+ key: 'ErrorDetails',
+ get: function get() {
+ return _errors.ErrorDetails;
+ }
+ }, {
+ key: 'DefaultConfig',
+ get: function get() {
+ if (!Hls.defaultConfig) {
+ Hls.defaultConfig = {
+ autoStartLoad: true,
+ startPosition: -1,
+ defaultAudioCodec: undefined,
+ debug: false,
+ capLevelOnFPSDrop: false,
+ capLevelToPlayerSize: false,
+ maxBufferLength: 30,
+ maxBufferSize: 60 * 1000 * 1000,
+ maxBufferHole: 0.5,
+ maxSeekHole: 2,
+ seekHoleNudgeDuration: 0.01,
+ stalledInBufferedNudgeThreshold: 10,
+ maxFragLookUpTolerance: 0.2,
+ liveSyncDurationCount: 3,
+ liveMaxLatencyDurationCount: Infinity,
+ liveSyncDuration: undefined,
+ liveMaxLatencyDuration: undefined,
+ maxMaxBufferLength: 600,
+ enableWorker: true,
+ enableSoftwareAES: true,
+ manifestLoadingTimeOut: 10000,
+ manifestLoadingMaxRetry: 1,
+ manifestLoadingRetryDelay: 1000,
+ manifestLoadingMaxRetryTimeout: 64000,
+ startLevel: undefined,
+ levelLoadingTimeOut: 10000,
+ levelLoadingMaxRetry: 4,
+ levelLoadingRetryDelay: 1000,
+ levelLoadingMaxRetryTimeout: 64000,
+ fragLoadingTimeOut: 20000,
+ fragLoadingMaxRetry: 6,
+ fragLoadingRetryDelay: 1000,
+ fragLoadingMaxRetryTimeout: 64000,
+ fragLoadingLoopThreshold: 3,
+ startFragPrefetch: false,
+ fpsDroppedMonitoringPeriod: 5000,
+ fpsDroppedMonitoringThreshold: 0.2,
+ appendErrorMaxRetry: 3,
+ loader: _xhrLoader2.default,
+ //loader: FetchLoader,
+ fLoader: undefined,
+ pLoader: undefined,
+ xhrSetup: undefined,
+ fetchSetup: undefined,
+ abrController: _abrController2.default,
+ bufferController: _bufferController2.default,
+ capLevelController: _capLevelController2.default,
+ fpsController: _fpsController2.default,
+ streamController: _streamController2.default,
+ audioStreamController: _audioStreamController2.default,
+ timelineController: _timelineController2.default,
+ cueHandler: _cues2.default,
+ enableCEA708Captions: true,
+ enableMP2TPassThrough: false,
+ stretchShortVideoTrack: false,
+ forceKeyFrameOnDiscontinuity: true,
+ abrEwmaFastLive: 5,
+ abrEwmaSlowLive: 9,
+ abrEwmaFastVoD: 3,
+ abrEwmaSlowVoD: 9,
+ abrEwmaDefaultEstimate: 5e5, // 500 kbps
+ abrBandWidthFactor: 0.8,
+ abrBandWidthUpFactor: 0.7,
+ maxStarvationDelay: 4,
+ maxLoadingDelay: 4,
+ minAutoBitrate: 0
+ };
+ }
+ return Hls.defaultConfig;
+ },
+ set: function set(defaultConfig) {
+ Hls.defaultConfig = defaultConfig;
+ }
+ }]);
+
+ function Hls() {
+ var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+ _classCallCheck(this, Hls);
+
+ var defaultConfig = Hls.DefaultConfig;
+
+ if ((config.liveSyncDurationCount || config.liveMaxLatencyDurationCount) && (config.liveSyncDuration || config.liveMaxLatencyDuration)) {
+ throw new Error('Illegal hls.js config: don\'t mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration');
+ }
+
+ for (var prop in defaultConfig) {
+ if (prop in config) {
+ continue;
+ }
+ config[prop] = defaultConfig[prop];
+ }
+
+ if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {
+ throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');
+ }
+
+ if (config.liveMaxLatencyDuration !== undefined && (config.liveMaxLatencyDuration <= config.liveSyncDuration || config.liveSyncDuration === undefined)) {
+ throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');
+ }
+
+ (0, _logger.enableLogs)(config.debug);
+ this.config = config;
+ // observer setup
+ var observer = this.observer = new _events4.default();
+ observer.trigger = function trigger(event) {
+ for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ data[_key - 1] = arguments[_key];
+ }
+
+ observer.emit.apply(observer, [event, event].concat(data));
+ };
+
+ observer.off = function off(event) {
+ for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ data[_key2 - 1] = arguments[_key2];
+ }
+
+ observer.removeListener.apply(observer, [event].concat(data));
+ };
+ this.on = observer.on.bind(observer);
+ this.off = observer.off.bind(observer);
+ this.trigger = observer.trigger.bind(observer);
+ this.playlistLoader = new _playlistLoader2.default(this);
+ this.fragmentLoader = new _fragmentLoader2.default(this);
+ this.levelController = new _levelController2.default(this);
+ this.abrController = new config.abrController(this);
+ this.bufferController = new config.bufferController(this);
+ this.capLevelController = new config.capLevelController(this);
+ this.fpsController = new config.fpsController(this);
+ this.streamController = new config.streamController(this);
+ this.audioStreamController = new config.audioStreamController(this);
+ this.timelineController = new config.timelineController(this);
+ this.audioTrackController = new _audioTrackController2.default(this);
+ this.keyLoader = new _keyLoader2.default(this);
+ }
+
+ _createClass(Hls, [{
+ key: 'destroy',
+ value: function destroy() {
+ _logger.logger.log('destroy');
+ this.trigger(_events2.default.DESTROYING);
+ this.detachMedia();
+ this.playlistLoader.destroy();
+ this.fragmentLoader.destroy();
+ this.levelController.destroy();
+ this.abrController.destroy();
+ this.bufferController.destroy();
+ this.capLevelController.destroy();
+ this.fpsController.destroy();
+ this.streamController.destroy();
+ this.audioStreamController.destroy();
+ this.timelineController.destroy();
+ this.audioTrackController.destroy();
+ this.keyLoader.destroy();
+ this.url = null;
+ this.observer.removeAllListeners();
+ }
+ }, {
+ key: 'attachMedia',
+ value: function attachMedia(media) {
+ _logger.logger.log('attachMedia');
+ this.media = media;
+ this.trigger(_events2.default.MEDIA_ATTACHING, { media: media });
+ }
+ }, {
+ key: 'detachMedia',
+ value: function detachMedia() {
+ _logger.logger.log('detachMedia');
+ this.trigger(_events2.default.MEDIA_DETACHING);
+ this.media = null;
+ }
+ }, {
+ key: 'loadSource',
+ value: function loadSource(url) {
+ _logger.logger.log('loadSource:' + url);
+ this.url = url;
+ // when attaching to a source URL, trigger a playlist load
+ this.trigger(_events2.default.MANIFEST_LOADING, { url: url });
+ }
+ }, {
+ key: 'startLoad',
+ value: function startLoad() {
+ var startPosition = arguments.length <= 0 || arguments[0] === undefined ? -1 : arguments[0];
+
+ _logger.logger.log('startLoad');
+ this.levelController.startLoad();
+ this.streamController.startLoad(startPosition);
+ this.audioStreamController.startLoad(startPosition);
+ }
+ }, {
+ key: 'stopLoad',
+ value: function stopLoad() {
+ _logger.logger.log('stopLoad');
+ this.levelController.stopLoad();
+ this.streamController.stopLoad();
+ this.audioStreamController.stopLoad();
+ }
+ }, {
+ key: 'swapAudioCodec',
+ value: function swapAudioCodec() {
+ _logger.logger.log('swapAudioCodec');
+ this.streamController.swapAudioCodec();
+ }
+ }, {
+ key: 'recoverMediaError',
+ value: function recoverMediaError() {
+ _logger.logger.log('recoverMediaError');
+ var media = this.media;
+ this.detachMedia();
+ this.attachMedia(media);
+ }
+
+ /** Return all quality levels **/
+
+ }, {
+ key: 'levels',
+ get: function get() {
+ return this.levelController.levels;
+ }
+
+ /** Return current playback quality level **/
+
+ }, {
+ key: 'currentLevel',
+ get: function get() {
+ return this.streamController.currentLevel;
+ }
+
+ /* set quality level immediately (-1 for automatic level selection) */
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set currentLevel:' + newLevel);
+ this.loadLevel = newLevel;
+ this.streamController.immediateLevelSwitch();
+ }
+
+ /** Return next playback quality level (quality level of next fragment) **/
+
+ }, {
+ key: 'nextLevel',
+ get: function get() {
+ return this.streamController.nextLevel;
+ }
+
+ /* set quality level for next fragment (-1 for automatic level selection) */
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set nextLevel:' + newLevel);
+ this.levelController.manualLevel = newLevel;
+ this.streamController.nextLevelSwitch();
+ }
+
+ /** Return the quality level of current/last loaded fragment **/
+
+ }, {
+ key: 'loadLevel',
+ get: function get() {
+ return this.levelController.level;
+ }
+
+ /* set quality level for current/next loaded fragment (-1 for automatic level selection) */
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set loadLevel:' + newLevel);
+ this.levelController.manualLevel = newLevel;
+ }
+
+ /** Return the quality level of next loaded fragment **/
+
+ }, {
+ key: 'nextLoadLevel',
+ get: function get() {
+ return this.levelController.nextLoadLevel;
+ }
+
+ /** set quality level of next loaded fragment **/
+ ,
+ set: function set(level) {
+ this.levelController.nextLoadLevel = level;
+ }
+
+ /** Return first level (index of first level referenced in manifest)
+ **/
+
+ }, {
+ key: 'firstLevel',
+ get: function get() {
+ return this.levelController.firstLevel;
+ }
+
+ /** set first level (index of first level referenced in manifest)
+ **/
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set firstLevel:' + newLevel);
+ this.levelController.firstLevel = newLevel;
+ }
+
+ /** Return start level (level of first fragment that will be played back)
+ if not overrided by user, first level appearing in manifest will be used as start level
+ if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)
+ **/
+
+ }, {
+ key: 'startLevel',
+ get: function get() {
+ return this.levelController.startLevel;
+ }
+
+ /** set start level (level of first fragment that will be played back)
+ if not overrided by user, first level appearing in manifest will be used as start level
+ if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)
+ **/
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set startLevel:' + newLevel);
+ this.levelController.startLevel = newLevel;
+ }
+
+ /** Return the capping/max level value that could be used by automatic level selection algorithm **/
+
+ }, {
+ key: 'autoLevelCapping',
+ get: function get() {
+ return this.abrController.autoLevelCapping;
+ }
+
+ /** set the capping/max level value that could be used by automatic level selection algorithm **/
+ ,
+ set: function set(newLevel) {
+ _logger.logger.log('set autoLevelCapping:' + newLevel);
+ this.abrController.autoLevelCapping = newLevel;
+ }
+
+ /* check if we are in automatic level selection mode */
+
+ }, {
+ key: 'autoLevelEnabled',
+ get: function get() {
+ return this.levelController.manualLevel === -1;
+ }
+
+ /* return manual level */
+
+ }, {
+ key: 'manualLevel',
+ get: function get() {
+ return this.levelController.manualLevel;
+ }
+
+ /** get alternate audio tracks list from playlist **/
+
+ }, {
+ key: 'audioTracks',
+ get: function get() {
+ return this.audioTrackController.audioTracks;
+ }
+
+ /** get index of the selected audio track (index in audio track lists) **/
+
+ }, {
+ key: 'audioTrack',
+ get: function get() {
+ return this.audioTrackController.audioTrack;
+ }
+
+ /** select an audio track, based on its index in audio track lists**/
+ ,
+ set: function set(audioTrackId) {
+ this.audioTrackController.audioTrack = audioTrackId;
+ }
+ }, {
+ key: 'liveSyncPosition',
+ get: function get() {
+ return this.streamController.liveSyncPosition;
+ }
+ }]);
+
+ return Hls;
+ }();
+
+ exports.default = Hls;
+
+ },{"1":1,"10":10,"11":11,"12":12,"24":24,"26":26,"3":3,"32":32,"33":33,"34":34,"4":4,"41":41,"43":43,"47":47,"5":5,"6":6,"7":7,"9":9}],31:[function(_dereq_,module,exports){
+ 'use strict';
+
+ // This is mostly for support of the es6 module export
+ // syntax with the babel compiler, it looks like it doesnt support
+ // function exports like we are used to in node/commonjs
+ module.exports = _dereq_(30).default;
+
+ },{"30":30}],32:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Fragment Loader
+ */
+
+ var FragmentLoader = function (_EventHandler) {
+ _inherits(FragmentLoader, _EventHandler);
+
+ function FragmentLoader(hls) {
+ _classCallCheck(this, FragmentLoader);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FragmentLoader).call(this, hls, _events2.default.FRAG_LOADING));
+
+ _this.loaders = {};
+ return _this;
+ }
+
+ _createClass(FragmentLoader, [{
+ key: 'destroy',
+ value: function destroy() {
+ var loaders = this.loaders;
+ for (var loaderName in loaders) {
+ var loader = loaders[loaderName];
+ if (loader) {
+ loader.destroy();
+ }
+ }
+ this.loaders = {};
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onFragLoading',
+ value: function onFragLoading(data) {
+ var frag = data.frag,
+ type = frag.type,
+ loader = this.loaders[type],
+ config = this.hls.config;
+
+ frag.loaded = 0;
+ if (loader) {
+ _logger.logger.warn('abort previous fragment loader for type:' + type);
+ loader.abort();
+ }
+ loader = this.loaders[type] = frag.loader = typeof config.fLoader !== 'undefined' ? new config.fLoader(config) : new config.loader(config);
+
+ var loaderContext = void 0,
+ loaderConfig = void 0,
+ loaderCallbacks = void 0;
+ loaderContext = { url: frag.url, frag: frag, responseType: 'arraybuffer', progressData: false };
+ var start = frag.byteRangeStartOffset,
+ end = frag.byteRangeEndOffset;
+ if (!isNaN(start) && !isNaN(end)) {
+ loaderContext.rangeStart = start;
+ loaderContext.rangeEnd = end;
+ }
+ loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: 0, retryDelay: 0, maxRetryDelay: config.fragLoadingMaxRetryTimeout };
+ loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this), onProgress: this.loadprogress.bind(this) };
+ loader.load(loaderContext, loaderConfig, loaderCallbacks);
+ }
+ }, {
+ key: 'loadsuccess',
+ value: function loadsuccess(response, stats, context) {
+ var payload = response.data,
+ frag = context.frag;
+ // detach fragment loader on load success
+ frag.loader = undefined;
+ this.loaders[frag.type] = undefined;
+ this.hls.trigger(_events2.default.FRAG_LOADED, { payload: payload, frag: frag, stats: stats });
+ }
+ }, {
+ key: 'loaderror',
+ value: function loaderror(response, context) {
+ var loader = context.loader;
+ if (loader) {
+ loader.abort();
+ }
+ this.loaders[context.type] = undefined;
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: context.frag, response: response });
+ }
+ }, {
+ key: 'loadtimeout',
+ value: function loadtimeout(stats, context) {
+ var loader = context.loader;
+ if (loader) {
+ loader.abort();
+ }
+ this.loaders[context.type] = undefined;
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: context.frag });
+ }
+
+ // data will be used for progressive parsing
+
+ }, {
+ key: 'loadprogress',
+ value: function loadprogress(stats, context, data) {
+ // jshint ignore:line
+ var frag = context.frag;
+ frag.loaded = stats.loaded;
+ this.hls.trigger(_events2.default.FRAG_LOAD_PROGRESS, { frag: frag, stats: stats });
+ }
+ }]);
+
+ return FragmentLoader;
+ }(_eventHandler2.default);
+
+ exports.default = FragmentLoader;
+
+ },{"24":24,"25":25,"26":26,"43":43}],33:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _errors = _dereq_(24);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
+ * Decrypt key Loader
+ */
+
+ var KeyLoader = function (_EventHandler) {
+ _inherits(KeyLoader, _EventHandler);
+
+ function KeyLoader(hls) {
+ _classCallCheck(this, KeyLoader);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(KeyLoader).call(this, hls, _events2.default.KEY_LOADING));
+
+ _this.loaders = {};
+ _this.decryptkey = null;
+ _this.decrypturl = null;
+ return _this;
+ }
+
+ _createClass(KeyLoader, [{
+ key: 'destroy',
+ value: function destroy() {
+ for (var loaderName in this.loaders) {
+ var loader = this.loaders[loaderName];
+ if (loader) {
+ loader.destroy();
+ }
+ }
+ this.loaders = {};
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onKeyLoading',
+ value: function onKeyLoading(data) {
+ var frag = data.frag,
+ type = frag.type,
+ loader = this.loaders[type],
+ decryptdata = frag.decryptdata,
+ uri = decryptdata.uri;
+ // if uri is different from previous one or if decrypt key not retrieved yet
+ if (uri !== this.decrypturl || this.decryptkey === null) {
+ var config = this.hls.config;
+
+ if (loader) {
+ _logger.logger.warn('abort previous fragment loader for type:' + type);
+ loader.abort();
+ }
+ frag.loader = this.loaders[type] = new config.loader(config);
+ this.decrypturl = uri;
+ this.decryptkey = null;
+
+ var loaderContext = void 0,
+ loaderConfig = void 0,
+ loaderCallbacks = void 0;
+ loaderContext = { url: uri, frag: frag, responseType: 'arraybuffer' };
+ loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: config.fragLoadingMaxRetry, retryDelay: config.fragLoadingRetryDelay, maxRetryDelay: config.fragLoadingMaxRetryTimeout };
+ loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };
+ frag.loader.load(loaderContext, loaderConfig, loaderCallbacks);
+ } else if (this.decryptkey) {
+ // we already loaded this key, return it
+ decryptdata.key = this.decryptkey;
+ this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });
+ }
+ }
+ }, {
+ key: 'loadsuccess',
+ value: function loadsuccess(response, stats, context) {
+ var frag = context.frag;
+ this.decryptkey = frag.decryptdata.key = new Uint8Array(response.data);
+ // detach fragment loader on load success
+ frag.loader = undefined;
+ this.loaders[context.type] = undefined;
+ this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });
+ }
+ }, {
+ key: 'loaderror',
+ value: function loaderror(response, context) {
+ var frag = context.frag,
+ loader = frag.loader;
+ if (loader) {
+ loader.abort();
+ }
+ this.loaders[context.type] = undefined;
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: frag, response: response });
+ }
+ }, {
+ key: 'loadtimeout',
+ value: function loadtimeout(stats, context) {
+ var frag = context.frag,
+ loader = frag.loader;
+ if (loader) {
+ loader.abort();
+ }
+ this.loaders[context.type] = undefined;
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: frag });
+ }
+ }]);
+
+ return KeyLoader;
+ }(_eventHandler2.default);
+
+ exports.default = KeyLoader;
+
+ },{"24":24,"25":25,"26":26,"43":43}],34:[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 _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _eventHandler = _dereq_(25);
+
+ var _eventHandler2 = _interopRequireDefault(_eventHandler);
+
+ var _errors = _dereq_(24);
+
+ var _url = _dereq_(46);
+
+ var _url2 = _interopRequireDefault(_url);
+
+ var _attrList = _dereq_(38);
+
+ var _attrList2 = _interopRequireDefault(_attrList);
+
+ var _logger = _dereq_(43);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
+ * Playlist Loader
+ */
+
+ var PlaylistLoader = function (_EventHandler) {
+ _inherits(PlaylistLoader, _EventHandler);
+
+ function PlaylistLoader(hls) {
+ _classCallCheck(this, PlaylistLoader);
+
+ var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(PlaylistLoader).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.LEVEL_LOADING, _events2.default.AUDIO_TRACK_LOADING));
+
+ _this.loaders = {};
+ return _this;
+ }
+
+ _createClass(PlaylistLoader, [{
+ key: 'destroy',
+ value: function destroy() {
+ for (var loaderName in this.loaders) {
+ var loader = this.loaders[loaderName];
+ if (loader) {
+ loader.destroy();
+ }
+ }
+ this.loaders = {};
+ _eventHandler2.default.prototype.destroy.call(this);
+ }
+ }, {
+ key: 'onManifestLoading',
+ value: function onManifestLoading(data) {
+ this.load(data.url, { type: 'manifest' });
+ }
+ }, {
+ key: 'onLevelLoading',
+ value: function onLevelLoading(data) {
+ this.load(data.url, { type: 'level', level: data.level, id: data.id });
+ }
+ }, {
+ key: 'onAudioTrackLoading',
+ value: function onAudioTrackLoading(data) {
+ this.load(data.url, { type: 'audioTrack', id: data.id });
+ }
+ }, {
+ key: 'load',
+ value: function load(url, context) {
+ var loader = this.loaders[context.type];
+ if (loader) {
+ var loaderContext = loader.context;
+ if (loaderContext && loaderContext.url === url) {
+ _logger.logger.trace('playlist request ongoing');
+ return;
+ } else {
+ _logger.logger.warn('abort previous loader for type:' + context.type);
+ loader.abort();
+ }
+ }
+ var config = this.hls.config,
+ retry = void 0,
+ timeout = void 0,
+ retryDelay = void 0,
+ maxRetryDelay = void 0;
+ if (context.type === 'manifest') {
+ retry = config.manifestLoadingMaxRetry;
+ timeout = config.manifestLoadingTimeOut;
+ retryDelay = config.manifestLoadingRetryDelay;
+ maxRetryDelay = config.manifestLoadingMaxRetryTimeOut;
+ } else {
+ retry = config.levelLoadingMaxRetry;
+ timeout = config.levelLoadingTimeOut;
+ retryDelay = config.levelLoadingRetryDelay;
+ maxRetryDelay = config.levelLoadingMaxRetryTimeOut;
+ _logger.logger.log('loading playlist for level ' + context.level);
+ }
+ loader = this.loaders[context.type] = context.loader = typeof config.pLoader !== 'undefined' ? new config.pLoader(config) : new config.loader(config);
+ context.url = url;
+ context.responseType = '';
+
+ var loaderConfig = void 0,
+ loaderCallbacks = void 0;
+ loaderConfig = { timeout: timeout, maxRetry: retry, retryDelay: retryDelay, maxRetryDelay: maxRetryDelay };
+ loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };
+ loader.load(context, loaderConfig, loaderCallbacks);
+ }
+ }, {
+ key: 'resolve',
+ value: function resolve(url, baseUrl) {
+ return _url2.default.buildAbsoluteURL(baseUrl, url);
+ }
+ }, {
+ key: 'parseMasterPlaylist',
+ value: function parseMasterPlaylist(string, baseurl) {
+ var levels = [],
+ result = void 0;
+
+ // https://regex101.com is your friend
+ var re = /#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;
+ while ((result = re.exec(string)) != null) {
+ var level = {};
+
+ var attrs = level.attrs = new _attrList2.default(result[1]);
+ level.url = this.resolve(result[2], baseurl);
+
+ var resolution = attrs.decimalResolution('RESOLUTION');
+ if (resolution) {
+ level.width = resolution.width;
+ level.height = resolution.height;
+ }
+ level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH');
+ level.name = attrs.NAME;
+
+ var codecs = attrs.CODECS;
+ if (codecs) {
+ codecs = codecs.split(',');
+ for (var i = 0; i < codecs.length; i++) {
+ var codec = codecs[i];
+ if (codec.indexOf('avc1') !== -1) {
+ level.videoCodec = this.avc1toavcoti(codec);
+ } else {
+ level.audioCodec = codec;
+ }
+ }
+ }
+
+ levels.push(level);
+ }
+ return levels;
+ }
+ }, {
+ key: 'parseMasterPlaylistMedia',
+ value: function parseMasterPlaylistMedia(string, baseurl, type) {
+ var result = void 0,
+ medias = [];
+
+ // https://regex101.com is your friend
+ var re = /#EXT-X-MEDIA:(.*)/g;
+ while ((result = re.exec(string)) != null) {
+ var media = {};
+ var attrs = new _attrList2.default(result[1]);
+ if (attrs.TYPE === type) {
+ media.groupId = attrs['GROUP-ID'];
+ media.name = attrs.NAME;
+ media.type = type;
+ media.default = attrs.DEFAULT === 'YES';
+ media.autoselect = attrs.AUTOSELECT === 'YES';
+ media.forced = attrs.FORCED === 'YES';
+ if (attrs.URI) {
+ media.url = this.resolve(attrs.URI, baseurl);
+ }
+ media.lang = attrs.LANGUAGE;
+ if (!media.name) {
+ media.name = media.lang;
+ }
+ medias.push(media);
+ }
+ }
+ return medias;
+ }
+ /**
+ * Utility method for parseLevelPlaylist to create an initialization vector for a given segment
+ * @returns {Uint8Array}
+ */
+
+ }, {
+ key: 'createInitializationVector',
+ value: function createInitializationVector(segmentNumber) {
+ var uint8View = new Uint8Array(16);
+
+ for (var i = 12; i < 16; i++) {
+ uint8View[i] = segmentNumber >> 8 * (15 - i) & 0xff;
+ }
+
+ return uint8View;
+ }
+
+ /**
+ * Utility method for parseLevelPlaylist to get a fragment's decryption data from the currently parsed encryption key data
+ * @param levelkey - a playlist's encryption info
+ * @param segmentNumber - the fragment's segment number
+ * @returns {*} - an object to be applied as a fragment's decryptdata
+ */
+
+ }, {
+ key: 'fragmentDecryptdataFromLevelkey',
+ value: function fragmentDecryptdataFromLevelkey(levelkey, segmentNumber) {
+ var decryptdata = levelkey;
+
+ if (levelkey && levelkey.method && levelkey.uri && !levelkey.iv) {
+ decryptdata = this.cloneObj(levelkey);
+ decryptdata.iv = this.createInitializationVector(segmentNumber);
+ }
+
+ return decryptdata;
+ }
+ }, {
+ key: 'avc1toavcoti',
+ value: function avc1toavcoti(codec) {
+ var result,
+ avcdata = codec.split('.');
+ if (avcdata.length > 2) {
+ result = avcdata.shift() + '.';
+ result += parseInt(avcdata.shift()).toString(16);
+ result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);
+ } else {
+ result = codec;
+ }
+ return result;
+ }
+ }, {
+ key: 'cloneObj',
+ value: function cloneObj(obj) {
+ return JSON.parse(JSON.stringify(obj));
+ }
+ }, {
+ key: 'parseLevelPlaylist',
+ value: function parseLevelPlaylist(string, baseurl, id, type) {
+ var currentSN = 0,
+ fragdecryptdata,
+ totalduration = 0,
+ level = { type: null, version: null, url: baseurl, fragments: [], live: true, startSN: 0 },
+ levelkey = { method: null, key: null, iv: null, uri: null },
+ cc = 0,
+ programDateTime = null,
+ frag = null,
+ result,
+ regexp,
+ duration = null,
+ title = null,
+ byteRangeEndOffset = null,
+ byteRangeStartOffset = null,
+ tagList = [];
+
+ regexp = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE):(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g;
+ while ((result = regexp.exec(string)) !== null) {
+ result.shift();
+ result = result.filter(function (n) {
+ return n !== undefined;
+ });
+ switch (result[0]) {
+ case 'PLAYLIST-TYPE':
+ level.type = result[1].toUpperCase();
+ break;
+ case 'MEDIA-SEQUENCE':
+ currentSN = level.startSN = parseInt(result[1]);
+ break;
+ case 'TARGETDURATION':
+ level.targetduration = parseFloat(result[1]);
+ break;
+ case 'VERSION':
+ level.version = parseInt(result[1]);
+ break;
+ case 'EXTM3U':
+ break;
+ case 'ENDLIST':
+ level.live = false;
+ break;
+ case 'DIS':
+ cc++;
+ tagList.push(result);
+ break;
+ case 'BYTERANGE':
+ var params = result[1].split('@');
+ if (params.length === 1) {
+ byteRangeStartOffset = byteRangeEndOffset;
+ } else {
+ byteRangeStartOffset = parseInt(params[1]);
+ }
+ byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;
+ break;
+ case 'INF':
+ duration = parseFloat(result[1]);
+ title = result[2] ? result[2] : null;
+ tagList.push(result);
+ break;
+ case '':
+ // url
+ if (!isNaN(duration)) {
+ var sn = currentSN++;
+ fragdecryptdata = this.fragmentDecryptdataFromLevelkey(levelkey, sn);
+ var url = result[1] ? this.resolve(result[1], baseurl) : null;
+ frag = { url: url,
+ type: type,
+ duration: duration,
+ title: title,
+ start: totalduration,
+ sn: sn,
+ level: id,
+ cc: cc,
+ decryptdata: fragdecryptdata,
+ programDateTime: programDateTime,
+ tagList: tagList };
+ // only include byte range options if used/needed
+ if (byteRangeStartOffset !== null) {
+ frag.byteRangeStartOffset = byteRangeStartOffset;
+ frag.byteRangeEndOffset = byteRangeEndOffset;
+ }
+ level.fragments.push(frag);
+ totalduration += duration;
+ duration = null;
+ title = null;
+ byteRangeStartOffset = null;
+ programDateTime = null;
+ tagList = [];
+ }
+ break;
+ case 'KEY':
+ // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4
+ var decryptparams = result[1];
+ var keyAttrs = new _attrList2.default(decryptparams);
+ var decryptmethod = keyAttrs.enumeratedString('METHOD'),
+ decrypturi = keyAttrs.URI,
+ decryptiv = keyAttrs.hexadecimalInteger('IV');
+ if (decryptmethod) {
+ levelkey = { method: null, key: null, iv: null, uri: null };
+ if (decrypturi && decryptmethod === 'AES-128') {
+ levelkey.method = decryptmethod;
+ // URI to get the key
+ levelkey.uri = this.resolve(decrypturi, baseurl);
+ levelkey.key = null;
+ // Initialization Vector (IV)
+ levelkey.iv = decryptiv;
+ }
+ }
+ break;
+ case 'START':
+ var startParams = result[1];
+ var startAttrs = new _attrList2.default(startParams);
+ var startTimeOffset = startAttrs.decimalFloatingPoint('TIME-OFFSET');
+ //TIME-OFFSET can be 0
+ if (!isNaN(startTimeOffset)) {
+ level.startTimeOffset = startTimeOffset;
+ }
+ break;
+ case 'PROGRAM-DATE-TIME':
+ programDateTime = new Date(Date.parse(result[1]));
+ tagList.push(result);
+ break;
+ case '#':
+ result.shift();
+ tagList.push(result);
+ break;
+ default:
+ _logger.logger.warn('line parsed but not handled: ' + result);
+ break;
+ }
+ }
+ //logger.log('found ' + level.fragments.length + ' fragments');
+ if (frag && !frag.url) {
+ level.fragments.pop();
+ totalduration -= frag.duration;
+ }
+ level.totalduration = totalduration;
+ level.averagetargetduration = totalduration / level.fragments.length;
+ level.endSN = currentSN - 1;
+ return level;
+ }
+ }, {
+ key: 'loadsuccess',
+ value: function loadsuccess(response, stats, context) {
+ var string = response.data,
+ url = response.url,
+ type = context.type,
+ id = context.id,
+ level = context.level,
+ hls = this.hls;
+
+ this.loaders[type] = undefined;
+ // responseURL not supported on some browsers (it is used to detect URL redirection)
+ // data-uri mode also not supported (but no need to detect redirection)
+ if (url === undefined || url.indexOf('data:') === 0) {
+ // fallback to initial URL
+ url = context.url;
+ }
+ stats.tload = performance.now();
+ //stats.mtime = new Date(target.getResponseHeader('Last-Modified'));
+ if (string.indexOf('#EXTM3U') === 0) {
+ if (string.indexOf('#EXTINF:') > 0) {
+ var isLevel = type !== 'audioTrack',
+ levelDetails = this.parseLevelPlaylist(string, url, (isLevel ? level : id) || 0, isLevel ? 'main' : 'audio');
+ if (type === 'manifest') {
+ // first request, stream manifest (no master playlist), fire manifest loaded event with level details
+ hls.trigger(_events2.default.MANIFEST_LOADED, { levels: [{ url: url, details: levelDetails }], audioTracks: [], url: url, stats: stats });
+ }
+ stats.tparsed = performance.now();
+ if (isLevel) {
+ hls.trigger(_events2.default.LEVEL_LOADED, { details: levelDetails, level: level || 0, id: id || 0, stats: stats });
+ } else {
+ hls.trigger(_events2.default.AUDIO_TRACK_LOADED, { details: levelDetails, id: id, stats: stats });
+ }
+ } else {
+ var levels = this.parseMasterPlaylist(string, url);
+ // multi level playlist, parse level info
+ if (levels.length) {
+ var audiotracks = this.parseMasterPlaylistMedia(string, url, 'AUDIO');
+ if (audiotracks.length) {
+ // check if we have found an audio track embedded in main playlist (audio track without URI attribute)
+ var embeddedAudioFound = false;
+ audiotracks.forEach(function (audioTrack) {
+ if (!audioTrack.url) {
+ embeddedAudioFound = true;
+ }
+ });
+ // if no embedded audio track defined, but audio codec signaled in quality level, we need to signal this main audio track
+ // this could happen with playlists with alt audio rendition in which quality levels (main) contains both audio+video. but with mixed audio track not signaled
+ if (embeddedAudioFound === false && levels[0].audioCodec && !levels[0].attrs.AUDIO) {
+ _logger.logger.log('audio codec signaled in quality level, but no embedded audio track signaled, create one');
+ audiotracks.unshift({ type: 'main', name: 'main' });
+ }
+ }
+ hls.trigger(_events2.default.MANIFEST_LOADED, { levels: levels, audioTracks: audiotracks, url: url, stats: stats });
+ } else {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest' });
+ }
+ }
+ } else {
+ hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter' });
+ }
+ }
+ }, {
+ key: 'loaderror',
+ value: function loaderror(response, context) {
+ var details,
+ fatal,
+ loader = context.loader;
+ switch (context.type) {
+ case 'manifest':
+ details = _errors.ErrorDetails.MANIFEST_LOAD_ERROR;
+ fatal = true;
+ break;
+ case 'level':
+ details = _errors.ErrorDetails.LEVEL_LOAD_ERROR;
+ fatal = false;
+ break;
+ case 'audioTrack':
+ details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR;
+ fatal = false;
+ break;
+ }
+ if (loader) {
+ loader.abort();
+ this.loaders[context.type] = undefined;
+ }
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, response: response, context: context });
+ }
+ }, {
+ key: 'loadtimeout',
+ value: function loadtimeout(stats, context) {
+ var details,
+ fatal,
+ loader = context.loader;
+ switch (context.type) {
+ case 'manifest':
+ details = _errors.ErrorDetails.MANIFEST_LOAD_TIMEOUT;
+ fatal = true;
+ break;
+ case 'level':
+ details = _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT;
+ fatal = false;
+ break;
+ case 'audioTrack':
+ details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT;
+ fatal = false;
+ break;
+ }
+ if (loader) {
+ loader.abort();
+ this.loaders[context.type] = undefined;
+ }
+ this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, context: context });
+ }
+ }]);
+
+ return PlaylistLoader;
+ }(_eventHandler2.default);
+
+ exports.default = PlaylistLoader;
+
+ },{"24":24,"25":25,"26":26,"38":38,"43":43,"46":46}],35:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /**
+ * Generate MP4 Box
+ */
+
+ //import Hex from '../utils/hex';
+
+ var MP4 = function () {
+ function MP4() {
+ _classCallCheck(this, MP4);
+ }
+
+ _createClass(MP4, null, [{
+ key: 'init',
+ value: function init() {
+ MP4.types = {
+ avc1: [], // codingname
+ avcC: [],
+ btrt: [],
+ dinf: [],
+ dref: [],
+ esds: [],
+ ftyp: [],
+ hdlr: [],
+ mdat: [],
+ mdhd: [],
+ mdia: [],
+ mfhd: [],
+ minf: [],
+ moof: [],
+ moov: [],
+ mp4a: [],
+ mvex: [],
+ mvhd: [],
+ sdtp: [],
+ stbl: [],
+ stco: [],
+ stsc: [],
+ stsd: [],
+ stsz: [],
+ stts: [],
+ tfdt: [],
+ tfhd: [],
+ traf: [],
+ trak: [],
+ trun: [],
+ trex: [],
+ tkhd: [],
+ vmhd: [],
+ smhd: []
+ };
+
+ var i;
+ for (i in MP4.types) {
+ if (MP4.types.hasOwnProperty(i)) {
+ MP4.types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];
+ }
+ }
+
+ var videoHdlr = new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x00, // pre_defined
+ 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'
+ ]);
+
+ var audioHdlr = new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x00, // pre_defined
+ 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'
+ ]);
+
+ MP4.HDLR_TYPES = {
+ 'video': videoHdlr,
+ 'audio': audioHdlr
+ };
+
+ var dref = new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x01, // entry_count
+ 0x00, 0x00, 0x00, 0x0c, // entry_size
+ 0x75, 0x72, 0x6c, 0x20, // 'url' type
+ 0x00, // version 0
+ 0x00, 0x00, 0x01 // entry_flags
+ ]);
+
+ var stco = new Uint8Array([0x00, // version
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x00 // entry_count
+ ]);
+
+ MP4.STTS = MP4.STSC = MP4.STCO = stco;
+
+ MP4.STSZ = new Uint8Array([0x00, // version
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x00, // sample_size
+ 0x00, 0x00, 0x00, 0x00]);
+ // sample_count
+ MP4.VMHD = new Uint8Array([0x00, // version
+ 0x00, 0x00, 0x01, // flags
+ 0x00, 0x00, // graphicsmode
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor
+ ]);
+ MP4.SMHD = new Uint8Array([0x00, // version
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, // balance
+ 0x00, 0x00 // reserved
+ ]);
+
+ MP4.STSD = new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x01]); // entry_count
+
+ var majorBrand = new Uint8Array([105, 115, 111, 109]); // isom
+ var avc1Brand = new Uint8Array([97, 118, 99, 49]); // avc1
+ var minorVersion = new Uint8Array([0, 0, 0, 1]);
+
+ MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);
+ MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));
+ }
+ }, {
+ key: 'box',
+ value: function box(type) {
+ var payload = Array.prototype.slice.call(arguments, 1),
+ size = 8,
+ i = payload.length,
+ len = i,
+ result;
+ // calculate the total size we need to allocate
+ while (i--) {
+ size += payload[i].byteLength;
+ }
+ result = new Uint8Array(size);
+ result[0] = size >> 24 & 0xff;
+ result[1] = size >> 16 & 0xff;
+ result[2] = size >> 8 & 0xff;
+ result[3] = size & 0xff;
+ result.set(type, 4);
+ // copy the payload into the result
+ for (i = 0, size = 8; i < len; i++) {
+ // copy payload[i] array @ offset size
+ result.set(payload[i], size);
+ size += payload[i].byteLength;
+ }
+ return result;
+ }
+ }, {
+ key: 'hdlr',
+ value: function hdlr(type) {
+ return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);
+ }
+ }, {
+ key: 'mdat',
+ value: function mdat(data) {
+ return MP4.box(MP4.types.mdat, data);
+ }
+ }, {
+ key: 'mdhd',
+ value: function mdhd(timescale, duration) {
+ duration *= timescale;
+ return MP4.box(MP4.types.mdhd, new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x02, // creation_time
+ 0x00, 0x00, 0x00, 0x03, // modification_time
+ timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale
+ duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration
+ 0x55, 0xc4, // 'und' language (undetermined)
+ 0x00, 0x00]));
+ }
+ }, {
+ key: 'mdia',
+ value: function mdia(track) {
+ return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));
+ }
+ }, {
+ key: 'mfhd',
+ value: function mfhd(sequenceNumber) {
+ return MP4.box(MP4.types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags
+ sequenceNumber >> 24, sequenceNumber >> 16 & 0xFF, sequenceNumber >> 8 & 0xFF, sequenceNumber & 0xFF]));
+ }
+ }, {
+ key: 'minf',
+ // sequence_number
+ value: function minf(track) {
+ if (track.type === 'audio') {
+ return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));
+ } else {
+ return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));
+ }
+ }
+ }, {
+ key: 'moof',
+ value: function moof(sn, baseMediaDecodeTime, track) {
+ return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track, baseMediaDecodeTime));
+ }
+ /**
+ * @param tracks... (optional) {array} the tracks associated with this movie
+ */
+
+ }, {
+ key: 'moov',
+ value: function moov(tracks) {
+ var i = tracks.length,
+ boxes = [];
+
+ while (i--) {
+ boxes[i] = MP4.trak(tracks[i]);
+ }
+
+ return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));
+ }
+ }, {
+ key: 'mvex',
+ value: function mvex(tracks) {
+ var i = tracks.length,
+ boxes = [];
+
+ while (i--) {
+ boxes[i] = MP4.trex(tracks[i]);
+ }
+ return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));
+ }
+ }, {
+ key: 'mvhd',
+ value: function mvhd(timescale, duration) {
+ duration *= timescale;
+ var bytes = new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ 0x00, 0x00, 0x00, 0x01, // creation_time
+ 0x00, 0x00, 0x00, 0x02, // modification_time
+ timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale
+ duration >> 24 & 0xFF, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration
+ 0x00, 0x01, 0x00, 0x00, // 1.0 rate
+ 0x01, 0x00, // 1.0 volume
+ 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined
+ 0xff, 0xff, 0xff, 0xff // next_track_ID
+ ]);
+ return MP4.box(MP4.types.mvhd, bytes);
+ }
+ }, {
+ key: 'sdtp',
+ value: function sdtp(track) {
+ var samples = track.samples || [],
+ bytes = new Uint8Array(4 + samples.length),
+ flags,
+ i;
+ // leave the full box header (4 bytes) all zero
+ // write the sample table
+ for (i = 0; i < samples.length; i++) {
+ flags = samples[i].flags;
+ bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;
+ }
+
+ return MP4.box(MP4.types.sdtp, bytes);
+ }
+ }, {
+ key: 'stbl',
+ value: function stbl(track) {
+ return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));
+ }
+ }, {
+ key: 'avc1',
+ value: function avc1(track) {
+ var sps = [],
+ pps = [],
+ i,
+ data,
+ len;
+ // assemble the SPSs
+
+ for (i = 0; i < track.sps.length; i++) {
+ data = track.sps[i];
+ len = data.byteLength;
+ sps.push(len >>> 8 & 0xFF);
+ sps.push(len & 0xFF);
+ sps = sps.concat(Array.prototype.slice.call(data)); // SPS
+ }
+
+ // assemble the PPSs
+ for (i = 0; i < track.pps.length; i++) {
+ data = track.pps[i];
+ len = data.byteLength;
+ pps.push(len >>> 8 & 0xFF);
+ pps.push(len & 0xFF);
+ pps = pps.concat(Array.prototype.slice.call(data));
+ }
+
+ var avcc = MP4.box(MP4.types.avcC, new Uint8Array([0x01, // version
+ sps[3], // profile
+ sps[4], // profile compat
+ sps[5], // level
+ 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes
+ 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets
+ ].concat(sps).concat([track.pps.length // numOfPictureParameterSets
+ ]).concat(pps))),
+ // "PPS"
+ width = track.width,
+ height = track.height;
+ //console.log('avcc:' + Hex.hexDump(avcc));
+ return MP4.box(MP4.types.avc1, new Uint8Array([0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x01, // data_reference_index
+ 0x00, 0x00, // pre_defined
+ 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined
+ width >> 8 & 0xFF, width & 0xff, // width
+ height >> 8 & 0xFF, height & 0xff, // height
+ 0x00, 0x48, 0x00, 0x00, // horizresolution
+ 0x00, 0x48, 0x00, 0x00, // vertresolution
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x01, // frame_count
+ 0x12, 0x64, 0x61, 0x69, 0x6C, //dailymotion/hls.js
+ 0x79, 0x6D, 0x6F, 0x74, 0x69, 0x6F, 0x6E, 0x2F, 0x68, 0x6C, 0x73, 0x2E, 0x6A, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname
+ 0x00, 0x18, // depth = 24
+ 0x11, 0x11]), // pre_defined = -1
+ avcc, MP4.box(MP4.types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB
+ 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate
+ 0x00, 0x2d, 0xc6, 0xc0])) // avgBitrate
+ );
+ }
+ }, {
+ key: 'esds',
+ value: function esds(track) {
+ var configlen = track.config.length;
+ return new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+
+ 0x03, // descriptor_type
+ 0x17 + configlen, // length
+ 0x00, 0x01, //es_id
+ 0x00, // stream_priority
+
+ 0x04, // descriptor_type
+ 0x0f + configlen, // length
+ 0x40, //codec : mpeg4_audio
+ 0x15, // stream_type
+ 0x00, 0x00, 0x00, // buffer_size
+ 0x00, 0x00, 0x00, 0x00, // maxBitrate
+ 0x00, 0x00, 0x00, 0x00, // avgBitrate
+
+ 0x05 // descriptor_type
+ ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor
+ }
+ }, {
+ key: 'mp4a',
+ value: function mp4a(track) {
+ var audiosamplerate = track.audiosamplerate;
+ return MP4.box(MP4.types.mp4a, new Uint8Array([0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x01, // data_reference_index
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, track.channelCount, // channelcount
+ 0x00, 0x10, // sampleSize:16bits
+ 0x00, 0x00, 0x00, 0x00, // reserved2
+ audiosamplerate >> 8 & 0xFF, audiosamplerate & 0xff, //
+ 0x00, 0x00]), MP4.box(MP4.types.esds, MP4.esds(track)));
+ }
+ }, {
+ key: 'stsd',
+ value: function stsd(track) {
+ if (track.type === 'audio') {
+ return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));
+ } else {
+ return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));
+ }
+ }
+ }, {
+ key: 'tkhd',
+ value: function tkhd(track) {
+ var id = track.id,
+ duration = track.duration * track.timescale,
+ width = track.width,
+ height = track.height;
+ return MP4.box(MP4.types.tkhd, new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x07, // flags
+ 0x00, 0x00, 0x00, 0x00, // creation_time
+ 0x00, 0x00, 0x00, 0x00, // modification_time
+ id >> 24 & 0xFF, id >> 16 & 0xFF, id >> 8 & 0xFF, id & 0xFF, // track_ID
+ 0x00, 0x00, 0x00, 0x00, // reserved
+ duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved
+ 0x00, 0x00, // layer
+ 0x00, 0x00, // alternate_group
+ 0x00, 0x00, // non-audio track volume
+ 0x00, 0x00, // reserved
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix
+ width >> 8 & 0xFF, width & 0xFF, 0x00, 0x00, // width
+ height >> 8 & 0xFF, height & 0xFF, 0x00, 0x00 // height
+ ]));
+ }
+ }, {
+ key: 'traf',
+ value: function traf(track, baseMediaDecodeTime) {
+ var sampleDependencyTable = MP4.sdtp(track),
+ id = track.id;
+ return MP4.box(MP4.types.traf, MP4.box(MP4.types.tfhd, new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF])), // track_ID
+ MP4.box(MP4.types.tfdt, new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ baseMediaDecodeTime >> 24, baseMediaDecodeTime >> 16 & 0XFF, baseMediaDecodeTime >> 8 & 0XFF, baseMediaDecodeTime & 0xFF])), // baseMediaDecodeTime
+ MP4.trun(track, sampleDependencyTable.length + 16 + // tfhd
+ 16 + // tfdt
+ 8 + // traf header
+ 16 + // mfhd
+ 8 + // moof header
+ 8), // mdat header
+ sampleDependencyTable);
+ }
+
+ /**
+ * Generate a track box.
+ * @param track {object} a track definition
+ * @return {Uint8Array} the track box
+ */
+
+ }, {
+ key: 'trak',
+ value: function trak(track) {
+ track.duration = track.duration || 0xffffffff;
+ return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));
+ }
+ }, {
+ key: 'trex',
+ value: function trex(track) {
+ var id = track.id;
+ return MP4.box(MP4.types.trex, new Uint8Array([0x00, // version 0
+ 0x00, 0x00, 0x00, // flags
+ id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF, // track_ID
+ 0x00, 0x00, 0x00, 0x01, // default_sample_description_index
+ 0x00, 0x00, 0x00, 0x00, // default_sample_duration
+ 0x00, 0x00, 0x00, 0x00, // default_sample_size
+ 0x00, 0x01, 0x00, 0x01 // default_sample_flags
+ ]));
+ }
+ }, {
+ key: 'trun',
+ value: function trun(track, offset) {
+ var samples = track.samples || [],
+ len = samples.length,
+ arraylen = 12 + 16 * len,
+ array = new Uint8Array(arraylen),
+ i,
+ sample,
+ duration,
+ size,
+ flags,
+ cts;
+ offset += 8 + arraylen;
+ array.set([0x00, // version 0
+ 0x00, 0x0f, 0x01, // flags
+ len >>> 24 & 0xFF, len >>> 16 & 0xFF, len >>> 8 & 0xFF, len & 0xFF, // sample_count
+ offset >>> 24 & 0xFF, offset >>> 16 & 0xFF, offset >>> 8 & 0xFF, offset & 0xFF // data_offset
+ ], 0);
+ for (i = 0; i < len; i++) {
+ sample = samples[i];
+ duration = sample.duration;
+ size = sample.size;
+ flags = sample.flags;
+ cts = sample.cts;
+ array.set([duration >>> 24 & 0xFF, duration >>> 16 & 0xFF, duration >>> 8 & 0xFF, duration & 0xFF, // sample_duration
+ size >>> 24 & 0xFF, size >>> 16 & 0xFF, size >>> 8 & 0xFF, size & 0xFF, // sample_size
+ flags.isLeading << 2 | flags.dependsOn, flags.isDependedOn << 6 | flags.hasRedundancy << 4 | flags.paddingValue << 1 | flags.isNonSync, flags.degradPrio & 0xF0 << 8, flags.degradPrio & 0x0F, // sample_flags
+ cts >>> 24 & 0xFF, cts >>> 16 & 0xFF, cts >>> 8 & 0xFF, cts & 0xFF // sample_composition_time_offset
+ ], 12 + 16 * i);
+ }
+ return MP4.box(MP4.types.trun, array);
+ }
+ }, {
+ key: 'initSegment',
+ value: function initSegment(tracks) {
+ if (!MP4.types) {
+ MP4.init();
+ }
+ var movie = MP4.moov(tracks),
+ result;
+ result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);
+ result.set(MP4.FTYP);
+ result.set(movie, MP4.FTYP.byteLength);
+ return result;
+ }
+ }]);
+
+ return MP4;
+ }();
+
+ exports.default = MP4;
+
+ },{}],36:[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; }; }(); /**
+ * fMP4 remuxer
+ */
+
+ var _aac = _dereq_(27);
+
+ var _aac2 = _interopRequireDefault(_aac);
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _logger = _dereq_(43);
+
+ var _mp4Generator = _dereq_(35);
+
+ var _mp4Generator2 = _interopRequireDefault(_mp4Generator);
+
+ var _errors = _dereq_(24);
+
+ _dereq_(44);
+
+ 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 MP4Remuxer = function () {
+ function MP4Remuxer(observer, id, config) {
+ _classCallCheck(this, MP4Remuxer);
+
+ this.observer = observer;
+ this.id = id;
+ this.config = config;
+ this.ISGenerated = false;
+ this.PES2MP4SCALEFACTOR = 4;
+ this.PES_TIMESCALE = 90000;
+ this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;
+ }
+
+ _createClass(MP4Remuxer, [{
+ key: 'destroy',
+ value: function destroy() {}
+ }, {
+ key: 'insertDiscontinuity',
+ value: function insertDiscontinuity() {
+ this._initPTS = this._initDTS = undefined;
+ }
+ }, {
+ key: 'switchLevel',
+ value: function switchLevel() {
+ this.ISGenerated = false;
+ }
+ }, {
+ key: 'remux',
+ value: function remux(level, sn, audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {
+ this.level = level;
+ this.sn = sn;
+ // generate Init Segment if needed
+ if (!this.ISGenerated) {
+ this.generateIS(audioTrack, videoTrack, timeOffset);
+ }
+
+ if (this.ISGenerated) {
+ // Purposefully remuxing audio before video, so that remuxVideo can use nextAacPts, which is
+ // calculated in remuxAudio.
+ //logger.log('nb AAC samples:' + audioTrack.samples.length);
+ if (audioTrack.samples.length) {
+ var audioData = this.remuxAudio(audioTrack, timeOffset, contiguous, accurateTimeOffset);
+ //logger.log('nb AVC samples:' + videoTrack.samples.length);
+ if (videoTrack.samples.length) {
+ var audioTrackLength = void 0;
+ if (audioData) {
+ audioTrackLength = audioData.endPTS - audioData.startPTS;
+ }
+ this.remuxVideo(videoTrack, timeOffset, contiguous, audioTrackLength);
+ }
+ } else {
+ var videoData = void 0;
+ //logger.log('nb AVC samples:' + videoTrack.samples.length);
+ if (videoTrack.samples.length) {
+ videoData = this.remuxVideo(videoTrack, timeOffset, contiguous);
+ }
+ if (videoData && audioTrack.codec) {
+ this.remuxEmptyAudio(audioTrack, timeOffset, contiguous, videoData);
+ }
+ }
+ }
+ //logger.log('nb ID3 samples:' + audioTrack.samples.length);
+ if (id3Track.samples.length) {
+ this.remuxID3(id3Track, timeOffset);
+ }
+ //logger.log('nb ID3 samples:' + audioTrack.samples.length);
+ if (textTrack.samples.length) {
+ this.remuxText(textTrack, timeOffset);
+ }
+ //notify end of parsing
+ this.observer.trigger(_events2.default.FRAG_PARSED, { id: this.id, level: this.level, sn: this.sn });
+ }
+ }, {
+ key: 'generateIS',
+ value: function generateIS(audioTrack, videoTrack, timeOffset) {
+ var observer = this.observer,
+ audioSamples = audioTrack.samples,
+ videoSamples = videoTrack.samples,
+ pesTimeScale = this.PES_TIMESCALE,
+ tracks = {},
+ data = { id: this.id, level: this.level, sn: this.sn, tracks: tracks, unique: false },
+ computePTSDTS = this._initPTS === undefined,
+ initPTS,
+ initDTS;
+
+ if (computePTSDTS) {
+ initPTS = initDTS = Infinity;
+ }
+ if (audioTrack.config && audioSamples.length) {
+ audioTrack.timescale = audioTrack.audiosamplerate;
+ // MP4 duration (track duration in seconds multiplied by timescale) is coded on 32 bits
+ // we know that each AAC sample contains 1024 frames....
+ // in order to avoid overflowing the 32 bit counter for large duration, we use smaller timescale (timescale/gcd)
+ // we just need to ensure that AAC sample duration will still be an integer (will be 1024/gcd)
+ if (audioTrack.timescale * audioTrack.duration > Math.pow(2, 32)) {
+ (function () {
+ var greatestCommonDivisor = function greatestCommonDivisor(a, b) {
+ if (!b) {
+ return a;
+ }
+ return greatestCommonDivisor(b, a % b);
+ };
+ audioTrack.timescale = audioTrack.audiosamplerate / greatestCommonDivisor(audioTrack.audiosamplerate, 1024);
+ })();
+ }
+ _logger.logger.log('audio mp4 timescale :' + audioTrack.timescale);
+ tracks.audio = {
+ container: 'audio/mp4',
+ codec: audioTrack.codec,
+ initSegment: _mp4Generator2.default.initSegment([audioTrack]),
+ metadata: {
+ channelCount: audioTrack.channelCount
+ }
+ };
+ if (computePTSDTS) {
+ // remember first PTS of this demuxing context. for audio, PTS = DTS
+ initPTS = initDTS = audioSamples[0].pts - pesTimeScale * timeOffset;
+ }
+ }
+
+ if (videoTrack.sps && videoTrack.pps && videoSamples.length) {
+ videoTrack.timescale = this.MP4_TIMESCALE;
+ tracks.video = {
+ container: 'video/mp4',
+ codec: videoTrack.codec,
+ initSegment: _mp4Generator2.default.initSegment([videoTrack]),
+ metadata: {
+ width: videoTrack.width,
+ height: videoTrack.height
+ }
+ };
+ if (computePTSDTS) {
+ initPTS = Math.min(initPTS, videoSamples[0].pts - pesTimeScale * timeOffset);
+ initDTS = Math.min(initDTS, videoSamples[0].dts - pesTimeScale * timeOffset);
+ }
+ }
+
+ if (Object.keys(tracks).length) {
+ observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);
+ this.ISGenerated = true;
+ if (computePTSDTS) {
+ this._initPTS = initPTS;
+ this._initDTS = initDTS;
+ }
+ } else {
+ observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });
+ }
+ }
+ }, {
+ key: 'remuxVideo',
+ value: function remuxVideo(track, timeOffset, contiguous, audioTrackLength) {
+ var offset = 8,
+ pesTimeScale = this.PES_TIMESCALE,
+ pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,
+ mp4SampleDuration,
+ mdat,
+ moof,
+ firstPTS,
+ firstDTS,
+ nextDTS,
+ lastPTS,
+ lastDTS,
+ inputSamples = track.samples,
+ outputSamples = [];
+
+ // for (let i = 0; i < track.samples.length; i++) {
+ // let avcSample = track.samples[i];
+ // let units = avcSample.units.units;
+ // let unitsString = '';
+ // for (let j = 0; j < units.length ; j++) {
+ // unitsString += units[j].type + ',';
+ // if (units[j].data.length < 500) {
+ // unitsString += Hex.hexDump(units[j].data);
+ // }
+ // }
+ // logger.log(avcSample.pts + '/' + avcSample.dts + ',' + unitsString + avcSample.units.length);
+ // }
+
+ // handle broken streams with PTS < DTS, tolerance up 200ms (18000 in 90kHz timescale)
+ var PTSDTSshift = inputSamples.reduce(function (prev, curr) {
+ return Math.max(Math.min(prev, curr.pts - curr.dts), -18000);
+ }, 0);
+ if (PTSDTSshift < 0) {
+ _logger.logger.warn('PTS < DTS detected in video samples, shifting DTS by ' + Math.round(PTSDTSshift / 90) + ' ms to overcome this issue');
+ for (var i = 0; i < inputSamples.length; i++) {
+ inputSamples[i].dts += PTSDTSshift;
+ }
+ }
+
+ // PTS is coded on 33bits, and can loop from -2^32 to 2^32
+ // PTSNormalize will make PTS/DTS value monotonic, we use last known DTS value as reference value
+ var nextAvcDts = void 0;
+ // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)
+ if (contiguous) {
+ // if parsed fragment is contiguous with last one, let's use last DTS value as reference
+ nextAvcDts = this.nextAvcDts;
+ } else {
+ // if not contiguous, let's use target timeOffset
+ nextAvcDts = timeOffset * pesTimeScale;
+ }
+
+ // compute first DTS and last DTS, normalize them against reference value
+ var sample = inputSamples[0];
+ firstDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);
+ firstPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);
+
+ // check timestamp continuity accross consecutive fragments (this is to remove inter-fragment gap/hole)
+ var delta = Math.round((firstDTS - nextAvcDts) / 90);
+ // if fragment are contiguous, detect hole/overlapping between fragments
+ if (contiguous) {
+ if (delta) {
+ if (delta > 1) {
+ _logger.logger.log('AVC:' + delta + ' ms hole between fragments detected,filling it');
+ } else if (delta < -1) {
+ _logger.logger.log('AVC:' + -delta + ' ms overlapping between fragments detected');
+ }
+ // remove hole/gap : set DTS to next expected DTS
+ firstDTS = nextAvcDts;
+ inputSamples[0].dts = firstDTS + this._initDTS;
+ // offset PTS as well, ensure that PTS is smaller or equal than new DTS
+ firstPTS = Math.max(firstPTS - delta, nextAvcDts);
+ inputSamples[0].pts = firstPTS + this._initDTS;
+ _logger.logger.log('Video/PTS/DTS adjusted: ' + Math.round(firstPTS / 90) + '/' + Math.round(firstDTS / 90) + ',delta:' + delta + ' ms');
+ }
+ }
+ nextDTS = firstDTS;
+
+ // compute lastPTS/lastDTS
+ sample = inputSamples[inputSamples.length - 1];
+ lastDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);
+ lastPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);
+ lastPTS = Math.max(lastPTS, lastDTS);
+
+ var vendor = navigator.vendor,
+ userAgent = navigator.userAgent,
+ isSafari = vendor && vendor.indexOf('Apple') > -1 && userAgent && !userAgent.match('CriOS');
+
+ // on Safari let's signal the same sample duration for all samples
+ // sample duration (as expected by trun MP4 boxes), should be the delta between sample DTS
+ // set this constant duration as being the avg delta between consecutive DTS.
+ if (isSafari) {
+ mp4SampleDuration = Math.round((lastDTS - firstDTS) / (pes2mp4ScaleFactor * (inputSamples.length - 1)));
+ }
+
+ // normalize all PTS/DTS now ...
+ for (var _i = 0; _i < inputSamples.length; _i++) {
+ var _sample = inputSamples[_i];
+ if (isSafari) {
+ // sample DTS is computed using a constant decoding offset (mp4SampleDuration) between samples
+ _sample.dts = firstDTS + _i * pes2mp4ScaleFactor * mp4SampleDuration;
+ } else {
+ // ensure sample monotonic DTS
+ _sample.dts = Math.max(this._PTSNormalize(_sample.dts - this._initDTS, nextAvcDts), firstDTS);
+ // ensure dts is a multiple of scale factor to avoid rounding issues
+ _sample.dts = Math.round(_sample.dts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;
+ }
+ // we normalize PTS against nextAvcDts, we also substract initDTS (some streams don't start @ PTS O)
+ // and we ensure that computed value is greater or equal than sample DTS
+ _sample.pts = Math.max(this._PTSNormalize(_sample.pts - this._initDTS, nextAvcDts), _sample.dts);
+ // ensure pts is a multiple of scale factor to avoid rounding issues
+ _sample.pts = Math.round(_sample.pts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;
+ }
+
+ /* concatenate the video data and construct the mdat in place
+ (need 8 more bytes to fill length and mpdat type) */
+ mdat = new Uint8Array(track.len + 4 * track.nbNalu + 8);
+ var view = new DataView(mdat.buffer);
+ view.setUint32(0, mdat.byteLength);
+ mdat.set(_mp4Generator2.default.types.mdat, 4);
+
+ for (var _i2 = 0; _i2 < inputSamples.length; _i2++) {
+ var avcSample = inputSamples[_i2],
+ mp4SampleLength = 0,
+ compositionTimeOffset = void 0;
+ // convert NALU bitstream to MP4 format (prepend NALU with size field)
+ while (avcSample.units.units.length) {
+ var unit = avcSample.units.units.shift();
+ view.setUint32(offset, unit.data.byteLength);
+ offset += 4;
+ mdat.set(unit.data, offset);
+ offset += unit.data.byteLength;
+ mp4SampleLength += 4 + unit.data.byteLength;
+ }
+
+ if (!isSafari) {
+ // expected sample duration is the Decoding Timestamp diff of consecutive samples
+ if (_i2 < inputSamples.length - 1) {
+ mp4SampleDuration = inputSamples[_i2 + 1].dts - avcSample.dts;
+ } else {
+ var config = this.config,
+ lastFrameDuration = avcSample.dts - inputSamples[_i2 > 0 ? _i2 - 1 : _i2].dts;
+ if (config.stretchShortVideoTrack) {
+ // In some cases, a segment's audio track duration may exceed the video track duration.
+ // Since we've already remuxed audio, and we know how long the audio track is, we look to
+ // see if the delta to the next segment is longer than the minimum of maxBufferHole and
+ // maxSeekHole. If so, playback would potentially get stuck, so we artificially inflate
+ // the duration of the last frame to minimize any potential gap between segments.
+ var maxBufferHole = config.maxBufferHole,
+ maxSeekHole = config.maxSeekHole,
+ gapTolerance = Math.floor(Math.min(maxBufferHole, maxSeekHole) * pesTimeScale),
+ deltaToFrameEnd = (audioTrackLength ? firstPTS + audioTrackLength * pesTimeScale : this.nextAacPts) - avcSample.pts;
+ if (deltaToFrameEnd > gapTolerance) {
+ // We subtract lastFrameDuration from deltaToFrameEnd to try to prevent any video
+ // frame overlap. maxBufferHole/maxSeekHole should be >> lastFrameDuration anyway.
+ mp4SampleDuration = deltaToFrameEnd - lastFrameDuration;
+ if (mp4SampleDuration < 0) {
+ mp4SampleDuration = lastFrameDuration;
+ }
+ _logger.logger.log('It is approximately ' + deltaToFrameEnd / 90 + ' ms to the next segment; using duration ' + mp4SampleDuration / 90 + ' ms for the last video frame.');
+ } else {
+ mp4SampleDuration = lastFrameDuration;
+ }
+ } else {
+ mp4SampleDuration = lastFrameDuration;
+ }
+ }
+ mp4SampleDuration /= pes2mp4ScaleFactor;
+ compositionTimeOffset = Math.round((avcSample.pts - avcSample.dts) / pes2mp4ScaleFactor);
+ } else {
+ compositionTimeOffset = Math.max(0, mp4SampleDuration * Math.round((avcSample.pts - avcSample.dts) / (pes2mp4ScaleFactor * mp4SampleDuration)));
+ }
+
+ //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');
+ outputSamples.push({
+ size: mp4SampleLength,
+ // constant duration
+ duration: mp4SampleDuration,
+ cts: compositionTimeOffset,
+ flags: {
+ isLeading: 0,
+ isDependedOn: 0,
+ hasRedundancy: 0,
+ degradPrio: 0,
+ dependsOn: avcSample.key ? 2 : 1,
+ isNonSync: avcSample.key ? 0 : 1
+ }
+ });
+ }
+ // next AVC sample DTS should be equal to last sample DTS + last sample duration (in PES timescale)
+ this.nextAvcDts = lastDTS + mp4SampleDuration * pes2mp4ScaleFactor;
+ var dropped = track.dropped;
+ track.len = 0;
+ track.nbNalu = 0;
+ track.dropped = 0;
+ if (outputSamples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
+ var flags = outputSamples[0].flags;
+ // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue
+ // https://code.google.com/p/chromium/issues/detail?id=229412
+ flags.dependsOn = 2;
+ flags.isNonSync = 0;
+ }
+ track.samples = outputSamples;
+ moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
+ track.samples = [];
+
+ var data = {
+ id: this.id,
+ level: this.level,
+ sn: this.sn,
+ data1: moof,
+ data2: mdat,
+ startPTS: firstPTS / pesTimeScale,
+ endPTS: (lastPTS + pes2mp4ScaleFactor * mp4SampleDuration) / pesTimeScale,
+ startDTS: firstDTS / pesTimeScale,
+ endDTS: this.nextAvcDts / pesTimeScale,
+ type: 'video',
+ nb: outputSamples.length,
+ dropped: dropped
+ };
+ this.observer.trigger(_events2.default.FRAG_PARSING_DATA, data);
+ return data;
+ }
+ }, {
+ key: 'remuxAudio',
+ value: function remuxAudio(track, timeOffset, contiguous, accurateTimeOffset) {
+ var pesTimeScale = this.PES_TIMESCALE,
+ mp4timeScale = track.timescale,
+ pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,
+ expectedSampleDuration = track.timescale * 1024 / track.audiosamplerate;
+ var view,
+ offset = 8,
+ aacSample,
+ mp4Sample,
+ unit,
+ mdat,
+ moof,
+ firstPTS,
+ firstDTS,
+ lastDTS,
+ pts,
+ dts,
+ ptsnorm,
+ dtsnorm,
+ samples = [],
+ samples0 = [],
+ fillFrame,
+ newStamp;
+
+ track.samples.sort(function (a, b) {
+ return a.pts - b.pts;
+ });
+ samples0 = track.samples;
+
+ // for audio samples, also consider consecutive fragments as being contiguous (even if a level switch occurs),
+ // for sake of clarity:
+ // consecutive fragments are frags with less than 100ms gaps between new time offset and next expected PTS
+ // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)
+ // this helps ensuring audio continuity
+ // and this also avoids audio glitches/cut when switching quality, or reporting wrong duration on first audio frame
+
+ contiguous |= samples0.length && this.nextAacPts && Math.abs(timeOffset - this.nextAacPts / pesTimeScale) < 0.1;
+
+ var nextAacPts = contiguous ? this.nextAacPts : timeOffset * pesTimeScale;
+
+ // If the audio track is missing samples, the frames seem to get "left-shifted" within the
+ // resulting mp4 segment, causing sync issues and leaving gaps at the end of the audio segment.
+ // In an effort to prevent this from happening, we inject frames here where there are gaps.
+ // When possible, we inject a silent frame; when that's not possible, we duplicate the last
+ // frame.
+ var pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor;
+ var nextPtsNorm = nextAacPts;
+
+ // only inject/drop audio frames in case time offset is accurate
+ if (accurateTimeOffset) {
+ for (var i = 0; i < samples0.length;) {
+ // First, let's see how far off this frame is from where we expect it to be
+ var sample = samples0[i],
+ ptsNorm = this._PTSNormalize(sample.pts - this._initDTS, nextAacPts),
+ delta = ptsNorm - nextPtsNorm;
+
+ // If we're overlapping by more than a duration, drop this sample
+ if (delta <= -pesFrameDuration) {
+ _logger.logger.warn('Dropping 1 audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(Math.abs(delta / 90)) + ' ms overlap.');
+ samples0.splice(i, 1);
+ track.len -= sample.unit.length;
+ // Don't touch nextPtsNorm or i
+ }
+ // Otherwise, if we're more than a frame away from where we should be, insert missing frames
+ else if (delta >= pesFrameDuration) {
+ var missing = Math.round(delta / pesFrameDuration);
+ _logger.logger.warn('Injecting ' + missing + ' audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(delta / 90) + ' ms gap.');
+ for (var j = 0; j < missing; j++) {
+ newStamp = nextPtsNorm + this._initDTS;
+ newStamp = Math.max(newStamp, this._initDTS);
+ fillFrame = _aac2.default.getSilentFrame(track.channelCount);
+ if (!fillFrame) {
+ _logger.logger.log('Unable to get silent frame for given audio codec; duplicating last frame instead.');
+ fillFrame = sample.unit.slice(0);
+ }
+ samples0.splice(i, 0, { unit: fillFrame, pts: newStamp, dts: newStamp });
+ track.len += fillFrame.length;
+ nextPtsNorm += pesFrameDuration;
+ i += 1;
+ }
+
+ // Adjust sample to next expected pts
+ sample.pts = sample.dts = nextPtsNorm + this._initDTS;
+ nextPtsNorm += pesFrameDuration;
+ i += 1;
+ }
+ // Otherwise, we're within half a frame duration, so just adjust pts
+ else {
+ if (Math.abs(delta) > 0.1 * pesFrameDuration) {
+ //logger.log(`Invalid frame delta ${Math.round(ptsNorm - nextPtsNorm + pesFrameDuration)} at PTS ${Math.round(ptsNorm / 90)} (should be ${Math.round(pesFrameDuration)}).`);
+ }
+ nextPtsNorm += pesFrameDuration;
+ if (i === 0) {
+ sample.pts = sample.dts = this._initDTS + nextAacPts;
+ } else {
+ sample.pts = sample.dts = samples0[i - 1].pts + pesFrameDuration;
+ }
+ i += 1;
+ }
+ }
+ }
+
+ while (samples0.length) {
+ aacSample = samples0.shift();
+ unit = aacSample.unit;
+ pts = aacSample.pts - this._initDTS;
+ dts = aacSample.dts - this._initDTS;
+ //logger.log(`Audio/PTS:${Math.round(pts/90)}`);
+ // if not first sample
+ if (lastDTS !== undefined) {
+ ptsnorm = this._PTSNormalize(pts, lastDTS);
+ dtsnorm = this._PTSNormalize(dts, lastDTS);
+ mp4Sample.duration = Math.round((dtsnorm - lastDTS) / pes2mp4ScaleFactor);
+ } else {
+ ptsnorm = this._PTSNormalize(pts, nextAacPts);
+ dtsnorm = this._PTSNormalize(dts, nextAacPts);
+ var _delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale),
+ numMissingFrames = 0;
+ // if fragment are contiguous, detect hole/overlapping between fragments
+ // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)
+ if (contiguous) {
+ // log delta
+ if (_delta) {
+ if (_delta > 0) {
+ numMissingFrames = Math.round((ptsnorm - nextAacPts) / pesFrameDuration);
+ _logger.logger.log(_delta + ' ms hole between AAC samples detected,filling it');
+ if (numMissingFrames > 0) {
+ fillFrame = _aac2.default.getSilentFrame(track.channelCount);
+ if (!fillFrame) {
+ fillFrame = unit.slice(0);
+ }
+ track.len += numMissingFrames * fillFrame.length;
+ }
+ // if we have frame overlap, overlapping for more than half a frame duraion
+ } else if (_delta < -12) {
+ // drop overlapping audio frames... browser will deal with it
+ _logger.logger.log(-_delta + ' ms overlapping between AAC samples detected, drop frame');
+ track.len -= unit.byteLength;
+ continue;
+ }
+ // set PTS/DTS to expected PTS/DTS
+ ptsnorm = dtsnorm = nextAacPts;
+ }
+ }
+ // remember first PTS of our aacSamples, ensure value is positive
+ firstPTS = Math.max(0, ptsnorm);
+ firstDTS = Math.max(0, dtsnorm);
+ if (track.len > 0) {
+ /* concatenate the audio data and construct the mdat in place
+ (need 8 more bytes to fill length and mdat type) */
+ mdat = new Uint8Array(track.len + 8);
+ view = new DataView(mdat.buffer);
+ view.setUint32(0, mdat.byteLength);
+ mdat.set(_mp4Generator2.default.types.mdat, 4);
+ } else {
+ // no audio samples
+ return;
+ }
+ for (var _i3 = 0; _i3 < numMissingFrames; _i3++) {
+ newStamp = ptsnorm - (numMissingFrames - _i3) * pesFrameDuration;
+ fillFrame = _aac2.default.getSilentFrame(track.channelCount);
+ if (!fillFrame) {
+ _logger.logger.log('Unable to get silent frame for given audio codec; duplicating this frame instead.');
+ fillFrame = unit.slice(0);
+ }
+ mdat.set(fillFrame, offset);
+ offset += fillFrame.byteLength;
+ mp4Sample = {
+ size: fillFrame.byteLength,
+ cts: 0,
+ duration: 1024,
+ flags: {
+ isLeading: 0,
+ isDependedOn: 0,
+ hasRedundancy: 0,
+ degradPrio: 0,
+ dependsOn: 1
+ }
+ };
+ samples.push(mp4Sample);
+ }
+ }
+ mdat.set(unit, offset);
+ offset += unit.byteLength;
+ //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');
+ mp4Sample = {
+ size: unit.byteLength,
+ cts: 0,
+ duration: 0,
+ flags: {
+ isLeading: 0,
+ isDependedOn: 0,
+ hasRedundancy: 0,
+ degradPrio: 0,
+ dependsOn: 1
+ }
+ };
+ samples.push(mp4Sample);
+ lastDTS = dtsnorm;
+ }
+ var lastSampleDuration = 0;
+ var nbSamples = samples.length;
+ //set last sample duration as being identical to previous sample
+ if (nbSamples >= 2) {
+ lastSampleDuration = samples[nbSamples - 2].duration;
+ mp4Sample.duration = lastSampleDuration;
+ }
+ if (nbSamples) {
+ // next aac sample PTS should be equal to last sample PTS + duration
+ this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;
+ //logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));
+ track.len = 0;
+ track.samples = samples;
+ moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);
+ track.samples = [];
+ var audioData = {
+ id: this.id,
+ level: this.level,
+ sn: this.sn,
+ data1: moof,
+ data2: mdat,
+ startPTS: firstPTS / pesTimeScale,
+ endPTS: this.nextAacPts / pesTimeScale,
+ startDTS: firstDTS / pesTimeScale,
+ endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,
+ type: 'audio',
+ nb: nbSamples
+ };
+ this.observer.trigger(_events2.default.FRAG_PARSING_DATA, audioData);
+ return audioData;
+ }
+ return null;
+ }
+ }, {
+ key: 'remuxEmptyAudio',
+ value: function remuxEmptyAudio(track, timeOffset, contiguous, videoData) {
+ var pesTimeScale = this.PES_TIMESCALE,
+ mp4timeScale = track.timescale ? track.timescale : track.audiosamplerate,
+ pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,
+
+
+ // sync with video's timestamp
+ startDTS = videoData.startDTS * pesTimeScale + this._initDTS,
+ endDTS = videoData.endDTS * pesTimeScale + this._initDTS,
+
+
+ // one sample's duration value
+ sampleDuration = 1024,
+ frameDuration = pes2mp4ScaleFactor * sampleDuration,
+
+
+ // samples count of this segment's duration
+ nbSamples = Math.ceil((endDTS - startDTS) / frameDuration),
+
+
+ // silent frame
+ silentFrame = _aac2.default.getSilentFrame(track.channelCount);
+
+ // Can't remux if we can't generate a silent frame...
+ if (!silentFrame) {
+ _logger.logger.trace('Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!');
+ return;
+ }
+
+ var samples = [];
+ for (var i = 0; i < nbSamples; i++) {
+ var stamp = startDTS + i * frameDuration;
+ samples.push({ unit: silentFrame.slice(0), pts: stamp, dts: stamp });
+ track.len += silentFrame.length;
+ }
+ track.samples = samples;
+
+ this.remuxAudio(track, timeOffset, contiguous);
+ }
+ }, {
+ key: 'remuxID3',
+ value: function remuxID3(track, timeOffset) {
+ var length = track.samples.length,
+ sample;
+ // consume samples
+ if (length) {
+ for (var index = 0; index < length; index++) {
+ sample = track.samples[index];
+ // setting id3 pts, dts to relative time
+ // using this._initPTS and this._initDTS to calculate relative time
+ sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;
+ sample.dts = (sample.dts - this._initDTS) / this.PES_TIMESCALE;
+ }
+ this.observer.trigger(_events2.default.FRAG_PARSING_METADATA, {
+ id: this.id,
+ level: this.level,
+ sn: this.sn,
+ samples: track.samples
+ });
+ }
+
+ track.samples = [];
+ timeOffset = timeOffset;
+ }
+ }, {
+ key: 'remuxText',
+ value: function remuxText(track, timeOffset) {
+ track.samples.sort(function (a, b) {
+ return a.pts - b.pts;
+ });
+
+ var length = track.samples.length,
+ sample;
+ // consume samples
+ if (length) {
+ for (var index = 0; index < length; index++) {
+ sample = track.samples[index];
+ // setting text pts, dts to relative time
+ // using this._initPTS and this._initDTS to calculate relative time
+ sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;
+ }
+ this.observer.trigger(_events2.default.FRAG_PARSING_USERDATA, {
+ id: this.id,
+ level: this.level,
+ sn: this.sn,
+ samples: track.samples
+ });
+ }
+
+ track.samples = [];
+ timeOffset = timeOffset;
+ }
+ }, {
+ key: '_PTSNormalize',
+ value: function _PTSNormalize(value, reference) {
+ var offset;
+ if (reference === undefined) {
+ return value;
+ }
+ if (reference < value) {
+ // - 2^33
+ offset = -8589934592;
+ } else {
+ // + 2^33
+ offset = 8589934592;
+ }
+ /* PTS is 33bit (from 0 to 2^33 -1)
+ if diff between value and reference is bigger than half of the amplitude (2^32) then it means that
+ PTS looping occured. fill the gap */
+ while (Math.abs(value - reference) > 4294967296) {
+ value += offset;
+ }
+ return value;
+ }
+ }, {
+ key: 'passthrough',
+ get: function get() {
+ return false;
+ }
+ }]);
+
+ return MP4Remuxer;
+ }();
+
+ exports.default = MP4Remuxer;
+
+ },{"24":24,"26":26,"27":27,"35":35,"43":43,"44":44}],37:[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; }; }(); /**
+ * passthrough remuxer
+ */
+
+
+ var _events = _dereq_(26);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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 PassThroughRemuxer = function () {
+ function PassThroughRemuxer(observer, id) {
+ _classCallCheck(this, PassThroughRemuxer);
+
+ this.observer = observer;
+ this.id = id;
+ this.ISGenerated = false;
+ }
+
+ _createClass(PassThroughRemuxer, [{
+ key: 'destroy',
+ value: function destroy() {}
+ }, {
+ key: 'insertDiscontinuity',
+ value: function insertDiscontinuity() {}
+ }, {
+ key: 'switchLevel',
+ value: function switchLevel() {
+ this.ISGenerated = false;
+ }
+ }, {
+ key: 'remux',
+ value: function remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, rawData) {
+ var observer = this.observer;
+ // generate Init Segment if needed
+ if (!this.ISGenerated) {
+ var tracks = {},
+ data = { id: this.id, tracks: tracks, unique: true },
+ track = videoTrack,
+ codec = track.codec;
+
+ if (codec) {
+ data.tracks.video = {
+ container: track.container,
+ codec: codec,
+ metadata: {
+ width: track.width,
+ height: track.height
+ }
+ };
+ }
+
+ track = audioTrack;
+ codec = track.codec;
+ if (codec) {
+ data.tracks.audio = {
+ container: track.container,
+ codec: codec,
+ metadata: {
+ channelCount: track.channelCount
+ }
+ };
+ }
+ this.ISGenerated = true;
+ observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);
+ }
+ observer.trigger(_events2.default.FRAG_PARSING_DATA, {
+ id: this.id,
+ data1: rawData,
+ startPTS: timeOffset,
+ startDTS: timeOffset,
+ type: 'audiovideo',
+ nb: 1,
+ dropped: 0
+ });
+ }
+ }, {
+ key: 'passthrough',
+ get: function get() {
+ return true;
+ }
+ }]);
+
+ return PassThroughRemuxer;
+ }();
+
+ exports.default = PassThroughRemuxer;
+
+ },{"26":26}],38:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ // adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js
+
+ var AttrList = function () {
+ function AttrList(attrs) {
+ _classCallCheck(this, AttrList);
+
+ if (typeof attrs === 'string') {
+ attrs = AttrList.parseAttrList(attrs);
+ }
+ for (var attr in attrs) {
+ if (attrs.hasOwnProperty(attr)) {
+ this[attr] = attrs[attr];
+ }
+ }
+ }
+
+ _createClass(AttrList, [{
+ key: 'decimalInteger',
+ value: function decimalInteger(attrName) {
+ var intValue = parseInt(this[attrName], 10);
+ if (intValue > Number.MAX_SAFE_INTEGER) {
+ return Infinity;
+ }
+ return intValue;
+ }
+ }, {
+ key: 'hexadecimalInteger',
+ value: function hexadecimalInteger(attrName) {
+ if (this[attrName]) {
+ var stringValue = (this[attrName] || '0x').slice(2);
+ stringValue = (stringValue.length & 1 ? '0' : '') + stringValue;
+
+ var value = new Uint8Array(stringValue.length / 2);
+ for (var i = 0; i < stringValue.length / 2; i++) {
+ value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);
+ }
+ return value;
+ } else {
+ return null;
+ }
+ }
+ }, {
+ key: 'hexadecimalIntegerAsNumber',
+ value: function hexadecimalIntegerAsNumber(attrName) {
+ var intValue = parseInt(this[attrName], 16);
+ if (intValue > Number.MAX_SAFE_INTEGER) {
+ return Infinity;
+ }
+ return intValue;
+ }
+ }, {
+ key: 'decimalFloatingPoint',
+ value: function decimalFloatingPoint(attrName) {
+ return parseFloat(this[attrName]);
+ }
+ }, {
+ key: 'enumeratedString',
+ value: function enumeratedString(attrName) {
+ return this[attrName];
+ }
+ }, {
+ key: 'decimalResolution',
+ value: function decimalResolution(attrName) {
+ var res = /^(\d+)x(\d+)$/.exec(this[attrName]);
+ if (res === null) {
+ return undefined;
+ }
+ return {
+ width: parseInt(res[1], 10),
+ height: parseInt(res[2], 10)
+ };
+ }
+ }], [{
+ key: 'parseAttrList',
+ value: function parseAttrList(input) {
+ var re = /\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g;
+ var match,
+ attrs = {};
+ while ((match = re.exec(input)) !== null) {
+ var value = match[2],
+ quote = '"';
+
+ if (value.indexOf(quote) === 0 && value.lastIndexOf(quote) === value.length - 1) {
+ value = value.slice(1, -1);
+ }
+ attrs[match[1]] = value;
+ }
+ return attrs;
+ }
+ }]);
+
+ return AttrList;
+ }();
+
+ exports.default = AttrList;
+
+ },{}],39:[function(_dereq_,module,exports){
+ "use strict";
+
+ var BinarySearch = {
+ /**
+ * Searches for an item in an array which matches a certain condition.
+ * This requires the condition to only match one item in the array,
+ * and for the array to be ordered.
+ *
+ * @param {Array} list The array to search.
+ * @param {Function} comparisonFunction
+ * Called and provided a candidate item as the first argument.
+ * Should return:
+ * > -1 if the item should be located at a lower index than the provided item.
+ * > 1 if the item should be located at a higher index than the provided item.
+ * > 0 if the item is the item you're looking for.
+ *
+ * @return {*} The object if it is found or null otherwise.
+ */
+ search: function search(list, comparisonFunction) {
+ var minIndex = 0;
+ var maxIndex = list.length - 1;
+ var currentIndex = null;
+ var currentElement = null;
+
+ while (minIndex <= maxIndex) {
+ currentIndex = (minIndex + maxIndex) / 2 | 0;
+ currentElement = list[currentIndex];
+
+ var comparisonResult = comparisonFunction(currentElement);
+ if (comparisonResult > 0) {
+ minIndex = currentIndex + 1;
+ } else if (comparisonResult < 0) {
+ maxIndex = currentIndex - 1;
+ } else {
+ return currentElement;
+ }
+ }
+
+ return null;
+ }
+ };
+
+ module.exports = BinarySearch;
+
+ },{}],40:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /**
+ *
+ * This code was ported from the dash.js project at:
+ * https://github.com/Dash-Industry-Forum/dash.js/blob/development/externals/cea608-parser.js
+ * https://github.com/Dash-Industry-Forum/dash.js/commit/8269b26a761e0853bb21d78780ed945144ecdd4d#diff-71bc295a2d6b6b7093a1d3290d53a4b2
+ *
+ * The original copyright appears below:
+ *
+ * The copyright in this software is being made available under the BSD License,
+ * included below. This software may be subject to other third party and contributor
+ * rights, including patent rights, and no such rights are granted under this license.
+ *
+ * Copyright (c) 2015-2016, DASH Industry Forum.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation and/or
+ * other materials provided with the distribution.
+ * 2. Neither the name of Dash Industry Forum nor the names of its
+ * contributors may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+ /**
+ * Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes
+ */
+
+ var specialCea608CharsCodes = {
+ 0x2a: 0xe1, // lowercase a, acute accent
+ 0x5c: 0xe9, // lowercase e, acute accent
+ 0x5e: 0xed, // lowercase i, acute accent
+ 0x5f: 0xf3, // lowercase o, acute accent
+ 0x60: 0xfa, // lowercase u, acute accent
+ 0x7b: 0xe7, // lowercase c with cedilla
+ 0x7c: 0xf7, // division symbol
+ 0x7d: 0xd1, // uppercase N tilde
+ 0x7e: 0xf1, // lowercase n tilde
+ 0x7f: 0x2588, // Full block
+ // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS
+ // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F
+ // THIS MEANS THAT \x50 MUST BE ADDED TO THE VALUES
+ 0x80: 0xae, // Registered symbol (R)
+ 0x81: 0xb0, // degree sign
+ 0x82: 0xbd, // 1/2 symbol
+ 0x83: 0xbf, // Inverted (open) question mark
+ 0x84: 0x2122, // Trademark symbol (TM)
+ 0x85: 0xa2, // Cents symbol
+ 0x86: 0xa3, // Pounds sterling
+ 0x87: 0x266a, // Music 8'th note
+ 0x88: 0xe0, // lowercase a, grave accent
+ 0x89: 0x20, // transparent space (regular)
+ 0x8a: 0xe8, // lowercase e, grave accent
+ 0x8b: 0xe2, // lowercase a, circumflex accent
+ 0x8c: 0xea, // lowercase e, circumflex accent
+ 0x8d: 0xee, // lowercase i, circumflex accent
+ 0x8e: 0xf4, // lowercase o, circumflex accent
+ 0x8f: 0xfb, // lowercase u, circumflex accent
+ // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS
+ // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F
+ 0x90: 0xc1, // capital letter A with acute
+ 0x91: 0xc9, // capital letter E with acute
+ 0x92: 0xd3, // capital letter O with acute
+ 0x93: 0xda, // capital letter U with acute
+ 0x94: 0xdc, // capital letter U with diaresis
+ 0x95: 0xfc, // lowercase letter U with diaeresis
+ 0x96: 0x2018, // opening single quote
+ 0x97: 0xa1, // inverted exclamation mark
+ 0x98: 0x2a, // asterisk
+ 0x99: 0x2019, // closing single quote
+ 0x9a: 0x2501, // box drawings heavy horizontal
+ 0x9b: 0xa9, // copyright sign
+ 0x9c: 0x2120, // Service mark
+ 0x9d: 0x2022, // (round) bullet
+ 0x9e: 0x201c, // Left double quotation mark
+ 0x9f: 0x201d, // Right double quotation mark
+ 0xa0: 0xc0, // uppercase A, grave accent
+ 0xa1: 0xc2, // uppercase A, circumflex
+ 0xa2: 0xc7, // uppercase C with cedilla
+ 0xa3: 0xc8, // uppercase E, grave accent
+ 0xa4: 0xca, // uppercase E, circumflex
+ 0xa5: 0xcb, // capital letter E with diaresis
+ 0xa6: 0xeb, // lowercase letter e with diaresis
+ 0xa7: 0xce, // uppercase I, circumflex
+ 0xa8: 0xcf, // uppercase I, with diaresis
+ 0xa9: 0xef, // lowercase i, with diaresis
+ 0xaa: 0xd4, // uppercase O, circumflex
+ 0xab: 0xd9, // uppercase U, grave accent
+ 0xac: 0xf9, // lowercase u, grave accent
+ 0xad: 0xdb, // uppercase U, circumflex
+ 0xae: 0xab, // left-pointing double angle quotation mark
+ 0xaf: 0xbb, // right-pointing double angle quotation mark
+ // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS
+ // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F
+ 0xb0: 0xc3, // Uppercase A, tilde
+ 0xb1: 0xe3, // Lowercase a, tilde
+ 0xb2: 0xcd, // Uppercase I, acute accent
+ 0xb3: 0xcc, // Uppercase I, grave accent
+ 0xb4: 0xec, // Lowercase i, grave accent
+ 0xb5: 0xd2, // Uppercase O, grave accent
+ 0xb6: 0xf2, // Lowercase o, grave accent
+ 0xb7: 0xd5, // Uppercase O, tilde
+ 0xb8: 0xf5, // Lowercase o, tilde
+ 0xb9: 0x7b, // Open curly brace
+ 0xba: 0x7d, // Closing curly brace
+ 0xbb: 0x5c, // Backslash
+ 0xbc: 0x5e, // Caret
+ 0xbd: 0x5f, // Underscore
+ 0xbe: 0x7c, // Pipe (vertical line)
+ 0xbf: 0x223c, // Tilde operator
+ 0xc0: 0xc4, // Uppercase A, umlaut
+ 0xc1: 0xe4, // Lowercase A, umlaut
+ 0xc2: 0xd6, // Uppercase O, umlaut
+ 0xc3: 0xf6, // Lowercase o, umlaut
+ 0xc4: 0xdf, // Esszett (sharp S)
+ 0xc5: 0xa5, // Yen symbol
+ 0xc6: 0xa4, // Generic currency sign
+ 0xc7: 0x2503, // Box drawings heavy vertical
+ 0xc8: 0xc5, // Uppercase A, ring
+ 0xc9: 0xe5, // Lowercase A, ring
+ 0xca: 0xd8, // Uppercase O, stroke
+ 0xcb: 0xf8, // Lowercase o, strok
+ 0xcc: 0x250f, // Box drawings heavy down and right
+ 0xcd: 0x2513, // Box drawings heavy down and left
+ 0xce: 0x2517, // Box drawings heavy up and right
+ 0xcf: 0x251b // Box drawings heavy up and left
+ };
+
+ /**
+ * Utils
+ */
+ var getCharForByte = function getCharForByte(byte) {
+ var charCode = byte;
+ if (specialCea608CharsCodes.hasOwnProperty(byte)) {
+ charCode = specialCea608CharsCodes[byte];
+ }
+ return String.fromCharCode(charCode);
+ };
+
+ var NR_ROWS = 15,
+ NR_COLS = 32;
+ // Tables to look up row from PAC data
+ var rowsLowCh1 = { 0x11: 1, 0x12: 3, 0x15: 5, 0x16: 7, 0x17: 9, 0x10: 11, 0x13: 12, 0x14: 14 };
+ var rowsHighCh1 = { 0x11: 2, 0x12: 4, 0x15: 6, 0x16: 8, 0x17: 10, 0x13: 13, 0x14: 15 };
+ var rowsLowCh2 = { 0x19: 1, 0x1A: 3, 0x1D: 5, 0x1E: 7, 0x1F: 9, 0x18: 11, 0x1B: 12, 0x1C: 14 };
+ var rowsHighCh2 = { 0x19: 2, 0x1A: 4, 0x1D: 6, 0x1E: 8, 0x1F: 10, 0x1B: 13, 0x1C: 15 };
+
+ var backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];
+
+ /**
+ * Simple logger class to be able to write with time-stamps and filter on level.
+ */
+ var logger = {
+ verboseFilter: { 'DATA': 3, 'DEBUG': 3, 'INFO': 2, 'WARNING': 2, 'TEXT': 1, 'ERROR': 0 },
+ time: null,
+ verboseLevel: 0, // Only write errors
+ setTime: function setTime(newTime) {
+ this.time = newTime;
+ },
+ log: function log(severity, msg) {
+ var minLevel = this.verboseFilter[severity];
+ if (this.verboseLevel >= minLevel) {
+ console.log(this.time + ' [' + severity + '] ' + msg);
+ }
+ }
+ };
+
+ var numArrayToHexArray = function numArrayToHexArray(numArray) {
+ var hexArray = [];
+ for (var j = 0; j < numArray.length; j++) {
+ hexArray.push(numArray[j].toString(16));
+ }
+ return hexArray;
+ };
+
+ var PenState = function () {
+ function PenState(foreground, underline, italics, background, flash) {
+ _classCallCheck(this, PenState);
+
+ this.foreground = foreground || 'white';
+ this.underline = underline || false;
+ this.italics = italics || false;
+ this.background = background || 'black';
+ this.flash = flash || false;
+ }
+
+ _createClass(PenState, [{
+ key: 'reset',
+ value: function reset() {
+ this.foreground = 'white';
+ this.underline = false;
+ this.italics = false;
+ this.background = 'black';
+ this.flash = false;
+ }
+ }, {
+ key: 'setStyles',
+ value: function setStyles(styles) {
+ var attribs = ['foreground', 'underline', 'italics', 'background', 'flash'];
+ for (var i = 0; i < attribs.length; i++) {
+ var style = attribs[i];
+ if (styles.hasOwnProperty(style)) {
+ this[style] = styles[style];
+ }
+ }
+ }
+ }, {
+ key: 'isDefault',
+ value: function isDefault() {
+ return this.foreground === 'white' && !this.underline && !this.italics && this.background === 'black' && !this.flash;
+ }
+ }, {
+ key: 'equals',
+ value: function equals(other) {
+ return this.foreground === other.foreground && this.underline === other.underline && this.italics === other.italics && this.background === other.background && this.flash === other.flash;
+ }
+ }, {
+ key: 'copy',
+ value: function copy(newPenState) {
+ this.foreground = newPenState.foreground;
+ this.underline = newPenState.underline;
+ this.italics = newPenState.italics;
+ this.background = newPenState.background;
+ this.flash = newPenState.flash;
+ }
+ }, {
+ key: 'toString',
+ value: function toString() {
+ return 'color=' + this.foreground + ', underline=' + this.underline + ', italics=' + this.italics + ', background=' + this.background + ', flash=' + this.flash;
+ }
+ }]);
+
+ return PenState;
+ }();
+
+ /**
+ * Unicode character with styling and background.
+ * @constructor
+ */
+
+
+ var StyledUnicodeChar = function () {
+ function StyledUnicodeChar(uchar, foreground, underline, italics, background, flash) {
+ _classCallCheck(this, StyledUnicodeChar);
+
+ this.uchar = uchar || ' '; // unicode character
+ this.penState = new PenState(foreground, underline, italics, background, flash);
+ }
+
+ _createClass(StyledUnicodeChar, [{
+ key: 'reset',
+ value: function reset() {
+ this.uchar = ' ';
+ this.penState.reset();
+ }
+ }, {
+ key: 'setChar',
+ value: function setChar(uchar, newPenState) {
+ this.uchar = uchar;
+ this.penState.copy(newPenState);
+ }
+ }, {
+ key: 'setPenState',
+ value: function setPenState(newPenState) {
+ this.penState.copy(newPenState);
+ }
+ }, {
+ key: 'equals',
+ value: function equals(other) {
+ return this.uchar === other.uchar && this.penState.equals(other.penState);
+ }
+ }, {
+ key: 'copy',
+ value: function copy(newChar) {
+ this.uchar = newChar.uchar;
+ this.penState.copy(newChar.penState);
+ }
+ }, {
+ key: 'isEmpty',
+ value: function isEmpty() {
+ return this.uchar === ' ' && this.penState.isDefault();
+ }
+ }]);
+
+ return StyledUnicodeChar;
+ }();
+
+ /**
+ * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.
+ * @constructor
+ */
+
+
+ var Row = function () {
+ function Row() {
+ _classCallCheck(this, Row);
+
+ this.chars = [];
+ for (var i = 0; i < NR_COLS; i++) {
+ this.chars.push(new StyledUnicodeChar());
+ }
+ this.pos = 0;
+ this.currPenState = new PenState();
+ }
+
+ _createClass(Row, [{
+ key: 'equals',
+ value: function equals(other) {
+ var equal = true;
+ for (var i = 0; i < NR_COLS; i++) {
+ if (!this.chars[i].equals(other.chars[i])) {
+ equal = false;
+ break;
+ }
+ }
+ return equal;
+ }
+ }, {
+ key: 'copy',
+ value: function copy(other) {
+ for (var i = 0; i < NR_COLS; i++) {
+ this.chars[i].copy(other.chars[i]);
+ }
+ }
+ }, {
+ key: 'isEmpty',
+ value: function isEmpty() {
+ var empty = true;
+ for (var i = 0; i < NR_COLS; i++) {
+ if (!this.chars[i].isEmpty()) {
+ empty = false;
+ break;
+ }
+ }
+ return empty;
+ }
+
+ /**
+ * Set the cursor to a valid column.
+ */
+
+ }, {
+ key: 'setCursor',
+ value: function setCursor(absPos) {
+ if (this.pos !== absPos) {
+ this.pos = absPos;
+ }
+ if (this.pos < 0) {
+ logger.log('ERROR', 'Negative cursor position ' + this.pos);
+ this.pos = 0;
+ } else if (this.pos > NR_COLS) {
+ logger.log('ERROR', 'Too large cursor position ' + this.pos);
+ this.pos = NR_COLS;
+ }
+ }
+
+ /**
+ * Move the cursor relative to current position.
+ */
+
+ }, {
+ key: 'moveCursor',
+ value: function moveCursor(relPos) {
+ var newPos = this.pos + relPos;
+ if (relPos > 1) {
+ for (var i = this.pos + 1; i < newPos + 1; i++) {
+ this.chars[i].setPenState(this.currPenState);
+ }
+ }
+ this.setCursor(newPos);
+ }
+
+ /**
+ * Backspace, move one step back and clear character.
+ */
+
+ }, {
+ key: 'backSpace',
+ value: function backSpace() {
+ this.moveCursor(-1);
+ this.chars[this.pos].setChar(' ', this.currPenState);
+ }
+ }, {
+ key: 'insertChar',
+ value: function insertChar(byte) {
+ if (byte >= 0x90) {
+ //Extended char
+ this.backSpace();
+ }
+ var char = getCharForByte(byte);
+ if (this.pos >= NR_COLS) {
+ logger.log('ERROR', 'Cannot insert ' + byte.toString(16) + ' (' + char + ') at position ' + this.pos + '. Skipping it!');
+ return;
+ }
+ this.chars[this.pos].setChar(char, this.currPenState);
+ this.moveCursor(1);
+ }
+ }, {
+ key: 'clearFromPos',
+ value: function clearFromPos(startPos) {
+ var i;
+ for (i = startPos; i < NR_COLS; i++) {
+ this.chars[i].reset();
+ }
+ }
+ }, {
+ key: 'clear',
+ value: function clear() {
+ this.clearFromPos(0);
+ this.pos = 0;
+ this.currPenState.reset();
+ }
+ }, {
+ key: 'clearToEndOfRow',
+ value: function clearToEndOfRow() {
+ this.clearFromPos(this.pos);
+ }
+ }, {
+ key: 'getTextString',
+ value: function getTextString() {
+ var chars = [];
+ var empty = true;
+ for (var i = 0; i < NR_COLS; i++) {
+ var char = this.chars[i].uchar;
+ if (char !== ' ') {
+ empty = false;
+ }
+ chars.push(char);
+ }
+ if (empty) {
+ return '';
+ } else {
+ return chars.join('');
+ }
+ }
+ }, {
+ key: 'setPenStyles',
+ value: function setPenStyles(styles) {
+ this.currPenState.setStyles(styles);
+ var currChar = this.chars[this.pos];
+ currChar.setPenState(this.currPenState);
+ }
+ }]);
+
+ return Row;
+ }();
+
+ /**
+ * Keep a CEA-608 screen of 32x15 styled characters
+ * @constructor
+ */
+
+
+ var CaptionScreen = function () {
+ function CaptionScreen() {
+ _classCallCheck(this, CaptionScreen);
+
+ this.rows = [];
+ for (var i = 0; i < NR_ROWS; i++) {
+ this.rows.push(new Row()); // Note that we use zero-based numbering (0-14)
+ }
+ this.currRow = NR_ROWS - 1;
+ this.nrRollUpRows = null;
+ this.reset();
+ }
+
+ _createClass(CaptionScreen, [{
+ key: 'reset',
+ value: function reset() {
+ for (var i = 0; i < NR_ROWS; i++) {
+ this.rows[i].clear();
+ }
+ this.currRow = NR_ROWS - 1;
+ }
+ }, {
+ key: 'equals',
+ value: function equals(other) {
+ var equal = true;
+ for (var i = 0; i < NR_ROWS; i++) {
+ if (!this.rows[i].equals(other.rows[i])) {
+ equal = false;
+ break;
+ }
+ }
+ return equal;
+ }
+ }, {
+ key: 'copy',
+ value: function copy(other) {
+ for (var i = 0; i < NR_ROWS; i++) {
+ this.rows[i].copy(other.rows[i]);
+ }
+ }
+ }, {
+ key: 'isEmpty',
+ value: function isEmpty() {
+ var empty = true;
+ for (var i = 0; i < NR_ROWS; i++) {
+ if (!this.rows[i].isEmpty()) {
+ empty = false;
+ break;
+ }
+ }
+ return empty;
+ }
+ }, {
+ key: 'backSpace',
+ value: function backSpace() {
+ var row = this.rows[this.currRow];
+ row.backSpace();
+ }
+ }, {
+ key: 'clearToEndOfRow',
+ value: function clearToEndOfRow() {
+ var row = this.rows[this.currRow];
+ row.clearToEndOfRow();
+ }
+
+ /**
+ * Insert a character (without styling) in the current row.
+ */
+
+ }, {
+ key: 'insertChar',
+ value: function insertChar(char) {
+ var row = this.rows[this.currRow];
+ row.insertChar(char);
+ }
+ }, {
+ key: 'setPen',
+ value: function setPen(styles) {
+ var row = this.rows[this.currRow];
+ row.setPenStyles(styles);
+ }
+ }, {
+ key: 'moveCursor',
+ value: function moveCursor(relPos) {
+ var row = this.rows[this.currRow];
+ row.moveCursor(relPos);
+ }
+ }, {
+ key: 'setCursor',
+ value: function setCursor(absPos) {
+ logger.log('INFO', 'setCursor: ' + absPos);
+ var row = this.rows[this.currRow];
+ row.setCursor(absPos);
+ }
+ }, {
+ key: 'setPAC',
+ value: function setPAC(pacData) {
+ logger.log('INFO', 'pacData = ' + JSON.stringify(pacData));
+ var newRow = pacData.row - 1;
+ if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {
+ newRow = this.nrRollUpRows - 1;
+ }
+ this.currRow = newRow;
+ var row = this.rows[this.currRow];
+ if (pacData.indent !== null) {
+ var indent = pacData.indent;
+ var prevPos = Math.max(indent - 1, 0);
+ row.setCursor(pacData.indent);
+ pacData.color = row.chars[prevPos].penState.foreground;
+ }
+ var styles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };
+ this.setPen(styles);
+ }
+
+ /**
+ * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).
+ */
+
+ }, {
+ key: 'setBkgData',
+ value: function setBkgData(bkgData) {
+
+ logger.log('INFO', 'bkgData = ' + JSON.stringify(bkgData));
+ this.backSpace();
+ this.setPen(bkgData);
+ this.insertChar(0x20); //Space
+ }
+ }, {
+ key: 'setRollUpRows',
+ value: function setRollUpRows(nrRows) {
+ this.nrRollUpRows = nrRows;
+ }
+ }, {
+ key: 'rollUp',
+ value: function rollUp() {
+ if (this.nrRollUpRows === null) {
+ logger.log('DEBUG', 'roll_up but nrRollUpRows not set yet');
+ return; //Not properly setup
+ }
+ logger.log('TEXT', this.getDisplayText());
+ var topRowIndex = this.currRow + 1 - this.nrRollUpRows;
+ var topRow = this.rows.splice(topRowIndex, 1)[0];
+ topRow.clear();
+ this.rows.splice(this.currRow, 0, topRow);
+ logger.log('INFO', 'Rolling up');
+ //logger.log('TEXT', this.get_display_text())
+ }
+
+ /**
+ * Get all non-empty rows with as unicode text.
+ */
+
+ }, {
+ key: 'getDisplayText',
+ value: function getDisplayText(asOneRow) {
+ asOneRow = asOneRow || false;
+ var displayText = [];
+ var text = '';
+ var rowNr = -1;
+ for (var i = 0; i < NR_ROWS; i++) {
+ var rowText = this.rows[i].getTextString();
+ if (rowText) {
+ rowNr = i + 1;
+ if (asOneRow) {
+ displayText.push('Row ' + rowNr + ': \'' + rowText + '\'');
+ } else {
+ displayText.push(rowText.trim());
+ }
+ }
+ }
+ if (displayText.length > 0) {
+ if (asOneRow) {
+ text = '[' + displayText.join(' | ') + ']';
+ } else {
+ text = displayText.join('\n');
+ }
+ }
+ return text;
+ }
+ }, {
+ key: 'getTextAndFormat',
+ value: function getTextAndFormat() {
+ return this.rows;
+ }
+ }]);
+
+ return CaptionScreen;
+ }();
+
+ //var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];
+
+ var Cea608Channel = function () {
+ function Cea608Channel(channelNumber, outputFilter) {
+ _classCallCheck(this, Cea608Channel);
+
+ this.chNr = channelNumber;
+ this.outputFilter = outputFilter;
+ this.mode = null;
+ this.verbose = 0;
+ this.displayedMemory = new CaptionScreen();
+ this.nonDisplayedMemory = new CaptionScreen();
+ this.lastOutputScreen = new CaptionScreen();
+ this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];
+ this.writeScreen = this.displayedMemory;
+ this.mode = null;
+ this.cueStartTime = null; // Keeps track of where a cue started.
+ }
+
+ _createClass(Cea608Channel, [{
+ key: 'reset',
+ value: function reset() {
+ this.mode = null;
+ this.displayedMemory.reset();
+ this.nonDisplayedMemory.reset();
+ this.lastOutputScreen.reset();
+ this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];
+ this.writeScreen = this.displayedMemory;
+ this.mode = null;
+ this.cueStartTime = null;
+ this.lastCueEndTime = null;
+ }
+ }, {
+ key: 'getHandler',
+ value: function getHandler() {
+ return this.outputFilter;
+ }
+ }, {
+ key: 'setHandler',
+ value: function setHandler(newHandler) {
+ this.outputFilter = newHandler;
+ }
+ }, {
+ key: 'setPAC',
+ value: function setPAC(pacData) {
+ this.writeScreen.setPAC(pacData);
+ }
+ }, {
+ key: 'setBkgData',
+ value: function setBkgData(bkgData) {
+ this.writeScreen.setBkgData(bkgData);
+ }
+ }, {
+ key: 'setMode',
+ value: function setMode(newMode) {
+ if (newMode === this.mode) {
+ return;
+ }
+ this.mode = newMode;
+ logger.log('INFO', 'MODE=' + newMode);
+ if (this.mode === 'MODE_POP-ON') {
+ this.writeScreen = this.nonDisplayedMemory;
+ } else {
+ this.writeScreen = this.displayedMemory;
+ this.writeScreen.reset();
+ }
+ if (this.mode !== 'MODE_ROLL-UP') {
+ this.displayedMemory.nrRollUpRows = null;
+ this.nonDisplayedMemory.nrRollUpRows = null;
+ }
+ this.mode = newMode;
+ }
+ }, {
+ key: 'insertChars',
+ value: function insertChars(chars) {
+ for (var i = 0; i < chars.length; i++) {
+ this.writeScreen.insertChar(chars[i]);
+ }
+ var screen = this.writeScreen === this.displayedMemory ? 'DISP' : 'NON_DISP';
+ logger.log('INFO', screen + ': ' + this.writeScreen.getDisplayText(true));
+ if (this.mode === 'MODE_PAINT-ON' || this.mode === 'MODE_ROLL-UP') {
+ logger.log('TEXT', 'DISPLAYED: ' + this.displayedMemory.getDisplayText(true));
+ this.outputDataUpdate();
+ }
+ }
+ }, {
+ key: 'ccRCL',
+ value: function ccRCL() {
+ // Resume Caption Loading (switch mode to Pop On)
+ logger.log('INFO', 'RCL - Resume Caption Loading');
+ this.setMode('MODE_POP-ON');
+ }
+ }, {
+ key: 'ccBS',
+ value: function ccBS() {
+ // BackSpace
+ logger.log('INFO', 'BS - BackSpace');
+ if (this.mode === 'MODE_TEXT') {
+ return;
+ }
+ this.writeScreen.backSpace();
+ if (this.writeScreen === this.displayedMemory) {
+ this.outputDataUpdate();
+ }
+ }
+ }, {
+ key: 'ccAOF',
+ value: function ccAOF() {
+ // Reserved (formerly Alarm Off)
+ return;
+ }
+ }, {
+ key: 'ccAON',
+ value: function ccAON() {
+ // Reserved (formerly Alarm On)
+ return;
+ }
+ }, {
+ key: 'ccDER',
+ value: function ccDER() {
+ // Delete to End of Row
+ logger.log('INFO', 'DER- Delete to End of Row');
+ this.writeScreen.clearToEndOfRow();
+ this.outputDataUpdate();
+ }
+ }, {
+ key: 'ccRU',
+ value: function ccRU(nrRows) {
+ //Roll-Up Captions-2,3,or 4 Rows
+ logger.log('INFO', 'RU(' + nrRows + ') - Roll Up');
+ this.writeScreen = this.displayedMemory;
+ this.setMode('MODE_ROLL-UP');
+ this.writeScreen.setRollUpRows(nrRows);
+ }
+ }, {
+ key: 'ccFON',
+ value: function ccFON() {
+ //Flash On
+ logger.log('INFO', 'FON - Flash On');
+ this.writeScreen.setPen({ flash: true });
+ }
+ }, {
+ key: 'ccRDC',
+ value: function ccRDC() {
+ // Resume Direct Captioning (switch mode to PaintOn)
+ logger.log('INFO', 'RDC - Resume Direct Captioning');
+ this.setMode('MODE_PAINT-ON');
+ }
+ }, {
+ key: 'ccTR',
+ value: function ccTR() {
+ // Text Restart in text mode (not supported, however)
+ logger.log('INFO', 'TR');
+ this.setMode('MODE_TEXT');
+ }
+ }, {
+ key: 'ccRTD',
+ value: function ccRTD() {
+ // Resume Text Display in Text mode (not supported, however)
+ logger.log('INFO', 'RTD');
+ this.setMode('MODE_TEXT');
+ }
+ }, {
+ key: 'ccEDM',
+ value: function ccEDM() {
+ // Erase Displayed Memory
+ logger.log('INFO', 'EDM - Erase Displayed Memory');
+ this.displayedMemory.reset();
+ this.outputDataUpdate();
+ }
+ }, {
+ key: 'ccCR',
+ value: function ccCR() {
+ // Carriage Return
+ logger.log('CR - Carriage Return');
+ this.writeScreen.rollUp();
+ this.outputDataUpdate();
+ }
+ }, {
+ key: 'ccENM',
+ value: function ccENM() {
+ //Erase Non-Displayed Memory
+ logger.log('INFO', 'ENM - Erase Non-displayed Memory');
+ this.nonDisplayedMemory.reset();
+ }
+ }, {
+ key: 'ccEOC',
+ value: function ccEOC() {
+ //End of Caption (Flip Memories)
+ logger.log('INFO', 'EOC - End Of Caption');
+ if (this.mode === 'MODE_POP-ON') {
+ var tmp = this.displayedMemory;
+ this.displayedMemory = this.nonDisplayedMemory;
+ this.nonDisplayedMemory = tmp;
+ this.writeScreen = this.nonDisplayedMemory;
+ logger.log('TEXT', 'DISP: ' + this.displayedMemory.getDisplayText());
+ }
+ this.outputDataUpdate();
+ }
+ }, {
+ key: 'ccTO',
+ value: function ccTO(nrCols) {
+ // Tab Offset 1,2, or 3 columns
+ logger.log('INFO', 'TO(' + nrCols + ') - Tab Offset');
+ this.writeScreen.moveCursor(nrCols);
+ }
+ }, {
+ key: 'ccMIDROW',
+ value: function ccMIDROW(secondByte) {
+ // Parse MIDROW command
+ var styles = { flash: false };
+ styles.underline = secondByte % 2 === 1;
+ styles.italics = secondByte >= 0x2e;
+ if (!styles.italics) {
+ var colorIndex = Math.floor(secondByte / 2) - 0x10;
+ var colors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta'];
+ styles.foreground = colors[colorIndex];
+ } else {
+ styles.foreground = 'white';
+ }
+ logger.log('INFO', 'MIDROW: ' + JSON.stringify(styles));
+ this.writeScreen.setPen(styles);
+ }
+ }, {
+ key: 'outputDataUpdate',
+ value: function outputDataUpdate() {
+ var t = logger.time;
+ if (t === null) {
+ return;
+ }
+ if (this.outputFilter) {
+ if (this.outputFilter.updateData) {
+ this.outputFilter.updateData(t, this.displayedMemory);
+ }
+ if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) {
+ // Start of a new cue
+ this.cueStartTime = t;
+ } else {
+ if (!this.displayedMemory.equals(this.lastOutputScreen)) {
+ if (this.outputFilter.newCue) {
+ this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);
+ }
+ this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;
+ }
+ }
+ this.lastOutputScreen.copy(this.displayedMemory);
+ }
+ }
+ }, {
+ key: 'cueSplitAtTime',
+ value: function cueSplitAtTime(t) {
+ if (this.outputFilter) {
+ if (!this.displayedMemory.isEmpty()) {
+ if (this.outputFilter.newCue) {
+ this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);
+ }
+ this.cueStartTime = t;
+ }
+ }
+ }
+ }]);
+
+ return Cea608Channel;
+ }();
+
+ var Cea608Parser = function () {
+ function Cea608Parser(field, out1, out2) {
+ _classCallCheck(this, Cea608Parser);
+
+ this.field = field || 1;
+ this.outputs = [out1, out2];
+ this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];
+ this.currChNr = -1; // Will be 1 or 2
+ this.lastCmdA = null; // First byte of last command
+ this.lastCmdB = null; // Second byte of last command
+ this.bufferedData = [];
+ this.startTime = null;
+ this.lastTime = null;
+ this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };
+ }
+
+ _createClass(Cea608Parser, [{
+ key: 'getHandler',
+ value: function getHandler(index) {
+ return this.channels[index].getHandler();
+ }
+ }, {
+ key: 'setHandler',
+ value: function setHandler(index, newHandler) {
+ this.channels[index].setHandler(newHandler);
+ }
+
+ /**
+ * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.
+ */
+
+ }, {
+ key: 'addData',
+ value: function addData(t, byteList) {
+ var cmdFound,
+ a,
+ b,
+ charsFound = false;
+
+ this.lastTime = t;
+ logger.setTime(t);
+
+ for (var i = 0; i < byteList.length; i += 2) {
+ a = byteList[i] & 0x7f;
+ b = byteList[i + 1] & 0x7f;
+ if (a === 0 && b === 0) {
+ this.dataCounters.padding += 2;
+ continue;
+ } else {
+ logger.log('DATA', '[' + numArrayToHexArray([byteList[i], byteList[i + 1]]) + '] -> (' + numArrayToHexArray([a, b]) + ')');
+ }
+ cmdFound = this.parseCmd(a, b);
+ if (!cmdFound) {
+ cmdFound = this.parseMidrow(a, b);
+ }
+ if (!cmdFound) {
+ cmdFound = this.parsePAC(a, b);
+ }
+ if (!cmdFound) {
+ cmdFound = this.parseBackgroundAttributes(a, b);
+ }
+ if (!cmdFound) {
+ charsFound = this.parseChars(a, b);
+ if (charsFound) {
+ if (this.currChNr && this.currChNr >= 0) {
+ var channel = this.channels[this.currChNr - 1];
+ channel.insertChars(charsFound);
+ } else {
+ logger.log('WARNING', 'No channel found yet. TEXT-MODE?');
+ }
+ }
+ }
+ if (cmdFound) {
+ this.dataCounters.cmd += 2;
+ } else if (charsFound) {
+ this.dataCounters.char += 2;
+ } else {
+ this.dataCounters.other += 2;
+ logger.log('WARNING', 'Couldn\'t parse cleaned data ' + numArrayToHexArray([a, b]) + ' orig: ' + numArrayToHexArray([byteList[i], byteList[i + 1]]));
+ }
+ }
+ }
+
+ /**
+ * Parse Command.
+ * @returns {Boolean} Tells if a command was found
+ */
+
+ }, {
+ key: 'parseCmd',
+ value: function parseCmd(a, b) {
+ var chNr = null;
+
+ var cond1 = (a === 0x14 || a === 0x1C) && 0x20 <= b && b <= 0x2F;
+ var cond2 = (a === 0x17 || a === 0x1F) && 0x21 <= b && b <= 0x23;
+ if (!(cond1 || cond2)) {
+ return false;
+ }
+
+ if (a === this.lastCmdA && b === this.lastCmdB) {
+ this.lastCmdA = null;
+ this.lastCmdB = null; // Repeated commands are dropped (once)
+ logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');
+ return true;
+ }
+
+ if (a === 0x14 || a === 0x17) {
+ chNr = 1;
+ } else {
+ chNr = 2; // (a === 0x1C || a=== 0x1f)
+ }
+
+ var channel = this.channels[chNr - 1];
+
+ if (a === 0x14 || a === 0x1C) {
+ if (b === 0x20) {
+ channel.ccRCL();
+ } else if (b === 0x21) {
+ channel.ccBS();
+ } else if (b === 0x22) {
+ channel.ccAOF();
+ } else if (b === 0x23) {
+ channel.ccAON();
+ } else if (b === 0x24) {
+ channel.ccDER();
+ } else if (b === 0x25) {
+ channel.ccRU(2);
+ } else if (b === 0x26) {
+ channel.ccRU(3);
+ } else if (b === 0x27) {
+ channel.ccRU(4);
+ } else if (b === 0x28) {
+ channel.ccFON();
+ } else if (b === 0x29) {
+ channel.ccRDC();
+ } else if (b === 0x2A) {
+ channel.ccTR();
+ } else if (b === 0x2B) {
+ channel.ccRTD();
+ } else if (b === 0x2C) {
+ channel.ccEDM();
+ } else if (b === 0x2D) {
+ channel.ccCR();
+ } else if (b === 0x2E) {
+ channel.ccENM();
+ } else if (b === 0x2F) {
+ channel.ccEOC();
+ }
+ } else {
+ //a == 0x17 || a == 0x1F
+ channel.ccTO(b - 0x20);
+ }
+ this.lastCmdA = a;
+ this.lastCmdB = b;
+ this.currChNr = chNr;
+ return true;
+ }
+
+ /**
+ * Parse midrow styling command
+ * @returns {Boolean}
+ */
+
+ }, {
+ key: 'parseMidrow',
+ value: function parseMidrow(a, b) {
+ var chNr = null;
+
+ if ((a === 0x11 || a === 0x19) && 0x20 <= b && b <= 0x2f) {
+ if (a === 0x11) {
+ chNr = 1;
+ } else {
+ chNr = 2;
+ }
+ if (chNr !== this.currChNr) {
+ logger.log('ERROR', 'Mismatch channel in midrow parsing');
+ return false;
+ }
+ var channel = this.channels[chNr - 1];
+ channel.ccMIDROW(b);
+ logger.log('DEBUG', 'MIDROW (' + numArrayToHexArray([a, b]) + ')');
+ return true;
+ }
+ return false;
+ }
+ /**
+ * Parse Preable Access Codes (Table 53).
+ * @returns {Boolean} Tells if PAC found
+ */
+
+ }, {
+ key: 'parsePAC',
+ value: function parsePAC(a, b) {
+
+ var chNr = null;
+ var row = null;
+
+ var case1 = (0x11 <= a && a <= 0x17 || 0x19 <= a && a <= 0x1F) && 0x40 <= b && b <= 0x7F;
+ var case2 = (a === 0x10 || a === 0x18) && 0x40 <= b && b <= 0x5F;
+ if (!(case1 || case2)) {
+ return false;
+ }
+
+ if (a === this.lastCmdA && b === this.lastCmdB) {
+ this.lastCmdA = null;
+ this.lastCmdB = null;
+ return true; // Repeated commands are dropped (once)
+ }
+
+ chNr = a <= 0x17 ? 1 : 2;
+
+ if (0x40 <= b && b <= 0x5F) {
+ row = chNr === 1 ? rowsLowCh1[a] : rowsLowCh2[a];
+ } else {
+ // 0x60 <= b <= 0x7F
+ row = chNr === 1 ? rowsHighCh1[a] : rowsHighCh2[a];
+ }
+ var pacData = this.interpretPAC(row, b);
+ var channel = this.channels[chNr - 1];
+ channel.setPAC(pacData);
+ this.lastCmdA = a;
+ this.lastCmdB = b;
+ this.currChNr = chNr;
+ return true;
+ }
+
+ /**
+ * Interpret the second byte of the pac, and return the information.
+ * @returns {Object} pacData with style parameters.
+ */
+
+ }, {
+ key: 'interpretPAC',
+ value: function interpretPAC(row, byte) {
+ var pacIndex = byte;
+ var pacData = { color: null, italics: false, indent: null, underline: false, row: row };
+
+ if (byte > 0x5F) {
+ pacIndex = byte - 0x60;
+ } else {
+ pacIndex = byte - 0x40;
+ }
+ pacData.underline = (pacIndex & 1) === 1;
+ if (pacIndex <= 0xd) {
+ pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];
+ } else if (pacIndex <= 0xf) {
+ pacData.italics = true;
+ pacData.color = 'white';
+ } else {
+ pacData.indent = Math.floor((pacIndex - 0x10) / 2) * 4;
+ }
+ return pacData; // Note that row has zero offset. The spec uses 1.
+ }
+
+ /**
+ * Parse characters.
+ * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.
+ */
+
+ }, {
+ key: 'parseChars',
+ value: function parseChars(a, b) {
+
+ var channelNr = null,
+ charCodes = null,
+ charCode1 = null;
+
+ if (a >= 0x19) {
+ channelNr = 2;
+ charCode1 = a - 8;
+ } else {
+ channelNr = 1;
+ charCode1 = a;
+ }
+ if (0x11 <= charCode1 && charCode1 <= 0x13) {
+ // Special character
+ var oneCode = b;
+ if (charCode1 === 0x11) {
+ oneCode = b + 0x50;
+ } else if (charCode1 === 0x12) {
+ oneCode = b + 0x70;
+ } else {
+ oneCode = b + 0x90;
+ }
+ logger.log('INFO', 'Special char \'' + getCharForByte(oneCode) + '\' in channel ' + channelNr);
+ charCodes = [oneCode];
+ } else if (0x20 <= a && a <= 0x7f) {
+ charCodes = b === 0 ? [a] : [a, b];
+ }
+ if (charCodes) {
+ var hexCodes = numArrayToHexArray(charCodes);
+ logger.log('DEBUG', 'Char codes = ' + hexCodes.join(','));
+ this.lastCmdA = null;
+ this.lastCmdB = null;
+ }
+ return charCodes;
+ }
+
+ /**
+ * Parse extended background attributes as well as new foreground color black.
+ * @returns{Boolean} Tells if background attributes are found
+ */
+
+ }, {
+ key: 'parseBackgroundAttributes',
+ value: function parseBackgroundAttributes(a, b) {
+ var bkgData, index, chNr, channel;
+
+ var case1 = (a === 0x10 || a === 0x18) && 0x20 <= b && b <= 0x2f;
+ var case2 = (a === 0x17 || a === 0x1f) && 0x2d <= b && b <= 0x2f;
+ if (!(case1 || case2)) {
+ return false;
+ }
+ bkgData = {};
+ if (a === 0x10 || a === 0x18) {
+ index = Math.floor((b - 0x20) / 2);
+ bkgData.background = backgroundColors[index];
+ if (b % 2 === 1) {
+ bkgData.background = bkgData.background + '_semi';
+ }
+ } else if (b === 0x2d) {
+ bkgData.background = 'transparent';
+ } else {
+ bkgData.foreground = 'black';
+ if (b === 0x2f) {
+ bkgData.underline = true;
+ }
+ }
+ chNr = a < 0x18 ? 1 : 2;
+ channel = this.channels[chNr - 1];
+ channel.setBkgData(bkgData);
+ this.lastCmdA = null;
+ this.lastCmdB = null;
+ return true;
+ }
+
+ /**
+ * Reset state of parser and its channels.
+ */
+
+ }, {
+ key: 'reset',
+ value: function reset() {
+ for (var i = 0; i < this.channels.length; i++) {
+ if (this.channels[i]) {
+ this.channels[i].reset();
+ }
+ }
+ this.lastCmdA = null;
+ this.lastCmdB = null;
+ }
+
+ /**
+ * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.
+ */
+
+ }, {
+ key: 'cueSplitAtTime',
+ value: function cueSplitAtTime(t) {
+ for (var i = 0; i < this.channels.length; i++) {
+ if (this.channels[i]) {
+ this.channels[i].cueSplitAtTime(t);
+ }
+ }
+ }
+ }]);
+
+ return Cea608Parser;
+ }();
+
+ exports.default = Cea608Parser;
+
+ },{}],41:[function(_dereq_,module,exports){
+ 'use strict';
+
+ var Cues = {
+
+ newCue: function newCue(track, startTime, endTime, captionScreen) {
+ var row;
+ var cue;
+ var indenting;
+ var indent;
+ var text;
+ var VTTCue = window.VTTCue || window.TextTrackCue;
+
+ for (var r = 0; r < captionScreen.rows.length; r++) {
+ row = captionScreen.rows[r];
+ indenting = true;
+ indent = 0;
+ text = '';
+
+ if (!row.isEmpty()) {
+ for (var c = 0; c < row.chars.length; c++) {
+ if (row.chars[c].uchar.match(/\s/) && indenting) {
+ indent++;
+ } else {
+ text += row.chars[c].uchar;
+ indenting = false;
+ }
+ }
+ cue = new VTTCue(startTime, endTime, text.trim());
+
+ if (indent >= 16) {
+ indent--;
+ } else {
+ indent++;
+ }
+
+ // VTTCue.line get's flakey when using controls, so let's now include line 13&14
+ // also, drop line 1 since it's to close to the top
+ if (navigator.userAgent.match(/Firefox\//)) {
+ cue.line = r + 1;
+ } else {
+ cue.line = r > 7 ? r - 2 : r + 1;
+ }
+ cue.align = 'left';
+ cue.position = 100 * (indent / 32) + (navigator.userAgent.match(/Firefox\//) ? 50 : 0);
+ track.addCue(cue);
+ }
+ }
+ }
+
+ };
+
+ module.exports = Cues;
+
+ },{}],42:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /*
+ * compute an Exponential Weighted moving average
+ * - https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
+ * - heavily inspired from shaka-player
+ */
+
+ var EWMA = function () {
+
+ // About half of the estimated value will be from the last |halfLife| samples by weight.
+
+ function EWMA(halfLife) {
+ _classCallCheck(this, EWMA);
+
+ // Larger values of alpha expire historical data more slowly.
+ this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;
+ this.estimate_ = 0;
+ this.totalWeight_ = 0;
+ }
+
+ _createClass(EWMA, [{
+ key: "sample",
+ value: function sample(weight, value) {
+ var adjAlpha = Math.pow(this.alpha_, weight);
+ this.estimate_ = value * (1 - adjAlpha) + adjAlpha * this.estimate_;
+ this.totalWeight_ += weight;
+ }
+ }, {
+ key: "getTotalWeight",
+ value: function getTotalWeight() {
+ return this.totalWeight_;
+ }
+ }, {
+ key: "getEstimate",
+ value: function getEstimate() {
+ if (this.alpha_) {
+ var zeroFactor = 1 - Math.pow(this.alpha_, this.totalWeight_);
+ return this.estimate_ / zeroFactor;
+ } else {
+ return this.estimate_;
+ }
+ }
+ }]);
+
+ return EWMA;
+ }();
+
+ exports.default = EWMA;
+
+ },{}],43:[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 ? "symbol" : typeof obj; };
+
+ function noop() {}
+
+ var fakeLogger = {
+ trace: noop,
+ debug: noop,
+ log: noop,
+ warn: noop,
+ info: noop,
+ error: noop
+ };
+
+ var exportedLogger = fakeLogger;
+
+ /*globals self: false */
+
+ //let lastCallTime;
+ // function formatMsgWithTimeInfo(type, msg) {
+ // const now = Date.now();
+ // const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';
+ // lastCallTime = now;
+ // msg = (new Date(now)).toISOString() + ' | [' + type + '] > ' + msg + ' ( ' + diff + ' ms )';
+ // return msg;
+ // }
+
+ function formatMsg(type, msg) {
+ msg = '[' + type + '] > ' + msg;
+ return msg;
+ }
+
+ function consolePrintFn(type) {
+ var func = self.console[type];
+ if (func) {
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (args[0]) {
+ args[0] = formatMsg(type, args[0]);
+ }
+ func.apply(self.console, args);
+ };
+ }
+ return noop;
+ }
+
+ function exportLoggerFunctions(debugConfig) {
+ for (var _len2 = arguments.length, functions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ functions[_key2 - 1] = arguments[_key2];
+ }
+
+ functions.forEach(function (type) {
+ exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);
+ });
+ }
+
+ var enableLogs = exports.enableLogs = function enableLogs(debugConfig) {
+ if (debugConfig === true || (typeof debugConfig === 'undefined' ? 'undefined' : _typeof(debugConfig)) === 'object') {
+ exportLoggerFunctions(debugConfig,
+ // Remove out from list here to hard-disable a log-level
+ //'trace',
+ 'debug', 'log', 'info', 'warn', 'error');
+ // Some browsers don't allow to use bind on console object anyway
+ // fallback to default if needed
+ try {
+ exportedLogger.log();
+ } catch (e) {
+ exportedLogger = fakeLogger;
+ }
+ } else {
+ exportedLogger = fakeLogger;
+ }
+ };
+
+ var logger = exports.logger = exportedLogger;
+
+ },{}],44:[function(_dereq_,module,exports){
+ 'use strict';
+
+ if (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {
+ ArrayBuffer.prototype.slice = function (start, end) {
+ var that = new Uint8Array(this);
+ if (end === undefined) {
+ end = that.length;
+ }
+ var result = new ArrayBuffer(end - start);
+ var resultArray = new Uint8Array(result);
+ for (var i = 0; i < resultArray.length; i++) {
+ resultArray[i] = that[i + start];
+ }
+ return result;
+ };
+ }
+
+ },{}],45:[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; }; }();
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ /**
+ * TimeRanges to string helper
+ */
+
+ var TimeRanges = function () {
+ function TimeRanges() {
+ _classCallCheck(this, TimeRanges);
+ }
+
+ _createClass(TimeRanges, null, [{
+ key: 'toString',
+ value: function toString(r) {
+ var log = '',
+ len = r.length;
+ for (var i = 0; i < len; i++) {
+ log += '[' + r.start(i).toFixed(3) + ',' + r.end(i).toFixed(3) + ']';
+ }
+ return log;
+ }
+ }]);
+
+ return TimeRanges;
+ }();
+
+ exports.default = TimeRanges;
+
+ },{}],46:[function(_dereq_,module,exports){
+ 'use strict';
+
+ var URLHelper = {
+ // build an absolute URL from a relative one using the provided baseURL
+ // if relativeURL is an absolute URL it will be returned as is.
+ buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL) {
+ // remove any remaining space and CRLF
+ relativeURL = relativeURL.trim();
+ if (/^[a-z]+:/i.test(relativeURL)) {
+ // complete url, not relative
+ return relativeURL;
+ }
+
+ var relativeURLQuery = null;
+ var relativeURLHash = null;
+
+ var relativeURLHashSplit = /^([^#]*)(.*)$/.exec(relativeURL);
+ if (relativeURLHashSplit) {
+ relativeURLHash = relativeURLHashSplit[2];
+ relativeURL = relativeURLHashSplit[1];
+ }
+ var relativeURLQuerySplit = /^([^\?]*)(.*)$/.exec(relativeURL);
+ if (relativeURLQuerySplit) {
+ relativeURLQuery = relativeURLQuerySplit[2];
+ relativeURL = relativeURLQuerySplit[1];
+ }
+
+ var baseURLHashSplit = /^([^#]*)(.*)$/.exec(baseURL);
+ if (baseURLHashSplit) {
+ baseURL = baseURLHashSplit[1];
+ }
+ var baseURLQuerySplit = /^([^\?]*)(.*)$/.exec(baseURL);
+ if (baseURLQuerySplit) {
+ baseURL = baseURLQuerySplit[1];
+ }
+
+ var baseURLDomainSplit = /^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(baseURL);
+ if (!baseURLDomainSplit) {
+ throw new Error('Error trying to parse base URL.');
+ }
+
+ // e.g. 'http:', 'https:', ''
+ var baseURLProtocol = baseURLDomainSplit[2] || '';
+ // e.g. 'http://example.com', '//example.com', ''
+ var baseURLProtocolDomain = baseURLDomainSplit[1] || '';
+ // e.g. '/a/b/c/playlist.m3u8'
+ var baseURLPath = baseURLDomainSplit[4];
+
+ var builtURL = null;
+ if (/^\/\//.test(relativeURL)) {
+ // relative url starts wth '//' so copy protocol (which may be '' if baseUrl didn't provide one)
+ builtURL = baseURLProtocol + '//' + URLHelper.buildAbsolutePath('', relativeURL.substring(2));
+ } else if (/^\//.test(relativeURL)) {
+ // relative url starts with '/' so start from root of domain
+ builtURL = baseURLProtocolDomain + '/' + URLHelper.buildAbsolutePath('', relativeURL.substring(1));
+ } else {
+ builtURL = URLHelper.buildAbsolutePath(baseURLProtocolDomain + baseURLPath, relativeURL);
+ }
+
+ // put the query and hash parts back
+ if (relativeURLQuery) {
+ builtURL += relativeURLQuery;
+ }
+ if (relativeURLHash) {
+ builtURL += relativeURLHash;
+ }
+ return builtURL;
+ },
+
+ // build an absolute path using the provided basePath
+ // adapted from https://developer.mozilla.org/en-US/docs/Web/API/document/cookie#Using_relative_URLs_in_the_path_parameter
+ // this does not handle the case where relativePath is "/" or "//". These cases should be handled outside this.
+ buildAbsolutePath: function buildAbsolutePath(basePath, relativePath) {
+ var sRelPath = relativePath;
+ var nUpLn,
+ sDir = '',
+ sPath = basePath.replace(/[^\/]*$/, sRelPath.replace(/(\/|^)(?:\.?\/+)+/g, '$1'));
+ for (var nEnd, nStart = 0; nEnd = sPath.indexOf('/../', nStart), nEnd > -1; nStart = nEnd + nUpLn) {
+ nUpLn = /^\/(?:\.\.\/)*/.exec(sPath.slice(nEnd))[0].length;
+ sDir = (sDir + sPath.substring(nStart, nEnd)).replace(new RegExp('(?:\\\/+[^\\\/]*){0,' + (nUpLn - 1) / 3 + '}$'), '/');
+ }
+ return sDir + sPath.substr(nStart);
+ }
+ };
+
+ module.exports = URLHelper;
+
+ },{}],47:[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; }; }(); /**
+ * XHR based logger
+ */
+
+ var _logger = _dereq_(43);
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ var XhrLoader = function () {
+ function XhrLoader(config) {
+ _classCallCheck(this, XhrLoader);
+
+ if (config && config.xhrSetup) {
+ this.xhrSetup = config.xhrSetup;
+ }
+ }
+
+ _createClass(XhrLoader, [{
+ key: 'destroy',
+ value: function destroy() {
+ this.abort();
+ this.loader = null;
+ }
+ }, {
+ key: 'abort',
+ value: function abort() {
+ var loader = this.loader;
+ if (loader && loader.readyState !== 4) {
+ this.stats.aborted = true;
+ loader.abort();
+ }
+
+ window.clearTimeout(this.requestTimeout);
+ this.requestTimeout = null;
+ window.clearTimeout(this.retryTimeout);
+ this.retryTimeout = null;
+ }
+ }, {
+ key: 'load',
+ value: function load(context, config, callbacks) {
+ this.context = context;
+ this.config = config;
+ this.callbacks = callbacks;
+ this.stats = { trequest: performance.now(), retry: 0 };
+ this.retryDelay = config.retryDelay;
+ this.loadInternal();
+ }
+ }, {
+ key: 'loadInternal',
+ value: function loadInternal() {
+ var xhr,
+ context = this.context;
+
+ if (typeof XDomainRequest !== 'undefined') {
+ xhr = this.loader = new XDomainRequest();
+ } else {
+ xhr = this.loader = new XMLHttpRequest();
+ }
+
+ xhr.onreadystatechange = this.readystatechange.bind(this);
+ xhr.onprogress = this.loadprogress.bind(this);
+
+ xhr.open('GET', context.url, true);
+
+ if (context.rangeEnd) {
+ xhr.setRequestHeader('Range', 'bytes=' + context.rangeStart + '-' + (context.rangeEnd - 1));
+ }
+ xhr.responseType = context.responseType;
+ var stats = this.stats;
+ stats.tfirst = 0;
+ stats.loaded = 0;
+ if (this.xhrSetup) {
+ this.xhrSetup(xhr, context.url);
+ }
+ // setup timeout before we perform request
+ this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), this.config.timeout);
+ xhr.send();
+ }
+ }, {
+ key: 'readystatechange',
+ value: function readystatechange(event) {
+ var xhr = event.currentTarget,
+ readyState = xhr.readyState,
+ stats = this.stats,
+ context = this.context,
+ config = this.config;
+
+ // don't proceed if xhr has been aborted
+ if (stats.aborted) {
+ return;
+ }
+
+ // in any case clear the current xhrs timeout
+ window.clearTimeout(this.requestTimeout);
+
+ // HEADERS_RECEIVED
+ if (readyState >= 2) {
+ if (stats.tfirst === 0) {
+ stats.tfirst = Math.max(performance.now(), stats.trequest);
+ // reset timeout to total timeout duration minus the time it took to receive headers
+ this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), config.timeout - (stats.tfirst - stats.trequest));
+ }
+ if (readyState === 4) {
+ var status = xhr.status;
+ // http status between 200 to 299 are all successful
+ if (status >= 200 && status < 300) {
+ stats.tload = Math.max(stats.tfirst, performance.now());
+ var data = void 0,
+ len = void 0;
+ if (context.responseType === 'arraybuffer') {
+ data = xhr.response;
+ len = data.byteLength;
+ } else {
+ data = xhr.responseText;
+ len = data.length;
+ }
+ stats.loaded = stats.total = len;
+ var response = { url: xhr.responseURL, data: data };
+ this.callbacks.onSuccess(response, stats, context);
+ } else {
+ // if max nb of retries reached or if http status between 400 and 499 (such error cannot be recovered, retrying is useless), return error
+ if (stats.retry >= config.maxRetry || status >= 400 && status < 499) {
+ _logger.logger.error(status + ' while loading ' + context.url);
+ this.callbacks.onError({ code: status, text: xhr.statusText }, context);
+ } else {
+ // retry
+ _logger.logger.warn(status + ' while loading ' + context.url + ', retrying in ' + this.retryDelay + '...');
+ // aborts and resets internal state
+ this.destroy();
+ // schedule retry
+ this.retryTimeout = window.setTimeout(this.loadInternal.bind(this), this.retryDelay);
+ // set exponential backoff
+ this.retryDelay = Math.min(2 * this.retryDelay, config.maxRetryDelay);
+ stats.retry++;
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'loadtimeout',
+ value: function loadtimeout() {
+ _logger.logger.warn('timeout while loading ' + this.context.url);
+ this.callbacks.onTimeout(this.stats, this.context);
+ }
+ }, {
+ key: 'loadprogress',
+ value: function loadprogress(event) {
+ var stats = this.stats;
+ stats.loaded = event.loaded;
+ if (event.lengthComputable) {
+ stats.total = event.total;
+ }
+ var onProgress = this.callbacks.onProgress;
+ if (onProgress) {
+ // last args is to provide on progress data
+ onProgress(stats, this.context, null);
+ }
+ }
+ }]);
+
+ return XhrLoader;
+ }();
+
+ exports.default = XhrLoader;
+
+ },{"43":43}]},{},[31])(31)
+ });
+ //# sourceMappingURL=hls.js.map
+
+
+/***/ },
+/* 70 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global, module) {/**
+ * lodash (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ /** Detect free variable `exports`. */
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+ /** Detect free variable `module`. */
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = freeModule && freeModule.exports === freeExports;
+
+ /** Detect free variable `process` from Node.js. */
+ var freeProcess = moduleExports && freeGlobal.process;
+
+ /** Used to access faster Node.js helpers. */
+ var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding('util');
+ } catch (e) {}
+ }());
+
+ /* Node.js helper references. */
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+ function getValue(object, key) {
+ return object == null ? undefined : object[key];
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+ }
+
+ /**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to detect overreaching core-js shims. */
+ var coreJsData = root['__core-js_shared__'];
+
+ /** Used to detect methods masquerading as native. */
+ var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+ }());
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = funcProto.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeKeys = overArg(Object.keys, Object);
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(root, 'DataView'),
+ Map = getNative(root, 'Map'),
+ Promise = getNative(root, 'Promise'),
+ Set = getNative(root, 'Set'),
+ WeakMap = getNative(root, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+ function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ }
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+ function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+ }
+
+ // Add methods to `Hash`.
+ Hash.prototype.clear = hashClear;
+ Hash.prototype['delete'] = hashDelete;
+ Hash.prototype.get = hashGet;
+ Hash.prototype.has = hashHas;
+ Hash.prototype.set = hashSet;
+
+ /**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+ function listCacheClear() {
+ this.__data__ = [];
+ }
+
+ /**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+ }
+
+ /**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+ }
+
+ /**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+ function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+ }
+
+ // Add methods to `ListCache`.
+ ListCache.prototype.clear = listCacheClear;
+ ListCache.prototype['delete'] = listCacheDelete;
+ ListCache.prototype.get = listCacheGet;
+ ListCache.prototype.has = listCacheHas;
+ ListCache.prototype.set = listCacheSet;
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapCacheClear;
+ MapCache.prototype['delete'] = mapCacheDelete;
+ MapCache.prototype.get = mapCacheGet;
+ MapCache.prototype.has = mapCacheHas;
+ MapCache.prototype.set = mapCacheSet;
+
+ /**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+ }
+
+ /**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+ function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+ }
+
+ /**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function setCacheHas(value) {
+ return this.__data__.has(value);
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+ SetCache.prototype.has = setCacheHas;
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+ function Stack(entries) {
+ this.__data__ = new ListCache(entries);
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = new ListCache;
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ return this.__data__['delete'](key);
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ return this.__data__.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ return this.__data__.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var cache = this.__data__;
+ if (cache instanceof ListCache) {
+ var pairs = cache.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ return this;
+ }
+ cache = this.__data__ = new MapCache(pairs);
+ }
+ cache.set(key, value);
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+ function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
+
+ var length = result.length,
+ skipIndexes = !!length;
+
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `getTag`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ return objectToString.call(value);
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ }
+
+ /**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+ function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+ function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
+
+ stack.set(array, other);
+ stack.set(other, array);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!seen.has(othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
+ return seen.add(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= UNORDERED_COMPARE_FLAG;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
+ stack['delete'](object);
+ return result;
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+ }
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ var getTag = baseGetTag;
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge < 14, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+ function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+ }
+
+ module.exports = isEqual;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(33)(module)))
+
+/***/ },
+/* 71 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(72);
+
+/***/ },
+/* 72 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _style = __webpack_require__(73);
+
+ var _style2 = _interopRequireDefault(_style);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 HTMLImg = function (_Playback) {
+ _inherits(HTMLImg, _Playback);
+
+ HTMLImg.prototype.getPlaybackType = function getPlaybackType() {
+ return _playback2.default.NO_OP;
+ };
+
+ _createClass(HTMLImg, [{
+ key: 'name',
+ get: function get() {
+ return 'html_img';
+ }
+ }, {
+ key: 'tagName',
+ get: function get() {
+ return 'img';
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'data-html-img': ''
+ };
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'load': '_onLoad',
+ 'abort': '_onError',
+ 'error': '_onError'
+ };
+ }
+ }]);
+
+ function HTMLImg(params) {
+ _classCallCheck(this, HTMLImg);
+
+ var _this = _possibleConstructorReturn(this, _Playback.call(this, params));
+
+ _this.el.src = params.src;
+ return _this;
+ }
+
+ HTMLImg.prototype.render = function render() {
+ var style = _styler2.default.getStyleFor(_style2.default);
+ this.$el.append(style);
+ this.trigger(_events2.default.PLAYBACK_READY, this.name);
+ return this;
+ };
+
+ HTMLImg.prototype._onLoad = function _onLoad() {
+ this.trigger(_events2.default.PLAYBACK_ENDED, this.name);
+ };
+
+ HTMLImg.prototype._onError = function _onError(evt) {
+ var m = evt.type === 'error' ? 'load error' : 'loading aborted';
+ this.trigger(_events2.default.PLAYBACK_ERROR, { message: m }, this.name);
+ };
+
+ return HTMLImg;
+ }(_playback2.default);
+
+ exports.default = HTMLImg;
+
+
+ HTMLImg.canPlay = function (resource) {
+ return (/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(resource)
+ );
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 73 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, "[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 74 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(75);
+
+/***/ },
+/* 75 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _style = __webpack_require__(76);
+
+ var _style2 = _interopRequireDefault(_style);
+
+ var _error = __webpack_require__(77);
+
+ var _error2 = _interopRequireDefault(_error);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var NoOp = function (_Playback) {
+ _inherits(NoOp, _Playback);
+
+ _createClass(NoOp, [{
+ key: 'name',
+ get: function get() {
+ return 'no_op';
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_error2.default);
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return { 'data-no-op': '' };
+ }
+ }]);
+
+ function NoOp() {
+ _classCallCheck(this, NoOp);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ var _this = _possibleConstructorReturn(this, _Playback.call.apply(_Playback, [this].concat(args)));
+
+ _this._noiseFrameNum = -1;
+ _this._started = false;
+ return _this;
+ }
+
+ NoOp.prototype.render = function render() {
+ var style = _styler2.default.getStyleFor(_style2.default);
+ var playbackNotSupported = this.options.playbackNotSupportedMessage || this.i18n.t('playback_not_supported');
+ this.$el.html(this.template({ message: playbackNotSupported }));
+ this.$el.append(style);
+ this.trigger(_events2.default.PLAYBACK_READY, this.name);
+ var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);
+ if (this.options.autoPlay || !showForNoOp) {
+ this.play();
+ }
+ return this;
+ };
+
+ NoOp.prototype.play = function play() {
+ if (!this._started) {
+ this._started = true;
+ this.trigger(_events2.default.PLAYBACK_PLAY);
+ this._animate();
+ }
+ };
+
+ NoOp.prototype._noise = function _noise() {
+ this._noiseFrameNum = (this._noiseFrameNum + 1) % 5;
+ if (this._noiseFrameNum) {
+ // only update noise every 5 frames to save cpu
+ return;
+ }
+
+ var idata = this.context.createImageData(this.context.canvas.width, this.context.canvas.height);
+ var buffer32 = void 0;
+ try {
+ buffer32 = new Uint32Array(idata.data.buffer);
+ } catch (err) {
+ buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4);
+ var data = idata.data;
+ for (var i = 0; i < data.length; i++) {
+ buffer32[i] = data[i];
+ }
+ }
+
+ var len = buffer32.length,
+ m = Math.random() * 6 + 4;
+ var run = 0,
+ color = 0;
+ for (var _i = 0; _i < len;) {
+ if (run < 0) {
+ run = m * Math.random();
+ var p = Math.pow(Math.random(), 0.4);
+ color = 255 * p << 24;
+ }
+ run -= 1;
+ buffer32[_i++] = color;
+ }
+ this.context.putImageData(idata, 0, 0);
+ };
+
+ NoOp.prototype._loop = function _loop() {
+ var _this2 = this;
+
+ if (this._stop) {
+ return;
+ }
+ this._noise();
+ this._animationHandle = (0, _utils.requestAnimationFrame)(function () {
+ return _this2._loop();
+ });
+ };
+
+ NoOp.prototype.destroy = function destroy() {
+ if (this._animationHandle) {
+ (0, _utils.cancelAnimationFrame)(this._animationHandle);
+ this._stop = true;
+ }
+ };
+
+ NoOp.prototype._animate = function _animate() {
+ this.canvas = this.$el.find('canvas[data-no-op-canvas]')[0];
+ this.context = this.canvas.getContext('2d');
+ this._loop();
+ };
+
+ return NoOp;
+ }(_playback2.default);
+
+ exports.default = NoOp;
+
+
+ NoOp.canPlay = function (source) {
+ // eslint-disable-line no-unused-vars
+ return true;
+ };
+ module.exports = exports['default'];
+
+/***/ },
+/* 76 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, "[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n -moz-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n -o-transform: translateY(-50%);\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 77 */
+/***/ function(module, exports) {
+
+ module.exports = "<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n";
+
+/***/ },
+/* 78 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(79);
+
+/***/ },
+/* 79 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _ui_container_plugin = __webpack_require__(80);
+
+ var _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _spinner = __webpack_require__(81);
+
+ var _spinner2 = _interopRequireDefault(_spinner);
+
+ var _spinner3 = __webpack_require__(82);
+
+ var _spinner4 = _interopRequireDefault(_spinner3);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 SpinnerThreeBouncePlugin = function (_UIContainerPlugin) {
+ _inherits(SpinnerThreeBouncePlugin, _UIContainerPlugin);
+
+ _createClass(SpinnerThreeBouncePlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'spinner';
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'data-spinner': '',
+ 'class': 'spinner-three-bounce'
+ };
+ }
+ }]);
+
+ function SpinnerThreeBouncePlugin(container) {
+ _classCallCheck(this, SpinnerThreeBouncePlugin);
+
+ var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));
+
+ _this.template = (0, _template2.default)(_spinner2.default);
+ _this.showTimeout = null;
+ _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERING, _this.onBuffering);
+ _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, _this.onBufferFull);
+ _this.listenTo(_this.container, _events2.default.CONTAINER_STOP, _this.onStop);
+ _this.listenTo(_this.container, _events2.default.CONTAINER_ENDED, _this.onStop);
+ _this.listenTo(_this.container, _events2.default.CONTAINER_ERROR, _this.onStop);
+ _this.render();
+ return _this;
+ }
+
+ SpinnerThreeBouncePlugin.prototype.onBuffering = function onBuffering() {
+ this.show();
+ };
+
+ SpinnerThreeBouncePlugin.prototype.onBufferFull = function onBufferFull() {
+ this.hide();
+ };
+
+ SpinnerThreeBouncePlugin.prototype.onStop = function onStop() {
+ this.hide();
+ };
+
+ SpinnerThreeBouncePlugin.prototype.show = function show() {
+ var _this2 = this;
+
+ if (this.showTimeout === null) {
+ this.showTimeout = setTimeout(function () {
+ return _this2.$el.show();
+ }, 300);
+ }
+ };
+
+ SpinnerThreeBouncePlugin.prototype.hide = function hide() {
+ if (this.showTimeout !== null) {
+ clearTimeout(this.showTimeout);
+ this.showTimeout = null;
+ }
+ this.$el.hide();
+ };
+
+ SpinnerThreeBouncePlugin.prototype.render = function render() {
+ this.$el.html(this.template());
+ var style = _styler2.default.getStyleFor(_spinner4.default);
+ this.container.$el.append(style);
+ this.container.$el.append(this.$el);
+ this.$el.hide();
+ if (this.container.buffering) {
+ this.onBuffering();
+ }
+ return this;
+ };
+
+ return SpinnerThreeBouncePlugin;
+ }(_ui_container_plugin2.default);
+
+ exports.default = SpinnerThreeBouncePlugin;
+ module.exports = exports['default'];
+
+/***/ },
+/* 80 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _utils = __webpack_require__(2);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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.
+
+ /**
+ * The base class for an ui container plugin
+ * @class UIContainerPlugin
+ * @constructor
+ * @extends UIObject
+ * @module base
+ */
+ var UIContainerPlugin = function (_UIObject) {
+ _inherits(UIContainerPlugin, _UIObject);
+
+ function UIContainerPlugin(container) {
+ _classCallCheck(this, UIContainerPlugin);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, container.options));
+
+ _this.container = container;
+ _this.enabled = true;
+ _this.bindEvents();
+ return _this;
+ }
+
+ UIContainerPlugin.prototype.enable = function enable() {
+ if (!this.enabled) {
+ this.bindEvents();
+ this.$el.show();
+ this.enabled = true;
+ }
+ };
+
+ UIContainerPlugin.prototype.disable = function disable() {
+ this.stopListening();
+ this.$el.hide();
+ this.enabled = false;
+ };
+
+ UIContainerPlugin.prototype.bindEvents = function bindEvents() {};
+
+ UIContainerPlugin.prototype.destroy = function destroy() {
+ this.remove();
+ };
+
+ return UIContainerPlugin;
+ }(_ui_object2.default);
+
+ exports.default = UIContainerPlugin;
+
+
+ UIContainerPlugin.extend = function (properties) {
+ return (0, _utils.extend)(UIContainerPlugin, properties);
+ };
+
+ UIContainerPlugin.type = 'container';
+ module.exports = exports['default'];
+
+/***/ },
+/* 81 */
+/***/ function(module, exports) {
+
+ module.exports = "<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n";
+
+/***/ },
+/* 82 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n -moz-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n -o-transform: translateY(-50%);\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n -moz-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n -moz-animation-fill-mode: both;\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n -webkit-animation-delay: -0.32s;\n -moz-animation-delay: -0.32s;\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n -webkit-animation-delay: -0.16s;\n -moz-animation-delay: -0.16s;\n animation-delay: -0.16s; }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0); }\n 40% {\n -webkit-transform: scale(1); } }\n\n@-moz-keyframes bouncedelay {\n 0%, 80%, 100% {\n -moz-transform: scale(0); }\n 40% {\n -moz-transform: scale(1); } }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n -moz-transform: scale(0);\n -ms-transform: scale(0);\n -o-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n -moz-transform: scale(1);\n -ms-transform: scale(1);\n -o-transform: scale(1);\n transform: scale(1); } }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 83 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(84);
+
+/***/ },
+/* 84 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _container_plugin = __webpack_require__(85);
+
+ var _container_plugin2 = _interopRequireDefault(_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 StatsPlugin = function (_ContainerPlugin) {
+ _inherits(StatsPlugin, _ContainerPlugin);
+
+ _createClass(StatsPlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'stats';
+ }
+ }]);
+
+ function StatsPlugin(container) {
+ _classCallCheck(this, StatsPlugin);
+
+ var _this = _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));
+
+ _this.setInitialAttrs();
+ _this.reportInterval = _this.options.reportInterval || 5000;
+ _this.state = 'IDLE';
+ return _this;
+ }
+
+ StatsPlugin.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.container.playback, _events2.default.PLAYBACK_PLAY, this.onPlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_DESTROYED, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATS_ADD, this.onStatsAdd);
+ this.listenTo(this.container, _events2.default.CONTAINER_BITRATE, this.onStatsAdd);
+ this.listenTo(this.container.playback, _events2.default.PLAYBACK_STATS_ADD, this.onStatsAdd);
+ };
+
+ StatsPlugin.prototype.setInitialAttrs = function setInitialAttrs() {
+ this.firstPlay = true;
+ this.startupTime = 0;
+ this.rebufferingTime = 0;
+ this.watchingTime = 0;
+ this.rebuffers = 0;
+ this.externalMetrics = {};
+ };
+
+ StatsPlugin.prototype.onPlay = function onPlay() {
+ this.state = 'PLAYING';
+ this.watchingTimeInit = Date.now();
+ if (!this.intervalId) {
+ this.intervalId = setInterval(this.report.bind(this), this.reportInterval);
+ }
+ };
+
+ StatsPlugin.prototype.onStop = function onStop() {
+ clearInterval(this.intervalId);
+ this.report();
+ this.intervalId = undefined;
+ this.state = 'STOPPED';
+ };
+
+ StatsPlugin.prototype.onBuffering = function onBuffering() {
+ if (this.firstPlay) {
+ this.startupTimeInit = Date.now();
+ } else {
+ this.rebufferingTimeInit = Date.now();
+ }
+ this.state = 'BUFFERING';
+ this.rebuffers++;
+ };
+
+ StatsPlugin.prototype.onBufferFull = function onBufferFull() {
+ if (this.firstPlay && this.startupTimeInit) {
+ this.firstPlay = false;
+ this.startupTime = Date.now() - this.startupTimeInit;
+ this.watchingTimeInit = Date.now();
+ } else if (this.rebufferingTimeInit) {
+ this.rebufferingTime += this.getRebufferingTime();
+ }
+ this.rebufferingTimeInit = undefined;
+ this.state = 'PLAYING';
+ };
+
+ StatsPlugin.prototype.getRebufferingTime = function getRebufferingTime() {
+ return Date.now() - this.rebufferingTimeInit;
+ };
+
+ StatsPlugin.prototype.getWatchingTime = function getWatchingTime() {
+ var totalTime = Date.now() - this.watchingTimeInit;
+ return totalTime - this.rebufferingTime;
+ };
+
+ StatsPlugin.prototype.isRebuffering = function isRebuffering() {
+ return !!this.rebufferingTimeInit;
+ };
+
+ StatsPlugin.prototype.onStatsAdd = function onStatsAdd(metric) {
+ _clapprZepto2.default.extend(this.externalMetrics, metric);
+ };
+
+ StatsPlugin.prototype.getStats = function getStats() {
+ var metrics = {
+ startupTime: this.startupTime,
+ rebuffers: this.rebuffers,
+ rebufferingTime: this.isRebuffering() ? this.rebufferingTime + this.getRebufferingTime() : this.rebufferingTime,
+ watchingTime: this.isRebuffering() ? this.getWatchingTime() - this.getRebufferingTime() : this.getWatchingTime()
+ };
+ _clapprZepto2.default.extend(metrics, this.externalMetrics);
+ return metrics;
+ };
+
+ StatsPlugin.prototype.report = function report() {
+ this.container.statsReport(this.getStats());
+ };
+
+ return StatsPlugin;
+ }(_container_plugin2.default);
+
+ exports.default = StatsPlugin;
+ module.exports = exports['default'];
+
+/***/ },
+/* 85 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ var _utils = __webpack_require__(2);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ /**
+ * The base class for a container plugin
+ * @class ContainerPlugin
+ * @constructor
+ * @extends UIObject
+ * @module base
+ */
+ var ContainerPlugin = function (_BaseObject) {
+ _inherits(ContainerPlugin, _BaseObject);
+
+ function ContainerPlugin(container) {
+ _classCallCheck(this, ContainerPlugin);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this, container.options));
+
+ _this.container = container;
+ _this.enabled = true;
+ _this.bindEvents();
+ return _this;
+ }
+
+ ContainerPlugin.prototype.enable = function enable() {
+ if (!this.enabled) {
+ this.bindEvents();
+ this.enabled = true;
+ }
+ };
+
+ ContainerPlugin.prototype.disable = function disable() {
+ if (this.enabled) {
+ this.stopListening();
+ this.enabled = false;
+ }
+ };
+
+ ContainerPlugin.prototype.bindEvents = function bindEvents() {};
+
+ ContainerPlugin.prototype.destroy = function destroy() {
+ this.stopListening();
+ };
+
+ return ContainerPlugin;
+ }(_base_object2.default);
+
+ exports.default = ContainerPlugin;
+
+
+ ContainerPlugin.extend = function (properties) {
+ return (0, _utils.extend)(ContainerPlugin, properties);
+ };
+
+ ContainerPlugin.type = 'container';
+ module.exports = exports['default'];
+
+/***/ },
+/* 86 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(87);
+
+/***/ },
+/* 87 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _ui_container_plugin = __webpack_require__(80);
+
+ var _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _watermark = __webpack_require__(88);
+
+ var _watermark2 = _interopRequireDefault(_watermark);
+
+ var _watermark3 = __webpack_require__(89);
+
+ var _watermark4 = _interopRequireDefault(_watermark3);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 WaterMarkPlugin = function (_UIContainerPlugin) {
+ _inherits(WaterMarkPlugin, _UIContainerPlugin);
+
+ _createClass(WaterMarkPlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'watermark';
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_watermark4.default);
+ }
+ }]);
+
+ function WaterMarkPlugin(container) {
+ _classCallCheck(this, WaterMarkPlugin);
+
+ var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));
+
+ _this.configure();
+ return _this;
+ }
+
+ WaterMarkPlugin.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.configure);
+ };
+
+ WaterMarkPlugin.prototype.configure = function configure() {
+ this.position = this.options.position || 'bottom-right';
+ if (this.options.watermark) {
+ this.imageUrl = this.options.watermark;
+ this.imageLink = this.options.watermarkLink;
+ this.render();
+ } else {
+ this.$el.remove();
+ }
+ };
+
+ WaterMarkPlugin.prototype.onPlay = function onPlay() {
+ if (!this.hidden) this.$el.show();
+ };
+
+ WaterMarkPlugin.prototype.onStop = function onStop() {
+ this.$el.hide();
+ };
+
+ WaterMarkPlugin.prototype.render = function render() {
+ this.$el.hide();
+ var templateOptions = { position: this.position, imageUrl: this.imageUrl, imageLink: this.imageLink };
+ this.$el.html(this.template(templateOptions));
+ var style = _styler2.default.getStyleFor(_watermark2.default);
+ this.container.$el.append(style);
+ this.container.$el.append(this.$el);
+ return this;
+ };
+
+ return WaterMarkPlugin;
+ }(_ui_container_plugin2.default);
+
+ exports.default = WaterMarkPlugin;
+ module.exports = exports['default'];
+
+/***/ },
+/* 88 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, "[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n[data-watermark] img {\n max-width: 100%; }\n\n[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 89 */
+/***/ function(module, exports) {
+
+ module.exports = "<div data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== 'undefined') { %>\n<a target=_blank href=\"<%= imageLink %>\">\n<% } %>\n<img src=\"<%= imageUrl %>\">\n<% if(typeof imageLink !== 'undefined') { %>\n</a>\n<% } %>\n</div>\n";
+
+/***/ },
+/* 90 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(91);
+
+/***/ },
+/* 91 */
+/***/ function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {'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 _ui_container_plugin = __webpack_require__(80);
+
+ var _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _poster = __webpack_require__(92);
+
+ var _poster2 = _interopRequireDefault(_poster);
+
+ var _poster3 = __webpack_require__(93);
+
+ var _poster4 = _interopRequireDefault(_poster3);
+
+ var _play = __webpack_require__(37);
+
+ var _play2 = _interopRequireDefault(_play);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } //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 PosterPlugin = function (_UIContainerPlugin) {
+ _inherits(PosterPlugin, _UIContainerPlugin);
+
+ _createClass(PosterPlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'poster';
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_poster4.default);
+ }
+ }, {
+ key: 'shouldRender',
+ get: function get() {
+ var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);
+ return this.container.playback.name !== 'html_img' && (this.container.playback.getPlaybackType() !== _playback2.default.NO_OP || showForNoOp);
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'class': 'player-poster',
+ 'data-poster': ''
+ };
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'click': 'clicked'
+ };
+ }
+ }, {
+ key: 'showOnVideoEnd',
+ get: function get() {
+ return !this.options.poster || this.options.poster.showOnVideoEnd || this.options.poster.showOnVideoEnd === undefined;
+ }
+ }]);
+
+ function PosterPlugin(container) {
+ _classCallCheck(this, PosterPlugin);
+
+ var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));
+
+ _this.hasStartedPlaying = false;
+ _this.playRequested = false;
+ _this.render();
+ process.nextTick(function () {
+ return _this.update();
+ });
+ return _this;
+ }
+
+ PosterPlugin.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.update);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.update);
+ this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.render);
+ this.showOnVideoEnd && this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);
+ };
+
+ PosterPlugin.prototype.stopListening = function stopListening() {
+ _UIContainerPlugin.prototype.stopListening.call(this);
+ };
+
+ PosterPlugin.prototype.onPlay = function onPlay() {
+ this.hasStartedPlaying = true;
+ this.update();
+ };
+
+ PosterPlugin.prototype.onStop = function onStop() {
+ this.hasStartedPlaying = false;
+ this.playRequested = false;
+ this.update();
+ };
+
+ PosterPlugin.prototype.showPlayButton = function showPlayButton(show) {
+ if (show && (!this.options.chromeless || this.options.allowUserInteraction)) {
+ this.$playButton.show();
+ this.$el.addClass('clickable');
+ } else {
+ this.$playButton.hide();
+ this.$el.removeClass('clickable');
+ }
+ };
+
+ PosterPlugin.prototype.clicked = function clicked() {
+ if (!this.options.chromeless || this.options.allowUserInteraction) {
+ this.playRequested = true;
+ this.update();
+ this.container.play();
+ }
+ return false;
+ };
+
+ PosterPlugin.prototype.shouldHideOnPlay = function shouldHideOnPlay() {
+ // Audio broadcasts should keep the poster up; video should hide poster while playing.
+ return !this.container.playback.isAudioOnly;
+ };
+
+ PosterPlugin.prototype.update = function update() {
+ if (!this.shouldRender) {
+ return;
+ }
+ var showPlayButton = !this.playRequested && !this.hasStartedPlaying && !this.container.buffering;
+ this.showPlayButton(showPlayButton);
+ if (!this.hasStartedPlaying) {
+ this.container.disableMediaControl();
+ this.$el.show();
+ } else {
+ this.container.enableMediaControl();
+ if (this.shouldHideOnPlay()) {
+ this.$el.hide();
+ }
+ }
+ };
+
+ PosterPlugin.prototype.render = function render() {
+ if (!this.shouldRender) {
+ return;
+ }
+ var style = _styler2.default.getStyleFor(_poster2.default, { baseUrl: this.options.baseUrl });
+ this.$el.html(this.template());
+ this.$el.append(style);
+ if (this.options.poster) {
+ var posterUrl = this.options.poster.url || this.options.poster;
+ this.$el.css({ 'background-image': 'url(' + posterUrl + ')' });
+ }
+ this.container.$el.append(this.el);
+ this.$playWrapper = this.$el.find('.play-wrapper');
+ this.$playWrapper.append(_play2.default);
+ this.$playButton = this.$playWrapper.find('svg');
+ this.$playButton.addClass('poster-icon');
+ this.$playButton.attr('data-poster', '');
+
+ var buttonsColor = this.options.mediacontrol && this.options.mediacontrol.buttons;
+ if (buttonsColor) {
+ this.$el.find('svg path').css('fill', buttonsColor);
+ }
+
+ if (this.options.mediacontrol && this.options.mediacontrol.buttons) {
+ buttonsColor = this.options.mediacontrol.buttons;
+ this.$playButton.css('color', buttonsColor);
+ }
+ this.update();
+ return this;
+ };
+
+ return PosterPlugin;
+ }(_ui_container_plugin2.default);
+
+ exports.default = PosterPlugin;
+ module.exports = exports['default'];
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29)))
+
+/***/ },
+/* 92 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".player-poster[data-poster] {\n display: -webkit-box;\n display: -moz-box;\n display: box;\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -moz-box-pack: center;\n box-pack: center;\n -webkit-justify-content: center;\n -moz-justify-content: center;\n -ms-justify-content: center;\n -o-justify-content: center;\n justify-content: center;\n -ms-flex-pack: center;\n -webkit-box-align: center;\n -moz-box-align: center;\n box-align: center;\n -webkit-align-items: center;\n -moz-align-items: center;\n -ms-align-items: center;\n -o-align-items: center;\n align-items: center;\n -ms-flex-align: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: #000;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 93 */
+/***/ function(module, exports) {
+
+ module.exports = "<div class=\"play-wrapper\" data-poster></div>\n";
+
+/***/ },
+/* 94 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(95);
+
+/***/ },
+/* 95 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _container_plugin = __webpack_require__(85);
+
+ var _container_plugin2 = _interopRequireDefault(_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 GoogleAnalytics = function (_ContainerPlugin) {
+ _inherits(GoogleAnalytics, _ContainerPlugin);
+
+ _createClass(GoogleAnalytics, [{
+ key: 'name',
+ get: function get() {
+ return 'google_analytics';
+ }
+ }]);
+
+ function GoogleAnalytics(container) {
+ _classCallCheck(this, GoogleAnalytics);
+
+ var _this = _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));
+
+ if (_this.container.options.gaAccount) {
+ _this.account = _this.container.options.gaAccount;
+ _this.trackerName = _this.container.options.gaTrackerName ? _this.container.options.gaTrackerName + '.' : 'Clappr.';
+ _this.domainName = _this.container.options.gaDomainName;
+ _this.currentHDState = undefined;
+ _this.embedScript();
+ }
+ return _this;
+ }
+
+ GoogleAnalytics.prototype.embedScript = function embedScript() {
+ var _this2 = this;
+
+ if (!window._gat) {
+ var script = document.createElement('script');
+ script.setAttribute('type', 'text/javascript');
+ script.setAttribute('async', 'async');
+ script.setAttribute('src', '//www.google-analytics.com/ga.js');
+ script.onload = function () {
+ return _this2.addEventListeners();
+ };
+ document.body.appendChild(script);
+ } else {
+ this.addEventListeners();
+ }
+ };
+
+ GoogleAnalytics.prototype.addEventListeners = function addEventListeners() {
+ var _this3 = this;
+
+ if (this.container) {
+ this.listenTo(this.container, _events2.default.CONTAINER_READY, this.onReady);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);
+ this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);
+ this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.onPause);
+ this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onEnded);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);
+ this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);
+ this.listenTo(this.container, _events2.default.CONTAINER_ERROR, this.onError);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKSTATE, this.onPlaybackChanged);
+ this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, function (event) {
+ return _this3.onVolumeChanged(event);
+ });
+ this.listenTo(this.container, _events2.default.CONTAINER_SEEK, function (event) {
+ return _this3.onSeek(event);
+ });
+ this.listenTo(this.container, _events2.default.CONTAINER_FULL_SCREEN, this.onFullscreen);
+ this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.onHD);
+ this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDVR);
+ }
+ _gaq.push([this.trackerName + '_setAccount', this.account]);
+ if (this.domainName) _gaq.push([this.trackerName + '_setDomainName', this.domainName]);
+ };
+
+ GoogleAnalytics.prototype.onReady = function onReady() {
+ this.push(['Video', 'Playback', this.container.playback.name]);
+ };
+
+ GoogleAnalytics.prototype.onPlay = function onPlay() {
+ this.push(['Video', 'Play', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onStop = function onStop() {
+ this.push(['Video', 'Stop', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onEnded = function onEnded() {
+ this.push(['Video', 'Ended', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onBuffering = function onBuffering() {
+ this.push(['Video', 'Buffering', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onBufferFull = function onBufferFull() {
+ this.push(['Video', 'Bufferfull', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onError = function onError() {
+ this.push(['Video', 'Error', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onHD = function onHD(isHD) {
+ var status = isHD ? 'ON' : 'OFF';
+ if (status !== this.currentHDState) {
+ this.currentHDState = status;
+ this.push(['Video', 'HD - ' + status, this.container.playback.src]);
+ }
+ };
+
+ GoogleAnalytics.prototype.onPlaybackChanged = function onPlaybackChanged(playbackState) {
+ if (playbackState.type !== null) {
+ this.push(['Video', 'Playback Type - ' + playbackState.type, this.container.playback.src]);
+ }
+ };
+
+ GoogleAnalytics.prototype.onDVR = function onDVR(dvrInUse) {
+ var status = dvrInUse ? 'ON' : 'OFF';
+ this.push(['Interaction', 'DVR - ' + status, this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onPause = function onPause() {
+ this.push(['Video', 'Pause', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onSeek = function onSeek() {
+ this.push(['Video', 'Seek', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onVolumeChanged = function onVolumeChanged() {
+ this.push(['Interaction', 'Volume', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.onFullscreen = function onFullscreen() {
+ this.push(['Interaction', 'Fullscreen', this.container.playback.src]);
+ };
+
+ GoogleAnalytics.prototype.push = function push(array) {
+ var res = [this.trackerName + '_trackEvent'].concat(array);
+ _gaq.push(res);
+ };
+
+ return GoogleAnalytics;
+ }(_container_plugin2.default);
+
+ exports.default = GoogleAnalytics;
+ module.exports = exports['default'];
+
+/***/ },
+/* 96 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(97);
+
+/***/ },
+/* 97 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _container_plugin = __webpack_require__(85);
+
+ var _container_plugin2 = _interopRequireDefault(_container_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } //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 ClickToPausePlugin = function (_ContainerPlugin) {
+ _inherits(ClickToPausePlugin, _ContainerPlugin);
+
+ _createClass(ClickToPausePlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'click_to_pause';
+ }
+ }]);
+
+ function ClickToPausePlugin(container) {
+ _classCallCheck(this, ClickToPausePlugin);
+
+ return _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));
+ }
+
+ ClickToPausePlugin.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.container, _events2.default.CONTAINER_CLICK, this.click);
+ this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);
+ };
+
+ ClickToPausePlugin.prototype.click = function click() {
+ if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled()) {
+ if (this.container.isPlaying()) {
+ this.container.pause();
+ } else {
+ this.container.play();
+ }
+ }
+ };
+
+ ClickToPausePlugin.prototype.settingsUpdate = function settingsUpdate() {
+ this.container.$el.removeClass('pointer-enabled');
+ if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled()) {
+ this.container.$el.addClass('pointer-enabled');
+ }
+ };
+
+ return ClickToPausePlugin;
+ }(_container_plugin2.default);
+
+ exports.default = ClickToPausePlugin;
+ module.exports = exports['default'];
+
+/***/ },
+/* 98 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(99);
+
+/***/ },
+/* 99 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _ui_core_plugin = __webpack_require__(100);
+
+ var _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _dvr_controls = __webpack_require__(101);
+
+ var _dvr_controls2 = _interopRequireDefault(_dvr_controls);
+
+ var _index = __webpack_require__(102);
+
+ var _index2 = _interopRequireDefault(_index);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var DVRControls = function (_UICorePlugin) {
+ _inherits(DVRControls, _UICorePlugin);
+
+ _createClass(DVRControls, [{
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_index2.default);
+ }
+ }, {
+ key: 'name',
+ get: function get() {
+ return 'dvr_controls';
+ }
+ }, {
+ key: 'events',
+ get: function get() {
+ return {
+ 'click .live-button': 'click'
+ };
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'class': 'dvr-controls',
+ 'data-dvr-controls': ''
+ };
+ }
+ }]);
+
+ function DVRControls(core) {
+ _classCallCheck(this, DVRControls);
+
+ var _this = _possibleConstructorReturn(this, _UICorePlugin.call(this, core));
+
+ _this.settingsUpdate();
+ return _this;
+ }
+
+ DVRControls.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);
+ this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.settingsUpdate);
+ this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.render);
+ if (this.core.getCurrentContainer()) {
+ this.listenToOnce(this.core.getCurrentContainer(), _events2.default.CONTAINER_TIMEUPDATE, this.render);
+ this.listenTo(this.core.getCurrentContainer(), _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.dvrChanged);
+ }
+ };
+
+ DVRControls.prototype.containerChanged = function containerChanged() {
+ this.stopListening();
+ this.bindEvents();
+ };
+
+ DVRControls.prototype.dvrChanged = function dvrChanged(dvrEnabled) {
+ this.settingsUpdate();
+ this.core.mediaControl.$el.addClass('live');
+ if (dvrEnabled) {
+ this.core.mediaControl.$el.addClass('dvr');
+ this.core.mediaControl.$el.find('.media-control-indicator[data-position], .media-control-indicator[data-duration]').hide();
+ } else {
+ this.core.mediaControl.$el.removeClass('dvr');
+ }
+ };
+
+ DVRControls.prototype.click = function click() {
+ var mediaControl = this.core.mediaControl;
+ var container = mediaControl.container;
+ if (!container.isPlaying()) {
+ container.play();
+ }
+ if (mediaControl.$el.hasClass('dvr')) {
+ container.seek(container.getDuration());
+ }
+ };
+
+ DVRControls.prototype.settingsUpdate = function settingsUpdate() {
+ var _this2 = this;
+
+ this.stopListening();
+ if (this.shouldRender()) {
+ this.render();
+ this.$el.click(function () {
+ return _this2.click();
+ });
+ }
+ this.bindEvents();
+ };
+
+ DVRControls.prototype.shouldRender = function shouldRender() {
+ var useDvrControls = this.core.options.useDvrControls === undefined || !!this.core.options.useDvrControls;
+ return useDvrControls && this.core.getPlaybackType() === _playback2.default.LIVE;
+ };
+
+ DVRControls.prototype.render = function render() {
+ this.style = this.style || _styler2.default.getStyleFor(_dvr_controls2.default, { baseUrl: this.core.options.baseUrl });
+ this.$el.html(this.template({
+ live: this.core.i18n.t('live'),
+ backToLive: this.core.i18n.t('back_to_live')
+ }));
+ this.$el.append(this.style);
+ if (this.shouldRender()) {
+ this.core.mediaControl.$el.addClass('live');
+ this.core.mediaControl.$('.media-control-left-panel[data-media-control]').append(this.$el);
+ }
+ return this;
+ };
+
+ return DVRControls;
+ }(_ui_core_plugin2.default);
+
+ exports.default = DVRControls;
+ module.exports = exports['default'];
+
+/***/ },
+/* 100 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _utils = __webpack_require__(2);
+
+ var _ui_object = __webpack_require__(18);
+
+ var _ui_object2 = _interopRequireDefault(_ui_object);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var UICorePlugin = function (_UIObject) {
+ _inherits(UICorePlugin, _UIObject);
+
+ function UICorePlugin(core) {
+ _classCallCheck(this, UICorePlugin);
+
+ var _this = _possibleConstructorReturn(this, _UIObject.call(this, core.options));
+
+ _this.core = core;
+ _this.enabled = true;
+ _this.bindEvents();
+ _this.render();
+ return _this;
+ }
+
+ UICorePlugin.prototype.bindEvents = function bindEvents() {};
+
+ UICorePlugin.prototype.getExternalInterface = function getExternalInterface() {
+ return {};
+ };
+
+ UICorePlugin.prototype.enable = function enable() {
+ if (!this.enabled) {
+ this.bindEvents();
+ this.$el.show();
+ this.enabled = true;
+ }
+ };
+
+ UICorePlugin.prototype.disable = function disable() {
+ this.stopListening();
+ this.$el.hide();
+ this.enabled = false;
+ };
+
+ UICorePlugin.prototype.destroy = function destroy() {
+ this.remove();
+ };
+
+ UICorePlugin.prototype.render = function render() {
+ return this;
+ };
+
+ return UICorePlugin;
+ }(_ui_object2.default);
+
+ exports.default = UICorePlugin;
+
+
+ UICorePlugin.extend = function (properties) {
+ return (0, _utils.extend)(UICorePlugin, properties);
+ };
+
+ UICorePlugin.type = 'core';
+ module.exports = exports['default'];
+
+/***/ },
+/* 101 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: \"Roboto\", \"Open Sans\", Arial, sans-serif;\n text-transform: uppercase;\n -webkit-transition: all 0.1s ease;\n -moz-transition: all 0.1s ease;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: \"\";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 102 */
+/***/ function(module, exports) {
+
+ module.exports = "<div class=\"live-info\"><%= live %></div>\n<button type=\"button\" class=\"live-button\"><%= backToLive %></button>\n";
+
+/***/ },
+/* 103 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(104);
+
+/***/ },
+/* 104 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _core_plugin = __webpack_require__(105);
+
+ var _core_plugin2 = _interopRequireDefault(_core_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _clapprZepto = __webpack_require__(16);
+
+ var _clapprZepto2 = _interopRequireDefault(_clapprZepto);
+
+ var _play = __webpack_require__(37);
+
+ var _play2 = _interopRequireDefault(_play);
+
+ var _pause = __webpack_require__(38);
+
+ var _pause2 = _interopRequireDefault(_pause);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var oldIcon = (0, _clapprZepto2.default)('link[rel="shortcut icon"]');
+
+ var Favicon = function (_CorePlugin) {
+ _inherits(Favicon, _CorePlugin);
+
+ _createClass(Favicon, [{
+ key: 'name',
+ get: function get() {
+ return 'favicon';
+ }
+ }, {
+ key: 'oldIcon',
+ get: function get() {
+ return oldIcon;
+ }
+ }]);
+
+ function Favicon(core) {
+ _classCallCheck(this, Favicon);
+
+ var _this = _possibleConstructorReturn(this, _CorePlugin.call(this, core));
+
+ _this._container = null;
+ _this.configure();
+ return _this;
+ }
+
+ Favicon.prototype.configure = function configure() {
+ if (this.core.options.changeFavicon) {
+ if (!this.enabled) {
+ this.stopListening(this.core, _events2.default.CORE_OPTIONS_CHANGE);
+ this.enable();
+ }
+ } else if (this.enabled) {
+ this.disable();
+ this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);
+ }
+ };
+
+ Favicon.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);
+ this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);
+ if (this.core.mediaControl.container) {
+ this.containerChanged();
+ }
+ };
+
+ Favicon.prototype.containerChanged = function containerChanged() {
+ this._container && this.stopListening(this._container);
+ this._container = this.core.mediaControl.container;
+ this.listenTo(this._container, _events2.default.CONTAINER_PLAY, this.setPlayIcon);
+ this.listenTo(this._container, _events2.default.CONTAINER_PAUSE, this.setPauseIcon);
+ this.listenTo(this._container, _events2.default.CONTAINER_STOP, this.resetIcon);
+ this.listenTo(this._container, _events2.default.CONTAINER_ENDED, this.resetIcon);
+ this.listenTo(this._container, _events2.default.CONTAINER_ERROR, this.resetIcon);
+ this.resetIcon();
+ };
+
+ Favicon.prototype.disable = function disable() {
+ _CorePlugin.prototype.disable.call(this);
+ this.resetIcon();
+ };
+
+ Favicon.prototype.destroy = function destroy() {
+ _CorePlugin.prototype.destroy.call(this);
+ this.resetIcon();
+ };
+
+ Favicon.prototype.createIcon = function createIcon(svg) {
+ var canvas = (0, _clapprZepto2.default)('<canvas/>');
+ canvas[0].width = 16;
+ canvas[0].height = 16;
+ var ctx = canvas[0].getContext('2d');
+ ctx.fillStyle = '#000';
+ var d = (0, _clapprZepto2.default)(svg).find('path').attr('d');
+ var path = new Path2D(d);
+ ctx.fill(path);
+ var icon = (0, _clapprZepto2.default)('<link rel="shortcut icon" type="image/png"/>');
+ icon.attr('href', canvas[0].toDataURL('image/png'));
+ return icon;
+ };
+
+ Favicon.prototype.setPlayIcon = function setPlayIcon() {
+ if (!this.playIcon) {
+ this.playIcon = this.createIcon(_play2.default);
+ }
+ this.changeIcon(this.playIcon);
+ };
+
+ Favicon.prototype.setPauseIcon = function setPauseIcon() {
+ if (!this.pauseIcon) {
+ this.pauseIcon = this.createIcon(_pause2.default);
+ }
+ this.changeIcon(this.pauseIcon);
+ };
+
+ Favicon.prototype.resetIcon = function resetIcon() {
+ (0, _clapprZepto2.default)('link[rel="shortcut icon"]').remove();
+ (0, _clapprZepto2.default)('head').append(this.oldIcon);
+ };
+
+ Favicon.prototype.changeIcon = function changeIcon(icon) {
+ if (icon) {
+ (0, _clapprZepto2.default)('link[rel="shortcut icon"]').remove();
+ (0, _clapprZepto2.default)('head').append(icon);
+ }
+ };
+
+ return Favicon;
+ }(_core_plugin2.default);
+
+ exports.default = Favicon;
+ module.exports = exports['default'];
+
+/***/ },
+/* 105 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _utils = __webpack_require__(2);
+
+ var _base_object = __webpack_require__(4);
+
+ var _base_object2 = _interopRequireDefault(_base_object);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var CorePlugin = function (_BaseObject) {
+ _inherits(CorePlugin, _BaseObject);
+
+ function CorePlugin(core) {
+ _classCallCheck(this, CorePlugin);
+
+ var _this = _possibleConstructorReturn(this, _BaseObject.call(this, core.options));
+
+ _this.core = core;
+ _this.enabled = true;
+ _this.bindEvents();
+ return _this;
+ }
+
+ CorePlugin.prototype.bindEvents = function bindEvents() {};
+
+ CorePlugin.prototype.enable = function enable() {
+ if (!this.enabled) {
+ this.bindEvents();
+ this.enabled = true;
+ }
+ };
+
+ CorePlugin.prototype.disable = function disable() {
+ if (this.enabled) {
+ this.stopListening();
+ this.enabled = false;
+ }
+ };
+
+ CorePlugin.prototype.getExternalInterface = function getExternalInterface() {
+ return {};
+ };
+
+ CorePlugin.prototype.destroy = function destroy() {
+ this.stopListening();
+ };
+
+ return CorePlugin;
+ }(_base_object2.default);
+
+ exports.default = CorePlugin;
+
+
+ CorePlugin.extend = function (properties) {
+ return (0, _utils.extend)(CorePlugin, properties);
+ };
+
+ CorePlugin.type = 'core';
+ module.exports = exports['default'];
+
+/***/ },
+/* 106 */
+/***/ function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ module.exports = __webpack_require__(107);
+
+/***/ },
+/* 107 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _ui_core_plugin = __webpack_require__(100);
+
+ var _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);
+
+ var _styler = __webpack_require__(15);
+
+ var _styler2 = _interopRequireDefault(_styler);
+
+ var _template = __webpack_require__(17);
+
+ var _template2 = _interopRequireDefault(_template);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _playback = __webpack_require__(31);
+
+ var _playback2 = _interopRequireDefault(_playback);
+
+ var _seek_time = __webpack_require__(108);
+
+ var _seek_time2 = _interopRequireDefault(_seek_time);
+
+ var _seek_time3 = __webpack_require__(109);
+
+ var _seek_time4 = _interopRequireDefault(_seek_time3);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // 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 SeekTime = function (_UICorePlugin) {
+ _inherits(SeekTime, _UICorePlugin);
+
+ _createClass(SeekTime, [{
+ key: 'name',
+ get: function get() {
+ return 'seek_time';
+ }
+ }, {
+ key: 'template',
+ get: function get() {
+ return (0, _template2.default)(_seek_time4.default);
+ }
+ }, {
+ key: 'attributes',
+ get: function get() {
+ return {
+ 'class': 'seek-time',
+ 'data-seek-time': ''
+ };
+ }
+ }, {
+ key: 'mediaControl',
+ get: function get() {
+ return this.core.mediaControl;
+ }
+ }, {
+ key: 'mediaControlContainer',
+ get: function get() {
+ return this.mediaControl.container;
+ }
+ }, {
+ key: 'isLiveStreamWithDvr',
+ get: function get() {
+ return this.mediaControlContainer && this.mediaControlContainer.getPlaybackType() === _playback2.default.LIVE && this.mediaControlContainer.isDvrEnabled();
+ }
+ }, {
+ key: 'durationShown',
+ get: function get() {
+ return this.isLiveStreamWithDvr && !this.useActualLiveTime;
+ }
+ }, {
+ key: 'useActualLiveTime',
+ get: function get() {
+ return this.actualLiveTime && this.isLiveStreamWithDvr;
+ }
+ }]);
+
+ function SeekTime(core) {
+ _classCallCheck(this, SeekTime);
+
+ var _this = _possibleConstructorReturn(this, _UICorePlugin.call(this, core));
+
+ _this.hoveringOverSeekBar = false;
+ _this.hoverPosition = null;
+ _this.duration = null;
+ _this.actualLiveTime = !!_this.mediaControl.options.actualLiveTime;
+ if (_this.actualLiveTime) {
+ if (_this.mediaControl.options.actualLiveServerTime) {
+ _this.actualLiveServerTimeDiff = new Date().getTime() - new Date(_this.mediaControl.options.actualLiveServerTime).getTime();
+ } else {
+ _this.actualLiveServerTimeDiff = 0;
+ }
+ }
+ return _this;
+ }
+
+ SeekTime.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.render);
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime);
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime);
+ this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);
+ if (this.mediaControlContainer) {
+ this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.update);
+ this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_TIMEUPDATE, this.updateDuration);
+ }
+ };
+
+ SeekTime.prototype.onContainerChanged = function onContainerChanged() {
+ this.stopListening();
+ this.bindEvents();
+ };
+
+ SeekTime.prototype.updateDuration = function updateDuration(timeProgress) {
+ this.duration = timeProgress.total;
+ this.update();
+ };
+
+ SeekTime.prototype.showTime = function showTime(event) {
+ this.hoveringOverSeekBar = true;
+ this.calculateHoverPosition(event);
+ this.update();
+ };
+
+ SeekTime.prototype.hideTime = function hideTime() {
+ this.hoveringOverSeekBar = false;
+ this.update();
+ };
+
+ SeekTime.prototype.calculateHoverPosition = function calculateHoverPosition(event) {
+ var offset = event.pageX - this.mediaControl.$seekBarContainer.offset().left;
+ // proportion into the seek bar that the mouse is hovered over 0-1
+ this.hoverPosition = Math.min(1, Math.max(offset / this.mediaControl.$seekBarContainer.width(), 0));
+ };
+
+ SeekTime.prototype.getSeekTime = function getSeekTime() {
+ var seekTime = void 0,
+ secondsSinceMidnight = void 0;
+ if (this.useActualLiveTime) {
+ var d = new Date(new Date().getTime() - this.actualLiveServerTimeDiff),
+ e = new Date(d);
+ secondsSinceMidnight = (e - d.setHours(0, 0, 0, 0)) / 1000;
+ seekTime = secondsSinceMidnight - this.duration + this.hoverPosition * this.duration;
+ if (seekTime < 0) {
+ seekTime += 86400;
+ }
+ } else {
+ seekTime = this.hoverPosition * this.duration;
+ }
+ return { seekTime: seekTime, secondsSinceMidnight: secondsSinceMidnight };
+ };
+
+ SeekTime.prototype.update = function update() {
+ if (!this.rendered) {
+ // update() is always called after a render
+ return;
+ }
+ if (!this.shouldBeVisible()) {
+ this.$el.hide();
+ this.$el.css('left', '-100%');
+ } else {
+ var seekTime = this.getSeekTime();
+ var currentSeekTime = (0, _utils.formatTime)(seekTime.seekTime, this.useActualLiveTime);
+ // only update dom if necessary, ie time actually changed
+ if (currentSeekTime !== this.displayedSeekTime) {
+ this.$seekTimeEl.text(currentSeekTime);
+ this.displayedSeekTime = currentSeekTime;
+ }
+
+ if (this.durationShown) {
+ this.$durationEl.show();
+ var currentDuration = (0, _utils.formatTime)(this.actualLiveTime ? seekTime.secondsSinceMidnight : this.duration, this.actualLiveTime);
+ if (currentDuration !== this.displayedDuration) {
+ this.$durationEl.text(currentDuration);
+ this.displayedDuration = currentDuration;
+ }
+ } else {
+ this.$durationEl.hide();
+ }
+
+ // the element must be unhidden before its width is requested, otherwise it's width will be reported as 0
+ this.$el.show();
+ var containerWidth = this.mediaControl.$seekBarContainer.width();
+ var elWidth = this.$el.width();
+ var elLeftPos = this.hoverPosition * containerWidth;
+ elLeftPos -= elWidth / 2;
+ elLeftPos = Math.max(0, Math.min(elLeftPos, containerWidth - elWidth));
+ this.$el.css('left', elLeftPos);
+ }
+ };
+
+ SeekTime.prototype.shouldBeVisible = function shouldBeVisible() {
+ return this.mediaControlContainer && this.mediaControlContainer.settings.seekEnabled && this.hoveringOverSeekBar && this.hoverPosition !== null && this.duration !== null;
+ };
+
+ SeekTime.prototype.render = function render() {
+ this.rendered = true;
+ this.displayedDuration = null;
+ this.displayedSeekTime = null;
+ var style = _styler2.default.getStyleFor(_seek_time2.default);
+ this.$el.html(this.template());
+ this.$el.append(style);
+ this.$el.hide();
+ this.mediaControl.$el.append(this.el);
+ this.$seekTimeEl = this.$el.find('[data-seek-time]');
+ this.$durationEl = this.$el.find('[data-duration]');
+ this.$durationEl.hide();
+ this.update();
+ };
+
+ return SeekTime;
+ }(_ui_core_plugin2.default);
+
+ exports.default = SeekTime;
+ module.exports = exports['default'];
+
+/***/ },
+/* 108 */
+/***/ function(module, exports, __webpack_require__) {
+
+ exports = module.exports = __webpack_require__(25)();
+ // imports
+
+
+ // module
+ exports.push([module.id, ".seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n -webkit-transition: opacity 0.1s ease;\n -moz-transition: opacity 0.1s ease;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: \"|\";\n margin-right: 7px; }\n", ""]);
+
+ // exports
+
+
+/***/ },
+/* 109 */
+/***/ function(module, exports) {
+
+ module.exports = "<span data-seek-time></span>\n<span data-duration></span>\n";
+
+/***/ },
+/* 110 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _core_plugin = __webpack_require__(105);
+
+ var _core_plugin2 = _interopRequireDefault(_core_plugin);
+
+ var _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var SourcesPlugin = function (_CorePlugin) {
+ _inherits(SourcesPlugin, _CorePlugin);
+
+ function SourcesPlugin() {
+ _classCallCheck(this, SourcesPlugin);
+
+ return _possibleConstructorReturn(this, _CorePlugin.apply(this, arguments));
+ }
+
+ SourcesPlugin.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.core, _events2.default.CORE_CONTAINERS_CREATED, this.onContainersCreated);
+ };
+
+ SourcesPlugin.prototype.onContainersCreated = function onContainersCreated() {
+ var firstValidSource = this.core.containers.filter(function (container) {
+ return container.playback.name !== 'no_op';
+ })[0] || this.core.containers[0];
+ if (firstValidSource) {
+ this.core.containers.forEach(function (container) {
+ if (container !== firstValidSource) {
+ container.destroy();
+ }
+ });
+ }
+ };
+
+ _createClass(SourcesPlugin, [{
+ key: 'name',
+ get: function get() {
+ return 'sources';
+ }
+ }]);
+
+ return SourcesPlugin;
+ }(_core_plugin2.default);
+
+ exports.default = SourcesPlugin;
+ module.exports = exports['default'];
+
+/***/ },
+/* 111 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _events = __webpack_require__(5);
+
+ var _events2 = _interopRequireDefault(_events);
+
+ var _core_plugin = __webpack_require__(105);
+
+ var _core_plugin2 = _interopRequireDefault(_core_plugin);
+
+ var _utils = __webpack_require__(2);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ var EndVideo = function (_CorePlugin) {
+ _inherits(EndVideo, _CorePlugin);
+
+ function EndVideo() {
+ _classCallCheck(this, EndVideo);
+
+ return _possibleConstructorReturn(this, _CorePlugin.apply(this, arguments));
+ }
+
+ EndVideo.prototype.bindEvents = function bindEvents() {
+ this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);
+ var container = this.core.getCurrentContainer();
+ if (container) {
+ this.listenTo(container, _events2.default.CONTAINER_ENDED, this.ended);
+ this.listenTo(container, _events2.default.CONTAINER_STOP, this.ended);
+ }
+ };
+
+ EndVideo.prototype.containerChanged = function containerChanged() {
+ this.stopListening();
+ this.bindEvents();
+ };
+
+ EndVideo.prototype.ended = function ended() {
+ var exitOnEnd = typeof this.core.options.exitFullscreenOnEnd === 'undefined' || this.core.options.exitFullscreenOnEnd;
+ if (exitOnEnd && _utils.Fullscreen.isFullscreen()) {
+ this.core.toggleFullscreen();
+ }
+ };
+
+ _createClass(EndVideo, [{
+ key: 'name',
+ get: function get() {
+ return 'end_video';
+ }
+ }]);
+
+ return EndVideo;
+ }(_core_plugin2.default);
+
+ exports.default = EndVideo;
+ module.exports = exports['default'];
+
+/***/ },
+/* 112 */
+/***/ function(module, exports, __webpack_require__) {
+
+ '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 _utils = __webpack_require__(2);
+
+ var _core_plugin = __webpack_require__(105);
+
+ var _core_plugin2 = _interopRequireDefault(_core_plugin);
+
+ var _lodash = __webpack_require__(32);
+
+ var _lodash2 = _interopRequireDefault(_lodash);
+
+ 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"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+ /**
+ * The internationalization (i18n) plugin
+ * @class Strings
+ * @constructor
+ * @extends CorePlugin
+ * @module plugins
+ */
+ var Strings = function (_CorePlugin) {
+ _inherits(Strings, _CorePlugin);
+
+ _createClass(Strings, [{
+ key: 'name',
+ get: function get() {
+ return 'strings';
+ }
+ }]);
+
+ function Strings(core) {
+ _classCallCheck(this, Strings);
+
+ var _this = _possibleConstructorReturn(this, _CorePlugin.call(this, core));
+
+ _this._initializeMessages();
+ return _this;
+ }
+ /**
+ * Gets a translated string for the given key.
+ * @method t
+ * @param {String} key the key to all messages
+ * @return {String} translated label
+ */
+
+
+ Strings.prototype.t = function t(key) {
+ var lang = this._language();
+ var i18n = lang && this._messages[lang] || this._messages['en'];
+ return i18n[key] || key;
+ };
+
+ Strings.prototype._language = function _language() {
+ return this.core.options.language || (0, _utils.getBrowserLanguage)();
+ };
+
+ Strings.prototype._initializeMessages = function _initializeMessages() {
+ this._messages = (0, _lodash2.default)({
+ 'en': {
+ 'live': 'live',
+ 'back_to_live': 'back to live',
+ 'playback_not_supported': 'Your browser does not support the playback of this video. Please try using a different browser.'
+ },
+ 'pt': {
+ 'live': 'ao vivo',
+ 'back_to_live': 'voltar para o ao vivo',
+ 'playback_not_supported': 'Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.'
+ },
+ 'es': {
+ 'live': 'vivo',
+ 'back_to_live': 'volver en vivo',
+ 'playback_not_supported': 'Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente.'
+ },
+ 'ru': {
+ 'live': 'прямой эфир',
+ 'back_to_live': 'к прямому эфиру',
+ 'playback_not_supported': 'Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер.'
+ }
+ }, this.core.options.strings || {});
+
+ this._messages['pt-BR'] = this._messages['pt'];
+ this._messages['en-US'] = this._messages['en'];
+ this._messages['es-419'] = this._messages['es'];
+ };
+
+ return Strings;
+ }(_core_plugin2.default);
+
+ exports.default = Strings;
+ module.exports = exports['default'];
+
+/***/ }
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/assets/clapprio/clappr.min.js b/assets/clapprio/clappr.min.js
new file mode 100644
index 0000000..ba145ab
--- /dev/null
+++ b/assets/clapprio/clappr.min.js
@@ -0,0 +1,16 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Clappr=e():t.Clappr=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="<%=baseUrl%>/",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(46),o=r(i),a=n(2),s=r(a),l=n(1),u=r(l),c=n(3),d=r(c),f=n(13),h=r(f),p=n(12),y=r(p),g=n(17),v=r(g),m=n(14),b=r(m),_=n(9),E=r(_),T=n(10),A=r(T),k=n(8),w=r(k),S=n(24),L=r(S),R=n(25),O=r(R),C=n(26),P=r(C),D=n(11),I=r(D),x=n(27),N=r(x),M=n(15),F=r(M),B=n(18),U=r(B),j=n(28),G=r(j),Y=n(29),V=r(Y),K=n(30),$=r(K),H=n(31),z=r(H),W=n(16),q=r(W),X=n(32),Z=r(X),J=n(33),Q=r(J),tt=n(34),et=r(tt),nt=n(19),rt=r(nt),it=n(4),ot=r(it),at=n(20),st=r(at),lt=n(6),ut=r(lt),ct=n(5),dt=r(ct),ft="0.2.64";e.default={Player:o.default,Mediator:I.default,Events:u.default,Browser:w.default,PlayerInfo:F.default,MediaControl:N.default,ContainerPlugin:h.default,UIContainerPlugin:b.default,CorePlugin:y.default,UICorePlugin:v.default,Playback:d.default,Container:L.default,Core:O.default,Loader:P.default,BaseObject:E.default,UIObject:A.default,Utils:s.default,BaseFlashPlayback:U.default,Flash:G.default,FlasHLS:V.default,HLS:$.default,HTML5Audio:z.default,HTML5Video:q.default,HTMLImg:Z.default,NoOp:Q.default,Poster:et.default,Log:rt.default,Styler:ot.default,Vendor:st.default,version:ft,template:ut.default,$:dt.default},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=n(19),s=r(a),l=n(2),u=n(101),c=r(u),d=Array.prototype.slice,f=/\s+/,h=function(t,e,n,r){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":o(n))){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(f.test(n)){for(var a=n.split(f),s=0,l=a.length;s<l;s++)t[e].apply(t,[a[s]].concat(r));return!1}return!0},p=function(t,e,n,r){function i(){try{switch(e.length){case 0:for(;++a<l;)(o=t[a]).callback.call(o.ctx);return;case 1:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u);return;case 2:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u,c);return;case 3:for(;++a<l;)(o=t[a]).callback.call(o.ctx,u,c,d);return;default:for(;++a<l;)(o=t[a]).callback.apply(o.ctx,e);return}}catch(t){s.default.error.apply(s.default,[n,"error on event",r,"trigger","-",t]),i()}}var o=void 0,a=-1,l=t.length,u=e[0],c=e[1],d=e[2];i()},y=function(){function t(){i(this,t)}return t.prototype.on=function(t,e,n){if(!h(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},t.prototype.once=function t(e,n,r){if(!h(this,"once",e,[n,r])||!n)return this;var i=this,t=(0,c.default)(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},t.prototype.off=function(t,e,n){var r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,l=void 0,u=void 0,c=void 0;if(!this._events||!h(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events=void 0,this;for(a=t?[t]:Object.keys(this._events),s=0,l=a.length;s<l;s++)if(t=a[s],o=this._events[t]){if(this._events[t]=r=[],e||n)for(u=0,c=o.length;u<c;u++)i=o[u],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},t.prototype.trigger=function(t){var e=this.name||this.constructor.name;if(s.default.debug.apply(s.default,[e].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=d.call(arguments,1);if(!h(this,"trigger",t,n))return this;var r=this._events[t],i=this._events.all;return r&&p(r,n,e,t),i&&p(i,arguments,e,t),this},t.prototype.stopListening=function(t,e,n){var r=this._listeningTo;if(!r)return this;var i=!e&&!n;n||"object"!==("undefined"==typeof e?"undefined":o(e))||(n=this),t&&((r={})[t._listenId]=t);for(var a in r)t=r[a],t.off(e,n,this),(i||0===Object.keys(t._events).length)&&delete this._listeningTo[a];return this},t}();e.default=y;var g={listenTo:"on",listenToOnce:"once"};Object.keys(g).forEach(function(t){y.prototype[t]=function(e,n,r){var i=this._listeningTo||(this._listeningTo={}),a=e._listenId||(e._listenId=(0,l.uniqueId)("l"));return i[a]=e,r||"object"!==("undefined"==typeof n?"undefined":o(n))||(r=this),e[g[t]](n,r,this),this}}),y.PLAYER_READY="ready",y.PLAYER_RESIZE="resize",y.PLAYER_FULLSCREEN="fullscreen",y.PLAYER_PLAY="play",y.PLAYER_PAUSE="pause",y.PLAYER_STOP="stop",y.PLAYER_ENDED="ended",y.PLAYER_SEEK="seek",y.PLAYER_ERROR="error",y.PLAYER_TIMEUPDATE="timeupdate",y.PLAYER_VOLUMEUPDATE="volumeupdate",y.PLAYBACK_PROGRESS="playback:progress",y.PLAYBACK_TIMEUPDATE="playback:timeupdate",y.PLAYBACK_READY="playback:ready",y.PLAYBACK_BUFFERING="playback:buffering",y.PLAYBACK_BUFFERFULL="playback:bufferfull",y.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",y.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",y.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",y.PLAYBACK_BITRATE="playback:bitrate",y.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",y.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",y.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",y.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",y.PLAYBACK_DVR="playback:dvr",y.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",y.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",y.PLAYBACK_ENDED="playback:ended",y.PLAYBACK_PLAY_INTENT="playback:play:intent",y.PLAYBACK_PLAY="playback:play",y.PLAYBACK_PAUSE="playback:pause",y.PLAYBACK_STOP="playback:stop",y.PLAYBACK_ERROR="playback:error",y.PLAYBACK_STATS_ADD="playback:stats:add",y.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",y.PLAYBACK_LEVEL_SWITCH="playback:level:switch",y.CORE_OPTIONS_CHANGE="core:options:change",y.CORE_READY="core:ready",y.CORE_FULLSCREEN="core:fullscreen",y.CONTAINER_PLAYBACKSTATE="container:playbackstate",y.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",y.CONTAINER_BITRATE="container:bitrate",y.CONTAINER_STATS_REPORT="container:stats:report",y.CONTAINER_DESTROYED="container:destroyed",y.CONTAINER_READY="container:ready",y.CONTAINER_ERROR="container:error",y.CONTAINER_LOADEDMETADATA="container:loadedmetadata",y.CONTAINER_TIMEUPDATE="container:timeupdate",y.CONTAINER_PROGRESS="container:progress",y.CONTAINER_PLAY="container:play",y.CONTAINER_STOP="container:stop",y.CONTAINER_PAUSE="container:pause",y.CONTAINER_ENDED="container:ended",y.CONTAINER_CLICK="container:click",y.CONTAINER_DBLCLICK="container:dblclick",y.CONTAINER_CONTEXTMENU="container:contextmenu",y.CONTAINER_MOUSE_ENTER="container:mouseenter",y.CONTAINER_MOUSE_LEAVE="container:mouseleave",y.CONTAINER_SEEK="container:seek",y.CONTAINER_VOLUME="container:volume",y.CONTAINER_FULLSCREEN="container:fullscreen",y.CONTAINER_STATE_BUFFERING="container:state:buffering",y.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",y.CONTAINER_SETTINGSUPDATE="container:settingsupdate",y.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",y.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",y.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",y.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",y.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",y.CONTAINER_STATS_ADD="container:stats:add",y.CONTAINER_OPTIONS_CHANGE="container:options:change",y.MEDIACONTROL_RENDERED="mediacontrol:rendered",y.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",y.MEDIACONTROL_SHOW="mediacontrol:show",y.MEDIACONTROL_HIDE="mediacontrol:hide",y.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",y.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",y.MEDIACONTROL_PLAYING="mediacontrol:playing",y.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",y.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",y.CORE_CONTAINERS_CREATED="core:containers:created",t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(e)for(var n in e){var r=Object.getOwnPropertyDescriptor(e,n);r?Object.defineProperty(t,n,r):t[n]=e[n]}return t}function l(t,e){var n=function(t){function n(){i(this,n);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];var l=o(this,t.call.apply(t,[this].concat(a)));return e.initialize&&e.initialize.apply(l,a),l}return a(n,t),n}(t);return s(n.prototype,e),n}function u(t,e){if(!isFinite(t))return"--:--";t*=1e3,t=parseInt(t/1e3);var n=t%60;t=parseInt(t/60);var r=t%60;t=parseInt(t/60);var i=t%24,o=parseInt(t/24),a="";return o&&o>0&&(a+=o+":",i<1&&(a+="00:")),(i&&i>0||e)&&(a+=("0"+i).slice(-2)+":"),a+=("0"+r).slice(-2)+":",a+=("0"+n).slice(-2),a.trim()}function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",e=0,n=T.params[t]||T.hashParams[t]||"",r=n.match(/[0-9]+[hms]+/g)||[];return r.length>0?!function(){var t={h:3600,m:60,s:1};r.forEach(function(n){if(n){var r=n[n.length-1],i=parseInt(n.slice(0,n.length-1),10);e+=i*t[r]}})}():n&&(e=parseInt(n,10)),e}function d(t){A[t]||(A[t]=0);var e=++A[t];return t+e}function f(t){return t-parseFloat(t)+1>=0}function h(){var t=document.getElementsByTagName("script");return t.length?t[t.length-1].src:""}function p(){return window.navigator&&window.navigator.language}function y(){return window.performance&&window.performance.now?performance.now():Date.now()}function g(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}Object.defineProperty(e,"__esModule",{value:!0}),e.cancelAnimationFrame=e.requestAnimationFrame=e.QueryString=e.Config=e.Fullscreen=void 0;var v=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.extend=l,e.formatTime=u,e.seekStringToSeconds=c,e.uniqueId=d,e.isNumber=f,e.currentScriptUrl=h,e.getBrowserLanguage=p,e.now=y,e.removeArrayItem=g;var m=n(8),b=r(m),_=e.Fullscreen={isFullscreen:function(){return!!(document.webkitFullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)},requestFullscreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():t.querySelector&&t.querySelector("video")&&t.querySelector("video").webkitEnterFullScreen&&t.querySelector("video").webkitEnterFullScreen()},cancelFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},E=e.Config=function(){function t(){i(this,t)}return t._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},t._defaultValueFor=function(t){try{return this._defaultConfig()[t].parse(this._defaultConfig()[t].value)}catch(t){return}},t._createKeyspace=function(t){return"clappr."+document.domain+"."+t},t.restore=function(t){return b.default.hasLocalstorage&&localStorage[this._createKeyspace(t)]?this._defaultConfig()[t].parse(localStorage[this._createKeyspace(t)]):this._defaultValueFor(t)},t.persist=function(t,e){if(b.default.hasLocalstorage)try{return localStorage[this._createKeyspace(t)]=e,!0}catch(t){return!1}},t}(),T=e.QueryString=function(){function t(){i(this,t)}return t.parse=function(t){for(var e=void 0,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(t){return decodeURIComponent(t.replace(n," "))},o={};e=r.exec(t);)o[i(e[1]).toLowerCase()]=i(e[2]);return o},v(t,null,[{key:"params",get:function(){var t=window.location.search.substring(1);return t!==this.query&&(this._urlParams=this.parse(t),this.query=t),this._urlParams}},{key:"hashParams",get:function(){var t=window.location.hash.substring(1);return t!==this.hash&&(this._hashParams=this.parse(t),this.hash=t),this._hashParams}}]),t}(),A={},k=e.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}).bind(window),w=e.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);e.default={Config:E,Fullscreen:_,QueryString:T,extend:l,formatTime:u,seekStringToSeconds:c,uniqueId:d,currentScriptUrl:h,isNumber:f,requestAnimationFrame:k,cancelAnimationFrame:w,getBrowserLanguage:p,now:y,removeArrayItem:g}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(10),c=r(u),d=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n));return a.settings={},a._i18n=r,a}return a(e,t),s(e,[{key:"isAudioOnly",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}}]),e.prototype.play=function(){},e.prototype.pause=function(){},e.prototype.stop=function(){},e.prototype.seek=function(t){},e.prototype.seekPercentage=function(t){},e.prototype.getStartTimeOffset=function(){return 0},e.prototype.getDuration=function(){return 0},e.prototype.isPlaying=function(){return!1},e.prototype.getPlaybackType=function(){return e.NO_OP},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.volume=function(t){},e.prototype.destroy=function(){this.$el.remove()},s(e,[{key:"isReady",get:function(){return!1}}]),e}(c.default);e.default=d,d.extend=function(t){return(0,l.extend)(d,t)},d.canPlay=function(t,e){return!1},d.VOD="vod",d.AOD="aod",d.LIVE="live",d.NO_OP="no_op",d.type="playback",t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),o=r(i),a=n(6),s=r(a),l={getStyleFor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,o.default)('<style class="clappr-style"></style>').html((0,s.default)(t.toString())(e))}};e.default=l,t.exports=e.default},function(t,e){var n=function(){function t(t){return null==t?String(t):W[q.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function s(t){return C.call(t,function(t){return null!=t})}function l(t){return t.length>0?k.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function c(t){return t in x?x[t]:x[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function d(t,e){return"number"!=typeof e||N[u(t)]?e:e+"px"}function f(t){var e,n;return I[t]||(e=D.createElement(t),D.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),I[t]=n),I[t]}function h(t){return"children"in t?P.call(t.children):k.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function p(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function y(t,e,n){for(A in e)n&&(o(e[A])||Q(e[A]))?(o(e[A])&&!o(t[A])&&(t[A]={}),Q(e[A])&&!Q(t[A])&&(t[A]=[]),y(t[A],e[A],n)):e[A]!==T&&(t[A]=e[A])}function g(t,e){return null==e?k(t):k(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function m(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",r=n&&n.baseVal!==T;return e===T?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function _(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?k.parseJSON(t):t):t}catch(e){return t}}function E(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)E(t.childNodes[n],e)}var T,A,k,w,S,L,R=[],O=R.concat,C=R.filter,P=R.slice,D=window.document,I={},x={},N={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,F=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,B=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,U=/^(?:body|html)$/i,j=/([A-Z])/g,G=["val","css","html","text","data","width","height","offset"],Y=["after","prepend","before","append"],V=D.createElement("table"),K=D.createElement("tr"),$={tr:D.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:K,th:K,"*":D.createElement("div")},H=/complete|loaded|interactive/,z=/^[\w-]*$/,W={},q=W.toString,X={},Z=D.createElement("div"),J={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return X.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Z).appendChild(t),r=~X.qsa(i,e).indexOf(t),o&&Z.removeChild(t),r},S=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},L=function(t){return C.call(t,function(e,n){return t.indexOf(e)==n})},X.fragment=function(t,e,n){var r,i,a;return F.test(t)&&(r=k(D.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(B,"<$1></$2>")),e===T&&(e=M.test(t)&&RegExp.$1),e in $||(e="*"),a=$[e],a.innerHTML=""+t,r=k.each(P.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=k(r),k.each(n,function(t,e){G.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},X.Z=function(t,e){return new p(t,e)},X.isZ=function(t){return t instanceof X.Z},X.init=function(t,n){var r;if(!t)return X.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=X.fragment(t,RegExp.$1,n),t=null;else{if(n!==T)return k(n).find(t);r=X.qsa(D,t)}else{if(e(t))return k(D).ready(t);if(X.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=X.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==T)return k(n).find(t);r=X.qsa(D,t)}}return X.Z(r,t)},k=function(t,e){return X.init(t,e)},k.extend=function(t){var e,n=P.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){y(t,n,e)}),t},X.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=z.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:P.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},k.contains=D.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},k.type=t,k.isFunction=e,k.isWindow=n,k.isArray=Q,k.isPlainObject=o,k.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},k.inArray=function(t,e,n){return R.indexOf.call(e,t,n)},k.camelCase=S,k.trim=function(t){return null==t?"":String.prototype.trim.call(t)},k.uuid=0,k.support={},k.expr={},k.noop=function(){},k.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return l(o)},k.each=function(t,e){var n,r;if(a(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},k.grep=function(t,e){return C.call(t,e)},window.JSON&&(k.parseJSON=JSON.parse),k.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){W["[object "+e+"]"]=e.toLowerCase()}),k.fn={constructor:X.Z,length:0,forEach:R.forEach,reduce:R.reduce,push:R.push,sort:R.sort,splice:R.splice,indexOf:R.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=X.isZ(e)?e.toArray():e;return O.apply(X.isZ(this)?this.toArray():this,n)},map:function(t){return k(k.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return k(P.apply(this,arguments))},ready:function(t){return H.test(D.readyState)&&D.body?t(k):D.addEventListener("DOMContentLoaded",function(){t(k)},!1),this},get:function(t){return t===T?P.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return R.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):k(C.call(this,function(e){return X.matches(e,t)}))},add:function(t,e){return k(L(this.concat(k(t,e))))},is:function(t){return this.length>0&&X.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==T)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?P.call(t):k(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return k(n)},has:function(t){return this.filter(function(){return i(t)?k.contains(this,t):k(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:k(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:k(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?k(t).filter(function(){var t=this;return R.some.call(n,function(e){return k.contains(e,t)})}):1==this.length?k(X.qsa(this[0],t)):this.map(function(){return X.qsa(this,t)}):k()},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=k(t));n&&!(i?i.indexOf(n)>=0:X.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return k(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=k.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return g(e,t)},parent:function(t){return g(L(this.pluck("parentNode")),t)},children:function(t){return g(this.map(function(){return h(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||P.call(this.childNodes)})},siblings:function(t){return g(this.map(function(t,e){return C.call(h(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return k.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=f(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=k(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){k(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){k(this[0]).before(t=k(t));for(var e;(e=t.children()).length;)t=e.first();k(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=k(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){k(this).replaceWith(k(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=k(this);(t===T?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return k(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return k(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;k(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(A in t)m(this,A,t[A]);else m(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:T},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){m(this,t)},this)})},prop:function(t,e){return t=J[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(j,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?_(r):T},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?k(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=k(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(!k.contains(D.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[S(e)]||r.getPropertyValue(e);if(Q(e)){var o={};return k.each(e,function(t,e){o[e]=i.style[S(e)]||r.getPropertyValue(e)}),o}}var a="";if("string"==t(e))n||0===n?a=u(e)+":"+d(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(A in e)e[A]||0===e[A]?a+=u(A)+":"+d(A,e[A])+";":this.each(function(){this.style.removeProperty(u(A))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(k(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&R.some.call(this,function(t){return this.test(b(t))},c(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){w=[];var n=b(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){k(this).hasClass(t)||w.push(t)},this),w.length&&b(this,n+(n?" ":"")+w.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===T)return b(this,"");w=b(this),v(this,t,e,w).split(/\s+/g).forEach(function(t){w=w.replace(c(t)," ")}),b(this,w.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=k(this),i=v(this,t,n,b(this));i.split(/\s+/g).forEach(function(t){(e===T?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===T?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===T?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=U.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(k(t).css("margin-top"))||0,n.left-=parseFloat(k(t).css("margin-left"))||0,r.top+=parseFloat(k(e[0]).css("border-top-width"))||0,r.left+=parseFloat(k(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||D.body;t&&!U.test(t.nodeName)&&"static"==k(t).css("position");)t=t.offsetParent;return t})}},k.fn.detach=k.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});k.fn[t]=function(i){var o,a=this[0];return i===T?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=k(this),a.css(t,v(this,i,e,a[t]()))})}}),Y.forEach(function(e,n){var r=n%2;k.fn[e]=function(){var e,i,o=k.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:X.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=k.contains(D.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return k(t).remove();i.insertBefore(t,e),s&&E(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},k.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return k(t)[e](this),this}}),X.Z.prototype=p.prototype=k.fn,X.uniq=L,X.deserializeValue=_,k.zepto=X,k}();window.Zepto=n,void 0===window.$&&(window.$=n),function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(g[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!s.test(t.ns)||o&&e(t.fn)!==e(o)||a&&t.sel!=a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!m&&t.e in b||!!e}function a(t){return _[t]||m&&b[t]||t}function s(n,i,s,l,c,f,h){var p=e(n),y=g[p]||(g[p]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=c,i.e in _&&(s=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?i.fn.apply(this,arguments):void 0}),i.del=f;var p=f||s;i.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=l;var e=p.apply(n,t._args==d?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=y.length,y.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,h))})}function l(t,r,i,s,l){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete g[u][e.i],
+"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,l))})})}function u(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each(k,function(t,r){var i=n[t];e[t]=function(){return this[r]=E,i&&i.apply(n,arguments)},e[r]=T}),(n.defaultPrevented!==d?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=E)),e}function c(t){var e,n={originalEvent:t};for(e in t)A.test(e)||t[e]===d||(n[e]=t[e]);return u(n,t)}var d,f=1,h=Array.prototype.slice,p=t.isFunction,y=function(t){return"string"==typeof t},g={},v={},m="onfocusin"in window,b={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",t.event={add:s,remove:l},t.proxy=function(n,r){var i=2 in arguments&&h.call(arguments,2);if(p(n)){var o=function(){return n.apply(r,i?i.concat(h.call(arguments)):arguments)};return o._zid=e(n),o}if(y(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var E=function(){return!0},T=function(){return!1},A=/^([A-Z]|returnValue$|layer[XY]$)/,k={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,u,f=this;return e&&!y(e)?(t.each(e,function(t,e){f.on(t,n,r,e,o)}),f):(y(n)||p(i)||i===!1||(i=r,r=n,n=d),(i===d||r===!1)&&(i=r,r=d),i===!1&&(i=T),f.each(function(d,f){o&&(a=function(t){return l(f,t.type,i),i.apply(this,arguments)}),n&&(u=function(e){var r,o=t(e.target).closest(n,f).get(0);return o&&o!==f?(r=t.extend(c(e),{currentTarget:o,liveFired:f}),(a||i).apply(o,[r].concat(h.call(arguments,1)))):void 0}),s(f,e,i,r,n,u||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!y(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(y(n)||p(r)||r===!1||(r=n,n=d),r===!1&&(r=T),i.each(function(){l(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=y(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=c(y(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){return o=e.proxy(i),!i.isImmediatePropagationStopped()&&void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){y(t)||(e=t,t=e.type);var n=document.createEvent(v[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),u(n)}}(n),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){return t.global?e(n||m,r,i):void 0}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),l(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),l(e,r,i)}function l(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function u(){}function c(t){return t&&(t=t.split(";",2)[0]),t&&(t==A?"html":t==T?"json":_.test(t)?"script":E.test(t)&&"xml")||"text"}function d(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=d(e.url,e.data),e.data=void 0)}function h(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function p(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,l){o=t.type(l),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(l.name,l.value):"array"==o||!r&&"object"==o?p(e,l,r,n):e.add(n,l)})}var y,g,v=0,m=window.document,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,_=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,T="application/json",A="text/html",k=/^\s*$/,w=m.createElement("a");w.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,l=e.jsonpCallback,u=(t.isFunction(l)?l():l)||"jsonp"+ ++v,c=m.createElement("script"),d=window[u],f=function(e){t(c).triggerHandler("error",e||"abort")},h={abort:f};return n&&n.promise(h),t(c).on("load error",function(o,l){clearTimeout(i),t(c).off().remove(),"error"!=o.type&&r?a(r[0],h,e,n):s(null,l||"error",h,e,n),window[u]=d,r&&t.isFunction(d)&&d(r[0]),d=r=void 0}),o(h,e)===!1?(f("abort"),h):(window[u]=function(){r=arguments},c.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),m.head.appendChild(c),e.timeout>0&&(i=setTimeout(function(){f("timeout")},e.timeout)),h)},t.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:T,xml:"application/xml, text/xml",html:A,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i,l=t.extend({},e||{}),h=t.Deferred&&t.Deferred();for(y in t.ajaxSettings)void 0===l[y]&&(l[y]=t.ajaxSettings[y]);r(l),l.crossDomain||(n=m.createElement("a"),n.href=l.url,n.href=n.href,l.crossDomain=w.protocol+"//"+w.host!=n.protocol+"//"+n.host),l.url||(l.url=window.location.toString()),(i=l.url.indexOf("#"))>-1&&(l.url=l.url.slice(0,i)),f(l);var p=l.dataType,v=/\?.+=\?/.test(l.url);if(v&&(p="jsonp"),l.cache!==!1&&(e&&e.cache===!0||"script"!=p&&"jsonp"!=p)||(l.url=d(l.url,"_="+Date.now())),"jsonp"==p)return v||(l.url=d(l.url,l.jsonp?l.jsonp+"=?":l.jsonp===!1?"":"callback=?")),t.ajaxJSONP(l,h);var b,_=l.accepts[p],E={},T=function(t,e){E[t.toLowerCase()]=[t,e]},A=/^([\w-]+:)\/\//.test(l.url)?RegExp.$1:window.location.protocol,S=l.xhr(),L=S.setRequestHeader;if(h&&h.promise(S),l.crossDomain||T("X-Requested-With","XMLHttpRequest"),T("Accept",_||"*/*"),(_=l.mimeType||_)&&(_.indexOf(",")>-1&&(_=_.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(_)),(l.contentType||l.contentType!==!1&&l.data&&"GET"!=l.type.toUpperCase())&&T("Content-Type",l.contentType||"application/x-www-form-urlencoded"),l.headers)for(g in l.headers)T(g,l.headers[g]);if(S.setRequestHeader=T,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=u,clearTimeout(b);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==A){p=p||c(l.mimeType||S.getResponseHeader("content-type")),e=S.responseText;try{"script"==p?(0,eval)(e):"xml"==p?e=S.responseXML:"json"==p&&(e=k.test(e)?null:t.parseJSON(e))}catch(t){n=t}n?s(n,"parsererror",S,l,h):a(e,S,l,h)}else s(S.statusText||null,S.status?"error":"abort",S,l,h)}},o(S,l)===!1)return S.abort(),s(null,"abort",S,l,h),S;if(l.xhrFields)for(g in l.xhrFields)S[g]=l.xhrFields[g];var R=!("async"in l)||l.async;S.open(l.type,l.url,R,l.username,l.password);for(g in E)L.apply(S,E[g]);return l.timeout>0&&(b=setTimeout(function(){S.onreadystatechange=u,S.abort(),s(null,"timeout",S,l,h)},l.timeout)),S.send(l.data?l.data:null),S},t.get=function(){return t.ajax(h.apply(null,arguments))},t.post=function(){var e=h.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=h.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=h(e,n,r),l=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("<div>").html(e.replace(b,"")).find(i):e),l&&l.apply(o,arguments)},t.ajax(s),this};var S=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(S(e)+"="+S(n))},p(r,e,n),r.join("&").replace(/%20/g,"+")}}(n),function(t){t.Callbacks=function(e){e=t.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(n=e.memory&&t,r=!0,s=o||0,o=0,a=l.length,i=!0;l&&a>s;++s)if(l[s].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):n?l.length=0:d.disable())},d={add:function(){if(l){var r=l.length,s=function(n){t.each(n,function(t,n){"function"==typeof n?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!=typeof n&&s(n)})};s(arguments),i?a=l.length:n&&(o=r,c(n))}return this},remove:function(){return l&&t.each(arguments,function(e,n){for(var r;(r=t.inArray(n,l,r))>-1;)l.splice(r,1),i&&(a>=r&&--a,s>=r&&--s)}),this},has:function(e){return!(!l||!(e?t.inArray(e,l)>-1:l.length))},empty:function(){return a=l.length=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(t,e){return!l||r&&!u||(e=e||[],e=[t,e.slice?e.slice():e],i?u.push(e):c(e)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!r}};return d}}(n),function(t){function e(n){var r=[["resolve","done",t.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",t.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",t.Callbacks({memory:1})]],i="pending",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var n=arguments;return e(function(e){t.each(r,function(r,i){var s=t.isFunction(n[r])&&n[r];a[i[1]](function(){var n=s&&s.apply(this,arguments);if(n&&t.isFunction(n.promise))n.promise().done(e.resolve).fail(e.reject).progress(e.notify);else{var r=this===o?e.promise():this,a=s?[n]:arguments;e[i[0]+"With"](r,a)}})}),n=null}).promise()},promise:function(e){return null!=e?t.extend(e,o):o}},a={};return t.each(r,function(t,e){var n=e[2],s=e[3];o[e[1]]=n.add,s&&n.add(function(){i=s},r[1^t][2].disable,r[2][2].lock),a[e[0]]=function(){return a[e[0]+"With"](this===a?o:this,arguments),this},a[e[0]+"With"]=n.fireWith}),o.promise(a),n&&n.call(a,a),a}var n=Array.prototype.slice;t.when=function(r){var i,o,a,s=n.call(arguments),l=s.length,u=0,c=1!==l||r&&t.isFunction(r.promise)?l:0,d=1===c?r:e(),f=function(t,e,r){return function(o){e[t]=this,r[t]=arguments.length>1?n.call(arguments):o,r===i?d.notifyWith(e,r):--c||d.resolveWith(e,r)}};if(l>1)for(i=new Array(l),o=new Array(l),a=new Array(l);l>u;++u)s[u]&&t.isFunction(s[u].promise)?s[u].promise().done(f(u,a,s)).fail(d.reject).progress(f(u,o,i)):--c;return c||d.resolveWith(a,s),d.promise()},t.Deferred=e}(n),function(t){function e(t,e,n,r){return Math.abs(t-e)>=Math.abs(n-r)?t-e>0?"Left":"Right":n-r>0?"Up":"Down"}function n(){c=null,f.last&&(f.el.trigger("longTap"),f={})}function r(){c&&clearTimeout(c),c=null}function i(){s&&clearTimeout(s),l&&clearTimeout(l),u&&clearTimeout(u),c&&clearTimeout(c),s=l=u=c=null,f={}}function o(t){return("touch"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function a(t,e){return t.type=="pointer"+e||t.type.toLowerCase()=="mspointer"+e}var s,l,u,c,d,f={},h=750;t(document).ready(function(){var p,y,g,v,m=0,b=0;"MSGesture"in window&&(d=new MSGesture,d.target=document.body),t(document).bind("MSGestureEnd",function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&(f.el.trigger("swipe"),f.el.trigger("swipe"+e))}).on("touchstart MSPointerDown pointerdown",function(e){(!(v=a(e,"down"))||o(e))&&(g=v?e:e.touches[0],e.touches&&1===e.touches.length&&f.x2&&(f.x2=void 0,f.y2=void 0),p=Date.now(),y=p-(f.last||p),f.el=t("tagName"in g.target?g.target:g.target.parentNode),s&&clearTimeout(s),f.x1=g.pageX,f.y1=g.pageY,y>0&&250>=y&&(f.isDoubleTap=!0),f.last=p,c=setTimeout(n,h),d&&v&&d.addPointer(e.pointerId))}).on("touchmove MSPointerMove pointermove",function(t){(!(v=a(t,"move"))||o(t))&&(g=v?t:t.touches[0],r(),f.x2=g.pageX,f.y2=g.pageY,m+=Math.abs(f.x1-f.x2),b+=Math.abs(f.y1-f.y2))}).on("touchend MSPointerUp pointerup",function(n){(!(v=a(n,"up"))||o(n))&&(r(),f.x2&&Math.abs(f.x1-f.x2)>30||f.y2&&Math.abs(f.y1-f.y2)>30?u=setTimeout(function(){f.el.trigger("swipe"),f.el.trigger("swipe"+e(f.x1,f.x2,f.y1,f.y2)),f={}},0):"last"in f&&(30>m&&30>b?l=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=i,f.el.trigger(e),f.isDoubleTap?(f.el&&f.el.trigger("doubleTap"),f={}):s=setTimeout(function(){s=null,f.el&&f.el.trigger("singleTap"),f={}},250)},0):f={}),m=b=0)}).on("touchcancel MSPointerCancel pointercancel",i),t(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(n),function(t){function e(e){return e=t(e),!(!e.width()&&!e.height())&&"none"!==e.css("display")}function n(t,e){t=t.replace(/=#\]/g,'="#"]');var n,r,i=s.exec(t);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],t=i[1],r)){var o=Number(r);r=isNaN(o)?r.replace(/^["']|["']$/g,""):o}return e(t,n,r)}var r=t.zepto,i=r.qsa,o=r.matches,a=t.expr[":"]={visible:function(){return e(this)?this:void 0},hidden:function(){return e(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,r){return t(this).text().indexOf(r)>-1?this:void 0},has:function(t,e,n){return r.qsa(this,n).length?this:void 0}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),l=/^\s*>/,u="Zepto"+ +new Date;r.qsa=function(e,o){return n(o,function(n,a,s){try{var c;!n&&a?n="*":l.test(n)&&(c=t(e).addClass(u),n="."+u+" "+n);var d=i(e,n)}catch(t){throw console.error("error performing selector: %o",o),t}finally{c&&c.removeClass(u)}return a?r.uniq(t.map(d,function(t,e){return a.call(t,e,d,s)})):d})},r.matches=function(t,e){return n(e,function(e,n,r){return!(e&&!o(t,e)||n&&n.call(t,null,r)!==t)})}}(n),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e){try{return t(e)}catch(t){return null}}}}(),t.exports=n},function(t,e){"use strict";var n={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},r=/(.)^/,i={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\r|\n|\t|\u2028|\u2029/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},s=new RegExp("[&<>\"']","g"),l=function(t){return null===t?"":(""+t).replace(s,function(t){return a[t]})},u=0,c=function(t,e){var a,s=new RegExp([(n.escape||r).source,(n.interpolate||r).source,(n.evaluate||r).source].join("|")+"|$","g"),c=0,d="__p+='";t.replace(s,function(e,n,r,a,s){return d+=t.slice(c,s).replace(o,function(t){return"\\"+i[t]}),n&&(d+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(d+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),a&&(d+="';\n"+a+"\n__p+='"),c=s+e.length,e}),d+="';\n",n.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+d+"return __p;\n//# sourceURL=/microtemplates/source["+u++ +"]";try{a=new Function(n.variable||"obj","escapeExpr",d)}catch(t){throw t.source=d,t}if(e)return a(e,l);var f=function(t){return a.call(this,t,l)};return f.source="function("+(n.variable||"obj")+"){\n"+d+"}",f};c.settings=n,t.exports=c},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},r=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(t){return!1}},i=function(){try{var t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return!!t}catch(t){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}},o=function(){var t=navigator.userAgent,e=t.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],n=void 0;return/trident/i.test(e[1])?(n=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:parseInt(n[1]||"")}):"Chrome"===e[1]&&(n=t.match(/\bOPR\/(\d+)/),null!=n)?{name:"Opera",version:parseInt(n[1])}:(e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],(n=t.match(/version\/(\d+)/i))&&e.splice(1,1,n[1]),{name:e[0],version:parseInt(e[1])})},a=o();n.isSafari=/safari/i.test(navigator.userAgent)&&navigator.userAgent.indexOf("Chrome")===-1,n.isChrome=/chrome/i.test(navigator.userAgent),n.isFirefox=/firefox/i.test(navigator.userAgent),n.isLegacyIE=!!window.ActiveXObject,n.isIE=n.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),n.isIE11=/trident.*rv:11/i.test(navigator.userAgent),n.isChromecast=n.isChrome&&/CrKey/i.test(navigator.userAgent),n.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Opera Mini/i.test(navigator.userAgent),n.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),n.isAndroid=/Android/i.test(navigator.userAgent),n.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),n.isWin8App=/MSAppHost/i.test(navigator.userAgent),n.isWiiU=/WiiU/i.test(navigator.userAgent),n.isPS4=/PlayStation 4/i.test(navigator.userAgent),n.hasLocalstorage=r(),n.hasFlash=i(),n.name=a.name,n.version=a.version,e.default=n,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(1),c=r(u),d=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,t.call(this,n));return r._options=n,r.uniqueId=(0,l.uniqueId)("o"),r}return a(e,t),s(e,[{key:"options",get:function(){return this._options}}]),e}(c.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(5),c=r(u),d=n(102),f=r(d),h=n(9),p=r(h),y=/^(\S+)\s*(.*)$/,g=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.cid=(0,l.uniqueId)("c"),r._ensureElement(),r.delegateEvents(),r}return a(e,t),s(e,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}}]),e.prototype.$=function(t){return this.$el.find(t)},e.prototype.render=function(){return this},e.prototype.remove=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},e.prototype.setElement=function(t,e){return this.$el&&this.undelegateEvents(),this.$el=t instanceof c.default?t:(0,c.default)(t),this.el=this.$el[0],e!==!1&&this.delegateEvents(),this},e.prototype.delegateEvents=function(t){if(!t&&!(t=(0,f.default)(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(n&&n.constructor!==Function&&(n=this[t[e]]),n){var r=e.match(y),i=r[1],o=r[2];i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n.bind(this)):this.$el.on(i,o,n.bind(this))}}return this},e.prototype.undelegateEvents=function(){return this.$el.off(".delegateEvents"+this.cid),this},e.prototype._ensureElement=function(){if(this.el)this.setElement((0,f.default)(this,"el"),!1);else{var t=c.default.extend({},(0,f.default)(this,"attributes"));this.id&&(t.id=(0,f.default)(this,"id")),this.className&&(t.class=(0,f.default)(this,"className"));var e=(0,c.default)("<"+(0,f.default)(this,"tagName")+">").attr(t);this.setElement(e,!1)}},e}(p.default);e.default=g,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),a=r(o),s=new a.default,l=function t(){i(this,t)};e.default=l,l.on=function(t,e,n){s.on(t,e,n)},l.once=function(t,e,n){s.once(t,e,n)},l.off=function(t,e,n){s.off(t,e,n)},l.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];s.trigger.apply(s,[t].concat(n))},l.stopListening=function(t,e,n){s.stopListening(t,e,n)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(9),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.bindEvents=function(){},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.getExternalInterface=function(){return{}},e.prototype.destroy=function(){this.stopListening()},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="core",t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(9),l=r(s),u=n(2),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.stopListening()},e}(l.default);e.default=c,c.extend=function(t){return(0,u.extend)(c,t)},c.type="container",t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(10),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return a(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.remove()},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="container",t.exports=e.default},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function t(){n(this,t),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};r._players={},r.getInstance=function(t){return r._players[t]||(r._players[t]=new r)},e.default=r,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(53)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(2),l=n(10),u=r(l),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r.render(),r}return a(e,t),e.prototype.bindEvents=function(){},e.prototype.getExternalInterface=function(){return{}},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.destroy=function(){this.remove()},e.prototype.render=function(){return this},e}(u.default);e.default=c,c.extend=function(t){return(0,s.extend)(c,t)},c.type="core",t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=n(47),t.exports=e.default},function(t,e,n){"use strict";t.exports=n(65)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(77),o=r(i);e.default={Kibo:o.default},t.exports=e.default},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){y&&h&&(y=!1,h.length?p=h.concat(p):g=-1,p.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var e=p.length;e;){for(h=p,p=[];++g<e;)h&&h[g].run();g=-1,e=p.length}h=null,y=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,d,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(t){d=r}}();var h,p=[],y=!1,g=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new l(t,e)),1!==p.length||y||i(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports=n(38)},function(t,e,n){"use strict";t.exports=n(41)},function(t,e,n){"use strict";t.exports=n(44)},function(t,e,n){"use strict";t.exports=n(45)},function(t,e,n){"use strict";t.exports=n(48)},function(t,e,n){"use strict";t.exports=n(49)},function(t,e,n){"use strict";t.exports=n(51)},function(t,e,n){"use strict";t.exports=n(52)},function(t,e,n){"use strict";t.exports=n(54)},function(t,e,n){"use strict";t.exports=n(55)},function(t,e,n){"use strict";t.exports=n(66)},function(t,e,n){(function(t,n){function r(t,e){return t.set(e[0],e[1]),t}function i(t,e){return t.add(e),t}function o(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function a(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function s(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function l(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function u(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function c(t){return function(e){return t(e)}}function d(t,e){return null==t?void 0:t[e]}function f(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"");
+}catch(t){}return e}function h(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function p(t,e){return function(n){return t(e(n))}}function y(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function g(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function v(){this.__data__=on?on(null):{}}function m(t){return this.has(t)&&delete this.__data__[t]}function b(t){var e=this.__data__;if(on){var n=e[t];return n===Yt?void 0:n}return Be.call(e,t)?e[t]:void 0}function _(t){var e=this.__data__;return on?void 0!==e[t]:Be.call(e,t)}function E(t,e){var n=this.__data__;return n[t]=on&&void 0===e?Yt:e,this}function T(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function A(){this.__data__=[]}function k(t){var e=this.__data__,n=V(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():We.call(e,n,1),!0}function w(t){var e=this.__data__,n=V(e,t);return n<0?void 0:e[n][1]}function S(t){return V(this.__data__,t)>-1}function L(t,e){var n=this.__data__,r=V(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function R(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function O(){this.__data__={hash:new g,map:new(tn||T),string:new g}}function C(t){return yt(this,t).delete(t)}function P(t){return yt(this,t).get(t)}function D(t){return yt(this,t).has(t)}function I(t,e){return yt(this,t).set(t,e),this}function x(t){this.__data__=new T(t)}function N(){this.__data__=new T}function M(t){return this.__data__.delete(t)}function F(t){return this.__data__.get(t)}function B(t){return this.__data__.has(t)}function U(t,e){var n=this.__data__;if(n instanceof T){var r=n.__data__;if(!tn||r.length<Gt-1)return r.push([t,e]),this;n=this.__data__=new R(r)}return n.set(t,e),this}function j(t,e){var n=yn(t)||Rt(t)?u(t.length,String):[],r=n.length,i=!!r;for(var o in t)!e&&!Be.call(t,o)||i&&("length"==o||_t(o,r))||n.push(o);return n}function G(t,e,n){(void 0===n||Lt(t[e],n))&&("number"!=typeof e||void 0!==n||e in t)||(t[e]=n)}function Y(t,e,n){var r=t[e];Be.call(t,e)&&Lt(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function V(t,e){for(var n=t.length;n--;)if(Lt(t[n][0],e))return n;return-1}function K(t,e){return t&&dt(e,Ft(e),t)}function $(t,e,n,r,i,o,s){var l;if(r&&(l=o?r(t,i,o,s):r(t)),void 0!==l)return l;if(!It(t))return t;var u=yn(t);if(u){if(l=vt(t),!e)return ct(t,l)}else{var c=pn(t),d=c==qt||c==Xt;if(gn(t))return nt(t,e);if(c==Qt||c==Kt||d&&!o){if(f(t))return o?t:{};if(l=mt(d?{}:t),!e)return ft(t,K(l,t))}else{if(!Te[c])return o?t:{};l=bt(t,c,$,e)}}s||(s=new x);var h=s.get(t);if(h)return h;if(s.set(t,l),!u)var p=n?pt(t):Ft(t);return a(p||t,function(i,o){p&&(o=i,i=t[o]),Y(l,o,$(i,e,n,r,o,t,s))}),l}function H(t){return It(t)?He(t):{}}function z(t,e,n){var r=e(t);return yn(t)?r:s(r,n(t))}function W(t){return je.call(t)}function q(t){if(!It(t)||At(t))return!1;var e=Pt(t)||f(t)?Ge:be;return e.test(St(t))}function X(t){return xt(t)&&Dt(t.length)&&!!Ee[je.call(t)]}function Z(t){if(!kt(t))return Ze(t);var e=[];for(var n in Object(t))Be.call(t,n)&&"constructor"!=n&&e.push(n);return e}function J(t){if(!It(t))return wt(t);var e=kt(t),n=[];for(var r in t)("constructor"!=r||!e&&Be.call(t,r))&&n.push(r);return n}function Q(t,e,n,r,i){if(t!==e){if(!yn(e)&&!vn(e))var o=J(e);a(o||e,function(a,s){if(o&&(s=a,a=e[s]),It(a))i||(i=new x),tt(t,e,s,n,Q,r,i);else{var l=r?r(t[s],a,s+"",t,e,i):void 0;void 0===l&&(l=a),G(t,s,l)}})}}function tt(t,e,n,r,i,o,a){var s=t[n],l=e[n],u=a.get(l);if(u)return void G(t,n,u);var c=o?o(s,l,n+"",t,e,a):void 0,d=void 0===c;d&&(c=l,yn(l)||vn(l)?yn(s)?c=s:Ct(s)?c=ct(s):(d=!1,c=$(l,!0)):Nt(l)||Rt(l)?Rt(s)?c=Mt(s):!It(s)||r&&Pt(s)?(d=!1,c=$(l,!0)):c=s:d=!1),d&&(a.set(l,c),i(c,l,r,o,a),a.delete(l)),G(t,n,c)}function et(t,e){return e=Je(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,i=Je(n.length-e,0),a=Array(i);++r<i;)a[r]=n[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=n[r];return s[e]=a,o(t,this,s)}}function nt(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function rt(t){var e=new t.constructor(t.byteLength);return new Ke(e).set(new Ke(t)),e}function it(t,e){var n=e?rt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function ot(t,e,n){var i=e?n(h(t),!0):h(t);return l(i,r,new t.constructor)}function at(t){var e=new t.constructor(t.source,me.exec(t));return e.lastIndex=t.lastIndex,e}function st(t,e,n){var r=e?n(y(t),!0):y(t);return l(r,i,new t.constructor)}function lt(t){return fn?Object(fn.call(t)):{}}function ut(t,e){var n=e?rt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ct(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function dt(t,e,n,r){n||(n={});for(var i=-1,o=e.length;++i<o;){var a=e[i],s=r?r(n[a],t[a],a,n,t):void 0;Y(n,a,void 0===s?t[a]:s)}return n}function ft(t,e){return dt(t,hn(t),e)}function ht(t){return et(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Et(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,o)}return e})}function pt(t){return z(t,Ft,hn)}function yt(t,e){var n=t.__data__;return Tt(e)?n["string"==typeof e?"string":"hash"]:n.map}function gt(t,e){var n=d(t,e);return q(n)?n:void 0}function vt(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Be.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function mt(t){return"function"!=typeof t.constructor||kt(t)?{}:H($e(t))}function bt(t,e,n,r){var i=t.constructor;switch(e){case ae:return rt(t);case Ht:case zt:return new i(+t);case se:return it(t,r);case le:case ue:case ce:case de:case fe:case he:case pe:case ye:case ge:return ut(t,r);case Zt:return ot(t,r,n);case Jt:case re:return new i(t);case ee:return at(t);case ne:return st(t,r,n);case ie:return lt(t)}}function _t(t,e){return e=null==e?Vt:e,!!e&&("number"==typeof t||_e.test(t))&&t>-1&&t%1==0&&t<e}function Et(t,e,n){if(!It(n))return!1;var r=typeof e;return!!("number"==r?Ot(n)&&_t(e,n.length):"string"==r&&e in n)&&Lt(n[e],t)}function Tt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function At(t){return!!Me&&Me in t}function kt(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||xe;return t===n}function wt(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}function St(t){if(null!=t){try{return Fe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Lt(t,e){return t===e||t!==t&&e!==e}function Rt(t){return Ct(t)&&Be.call(t,"callee")&&(!ze.call(t,"callee")||je.call(t)==Kt)}function Ot(t){return null!=t&&Dt(t.length)&&!Pt(t)}function Ct(t){return xt(t)&&Ot(t)}function Pt(t){var e=It(t)?je.call(t):"";return e==qt||e==Xt}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Vt}function It(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function xt(t){return!!t&&"object"==typeof t}function Nt(t){if(!xt(t)||je.call(t)!=Qt||f(t))return!1;var e=$e(t);if(null===e)return!0;var n=Be.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Fe.call(n)==Ue}function Mt(t){return dt(t,Bt(t))}function Ft(t){return Ot(t)?j(t):Z(t)}function Bt(t){return Ot(t)?j(t,!0):J(t)}function Ut(){return[]}function jt(){return!1}var Gt=200,Yt="__lodash_hash_undefined__",Vt=9007199254740991,Kt="[object Arguments]",$t="[object Array]",Ht="[object Boolean]",zt="[object Date]",Wt="[object Error]",qt="[object Function]",Xt="[object GeneratorFunction]",Zt="[object Map]",Jt="[object Number]",Qt="[object Object]",te="[object Promise]",ee="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object WeakMap]",ae="[object ArrayBuffer]",se="[object DataView]",le="[object Float32Array]",ue="[object Float64Array]",ce="[object Int8Array]",de="[object Int16Array]",fe="[object Int32Array]",he="[object Uint8Array]",pe="[object Uint8ClampedArray]",ye="[object Uint16Array]",ge="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,me=/\w*$/,be=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,Ee={};Ee[le]=Ee[ue]=Ee[ce]=Ee[de]=Ee[fe]=Ee[he]=Ee[pe]=Ee[ye]=Ee[ge]=!0,Ee[Kt]=Ee[$t]=Ee[ae]=Ee[Ht]=Ee[se]=Ee[zt]=Ee[Wt]=Ee[qt]=Ee[Zt]=Ee[Jt]=Ee[Qt]=Ee[ee]=Ee[ne]=Ee[re]=Ee[oe]=!1;var Te={};Te[Kt]=Te[$t]=Te[ae]=Te[se]=Te[Ht]=Te[zt]=Te[le]=Te[ue]=Te[ce]=Te[de]=Te[fe]=Te[Zt]=Te[Jt]=Te[Qt]=Te[ee]=Te[ne]=Te[re]=Te[ie]=Te[he]=Te[pe]=Te[ye]=Te[ge]=!0,Te[Wt]=Te[qt]=Te[oe]=!1;var Ae="object"==typeof t&&t&&t.Object===Object&&t,ke="object"==typeof self&&self&&self.Object===Object&&self,we=Ae||ke||Function("return this")(),Se="object"==typeof e&&e&&!e.nodeType&&e,Le=Se&&"object"==typeof n&&n&&!n.nodeType&&n,Re=Le&&Le.exports===Se,Oe=Re&&Ae.process,Ce=function(){try{return Oe&&Oe.binding("util")}catch(t){}}(),Pe=Ce&&Ce.isTypedArray,De=Array.prototype,Ie=Function.prototype,xe=Object.prototype,Ne=we["__core-js_shared__"],Me=function(){var t=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Fe=Ie.toString,Be=xe.hasOwnProperty,Ue=Fe.call(Object),je=xe.toString,Ge=RegExp("^"+Fe.call(Be).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Re?we.Buffer:void 0,Ve=we.Symbol,Ke=we.Uint8Array,$e=p(Object.getPrototypeOf,Object),He=Object.create,ze=xe.propertyIsEnumerable,We=De.splice,qe=Object.getOwnPropertySymbols,Xe=Ye?Ye.isBuffer:void 0,Ze=p(Object.keys,Object),Je=Math.max,Qe=gt(we,"DataView"),tn=gt(we,"Map"),en=gt(we,"Promise"),nn=gt(we,"Set"),rn=gt(we,"WeakMap"),on=gt(Object,"create"),an=St(Qe),sn=St(tn),ln=St(en),un=St(nn),cn=St(rn),dn=Ve?Ve.prototype:void 0,fn=dn?dn.valueOf:void 0;g.prototype.clear=v,g.prototype.delete=m,g.prototype.get=b,g.prototype.has=_,g.prototype.set=E,T.prototype.clear=A,T.prototype.delete=k,T.prototype.get=w,T.prototype.has=S,T.prototype.set=L,R.prototype.clear=O,R.prototype.delete=C,R.prototype.get=P,R.prototype.has=D,R.prototype.set=I,x.prototype.clear=N,x.prototype.delete=M,x.prototype.get=F,x.prototype.has=B,x.prototype.set=U;var hn=qe?p(qe,Object):Ut,pn=W;(Qe&&pn(new Qe(new ArrayBuffer(1)))!=se||tn&&pn(new tn)!=Zt||en&&pn(en.resolve())!=te||nn&&pn(new nn)!=ne||rn&&pn(new rn)!=oe)&&(pn=function(t){var e=je.call(t),n=e==Qt?t.constructor:void 0,r=n?St(n):void 0;if(r)switch(r){case an:return se;case sn:return Zt;case ln:return te;case un:return ne;case cn:return oe}return e});var yn=Array.isArray,gn=Xe||jt,vn=Pe?c(Pe):X,mn=ht(function(t,e,n){Q(t,e,n)});n.exports=mn}).call(e,function(){return this}(),n(23)(t))},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"></path></svg>'},function(t,e,n){t.exports=n.p+"a8c874b93b3d848f39a71260c57e3863.cur"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(1),u=r(l),c=n(10),d=r(c),f=n(4),h=r(f),p=n(78),y=r(p),g=n(5),v=r(g),m=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this,n));return a._i18n=r,a.currentTime=0,a.volume=100,a.playback=n.playback,a.settings=v.default.extend({},a.playback.settings),a.isReady=!1,a.mediaControlDisabled=!1,a.plugins=[a.playback],a.bindEvents(),a}return a(e,t),s(e,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",doubleTap:"dblClicked",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}}]),e.prototype.bindEvents=function(){this.listenTo(this.playback,u.default.PLAYBACK_PROGRESS,this.progress),this.listenTo(this.playback,u.default.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,u.default.PLAYBACK_READY,this.ready),this.listenTo(this.playback,u.default.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,u.default.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,u.default.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,u.default.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,u.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,u.default.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,u.default.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,u.default.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,u.default.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,u.default.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,u.default.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,u.default.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,u.default.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,u.default.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,u.default.PLAYBACK_ERROR,this.error)},e.prototype.playbackStateChanged=function(t){this.trigger(u.default.CONTAINER_PLAYBACKSTATE,t)},e.prototype.playbackDvrStateChanged=function(t){this.settings=this.playback.settings,this.dvrInUse=t,this.trigger(u.default.CONTAINER_PLAYBACKDVRSTATECHANGED,t)},e.prototype.updateBitrate=function(t){this.trigger(u.default.CONTAINER_BITRATE,t)},e.prototype.statsReport=function(t){this.trigger(u.default.CONTAINER_STATS_REPORT,t)},e.prototype.getPlaybackType=function(){return this.playback.getPlaybackType()},e.prototype.isDvrEnabled=function(){return!!this.playback.dvrEnabled},e.prototype.isDvrInUse=function(){return!!this.dvrInUse},e.prototype.destroy=function(){this.trigger(u.default.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove()},e.prototype.setStyle=function(t){this.$el.css(t)},e.prototype.animate=function(t,e){return this.$el.animate(t,e).promise()},e.prototype.ready=function(){this.isReady=!0,this.trigger(u.default.CONTAINER_READY,this.name)},e.prototype.isPlaying=function(){return this.playback.isPlaying()},e.prototype.getStartTimeOffset=function(){return this.playback.getStartTimeOffset()},e.prototype.getCurrentTime=function(){return this.currentTime},e.prototype.getDuration=function(){return this.playback.getDuration()},e.prototype.error=function(t){this.isReady||this.ready(),this.trigger(u.default.CONTAINER_ERROR,{error:t,container:this},this.name)},e.prototype.loadedMetadata=function(t){this.trigger(u.default.CONTAINER_LOADEDMETADATA,t)},e.prototype.timeUpdated=function(t){this.currentTime=t.current,this.trigger(u.default.CONTAINER_TIMEUPDATE,t,this.name)},e.prototype.progress=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];this.trigger.apply(this,[u.default.CONTAINER_PROGRESS].concat(e,[this.name]))},e.prototype.playing=function(){this.trigger(u.default.CONTAINER_PLAY,this.name)},e.prototype.paused=function(){this.trigger(u.default.CONTAINER_PAUSE,this.name)},e.prototype.play=function(){this.playback.play()},e.prototype.stop=function(){this.playback.stop(),this.currentTime=0},e.prototype.pause=function(){this.playback.pause()},e.prototype.onEnded=function(){this.trigger(u.default.CONTAINER_ENDED,this,this.name),this.currentTime=0},e.prototype.stopped=function(){this.trigger(u.default.CONTAINER_STOP)},e.prototype.clicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_CLICK,this,this.name)},e.prototype.dblClicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_DBLCLICK,this,this.name)},e.prototype.onContextMenu=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_CONTEXTMENU,this,this.name)},e.prototype.seek=function(t){this.trigger(u.default.CONTAINER_SEEK,t,this.name),this.playback.seek(t)},e.prototype.seekPercentage=function(t){var e=this.getDuration();if(t>=0&&t<=100){var n=e*(t/100);this.seek(n)}},e.prototype.setVolume=function(t){this.volume=parseInt(t,10),this.trigger(u.default.CONTAINER_VOLUME,t,this.name),this.playback.volume(t)},e.prototype.fullscreen=function(){this.trigger(u.default.CONTAINER_FULLSCREEN,this.name)},e.prototype.onBuffering=function(){this.trigger(u.default.CONTAINER_STATE_BUFFERING,this.name)},e.prototype.bufferfull=function(){this.trigger(u.default.CONTAINER_STATE_BUFFERFULL,this.name)},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.mouseEnter=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_MOUSE_ENTER)},e.prototype.mouseLeave=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(u.default.CONTAINER_MOUSE_LEAVE)},e.prototype.settingsUpdate=function(){this.settings=this.playback.settings,this.trigger(u.default.CONTAINER_SETTINGSUPDATE)},e.prototype.highDefinitionUpdate=function(t){this.trigger(u.default.CONTAINER_HIGHDEFINITIONUPDATE,t)},e.prototype.isHighDefinitionInUse=function(){return this.playback.isHighDefinitionInUse()},e.prototype.disableMediaControl=function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(u.default.CONTAINER_MEDIACONTROL_DISABLE))},e.prototype.enableMediaControl=function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(u.default.CONTAINER_MEDIACONTROL_ENABLE))},e.prototype.updateStyle=function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")},e.prototype.configure=function(t){this._options=v.default.extend(this._options,t),this.updateStyle(),this.trigger(u.default.CONTAINER_OPTIONS_CHANGE)},e.prototype.render=function(){var t=h.default.getStyleFor(y.default);return this.$el.append(t),this.$el.append(this.playback.render().el),this.updateStyle(),this},e}(d.default);e.default=m,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(9),u=r(l),c=n(1),d=r(c),f=n(24),h=r(f),p=n(5),y=r(p),g=n(100),v=r(g),m=function(t){function e(n,r,a){i(this,e);var s=o(this,t.call(this,n));return s._i18n=a,s.loader=r,s}return a(e,t),s(e,[{key:"options",get:function(){return this._options},set:function(t){this._options=t}}]),e.prototype.createContainers=function(){var t=this;return y.default.Deferred(function(e){e.resolve(t.options.sources.map(function(e){return t.createContainer(e)}))})},e.prototype.findPlaybackPlugin=function(t,e){return this.loader.playbackPlugins.filter(function(n){return n.canPlay(t,e)})[0]},e.prototype.createContainer=function(t){var e=null,n=this.options.mimeType;(0,v.default)(t)?(e=t.source.toString(),t.mimeType&&(n=t.mimeType)):e=t.toString(),e.match(/^\/\//)&&(e=window.location.protocol+e);var r=y.default.extend({},this.options,{src:e,mimeType:n}),i=this.findPlaybackPlugin(e,n),o=new i(r,this._i18n);r=y.default.extend({},r,{playback:o});var a=new h.default(r,this._i18n),s=y.default.Deferred();return s.promise(a),this.addContainerPlugins(a),this.listenToOnce(a,d.default.CONTAINER_READY,function(){return s.resolve(a)}),a},e.prototype.addContainerPlugins=function(t){this.loader.containerPlugins.forEach(function(e){t.addPlugin(new e(t))})},e}(u.default);e.default=m,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(39)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(1),c=r(u),d=n(4),f=r(d),h=n(10),p=r(h),y=n(8),g=r(y),v=n(40),m=r(v),b=n(27),_=r(b),E=n(11),T=r(E),A=n(15),k=r(A),w=n(5),S=r(w),L=n(79),R=r(L),O=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.playerInfo=k.default.getInstance(n.playerId),r.firstResize=!0,r.plugins=[],r.containers=[],r.setupMediaControl(null),r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},(0,S.default)(document).bind("fullscreenchange",r._boundFullscreenHandler),(0,S.default)(document).bind("MSFullscreenChange",r._boundFullscreenHandler),(0,S.default)(document).bind("mozfullscreenchange",r._boundFullscreenHandler),r}return a(e,t),s(e,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"showMediaControl",mouseleave:"hideMediaControl"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(t){return t}}}}]),e.prototype.createContainers=function(t){var e=this;this.defer=S.default.Deferred(),this.defer.promise(this),this.containerFactory=new m.default(t,t.loader,this.i18n),this.containerFactory.createContainers().then(function(t){return e.setupContainers(t)}).then(function(t){return e.resolveOnContainersReady(t)})},e.prototype.updateSize=function(){l.Fullscreen.isFullscreen()?this.setFullscreen():this.setPlayerSize()},e.prototype.setFullscreen=function(){g.default.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.playerInfo.currentSize={width:(0,S.default)(window).width(),height:(0,S.default)(window).height()})},e.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,S.default)(window).width(),height:(0,S.default)(window).height()},this.resize(this.playerInfo.currentSize)},e.prototype.resize=function(t){(0,l.isNumber)(t.height)||(0,l.isNumber)(t.width)?(this.el.style.height=t.height+"px",this.el.style.width=t.width+"px"):(this.el.style.height=""+t.height,this.el.style.width=""+t.width),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.options.width=t.width,this.options.height=t.height,this.playerInfo.currentSize=t,this.triggerResize(this.playerInfo.currentSize)},e.prototype.enableResizeObserver=function(){var t=this,e=function(){t.playerInfo.computedSize.width==t.el.clientWidth&&t.playerInfo.computedSize.height==t.el.clientHeight||(t.playerInfo.computedSize={width:t.el.clientWidth,height:t.el.clientHeight},t.triggerResize(t.playerInfo.computedSize))};this.resizeObserverInterval=setInterval(e,500)},e.prototype.triggerResize=function(t){var e=this.firstResize||this.oldHeight!==t.height||this.oldWidth!==t.width;e&&(T.default.trigger(this.options.playerId+":"+c.default.PLAYER_RESIZE,t),this.oldHeight=t.height,this.oldWidth=t.width,this.firstResize=!1)},e.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},e.prototype.resolveOnContainersReady=function(t){var e=this;S.default.when.apply(S.default,t).done(function(){e.defer.resolve(e),e.ready=!0,e.trigger(c.default.CORE_READY)})},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.load=function(t,e){var n=this;this.options.mimeType=e,t=t&&t.constructor===Array?t:[t],this.containers.forEach(function(t){return t.destroy()}),this.mediaControl.container=null,this.containerFactory.options=S.default.extend(this.options,{sources:t}),this.containerFactory.createContainers().then(function(t){n.setupContainers(t)})},e.prototype.destroy=function(){this.disableResizeObserver(),this.containers.forEach(function(t){return t.destroy()}),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove(),this.mediaControl.destroy(),(0,S.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,S.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,S.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler)},e.prototype.handleFullscreenChange=function(){this.trigger(c.default.CORE_FULLSCREEN,l.Fullscreen.isFullscreen()),this.updateSize(),this.mediaControl.show()},e.prototype.setMediaControlContainer=function(t){this.mediaControl.setContainer(t),this.mediaControl.render()},e.prototype.disableMediaControl=function(){this.mediaControl.disable(),this.$el.removeClass("nocursor")},e.prototype.enableMediaControl=function(){this.mediaControl.enable()},e.prototype.removeContainer=function(t){this.stopListening(t),this.containers=this.containers.filter(function(e){return e!==t})},e.prototype.appendContainer=function(t){this.listenTo(t,c.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(t)},e.prototype.setupContainers=function(t){return t.map(this.appendContainer.bind(this)),this.trigger(c.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.setupMediaControl(this.getCurrentContainer()),this.render(),this.$el.appendTo(this.options.parentElement),this.containers},e.prototype.renderContainers=function(){var t=this;this.containers.map(function(e){return t.el.appendChild(e.render().el)})},e.prototype.createContainer=function(t,e){var n=this.containerFactory.createContainer(t,e);return this.appendContainer(n),this.el.appendChild(n.render().el),n},e.prototype.setupMediaControl=function(t){this.mediaControl?this.mediaControl.setContainer(t):(this.mediaControl=this.createMediaControl(S.default.extend({container:t,focusElement:this.el},this.options)),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_FULLSCREEN,this.toggleFullscreen),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_SHOW,this.onMediaControlShow.bind(this,!0)),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_HIDE,this.onMediaControlShow.bind(this,!1)))},e.prototype.createMediaControl=function(t){return t.mediacontrol&&t.mediacontrol.external?new t.mediacontrol.external(t).render():new _.default(t).render()},e.prototype.getCurrentContainer=function(){return this.mediaControl&&this.mediaControl.container?this.mediaControl.container:this.containers[0]},e.prototype.getCurrentPlayback=function(){var t=this.getCurrentContainer();return t&&t.playback},e.prototype.getPlaybackType=function(){var t=this.getCurrentContainer();return t&&t.getPlaybackType()},e.prototype.toggleFullscreen=function(){l.Fullscreen.isFullscreen()?(l.Fullscreen.cancelFullscreen(),g.default.isiOS||this.$el.removeClass("fullscreen nocursor")):(l.Fullscreen.requestFullscreen(this.el),g.default.isiOS||this.$el.addClass("fullscreen")),this.mediaControl.show()},e.prototype.showMediaControl=function(t){this.mediaControl.show(t)},e.prototype.hideMediaControl=function(){this.mediaControl.hide(this.options.hideMediaControlDelay)},e.prototype.onMediaControlShow=function(t){this.getCurrentContainer().trigger(t?c.default.CONTAINER_MEDIACONTROL_SHOW:c.default.CONTAINER_MEDIACONTROL_HIDE),t?this.$el.removeClass("nocursor"):l.Fullscreen.isFullscreen()&&this.$el.addClass("nocursor")},e.prototype.configure=function(t){var e=this;this._options=S.default.extend(this._options,t);var n=t.source||t.sources;n?this.load(n,t.mimeType||this.options.mimeType):(this.trigger(c.default.CORE_OPTIONS_CHANGE),this.containers.forEach(function(t){t.configure(e.options)}))},e.prototype.render=function(){var t=f.default.getStyleFor(R.default,{baseUrl:this.options.baseUrl});this.$el.append(t),this.$el.append(this.mediaControl.render().el),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=e,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},e}(p.default);e.default=O,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(9),u=r(l),c=n(25),d=r(c),f=function(t){function e(n){i(this,e);var r=o(this,t.call(this));return r.player=n,r._options=n.options,r}return a(e,t),s(e,[{key:"loader",get:function(){return this.player.loader}}]),e.prototype.create=function(){return this.options.loader=this.loader,this.core=new d.default(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core},e.prototype.addCorePlugins=function(){
+var t=this;return this.loader.corePlugins.forEach(function(e){var n=new e(t.core);t.core.addPlugin(n),t.setupExternalInterface(n)}),this.core},e.prototype.setupExternalInterface=function(t){var e=t.getExternalInterface();for(var n in e)this.player[n]=e[n].bind(t)},e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(9),l=r(s),u=n(15),c=r(u),d=n(103),f=r(d),h=n(16),p=r(h),y=n(28),g=r(y),v=n(31),m=r(v),b=n(29),_=r(b),E=n(30),T=r(E),A=n(32),k=r(A),w=n(33),S=r(w),L=n(70),R=r(L),O=n(72),C=r(O),P=n(75),D=r(P),I=n(34),x=r(I),N=n(64),M=r(N),F=n(57),B=r(F),U=n(59),j=r(U),G=n(62),Y=r(G),V=n(67),K=r(V),$=n(69),H=r($),z=n(60),W=r(z),q=n(74),X=r(q),Z=function(t){function e(n,r){i(this,e);var a=o(this,t.call(this));return a.playerId=r,a.playbackPlugins=[T.default,p.default,m.default,g.default,_.default,k.default,S.default],a.containerPlugins=[R.default,D.default,x.default,C.default,M.default,B.default],a.corePlugins=[j.default,Y.default,K.default,H.default,W.default,X.default],n&&(Array.isArray(n)||a.validateExternalPluginsType(n),a.addExternalPlugins(n)),a}return a(e,t),e.prototype.groupPluginsByType=function(t){return Array.isArray(t)&&(t=t.reduce(function(t,e){return t[e.type]||(t[e.type]=[]),t[e.type].push(e),t},{})),t},e.prototype.addExternalPlugins=function(t){t=this.groupPluginsByType(t);var e=function(t){return t.prototype.name};t.playback&&(this.playbackPlugins=(0,f.default)(t.playback.concat(this.playbackPlugins),e)),t.container&&(this.containerPlugins=(0,f.default)(t.container.concat(this.containerPlugins),e)),t.core&&(this.corePlugins=(0,f.default)(t.core.concat(this.corePlugins),e)),c.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},e.prototype.validateExternalPluginsType=function(t){var e=["playback","container","core"];e.forEach(function(e){(t[e]||[]).forEach(function(t){var n="external "+t.type+" plugin on "+e+" array";if(t.type!==e)throw new ReferenceError(n)})})},e}(l.default);e.default=Z,t.exports=e.default},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(2),c=n(20),d=n(1),f=i(d),h=n(4),p=i(h),y=n(10),g=i(y),v=n(8),m=i(v),b=n(11),_=i(b),E=n(6),T=i(E),A=n(3),k=i(A),w=n(5),S=i(w),L=n(35),R=i(L),O=n(80),C=i(O),P=n(91),D=i(P),I=n(22),x=i(I),N=n(36),M=i(N),F=n(104),B=i(F),U=n(105),j=i(U),G=n(106),Y=i(G),V=n(107),K=i(V),$=n(108),H=i($),z=n(109),W=i(z),q=function(t){function e(n){o(this,e);var r=a(this,t.call(this,n));r.persistConfig=r.options.persistConfig,r.container=n.container,r.currentPositionValue=null,r.currentDurationValue=null;var i=r.persistConfig?u.Config.restore("volume"):100;return r.setVolume(r.options.mute?0:i),r.keepVisible=!1,r.fullScreenOnVideoTagSupported=null,r.addEventListeners(),r.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},r.container?S.default.isEmptyObject(r.container.settings)||(r.settings=S.default.extend({},r.container.settings)):r.settings={},r.userDisabled=!1,(r.container&&r.container.mediaControlDisabled||r.options.chromeless)&&r.disable(),r.stopDragHandler=function(t){return r.stopDrag(t)},r.updateDragHandler=function(t){return r.updateDrag(t)},(0,S.default)(document).bind("mouseup",r.stopDragHandler),(0,S.default)(document).bind("mousemove",r.updateDragHandler),r}return s(e,t),l(e,[{key:"name",get:function(){return"MediaControl"}},{key:"disabled",get:function(){return this.userDisabled||this.container&&this.container.getPlaybackType()===k.default.NO_OP}},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return(0,T.default)(D.default)}},{key:"stylesheet",get:function(){return p.default.getStyleFor(C.default,{baseUrl:this.options.baseUrl})}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return 0===this.volume}}]),e.prototype.addEventListeners=function(){this.container&&(_.default.on(this.options.playerId+":"+f.default.PLAYER_RESIZE,this.playerResize,this),this.listenTo(this.container,f.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,f.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,f.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,f.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,f.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,f.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,f.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,f.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,f.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,f.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,f.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,f.default.CONTAINER_VOLUME,this.onVolumeChanged),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,f.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag))},e.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.$el.hide()},e.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.show())},e.prototype.play=function(){this.container.play()},e.prototype.pause=function(){this.container.pause()},e.prototype.stop=function(){this.container.stop()},e.prototype.onVolumeChanged=function(){this.updateVolumeUI()},e.prototype.onLoadedMetadataOnVideoTag=function(){var t=this.container.playback.el;!u.Fullscreen.fullscreenEnabled()&&t.webkitSupportsFullscreen&&(this.fullScreenOnVideoTagSupported=!0,this.settingsUpdate())},e.prototype.updateVolumeUI=function(){if(this.rendered){this.$volumeBarContainer.find(".bar-fill-2").css({});var t=this.$volumeBarContainer.width(),e=this.$volumeBarBackground.width(),n=(t-e)/2,r=e*this.volume/100+n;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:r}),this.$volumeBarContainer.find(".segmented-bar-element").removeClass("fill");var i=Math.ceil(this.volume/10);this.$volumeBarContainer.find(".segmented-bar-element").slice(0,i).addClass("fill"),this.$volumeIcon.html(""),this.$volumeIcon.removeClass("muted"),this.muted?(this.$volumeIcon.append(Y.default),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(j.default),this.applyButtonStyle(this.$volumeIcon)}},e.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(M.default),this.$playStopToggle.append(B.default),this.trigger(f.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.trigger(f.default.MEDIACONTROL_NOTPLAYING),m.default.isMobile&&this.show()),this.applyButtonStyle(this.$playPauseToggle),this.applyButtonStyle(this.$playStopToggle)},e.prototype.mousemoveOnSeekBar=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left-this.$seekBarHover.width()/2;this.$seekBarHover.css({left:e})}this.trigger(f.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,t)},e.prototype.mouseleaveOnSeekBar=function(t){this.trigger(f.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,t)},e.prototype.onVolumeClick=function(t){this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.mousemoveOnVolumeBar=function(t){this.draggingVolumeBar&&this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.playerResize=function(t){this.$fullscreenToggle.html(""),u.Fullscreen.isFullscreen()?this.$fullscreenToggle.append(H.default):this.$fullscreenToggle.append(K.default),this.applyButtonStyle(this.$fullscreenToggle),this.$el.removeClass("w320"),(t.width<=320||this.options.hideVolumeBar)&&this.$el.addClass("w320")},e.prototype.togglePlayPause=function(){return this.container.isPlaying()?this.container.pause():this.container.play(),!1},e.prototype.togglePlayStop=function(){this.container.isPlaying()?this.container.stop():this.container.play()},e.prototype.startSeekDrag=function(t){this.settings.seekEnabled&&(this.draggingSeekBar=!0,this.$el.addClass("dragging"),this.$seekBarLoaded.addClass("media-control-notransition"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition"),t&&t.preventDefault())},e.prototype.startVolumeDrag=function(t){this.draggingVolumeBar=!0,this.$el.addClass("dragging"),t&&t.preventDefault()},e.prototype.stopDrag=function(t){this.draggingSeekBar&&this.seek(t),this.$el.removeClass("dragging"),this.$seekBarLoaded.removeClass("media-control-notransition"),this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition dragging"),this.draggingSeekBar=!1,this.draggingVolumeBar=!1},e.prototype.updateDrag=function(t){if(this.draggingSeekBar){t.preventDefault();var e=t.pageX-this.$seekBarContainer.offset().left,n=e/this.$seekBarContainer.width()*100;n=Math.min(100,Math.max(n,0)),this.setSeekPercentage(n)}else this.draggingVolumeBar&&(t.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(t)))},e.prototype.getVolumeFromUIEvent=function(t){var e=t.pageX-this.$volumeBarContainer.offset().left,n=e/this.$volumeBarContainer.width()*100;return n},e.prototype.toggleMute=function(){this.setVolume(this.muted?100:0)},e.prototype.setVolume=function(t){var e=this;t=Math.min(100,Math.max(t,0)),this.intendedVolume=t,this.persistConfig&&u.Config.persist("volume",t);var n=function(){e.container.isReady?e.container.setVolume(t):e.listenToOnce(e.container,f.default.CONTAINER_READY,function(){e.container.setVolume(t)})};this.container?n():this.listenToOnce(this,f.default.MEDIACONTROL_CONTAINERCHANGED,function(){n()})},e.prototype.toggleFullscreen=function(){this.trigger(f.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.resetUserKeepVisible()},e.prototype.setContainer=function(t){this.container&&(this.stopListening(this.container),this.fullScreenOnVideoTagSupported=null),_.default.off(this.options.playerId+":"+f.default.PLAYER_RESIZE,this.playerResize,this),this.container=t,this.setVolume(this.intendedVolume),this.changeTogglePlay(),this.addEventListeners(),this.settingsUpdate(),this.container.trigger(f.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container.mediaControlDisabled&&this.disable(),this.trigger(f.default.MEDIACONTROL_CONTAINERCHANGED)},e.prototype.showVolumeBar=function(){this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.$volumeBarContainer.removeClass("volume-bar-hide")},e.prototype.hideVolumeBar=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400;this.$volumeBarContainer&&(this.draggingVolumeBar?this.hideVolumeId=setTimeout(function(){return t.hideVolumeBar()},e):(this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.hideVolumeId=setTimeout(function(){return t.$volumeBarContainer.addClass("volume-bar-hide")},e)))},e.prototype.ended=function(){this.changeTogglePlay()},e.prototype.updateProgressBar=function(t){var e=t.start/t.total*100,n=t.current/t.total*100;this.$seekBarLoaded.css({left:e+"%",width:n-e+"%"})},e.prototype.onTimeUpdate=function(t){if(!this.draggingSeekBar){var e=t.current<0?t.total:t.current;this.currentPositionValue=e,this.currentDurationValue=t.total,this.renderSeekBar()}},e.prototype.renderSeekBar=function(){if(null!==this.currentPositionValue&&null!==this.currentDurationValue){this.currentSeekBarPercentage=100,(this.container.getPlaybackType()!==k.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var t=(0,u.formatTime)(this.currentPositionValue),e=(0,u.formatTime)(this.currentDurationValue);t!==this.displayedPosition&&(this.$position.text(t),this.displayedPosition=t),e!==this.displayedDuration&&(this.$duration.text(e),this.displayedDuration=e)}},e.prototype.seek=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left,n=e/this.$seekBarContainer.width()*100;return n=Math.min(100,Math.max(n,0)),this.container.seekPercentage(n),this.setSeekPercentage(n),!1}},e.prototype.setKeepVisible=function(){this.keepVisible=!0},e.prototype.resetKeepVisible=function(){this.keepVisible=!1},e.prototype.setUserKeepVisible=function(){this.userKeepVisible=!0},e.prototype.resetUserKeepVisible=function(){this.userKeepVisible=!1},e.prototype.isVisible=function(){return!this.$el.hasClass("media-control-hide")},e.prototype.show=function(t){var e=this;if(!this.disabled){var n=2e3;(!t||t.clientX!==this.lastMouseX&&t.clientY!==this.lastMouseY||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(f.default.MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout(function(){return e.hide()},n),t&&(this.lastMouseX=t.clientX,this.lastMouseY=t.clientY))}},e.prototype.hide=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()&&(!m.default.isMobile||this.container.isPlaying())){var n=e||2e3;clearTimeout(this.hideId),(this.disabled||this.options.hideMediaControl!==!1)&&(!this.disabled&&(e||this.userKeepVisible||this.keepVisible||this.draggingSeekBar||this.draggingVolumeBar)?this.hideId=setTimeout(function(){return t.hide()},n):(this.trigger(f.default.MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0)))}},e.prototype.settingsUpdate=function(){var t=this.getSettings();!t||this.fullScreenOnVideoTagSupported||u.Fullscreen.fullscreenEnabled()||(t.default&&(0,u.removeArrayItem)(t.default,"fullscreen"),t.left&&(0,u.removeArrayItem)(t.left,"fullscreen"),t.right&&(0,u.removeArrayItem)(t.right,"fullscreen"));var e=JSON.stringify(this.settings)!==JSON.stringify(t);e&&(this.settings=t,this.render())},e.prototype.getSettings=function(){return(0,R.default)({},this.container.settings)},e.prototype.highDefinitionUpdate=function(t){var e=t?"addClass":"removeClass";this.$hdIndicator[e]("enabled")},e.prototype.createCachedElements=function(){var t=this.$el.find(".media-control-layer");this.$duration=t.find(".media-control-indicator[data-duration]"),this.$fullscreenToggle=t.find("button.media-control-button[data-fullscreen]"),this.$playPauseToggle=t.find("button.media-control-button[data-playpause]"),this.$playStopToggle=t.find("button.media-control-button[data-playstop]"),this.$position=t.find(".media-control-indicator[data-position]"),this.$seekBarContainer=t.find(".bar-container[data-seekbar]"),this.$seekBarHover=t.find(".bar-hover[data-seekbar]"),this.$seekBarLoaded=t.find(".bar-fill-1[data-seekbar]"),this.$seekBarPosition=t.find(".bar-fill-2[data-seekbar]"),this.$seekBarScrubber=t.find(".bar-scrubber[data-seekbar]"),this.$volumeBarContainer=t.find(".bar-container[data-volume]"),this.$volumeContainer=t.find(".drawer-container[data-volume]"),this.$volumeIcon=t.find(".drawer-icon[data-volume]"),this.$volumeBarBackground=this.$el.find(".bar-background[data-volume]"),this.$volumeBarFill=this.$el.find(".bar-fill-1[data-volume]"),this.$volumeBarScrubber=this.$el.find(".bar-scrubber[data-volume]"),this.$hdIndicator=this.$el.find("button.media-control-button[data-hd-indicator]"),this.resetIndicators(),this.initializeIcons()},e.prototype.resetIndicators=function(){this.displayedPosition=this.$position.text(),this.displayedDuration=this.$duration.text()},e.prototype.initializeIcons=function(){var t=this.$el.find(".media-control-layer");t.find("button.media-control-button[data-play]").append(x.default),t.find("button.media-control-button[data-pause]").append(M.default),t.find("button.media-control-button[data-stop]").append(B.default),this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.$volumeIcon.append(j.default),this.$fullscreenToggle.append(K.default),this.$hdIndicator.append(W.default)},e.prototype.setSeekPercentage=function(t){t=Math.max(Math.min(t,100),0),this.displayedSeekBarPercentage!==t&&(this.displayedSeekBarPercentage=t,this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition"),this.$seekBarPosition.css({width:t+"%"}),this.$seekBarScrubber.css({left:t+"%"}))},e.prototype.seekRelative=function(t){if(this.settings.seekEnabled){var e=this.container.getCurrentTime(),n=this.container.getDuration(),r=Math.min(Math.max(e+t,0),n);r=Math.min(100*r/n,100),this.container.seekPercentage(r)}},e.prototype.bindKeyEvents=function(){var t=this;this.unbindKeyEvents(),this.kibo=new c.Kibo(this.options.focusElement),this.kibo.down(["space"],function(){return t.togglePlayPause()}),this.kibo.down(["left"],function(){return t.seekRelative(-15)}),this.kibo.down(["right"],function(){return t.seekRelative(15)});var e=[1,2,3,4,5,6,7,8,9,0];e.forEach(function(e){t.kibo.down(e.toString(),function(){return t.settings.seekEnabled&&t.container.seekPercentage(10*e)})})},e.prototype.unbindKeyEvents=function(){this.kibo&&(this.kibo.off("space"),this.kibo.off("left"),this.kibo.off("right"),this.kibo.off([1,2,3,4,5,6,7,8,9,0]))},e.prototype.parseColors=function(){if(this.options.mediacontrol){this.buttonsColor=this.options.mediacontrol.buttons;var t=this.options.mediacontrol.seekbar;this.$el.find(".bar-fill-2[data-seekbar]").css("background-color",t),this.$el.find(".media-control-icon svg path").css("fill",this.buttonsColor),this.$el.find(".segmented-bar-element[data-volume]").css("boxShadow","inset 2px 0 0 "+this.buttonsColor)}},e.prototype.applyButtonStyle=function(t){this.buttonsColor&&t&&(0,S.default)(t).find("svg path").css("fill",this.buttonsColor)},e.prototype.destroy=function(){this.remove(),(0,S.default)(document).unbind("mouseup",this.stopDragHandler),(0,S.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents()},e.prototype.render=function(){var t=this,e=1e3;this.$el.html(this.template({settings:this.settings})),this.$el.append(this.stylesheet),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.hideId=setTimeout(function(){return t.hide()},e),this.disabled&&this.hide(),m.default.isSafari&&m.default.isMobile&&this.$volumeContainer.css("display","none"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition");var n=0;return this.displayedSeekBarPercentage&&(n=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(n),r.nextTick(function(){t.settings.seekEnabled||t.$seekBarContainer.addClass("seek-disabled"),t.options.disableKeyboardShortcuts||t.bindKeyEvents(),t.playerResize({width:t.options.width,height:t.options.height}),t.hideVolumeBar(0)}),this.parseColors(),this.highDefinitionUpdate(),this.rendered=!0,this.updateVolumeUI(),this.trigger(f.default.MEDIACONTROL_RENDERED),this},e}(g.default);e.default=q,q.extend=function(t){return(0,u.extend)(q,t)},t.exports=e.default}).call(e,n(21))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(9),c=r(u),d=n(1),f=r(d),h=n(8),p=r(h),y=n(43),g=r(y),v=n(26),m=r(v),b=n(15),_=r(b),E=n(5),T=r(E),A=(0,l.currentScriptUrl)().replace(/\/[^\/]+$/,""),k=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n)),a={playerId:(0,l.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:A,allowUserInteraction:p.default.isMobile};return r._options=T.default.extend(a,n),r.options.sources=r._normalizeSources(n),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(),r._coreFactory=new g.default(r),r.playerInfo=_.default.getInstance(r.options.playerId),r.playerInfo.currentSize={width:n.width,height:n.height},r.playerInfo.options=r.options,r.options.parentId?r.setParentId(r.options.parentId):r.options.parent&&r.attachTo(r.options.parent),r}return a(e,t),s(e,[{key:"loader",set:function(t){this._loader=t},get:function(){return this._loader||(this._loader=new m.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.mediaControl.container.ended}},{key:"buffering",get:function(){return this.core.mediaControl.container.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:f.default.PLAYER_READY,onResize:f.default.PLAYER_RESIZE,onPlay:f.default.PLAYER_PLAY,onPause:f.default.PLAYER_PAUSE,onStop:f.default.PLAYER_STOP,onEnded:f.default.PLAYER_ENDED,onSeek:f.default.PLAYER_SEEK,onError:f.default.PLAYER_ERROR,onTimeUpdate:f.default.PLAYER_TIMEUPDATE,onVolumeUpdate:f.default.PLAYER_VOLUMEUPDATE}}}]),e.prototype.setParentId=function(t){var e=document.querySelector(t);return e&&this.attachTo(e),this},e.prototype.attachTo=function(t){return this.options.parentElement=t,this.core=this._coreFactory.create(),this._addEventListeners(),this},e.prototype._addEventListeners=function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,f.default.CORE_READY,this._onReady),this.listenTo(this.core.mediaControl,f.default.MEDIACONTROL_CONTAINERCHANGED,this._containerChanged),this.listenTo(this.core,f.default.CORE_FULLSCREEN,this._onFullscreenChange),this},e.prototype._addContainerEventListeners=function(){var t=this.core.mediaControl.container;return t&&(this.listenTo(t,f.default.CONTAINER_PLAY,this._onPlay),this.listenTo(t,f.default.CONTAINER_PAUSE,this._onPause),this.listenTo(t,f.default.CONTAINER_STOP,this._onStop),this.listenTo(t,f.default.CONTAINER_ENDED,this._onEnded),this.listenTo(t,f.default.CONTAINER_SEEK,this._onSeek),this.listenTo(t,f.default.CONTAINER_ERROR,this._onError),this.listenTo(t,f.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(t,f.default.CONTAINER_VOLUME,this._onVolumeUpdate)),this},e.prototype._registerOptionEventListeners=function(){var t=this,e=this.options.events||{};return Object.keys(e).forEach(function(n){var r=t.eventsMapping[n];if(r){var i=e[n];i="function"==typeof i&&i,i&&t.on(r,i)}}),this},e.prototype._containerChanged=function(){this.stopListening(),this._addEventListeners()},e.prototype._onReady=function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(f.default.PLAYER_READY)},e.prototype._onFullscreenChange=function(t){this.trigger(f.default.PLAYER_FULLSCREEN,t)},e.prototype._onVolumeUpdate=function(t){this.trigger(f.default.PLAYER_VOLUMEUPDATE,t)},e.prototype._onPlay=function(){this.trigger(f.default.PLAYER_PLAY)},e.prototype._onPause=function(){this.trigger(f.default.PLAYER_PAUSE)},e.prototype._onStop=function(){this.trigger(f.default.PLAYER_STOP,this.getCurrentTime())},e.prototype._onEnded=function(){this.trigger(f.default.PLAYER_ENDED)},e.prototype._onSeek=function(t){this.trigger(f.default.PLAYER_SEEK,t)},e.prototype._onTimeUpdate=function(t){this.trigger(f.default.PLAYER_TIMEUPDATE,t)},e.prototype._onError=function(t){this.trigger(f.default.PLAYER_ERROR,t)},e.prototype._normalizeSources=function(t){var e=t.sources||(void 0!==t.source?[t.source]:[]);return 0===e.length?[{source:"",mimeType:""}]:e},e.prototype.resize=function(t){return this.core.resize(t),this},e.prototype.load=function(t,e,n){return void 0!==n&&this.configure({autoPlay:!!n}),this.core.load(t,e),this},e.prototype.destroy=function(){return this.core.destroy(),this},e.prototype.play=function(){return this.core.mediaControl.container.play(),this},e.prototype.pause=function(){return this.core.mediaControl.container.pause(),this},e.prototype.stop=function(){return this.core.mediaControl.container.stop(),this},e.prototype.seek=function(t){return this.core.mediaControl.container.seek(t),this},e.prototype.seekPercentage=function(t){return this.core.mediaControl.container.seekPercentage(t),this},e.prototype.setVolume=function(t){return this.core&&this.core.mediaControl&&this.core.mediaControl.setVolume(t),this},e.prototype.getVolume=function(){return this.core&&this.core.mediaControl?this.core.mediaControl.volume:0},e.prototype.mute=function(){return this._mutedVolume=this.getVolume(),this.setVolume(0),this},e.prototype.unmute=function(){return this.setVolume("number"==typeof this._mutedVolume?this._mutedVolume:100),this._mutedVolume=null,this},e.prototype.isPlaying=function(){return this.core.mediaControl.container.isPlaying()},e.prototype.isDvrEnabled=function(){return this.core.mediaControl.container.isDvrEnabled()},e.prototype.isDvrInUse=function(){return this.core.mediaControl.container.isDvrInUse()},e.prototype.configure=function(t){return this.core.configure(t),this},e.prototype.getPlugin=function(t){var e=this.core.plugins.concat(this.core.mediaControl.container.plugins);return e.filter(function(e){return e.name===t})[0]},e.prototype.getCurrentTime=function(){return this.core.mediaControl.container.getCurrentTime()},e.prototype.getStartTimeOffset=function(){return this.core.mediaControl.container.getStartTimeOffset()},e.prototype.getDuration=function(){return this.core.mediaControl.container.getDuration()},e}(c.default);e.default=k,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(3),u=r(l),c=n(4),d=r(c),f=n(6),h=r(f),p=n(8),y=r(p),g=n(92),v=r(g),m=n(81),b=r(m),_="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",E=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.setElement=function(t){this.$el=t,this.el=t[0]},e.prototype._setupFirefox=function(){var t=this.$("embed");t.attr("data-flash-playback",this.name),t.addClass(this.attributes.class),this.setElement(t)},e.prototype.render=function(){return this.$el.html(this.template({cid:this.cid,swfPath:this.swfPath,baseUrl:this.baseUrl,playbackId:this.uniqueId,wmode:this.wmode,callbackName:"window.Clappr.flashlsCallbacks."+this.cid})),y.default.isIE&&(this.$("embed").remove(),y.default.isLegacyIE&&this.$el.attr("classid",_)),y.default.isFirefox&&this._setupFirefox(),this.el.id=this.cid,this.$el.append(d.default.getStyleFor(b.default)),this},s(e,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,h.default)(v.default)}},{key:"attributes",get:function(){var t="application/x-shockwave-flash";return y.default.isLegacyIE&&(t=""),{class:"clappr-flash-playback",type:t,width:"100%",height:"100%","data-flash-playback":this.name}}}]),e}(u.default);e.default=E,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),
+e}}(),l=n(2),u=n(18),c=r(u),d=n(8),f=r(d),h=n(11),p=r(h),y=n(6),g=r(y),v=n(5),m=r(v),b=n(1),_=r(b),E=n(3),T=r(E),A=n(111),k=r(A),w=60,S=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._autoPlay=s.options.autoPlay,s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume"],s.settings.seekEnabled=!0,s._isReadyState=!1,s._addListeners(),s}return a(e,t),s(e,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,g.default)(k.default)({baseUrl:this._baseUrl})}},{key:"ended",get:function(){return"ENDED"===this._currentState}},{key:"buffering",get:function(){return!!this._bufferingState&&"ENDED"!==this._currentState}}]),e.prototype._bootstrap=function(){var t=this;this.el.playerPlay?(this.el.width="100%",this.el.height="100%","PLAYING"===this._currentState?this._firstPlay():(this._currentState="IDLE",this._autoPlay&&this.play()),(0,m.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():p.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=w?setTimeout(function(){return t._bootstrap()},50):this.trigger(_.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(_.default.PLAYBACK_READY,this.name),this.trigger(_.default.PLAYBACK_SETTINGSUPDATE,this.name)},e.prototype.getPlaybackType=function(){return T.default.VOD},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype._updateTime=function(){this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},e.prototype._addListeners=function(){p.default.on(this.uniqueId+":progress",this._progress,this),p.default.on(this.uniqueId+":timeupdate",this._updateTime,this),p.default.on(this.uniqueId+":statechanged",this._checkState,this),p.default.on(this.uniqueId+":flashready",this._bootstrap,this)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),p.default.off(this.uniqueId+":progress"),p.default.off(this.uniqueId+":timeupdate"),p.default.off(this.uniqueId+":statechanged"),p.default.off(this.uniqueId+":flashready")},e.prototype._checkState=function(){this._isIdle||"PAUSED"===this._currentState||("PLAYING_BUFFERING"!==this._currentState&&"PLAYING_BUFFERING"===this.el.getState()?(this._bufferingState=!0,this.trigger(_.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(_.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(_.default.PLAYBACK_ENDED,this.name),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.el.getDuration()},this.name),this._currentState="ENDED",this._isIdle=!0))},e.prototype._progress=function(){"IDLE"!==this._currentState&&"ENDED"!==this._currentState&&this.trigger(_.default.PLAYBACK_PROGRESS,{start:0,current:this.el.getBytesLoaded(),total:this.el.getBytesTotal()})},e.prototype._firstPlay=function(){var t=this;this.el.playerPlay?(this._isIdle=!1,this.el.playerPlay(this._src),this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return t._checkInitialSeek()}),this._currentState="PLAYING"):this.listenToOnce(this,_.default.PLAYBACK_READY,this._firstPlay)},e.prototype._checkInitialSeek=function(){var t=(0,l.seekStringToSeconds)(window.location.href);0!==t&&this.seekSeconds(t)},e.prototype.play=function(){this.trigger(_.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(_.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(_.default.PLAYBACK_PLAY,this.name))},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(_.default.PLAYBACK_PAUSE,this.name)},e.prototype.stop=function(){this.el.playerStop(),this.trigger(_.default.PLAYBACK_STOP),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!(this.isReady&&this._currentState.indexOf("PLAYING")>-1)},e.prototype.getDuration=function(){return this.el.getDuration()},e.prototype.seekPercentage=function(t){var e=this;if(this.el.getDuration()>0){var n=this.el.getDuration()*(t/100);this.seek(n)}else this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.seekPercentage(t)})},e.prototype.seek=function(t){var e=this;this.isReady&&this.el.playerSeek?(this.el.playerSeek(t),this.trigger(_.default.PLAYBACK_TIMEUPDATE,{current:t,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,_.default.PLAYBACK_BUFFERFULL,function(){return e.seek(t)})},e.prototype.destroy=function(){clearInterval(this.bootstrapId),t.prototype.stopListening.call(this),this.$el.remove()},s(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(c.default);e.default=S,S.canPlay=function(t){if(f.default.hasFlash&&t&&t.constructor===String){var e=t.split("?")[0].match(/.*\.(.*)$/)||[];return e.length>1&&!f.default.isMobile&&e[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(18),u=r(l),c=n(1),d=r(c),f=n(6),h=r(f),p=n(3),y=r(p),g=n(11),v=r(g),m=n(8),b=r(m),_=n(50),E=r(_),T=n(112),A=r(T),k=n(5),w=r(k),S=60,L=-1,R=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._initHlsParameters(s.options),s.highDefinition=!1,s._autoPlay=s.options.autoPlay,s._loop=s.options.loop,s._defaultSettings={left:["playstop"],default:["seekbar"],right:["fullscreen","volume","hd-indicator"],seekEnabled:!1},s.settings=w.default.extend({},s._defaultSettings),s._playbackType=y.default.LIVE,s._hasEnded=!1,s._addListeners(),s}return a(e,t),s(e,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,h.default)(A.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?L:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_START),this.el.playerSetCurrentLevel(t)}},{key:"ended",get:function(){return this._hasEnded}},{key:"buffering",get:function(){return!!this._bufferingState&&!this._hasEnded}}]),e.prototype._initHlsParameters=function(t){this._autoStartLoad=void 0===t.autoStartLoad||t.autoStartLoad,this._capLevelToStage=void 0!==t.capLevelToStage&&t.capLevelToStage,this._maxLevelCappingMode=void 0===t.maxLevelCappingMode?"downscale":t.maxLevelCappingMode,this._minBufferLength=void 0===t.minBufferLength?-1:t.minBufferLength,this._minBufferLengthCapping=void 0===t.minBufferLengthCapping?-1:t.minBufferLengthCapping,this._maxBufferLength=void 0===t.maxBufferLength?120:t.maxBufferLength,this._maxBackBufferLength=void 0===t.maxBackBufferLength?30:t.maxBackBufferLength,this._lowBufferLength=void 0===t.lowBufferLength?3:t.lowBufferLength,this._mediaTimePeriod=void 0===t.mediaTimePeriod?100:t.mediaTimePeriod,this._fpsDroppedMonitoringPeriod=void 0===t.fpsDroppedMonitoringPeriod?5e3:t.fpsDroppedMonitoringPeriod,this._fpsDroppedMonitoringThreshold=void 0===t.fpsDroppedMonitoringThreshold?.2:t.fpsDroppedMonitoringThreshold,this._capLevelonFPSDrop=void 0!==t.capLevelonFPSDrop&&t.capLevelonFPSDrop,this._smoothAutoSwitchonFPSDrop=void 0===t.smoothAutoSwitchonFPSDrop?this.capLevelonFPSDrop:t.smoothAutoSwitchonFPSDrop,this._switchDownOnLevelError=void 0===t.switchDownOnLevelError||t.switchDownOnLevelError,this._seekMode=void 0===t.seekMode?"ACCURATE":t.seekMode,this._keyLoadMaxRetry=void 0===t.keyLoadMaxRetry?3:t.keyLoadMaxRetry,this._keyLoadMaxRetryTimeout=void 0===t.keyLoadMaxRetryTimeout?64e3:t.keyLoadMaxRetryTimeout,this._fragmentLoadMaxRetry=void 0===t.fragmentLoadMaxRetry?3:t.fragmentLoadMaxRetry,this._fragmentLoadMaxRetryTimeout=void 0===t.fragmentLoadMaxRetryTimeout?4e3:t.fragmentLoadMaxRetryTimeout,this._fragmentLoadSkipAfterMaxRetry=void 0===t.fragmentLoadSkipAfterMaxRetry||t.fragmentLoadSkipAfterMaxRetry,this._maxSkippedFragments=void 0===t.maxSkippedFragments?5:t.maxSkippedFragments,this._flushLiveURLCache=void 0!==t.flushLiveURLCache&&t.flushLiveURLCache,this._initialLiveManifestSize=void 0===t.initialLiveManifestSize?1:t.initialLiveManifestSize,this._manifestLoadMaxRetry=void 0===t.manifestLoadMaxRetry?3:t.manifestLoadMaxRetry,this._manifestLoadMaxRetryTimeout=void 0===t.manifestLoadMaxRetryTimeout?64e3:t.manifestLoadMaxRetryTimeout,this._manifestRedundantLoadmaxRetry=void 0===t.manifestRedundantLoadmaxRetry?3:t.manifestRedundantLoadmaxRetry,this._startFromBitrate=void 0===t.startFromBitrate?-1:t.startFromBitrate,this._startFromLevel=void 0===t.startFromLevel?-1:t.startFromLevel,this._autoStartMaxDuration=void 0===t.autoStartMaxDuration?-1:t.autoStartMaxDuration,this._seekFromLevel=void 0===t.seekFromLevel?-1:t.seekFromLevel,this._useHardwareVideoDecoder=void 0!==t.useHardwareVideoDecoder&&t.useHardwareVideoDecoder,this._hlsLogEnabled=void 0===t.hlsLogEnabled||t.hlsLogEnabled,this._logDebug=void 0!==t.logDebug&&t.logDebug,this._logDebug2=void 0!==t.logDebug2&&t.logDebug2,this._logWarn=void 0===t.logWarn||t.logWarn,this._logError=void 0===t.logError||t.logError,this._hlsMinimumDvrSize=void 0===t.hlsMinimumDvrSize?60:t.hlsMinimumDvrSize},e.prototype._addListeners=function(){var t=this;v.default.on(this.cid+":flashready",function(){return t._bootstrap()}),v.default.on(this.cid+":timeupdate",function(e){return t._updateTime(e)}),v.default.on(this.cid+":playbackstate",function(e){return t._setPlaybackState(e)}),v.default.on(this.cid+":levelchanged",function(e){return t._levelChanged(e)}),v.default.on(this.cid+":error",function(e,n,r){return t._flashPlaybackError(e,n,r)}),v.default.on(this.cid+":fragmentloaded",function(e){return t._onFragmentLoaded(e)}),v.default.on(this.cid+":levelendlist",function(e){return t._onLevelEndlist(e)})},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),v.default.off(this.cid+":flashready"),v.default.off(this.cid+":timeupdate"),v.default.off(this.cid+":playbackstate"),v.default.off(this.cid+":levelchanged"),v.default.off(this.cid+":playbackerror"),v.default.off(this.cid+":fragmentloaded"),v.default.off(this.cid+":manifestloaded"),v.default.off(this.cid+":levelendlist")},e.prototype._bootstrap=function(){var t=this;this.el.playerLoad?(this.el.width="100%",this.el.height="100%",this._isReadyState=!0,this._srcLoaded=!1,this._currentState="IDLE",this._setFlashSettings(),this._updatePlaybackType(),(this._autoPlay||this._shouldPlayOnManifestLoaded)&&this.play(),this.trigger(d.default.PLAYBACK_READY,this.name)):(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=S?setTimeout(function(){return t._bootstrap()},50):this.trigger(d.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._setFlashSettings=function(){this.el.playerSetAutoStartLoad(this._autoStartLoad),this.el.playerSetCapLevelToStage(this._capLevelToStage),this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode),this.el.playerSetMinBufferLength(this._minBufferLength),this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping),this.el.playerSetMaxBufferLength(this._maxBufferLength),this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength),this.el.playerSetLowBufferLength(this._lowBufferLength),this.el.playerSetMediaTimePeriod(this._mediaTimePeriod),this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod),this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold),this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop),this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop),this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError),this.el.playerSetSeekMode(this._seekMode),this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry),this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout),this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry),this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout),this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry),this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments),this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache),this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize),this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry),this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout),this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry),this.el.playerSetStartFromBitrate(this._startFromBitrate),this.el.playerSetStartFromLevel(this._startFromLevel),this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration),this.el.playerSetSeekFromLevel(this._seekFromLevel),this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder),this.el.playerSetLogInfo(this._hlsLogEnabled),this.el.playerSetLogDebug(this._logDebug),this.el.playerSetLogDebug2(this._logDebug2),this.el.playerSetLogWarn(this._logWarn),this.el.playerSetLogError(this._logError)},e.prototype.setAutoStartLoad=function(t){this._autoStartLoad=t,this.el.playerSetAutoStartLoad(this._autoStartLoad)},e.prototype.setCapLevelToStage=function(t){this._capLevelToStage=t,this.el.playerSetCapLevelToStage(this._capLevelToStage)},e.prototype.setMaxLevelCappingMode=function(t){this._maxLevelCappingMode=t,this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)},e.prototype.setSetMinBufferLength=function(t){this._minBufferLength=t,this.el.playerSetMinBufferLength(this._minBufferLength)},e.prototype.setMinBufferLengthCapping=function(t){this._minBufferLengthCapping=t,this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)},e.prototype.setMaxBufferLength=function(t){this._maxBufferLength=t,this.el.playerSetMaxBufferLength(this._maxBufferLength)},e.prototype.setMaxBackBufferLength=function(t){this._maxBackBufferLength=t,this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)},e.prototype.setLowBufferLength=function(t){this._lowBufferLength=t,this.el.playerSetLowBufferLength(this._lowBufferLength)},e.prototype.setMediaTimePeriod=function(t){this._mediaTimePeriod=t,this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)},e.prototype.setFpsDroppedMonitoringPeriod=function(t){this._fpsDroppedMonitoringPeriod=t,this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)},e.prototype.setFpsDroppedMonitoringThreshold=function(t){this._fpsDroppedMonitoringThreshold=t,this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)},e.prototype.setCapLevelonFPSDrop=function(t){this._capLevelonFPSDrop=t,this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)},e.prototype.setSmoothAutoSwitchonFPSDrop=function(t){this._smoothAutoSwitchonFPSDrop=t,this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)},e.prototype.setSwitchDownOnLevelError=function(t){this._switchDownOnLevelError=t,this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)},e.prototype.setSeekMode=function(t){this._seekMode=t,this.el.playerSetSeekMode(this._seekMode)},e.prototype.setKeyLoadMaxRetry=function(t){this._keyLoadMaxRetry=t,this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)},e.prototype.setKeyLoadMaxRetryTimeout=function(t){this._keyLoadMaxRetryTimeout=t,this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)},e.prototype.setFragmentLoadMaxRetry=function(t){this._fragmentLoadMaxRetry=t,this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)},e.prototype.setFragmentLoadMaxRetryTimeout=function(t){this._fragmentLoadMaxRetryTimeout=t,this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)},e.prototype.setFragmentLoadSkipAfterMaxRetry=function(t){this._fragmentLoadSkipAfterMaxRetry=t,this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)},e.prototype.setMaxSkippedFragments=function(t){this._maxSkippedFragments=t,this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)},e.prototype.setFlushLiveURLCache=function(t){this._flushLiveURLCache=t,this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)},e.prototype.setInitialLiveManifestSize=function(t){this._initialLiveManifestSize=t,this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)},e.prototype.setManifestLoadMaxRetry=function(t){this._manifestLoadMaxRetry=t,this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)},e.prototype.setManifestLoadMaxRetryTimeout=function(t){this._manifestLoadMaxRetryTimeout=t,this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)},e.prototype.setManifestRedundantLoadmaxRetry=function(t){this._manifestRedundantLoadmaxRetry=t,this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)},e.prototype.setStartFromBitrate=function(t){this._startFromBitrate=t,this.el.playerSetStartFromBitrate(this._startFromBitrate)},e.prototype.setStartFromLevel=function(t){this._startFromLevel=t,this.el.playerSetStartFromLevel(this._startFromLevel)},e.prototype.setAutoStartMaxDuration=function(t){this._autoStartMaxDuration=t,this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)},e.prototype.setSeekFromLevel=function(t){this._seekFromLevel=t,this.el.playerSetSeekFromLevel(this._seekFromLevel)},e.prototype.setUseHardwareVideoDecoder=function(t){this._useHardwareVideoDecoder=t,this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)},e.prototype.setSetLogInfo=function(t){this._hlsLogEnabled=t,this.el.playerSetLogInfo(this._hlsLogEnabled)},e.prototype.setLogDebug=function(t){this._logDebug=t,this.el.playerSetLogDebug(this._logDebug)},e.prototype.setLogDebug2=function(t){this._logDebug2=t,this.el.playerSetLogDebug2(this._logDebug2)},e.prototype.setLogWarn=function(t){this._logWarn=t,this.el.playerSetLogWarn(this._logWarn)},e.prototype.setLogError=function(t){this._logError=t,this.el.playerSetLogError(this._logError)},e.prototype._levelChanged=function(t){var e=this.el.getLevels()[t];e&&(this.highDefinition=e.height>=720||e.bitrate/1e3>=2e3,this.trigger(d.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(d.default.PLAYBACK_BITRATE,{height:e.height,width:e.width,bandwidth:e.bitrate,bitrate:e.bitrate,level:t}),this.trigger(d.default.PLAYBACK_LEVEL_SWITCH_END))},e.prototype._updateTime=function(t){if("IDLE"!==this._currentState){var e=this._normalizeDuration(t.duration),n=Math.min(Math.max(t.position,0),e),r=this._dvrEnabled,i=this._playbackType===y.default.LIVE;this._dvrEnabled=i&&e>this._hlsMinimumDvrSize,100!==e&&void 0!==i&&(this._dvrEnabled!==r&&(this._updateSettings(),this.trigger(d.default.PLAYBACK_SETTINGSUPDATE,this.name)),!i||this._dvrEnabled&&this._dvrInUse||(n=e),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:n,total:e},this.name))}},e.prototype.play=function(){this.trigger(d.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState?this.el.playerResume():this._srcLoaded||"PLAYING"===this._currentState?this.el.playerPlay():this._firstPlay()},e.prototype.getPlaybackType=function(){return this._playbackType?this._playbackType:null},e.prototype.getCurrentLevelIndex=function(){return this._currentLevel},e.prototype.getCurrentLevel=function(){return this.levels[this.currentLevel]},e.prototype.getCurrentBitrate=function(){return this.levels[this.currentLevel].bitrate},e.prototype.setCurrentLevel=function(t){this.currentLevel=t},e.prototype.isHighDefinitionInUse=function(){return this.highDefinition},e.prototype.getLevels=function(){return this.levels},e.prototype._setPlaybackState=function(t){["PLAYING_BUFFERING","PAUSED_BUFFERING"].indexOf(t)>=0?(this._bufferingState=!0,this.trigger(d.default.PLAYBACK_BUFFERING,this.name),this._updateCurrentState(t)):["PLAYING","PAUSED"].indexOf(t)>=0?(["PLAYING_BUFFERING","PAUSED_BUFFERING","IDLE"].indexOf(this._currentState)>=0&&(this._bufferingState=!1,this.trigger(d.default.PLAYBACK_BUFFERFULL,this.name)),this._updateCurrentState(t)):"IDLE"===t&&(this._srcLoaded=!1,this._loop&&["PLAYING_BUFFERING","PLAYING"].indexOf(this._currentState)>=0?(this.play(),this.seek(0)):(this._updateCurrentState(t),this._hasEnded=!0,this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(d.default.PLAYBACK_ENDED,this.name)))},e.prototype._updateCurrentState=function(t){this._currentState=t,"IDLE"!==t&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===t?this.trigger(d.default.PLAYBACK_PLAY,this.name):"PAUSED"===t&&this.trigger(d.default.PLAYBACK_PAUSE,this.name)},e.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===y.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(d.default.PLAYBACK_PLAYBACKSTATE,{type:this._playbackType})},e.prototype._startReportingProgress=function(){this._reportingProgress||(this._reportingProgress=!0)},e.prototype._stopReportingProgress=function(){this._reportingProgress=!1},e.prototype._onFragmentLoaded=function(t){if(this.trigger(d.default.PLAYBACK_FRAGMENT_LOADED,t),this._reportingProgress&&this.el.getPosition){var e=this.el.getPosition()+this.el.getbufferLength();this.trigger(d.default.PLAYBACK_PROGRESS,{start:this.el.getPosition(),current:e,total:this.el.getDuration()})}},e.prototype._onLevelEndlist=function(){this._updatePlaybackType()},e.prototype._firstPlay=function(){var t=this;this._shouldPlayOnManifestLoaded=!0,this.el.playerLoad&&(v.default.once(this.cid+":manifestloaded",function(e,n){return t._manifestLoaded(e,n)}),this._setFlashSettings(),this.el.playerLoad(this._src),this._srcLoaded=!0)},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,d.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){(this._playbackType!==y.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===y.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(d.default.PLAYBACK_STOP),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!this._currentState&&!!this._currentState.match(/playing/i)},e.prototype.getDuration=function(){return this._normalizeDuration(this.el.getDuration())},e.prototype._normalizeDuration=function(t){return this._playbackType===y.default.LIVE&&(t=Math.max(0,t-10)),t},e.prototype.seekPercentage=function(t){var e=this.el.getDuration(),n=0;t>0&&(n=e*t/100),this.seek(n)},e.prototype.seek=function(t){var e=this.getDuration();if(this._playbackType===y.default.LIVE){var n=e-t>3;this._updateDvr(n)}this.el.playerSeek(t),this.trigger(d.default.PLAYBACK_TIMEUPDATE,{current:t,total:e},this.name)},e.prototype._updateDvr=function(t){var e=!!this._dvrInUse;this._dvrInUse=t,this._dvrInUse!==e&&(this._updateSettings(),this.trigger(d.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(d.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},e.prototype._flashPlaybackError=function(t,e,n){this.trigger(d.default.PLAYBACK_ERROR,{code:t,url:e,message:n}),this.trigger(d.default.PLAYBACK_STOP)},e.prototype._manifestLoaded=function(t,e){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(d.default.PLAYBACK_LOADEDMETADATA,{duration:t,data:e})},e.prototype._fillLevels=function(){var t=this.el.getLevels(),e=t.length;this._levels=[];for(var n=0;n<e;n++)this._levels.push({id:n,label:t[n].height+"p",level:t[n]});this.trigger(d.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype.destroy=function(){this.stopListening(),this.$el.remove()},e.prototype._updateSettings=function(){this.settings=w.default.extend({},this._defaultSettings),this._playbackType===y.default.VOD||this._dvrInUse?(this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=!0):this._dvrEnabled?(this.settings.left=["playpause"],this.settings.seekEnabled=!0):this.settings.seekEnabled=!1},e.prototype._createCallbacks=function(){var t=this;window.Clappr||(window.Clappr={}),window.Clappr.flashlsCallbacks||(window.Clappr.flashlsCallbacks={}),this.flashlsEvents=new E.default(this.cid),window.Clappr.flashlsCallbacks[this.cid]=function(e,n){t.flashlsEvents[e].apply(t.flashlsEvents,n)}},e.prototype.render=function(){return t.prototype.render.call(this),this._createCallbacks(),this},s(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),e}(u.default);e.default=R,R.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[];return b.default.hasFlash&&(n.length>1&&"m3u8"===n[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),a=r(o),s=function(){function t(e){i(this,t),this.instanceId=e}return t.prototype.ready=function(){a.default.trigger(this.instanceId+":flashready")},t.prototype.videoSize=function(t,e){a.default.trigger(this.instanceId+":videosizechanged",t,e)},t.prototype.complete=function(){a.default.trigger(this.instanceId+":complete")},t.prototype.error=function(t,e,n){a.default.trigger(this.instanceId+":error",t,e,n)},t.prototype.manifest=function(t,e){a.default.trigger(this.instanceId+":manifestloaded",t,e)},t.prototype.audioLevelLoaded=function(t){a.default.trigger(this.instanceId+":audiolevelloaded",t)},t.prototype.levelLoaded=function(t){a.default.trigger(this.instanceId+":levelloaded",t)},t.prototype.levelEndlist=function(t){a.default.trigger(this.instanceId+":levelendlist",t)},t.prototype.fragmentLoaded=function(t){a.default.trigger(this.instanceId+":fragmentloaded",t)},t.prototype.fragmentPlaying=function(t){a.default.trigger(this.instanceId+":fragmentplaying",t)},t.prototype.position=function(t){a.default.trigger(this.instanceId+":timeupdate",t)},t.prototype.state=function(t){a.default.trigger(this.instanceId+":playbackstate",t)},t.prototype.seekState=function(t){a.default.trigger(this.instanceId+":seekstate",t)},t.prototype.switch=function(t){a.default.trigger(this.instanceId+":levelchanged",t)},t.prototype.audioTracksListChange=function(t){a.default.trigger(this.instanceId+":audiotracklistchanged",t)},t.prototype.audioTrackChange=function(t){a.default.trigger(this.instanceId+":audiotrackchanged",t)},t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(16),c=r(u),d=n(90),f=r(d),h=n(99),p=r(h),y=n(1),g=r(y),v=n(3),m=r(v),b=n(8),_=r(b),E=n(2),T=n(19),A=r(T),k=-1,w=function(t){function e(){o(this,e);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=a(this,t.call.apply(t,[this].concat(r)));return s.options.playback||(s.options.playback=s.options),s._minDvrSize="undefined"==typeof s.options.hlsMinimumDvrSize?60:s.options.hlsMinimumDvrSize,s._extrapolatedWindowNumSegments=s.options.playback&&"undefined"!=typeof s.options.playback.extrapolatedWindowNumSegments?s.options.playback.extrapolatedWindowNumSegments:2,s._playbackType=m.default.VOD,s._lastTimeUpdate=null,s._lastDuration=null,s._playableRegionStartTime=0,s._localStartTimeCorrelation=null,s._localEndTimeCorrelation=null,s._playableRegionDuration=0,s._durationExcludesAfterLiveSyncPoint=!1,s._segmentTargetDuration=null,s._playlistType=null,s._recoverAttemptsRemaining=s.options.hlsRecoverAttempts||16,s._startTimeUpdateTimer(),s}return s(e,t),l(e,[{key:"name",get:function(){return"hls"}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?k:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(g.default.PLAYBACK_LEVEL_SWITCH_START),this._hls.currentLevel=this._currentLevel}},{key:"_startTime",get:function(){return this._playbackType===m.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,E.now)()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var t=this._localStartTimeCorrelation,e=this._now-t.local,n=(t.remote+e)/1e3;return Math.min(n,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var t=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return t;var e=this._localEndTimeCorrelation,n=this._now-e.local,r=(e.remote+n)/1e3;return Math.max(t-this._extrapolatedWindowDuration,Math.min(r,t))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}}]),e.prototype._setupHls=function(){
+var t=this;this._hls=new f.default(this.options.playback.hlsjsConfig||{}),this._hls.on(f.default.Events.MEDIA_ATTACHED,function(){return t._hls.loadSource(t.options.src)}),this._hls.on(f.default.Events.LEVEL_LOADED,function(e,n){return t._updatePlaybackType(e,n)}),this._hls.on(f.default.Events.LEVEL_UPDATED,function(e,n){return t._onLevelUpdated(e,n)}),this._hls.on(f.default.Events.LEVEL_SWITCH,function(e,n){return t._onLevelSwitch(e,n)}),this._hls.on(f.default.Events.FRAG_LOADED,function(e,n){return t._onFragmentLoaded(e,n)}),this._hls.on(f.default.Events.ERROR,function(e,n){return t._onHLSJSError(e,n)}),this._hls.attachMedia(this.el)},e.prototype._recover=function(t,e){this._recoveredDecodingError?this._recoveredAudioCodecError?(A.default.error("hlsjs: failed to recover"),this.trigger(g.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)):(this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError()):(this._recoveredDecodingError=!0,this._hls.recoverMediaError())},e.prototype._setupSrc=function(t){},e.prototype._startTimeUpdateTimer=function(){var t=this;this._timeUpdateTimer=setInterval(function(){t._onDurationChange(),t._onTimeUpdate()},100)},e.prototype._stopTimeUpdateTimer=function(){clearInterval(this._timeUpdateTimer)},e.prototype.getDuration=function(){return this._duration},e.prototype.getCurrentTime=function(){return Math.max(0,this.el.currentTime-this._startTime)},e.prototype.getStartTimeOffset=function(){return this._startTime},e.prototype.seekPercentage=function(t){var e=this._duration;t>0&&(e=this._duration*(t/100)),this.seek(e)},e.prototype.seek=function(e){e<0&&(A.default.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this._startTime,t.prototype.seek.call(this,e)},e.prototype.seekToLivePoint=function(){this.seek(this.getDuration())},e.prototype._updateDvr=function(t){this.trigger(g.default.PLAYBACK_DVR,t),this.trigger(g.default.PLAYBACK_STATS_ADD,{dvr:t})},e.prototype._updateSettings=function(){this._playbackType===m.default.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(g.default.PLAYBACK_SETTINGSUPDATE)},e.prototype._onHLSJSError=function(t,e){if(e.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,e.type){case f.default.ErrorTypes.NETWORK_ERROR:A.default.warn("hlsjs: trying to recover from network error, evt "+t+", data "+e+" "),this._hls.startLoad();break;case f.default.ErrorTypes.MEDIA_ERROR:A.default.warn("hlsjs: trying to recover from media error, evt "+t+", data "+e+" "),this._recover(t,e);break;default:A.default.error("hlsjs: trying to recover from error, evt "+t+", data "+e+" "),this.trigger(g.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)}else A.default.error("hlsjs: could not recover from error after maximum number of attempts, evt "+t+", data "+e+" "),this.trigger(g.default.PLAYBACK_ERROR,{evt:t,data:e},this.name);else A.default.warn("hlsjs: non-fatal error occurred, evt "+t+", data "+e+" ")},e.prototype._onTimeUpdate=function(){var t={current:this.getCurrentTime(),total:this.getDuration()};(0,p.default)(t,this._lastTimeUpdate)||(this._lastTimeUpdate=t,this.trigger(g.default.PLAYBACK_TIMEUPDATE,t,this.name))},e.prototype._onDurationChange=function(){var e=this.getDuration();this._lastDuration!==e&&(this._lastDuration=e,t.prototype._onDurationChange.call(this))},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,n=0;n<this.el.buffered.length;n++)t=[].concat(i(t),[{start:Math.max(0,this.el.buffered.start(n)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(n)-this._playableRegionStartTime)}]),this.el.currentTime>=t[n].start&&this.el.currentTime<=t[n].end&&(e=n);var r={start:t[e].start,current:t[e].end,total:this.getDuration()};this.trigger(g.default.PLAYBACK_PROGRESS,r,t)}},e.prototype.play=function(){this._hls||this._setupHls(),t.prototype.play.call(this)},e.prototype.pause=function(){this._hls&&(t.prototype.pause.call(this),this.dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._hls&&(t.prototype.stop.call(this),this._hls.destroy(),delete this._hls)},e.prototype.destroy=function(){this._stopTimeUpdateTimer(),this._hls&&(this._hls.destroy(),delete this._hls),t.prototype.destroy.call(this)},e.prototype._updatePlaybackType=function(t,e){this._playbackType=e.details.live?m.default.LIVE:m.default.VOD,this._fillLevels(),this._onLevelUpdated(t,e)},e.prototype._fillLevels=function(){this._levels=this._hls.levels.map(function(t,e){return{id:e,level:t,label:t.bitrate/1e3+"Kbps"}}),this.trigger(g.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype._onLevelUpdated=function(t,e){this._segmentTargetDuration=e.details.targetduration,this._playlistType=e.details.type||null;var n=!1,r=!1,i=e.details.fragments,o=this._playableRegionStartTime,a=this._playableRegionDuration;if(0!==i.length){if(this._playableRegionStartTime!==i[0].start&&(n=!0,this._playableRegionStartTime=i[0].start),n)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,l=this._now-s.local,u=(s.remote+l)/1e3;u<i[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*i[0].start}:u>o+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,o+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(i[0].start+this._extrapolatedWindowDuration/2)};var c=e.details.totalduration;if(this._playbackType===m.default.LIVE){var d=e.details.targetduration,h=this.options.playback||{},p=h.liveSyncDurationCount||f.default.DefaultConfig.liveSyncDurationCount,y=d*p;y<=c?(c-=y,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(r=!0,this._playableRegionDuration=c);var g=i[0].start+c,v=o+a,b=g!==v;if(b)if(this._localEndTimeCorrelation){var _=this._localEndTimeCorrelation,E=this._now-_.local,T=(_.remote+E)/1e3;T>g?this._localEndTimeCorrelation={local:this._now,remote:1e3*g}:T<g-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(g-this._extrapolatedWindowDuration)}:T>v&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*v})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*g};r&&this._onDurationChange(),n&&this._onProgress()}},e.prototype._onFragmentLoaded=function(t,e){this.trigger(g.default.PLAYBACK_FRAGMENT_LOADED,e)},e.prototype._onLevelSwitch=function(t,e){this.levels.length||this._fillLevels(),this.trigger(g.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(g.default.PLAYBACK_LEVEL_SWITCH,e);var n=this._hls.levels[e.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(g.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(g.default.PLAYBACK_BITRATE,{height:n.height,width:n.width,bandwidth:n.bitrate,bitrate:n.bitrate,level:e.level}))},e.prototype.getPlaybackType=function(){return this._playbackType},e.prototype.isSeekEnabled=function(){return this._playbackType===m.default.VOD||this.dvrEnabled},l(e,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===m.default.LIVE}}]),e}(c.default);e.default=w,w.canPlay=function(t,e){var n=t.split("?")[0].match(/.*\.(.*)$/)||[],r=n.length>1&&"m3u8"===n[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e;return!(!f.default.isSupported()||!r||_.default.isSafari)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(1),u=r(l),c=n(3),d=r(c),f=n(16),h=r(f),p=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(u.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.getPlaybackType=function(){return d.default.AOD},s(e,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),e}(h.default);e.default=p,p.canPlay=function(t,e){var n={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]};return h.default._canPlay("audio",n,t,e)},t.exports=e.default},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),d=n(3),f=i(d),h=n(4),p=i(h),y=n(8),g=i(y),v=n(1),m=i(v),b=n(82),_=i(b),E=n(5),T=i(E),A={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map(function(t){return'video/mp4; codecs="'+t+', mp4a.40.2"'}),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};A.ogv=A.ogg,A["3gp"]=A["3gpp"];var k={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},w=Object.keys(k).reduce(function(t,e){return[].concat(l(t),l(k[e]))},[]),S=function(t){function e(){o(this,e);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var l=a(this,t.call.apply(t,[this].concat(i)));l._loadStarted=!1,l._playheadMoving=!1,l._playheadMovingTimer=null,l._stopped=!1,l._setupSrc(l.options.src),l.options.playback||(l.options.playback=l.options||{}),l.options.playback.disableContextMenu=l.options.playback.disableContextMenu||l.options.disableVideoTagContextMenu;var u=l.options.playback,c=u.preload||(g.default.isSafari?"auto":l.options.preload);return T.default.extend(l.el,{loop:l.options.loop,poster:l.options.poster,preload:c||"metadata",controls:(u.controls||l.options.useVideoTagDefaultControls)&&"controls",crossOrigin:u.crossOrigin,"x-webkit-playsinline":u.playInline}),l.settings={default:["seekbar"]},l.settings.left=["playpause","position","duration"],l.settings.right=["fullscreen","volume","hd-indicator"],l.options.autoPlay&&r.nextTick(function(){return l.play()}),l}return s(e,t),u(e,[{key:"name",get:function(){return"html5_video"}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var t=this.options.src,n=e._mimeTypesForUrl(t,k,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||w.indexOf(n[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeked:"_handleBufferingEvents",seeking:"_handleBufferingEvents",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return!!this._bufferingState}}]),e.prototype._setupSrc=function(t){this.el.src!==t&&(this._src=t,this.el.src=t)},e.prototype._onLoadedMetadata=function(t){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_LOADEDMETADATA,{duration:t.target.duration,data:t}),this._updateSettings();var e="undefined"==typeof this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==f.default.LIVE&&e&&this._checkInitialSeek()},e.prototype._onDurationChange=function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()},e.prototype._updateSettings=function(){this.getPlaybackType()===f.default.VOD||this.getPlaybackType()===f.default.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(m.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.isSeekEnabled=function(){return isFinite(this.getDuration())},e.prototype.getPlaybackType=function(){var t="audio"===this.tagName?f.default.AOD:f.default.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?f.default.LIVE:t},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.play=function(){this.trigger(m.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents(),this.el.play()},e.prototype.pause=function(){this.el.pause()},e.prototype.stop=function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_STOP)},e.prototype.volume=function(t){this.el.volume=t/100},e.prototype.mute=function(){this.el.volume=0},e.prototype.unmute=function(){this.el.volume=1},e.prototype.isMuted=function(){return!!this.el.volume},e.prototype.isPlaying=function(){return!this.el.paused&&!this.el.ended},e.prototype._startPlayheadMovingChecks=function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))},e.prototype._stopPlayheadMovingChecks=function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)},e.prototype._determineIfPlayheadMoving=function(){var t=this._playheadMovingTimeOnCheck,e=this.el.currentTime;this._playheadMoving=t!==e,this._playheadMovingTimeOnCheck=e,this._handleBufferingEvents()},e.prototype._onWaiting=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onLoadedData=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onCanPlay=function(){this._handleBufferingEvents()},e.prototype._onPlaying=function(){this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PLAY)},e.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PAUSE)},e.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_ENDED,this.name)},e.prototype._handleBufferingEvents=function(){var t=!this.el.ended&&!this.el.paused,e=this._loadStarted&&!this.el.ended&&!this._stopped&&(t&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._bufferingState!==e&&(this._bufferingState=e,e?this.trigger(m.default.PLAYBACK_BUFFERING,this.name):this.trigger(m.default.PLAYBACK_BUFFERFULL,this.name))},e.prototype._onError=function(){this.trigger(m.default.PLAYBACK_ERROR,this.el.error,this.name)},e.prototype.destroy=function(){this.$el.remove(),this.el.src="",this._src=null},e.prototype.seek=function(t){this.el.currentTime=t},e.prototype.seekPercentage=function(t){var e=this.el.duration*(t/100);this.seek(e)},e.prototype._checkInitialSeek=function(){var t=(0,c.seekStringToSeconds)(window.location.href);0!==t&&this.seek(t)},e.prototype.getCurrentTime=function(){return this.el.currentTime},e.prototype.getDuration=function(){return this.el.duration},e.prototype._onTimeUpdate=function(){this._handleBufferingEvents(),this.getPlaybackType()===f.default.LIVE?this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:this.el.duration},this.name)},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,n=0;n<this.el.buffered.length;n++)t=[].concat(l(t),[{start:this.el.buffered.start(n),end:this.el.buffered.end(n)}]),this.el.currentTime>=t[n].start&&this.el.currentTime<=t[n].end&&(e=n);var r={start:t[e].start,current:t[e].end,total:this.el.duration};this.trigger(m.default.PLAYBACK_PROGRESS,r,t)}},e.prototype._typeFor=function(t){var n=e._mimeTypesForUrl(t,A,this.options.mimeType);0==n.length&&(n=e._mimeTypesForUrl(t,k,this.options.mimeType));var r=n[0]||"";return r.split(";")[0]},e.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(m.default.PLAYBACK_READY,this.name))},e.prototype.render=function(){var t=p.default.getStyleFor(_.default);return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",function(){return!1}),this.$el.append(t),this._ready(),this},u(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(f.default);e.default=S,S._mimeTypesForUrl=function(t,e,n){var r=(t.split("?")[0].match(/.*\.(.*)$/)||[])[1],i=n||r&&e[r.toLowerCase()]||[];return i.constructor===Array?i:[i]},S._canPlay=function(t,e,n,r){var i=S._mimeTypesForUrl(n,e,r),o=document.createElement(t);return!!i.filter(function(t){return!!o.canPlayType(t).replace(/no/,"")})[0]},S.canPlay=function(t,e){return S._canPlay("audio",k,t,e)||S._canPlay("video",A,t,e)},t.exports=S,t.exports=e.default}).call(e,n(21))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(3),u=r(l),c=n(4),d=r(c),f=n(83),h=r(f),p=n(1),y=r(p),g=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.el.src=n.src,r}return a(e,t),e.prototype.getPlaybackType=function(){return u.default.NO_OP},s(e,[{key:"name",get:function(){return"html_img"}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}}]),e.prototype.render=function(){var t=d.default.getStyleFor(h.default);return this.$el.append(t),this.trigger(y.default.PLAYBACK_READY,this.name),this},e.prototype._onLoad=function(){this.trigger(y.default.PLAYBACK_ENDED,this.name)},e.prototype._onError=function(t){var e="error"===t.type?"load error":"loading aborted";this.trigger(y.default.PLAYBACK_ERROR,{message:e},this.name)},e}(u.default);e.default=g,g.canPlay=function(t){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(t)},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(3),c=r(u),d=n(6),f=r(d),h=n(4),p=r(h),y=n(1),g=r(y),v=n(84),m=r(v),b=n(93),_=r(b),E=function(t){function e(){i(this,e);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var s=o(this,t.call.apply(t,[this].concat(r)));return s._noiseFrameNum=-1,s._started=!1,s}return a(e,t),s(e,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,f.default)(_.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),e.prototype.render=function(){var t=p.default.getStyleFor(m.default),e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:e})),this.$el.append(t),this.trigger(g.default.PLAYBACK_READY,this.name);var n=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&n||this.play(),this},e.prototype.play=function(){this._started||(this._started=!0,this.trigger(g.default.PLAYBACK_PLAY),this._animate())},e.prototype._noise=function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var t=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),e=void 0;try{e=new Uint32Array(t.data.buffer)}catch(i){e=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var n=t.data,r=0;r<n.length;r++)e[r]=n[r]}for(var i=e.length,o=6*Math.random()+4,a=0,s=0,l=0;l<i;){if(a<0){a=o*Math.random();var u=Math.pow(Math.random(),.4);s=255*u<<24}a-=1,e[l++]=s}this.context.putImageData(t,0,0)}},e.prototype._loop=function(){var t=this;this._stop||(this._noise(),this._animationHandle=(0,l.requestAnimationFrame)(function(){return t._loop()}))},e.prototype.destroy=function(){this._animationHandle&&((0,l.cancelAnimationFrame)(this._animationHandle),this._stop=!0)},e.prototype._animate=function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()},e}(c.default);e.default=E,E.canPlay=function(t){return!0},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(13),u=r(l),c=n(1),d=r(c),f=n(3),h=r(f),p=function(t){function e(n){return i(this,e),o(this,t.call(this,n))}return a(e,t),s(e,[{key:"name",get:function(){return"click_to_pause"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,d.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,d.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},e.prototype.click=function(){(this.container.getPlaybackType()!==h.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},e.prototype.settingsUpdate=function(){this.container.$el.removeClass("pointer-enabled"),(this.container.getPlaybackType()!==h.default.LIVE||this.container.isDvrEnabled())&&this.container.$el.addClass("pointer-enabled")},e}(u.default);e.default=p,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(17),u=r(l),c=n(6),d=r(c),f=n(3),h=r(f),p=n(4),y=r(p),g=n(1),v=r(g),m=n(85),b=r(m),_=n(94),E=r(_),T=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.settingsUpdate(),r}return a(e,t),s(e,[{key:"template",get:function(){return(0,d.default)(E.default)}},{key:"name",get:function(){return"dvr_controls"}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,v.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),v.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),v.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.dvrChanged=function(t){this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),t?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr")},e.prototype.click=function(){var t=this.core.mediaControl,e=t.container;e.isPlaying()||e.play(),t.$el.hasClass("dvr")&&e.seek(e.getDuration())},e.prototype.settingsUpdate=function(){var t=this;this.stopListening(),this.shouldRender()&&(this.render(),this.$el.click(function(){return t.click()})),this.bindEvents()},e.prototype.shouldRender=function(){var t=void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls;return t&&this.core.getPlaybackType()===h.default.LIVE},e.prototype.render=function(){return this.style=this.style||y.default.getStyleFor(b.default,{baseUrl:this.core.options.baseUrl}),this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.$el.append(this.style),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},e}(u.default);e.default=T,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(58)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(1),u=r(l),c=n(12),d=r(c),f=n(2),h=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged);var t=this.core.getCurrentContainer();t&&(this.listenTo(t,u.default.CONTAINER_ENDED,this.ended),this.listenTo(t,u.default.CONTAINER_STOP,this.ended))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.ended=function(){var t="undefined"==typeof this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd;t&&f.Fullscreen.isFullscreen()&&this.core.toggleFullscreen()},s(e,[{key:"name",get:function(){return"end_video"}}]),e}(d.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(12),u=r(l),c=n(1),d=r(c),f=n(5),h=r(f),p=n(22),y=r(p),g=n(36),v=r(g),m=(0,h.default)('link[rel="shortcut icon"]'),b=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));
+return r._container=null,r.configure(),r}return a(e,t),s(e,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return m}}]),e.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,d.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure))},e.prototype.bindEvents=function(){this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core.mediaControl,d.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.core.mediaControl.container&&this.containerChanged()},e.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.mediaControl.container,this.listenTo(this._container,d.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,d.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,d.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,d.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,d.default.CONTAINER_ERROR,this.resetIcon),this.resetIcon()},e.prototype.disable=function(){t.prototype.disable.call(this),this.resetIcon()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.resetIcon()},e.prototype.createIcon=function(t){var e=(0,h.default)("<canvas/>");e[0].width=16,e[0].height=16;var n=e[0].getContext("2d");n.fillStyle="#000";var r=(0,h.default)(t).find("path").attr("d"),i=new Path2D(r);n.fill(i);var o=(0,h.default)('<link rel="shortcut icon" type="image/png"/>');return o.attr("href",e[0].toDataURL("image/png")),o},e.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(y.default)),this.changeIcon(this.playIcon)},e.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(v.default)),this.changeIcon(this.pauseIcon)},e.prototype.resetIcon=function(){(0,h.default)('link[rel="shortcut icon"]').remove(),(0,h.default)("head").append(this.oldIcon)},e.prototype.changeIcon=function(t){t&&((0,h.default)('link[rel="shortcut icon"]').remove(),(0,h.default)("head").append(t))},e}(u.default);e.default=b,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(61)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(13),u=r(l),c=n(1),d=r(c),f=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.container.options.gaAccount&&(r.account=r.container.options.gaAccount,r.trackerName=r.container.options.gaTrackerName?r.container.options.gaTrackerName+".":"Clappr.",r.domainName=r.container.options.gaDomainName,r.currentHDState=void 0,r.embedScript()),r}return a(e,t),s(e,[{key:"name",get:function(){return"google_analytics"}}]),e.prototype.embedScript=function(){var t=this;if(window._gat)this.addEventListeners();else{var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("async","async"),e.setAttribute("src","//www.google-analytics.com/ga.js"),e.onload=function(){return t.addEventListeners()},document.body.appendChild(e)}},e.prototype.addEventListeners=function(){var t=this;this.container&&(this.listenTo(this.container,d.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,d.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,d.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,d.default.CONTAINER_VOLUME,function(e){return t.onVolumeChanged(e)}),this.listenTo(this.container,d.default.CONTAINER_SEEK,function(e){return t.onSeek(e)}),this.listenTo(this.container,d.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,d.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.onDVR)),_gaq.push([this.trackerName+"_setAccount",this.account]),this.domainName&&_gaq.push([this.trackerName+"_setDomainName",this.domainName])},e.prototype.onReady=function(){this.push(["Video","Playback",this.container.playback.name])},e.prototype.onPlay=function(){this.push(["Video","Play",this.container.playback.src])},e.prototype.onStop=function(){this.push(["Video","Stop",this.container.playback.src])},e.prototype.onEnded=function(){this.push(["Video","Ended",this.container.playback.src])},e.prototype.onBuffering=function(){this.push(["Video","Buffering",this.container.playback.src])},e.prototype.onBufferFull=function(){this.push(["Video","Bufferfull",this.container.playback.src])},e.prototype.onError=function(){this.push(["Video","Error",this.container.playback.src])},e.prototype.onHD=function(t){var e=t?"ON":"OFF";e!==this.currentHDState&&(this.currentHDState=e,this.push(["Video","HD - "+e,this.container.playback.src]))},e.prototype.onPlaybackChanged=function(t){null!==t.type&&this.push(["Video","Playback Type - "+t.type,this.container.playback.src])},e.prototype.onDVR=function(t){var e=t?"ON":"OFF";this.push(["Interaction","DVR - "+e,this.container.playback.src])},e.prototype.onPause=function(){this.push(["Video","Pause",this.container.playback.src])},e.prototype.onSeek=function(){this.push(["Video","Seek",this.container.playback.src])},e.prototype.onVolumeChanged=function(){this.push(["Interaction","Volume",this.container.playback.src])},e.prototype.onFullscreen=function(){this.push(["Interaction","Fullscreen",this.container.playback.src])},e.prototype.push=function(t){var e=[this.trackerName+"_trackEvent"].concat(t);_gaq.push(e)},e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(63)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=n(20),o="font-weight: bold; font-size: 13px;",a="color: #006600;"+o,s="color: #0000ff;"+o,l="color: #ff8000;"+o,u="color: #ff0000;"+o,c=0,d=1,f=2,h=3,p=h,y=[s,a,l,u,u],g=["debug","info","warn","error","disabled"],v=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;r(this,t),this.kibo=new i.Kibo,this.kibo.down(["ctrl shift d"],function(){return e.onOff()}),this.BLACKLIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=n,this.offLevel=o}return t.prototype.debug=function(t){this.log(t,c,Array.prototype.slice.call(arguments,1))},t.prototype.info=function(t){this.log(t,d,Array.prototype.slice.call(arguments,1))},t.prototype.warn=function(t){this.log(t,f,Array.prototype.slice.call(arguments,1))},t.prototype.error=function(t){this.log(t,h,Array.prototype.slice.call(arguments,1))},t.prototype.onOff=function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+g[this.level],l)},t.prototype.level=function(t){this.level=t},t.prototype.log=function(t,e,n){if(!(this.BLACKLIST.indexOf(n[0])>=0||e<this.level)){n||(n=t,t=null);var r=y[e],i="";t&&(i="["+t+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+g[e]+"]"+i,r].concat(n))}},t}();e.default=v,v.LEVEL_DEBUG=c,v.LEVEL_INFO=d,v.LEVEL_WARN=f,v.LEVEL_ERROR=h,v.getInstance=function(){return void 0===this._instance&&(this._instance=new this,this._instance.previousLevel=this._instance.level,this._instance.level=this._instance.offLevel),this._instance},v.setLevel=function(t){this.getInstance().level=t},v.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},v.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},v.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},v.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},t.exports=e.default},function(t,e,n){(function(r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(14),c=i(u),d=n(1),f=i(d),h=n(4),p=i(h),y=n(6),g=i(y),v=n(3),m=i(v),b=n(86),_=i(b),E=n(95),T=i(E),A=n(22),k=i(A),w=function(t){function e(n){o(this,e);var i=a(this,t.call(this,n));return i.hasStartedPlaying=!1,i.playRequested=!1,i.render(),r.nextTick(function(){return i.update()}),i}return s(e,t),l(e,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,g.default)(T.default)}},{key:"shouldRender",get:function(){var t=!(!this.options.poster||!this.options.poster.showForNoOp);return"html_img"!==this.container.playback.name&&(this.container.playback.getPlaybackType()!==m.default.NO_OP||t)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,f.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,f.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,f.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,f.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,f.default.CONTAINER_OPTIONS_CHANGE,this.render),this.showOnVideoEnd&&this.listenTo(this.container,f.default.CONTAINER_ENDED,this.onStop)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this)},e.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},e.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},e.prototype.showPlayButton=function(t){!t||this.options.chromeless&&!this.options.allowUserInteraction?(this.$playButton.hide(),this.$el.removeClass("clickable")):(this.$playButton.show(),this.$el.addClass("clickable"))},e.prototype.clicked=function(){return this.options.chromeless&&!this.options.allowUserInteraction||(this.playRequested=!0,this.update(),this.container.play()),!1},e.prototype.shouldHideOnPlay=function(){return!this.container.playback.isAudioOnly},e.prototype.update=function(){if(this.shouldRender){var t=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.showPlayButton(t),this.hasStartedPlaying?(this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()):(this.container.disableMediaControl(),this.$el.show())}},e.prototype.render=function(){if(this.shouldRender){var t=p.default.getStyleFor(_.default,{baseUrl:this.options.baseUrl});if(this.$el.html(this.template()),this.$el.append(t),this.options.poster){var e=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+e+")"})}this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(k.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var n=this.options.mediacontrol&&this.options.mediacontrol.buttons;return n&&this.$el.find("svg path").css("fill",n),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(n=this.options.mediacontrol.buttons,this.$playButton.css("color",n)),this.update(),this}},e}(c.default);e.default=w,t.exports=e.default}).call(e,n(21))},function(t,e,n){"use strict";t.exports=n(68)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(17),c=r(u),d=n(4),f=r(d),h=n(6),p=r(h),y=n(1),g=r(y),v=n(3),m=r(v),b=n(87),_=r(b),E=n(96),T=r(E),A=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.hoveringOverSeekBar=!1,r.hoverPosition=null,r.duration=null,r.actualLiveTime=!!r.mediaControl.options.actualLiveTime,r.actualLiveTime&&(r.mediaControl.options.actualLiveServerTime?r.actualLiveServerTimeDiff=(new Date).getTime()-new Date(r.mediaControl.options.actualLiveServerTime).getTime():r.actualLiveServerTimeDiff=0),r}return a(e,t),s(e,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,p.default)(T.default)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===m.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.useActualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),e.prototype.bindEvents=function(){this.listenTo(this.mediaControl,g.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,g.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,g.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,g.default.CONTAINER_TIMEUPDATE,this.updateDuration))},e.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.updateDuration=function(t){this.duration=t.total,this.update()},e.prototype.showTime=function(t){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(t),this.update()},e.prototype.hideTime=function(){this.hoveringOverSeekBar=!1,this.update()},e.prototype.calculateHoverPosition=function(t){var e=t.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(e/this.mediaControl.$seekBarContainer.width(),0))},e.prototype.getSeekTime=function(){var t=void 0,e=void 0;if(this.useActualLiveTime){var n=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),r=new Date(n);e=(r-n.setHours(0,0,0,0))/1e3,t=e-this.duration+this.hoverPosition*this.duration,t<0&&(t+=86400)}else t=this.hoverPosition*this.duration;return{seekTime:t,secondsSinceMidnight:e}},e.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var t=this.getSeekTime(),e=(0,l.formatTime)(t.seekTime,this.useActualLiveTime);if(e!==this.displayedSeekTime&&(this.$seekTimeEl.text(e),this.displayedSeekTime=e),this.durationShown){this.$durationEl.show();var n=(0,l.formatTime)(this.actualLiveTime?t.secondsSinceMidnight:this.duration,this.actualLiveTime);n!==this.displayedDuration&&(this.$durationEl.text(n),this.displayedDuration=n)}else this.$durationEl.hide();this.$el.show();var r=this.mediaControl.$seekBarContainer.width(),i=this.$el.width(),o=this.hoverPosition*r;o-=i/2,o=Math.max(0,Math.min(o,r-i)),this.$el.css("left",o)}else this.$el.hide(),this.$el.css("left","-100%")},e.prototype.shouldBeVisible=function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&null!==this.hoverPosition&&null!==this.duration},e.prototype.render=function(){this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null;var t=f.default.getStyleFor(_.default);this.$el.html(this.template()),this.$el.append(t),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.find("[data-duration]"),this.$durationEl.hide(),this.update()},e}(c.default);e.default=A,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(12),u=r(l),c=n(1),d=r(c),f=function(t){function e(){return i(this,e),o(this,t.apply(this,arguments))}return a(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,d.default.CORE_CONTAINERS_CREATED,this.onContainersCreated)},e.prototype.onContainersCreated=function(){var t=this.core.containers.filter(function(t){return"no_op"!==t.playback.name})[0]||this.core.containers[0];t&&this.core.containers.forEach(function(e){e!==t&&e.destroy()})},s(e,[{key:"name",get:function(){return"sources"}}]),e}(u.default);e.default=f,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(71)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(14),u=r(l),c=n(1),d=r(c),f=n(4),h=r(f),p=n(6),y=r(p),g=n(97),v=r(g),m=n(88),b=r(m),_=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.template=(0,y.default)(v.default),r.showTimeout=null,r.listenTo(r.container,d.default.CONTAINER_STATE_BUFFERING,r.onBuffering),r.listenTo(r.container,d.default.CONTAINER_STATE_BUFFERFULL,r.onBufferFull),r.listenTo(r.container,d.default.CONTAINER_STOP,r.onStop),r.listenTo(r.container,d.default.CONTAINER_ENDED,r.onStop),r.listenTo(r.container,d.default.CONTAINER_ERROR,r.onStop),r.render(),r}return a(e,t),s(e,[{key:"name",get:function(){return"spinner"}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}}]),e.prototype.onBuffering=function(){this.show()},e.prototype.onBufferFull=function(){this.hide()},e.prototype.onStop=function(){this.hide()},e.prototype.show=function(){var t=this;null===this.showTimeout&&(this.showTimeout=setTimeout(function(){return t.$el.show()},300))},e.prototype.hide=function(){null!==this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()},e.prototype.render=function(){this.$el.html(this.template());var t=h.default.getStyleFor(b.default);return this.container.$el.append(t),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},e}(u.default);e.default=_,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(73)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(13),u=r(l),c=n(1),d=r(c),f=n(5),h=r(f),p=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.setInitialAttrs(),r.reportInterval=r.options.reportInterval||5e3,r.state="IDLE",r}return a(e,t),s(e,[{key:"name",get:function(){return"stats"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container.playback,d.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,d.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,d.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,d.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,d.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,d.default.PLAYBACK_STATS_ADD,this.onStatsAdd)},e.prototype.setInitialAttrs=function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}},e.prototype.onPlay=function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))},e.prototype.onStop=function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"},e.prototype.onBuffering=function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++},e.prototype.onBufferFull=function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"},e.prototype.getRebufferingTime=function(){return Date.now()-this.rebufferingTimeInit},e.prototype.getWatchingTime=function(){var t=Date.now()-this.watchingTimeInit;return t-this.rebufferingTime},e.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},e.prototype.onStatsAdd=function(t){h.default.extend(this.externalMetrics,t)},e.prototype.getStats=function(){var t={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return h.default.extend(t,this.externalMetrics),t},e.prototype.report=function(){this.container.statsReport(this.getStats())},e}(u.default);e.default=p,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(2),u=n(12),c=r(u),d=n(35),f=r(d),h=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r._initializeMessages(),r}return a(e,t),s(e,[{key:"name",get:function(){return"strings"}}]),e.prototype.t=function(t){var e=this._language(),n=e&&this._messages[e]||this._messages.en;return n[t]||t},e.prototype._language=function(){return this.core.options.language||(0,l.getBrowserLanguage)()},e.prototype._initializeMessages=function(){this._messages=(0,f.default)({en:{live:"live",back_to_live:"back to live",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser."},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente."},es:{live:"vivo",back_to_live:"volver en vivo",playback_not_supported:"Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."}},this.core.options.strings||{}),this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["es-419"]=this._messages.es},e}(c.default);e.default=h,t.exports=e.default},function(t,e,n){"use strict";t.exports=n(76)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(14),u=r(l),c=n(1),d=r(c),f=n(4),h=r(f),p=n(6),y=r(p),g=n(89),v=r(g),m=n(98),b=r(m),_=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.configure(),r}return a(e,t),s(e,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,y.default)(b.default)}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,d.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,d.default.CONTAINER_OPTIONS_CHANGE,this.configure)},e.prototype.configure=function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()},e.prototype.onPlay=function(){this.hidden||this.$el.show()},e.prototype.onStop=function(){this.$el.hide()},e.prototype.render=function(){this.$el.hide();var t={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};this.$el.html(this.template(t));var e=h.default.getStyleFor(v.default);return this.container.$el.append(e),this.container.$el.append(this.$el),this},e}(u.default);e.default=_,t.exports=e.default},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.element=t||window.document,this.initialize()};n.KEY_NAMES_BY_CODE={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"caps_lock",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},n.KEY_CODES_BY_NAME={},function(){for(var t in n.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(n.KEY_NAMES_BY_CODE,t)&&(n.KEY_CODES_BY_NAME[n.KEY_NAMES_BY_CODE[t]]=+t)}(),n.MODIFIERS=["shift","ctrl","alt"],n.registerEvent=function(){return document.addEventListener?function(t,e,n){t.addEventListener(e,n,!1)}:document.attachEvent?function(t,e,n){t.attachEvent("on"+e,n)}:void 0}(),n.unregisterEvent=function(){return document.removeEventListener?function(t,e,n){t.removeEventListener(e,n,!1)}:document.detachEvent?function(t,e,n){t.detachEvent("on"+e,n)}:void 0;
+}(),n.stringContains=function(t,e){return t.indexOf(e)!==-1},n.neatString=function(t){return t.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},n.capitalize=function(t){return t.toLowerCase().replace(/^./,function(t){return t.toUpperCase()})},n.isString=function(t){return n.stringContains(Object.prototype.toString.call(t),"String")},n.arrayIncludes=function(){return Array.prototype.indexOf?function(t,e){return t.indexOf(e)!==-1}:function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}}(),n.extractModifiers=function(t){var e,r;for(e=[],r=0;r<n.MODIFIERS.length;r++)n.stringContains(t,n.MODIFIERS[r])&&e.push(n.MODIFIERS[r]);return e},n.extractKey=function(t){var e,r;for(e=n.neatString(t).split(" "),r=0;r<e.length;r++)if(!n.arrayIncludes(n.MODIFIERS,e[r]))return e[r]},n.modifiersAndKey=function(t){var e,r;return n.stringContains(t,"any")?n.neatString(t).split(" ").slice(0,2).join(" "):(e=n.extractModifiers(t),r=n.extractKey(t),r&&!n.arrayIncludes(n.MODIFIERS,r)&&e.push(r),e.join(" "))},n.keyName=function(t){return n.KEY_NAMES_BY_CODE[t+""]},n.keyCode=function(t){return+n.KEY_CODES_BY_NAME[t]},n.prototype.initialize=function(){var t,e=this;for(this.lastKeyCode=-1,this.lastModifiers={},t=0;t<n.MODIFIERS.length;t++)this.lastModifiers[n.MODIFIERS[t]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),n.registerEvent(this.element,"keydown",this.downHandler),n.registerEvent(this.element,"keyup",this.upHandler),n.registerEvent(window,"unload",function t(){n.unregisterEvent(e.element,"keydown",e.downHandler),n.unregisterEvent(e.element,"keyup",e.upHandler),n.unregisterEvent(window,"unload",t)})},n.prototype.handler=function(t){var e=this;return function(r){var i,o,a;for(r=r||window.event,e.lastKeyCode=r.keyCode,i=0;i<n.MODIFIERS.length;i++)e.lastModifiers[n.MODIFIERS[i]]=r[n.MODIFIERS[i]+"Key"];for(n.arrayIncludes(n.MODIFIERS,n.keyName(e.lastKeyCode))&&(e.lastModifiers[n.keyName(e.lastKeyCode)]=!0),o=e["keys"+n.capitalize(t)],i=0;i<o.any.length;i++)o.any[i](r)===!1&&r.preventDefault&&r.preventDefault();if(a=e.lastModifiersAndKey(),o[a])for(i=0;i<o[a].length;i++)o[a][i](r)===!1&&r.preventDefault&&r.preventDefault()}},n.prototype.registerKeys=function(t,e,r){var i,o,a=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),i=0;i<e.length;i++)o=e[i],o=n.modifiersAndKey(o+""),a[o]?a[o].push(r):a[o]=[r];return this},n.prototype.unregisterKeys=function(t,e,r){var i,o,a,s=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),i=0;i<e.length;i++)if(a=e[i],a=n.modifiersAndKey(a+""),null===r)delete s[a];else if(s[a])for(o=0;o<s[a].length;o++)if(String(s[a][o])===String(r)){s[a].splice(o,1);break}return this},n.prototype.off=function(t){return this.unregisterKeys("down",t,null)},n.prototype.delegate=function(t,e,n){return null!==n||void 0!==n?this.registerKeys(t,e,n):this.unregisterKeys(t,e,n)},n.prototype.down=function(t,e){return this.delegate("down",t,e)},n.prototype.up=function(t,e){return this.delegate("up",t,e)},n.prototype.lastKey=function(t){return t?this.lastModifiers[t]:n.keyName(this.lastKeyCode)},n.prototype.lastModifiersAndKey=function(){var t,e;for(t=[],e=0;e<n.MODIFIERS.length;e++)this.lastKey(n.MODIFIERS[e])&&t.push(n.MODIFIERS[e]);return n.arrayIncludes(t,this.lastKey())||t.push(this.lastKey()),t.join(" ")},e.default=n,t.exports=e.default},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".container[data-container]{position:absolute;background-color:#000;height:100%;width:100%}.container[data-container] .chromeless{cursor:default}[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled{cursor:pointer}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url('+n(110)+') format("truetype")}[data-player]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);position:relative;margin:0;padding:0;border:0;font-style:normal;font-weight:400;text-align:center;overflow:hidden;font-size:100%;font-family:Roboto,Open Sans,Arial,sans-serif;text-shadow:0 0 0;box-sizing:border-box}[data-player] a,[data-player] abbr,[data-player] acronym,[data-player] address,[data-player] applet,[data-player] article,[data-player] aside,[data-player] audio,[data-player] b,[data-player] big,[data-player] blockquote,[data-player] canvas,[data-player] caption,[data-player] center,[data-player] cite,[data-player] code,[data-player] dd,[data-player] del,[data-player] details,[data-player] dfn,[data-player] div,[data-player] dl,[data-player] dt,[data-player] em,[data-player] embed,[data-player] fieldset,[data-player] figcaption,[data-player] figure,[data-player] footer,[data-player] form,[data-player] h1,[data-player] h2,[data-player] h3,[data-player] h4,[data-player] h5,[data-player] h6,[data-player] header,[data-player] hgroup,[data-player] i,[data-player] iframe,[data-player] img,[data-player] ins,[data-player] kbd,[data-player] label,[data-player] legend,[data-player] li,[data-player] mark,[data-player] menu,[data-player] nav,[data-player] object,[data-player] ol,[data-player] output,[data-player] p,[data-player] pre,[data-player] q,[data-player] ruby,[data-player] s,[data-player] samp,[data-player] section,[data-player] small,[data-player] span,[data-player] strike,[data-player] strong,[data-player] sub,[data-player] summary,[data-player] sup,[data-player] table,[data-player] tbody,[data-player] td,[data-player] tfoot,[data-player] th,[data-player] thead,[data-player] time,[data-player] tr,[data-player] tt,[data-player] u,[data-player] ul,[data-player] var,[data-player] video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}[data-player] table{border-collapse:collapse;border-spacing:0}[data-player] caption,[data-player] td,[data-player] th{text-align:left;font-weight:400;vertical-align:middle}[data-player] blockquote,[data-player] q{quotes:none}[data-player] blockquote:after,[data-player] blockquote:before,[data-player] q:after,[data-player] q:before{content:"";content:none}[data-player] a img{border:none}[data-player]:focus{outline:0}[data-player] *{max-width:none;box-sizing:inherit;float:none}[data-player] div{display:block}[data-player].fullscreen{width:100%!important;height:100%!important;top:0;left:0}[data-player].nocursor{cursor:none}.clappr-style{display:none!important}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".media-control-notransition{-webkit-transition:none!important;transition:none!important}.media-control[data-media-control]{position:absolute;width:100%;height:100%;z-index:9999;pointer-events:none}.media-control[data-media-control].dragging{pointer-events:auto;cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(37)+"),move}.media-control[data-media-control].dragging *{cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(37)+'),move}.media-control[data-media-control] .media-control-background[data-background]{position:absolute;height:40%;width:100%;bottom:0;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.9));background:linear-gradient(transparent,rgba(0,0,0,.9));-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.media-control[data-media-control] .media-control-icon{line-height:0;letter-spacing:0;speak:none;color:#fff;opacity:.5;vertical-align:middle;text-align:left;-webkit-transition:all .1s ease;transition:all .1s ease}.media-control[data-media-control] .media-control-icon:hover{color:#fff;opacity:.75;text-shadow:hsla(0,0%,100%,.8) 0 0 5px}.media-control[data-media-control].media-control-hide .media-control-background[data-background]{opacity:0}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls]{bottom:-50px}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls]{position:absolute;bottom:7px;width:100%;height:32px;font-size:0;vertical-align:middle;pointer-events:auto;-webkit-transition:bottom .4s ease-out;transition:bottom .4s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control]{position:absolute;top:0;left:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control]{height:100%;text-align:center;line-height:32px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control]{position:absolute;top:0;right:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button{background-color:transparent;border:0;margin:0 6px;padding:0;cursor:pointer;display:inline-block;width:32px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg{width:100%;height:22px}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus{outline:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop]{float:left;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen]{float:right;background-color:transparent;border:0;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator]{cursor:default;float:right;background-color:transparent;border:0;height:100%;display:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled{opacity:1;display:block}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover{opacity:1;text-shadow:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop]{float:left}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration],.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{display:inline-block;font-size:10px;color:#fff;cursor:default;line-height:32px;position:relative}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{margin:0 6px 0 7px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]{color:hsla(0,0%,100%,.5);margin-right:6px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before{content:"|";margin-right:7px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{position:absolute;top:-20px;left:0;display:inline-block;vertical-align:middle;width:100%;height:25px;cursor:pointer}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{width:100%;height:1px;position:relative;top:12px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled{cursor:default}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2px;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume]{float:right;display:inline-block;height:32px;cursor:pointer;margin:0 6px;box-sizing:border-box}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume]{float:left;bottom:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]{background-color:transparent;border:0;box-sizing:content-box;width:32px;height:32px;opacity:.5}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover{opacity:.75}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg{height:24px;position:relative;top:3px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg{margin-left:2px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume]{float:left;position:relative;overflow:hidden;top:6px;width:42px;height:18px;padding:3px 0;-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume]{height:1px;position:relative;top:7px;margin:0 3px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:0;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]{float:left;width:4px;padding-left:2px;height:12px;opacity:.5;box-shadow:inset 2px 0 0 #fff;-webkit-transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill{box-shadow:inset 2px 0 0 #fff;opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1){padding-left:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover{-webkit-transform:scaleY(1.5);transform:scaleY(1.5)}.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide{width:0;height:12px;top:9px;padding:0}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".clappr-flash-playback[data-flash-playback]{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-html5-video]{position:absolute;height:100%;width:100%;display:block}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-html-img]{max-width:100%;max-height:100%}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-no-op]{position:absolute;height:100%;width:100%;text-align:center}[data-no-op] p[data-no-op-msg]{position:absolute;text-align:center;font-size:25px;left:0;right:0;color:#fff;padding:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);max-height:100%;overflow:auto}[data-no-op] canvas[data-no-op-canvas]{background-color:#777;height:100%;width:100%}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'.dvr-controls[data-dvr-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.dvr-controls[data-dvr-controls] .live-info{cursor:default;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase}.dvr-controls[data-dvr-controls] .live-info:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#ff0101}.dvr-controls[data-dvr-controls] .live-info.disabled{opacity:.3}.dvr-controls[data-dvr-controls] .live-info.disabled:before{background-color:#fff}.dvr-controls[data-dvr-controls] .live-button{cursor:pointer;outline:none;display:none;border:0;color:#fff;background-color:transparent;height:32px;padding:0;opacity:.7;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase;-webkit-transition:all .1s ease;transition:all .1s ease}.dvr-controls[data-dvr-controls] .live-button:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#fff}.dvr-controls[data-dvr-controls] .live-button:hover{opacity:1;text-shadow:hsla(0,0%,100%,.75) 0 0 5px}.dvr .dvr-controls[data-dvr-controls] .live-info{display:none}.dvr .dvr-controls[data-dvr-controls] .live-button{display:block}.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#005aff}.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#ff0101}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".player-poster[data-poster]{display:-webkit-box;display:-moz-box;display:box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;box-pack:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-ms-flex-pack:center;-webkit-box-align:center;box-align:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-ms-flex-align:center;position:absolute;height:100%;width:100%;z-index:998;top:0;left:0;background-color:#000;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.player-poster[data-poster].clickable{cursor:pointer}.player-poster[data-poster]:hover .play-wrapper[data-poster]{opacity:1}.player-poster[data-poster] .play-wrapper[data-poster]{width:100%;height:25%;margin:0 auto;opacity:.75;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.player-poster[data-poster] .play-wrapper[data-poster] svg{height:100%}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#fff}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,'.seek-time[data-seek-time]{position:absolute;white-space:nowrap;height:20px;line-height:20px;font-size:0;left:-100%;bottom:55px;background-color:rgba(2,2,2,.5);z-index:9999;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.seek-time[data-seek-time].hidden[data-seek-time]{opacity:0}.seek-time[data-seek-time] [data-seek-time]{display:inline-block;color:#fff;font-size:10px;padding-left:7px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]{display:inline-block;color:hsla(0,0%,100%,.5);font-size:10px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]:before{content:"|";margin-right:7px}',""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,".spinner-three-bounce[data-spinner]{position:absolute;margin:0 auto;width:70px;text-align:center;z-index:999;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.spinner-three-bounce[data-spinner]>div{width:18px;height:18px;background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner-three-bounce[data-spinner] [data-bounce1]{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner-three-bounce[data-spinner] [data-bounce2]{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}",""])},function(t,e,n){e=t.exports=n(7)(),e.push([t.id,"[data-watermark]{position:absolute;min-width:70px;max-width:200px;width:12%;text-align:center;z-index:10}[data-watermark] a{outline:none;cursor:pointer}[data-watermark] img{max-width:100%}[data-watermark-bottom-left]{bottom:10px;left:10px}[data-watermark-bottom-right]{bottom:10px;right:42px}[data-watermark-top-left]{top:10px;left:10px}[data-watermark-top-right]{top:10px;right:37px}",""])},function(t,e,n){var r,r;!function(e){t.exports=e()}(function(){return function t(e,n,i){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof r&&r;if(!l&&u)return r(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[s]={exports:{}};e[s][0].call(d.exports,function(t){var n=e[s][1][t];return o(n?n:t)},d,d.exports,t,e,n,i)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),r=u.length,l=0;l<r;l++)u[l].apply(this,o);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],2:[function(t,e,n){var r=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function n(t){g[t]=!0;for(var e in i[t][1]){var r=i[t][1][e];g[r]||n(r)}}for(var s,l=Object.keys(o),u=0,c=l.length;u<c;u++){var d=l[u],f=o[d].exports;if(f===t||f&&f.default===t){s=d;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var h={},u=0,c=l.length;u<c;u++){var d=l[u];h[d]=d}i[s]=[Function(["require","module","exports"],"("+t+")(self)"),h]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),y={};y[s]=s,i[p]=[Function(["require"],"var f = require("+a(s)+");(f.default ? f.default : f)(self);"),y];var g={};n(p);var v="("+r+")({"+Object.keys(g).map(function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"}).join(",")+"},{},["+a(p)+"])",m=window.URL||window.webkitURL||window.mozURL||window.msURL,b=new Blob([v],{type:"text/javascript"});if(e&&e.bare)return b;var _=m.createObjectURL(b),E=new Worker(_);return E.objectURL=_,E}},{}],3:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(28),h=r(f),p=t(24),y=t(43),g=t(8),v=r(g),m=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR));return n.lastLoadedFragLevel=0,n._autoLevelCapping=-1,n._nextAutoLevel=-1,n.hls=t,n.onCheck=n.abandonRulesCheck.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){this.clearTimer(),d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(t){var e=t.frag;if("main"===e.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this.bwEstimator){var n=this.hls,r=t.frag.level,i=n.levels[r].details.live,o=n.config,a=void 0,s=void 0;i?(a=o.abrEwmaFastLive,s=o.abrEwmaSlowLive):(a=o.abrEwmaFastVoD,s=o.abrEwmaSlowVoD),this.bwEstimator=new v.default(n,s,a,o.abrEwmaDefaultEstimate)}this.fragCurrent=e}}},{key:"abandonRulesCheck",value:function(){var t=this.hls,e=t.media,n=this.fragCurrent,r=n.loader;if(!r||r.stats&&r.stats.aborted)return y.logger.warn("frag loader destroy or aborted, disarm abandonRules"),void this.clearTimer();var i=r.stats;if(e&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var o=performance.now()-i.trequest,a=Math.abs(e.playbackRate);if(o>500*n.duration/a){var s=t.levels,l=Math.max(1,i.bw?i.bw/8:1e3*i.loaded/o),c=i.total?i.total:Math.max(i.loaded,Math.round(n.duration*s[n.level].bitrate/8)),d=e.currentTime,f=(c-i.loaded)/l,p=(h.default.bufferInfo(e,d,t.config.maxBufferHole).end-d)/a;
+if(p<2*n.duration/a&&f>p){var g=void 0,v=void 0;for(v=n.level-1;v>=0&&(g=n.duration*s[v].bitrate/(6.4*l),!(g<p));v--);g<f&&(v=Math.max(0,v),y.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+g.toFixed(1)+"<"+f.toFixed(1)+":"+p.toFixed(1)),t.nextLoadLevel=v,this.bwEstimator.sample(o,i.loaded),r.abort(),this.clearTimer(),t.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:i}))}}}}},{key:"onFragLoaded",value:function(t){var e=t.frag;if("main"===e.type&&(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,t.frag.bitrateTest)){var n=t.stats;n.tparsed=n.tbuffered=n.tload,this.onFragBuffered(t)}}},{key:"onFragBuffered",value:function(t){var e=t.stats,n=t.frag;if(e.aborted!==!0&&1===n.loadCounter&&"main"===n.type&&(!n.bitrateTest||e.tload===e.tbuffered)){var r=e.tbuffered-e.trequest;y.logger.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this.bwEstimator.sample(r,e.loaded),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}}},{key:"onError",value:function(t){switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}}},{key:"clearTimer",value:function(){this.timer&&(clearInterval(this.timer),this.timer=null)}},{key:"findBestLevel",value:function(t,e,n,r,i,o,a,s,l){for(var u=i;u>=r;u--){var c=l[u],d=c.details,f=d?d.totalduration/d.fragments.length:e,h=void 0;h=u<=t?a*n:s*n;var p=l[u].bitrate,g=p*f/h;if(y.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(h)+"/"+p+"/"+f+"/"+o+"/"+g),h>p&&(!g||g<o))return u}return-1}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){this._autoLevelCapping=t}},{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator,n=this.hls,r=n.levels,i=n.config.minAutoBitrate;if(!(t===-1||e&&e.canEstimate()))return Math.min(t,this.maxAutoLevel);var o=this.nextABRAutoLevel;if(t!==-1&&(o=Math.min(t,o)),void 0!==i)for(;r[o].bitrate<i;)o++;return o},set:function(t){this._nextAutoLevel=t}},{key:"minAutoLevel",get:function(){for(var t=this.hls,e=t.levels,n=t.config.minAutoBitrate,r=0;r<e.length;r++)if(e[r].bitrate>n)return r;return 0}},{key:"maxAutoLevel",get:function(){var t,e=this.hls.levels,n=this._autoLevelCapping;return t=n===-1&&e&&e.length?e.length-1:n}},{key:"nextABRAutoLevel",get:function(){var t=this.hls,e=this.maxAutoLevel,n=t.levels,r=t.config,i=this.minAutoLevel,o=t.media,a=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=o?o.currentTime:0,u=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,d=(h.default.bufferInfo(o,l,r.maxBufferHole).end-l)/u,f=this.findBestLevel(a,s,c,i,e,d,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(f>=0)return f;y.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=r.maxStarvationDelay,g=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(p=r.maxLoadingDelay-m,y.logger.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),g=v=1)}return f=this.findBestLevel(a,s,c,i,e,d+p,g,v,n),Math.max(f,0)}}]),e}(d.default);n.default=m},{24:24,25:25,26:26,28:28,43:43,8:8}],4:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(39),u=r(l),c=t(28),d=r(c),f=t(20),h=r(f),p=t(26),y=r(p),g=t(25),v=r(g),m=t(29),b=r(m),_=t(45),E=r(_),T=t(24),A=t(43),k={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},w=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,y.default.MEDIA_ATTACHED,y.default.MEDIA_DETACHING,y.default.AUDIO_TRACKS_UPDATED,y.default.AUDIO_TRACK_SWITCH,y.default.AUDIO_TRACK_LOADED,y.default.KEY_LOADED,y.default.FRAG_LOADED,y.default.FRAG_PARSING_INIT_SEGMENT,y.default.FRAG_PARSING_DATA,y.default.FRAG_PARSED,y.default.ERROR,y.default.BUFFER_CREATED,y.default.BUFFER_APPENDED,y.default.BUFFER_FLUSHED));return n.config=t.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=k.STOPPED}},{key:"startLoad",value:function(t){if(this.tracks){var e=this.media,n=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,e&&n?(A.logger.log("configure startPosition @"+n),this.state=k.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=k.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=k.STOPPED}},{key:"stopLoad",value:function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var t,e,n,r=this.hls,i=r.config;switch(this.state){case k.ERROR:case k.PAUSED:break;case k.STARTING:this.state=k.WAITING_TRACK,this.loadedmetadata=!1;break;case k.IDLE:if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;t=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition;var o=this.mediaBuffer?this.mediaBuffer:this.media,a=d.default.bufferInfo(o,t,i.maxBufferHole),s=a.len,l=a.end,c=this.fragPrevious,f=i.maxMaxBufferLength;if(s<f&&this.trackId<this.tracks.length){if(n=this.tracks[this.trackId].details,"undefined"==typeof n){this.state=k.WAITING_TRACK;break}if(!n.live&&c&&c.sn===n.endSN&&(!this.media.seeking||this.media.duration-l<c.duration/2)){this.hls.trigger(y.default.BUFFER_EOS,{type:"audio"}),this.state=k.ENDED;break}var h=n.fragments,p=h.length,g=h[0].start,v=h[p-1].start+h[p-1].duration,m=void 0;if(l<g?m=h[0]:!function(){var t=void 0,e=i.maxFragLookUpTolerance;l<v?(l>v-e&&(e=0),t=u.default.search(h,function(t){return t.start+t.duration-e<=l?1:t.start-e>l?-1:0})):t=h[p-1],t&&(m=t,g=t.start,c&&m.level===c.level&&m.sn===c.sn&&(m.sn<n.endSN?(m=h[m.sn+1-n.startSN],A.logger.log("SN just loaded, load next one: "+m.sn)):m=null))}(),m)if(null!=m.decryptdata.uri&&null==m.decryptdata.key)A.logger.log("Loading key for "+m.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId),this.state=k.KEY_LOADING,r.trigger(y.default.KEY_LOADING,{frag:m});else{if(A.logger.log("Loading "+m.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+this.trackId+", currentTime:"+t+",bufferEnd:"+l.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,m.loadCounter){m.loadCounter++;var b=i.fragLoadingLoopThreshold;if(m.loadCounter>b&&Math.abs(this.fragLoadIdx-m.loadIdx)<b)return void r.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:m})}else m.loadCounter=1;m.loadIdx=this.fragLoadIdx,this.fragCurrent=m,this.startFragRequested=!0,r.trigger(y.default.FRAG_LOADING,{frag:m}),this.state=k.FRAG_LOADING}}break;case k.WAITING_TRACK:e=this.tracks[this.trackId],e&&e.details&&(this.state=k.IDLE);break;case k.FRAG_LOADING_WAITING_RETRY:var _=performance.now(),E=this.retryDate;o=this.media;var w=o&&o.seeking;(!E||_>=E||w)&&(A.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=k.IDLE);break;case k.STOPPED:case k.FRAG_LOADING:case k.PARSING:case k.PARSED:case k.ENDED:}}},{key:"onMediaAttached",value:function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var t=this.media;t&&t.ended&&(A.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.tracks;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){this.state===k.ENDED&&(this.state=k.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaEnded",value:function(){this.startPosition=this.lastCurrentTime=0}},{key:"onAudioTracksUpdated",value:function(t){A.logger.log("audio tracks updated"),this.tracks=t.audioTracks}},{key:"onAudioTrackSwitch",value:function(t){var e=!!t.url;this.trackId=t.id,this.state=k.IDLE,this.fragCurrent=null,this.state=k.PAUSED,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),this.tick()}},{key:"onAudioTrackLoaded",value:function(t){var e=t.details,n=t.id,r=this.tracks[n],i=e.totalduration;if(A.logger.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),e.PTSKnown=!1,r.details=e,!this.startFragRequested){if(this.startPosition===-1){var o=e.startTimeOffset;isNaN(o)?this.startPosition=0:(A.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o)}this.nextLoadPosition=this.startPosition}this.state===k.WAITING_TRACK&&(this.state=k.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===k.KEY_LOADING&&(this.state=k.IDLE,this.tick())}},{key:"onFragLoaded",value:function(t){var e=this.fragCurrent;if(this.state===k.FRAG_LOADING&&e&&"audio"===t.frag.type&&t.frag.level===e.level&&t.frag.sn===e.sn){this.state=k.PARSING,this.stats=t.stats;var n=this.tracks[this.trackId],r=n.details,i=r.totalduration,o=e.start,a=e.level,s=e.sn,l=this.config.defaultAudioCodec||n.audioCodec;this.pendingAppending=0,this.demuxer||(this.demuxer=new h.default(this.hls,"audio")),A.logger.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+a);var u=r.PTSKnown||!r.live;this.demuxer.push(t.payload,l,null,o,e.cc,a,s,i,e.decryptdata,u)}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(t){var e=this.fragCurrent;if(e&&"audio"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING){var n=t.tracks,r=void 0;if(r=n.audio){r.levelCodec="mp4a.40.2",r.id=t.id,this.hls.trigger(y.default.BUFFER_CODECS,n),A.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var i=r.initSegment;i&&(this.pendingAppending++,this.hls.trigger(y.default.BUFFER_APPENDING,{type:"audio",data:i,parent:"audio",content:"initSegment"})),this.tick()}}}},{key:"onFragParsingData",value:function(t){var e=this,n=this.fragCurrent;if(n&&"audio"===t.id&&t.sn===n.sn&&t.level===n.level&&this.state===k.PARSING){var r=this.tracks[this.trackId],i=this.fragCurrent;A.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),b.default.updateFragPTSDTS(r.details,i.sn,t.startPTS,t.endPTS),[t.data1,t.data2].forEach(function(n){n&&(e.pendingAppending++,e.hls.trigger(y.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"audio",content:"data"}))}),this.nextLoadPosition=t.endPTS,this.tick()}}},{key:"onFragParsed",value:function(t){var e=this.fragCurrent;e&&"audio"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING&&(this.stats.tparsed=performance.now(),this.state=k.PARSED,this._checkAppendedParsed())}},{key:"onBufferCreated",value:function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0)}},{key:"onBufferAppended",value:function(t){if("audio"===t.parent)switch(this.state){case k.PARSING:case k.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===k.PARSED&&0===this.pendingAppending){var t=this.fragCurrent,e=this.stats;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),this.hls.trigger(y.default.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;A.logger.log("audio buffered : "+E.default.toString(n.buffered)),this.state=k.IDLE}this.tick()}}},{key:"onError",value:function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!t.fatal){var n=this.fragLoadError;n?n++:n=1;var r=this.config;if(n<=r.fragLoadingMaxRetry){this.fragLoadError=n,e.loadCounter=0;var i=Math.min(Math.pow(2,n-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);A.logger.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=k.FRAG_LOADING_WAITING_RETRY}else A.logger.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.trigger(y.default.ERROR,t),this.state=k.ERROR}break;case T.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case T.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case T.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==k.ERROR&&(this.state=t.fatal?k.ERROR:k.IDLE,A.logger.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."))}}},{key:"onBufferFlushed",value:function(){this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=k.IDLE,this.fragPrevious=null,this.tick()}}]),e}(v.default);n.default=w},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],5:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(43),h=function(t){function e(t){return i(this,e),o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.AUDIO_TRACK_LOADED))}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(){this.tracks=[],this.trackId=-1}},{key:"onManifestLoaded",value:function(t){var e=this,n=t.audioTracks||[],r=!1;this.tracks=n,this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:n});var i=0;n.forEach(function(t){return t.default?(e.audioTrack=i,void(r=!0)):void i++}),r===!1&&n.length&&(f.logger.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)}},{key:"onAudioTrackLoaded",value:function(t){t.id<this.tracks.length&&(f.logger.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*t.details.targetduration)),!t.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))}},{key:"setAudioTrackInternal",value:function(t){if(t>=0&&t<this.tracks.length){this.timer&&(clearInterval(this.timer),this.timer=null),this.trackId=t,f.logger.log("switching to audioTrack "+t);var e=this.tracks[t],n=e.type,r=e.url;this.hls.trigger(u.default.AUDIO_TRACK_SWITCH,{id:t,type:n,url:r});var i=e.details;!r||void 0!==i&&i.live!==!0||(f.logger.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:r,id:t}))}}},{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.trackId===t&&void 0!==this.tracks[t].details||this.setAudioTrackInternal(t)}}]),e}(d.default);n.default=h},{25:25,26:26,43:43}],6:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(43),h=t(24),p=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n}return a(e,t),s(e,[{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onManifestParsed",value:function(t){var e=t.audio,n=t.video,r=0;t.altAudio&&(e||n)&&(r=(e?1:0)+(n?1:0),f.logger.log(r+" sourceBuffer(s) expected")),this.sourceBufferNb=r}},{key:"onMediaAttaching",value:function(t){var e=this.media=t.media;if(e){var n=this.mediaSource=new MediaSource;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(n)}}},{key:"onMediaDetaching",value:function(){f.logger.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){f.logger.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(this.media.removeAttribute("src"),this.media.load()),this.mediaSource=null,this.media=null,this.pendingTracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(u.default.MEDIA_DETACHED)}},{key:"onMediaSourceOpen",value:function(){f.logger.log("media source opened"),this.hls.trigger(u.default.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()}},{key:"checkPendingTracks",value:function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())}},{key:"onMediaSourceClose",value:function(){f.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){f.logger.log("media source ended")}},{key:"onSBUpdateEnd",value:function(){this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1,this.hls.trigger(u.default.BUFFER_APPENDED,{parent:this.parent}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()}},{key:"onSBUpdateError",value:function(t){f.logger.error("sourceBuffer error:"+t),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})}},{key:"onBufferReset",value:function(){var t=this.sourceBuffer;for(var e in t){var n=t[e];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}},{key:"onBufferCodecs",value:function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}}},{key:"createSourceBuffers",value:function(t){var e=this.sourceBuffer,n=this.mediaSource;for(var r in t)if(!e[r]){var i=t[r],o=i.levelCodec||i.codec,a=i.container+";codecs="+o;f.logger.log("creating sourceBuffer("+a+")");try{var s=e[r]=n.addSourceBuffer(a);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),i.buffer=s}catch(t){f.logger.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:a})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:t})}},{key:"onBufferAppending",value:function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())}},{key:"onBufferAppendFail",value:function(t){f.logger.error("sourceBuffer error:"+t.event),this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"onBufferEos",value:function(t){var e=this.sourceBuffer,n=t.type;for(var r in e)n&&r!==n||e[r].ended||(e[r].ended=!0,f.logger.log(r+" sourceBuffer now EOS"));this.checkEos()}},{key:"checkEos",value:function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var n in t){if(!t[n].ended)return;if(t[n].updating)return void(this._needsEos=!0)}f.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment"),e.endOfStream(),this._needsEos=!1}},{key:"onBufferFlushing",value:function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()}},{key:"onLevelUpdated",value:function(t){var e=t.details;0!==e.fragments.length&&(this._levelDuration=e.totalduration+e.fragments[0].start,this.updateMediaElementDuration())}},{key:"updateMediaElementDuration",value:function(){if(null!==this._levelDuration){var t=this.media,e=this.mediaSource,n=this.sourceBuffer;if(t&&e&&n&&0!==t.readyState&&"open"===e.readyState){for(var r in n)if(n[r].updating)return;null===this._msDuration&&(this._msDuration=e.duration),this._levelDuration>this._msDuration&&(f.logger.log("Updating mediasource duration to "+this._levelDuration),e.duration=this._levelDuration,this._msDuration=this._levelDuration)}}}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,n=this.sourceBuffer;for(var r in n)e+=n[r].buffered.length;this.appended=e,this.hls.trigger(u.default.BUFFER_FLUSHED)}}},{key:"doAppending",value:function(){var t=this.hls,e=this.sourceBuffer,n=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void f.logger.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var r=n.shift();try{var i=r.type;e[i]?(e[i].ended=!1,this.parent=r.parent,e[i].appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){f.logger.error("error while trying to append buffer:"+e.message),n.unshift(r);var o={type:h.ErrorTypes.MEDIA_ERROR};if(22===e.code)return this.segments=[],o.details=h.ErrorDetails.BUFFER_FULL_ERROR,void t.trigger(u.default.ERROR,o);if(this.appendError?this.appendError++:this.appendError=1,o.details=h.ErrorDetails.BUFFER_APPEND_ERROR,o.frag=this.fragCurrent,this.appendError>t.config.appendErrorMaxRetry)return f.logger.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],o.fatal=!0,void t.trigger(u.default.ERROR,o);o.fatal=!1,t.trigger(u.default.ERROR,o)}}}}},{key:"flushBuffer",value:function(t,e,n){var r,i,o,a,s,l,u=this.sourceBuffer;if(Object.keys(u).length){if(f.logger.log("flushBuffer,pos/start/end: "+this.media.currentTime+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var c in u)if(!n||c===n){if(r=u[c],r.ended=!1,r.updating)return f.logger.warn("cannot flush, sb updating in progress"),!1;for(i=0;i<r.buffered.length;i++)if(o=r.buffered.start(i),a=r.buffered.end(i),navigator.userAgent.toLowerCase().indexOf("firefox")!==-1&&e===Number.POSITIVE_INFINITY?(s=t,l=e):(s=Math.max(o,t),l=Math.min(a,e)),Math.min(l,a)-s>.5)return this.flushBufferCounter++,f.logger.log("flush "+c+" ["+s+","+l+"], of ["+o+","+a+"], pos:"+this.media.currentTime),r.remove(s,l),!1}}else f.logger.warn("abort flushing too many retries");f.logger.log("buffer flushed")}return!0}}]),e}(d.default);n.default=p},{24:24,25:25,26:26,43:43}],7:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=function(t){function e(t){return i(this,e),o(this,Object.getPrototypeOf(e).call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED))}return a(e,t),s(e,[{key:"destroy",value:function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))}},{key:"onFpsDropLevelCapping",value:function(t){this.restrictedLevels||(this.restrictedLevels=[]),this.isLevelRestricted(t.droppedLevel)||this.restrictedLevels.push(t.droppedLevel)}},{key:"onMediaAttaching",value:function(t){this.media=t.media instanceof HTMLVideoElement?t.media:null}},{key:"onManifestParsed",value:function(t){this.hls.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=t.levels,this.hls.firstLevel=this.getMaxLevel(t.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}},{key:"detectPlayerSize",value:function(){if(this.media){var t=this.levels?this.levels.length:0;t&&(this.hls.autoLevelCapping=this.getMaxLevel(t-1),this.hls.autoLevelCapping>this.autoLevelCapping&&this.hls.streamController.nextLevelSwitch(),this.autoLevelCapping=this.hls.autoLevelCapping)}}},{key:"getMaxLevel",value:function(t){var e=0,n=void 0,r=void 0,i=this.mediaWidth,o=this.mediaHeight,a=0,s=0;for(n=0;n<=t&&(r=this.levels[n],!this.isLevelRestricted(n))&&(e=n,a=r.width,s=r.height,!(i<=a||o<=s));n++);return e}},{key:"isLevelRestricted",value:function(t){return!(!this.restrictedLevels||this.restrictedLevels.indexOf(t)===-1)}},{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}},{key:"mediaWidth",get:function(){var t=void 0;return this.media&&(t=this.media.width||this.media.clientWidth||this.media.offsetWidth,t*=this.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0;return this.media&&(t=this.media.height||this.media.clientHeight||this.media.offsetHeight,t*=this.contentScaleFactor),t}}]),e}(d.default);n.default=f},{25:25,26:26}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(42),s=r(a),l=function(){function t(e,n,r,o){i(this,t),this.hls=e,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new s.default(n),this.fast_=new s.default(r)}return o(t,[{key:"sample",value:function(t,e){t=Math.max(t,this.minDelayMs_);var n=8e3*e/t,r=t/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)}},{key:"canEstimate",value:function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_}},{key:"getEstimate",value:function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}},{key:"destroy",value:function(){}}]),t}();n.default=l},{42:42}],9:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){
+var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(43),h=function(t){function e(t){return i(this,e),o(this,Object.getPrototypeOf(e).call(this,t,u.default.MEDIA_ATTACHING))}return a(e,t),s(e,[{key:"destroy",value:function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1}},{key:"onMediaAttaching",value:function(t){this.hls.config.capLevelOnFPSDrop&&(this.video=t.media instanceof HTMLVideoElement?t.media:null,"function"==typeof this.video.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),this.hls.config.fpsDroppedMonitoringPeriod))}},{key:"checkFPS",value:function(t,e,n){var r=performance.now();if(e){if(this.lastTime){var i=r-this.lastTime,o=n-this.lastDroppedFrames,a=e-this.lastDecodedFrames,s=1e3*o/i;if(this.hls.trigger(u.default.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>this.hls.config.fpsDroppedMonitoringThreshold*a){var l=this.hls.currentLevel;f.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(this.hls.autoLevelCapping===-1||this.hls.autoLevelCapping>=l)&&(l-=1,this.hls.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:this.hls.currentLevel}),this.hls.autoLevelCapping=l,this.hls.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}}},{key:"checkFPSInterval",value:function(){if(this.video)if(this.isVideoPlaybackQualityAvailable){var t=this.video.getVideoPlaybackQuality();this.checkFPS(this.video,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(this.video,this.video.webkitDecodedFrameCount,this.video.webkitDroppedFrameCount)}}]),e}(d.default);n.default=h},{25:25,26:26,43:43}],10:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(43),h=t(24),p=t(28),y=r(p),g=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.ERROR));return n.ontick=n.tick.bind(n),n._manualLevel=n._autoLevelCapping=-1,n}return a(e,t),s(e,[{key:"destroy",value:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this._manualLevel=-1}},{key:"startLoad",value:function(){this.canload=!0,this.timer&&this.tick()}},{key:"stopLoad",value:function(){this.canload=!1}},{key:"onManifestLoaded",value:function(t){var e,n,r=[],i=[],o={},a=!1,s=!1,l=this.hls;if(t.levels.forEach(function(t){t.videoCodec&&(a=!0),(t.audioCodec||t.attrs&&t.attrs.AUDIO)&&(s=!0);var e=o[t.bitrate];void 0===e?(o[t.bitrate]=r.length,t.url=[t.url],t.urlId=0,r.push(t)):r[e].url.push(t.url)}),a&&s?r.forEach(function(t){t.videoCodec&&i.push(t)}):i=r,i=i.filter(function(t){var e=function(t){return MediaSource.isTypeSupported("audio/mp4;codecs="+t)},n=function(t){return MediaSource.isTypeSupported("video/mp4;codecs="+t)},r=t.audioCodec,i=t.videoCodec;return(!r||e(r))&&(!i||n(i))}),i.length){for(e=i[0].bitrate,i.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=i,n=0;n<i.length;n++)if(i[n].bitrate===e){this._firstLevel=n,f.logger.log("manifest loaded,"+i.length+" level(s) found, first bitrate:"+e);break}l.trigger(u.default.MANIFEST_PARSED,{levels:this._levels,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:a,altAudio:t.audioTracks.length>0})}else l.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:l.url,reason:"no level with compatible codecs found in manifest"})}},{key:"setLevelInternal",value:function(t){var e=this._levels;if(t>=0&&t<e.length){this.timer&&(clearTimeout(this.timer),this.timer=null),this._level!==t&&(f.logger.log("switching to level "+t),this._level=t),this.hls.trigger(u.default.LEVEL_SWITCH,{level:t});var n=e[t],r=n.details;if(!r||r.live===!0){var i=n.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:n.url[i],level:t,id:i})}}else this.hls.trigger(u.default.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})}},{key:"onError",value:function(t){if(!t.fatal){var e=t.details,n=this.hls,r=void 0,i=void 0,o=!1;switch(e){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:r=t.frag.level;break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:r=t.context.level,o=!0}if(void 0!==r)if(i=this._levels[r],i.urlId<i.url.length-1)i.urlId++,i.details=void 0,f.logger.warn("level controller,"+e+" for level "+r+": switching to redundant stream id "+i.urlId);else{var a=this._manualLevel===-1&&r;if(a)f.logger.warn("level controller,"+e+": emergency switch-down for next fragment"),n.abrController.nextAutoLevel=0;else if(i&&i.details&&i.details.live)f.logger.warn("level controller,"+e+" on live stream, discard"),o&&(this._level=void 0);else if(e===h.ErrorDetails.LEVEL_LOAD_ERROR||e===h.ErrorDetails.LEVEL_LOAD_TIMEOUT){var s=this.hls,l=s.media,c=l&&y.default.isBuffered(l,l.currentTime)&&y.default.isBuffered(l,l.currentTime+.5);if(c){var d=s.config.levelLoadingRetryDelay;f.logger.warn("level controller,"+e+", but media buffered, retry in "+d+"ms"),this.timer=setTimeout(this.ontick,d)}else f.logger.error("cannot recover "+e+" error"),this._level=void 0,this.timer&&(clearTimeout(this.timer),this.timer=null),t.fatal=!0,s.trigger(u.default.ERROR,t)}}}}},{key:"onLevelLoaded",value:function(t){if(t.level===this._level){var e=t.details;if(e.live){var n=1e3*(e.averagetargetduration?e.averagetargetduration:e.targetduration),r=this._levels[t.level],i=r.details;i&&e.endSN===i.endSN&&(n/=2,f.logger.log("same live playlist, reload twice faster")),n-=performance.now()-t.stats.trequest,n=Math.max(1e3,Math.round(n)),f.logger.log("live playlist, reload in "+n+" ms"),this.timer=setTimeout(this.ontick,n)}else this.timer=null}}},{key:"tick",value:function(){var t=this._level;if(void 0!==t&&this.canload){var e=this._levels[t],n=e.urlId;this.hls.trigger(u.default.LEVEL_LOADING,{url:e.url[n],level:t,id:n})}}},{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this._level},set:function(t){var e=this._levels;e&&e.length>t&&(this._level===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this._manualLevel},set:function(t){this._manualLevel=t,void 0===this._startLevel&&(this._startLevel=t),t!==-1&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return this._manualLevel!==-1?this._manualLevel:this.hls.abrController.nextAutoLevel},set:function(t){this.level=t,this._manualLevel===-1&&(this.hls.abrController.nextAutoLevel=t)}}]),e}(d.default);n.default=g},{24:24,25:25,26:26,28:28,43:43}],11:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(39),u=r(l),c=t(28),d=r(c),f=t(20),h=r(f),p=t(26),y=r(p),g=t(25),v=r(g),m=t(29),b=r(m),_=t(45),E=r(_),T=t(24),A=t(43),k={STOPPED:"STOPPED",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR"},w=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,y.default.MEDIA_ATTACHED,y.default.MEDIA_DETACHING,y.default.MANIFEST_LOADING,y.default.MANIFEST_PARSED,y.default.LEVEL_LOADED,y.default.KEY_LOADED,y.default.FRAG_LOADED,y.default.FRAG_LOAD_EMERGENCY_ABORTED,y.default.FRAG_PARSING_INIT_SEGMENT,y.default.FRAG_PARSING_DATA,y.default.FRAG_PARSED,y.default.ERROR,y.default.AUDIO_TRACK_SWITCH,y.default.BUFFER_CREATED,y.default.BUFFER_APPENDED,y.default.BUFFER_FLUSHED));return n.config=t.config,n.audioCodecSwap=!1,n.ticks=0,n.ontick=n.tick.bind(n),n}return a(e,t),s(e,[{key:"destroy",value:function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),v.default.prototype.destroy.call(this),this.state=k.STOPPED}},{key:"startLoad",value:function(t){if(this.levels){var e=this.media,n=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,e&&n>0?(A.logger.log("configure startPosition @"+n.toFixed(3)),this.lastPaused||(A.logger.log("resuming video"),e.play())):this.lastCurrentTime=this.startPosition?this.startPosition:t,!this.startFragRequested){var i=r.startLevel;i===-1&&(i=0,this.bitrateTest=!0),this.level=r.nextLoadLevel=i,this.loadedmetadata=!1}this.state=k.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else A.logger.warn("cannot start loading as manifest not parsed yet"),this.state=k.STOPPED}},{key:"stopLoad",value:function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.STOPPED}},{key:"tick",value:function(){this.ticks++,1===this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){switch(this.state){case k.ERROR:case k.PAUSED:break;case k.IDLE:if(!this._doTickIdle())return;break;case k.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=k.IDLE);break;case k.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),n=this.retryDate;(!n||e>=n||this.media&&this.media.seeking)&&(A.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=k.IDLE);break;case k.ERROR:case k.PAUSED:case k.STOPPED:case k.FRAG_LOADING:case k.PARSING:case k.PARSED:case k.ENDED:}this._checkBuffer(),this._checkFragmentChanged()}},{key:"_doTickIdle",value:function(){var t=this.hls,e=t.config,n=this.media;if(!n&&(this.startFragRequested||!e.startFragPrefetch))return!0;var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,o=void 0;o=this.levels[i].hasOwnProperty("bitrate")?Math.max(8*e.maxBufferSize/this.levels[i].bitrate,e.maxBufferLength):e.maxBufferLength,o=Math.min(o,e.maxMaxBufferLength);var a=d.default.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,e.maxBufferHole),s=a.len;if(s>=o)return!0;A.logger.trace("buffer length of "+s.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),t.nextLoadLevel=i,this.level=i;var l=this.levels[i].details;if("undefined"==typeof l||l.live&&this.levelLastLoaded!==i)return this.state=k.WAITING_LEVEL,!0;var u=this.fragPrevious;if(!l.live&&u&&u.sn===l.endSN&&(!n.seeking&&a.len||n.duration-a.end<=u.duration/2)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(y.default.BUFFER_EOS,c),this.state=k.ENDED,!0}return this._fetchPayloadOrEos({pos:r,bufferInfo:a,levelDetails:l})}},{key:"_fetchPayloadOrEos",value:function(t){var e=t.pos,n=t.bufferInfo,r=t.levelDetails,i=this.fragPrevious,o=this.level,a=r.fragments,s=a.length;if(0===s)return!1;var l=a[0].start,u=a[s-1].start+a[s-1].duration,c=n.end,d=void 0;if(r.live){if(d=this._ensureFragmentAtLivePoint({levelDetails:r,bufferEnd:c,start:l,end:u,fragPrevious:i,fragments:a,fragLen:s}),null===d)return!1}else c<l&&(d=a[0]);return d||(d=this._findFragment({start:l,fragPrevious:i,fragLen:s,fragments:a,bufferEnd:c,end:u,levelDetails:r})),!d||this._loadFragmentOrKey({frag:d,level:o,levelDetails:r,pos:e,bufferEnd:c})}},{key:"_ensureFragmentAtLivePoint",value:function(t){var e=t.levelDetails,n=t.bufferEnd,r=t.start,i=t.end,o=t.fragPrevious,a=t.fragments,s=t.fragLen,l=this.hls.config,u=this.media,c=void 0,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(n<Math.max(r,i-d)){var f=this.liveSyncPosition=this.computeLivePosition(r,e);A.logger.log("buffer end: "+n.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),n=f,u&&u.readyState&&u.duration>f&&(u.currentTime=f)}if(e.PTSKnown&&n>i&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(o){var h=o.sn+1;h>=e.startSN&&h<=e.endSN&&(c=a[h-e.startSN],A.logger.log("live playlist, switching playlist, load frag with next SN: "+c.sn))}c||(c=a[Math.min(s-1,Math.round(s/2))],A.logger.log("live playlist, switching playlist, unknown, load middle frag : "+c.sn))}return c}},{key:"_findFragment",value:function(t){var e=t.start,n=t.fragPrevious,r=t.fragLen,i=t.fragments,o=t.bufferEnd,a=t.end,s=t.levelDetails,l=this.hls.config,c=void 0,d=void 0,f=l.maxFragLookUpTolerance;if(o<a?(o>a-f&&(f=0),d=u.default.search(i,function(t){return t.start+t.duration-f<=o?1:t.start-f>o&&t.start?-1:0})):d=i[r-1],d&&(c=d,e=d.start,n&&c.level===n.level&&c.sn===n.sn))if(c.sn<s.endSN){var h=n.deltaPTS,p=c.sn-s.startSN;h&&h>l.maxBufferHole&&n.dropped&&p?(c=i[p-1],A.logger.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),n.loadCounter--):(c=i[p+1],A.logger.log("SN just loaded, load next one: "+c.sn))}else c=null;return c}},{key:"_loadFragmentOrKey",value:function(t){var e=t.frag,n=t.level,r=t.levelDetails,i=t.pos,o=t.bufferEnd,a=this.hls,s=a.config;if(null==e.decryptdata.uri||null!=e.decryptdata.key){if(A.logger.log("Loading "+e.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n+", currentTime:"+i.toFixed(3)+",bufferEnd:"+o.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,e.loadCounter){e.loadCounter++;var l=s.fragLoadingLoopThreshold;if(e.loadCounter>l&&Math.abs(this.fragLoadIdx-e.loadIdx)<l)return a.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:e}),!1}else e.loadCounter=1;return e.loadIdx=this.fragLoadIdx,this.fragCurrent=e,this.startFragRequested=!0,e.autoLevel=a.autoLevelEnabled,e.bitrateTest=this.bitrateTest,a.trigger(y.default.FRAG_LOADING,{frag:e}),this.state=k.FRAG_LOADING,!0}A.logger.log("Loading key for "+e.sn+" of ["+r.startSN+" ,"+r.endSN+"],level "+n),this.state=k.KEY_LOADING,a.trigger(y.default.KEY_LOADING,{frag:e})}},{key:"getBufferRange",value:function(t){var e,n,r=this.bufferRange;if(r)for(e=r.length-1;e>=0;e--)if(n=r[e],t>=n.start&&t<=n.end)return n;return null}},{key:"followingBufferRange",value:function(t){return t?this.getBufferRange(t.end+.5):null}},{key:"_checkFragmentChanged",value:function(){var t,e,n=this.media;if(n&&n.readyState&&n.seeking===!1&&(e=n.currentTime,e>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),d.default.isBuffered(n,e)?t=this.getBufferRange(e):d.default.isBuffered(n,e+.1)&&(t=this.getBufferRange(e+.1)),t)){var r=t.frag;r!==this.fragPlaying&&(this.fragPlaying=r,this.hls.trigger(y.default.FRAG_CHANGED,{frag:r}))}}},{key:"immediateLevelSwitch",value:function(){if(A.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})}},{key:"immediateLevelSwitchEnd",value:function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,d.default.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())}},{key:"nextLevelSwitch",value:function(){var t=this.media;if(t&&t.readyState){var e=void 0,n=void 0,r=void 0;if(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,n=this.getBufferRange(t.currentTime),n&&n.start>1&&(this.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:n.start-1})),t.paused)e=0;else{var i=this.hls.nextLoadLevel,o=this.levels[i],a=this.fragLastKbps;e=a&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*a)+1:0}if(r=this.getBufferRange(t.currentTime+e),r&&(r=this.followingBufferRange(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:r.start,endOffset:Number.POSITIVE_INFINITY})}}}},{key:"onMediaAttached",value:function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)}},{key:"onMediaDetaching",value:function(){var t=this.media;t&&t.ended&&(A.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=null,this.loadedmetadata=!1,this.stopLoad()}},{key:"onMediaSeeking",value:function(){var t=this.media,e=t?t.currentTime:void 0,n=this.config;if(A.logger.log("media seeking to "+e.toFixed(3)),this.state===k.FRAG_LOADING){var r=d.default.bufferInfo(t,e,this.config.maxBufferHole),i=this.fragCurrent;if(0===r.len&&i){var o=n.maxFragLookUpTolerance,a=i.start-o,s=i.start+i.duration+o;e<a||e>s?(i.loader&&(A.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),i.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=k.IDLE):A.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===k.ENDED&&(this.state=k.IDLE);t&&(this.lastCurrentTime=e),this.state!==k.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.tick()}},{key:"onMediaSeeked",value:function(){A.logger.log("media seeked to "+this.media.currentTime.toFixed(3)),this.tick()}},{key:"onMediaEnded",value:function(){A.logger.log("media ended"),this.startPosition=this.lastCurrentTime=0}},{key:"onManifestLoading",value:function(){A.logger.log("trigger BUFFER_RESET"),this.hls.trigger(y.default.BUFFER_RESET),this.bufferRange=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0}},{key:"onManifestParsed",value:function(t){var e,n=!1,r=!1;t.levels.forEach(function(t){e=t.audioCodec,e&&(e.indexOf("mp4a.40.2")!==-1&&(n=!0),e.indexOf("mp4a.40.5")!==-1&&(r=!0))}),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&A.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startLevelLoaded=!1,this.startFragRequested=!1;var i=this.config;i.autoStartLoad&&this.hls.startLoad(i.startPosition)}},{key:"onLevelLoaded",value:function(t){var e=t.details,n=t.level,r=this.levels[n],i=e.totalduration,o=0;if(A.logger.log("level "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),this.levelLastLoaded=n,e.live){var a=r.details;a&&e.fragments.length>0?(b.default.mergeDetails(a,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,a),e.PTSKnown?A.logger.log("live playlist sliding:"+o.toFixed(3)):A.logger.log("live playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,A.logger.log("live playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,this.hls.trigger(y.default.LEVEL_UPDATED,{details:e,level:n}),this.startFragRequested===!1){if(this.startPosition===-1||this.lastCurrentTime===-1){var s=e.startTimeOffset;isNaN(s)?e.live?(this.startPosition=this.computeLivePosition(o,e),A.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(s<0&&(A.logger.log("negative start time offset "+s+", count from end of last fragment"),s=o+i+s),A.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===k.WAITING_LEVEL&&(this.state=k.IDLE),this.tick()}},{key:"onKeyLoaded",value:function(){this.state===k.KEY_LOADING&&(this.state=k.IDLE,this.tick())}},{key:"onFragLoaded",value:function(t){var e=this.fragCurrent,n=t.frag;if(this.state===k.FRAG_LOADING&&e&&"main"===n.type&&n.level===e.level&&n.sn===e.sn){var r=t.stats,i=this.levels[e.level],o=i.details;if(A.logger.log("Loaded "+e.sn+" of ["+o.startSN+" ,"+o.endSN+"],level "+e.level),this.bitrateTest=!1,n.bitrateTest===!0&&this.hls.nextLoadLevel)this.state=k.IDLE,this.startFragRequested=!1,r.tparsed=r.tbuffered=performance.now(),this.hls.trigger(y.default.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.tick();else{this.state=k.PARSING,this.stats=r;var a=o.totalduration,s=isNaN(e.startDTS)?e.start:e.startDTS,l=e.level,u=e.sn,c=this.config.defaultAudioCodec||i.audioCodec;this.audioCodecSwap&&(A.logger.log("swapping playlist audio codec"),void 0===c&&(c=this.lastAudioCodec),c&&(c=c.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5")),this.pendingAppending=0,A.logger.log("Parsing "+u+" of ["+o.startSN+" ,"+o.endSN+"],level "+l+", cc "+e.cc);var d=this.demuxer;d||(d=this.demuxer=new h.default(this.hls,"main"));var f=o.PTSKnown||!o.live;d.push(t.payload,c,i.videoCodec,s,e.cc,l,u,a,e.decryptdata,f)}}this.fragLoadError=0}},{key:"onFragParsingInitSegment",value:function(t){var e=this.fragCurrent;if(e&&"main"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING){var n,r,i=t.tracks;if(i.audio&&this.altAudio&&delete i.audio,r=i.audio){var o=this.levels[this.level].audioCodec,a=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(A.logger.log("swapping playlist audio codec"),o=o.indexOf("mp4a.40.5")!==-1?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&a.indexOf("firefox")===-1&&(o="mp4a.40.5"),a.indexOf("android")!==-1&&(o="mp4a.40.2",A.logger.log("Android: force audio codec to"+o)),r.levelCodec=o,r.id=t.id}if(r=i.video,r&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=t.id),t.unique){var s={codec:"",levelCodec:""};for(n in t.tracks)r=i[n],s.container=r.container,s.codec&&(s.codec+=",",s.levelCodec+=","),r.codec&&(s.codec+=r.codec),r.levelCodec&&(s.levelCodec+=r.levelCodec);i={audiovideo:s}}this.hls.trigger(y.default.BUFFER_CODECS,i);for(n in i){r=i[n],A.logger.log("main track:"+n+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.pendingAppending++,this.hls.trigger(y.default.BUFFER_APPENDING,{type:n,data:l,parent:"main",content:"initSegment"}))}this.tick()}}},{key:"onFragParsingData",value:function(t){var e=this,n=this.fragCurrent;if(n&&"main"===t.id&&t.sn===n.sn&&t.level===n.level&&("audio"!==t.type||!this.altAudio)&&this.state===k.PARSING){var r=this.levels[this.level],i=this.fragCurrent;A.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0));var o=b.default.updateFragPTSDTS(r.details,i.sn,t.startPTS,t.endPTS,t.startDTS,t.endDTS),a=this.hls;a.trigger(y.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:o}),"video"===t.type&&(i.dropped=t.dropped),[t.data1,t.data2].forEach(function(n){n&&(e.pendingAppending++,a.trigger(y.default.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))}),this.nextLoadPosition=t.endPTS,this.bufferRange.push({type:t.type,start:t.startPTS,end:t.endPTS,frag:i}),this.tick()}}},{key:"onFragParsed",value:function(t){var e=this.fragCurrent;e&&"main"===t.id&&t.sn===e.sn&&t.level===e.level&&this.state===k.PARSING&&(this.stats.tparsed=performance.now(),this.state=k.PARSED,this._checkAppendedParsed())}},{key:"onAudioTrackSwitch",value:function(t){var e=!!t.url;if(e)this.videoBuffer&&this.mediaBuffer!==this.videoBuffer&&(A.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=this.videoBuffer);else if(this.mediaBuffer!==this.media){A.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var n=this.fragCurrent;n.loader&&(A.logger.log("switching to main audio track, cancel main fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=k.IDLE}this.altAudio=e}},{key:"onBufferCreated",value:function(t){var e=t.tracks,n=void 0,r=void 0,i=!1;for(var o in e){var a=e[o];"main"===a.id?(r=o,n=a,"video"===o&&(this.videoBuffer=e[o].buffer)):i=!0}i&&n?(A.logger.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}},{key:"onBufferAppended",value:function(t){if("main"===t.parent)switch(this.state){case k.PARSING:case k.PARSED:this.pendingAppending--,this._checkAppendedParsed()}}},{key:"_checkAppendedParsed",value:function(){if(this.state===k.PARSED&&0===this.pendingAppending){var t=this.fragCurrent,e=this.stats;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(y.default.FRAG_BUFFERED,{stats:e,frag:t,id:"main"});var n=this.mediaBuffer?this.mediaBuffer:this.media;A.logger.log("main buffered : "+E.default.toString(n.buffered)),this.state=k.IDLE}this.tick()}}},{key:"onError",value:function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var n=this.media,r=n&&d.default.isBuffered(n,n.currentTime)&&d.default.isBuffered(n,n.currentTime+.5);switch(t.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var o=this.config;if(i<=o.fragLoadingMaxRetry||r){this.fragLoadError=i,e.loadCounter=0;var a=Math.min(Math.pow(2,i-1)*o.fragLoadingRetryDelay,o.fragLoadingMaxRetryTimeout);A.logger.warn("mediaController: frag loading failed, retry in "+a+" ms"),this.retryDate=performance.now()+a,this.state=k.FRAG_LOADING_WAITING_RETRY}else A.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.trigger(y.default.ERROR,t),this.state=k.ERROR}break;case T.ErrorDetails.FRAG_LOOP_LOADING_ERROR:t.fatal||(r?(this._reduceMaxBufferLength(e.duration),this.state=k.IDLE):e.autoLevel&&0!==e.level||(t.fatal=!0,this.hls.trigger(y.default.ERROR,t),this.state=k.ERROR));break;case T.ErrorDetails.LEVEL_LOAD_ERROR:case T.ErrorDetails.LEVEL_LOAD_TIMEOUT:case T.ErrorDetails.KEY_LOAD_ERROR:case T.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==k.ERROR&&(this.state=t.fatal?k.ERROR:k.IDLE,A.logger.warn("mediaController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case T.ErrorDetails.BUFFER_FULL_ERROR:this.state!==k.PARSING&&this.state!==k.PARSED||(r?(this._reduceMaxBufferLength(e.duration),this.state=k.IDLE):(A.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.state=k.PAUSED,this.hls.trigger(y.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY})))}}}},{key:"_reduceMaxBufferLength",value:function(t){var e=this.config;e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,A.logger.warn("reduce max buffer length to "+e.maxMaxBufferLength+"s and switch to IDLE state"),this.fragLoadIdx+=2*e.fragLoadingLoopThreshold)}},{key:"_checkBuffer",value:function(){var t=this.media;if(t&&t.readyState){var e=t.currentTime,n=t.buffered;if(!this.loadedmetadata&&n.length){this.loadedmetadata=!0;var r=this.startPosition,i=d.default.isBuffered(t,r);e===r&&i||(A.logger.log("target start position:"+r),i||(r=n.start(0),A.logger.log("target start position not buffered, seek to buffered.start(0) "+r)),A.logger.log("adjust currentTime from "+e+" to "+r),t.currentTime=r)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var o=d.default.bufferInfo(t,e,0),a=!(t.paused||t.ended||0===t.buffered.length),s=.5,l=e>t.playbackRate*this.lastCurrentTime,u=this.config;if(this.stalled&&l&&(this.stalled=!1,A.logger.log("playback not stuck anymore @"+e)),a&&o.len<=s&&(l?(s=0,this.seekHoleNudgeDuration=0):this.stalled?this.seekHoleNudgeDuration+=u.seekHoleNudgeDuration:(this.seekHoleNudgeDuration=0,A.logger.log("playback seems stuck @"+e),this.hls.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1}),this.stalled=!0),o.len<=s)){var c=o.nextStart,f=c-e;if(c&&f<u.maxSeekHole&&f>0){A.logger.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+c+" + nudge "+this.seekHoleNudgeDuration);var h=c+this.seekHoleNudgeDuration-t.currentTime;t.currentTime=c+this.seekHoleNudgeDuration,this.hls.trigger(y.default.ERROR,{type:T.ErrorTypes.MEDIA_ERROR,details:T.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:h})}}}}}},{key:"onFragLoadEmergencyAborted",value:function(){this.state=k.IDLE,this.loadedmetadata||(this.startFragRequested=!1),this.tick()}},{key:"onBufferFlushed",value:function(){var t=this.mediaBuffer?this.mediaBuffer:this.media,e=this.bufferRange,n=[],r=void 0,i=void 0;for(i=0;i<e.length;i++)r=e[i],d.default.isBuffered(t,(r.start+r.end)/2)&&n.push(r);this.bufferRange=n,this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold,this.state=k.IDLE,this.fragPrevious=null}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"computeLivePosition",value:function(t,e){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-n)}},{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,A.logger.log("engine state transition from "+e+" to "+t),this.hls.trigger(y.default.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){
+var t=this.media;if(t){var e=this.getBufferRange(t.currentTime);if(e)return e.frag.level}return-1}},{key:"nextBufferRange",get:function(){var t=this.media;return t?this.followingBufferRange(this.getBufferRange(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferRange;return t?t.frag.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(v.default);n.default=w},{20:20,24:24,25:25,26:26,28:28,29:29,39:39,43:43,45:45}],12:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(40),h=r(f),p=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.MANIFEST_LOADING,u.default.FRAG_LOADED,u.default.LEVEL_SWITCH));if(n.hls=t,n.config=t.config,n.enabled=!0,n.Cues=t.config.cueHandler,n.config.enableCEA708Captions){var r=n,a={newCue:function(t,e,n){if(!r.textTrack1){var i=r.getExistingTrack("1");if(i){r.textTrack1=i,r.clearCurrentCues(r.textTrack1);var o=new window.Event("addtrack");o.track=r.textTrack1,r.media.dispatchEvent(o)}else r.textTrack1=r.createTextTrack("captions","English","en"),r.textTrack1.textTrack1=!0}r.Cues.newCue(r.textTrack1,t,e,n)}},s={newCue:function(t,e,n){if(!r.textTrack2){var i=r.getExistingTrack("2");if(i){r.textTrack2=i,r.clearCurrentCues(r.textTrack2);var o=new window.Event("addtrack");o.track=r.textTrack2,r.media.dispatchEvent(o)}else r.textTrack2=r.createTextTrack("captions","Spanish","es"),r.textTrack2.textTrack2=!0}r.Cues.newCue(r.textTrack2,t,e,n)}};n.cea608Parser=new h.default(0,a,s)}return n}return a(e,t),s(e,[{key:"clearCurrentCues",value:function(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}},{key:"getExistingTrack",value:function(t){var e=this.media;if(e)for(var n=0;n<e.textTracks.length;n++){var r=e.textTracks[n],i="textTrack"+t;if(r[i]===!0)return r}return null}},{key:"createTextTrack",value:function(t,e,n){if(this.media)return this.media.addTextTrack(t,e,n)}},{key:"destroy",value:function(){d.default.prototype.destroy.call(this)}},{key:"onMediaAttaching",value:function(t){this.media=t.media}},{key:"onMediaDetaching",value:function(){}},{key:"onManifestLoading",value:function(){this.lastPts=Number.NEGATIVE_INFINITY}},{key:"onLevelSwitch",value:function(){"NONE"===this.hls.currentLevel.closedCaptions?this.enabled=!1:this.enabled=!0}},{key:"onFragLoaded",value:function(t){if("main"===t.frag.type){var e=t.frag.start;e<=this.lastPts&&(this.clearCurrentCues(this.textTrack1),this.clearCurrentCues(this.textTrack2)),this.lastPts=e}}},{key:"onFragParsingUserdata",value:function(t){if(this.enabled)for(var e=0;e<t.samples.length;e++){var n=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,n)}}},{key:"extractCea608Data",value:function(t){for(var e,n,r,i,o,a=31&t[0],s=2,l=[],u=0;u<a;u++)e=t[s++],n=127&t[s++],r=127&t[s++],i=0!==(4&e),o=3&e,0===n&&0===r||i&&0===o&&(l.push(n),l.push(r));return l}}]),e}(d.default);n.default=p},{25:25,26:26,40:40}],13:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],this._precompute();var n,i,o,a,s,l=this._tables[0][4],u=this._tables[1],c=e.length,d=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size="+c);for(a=e.slice(0),s=[],this._key=[a,s],n=c;n<4*c+28;n++)o=a[n-1],(n%c===0||8===c&&n%c===4)&&(o=l[o>>>24]<<24^l[o>>16&255]<<16^l[o>>8&255]<<8^l[255&o],n%c===0&&(o=o<<8^o>>>24^d<<24,d=d<<1^283*(d>>7))),a[n]=a[n-c]^o;for(i=0;n;i++,n--)o=a[3&i?n:n-4],n<=4||i<4?s[i]=o:s[i]=u[0][l[o>>>24]]^u[1][l[o>>16&255]]^u[2][l[o>>8&255]]^u[3][l[255&o]]}return i(t,[{key:"_precompute",value:function(){var t,e,n,r,i,o,a,s,l,u=this._tables[0],c=this._tables[1],d=u[4],f=c[4],h=[],p=[];for(t=0;t<256;t++)p[(h[t]=t<<1^283*(t>>7))^t]=t;for(e=n=0;!d[e];e^=r||1,n=p[n]||1)for(a=n^n<<1^n<<2^n<<3^n<<4,a=a>>8^255&a^99,d[e]=a,f[a]=e,o=h[i=h[r=h[e]]],l=16843009*o^65537*i^257*r^16843008*e,s=257*h[a]^16843008*a,t=0;t<4;t++)u[t][e]=s=s<<24^s>>>8,c[t][a]=l=l<<24^l>>>8;for(t=0;t<5;t++)u[t]=u[t].slice(0),c[t]=c[t].slice(0)}},{key:"decrypt",value:function(t,e,n,r,i,o){var a,s,l,u,c=this._key[1],d=t^c[0],f=r^c[1],h=n^c[2],p=e^c[3],y=c.length/4-2,g=4,v=this._tables[1],m=v[0],b=v[1],_=v[2],E=v[3],T=v[4];for(u=0;u<y;u++)a=m[d>>>24]^b[f>>16&255]^_[h>>8&255]^E[255&p]^c[g],s=m[f>>>24]^b[h>>16&255]^_[p>>8&255]^E[255&d]^c[g+1],l=m[h>>>24]^b[p>>16&255]^_[d>>8&255]^E[255&f]^c[g+2],p=m[p>>>24]^b[d>>16&255]^_[f>>8&255]^E[255&h]^c[g+3],g+=4,d=a,f=s,h=l;for(u=0;u<4;u++)i[(3&-u)+o]=T[d>>>24]<<24^T[f>>16&255]<<16^T[h>>8&255]<<8^T[255&p]^c[g++],a=d,d=f,f=h,h=p,p=a}}]),t}();n.default=o},{}],14:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(13),s=r(a),l=function(){function t(e,n){i(this,t),this.key=e,this.iv=n}return o(t,[{key:"ntoh",value:function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24}},{key:"doDecrypt",value:function(t,e,n){var r,i,o,a,l,u,c,d,f,h=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),p=new s.default(Array.prototype.slice.call(e)),y=new Uint8Array(t.byteLength),g=new Int32Array(y.buffer);for(r=~~n[0],i=~~n[1],o=~~n[2],a=~~n[3],f=0;f<h.length;f+=4)l=~~this.ntoh(h[f]),u=~~this.ntoh(h[f+1]),c=~~this.ntoh(h[f+2]),d=~~this.ntoh(h[f+3]),p.decrypt(l,u,c,d,g,f),g[f]=this.ntoh(g[f]^r),g[f+1]=this.ntoh(g[f+1]^i),g[f+2]=this.ntoh(g[f+2]^o),g[f+3]=this.ntoh(g[f+3]^a),r=l,i=u,o=c,a=d;return y}},{key:"localDecrypt",value:function(t,e,n,r){var i=this.doDecrypt(t,e,n);r.set(i,t.byteOffset)}},{key:"decrypt",value:function(t){var e=32e3,n=new Int32Array(t),r=new Uint8Array(t.byteLength),i=0,o=this.key,a=this.iv;for(this.localDecrypt(n.subarray(i,i+e),o,a,r),i=e;i<n.length;i+=e)a=new Uint32Array([this.ntoh(n[i-4]),this.ntoh(n[i-3]),this.ntoh(n[i-2]),this.ntoh(n[i-1])]),this.localDecrypt(n.subarray(i,i+e),o,a,r);return r}}]),t}();n.default=l},{13:13}],15:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(14),s=r(a),l=t(24),u=t(43),c=function(){function t(e){i(this,t),this.hls=e;try{var n=window?window.crypto:crypto;this.subtle=n.subtle||n.webkitSubtle,this.disableWebCrypto=!this.subtle}catch(t){this.disableWebCrypto=!0}}return o(t,[{key:"destroy",value:function(){}},{key:"decrypt",value:function(t,e,n,r){this.disableWebCrypto&&this.hls.config.enableSoftwareAES?this.decryptBySoftware(t,e,n,r):this.decryptByWebCrypto(t,e,n,r)}},{key:"decryptByWebCrypto",value:function(t,e,n,r){var i=this;u.logger.log("decrypting by WebCrypto API"),this.subtle.importKey("raw",e,{name:"AES-CBC",length:128},!1,["decrypt"]).then(function(o){i.subtle.decrypt({name:"AES-CBC",iv:n.buffer},o,t).then(r).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}},{key:"decryptBySoftware",value:function(t,e,n,r){u.logger.log("decrypting by JavaScript Implementation");var i=new DataView(e.buffer),o=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]);i=new DataView(n.buffer);var a=new Uint32Array([i.getUint32(0),i.getUint32(4),i.getUint32(8),i.getUint32(12)]),l=new s.default(o,a);r(l.decrypt(t).buffer)}},{key:"onWebCryptoError",value:function(t,e,n,r,i){this.hls.config.enableSoftwareAES?(u.logger.log("disabling to use WebCrypto API"),this.disableWebCrypto=!0,this.decryptBySoftware(e,n,r,i)):(u.logger.error("decrypting error : "+t.message),this.hls.trigger(Event.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))}}]),t}();n.default=c},{14:14,24:24,43:43}],16:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(17),s=r(a),l=t(43),u=t(22),c=r(u),d=function(){function t(e,n,r,o){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.remuxer=new this.remuxerClass(e,n,o),this.insertDiscontinuity()}return o(t,[{key:"insertDiscontinuity",value:function(){this._aacTrack={container:"audio/adts",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0}}},{key:"push",value:function(t,e,n,r,i,o,a,u,d){var f,h,p,y,g,v,m,b,_,E,T=new c.default(t),A=90*T.timeStamp,k=!1;for(i!==this.lastCC?(l.logger.log(this.id+" discontinuity detected"),this.lastCC=i,this.insertDiscontinuity(),this.remuxer.switchLevel(),this.remuxer.insertDiscontinuity()):o!==this.lastLevel?(l.logger.log("audio track switch detected"),this.lastLevel=o,this.remuxer.switchLevel(),this.insertDiscontinuity()):a===this.lastSN+1&&(k=!0),f=this._aacTrack,this.lastSN=a,this.lastLevel=o,v=T.length,_=t.length;v<_-1&&(255!==t[v]||240!==(240&t[v+1]));v++);for(f.audiosamplerate||(h=s.default.getAudioConfig(this.observer,t,v,e),f.config=h.config,f.audiosamplerate=h.samplerate,f.channelCount=h.channelCount,f.codec=h.codec,f.duration=u,l.logger.log("parsed codec:"+f.codec+",rate:"+h.samplerate+",nb channel:"+h.channelCount)),g=0,y=9216e4/f.audiosamplerate;v+5<_&&(m=1&t[v+1]?7:9,p=(3&t[v+3])<<11|t[v+4]<<3|(224&t[v+5])>>>5,p-=m,p>0&&v+m+p<=_);)for(b=A+g*y,E={unit:t.subarray(v+m,v+m+p),pts:b,dts:b},f.samples.push(E),f.len+=p,v+=p+m,g++;v<_-1&&(255!==t[v]||240!==(240&t[v+1]));v++);this.remuxer.remux(o,a,this._aacTrack,{samples:[]},{samples:[{pts:A,dts:A,unit:T.payload}]},{samples:[]},r,k,d)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(t){var e,n,r=new c.default(t);if(r.hasTimeStamp)for(e=r.length,n=t.length;e<n-1;e++)if(255===t[e]&&240===(240&t[e+1]))return!0;return!1}}]),t}();n.default=d},{17:17,22:22,43:43}],17:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(43),a=t(24),s=function(){function t(){r(this,t)}return i(t,null,[{key:"getAudioConfig",value:function(t,e,n,r){var i,s,l,u,c,d=navigator.userAgent.toLowerCase(),f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return i=((192&e[n+2])>>>6)+1,s=(60&e[n+2])>>>2,s>f.length-1?void t.trigger(Event.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+s}):(u=(1&e[n+2])<<2,u|=(192&e[n+3])>>>6,o.logger.log("manifest codec:"+r+",ADTS data:type:"+i+",sampleingIndex:"+s+"["+f[s]+"Hz],channelConfig:"+u),/firefox|OPR/i.test(d)?s>=6?(i=5,c=new Array(4),l=s-3):(i=2,c=new Array(2),l=s):d.indexOf("android")!==-1?(i=2,c=new Array(2),l=s):(i=5,c=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&s>=6?l=s-3:((r&&r.indexOf("mp4a.40.2")!==-1&&s>=6&&1===u||!r&&1===u)&&(i=2,c=new Array(2)),l=s)),c[0]=i<<3,c[0]|=(14&s)>>1,c[1]|=(1&s)<<7,c[1]|=u<<3,5===i&&(c[1]|=(14&l)>>1,c[2]=(1&l)<<7,c[2]|=8,c[3]=0),{config:c,samplerate:f[s],channelCount:u,codec:"mp4a.40."+i})}}]),t}();n.default=s},{24:24,43:43}],18:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(26),s=r(a),l=t(24),u=t(16),c=r(u),d=t(23),f=r(d),h=t(36),p=r(h),y=t(37),g=r(y),v=function(){function t(e,n,r){var o=arguments.length<=3||void 0===arguments[3]?null:arguments[3];i(this,t),this.hls=e,this.id=n,this.config=this.hls.config||o,this.typeSupported=r}return o(t,[{key:"destroy",value:function(){var t=this.demuxer;t&&t.destroy()}},{key:"push",value:function(t,e,n,r,i,o,a,u,d){var h=this.demuxer;if(!h){var y=this.hls,v=this.id;if(f.default.probe(t))h=this.typeSupported.mp2t===!0?new f.default(y,v,g.default,this.config):new f.default(y,v,p.default,this.config);else{if(!c.default.probe(t))return void y.trigger(s.default.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,id:v,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});h=new c.default(y,v,p.default,this.config)}this.demuxer=h}h.push(t,e,n,r,i,o,a,u,d)}}]),t}();n.default=v},{16:16,23:23,24:24,26:26,36:36,37:37}],19:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var i=t(18),o=r(i),a=t(26),s=r(a),l=t(43),u=t(1),c=r(u),d=function(t){var e=new c.default;e.trigger=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t,t].concat(r))},e.off=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.removeListener.apply(e,[t].concat(r))};var n=function(e,n){t.postMessage({event:e,data:n})};t.addEventListener("message",function(r){var i=r.data;switch(i.cmd){case"init":var a=JSON.parse(i.config);t.demuxer=new o.default(e,i.id,i.typeSupported,a);try{(0,l.enableLogs)(a.debug)}catch(t){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":t.demuxer.push(new Uint8Array(i.data),i.audioCodec,i.videoCodec,i.timeOffset,i.cc,i.level,i.sn,i.duration,i.accurateTimeOffset)}}),e.on(s.default.FRAG_PARSING_INIT_SEGMENT,n),e.on(s.default.FRAG_PARSED,n),e.on(s.default.ERROR,n),e.on(s.default.FRAG_PARSING_METADATA,n),e.on(s.default.FRAG_PARSING_USERDATA,n),e.on(s.default.FRAG_PARSING_DATA,function(e,n){var r=n.data1.buffer,i=n.data2.buffer;delete n.data1,delete n.data2,t.postMessage({event:e,data:n,data1:r,data2:i},[r,i])})};n.default=d},{1:1,18:18,26:26,43:43}],20:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(26),s=r(a),l=t(18),u=r(l),c=t(19),d=r(c),f=t(43),h=t(15),p=r(h),y=t(24),g=function(){function e(n,r){i(this,e),this.hls=n,this.id=r;var o={mp4:MediaSource.isTypeSupported("video/mp4"),mp2t:n.config.enableMP2TPassThrough&&MediaSource.isTypeSupported("video/mp2t")};if(n.config.enableWorker&&"undefined"!=typeof Worker){f.logger.log("demuxing in webworker");var a=void 0;try{var l=t(2);a=this.w=l(d.default),this.onwmsg=this.onWorkerMessage.bind(this),a.addEventListener("message",this.onwmsg),a.onerror=function(t){n.trigger(s.default.ERROR,{type:y.ErrorTypes.OTHER_ERROR,details:y.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},a.postMessage({cmd:"init",typeSupported:o,id:r,config:JSON.stringify(n.config)})}catch(t){f.logger.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),a&&URL.revokeObjectURL(a.objectURL),this.demuxer=new u.default(n,r,o)}}else this.demuxer=new u.default(n,r,o);this.demuxInitialized=!0}return o(e,[{key:"destroy",value:function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var n=this.decrypter;n&&(n.destroy(),this.decrypter=null)}},{key:"pushDecrypted",value:function(t,e,n,r,i,o,a,s,l){var u=this.w;if(u)u.postMessage({cmd:"demux",data:t,audioCodec:e,videoCodec:n,timeOffset:r,cc:i,level:o,sn:a,duration:s,accurateTimeOffset:l},[t]);else{var c=this.demuxer;c&&c.push(new Uint8Array(t),e,n,r,i,o,a,s,l)}}},{key:"push",value:function(t,e,n,r,i,o,a,s,l,u){if(t.byteLength>0&&null!=l&&null!=l.key&&"AES-128"===l.method){null==this.decrypter&&(this.decrypter=new p.default(this.hls));var c=this;this.decrypter.decrypt(t,l.key,l.iv,function(t){c.pushDecrypted(t,e,n,r,i,o,a,s,u)})}else this.pushDecrypted(t,e,n,r,i,o,a,s,u)}},{key:"onWorkerMessage",value:function(t){var e=t.data,n=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case s.default.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data.data2=new Uint8Array(e.data2);default:n.trigger(e.event,e.data)}}}]),e}();n.default=g},{15:15,18:18,19:19,2:2,24:24,26:26,43:43}],21:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(43),a=function(){function t(e){r(this,t),this.data=e,this.bytesAvailable=this.data.byteLength,this.word=0,this.bitsAvailable=0}return i(t,[{key:"loadWord",value:function(){var t=this.data.byteLength-this.bytesAvailable,e=new Uint8Array(4),n=Math.min(4,this.bytesAvailable);if(0===n)throw new Error("no bytes available");e.set(this.data.subarray(t,t+n)),this.word=new DataView(e.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n}},{key:"skipBits",value:function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)}},{key:"readBits",value:function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&o.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?n<<e|this.readBits(e):n}},{key:"skipLZ",value:function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!==(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var t=this.skipLZ();return this.readBits(t+1)-1}},{key:"readEG",value:function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"readUShort",value:function(){return this.readBits(16)}},{key:"readUInt",value:function(){return this.readBits(32)}},{key:"skipScalingList",value:function(t){var e,n,r=8,i=8;for(e=0;e<t;e++)0!==i&&(n=this.readEG(),i=(r+n+256)%256),r=0===i?r:i}},{key:"readSPS",value:function(){var t,e,n,r,i,o,a,s,l,u=0,c=0,d=0,f=0,h=1;if(this.readUByte(),t=this.readUByte(),e=this.readBits(5),this.skipBits(3),n=this.readUByte(),this.skipUEG(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var p=this.readUEG();if(3===p&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(s=3!==p?8:12,l=0;l<s;l++)this.readBoolean()&&(l<6?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var y=this.readUEG();if(0===y)this.readUEG();else if(1===y)for(this.skipBits(1),this.skipEG(),this.skipEG(),r=this.readUEG(),l=0;l<r;l++)this.skipEG();if(this.skipUEG(),this.skipBits(1),i=this.readUEG(),o=this.readUEG(),a=this.readBits(1),0===a&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(u=this.readUEG(),c=this.readUEG(),d=this.readUEG(),f=this.readUEG()),this.readBoolean()&&this.readBoolean()){var g=void 0,v=this.readUByte();switch(v){case 1:g=[1,1];break;case 2:g=[12,11];break;case 3:g=[10,11];break;case 4:g=[16,11];break;case 5:g=[40,33];break;case 6:g=[24,11];break;case 7:g=[20,11];break;case 8:g=[32,11];break;case 9:g=[80,33];break;case 10:g=[18,11];break;case 11:g=[15,11];break;case 12:g=[64,33];break;case 13:g=[160,99];break;case 14:g=[4,3];break;case 15:g=[3,2];break;case 16:g=[2,1];break;case 255:g=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}g&&(h=g[0]/g[1])}return{width:Math.ceil((16*(i+1)-2*u-2*c)*h),height:(2-a)*(o+1)*16-(a?2:4)*(d+f)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),t}();n.default=a},{43:43}],22:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(43),a=function(){function t(e){r(this,t),this._hasTimeStamp=!1;for(var n,i,a,s,l,u,c,d,f=0;;)if(c=this.readUTF(e,f,3),f+=3,"ID3"===c)f+=3,n=127&e[f++],i=127&e[f++],a=127&e[f++],s=127&e[f++],l=(n<<21)+(i<<14)+(a<<7)+s,u=f+l,this._parseID3Frames(e,f,u),f=u;else{if("3DI"!==c)return f-=3,d=f,void(d&&(this.hasTimeStamp||o.logger.warn("ID3 tag found, but no timestamp"),this._length=d,this._payload=e.subarray(0,d)));f+=7,o.logger.log("3DI footer found, end: "+f)}}return i(t,[{key:"readUTF",value:function(t,e,n){var r="",i=e,o=e+n;do r+=String.fromCharCode(t[i++]);while(i<o);return r}},{key:"_parseID3Frames",value:function(t,e,n){for(var r,i,a,s,l;e+8<=n;)switch(r=this.readUTF(t,e,4),e+=4,i=t[e++]<<24+t[e++]<<16+t[e++]<<8+t[e++],s=t[e++]<<8+t[e++],a=e,r){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(t,e,44)){e+=44,e+=4;var u=1&t[e++];this._hasTimeStamp=!0,l=((t[e++]<<23)+(t[e++]<<15)+(t[e++]<<7)+t[e++])/45,u&&(l+=47721858.84),l=Math.round(l),o.logger.trace("ID3 timestamp found: "+l),this._timeStamp=l}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),t}();n.default=a},{43:43}],23:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(17),s=r(a),l=t(26),u=r(l),c=t(21),d=r(c),f=t(43),h=t(24),p=function(){function t(e,n,r,o){i(this,t),this.observer=e,this.id=n,this.remuxerClass=r,this.config=o,this.lastCC=0,this.remuxer=new this.remuxerClass(e,n,o)}return o(t,[{key:"switchLevel",value:function(){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack={container:"video/mp2t",type:"video",id:-1,sequenceNumber:0,samples:[],len:0,dropped:0},this._aacTrack={container:"video/mp2t",type:"audio",id:-1,sequenceNumber:0,samples:[],len:0},this._id3Track={type:"id3",id:-1,sequenceNumber:0,samples:[],len:0},this._txtTrack={type:"text",id:-1,sequenceNumber:0,samples:[],len:0},this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.remuxer.switchLevel()}},{key:"insertDiscontinuity",value:function(){this.switchLevel(),this.remuxer.insertDiscontinuity()}},{key:"push",value:function(t,e,n,r,i,o,a,s,l){var c,d,p,y,g,v,m=t.length,b=this.remuxer.passthrough,_=!1;this.audioCodec=e,this.videoCodec=n,this._duration=s,this.contiguous=!1,this.accurateTimeOffset=l,i!==this.lastCC&&(f.logger.log("discontinuity detected"),this.insertDiscontinuity(),this.lastCC=i),o!==this.lastLevel?(f.logger.log("level switch detected"),this.switchLevel(),this.lastLevel=o):a===this.lastSN+1&&(this.contiguous=!0),this.lastSN=a;var E=this.pmtParsed,T=this._avcTrack,A=this._aacTrack,k=this._id3Track,w=T.id,S=A.id,L=k.id,R=this._pmtId,O=T.pesData,C=A.pesData,P=k.pesData,D=this._parsePAT,I=this._parsePMT,x=this._parsePES,N=this._parseAVCPES.bind(this),M=this._parseAACPES.bind(this),F=this._parseID3PES.bind(this);for(m-=m%188,c=0;c<m;c+=188)if(71===t[c]){if(d=!!(64&t[c+1]),p=((31&t[c+1])<<8)+t[c+2],y=(48&t[c+3])>>4,y>1){if(g=c+5+t[c+4],g===c+188)continue}else g=c+4;switch(p){case w:if(d){if(O&&(v=x(O))&&(N(v,!1),b&&T.codec&&(S===-1||A.codec)))return void this.remux(o,a,t,r);O={data:[],size:0}}O&&(O.data.push(t.subarray(g,c+188)),O.size+=c+188-g);break;case S:if(d){if(C&&(v=x(C))&&(M(v),b&&A.codec&&(w===-1||T.codec)))return void this.remux(o,a,t,r);C={data:[],size:0}}C&&(C.data.push(t.subarray(g,c+188)),C.size+=c+188-g);break;case L:d&&(P&&(v=x(P))&&F(v),P={data:[],size:0}),P&&(P.data.push(t.subarray(g,c+188)),P.size+=c+188-g);break;case 0:d&&(g+=t[g]+1),R=this._pmtId=D(t,g);break;case R:d&&(g+=t[g]+1);var B=I(t,g);w=T.id=B.avc,S=A.id=B.aac,L=k.id=B.id3,_&&!E&&(f.logger.log("reparse from beginning"),_=!1,c=-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=!0}}else this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});O&&(v=x(O))?(N(v,!0),T.pesData=null):T.pesData=O,C&&(v=x(C))?(M(v),A.pesData=null):(C&&C.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),A.pesData=C),P&&(v=x(P))?(F(v),k.pesData=null):k.pesData=P,this.remux(o,a,null,r)}},{key:"remux",value:function(t,e,n,r){var i=this._avcTrack,o=i.samples,a=o.reduce(function(t,e){var n=e.units.units.reduce(function(t,e){return{len:t.len+e.data.length,nbNalu:t.nbNalu+1}},{len:0,nbNalu:0});return e.length=n.len,{len:t.len+n.len,nbNalu:t.nbNalu+n.nbNalu}},{len:0,nbNalu:0});i.len=a.len,i.nbNalu=a.nbNalu,this.remuxer.remux(t,e,this._aacTrack,this._avcTrack,this._id3Track,this._txtTrack,r,this.contiguous,this.accurateTimeOffset,n)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(t,e){return(31&t[e+10])<<8|t[e+11]}},{key:"_parsePMT",value:function(t,e){var n,r,i,o,a={aac:-1,avc:-1,id3:-1};for(n=(15&t[e+1])<<8|t[e+2],r=e+3+n-4,i=(15&t[e+10])<<8|t[e+11],e+=12+i;e<r;){switch(o=(31&t[e+1])<<8|t[e+2],t[e]){case 15:a.aac===-1&&(a.aac=o);break;case 21:a.id3===-1&&(a.id3=o);break;case 27:a.avc===-1&&(a.avc=o);break;case 36:f.logger.warn("HEVC stream type found, not supported for now");break;default:f.logger.log("unkown stream type:"+t[e])}e+=((15&t[e+3])<<8|t[e+4])+5}return a}},{key:"_parsePES",value:function(t){var e,n,r,i,o,a,s,l,u,c=0,d=t.data;if(!t||0===t.size)return null;for(;d[0].length<19&&d.length>1;){var f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,d.splice(1,1)}if(e=d[0],r=(e[0]<<16)+(e[1]<<8)+e[2],1===r){if(i=(e[4]<<8)+e[5],i&&i!==t.size-6)return null;for(n=e[7],192&n&&(s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,s>4294967295&&(s-=8589934592),64&n?(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,l>4294967295&&(l-=8589934592)):l=s),o=e[8],u=o+9,t.size-=u,a=new Uint8Array(t.size);d.length;){e=d.shift();var h=e.byteLength;if(u){if(u>h){u-=h;continue}e=e.subarray(u),h-=u,u=0}a.set(e,c),c+=h}return i&&(i-=o+3),{data:a,pts:s,dts:l,len:i}}return null}},{key:"pushAccesUnit",value:function(t,e){t.units.units.length&&(!this.config.forceKeyFrameOnDiscontinuity||t.key===!0||e.sps&&(e.samples.length||this.contiguous)?e.samples.push(t):e.dropped++),t.debug.length&&f.logger.log(t.pts+"/"+t.dts+":"+t.debug+","+t.units.length)}},{key:"_parseAVCPES",value:function(t,e){var n,r,i,o=this,a=this._avcTrack,s=this._parseAVCNALu(t.data),l=!1,u=this.avcSample;t.data=null,s.forEach(function(e){switch(e.type){case 1:r=!0,l&&u&&(u.debug+="NDR ");break;case 5:r=!0,u||(u=o.avcSample=o._createAVCSample(!0,t.pts,t.dts,"")),l&&(u.debug+="IDR "),u.key=!0;break;case 6:r=!0,l&&u&&(u.debug+="SEI "),n=new d.default(o.discardEPB(e.data)),n.readUByte();for(var s=0,c=0,f=!1,h=0;!f&&n.bytesAvailable>1;){s=0;do h=n.readUByte(),s+=h;while(255===h);c=0;do h=n.readUByte(),c+=h;while(255===h);if(4===s&&0!==n.bytesAvailable){f=!0;var p=n.readUByte();if(181===p){var y=n.readUShort();if(49===y){var g=n.readUInt();if(1195456820===g){var v=n.readUByte();if(3===v){var m=n.readUByte(),b=n.readUByte(),_=31&m,E=[m,b];for(i=0;i<_;i++)E.push(n.readUByte()),E.push(n.readUByte()),E.push(n.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:t.pts,bytes:E})}}}}}else if(c<n.bytesAvailable)for(i=0;i<c;i++)n.readUByte()}break;case 7:if(r=!0,l&&u&&(u.debug+="SPS "),!a.sps){n=new d.default(e.data);var T=n.readSPS();a.width=T.width,a.height=T.height,a.sps=[e.data],a.duration=o._duration;var A=e.data.subarray(1,4),k="avc1.";for(i=0;i<3;i++){var w=A[i].toString(16);w.length<2&&(w="0"+w),k+=w}a.codec=k}break;case 8:r=!0,l&&u&&(u.debug+="PPS "),a.pps||(a.pps=[e.data]);break;case 9:r=!1,u&&o.pushAccesUnit(u,a),u=o.avcSample=o._createAVCSample(!1,t.pts,t.dts,l?"AUD ":"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}if(u&&r){var S=u.units;S.units.push(e)}}),e&&u&&(this.pushAccesUnit(u,a),this.avcSample=null)}},{key:"_createAVCSample",value:function(t,e,n,r){return{key:t,pts:e,dts:n,units:{units:[],length:0},debug:r}}},{key:"_insertSampleInOrder",value:function(t,e){var n=t.length;if(n>0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.pts<t[r].pts){t.splice(r,0,e);break}}else t.push(e)}
+},{key:"_getLastNalUnit",value:function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.units.length){var n=this._avcTrack,r=n.samples;t=r[r.length-1]}if(t){var i=t.units.units;e=i[i.length-1]}return e}},{key:"_parseAVCNALu",value:function(t){for(var e,n,r,i,o,a=0,s=t.byteLength,l=this._avcTrack,u=l.naluState||0,c=u,d=[],f=-1;a<s;)switch(e=t[a++],u){case 0:0===e&&(u=1);break;case 1:u=0===e?2:0;break;case 2:case 3:if(0===e)u=3;else if(1===e){if(f>=0)r={data:t.subarray(f,a-u-1),type:o},d.push(r);else{var h=this._getLastNalUnit();if(h&&(c&&a<=4-c&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-c)),n=a-u-1,n>0)){var p=new Uint8Array(h.data.byteLength+n);p.set(h.data,0),p.set(t.subarray(0,n),h.data.byteLength),h.data=p}}a<s?(i=31&t[a],f=a,o=i,u=0):u=-1}else u=0;break;case-1:f=0,o=31&e,u=0}if(f>=0&&u>=0&&(r={data:t.subarray(f,s),type:o,state:u},d.push(r)),0===d.length){var y=this._getLastNalUnit();if(y){var g=new Uint8Array(y.data.byteLength+t.byteLength);g.set(y.data,0),g.set(t,y.data.byteLength),y.data=g}}return l.naluState=u,d}},{key:"discardEPB",value:function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n}},{key:"_parseAACPES",value:function(t){var e,n,r,i,o,a,l,c,d,p=this._aacTrack,y=t.data,g=t.pts,v=0,m=this.aacOverFlow,b=this.aacLastPTS;if(m){var _=new Uint8Array(m.byteLength+y.byteLength);_.set(m,0),_.set(y,m.byteLength),y=_}for(o=v,c=y.length;o<c-1&&(255!==y[o]||240!==(240&y[o+1]));o++);if(o){var E,T;if(o<c-1?(E="AAC PES did not start with ADTS header,offset:"+o,T=!1):(E="no ADTS header found in AAC PES",T=!0),f.logger.warn("parsing error:"+E),this.observer.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:T,reason:E}),T)return}if(p.audiosamplerate||(e=s.default.getAudioConfig(this.observer,y,o,this.audioCodec),p.config=e.config,p.audiosamplerate=e.samplerate,p.channelCount=e.channelCount,p.codec=e.codec,p.duration=this._duration,f.logger.log("parsed codec:"+p.codec+",rate:"+e.samplerate+",nb channel:"+e.channelCount)),i=0,r=9216e4/p.audiosamplerate,m&&b){var A=b+r;Math.abs(A-g)>1&&(f.logger.log("AAC: align PTS for overlapping frames by "+Math.round((A-g)/90)),g=A)}for(;o+5<c&&(a=1&y[o+1]?7:9,n=(3&y[o+3])<<11|y[o+4]<<3|(224&y[o+5])>>>5,n-=a,n>0&&o+a+n<=c);)for(l=g+i*r,d={unit:y.subarray(o+a,o+a+n),pts:l,dts:l},p.samples.push(d),p.len+=n,o+=n+a,i++;o<c-1&&(255!==y[o]||240!==(240&y[o+1]));o++);m=o<c?y.subarray(o,c):null,this.aacOverFlow=m,this.aacLastPTS=l}},{key:"_parseID3PES",value:function(t){this._id3Track.samples.push(t)}}],[{key:"probe",value:function(t){return t.length>=564&&71===t[0]&&71===t[188]&&71===t[376]}}]),t}();n.default=p},{17:17,21:21,24:24,26:26,43:43}],24:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",OTHER_ERROR:"otherError"},n.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",INTERNAL_EXCEPTION:"internalException"}},{}],25:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t(43),l=t(24),u=t(26),c=r(u),d=function(){function t(e){i(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}return a(t,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"===o(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if("hlsEventGeneric"===t)throw new Error("Forbidden event name: "+t);this.hls.on(t,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(t,e){this.onEventGeneric(t,e)}},{key:"onEventGeneric",value:function(t,e){var n=function(t,e){var n="on"+t.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,e)};try{n.call(this,t,e).call()}catch(e){s.logger.error("internal error happened while processing "+t+":"+e.message),this.hls.trigger(c.default.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}}}]),t}();n.default=d},{24:24,26:26,43:43}],26:[function(t,e,n){"use strict";e.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},{}],27:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"getSilentFrame",value:function(t){return 1===t?new Uint8Array([0,200,0,128,35,128]):2===t?new Uint8Array([33,0,73,144,2,25,0,35,128]):3===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]):4===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]):5===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]):6===t?new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]):null}}]),t}();n.default=o},{}],28:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"isBuffered",value:function(t,e){if(t)for(var n=t.buffered,r=0;r<n.length;r++)if(e>=n.start(r)&&e<=n.end(r))return!0;return!1}},{key:"bufferInfo",value:function(t,e,n){if(t){var r,i=t.buffered,o=[];for(r=0;r<i.length;r++)o.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(o,e,n)}return{len:0,start:0,end:0,nextStart:void 0}}},{key:"bufferedInfo",value:function(t,e,n){var r,i,o,a,s,l=[];for(t.sort(function(t,e){var n=t.start-e.start;return n?n:e.end-t.end}),s=0;s<t.length;s++){var u=l.length;if(u){var c=l[u-1].end;t[s].start-c<n?t[s].end>c&&(l[u-1].end=t[s].end):l.push(t[s])}else l.push(t[s])}for(s=0,r=0,i=o=e;s<l.length;s++){var d=l[s].start,f=l[s].end;if(e+n>=d&&e<f)i=d,o=f,r=o-e;else if(e+n<d){a=d;break}}return{len:r,start:i,end:o,nextStart:a}}}]),t}();n.default=o},{}],29:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(43),a=function(){function t(){r(this,t)}return i(t,null,[{key:"mergeDetails",value:function(e,n){var r,i=Math.max(e.startSN,n.startSN)-n.startSN,a=Math.min(e.endSN,n.endSN)-n.startSN,s=n.startSN-e.startSN,l=e.fragments,u=n.fragments,c=0;if(a<i)return void(n.PTSKnown=!1);for(var d=i;d<=a;d++){var f=l[s+d],h=u[d];h&&f&&(c=f.cc-h.cc,isNaN(f.startPTS)||(h.start=h.startPTS=f.startPTS,h.endPTS=f.endPTS,h.duration=f.duration,r=h))}if(c)for(o.logger.log("discontinuity sliding from playlist, take drift into account"),d=0;d<u.length;d++)u[d].cc+=c;if(r)t.updateFragPTSDTS(n,r.sn,r.startPTS,r.endPTS,r.startDTS,r.endDTS);else if(s>=0&&s<l.length){var p=l[s].start;for(d=0;d<u.length;d++)u[d].start+=p}n.PTSKnown=e.PTSKnown}},{key:"updateFragPTSDTS",value:function(e,n,r,i,o,a){var s,l,u,c;if(n<e.startSN||n>e.endSN)return 0;if(s=n-e.startSN,l=e.fragments,u=l[s],!isNaN(u.startPTS)){var d=Math.abs(u.startPTS-r);isNaN(u.deltaPTS)?u.deltaPTS=d:u.deltaPTS=Math.max(d,u.deltaPTS),r=Math.min(r,u.startPTS),i=Math.max(i,u.endPTS),o=Math.min(o,u.startDTS),a=Math.max(a,u.endDTS)}var f=r-u.start;for(u.start=u.startPTS=r,u.endPTS=i,u.startDTS=o,u.endDTS=a,u.duration=i-r,c=s;c>0;c--)t.updatePTS(l,c,c-1);for(c=s;c<l.length-1;c++)t.updatePTS(l,c,c+1);return e.PTSKnown=!0,f}},{key:"updatePTS",value:function(t,e,n){var r=t[e],i=t[n],a=i.startPTS;isNaN(a)?n>e?i.start=r.start+r.duration:i.start=r.start-i.duration:n>e?(r.duration=a-r.start,r.duration<0&&o.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-a,i.duration<0&&o.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!"))}}]),t}();n.default=a},{43:43}],30:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(26),s=r(a),l=t(24),u=t(34),c=r(u),d=t(32),f=r(d),h=t(3),p=r(h),y=t(6),g=r(y),v=t(7),m=r(v),b=t(4),_=r(b),E=t(11),T=r(E),A=t(10),k=r(A),w=t(12),S=r(w),L=t(9),R=r(L),O=t(5),C=r(O),P=t(43),D=t(47),I=r(D),x=t(1),N=r(x),M=t(33),F=r(M),B=t(41),U=r(B),j=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,t);var n=t.DefaultConfig;if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var r in n)r in e||(e[r]=n[r]);if(void 0!==e.liveMaxLatencyDurationCount&&e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(e.liveMaxLatencyDuration<=e.liveSyncDuration||void 0===e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');(0,P.enableLogs)(e.debug),this.config=e;var o=this.observer=new N.default;o.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t,t].concat(n))},o.off=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.removeListener.apply(o,[t].concat(n))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o),this.playlistLoader=new c.default(this),this.fragmentLoader=new f.default(this),this.levelController=new k.default(this),this.abrController=new e.abrController(this),this.bufferController=new e.bufferController(this),this.capLevelController=new e.capLevelController(this),this.fpsController=new e.fpsController(this),this.streamController=new e.streamController(this),this.audioStreamController=new e.audioStreamController(this),this.timelineController=new e.timelineController(this),this.audioTrackController=new C.default(this),this.keyLoader=new F.default(this)}return o(t,null,[{key:"isSupported",value:function(){return window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"version",get:function(){return"0.6.7"}},{key:"Events",get:function(){return s.default}},{key:"ErrorTypes",get:function(){return l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig||(t.defaultConfig={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,seekHoleNudgeDuration:.01,stalledInBufferedNudgeThreshold:10,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:I.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:p.default,bufferController:g.default,capLevelController:m.default,fpsController:R.default,streamController:T.default,audioStreamController:_.default,timelineController:S.default,cueHandler:U.default,enableCEA708Captions:!0,enableMP2TPassThrough:!1,stretchShortVideoTrack:!1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:5,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.8,abrBandWidthUpFactor:.7,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0}),t.defaultConfig},set:function(e){t.defaultConfig=e}}]),o(t,[{key:"destroy",value:function(){P.logger.log("destroy"),this.trigger(s.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.abrController.destroy(),this.bufferController.destroy(),this.capLevelController.destroy(),this.fpsController.destroy(),this.streamController.destroy(),this.audioStreamController.destroy(),this.timelineController.destroy(),this.audioTrackController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(t){P.logger.log("attachMedia"),this.media=t,this.trigger(s.default.MEDIA_ATTACHING,{media:t})}},{key:"detachMedia",value:function(){P.logger.log("detachMedia"),this.trigger(s.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(t){P.logger.log("loadSource:"+t),this.url=t,this.trigger(s.default.MANIFEST_LOADING,{url:t})}},{key:"startLoad",value:function(){var t=arguments.length<=0||void 0===arguments[0]?-1:arguments[0];P.logger.log("startLoad"),this.levelController.startLoad(),this.streamController.startLoad(t),this.audioStreamController.startLoad(t)}},{key:"stopLoad",value:function(){P.logger.log("stopLoad"),this.levelController.stopLoad(),this.streamController.stopLoad(),this.audioStreamController.stopLoad()}},{key:"swapAudioCodec",value:function(){P.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){P.logger.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){P.logger.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){P.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){P.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(t){P.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){P.logger.log("set startLevel:"+t),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(t){P.logger.log("set autoLevelCapping:"+t),this.abrController.autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"audioTracks",get:function(){return this.audioTrackController.audioTracks}},{key:"audioTrack",get:function(){return this.audioTrackController.audioTrack},set:function(t){this.audioTrackController.audioTrack=t}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}}]),t}();n.default=j},{1:1,10:10,11:11,12:12,24:24,26:26,3:3,32:32,33:33,34:34,4:4,41:41,43:43,47:47,5:5,6:6,7:7,9:9}],31:[function(t,e,n){"use strict";e.exports=t(30).default},{30:30}],32:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(43),p=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.FRAG_LOADING));return n.loaders={},n}return a(e,t),s(e,[{key:"destroy",value:function(){var t=this.loaders;for(var e in t){var n=t[e];n&&n.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onFragLoading",value:function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=this.hls.config;e.loaded=0,r&&(h.logger.warn("abort previous fragment loader for type:"+n),r.abort()),r=this.loaders[n]=e.loader="undefined"!=typeof i.fLoader?new i.fLoader(i):new i.loader(i);var o=void 0,a=void 0,s=void 0;o={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var l=e.byteRangeStartOffset,u=e.byteRangeEndOffset;isNaN(l)||isNaN(u)||(o.rangeStart=l,o.rangeEnd=u),a={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},r.load(o,a,s)}},{key:"loadsuccess",value:function(t,e,n){var r=t.data,i=n.frag;i.loader=void 0,this.loaders[i.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:r,frag:i,stats:e})}},{key:"loaderror",value:function(t,e){var n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t})}},{key:"loadtimeout",value:function(t,e){var n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag})}},{key:"loadprogress",value:function(t,e,n){var r=e.frag;r.loaded=t.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:r,stats:t})}}]),e}(d.default);n.default=p},{24:24,25:25,26:26,43:43}],33:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(43),p=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return a(e,t),s(e,[{key:"destroy",value:function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onKeyLoading",value:function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=e.decryptdata,o=i.uri;if(o!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;r&&(h.logger.warn("abort previous fragment loader for type:"+n),r.abort()),e.loader=this.loaders[n]=new a.loader(a),this.decrypturl=o,this.decryptkey=null;var s=void 0,l=void 0,c=void 0;s={url:o,frag:e,responseType:"arraybuffer"},l={timeout:a.fragLoadingTimeOut,maxRetry:a.fragLoadingMaxRetry,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(s,l,c)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:e}))}},{key:"loadsuccess",value:function(t,e,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(t.data),r.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(u.default.KEY_LOADED,{frag:r})}},{key:"loaderror",value:function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})}},{key:"loadtimeout",value:function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})}}]),e}(d.default);n.default=p},{24:24,25:25,26:26,43:43}],34:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t(26),u=r(l),c=t(25),d=r(c),f=t(24),h=t(46),p=r(h),y=t(38),g=r(y),v=t(43),m=function(t){function e(t){i(this,e);var n=o(this,Object.getPrototypeOf(e).call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING));return n.loaders={},n}return a(e,t),s(e,[{key:"destroy",value:function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},d.default.prototype.destroy.call(this)}},{key:"onManifestLoading",value:function(t){this.load(t.url,{type:"manifest"})}},{key:"onLevelLoading",value:function(t){this.load(t.url,{type:"level",level:t.level,id:t.id})}},{key:"onAudioTrackLoading",value:function(t){this.load(t.url,{type:"audioTrack",id:t.id})}},{key:"load",value:function(t,e){var n=this.loaders[e.type];if(n){var r=n.context;if(r&&r.url===t)return void v.logger.trace("playlist request ongoing");v.logger.warn("abort previous loader for type:"+e.type),n.abort()}var i=this.hls.config,o=void 0,a=void 0,s=void 0,l=void 0;"manifest"===e.type?(o=i.manifestLoadingMaxRetry,a=i.manifestLoadingTimeOut,s=i.manifestLoadingRetryDelay,l=i.manifestLoadingMaxRetryTimeOut):(o=i.levelLoadingMaxRetry,a=i.levelLoadingTimeOut,s=i.levelLoadingRetryDelay,l=i.levelLoadingMaxRetryTimeOut,v.logger.log("loading playlist for level "+e.level)),n=this.loaders[e.type]=e.loader="undefined"!=typeof i.pLoader?new i.pLoader(i):new i.loader(i),e.url=t,e.responseType="";var u=void 0,c=void 0;u={timeout:a,maxRetry:o,retryDelay:s,maxRetryDelay:l},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(e,u,c)}},{key:"resolve",value:function(t,e){return p.default.buildAbsoluteURL(e,t)}},{key:"parseMasterPlaylist",value:function(t,e){for(var n=[],r=void 0,i=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g;null!=(r=i.exec(t));){var o={},a=o.attrs=new g.default(r[1]);o.url=this.resolve(r[2],e);var s=a.decimalResolution("RESOLUTION");s&&(o.width=s.width,o.height=s.height),o.bitrate=a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),o.name=a.NAME;var l=a.CODECS;if(l){l=l.split(",");for(var u=0;u<l.length;u++){var c=l[u];c.indexOf("avc1")!==-1?o.videoCodec=this.avc1toavcoti(c):o.audioCodec=c}}n.push(o)}return n}},{key:"parseMasterPlaylistMedia",value:function(t,e,n){for(var r=void 0,i=[],o=/#EXT-X-MEDIA:(.*)/g;null!=(r=o.exec(t));){var a={},s=new g.default(r[1]);s.TYPE===n&&(a.groupId=s["GROUP-ID"],a.name=s.NAME,a.type=n,a.default="YES"===s.DEFAULT,a.autoselect="YES"===s.AUTOSELECT,a.forced="YES"===s.FORCED,s.URI&&(a.url=this.resolve(s.URI,e)),a.lang=s.LANGUAGE,a.name||(a.name=a.lang),i.push(a))}return i}},{key:"createInitializationVector",value:function(t){for(var e=new Uint8Array(16),n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e}},{key:"fragmentDecryptdataFromLevelkey",value:function(t,e){var n=t;return t&&t.method&&t.uri&&!t.iv&&(n=this.cloneObj(t),n.iv=this.createInitializationVector(e)),n}},{key:"avc1toavcoti",value:function(t){var e,n=t.split(".");return n.length>2?(e=n.shift()+".",e+=parseInt(n.shift()).toString(16),e+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):e=t,e}},{key:"cloneObj",value:function(t){return JSON.parse(JSON.stringify(t))}},{key:"parseLevelPlaylist",value:function(t,e,n,r){var i,o,a,s=0,l=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},c={method:null,key:null,iv:null,uri:null},d=0,f=null,h=null,p=null,y=null,m=null,b=null,_=[];for(a=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\d+(?:\.\d+)?)(?:,(.*))?)|(?:(?!#)()(\S.+))|(?:#EXT-X-(BYTERANGE):(\d+(?:@\d+(?:\.\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\r?\n?/g;null!==(o=a.exec(t));)switch(o.shift(),o=o.filter(function(t){return void 0!==t}),o[0]){case"PLAYLIST-TYPE":u.type=o[1].toUpperCase();break;case"MEDIA-SEQUENCE":s=u.startSN=parseInt(o[1]);break;case"TARGETDURATION":u.targetduration=parseFloat(o[1]);break;case"VERSION":u.version=parseInt(o[1]);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":d++,_.push(o);break;case"BYTERANGE":var E=o[1].split("@");b=1===E.length?m:parseInt(E[1]),m=parseInt(E[0])+b;break;case"INF":p=parseFloat(o[1]),y=o[2]?o[2]:null,_.push(o);break;case"":if(!isNaN(p)){var T=s++;i=this.fragmentDecryptdataFromLevelkey(c,T);var A=o[1]?this.resolve(o[1],e):null;h={url:A,type:r,duration:p,title:y,start:l,sn:T,level:n,cc:d,decryptdata:i,programDateTime:f,tagList:_},null!==b&&(h.byteRangeStartOffset=b,h.byteRangeEndOffset=m),u.fragments.push(h),l+=p,p=null,y=null,b=null,f=null,_=[]}break;case"KEY":var k=o[1],w=new g.default(k),S=w.enumeratedString("METHOD"),L=w.URI,R=w.hexadecimalInteger("IV");S&&(c={method:null,key:null,iv:null,uri:null},L&&"AES-128"===S&&(c.method=S,c.uri=this.resolve(L,e),c.key=null,c.iv=R));break;case"START":var O=o[1],C=new g.default(O),P=C.decimalFloatingPoint("TIME-OFFSET");isNaN(P)||(u.startTimeOffset=P);
+break;case"PROGRAM-DATE-TIME":f=new Date(Date.parse(o[1])),_.push(o);break;case"#":o.shift(),_.push(o);break;default:v.logger.warn("line parsed but not handled: "+o)}return h&&!h.url&&(u.fragments.pop(),l-=h.duration),u.totalduration=l,u.averagetargetduration=l/u.fragments.length,u.endSN=s-1,u}},{key:"loadsuccess",value:function(t,e,n){var r=t.data,i=t.url,o=n.type,a=n.id,s=n.level,l=this.hls;if(this.loaders[o]=void 0,void 0!==i&&0!==i.indexOf("data:")||(i=n.url),e.tload=performance.now(),0===r.indexOf("#EXTM3U"))if(r.indexOf("#EXTINF:")>0){var c="audioTrack"!==o,d=this.parseLevelPlaylist(r,i,(c?s:a)||0,c?"main":"audio");"manifest"===o&&l.trigger(u.default.MANIFEST_LOADED,{levels:[{url:i,details:d}],audioTracks:[],url:i,stats:e}),e.tparsed=performance.now(),c?l.trigger(u.default.LEVEL_LOADED,{details:d,level:s||0,id:a||0,stats:e}):l.trigger(u.default.AUDIO_TRACK_LOADED,{details:d,id:a,stats:e})}else{var h=this.parseMasterPlaylist(r,i);if(h.length){var p=this.parseMasterPlaylistMedia(r,i,"AUDIO");if(p.length){var y=!1;p.forEach(function(t){t.url||(y=!0)}),y===!1&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(v.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main"}))}l.trigger(u.default.MANIFEST_LOADED,{levels:h,audioTracks:p,url:i,stats:e})}else l.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no level found in manifest"})}else l.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:f.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:i,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(t,e){var n,r,i=e.loader;switch(e.type){case"manifest":n=f.ErrorDetails.MANIFEST_LOAD_ERROR,r=!0;break;case"level":n=f.ErrorDetails.LEVEL_LOAD_ERROR,r=!1;break;case"audioTrack":n=f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:n,fatal:r,url:i.url,loader:i,response:t,context:e})}},{key:"loadtimeout",value:function(t,e){var n,r,i=e.loader;switch(e.type){case"manifest":n=f.ErrorDetails.MANIFEST_LOAD_TIMEOUT,r=!0;break;case"level":n=f.ErrorDetails.LEVEL_LOAD_TIMEOUT,r=!1;break;case"audioTrack":n=f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT,r=!1}i&&(i.abort(),this.loaders[e.type]=void 0),this.hls.trigger(u.default.ERROR,{type:f.ErrorTypes.NETWORK_ERROR,details:n,fatal:r,url:i.url,loader:i,context:e})}}]),e}(d.default);n.default=m},{24:24,25:25,26:26,38:38,43:43,46:46}],35:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"init",value:function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=o,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,l,a,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))}},{key:"box",value:function(t){for(var e,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,o=i;i--;)r+=n[i].byteLength;for(e=new Uint8Array(r),e[0]=r>>24&255,e[1]=r>>16&255,e[2]=r>>8&255,e[3]=255&r,e.set(t,4),i=0,r=8;i<o;i++)e.set(n[i],r),r+=n[i].byteLength;return e}},{key:"hdlr",value:function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])}},{key:"mdat",value:function(e){return t.box(t.types.mdat,e)}},{key:"mdhd",value:function(e,n){return n*=e,t.box(t.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))}},{key:"mdia",value:function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))}},{key:"mfhd",value:function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}},{key:"minf",value:function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))}},{key:"moof",value:function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))}},{key:"moov",value:function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))}},{key:"mvex",value:function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))}},{key:"mvhd",value:function(e,n){n*=e;var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,r)}},{key:"sdtp",value:function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t.box(t.types.sdtp,o)}},{key:"stbl",value:function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))}},{key:"avc1",value:function(e){var n,r,i,o=[],a=[];for(n=0;n<e.sps.length;n++)r=e.sps[n],i=r.byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<e.pps.length;n++)r=e.pps[n],i=r.byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=t.box(t.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|e.sps.length].concat(o).concat([e.pps.length]).concat(a))),l=e.width,u=e.height;return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}},{key:"mp4a",value:function(e){var n=e.audiosamplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))}},{key:"stsd",value:function(e){return"audio"===e.type?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))}},{key:"tkhd",value:function(e){var n=e.id,r=e.duration*e.timescale,i=e.width,o=e.height;return t.box(t.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))}},{key:"traf",value:function(e,n){var r=t.sdtp(e),i=e.id;return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),t.box(t.types.tfdt,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),t.trun(e,r.length+16+16+8+16+8+8),r)}},{key:"trak",value:function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))}},{key:"trex",value:function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(e,n){var r,i,o,a,s,l,u=e.samples||[],c=u.length,d=12+16*c,f=new Uint8Array(d);for(n+=8+d,f.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)i=u[r],o=i.duration,a=i.size,s=i.flags,l=i.cts,f.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return t.box(t.types.trun,f)}},{key:"initSegment",value:function(e){t.types||t.init();var n,r=t.moov(e);return n=new Uint8Array(t.FTYP.byteLength+r.byteLength),n.set(t.FTYP),n.set(r,t.FTYP.byteLength),n}}]),t}();n.default=o},{}],36:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(27),s=r(a),l=t(26),u=r(l),c=t(43),d=t(35),f=r(d),h=t(24);t(44);var p=function(){function t(e,n,r){i(this,t),this.observer=e,this.id=n,this.config=r,this.ISGenerated=!1,this.PES2MP4SCALEFACTOR=4,this.PES_TIMESCALE=9e4,this.MP4_TIMESCALE=this.PES_TIMESCALE/this.PES2MP4SCALEFACTOR}return o(t,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){this._initPTS=this._initDTS=void 0}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(t,e,n,r,i,o,a,s,l){if(this.level=t,this.sn=e,this.ISGenerated||this.generateIS(n,r,a),this.ISGenerated)if(n.samples.length){var c=this.remuxAudio(n,a,s,l);if(r.samples.length){var d=void 0;c&&(d=c.endPTS-c.startPTS),this.remuxVideo(r,a,s,d)}}else{var f=void 0;r.samples.length&&(f=this.remuxVideo(r,a,s)),f&&n.codec&&this.remuxEmptyAudio(n,a,s,f)}i.samples.length&&this.remuxID3(i,a),o.samples.length&&this.remuxText(o,a),this.observer.trigger(u.default.FRAG_PARSED,{id:this.id,level:this.level,sn:this.sn})}},{key:"generateIS",value:function(t,e,n){var r,i,o=this.observer,a=t.samples,s=e.samples,l=this.PES_TIMESCALE,d={},p={id:this.id,level:this.level,sn:this.sn,tracks:d,unique:!1},y=void 0===this._initPTS;y&&(r=i=1/0),t.config&&a.length&&(t.timescale=t.audiosamplerate,t.timescale*t.duration>Math.pow(2,32)&&!function(){var e=function t(e,n){return n?t(n,e%n):e};t.timescale=t.audiosamplerate/e(t.audiosamplerate,1024)}(),c.logger.log("audio mp4 timescale :"+t.timescale),d.audio={container:"audio/mp4",codec:t.codec,initSegment:f.default.initSegment([t]),metadata:{channelCount:t.channelCount}},y&&(r=i=a[0].pts-l*n)),e.sps&&e.pps&&s.length&&(e.timescale=this.MP4_TIMESCALE,d.video={container:"video/mp4",codec:e.codec,initSegment:f.default.initSegment([e]),metadata:{width:e.width,height:e.height}},y&&(r=Math.min(r,s[0].pts-l*n),i=Math.min(i,s[0].dts-l*n))),Object.keys(d).length?(o.trigger(u.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,y&&(this._initPTS=r,this._initDTS=i)):o.trigger(u.default.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,id:this.id,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})}},{key:"remuxVideo",value:function(t,e,n,r){var i,o,a,s,l,d,h,p,y=8,g=this.PES_TIMESCALE,v=this.PES2MP4SCALEFACTOR,m=t.samples,b=[],_=m.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(_<0){c.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(_/90)+" ms to overcome this issue");for(var E=0;E<m.length;E++)m[E].dts+=_}var T=void 0;T=n?this.nextAvcDts:e*g;var A=m[0];l=Math.max(this._PTSNormalize(A.dts-this._initDTS,T),0),s=Math.max(this._PTSNormalize(A.pts-this._initDTS,T),0);var k=Math.round((l-T)/90);n&&k&&(k>1?c.logger.log("AVC:"+k+" ms hole between fragments detected,filling it"):k<-1&&c.logger.log("AVC:"+-k+" ms overlapping between fragments detected"),l=T,m[0].dts=l+this._initDTS,s=Math.max(s-k,T),m[0].pts=s+this._initDTS,c.logger.log("Video/PTS/DTS adjusted: "+Math.round(s/90)+"/"+Math.round(l/90)+",delta:"+k+" ms")),d=l,A=m[m.length-1],p=Math.max(this._PTSNormalize(A.dts-this._initDTS,T),0),h=Math.max(this._PTSNormalize(A.pts-this._initDTS,T),0),h=Math.max(h,p);var w=navigator.vendor,S=navigator.userAgent,L=w&&w.indexOf("Apple")>-1&&S&&!S.match("CriOS");L&&(i=Math.round((p-l)/(v*(m.length-1))));for(var R=0;R<m.length;R++){var O=m[R];L?O.dts=l+R*v*i:(O.dts=Math.max(this._PTSNormalize(O.dts-this._initDTS,T),l),O.dts=Math.round(O.dts/v)*v),O.pts=Math.max(this._PTSNormalize(O.pts-this._initDTS,T),O.dts),O.pts=Math.round(O.pts/v)*v}o=new Uint8Array(t.len+4*t.nbNalu+8);var C=new DataView(o.buffer);C.setUint32(0,o.byteLength),o.set(f.default.types.mdat,4);for(var P=0;P<m.length;P++){for(var D=m[P],I=0,x=void 0;D.units.units.length;){var N=D.units.units.shift();C.setUint32(y,N.data.byteLength),y+=4,o.set(N.data,y),y+=N.data.byteLength,I+=4+N.data.byteLength}if(L)x=Math.max(0,i*Math.round((D.pts-D.dts)/(v*i)));else{if(P<m.length-1)i=m[P+1].dts-D.dts;else{var M=this.config,F=D.dts-m[P>0?P-1:P].dts;if(M.stretchShortVideoTrack){var B=M.maxBufferHole,U=M.maxSeekHole,j=Math.floor(Math.min(B,U)*g),G=(r?s+r*g:this.nextAacPts)-D.pts;G>j?(i=G-F,i<0&&(i=F),c.logger.log("It is approximately "+G/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=F}else i=F}i/=v,x=Math.round((D.pts-D.dts)/v)}b.push({size:I,duration:i,cts:x,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:D.key?2:1,isNonSync:D.key?0:1}})}this.nextAvcDts=p+i*v;var Y=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,b.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var V=b[0].flags;V.dependsOn=2,V.isNonSync=0}t.samples=b,a=f.default.moof(t.sequenceNumber++,l/v,t),t.samples=[];var K={id:this.id,level:this.level,sn:this.sn,data1:a,data2:o,startPTS:s/g,endPTS:(h+v*i)/g,startDTS:l/g,endDTS:this.nextAvcDts/g,type:"video",nb:b.length,dropped:Y};return this.observer.trigger(u.default.FRAG_PARSING_DATA,K),K}},{key:"remuxAudio",value:function(t,e,n,r){var i,o,a,l,d,h,p,y,g,v,m,b,_,E,T,A=this.PES_TIMESCALE,k=t.timescale,w=A/k,S=1024*t.timescale/t.audiosamplerate,L=8,R=[],O=[];t.samples.sort(function(t,e){return t.pts-e.pts}),O=t.samples,n|=O.length&&this.nextAacPts&&Math.abs(e-this.nextAacPts/A)<.1;var C=n?this.nextAacPts:e*A,P=S*w,D=C;if(r)for(var I=0;I<O.length;){var x=O[I],N=this._PTSNormalize(x.pts-this._initDTS,C),M=N-D;if(M<=-P)c.logger.warn("Dropping 1 audio frame @ "+Math.round(D/90)/1e3+"s due to "+Math.round(Math.abs(M/90))+" ms overlap."),O.splice(I,1),t.len-=x.unit.length;else if(M>=P){var F=Math.round(M/P);c.logger.warn("Injecting "+F+" audio frame @ "+Math.round(D/90)/1e3+"s due to "+Math.round(M/90)+" ms gap.");for(var B=0;B<F;B++)T=D+this._initDTS,T=Math.max(T,this._initDTS),E=s.default.getSilentFrame(t.channelCount),E||(c.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),E=x.unit.slice(0)),O.splice(I,0,{unit:E,pts:T,dts:T}),t.len+=E.length,D+=P,I+=1;x.pts=x.dts=D+this._initDTS,D+=P,I+=1}else Math.abs(M)>.1*P,D+=P,0===I?x.pts=x.dts=this._initDTS+C:x.pts=x.dts=O[I-1].pts+P,I+=1}for(;O.length;){if(o=O.shift(),l=o.unit,v=o.pts-this._initDTS,m=o.dts-this._initDTS,void 0!==g)b=this._PTSNormalize(v,g),_=this._PTSNormalize(m,g),a.duration=Math.round((_-g)/w);else{b=this._PTSNormalize(v,C),_=this._PTSNormalize(m,C);var U=Math.round(1e3*(b-C)/A),j=0;if(n&&U){if(U>0)j=Math.round((b-C)/P),c.logger.log(U+" ms hole between AAC samples detected,filling it"),j>0&&(E=s.default.getSilentFrame(t.channelCount),E||(E=l.slice(0)),t.len+=j*E.length);else if(U<-12){c.logger.log(-U+" ms overlapping between AAC samples detected, drop frame"),t.len-=l.byteLength;continue}b=_=C}if(p=Math.max(0,b),y=Math.max(0,_),!(t.len>0))return;d=new Uint8Array(t.len+8),i=new DataView(d.buffer),i.setUint32(0,d.byteLength),d.set(f.default.types.mdat,4);for(var G=0;G<j;G++)T=b-(j-G)*P,E=s.default.getSilentFrame(t.channelCount),E||(c.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),E=l.slice(0)),d.set(E,L),L+=E.byteLength,a={size:E.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},R.push(a)}d.set(l,L),L+=l.byteLength,a={size:l.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},R.push(a),g=_}var Y=0,V=R.length;if(V>=2&&(Y=R[V-2].duration,a.duration=Y),V){this.nextAacPts=b+w*Y,t.len=0,t.samples=R,h=f.default.moof(t.sequenceNumber++,y/w,t),t.samples=[];var K={id:this.id,level:this.level,sn:this.sn,data1:h,data2:d,startPTS:p/A,endPTS:this.nextAacPts/A,startDTS:y/A,endDTS:(_+w*Y)/A,type:"audio",nb:V};return this.observer.trigger(u.default.FRAG_PARSING_DATA,K),K}return null}},{key:"remuxEmptyAudio",value:function(t,e,n,r){var i=this.PES_TIMESCALE,o=t.timescale?t.timescale:t.audiosamplerate,a=i/o,l=r.startDTS*i+this._initDTS,u=r.endDTS*i+this._initDTS,d=1024,f=a*d,h=Math.ceil((u-l)/f),p=s.default.getSilentFrame(t.channelCount);if(!p)return void c.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var y=[],g=0;g<h;g++){var v=l+g*f;y.push({unit:p.slice(0),pts:v,dts:v}),t.len+=p.length}t.samples=y,this.remuxAudio(t,e,n)}},{key:"remuxID3",value:function(t,e){var n,r=t.samples.length;if(r){for(var i=0;i<r;i++)n=t.samples[i],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE,n.dts=(n.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_METADATA,{id:this.id,level:this.level,sn:this.sn,samples:t.samples})}t.samples=[],e=e}},{key:"remuxText",value:function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var n,r=t.samples.length;if(r){for(var i=0;i<r;i++)n=t.samples[i],n.pts=(n.pts-this._initPTS)/this.PES_TIMESCALE;this.observer.trigger(u.default.FRAG_PARSING_USERDATA,{id:this.id,level:this.level,sn:this.sn,samples:t.samples})}t.samples=[],e=e}},{key:"_PTSNormalize",value:function(t,e){var n;if(void 0===e)return t;for(n=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=n;return t}},{key:"passthrough",get:function(){return!1}}]),t}();n.default=p},{24:24,26:26,27:27,35:35,43:43,44:44}],37:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t(26),s=r(a),l=function(){function t(e,n){i(this,t),this.observer=e,this.id=n,this.ISGenerated=!1}return o(t,[{key:"destroy",value:function(){}},{key:"insertDiscontinuity",value:function(){}},{key:"switchLevel",value:function(){this.ISGenerated=!1}},{key:"remux",value:function(t,e,n,r,i,o){var a=this.observer;if(!this.ISGenerated){var l={},u={id:this.id,tracks:l,unique:!0},c=e,d=c.codec;d&&(u.tracks.video={container:c.container,codec:d,metadata:{width:c.width,height:c.height}}),c=t,d=c.codec,d&&(u.tracks.audio={container:c.container,codec:d,metadata:{channelCount:c.channelCount}}),this.ISGenerated=!0,a.trigger(s.default.FRAG_PARSING_INIT_SEGMENT,u)}a.trigger(s.default.FRAG_PARSING_DATA,{id:this.id,data1:o,startPTS:i,startDTS:i,type:"audiovideo",nb:1,dropped:0})}},{key:"passthrough",get:function(){return!0}}]),t}();n.default=l},{26:26}],38:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var n in e)e.hasOwnProperty(n)&&(this[n]=e[n])}return i(t,[{key:"decimalInteger",value:function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e}},{key:"hexadecimalInteger",value:function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;r<e.length/2;r++)n[r]=parseInt(e.slice(2*r,2*r+2),16);return n}return null}},{key:"hexadecimalIntegerAsNumber",value:function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e}},{key:"decimalFloatingPoint",value:function(t){return parseFloat(this[t])}},{key:"enumeratedString",value:function(t){return this[t]}},{key:"decimalResolution",value:function(t){var e=/^(\d+)x(\d+)$/.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}}}],[{key:"parseAttrList",value:function(t){for(var e,n=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,r={};null!==(e=n.exec(t));){var i=e[2],o='"';0===i.indexOf(o)&&i.lastIndexOf(o)===i.length-1&&(i=i.slice(1,-1)),r[e[1]]=i}return r}}]),t}();n.default=o},{}],39:[function(t,e,n){"use strict";var r={search:function(t,e){for(var n=0,r=t.length-1,i=null,o=null;n<=r;){i=(n+r)/2|0,o=t[i];var a=e(o);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}};e.exports=r},{}],40:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},a=function(t){var e=t;return o.hasOwnProperty(t)&&(e=o[t]),String.fromCharCode(e)},s=15,l=32,u={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},c={17:2,18:4,21:6,22:8,23:10,19:13,20:15},d={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},h=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],p={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var n=this.verboseFilter[t];this.verboseLevel>=n&&console.log(this.time+" ["+t+"] "+e)}},y=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},g=function(){function t(e,n,i,o,a){r(this,t),this.foreground=e||"white",this.underline=n||!1,this.italics=i||!1,this.background=o||"black",this.flash=a||!1}return i(t,[{key:"reset",value:function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}},{key:"setStyles",value:function(t){for(var e=["foreground","underline","italics","background","flash"],n=0;n<e.length;n++){var r=e[n];t.hasOwnProperty(r)&&(this[r]=t[r])}}},{key:"isDefault",value:function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}},{key:"equals",value:function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash}},{key:"copy",value:function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash}},{key:"toString",value:function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}]),t}(),v=function(){function t(e,n,i,o,a,s){r(this,t),this.uchar=e||" ",this.penState=new g(n,i,o,a,s)}return i(t,[{key:"reset",value:function(){this.uchar=" ",this.penState.reset()}},{key:"setChar",value:function(t,e){this.uchar=t,this.penState.copy(e)}},{key:"setPenState",value:function(t){this.penState.copy(t)}},{key:"equals",value:function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)}},{key:"copy",value:function(t){this.uchar=t.uchar,this.penState.copy(t.penState)}},{key:"isEmpty",value:function(){return" "===this.uchar&&this.penState.isDefault()}}]),t}(),m=function(){function t(){r(this,t),this.chars=[];for(var e=0;e<l;e++)this.chars.push(new v);this.pos=0,this.currPenState=new g}return i(t,[{key:"equals",value:function(t){for(var e=!0,n=0;n<l;n++)if(!this.chars[n].equals(t.chars[n])){e=!1;break}return e}},{key:"copy",value:function(t){for(var e=0;e<l;e++)this.chars[e].copy(t.chars[e])}},{key:"isEmpty",value:function(){for(var t=!0,e=0;e<l;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t}},{key:"setCursor",value:function(t){this.pos!==t&&(this.pos=t),this.pos<0?(p.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>l&&(p.log("ERROR","Too large cursor position "+this.pos),this.pos=l)}},{key:"moveCursor",value:function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n<e+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(e)}},{key:"backSpace",value:function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}},{key:"insertChar",value:function(t){t>=144&&this.backSpace();var e=a(t);return this.pos>=l?void p.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),void this.moveCursor(1))}},{key:"clearFromPos",value:function(t){var e;for(e=t;e<l;e++)this.chars[e].reset()}},{key:"clear",value:function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}},{key:"clearToEndOfRow",value:function(){this.clearFromPos(this.pos)}},{key:"getTextString",value:function(){for(var t=[],e=!0,n=0;n<l;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")}},{key:"setPenStyles",value:function(t){this.currPenState.setStyles(t);var e=this.chars[this.pos];e.setPenState(this.currPenState)}}]),t}(),b=function(){function t(){r(this,t),this.rows=[];for(var e=0;e<s;e++)this.rows.push(new m);this.currRow=s-1,this.nrRollUpRows=null,this.reset()}return i(t,[{key:"reset",value:function(){for(var t=0;t<s;t++)this.rows[t].clear();this.currRow=s-1}},{key:"equals",value:function(t){for(var e=!0,n=0;n<s;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e}},{key:"copy",value:function(t){for(var e=0;e<s;e++)this.rows[e].copy(t.rows[e])}},{key:"isEmpty",value:function(){for(var t=!0,e=0;e<s;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t}},{key:"backSpace",value:function(){var t=this.rows[this.currRow];t.backSpace()}},{key:"clearToEndOfRow",value:function(){var t=this.rows[this.currRow];t.clearToEndOfRow()}},{key:"insertChar",value:function(t){var e=this.rows[this.currRow];e.insertChar(t)}},{key:"setPen",value:function(t){var e=this.rows[this.currRow];e.setPenStyles(t)}},{key:"moveCursor",value:function(t){var e=this.rows[this.currRow];e.moveCursor(t)}},{key:"setCursor",value:function(t){p.log("INFO","setCursor: "+t);var e=this.rows[this.currRow];e.setCursor(t)}},{key:"setPAC",value:function(t){p.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.currRow=e;var n=this.rows[this.currRow];if(null!==t.indent){var r=t.indent,i=Math.max(r-1,0);n.setCursor(t.indent),t.color=n.chars[i].penState.foreground}var o={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(o)}},{key:"setBkgData",value:function(t){p.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)}},{key:"setRollUpRows",value:function(t){this.nrRollUpRows=t}},{key:"rollUp",value:function(){if(null===this.nrRollUpRows)return void p.log("DEBUG","roll_up but nrRollUpRows not set yet");p.log("TEXT",this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),p.log("INFO","Rolling up")}},{key:"getDisplayText",value:function(t){t=t||!1;for(var e=[],n="",r=-1,i=0;i<s;i++){var o=this.rows[i].getTextString();o&&(r=i+1,t?e.push("Row "+r+": '"+o+"'"):e.push(o.trim()))}return e.length>0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n}},{key:"getTextAndFormat",value:function(){return this.rows}}]),t}(),_=function(){function t(e,n){r(this,t),this.chNr=e,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new b,this.nonDisplayedMemory=new b,this.lastOutputScreen=new b,this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return i(t,[{key:"reset",value:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[s-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null}},{key:"getHandler",value:function(){return this.outputFilter}},{key:"setHandler",value:function(t){this.outputFilter=t}},{key:"setPAC",value:function(t){this.writeScreen.setPAC(t)}},{key:"setBkgData",value:function(t){this.writeScreen.setBkgData(t)}},{key:"setMode",value:function(t){t!==this.mode&&(this.mode=t,p.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)}},{key:"insertChars",value:function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";p.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(p.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}},{key:"ccRCL",value:function(){p.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}},{key:"ccBS",value:function(){p.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}},{key:"ccAOF",value:function(){}},{key:"ccAON",value:function(){}},{key:"ccDER",value:function(){p.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}},{key:"ccRU",value:function(t){p.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)}},{key:"ccFON",value:function(){
+p.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})}},{key:"ccRDC",value:function(){p.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}},{key:"ccTR",value:function(){p.log("INFO","TR"),this.setMode("MODE_TEXT")}},{key:"ccRTD",value:function(){p.log("INFO","RTD"),this.setMode("MODE_TEXT")}},{key:"ccEDM",value:function(){p.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate()}},{key:"ccCR",value:function(){p.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate()}},{key:"ccENM",value:function(){p.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}},{key:"ccEOC",value:function(){if(p.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,p.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate()}},{key:"ccTO",value:function(t){p.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)}},{key:"ccMIDROW",value:function(t){var e={flash:!1};if(e.underline=t%2===1,e.italics=t>=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=r[n]}p.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)}},{key:"outputDataUpdate",value:function(){var t=p.time;null!==t&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(t,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}},{key:"cueSplitAtTime",value:function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))}}]),t}(),E=function(){function t(e,n,i){r(this,t),this.field=e||1,this.outputs=[n,i],this.channels=[new _(1,n),new _(2,i)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return i(t,[{key:"getHandler",value:function(t){return this.channels[t].getHandler()}},{key:"setHandler",value:function(t,e){this.channels[t].setHandler(e)}},{key:"addData",value:function(t,e){var n,r,i,o=!1;this.lastTime=t,p.setTime(t);for(var a=0;a<e.length;a+=2)if(r=127&e[a],i=127&e[a+1],0!==r||0!==i){if(p.log("DATA","["+y([e[a],e[a+1]])+"] -> ("+y([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(o=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(o)}else p.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,p.log("WARNING","Couldn't parse cleaned data "+y([r,i])+" orig: "+y([e[a],e[a+1]])))}else this.dataCounters.padding+=2}},{key:"parseCmd",value:function(t,e){var n=null,r=(20===t||28===t)&&32<=e&&e<=47,i=(23===t||31===t)&&33<=e&&e<=35;if(!r&&!i)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,p.log("DEBUG","Repeated command ("+y([t,e])+") is dropped"),!0;n=20===t||23===t?1:2;var o=this.channels[n-1];return 20===t||28===t?32===e?o.ccRCL():33===e?o.ccBS():34===e?o.ccAOF():35===e?o.ccAON():36===e?o.ccDER():37===e?o.ccRU(2):38===e?o.ccRU(3):39===e?o.ccRU(4):40===e?o.ccFON():41===e?o.ccRDC():42===e?o.ccTR():43===e?o.ccRTD():44===e?o.ccEDM():45===e?o.ccCR():46===e?o.ccENM():47===e&&o.ccEOC():o.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0}},{key:"parseMidrow",value:function(t,e){var n=null;if((17===t||25===t)&&32<=e&&e<=47){if(n=17===t?1:2,n!==this.currChNr)return p.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.ccMIDROW(e),p.log("DEBUG","MIDROW ("+y([t,e])+")"),!0}return!1}},{key:"parsePAC",value:function(t,e){var n=null,r=null,i=(17<=t&&t<=23||25<=t&&t<=31)&&64<=e&&e<=127,o=(16===t||24===t)&&64<=e&&e<=95;if(!i&&!o)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=t<=23?1:2,r=64<=e&&e<=95?1===n?u[t]:d[t]:1===n?c[t]:f[t];var a=this.interpretPAC(r,e),s=this.channels[n-1];return s.setPAC(a),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0}},{key:"interpretPAC",value:function(t,e){var n=e,r={color:null,italics:!1,indent:null,underline:!1,row:t};return n=e>95?e-96:e-64,r.underline=1===(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}},{key:"parseChars",value:function(t,e){var n=null,r=null,i=null;if(t>=25?(n=2,i=t-8):(n=1,i=t),17<=i&&i<=19){var o=e;o=17===i?e+80:18===i?e+112:e+144,p.log("INFO","Special char '"+a(o)+"' in channel "+n),r=[o]}else 32<=t&&t<=127&&(r=0===e?[t]:[t,e]);if(r){var s=y(r);p.log("DEBUG","Char codes = "+s.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r}},{key:"parseBackgroundAttributes",value:function(t,e){var n,r,i,o,a=(16===t||24===t)&&32<=e&&e<=47,s=(23===t||31===t)&&45<=e&&e<=47;return!(!a&&!s)&&(n={},16===t||24===t?(r=Math.floor((e-32)/2),n.background=h[r],e%2===1&&(n.background=n.background+"_semi")):45===e?n.background="transparent":(n.foreground="black",47===e&&(n.underline=!0)),i=t<24?1:2,o=this.channels[i-1],o.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)}},{key:"reset",value:function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null}},{key:"cueSplitAtTime",value:function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)}}]),t}();n.default=E},{}],41:[function(t,e,n){"use strict";var r={newCue:function(t,e,n,r){for(var i,o,a,s,l,u=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(i=r.rows[c],a=!0,s=0,l="",!i.isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&a?s++:(l+=i.chars[d].uchar,a=!1);o=new u(e,n,l.trim()),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=100*(s/32)+(navigator.userAgent.match(/Firefox\//)?50:0),t.addCue(o)}}};e.exports=r},{}],42:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return i(t,[{key:"sample",value:function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t}},{key:"getTotalWeight",value:function(){return this.totalWeight_}},{key:"getEstimate",value:function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_}}]),t}();n.default=o},{}],43:[function(t,e,n){"use strict";function r(){}function i(t,e){return e="["+t+"] > "+e}function o(t){var e=self.console[t];return e?function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];r[0]&&(r[0]=i(t,r[0])),e.apply(self.console,r)}:r}function a(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.forEach(function(e){u[e]=t[e]?t[e].bind(t):o(e)})}Object.defineProperty(n,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},l={trace:r,debug:r,log:r,warn:r,info:r,error:r},u=l;n.enableLogs=function(t){if(t===!0||"object"===("undefined"==typeof t?"undefined":s(t))){a(t,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},n.logger=u},{}],44:[function(t,e,n){"use strict";"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(t,e){var n=new Uint8Array(this);void 0===e&&(e=n.length);for(var r=new ArrayBuffer(e-t),i=new Uint8Array(r),o=0;o<i.length;o++)i[o]=n[o+t];return r})},{}],45:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"toString",value:function(t){for(var e="",n=t.length,r=0;r<n;r++)e+="["+t.start(r).toFixed(3)+","+t.end(r).toFixed(3)+"]";return e}}]),t}();n.default=o},{}],46:[function(t,e,n){"use strict";var r={buildAbsoluteURL:function(t,e){if(e=e.trim(),/^[a-z]+:/i.test(e))return e;var n=null,i=null,o=/^([^#]*)(.*)$/.exec(e);o&&(i=o[2],e=o[1]);var a=/^([^\?]*)(.*)$/.exec(e);a&&(n=a[2],e=a[1]);var s=/^([^#]*)(.*)$/.exec(t);s&&(t=s[1]);var l=/^([^\?]*)(.*)$/.exec(t);l&&(t=l[1]);var u=/^(([a-z]+:)?\/\/[a-z0-9\.\-_~]+(:[0-9]+)?)?(\/.*)$/i.exec(t);if(!u)throw new Error("Error trying to parse base URL.");var c=u[2]||"",d=u[1]||"",f=u[4],h=null;return h=/^\/\//.test(e)?c+"//"+r.buildAbsolutePath("",e.substring(2)):/^\//.test(e)?d+"/"+r.buildAbsolutePath("",e.substring(1)):r.buildAbsolutePath(d+f,e),n&&(h+=n),i&&(h+=i),h},buildAbsolutePath:function(t,e){for(var n,r,i=e,o="",a=t.replace(/[^\/]*$/,i.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),s=0;r=a.indexOf("/../",s),r>-1;s=r+n)n=/^\/(?:\.\.\/)*/.exec(a.slice(r))[0].length,o=(o+a.substring(s,r)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(n-1)/3+"}$"),"/");return o+a.substr(s)}};e.exports=r},{}],47:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t(43),a=function(){function t(e){r(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return i(t,[{key:"destroy",value:function(){this.abort(),this.loader=null}},{key:"abort",value:function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null}},{key:"load",value:function(t,e,n){this.context=t,this.config=e,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()}},{key:"loadInternal",value:function(){var t,e=this.context;t="undefined"!=typeof XDomainRequest?this.loader=new XDomainRequest:this.loader=new XMLHttpRequest,t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.open("GET",e.url,!0),e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.responseType=e.responseType;var n=this.stats;n.tfirst=0,n.loaded=0,this.xhrSetup&&this.xhrSetup(t,e.url),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()}},{key:"readystatechange",value:function(t){var e=t.currentTarget,n=e.readyState,r=this.stats,i=this.context,a=this.config;if(!r.aborted&&(window.clearTimeout(this.requestTimeout),n>=2&&(0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest),this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout-(r.tfirst-r.trequest))),4===n))){var s=e.status;if(s>=200&&s<300){r.tload=Math.max(r.tfirst,performance.now());var l=void 0,u=void 0;"arraybuffer"===i.responseType?(l=e.response,u=l.byteLength):(l=e.responseText,u=l.length),r.loaded=r.total=u;var c={url:e.responseURL,data:l};this.callbacks.onSuccess(c,r,i)}else r.retry>=a.maxRetry||s>=400&&s<499?(o.logger.error(s+" while loading "+i.url),this.callbacks.onError({code:s,text:e.statusText},i)):(o.logger.warn(s+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}}},{key:"loadtimeout",value:function(){o.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context)}},{key:"loadprogress",value:function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total);var n=this.callbacks.onProgress;n&&n(e,this.context,null)}}]),t}();n.default=a},{43:43}]},{},[31])(31)})},function(t,e){t.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n <% var renderBar = function(name) { %>\n <div class="bar-container" data-<%= name %>>\n <div class="bar-background" data-<%= name %>>\n <div class="bar-fill-1" data-<%= name %>></div>\n <div class="bar-fill-2" data-<%= name %>></div>\n <div class="bar-hover" data-<%= name %>></div>\n </div>\n <div class="bar-scrubber" data-<%= name %>>\n <div class="bar-scrubber-icon" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class="bar-container" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class="segmented-bar-element" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class="drawer-container" data-<%= name %>>\n <div class="drawer-icon-container" data-<%= name %>>\n <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n <span class="drawer-text" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class="media-control-indicator" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type="button" class="media-control-button media-control-icon" data-<%= name %>></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === "seekbar") {\n renderBar(setting);\n } else if (setting === "volume") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === "duration" || setting === "position") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class="media-control-center-panel" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class="media-control-left-panel" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class="media-control-right-panel" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n'},function(t,e){t.exports='<param name="movie" value="<%= swfPath %>?inline=1">\n<param name="quality" value="autohigh">\n<param name="swliveconnect" value="true">\n<param name="allowScriptAccess" value="always">\n<param name="bgcolor" value="#000000">\n<param name="allowFullScreen" value="false">\n<param name="wmode" value="<%= wmode %>">\n<param name="tabindex" value="1">\n<param name="FlashVars" value="playbackId=<%= playbackId %>&callback=<%= callbackName %>">\n<embed\n name="<%= cid %>"\n type="application/x-shockwave-flash"\n disabled="disabled"\n tabindex="-1"\n enablecontextmenu="false"\n allowScriptAccess="always"\n quality="autohigh"\n pluginspage="http://www.macromedia.com/go/getflashplayer"\n wmode="<%= wmode %>"\n swliveconnect="true"\n allowfullscreen="false"\n bgcolor="#000000"\n FlashVars="playbackId=<%= playbackId %>&callback=<%= callbackName %>"\n src="<%= swfPath %>"\n width="100%"\n height="100%">\n</embed>\n'},function(t,e){t.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},function(t,e){t.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button"><%= backToLive %></button>\n'},function(t,e){t.exports='<div class="play-wrapper" data-poster></div>\n'},function(t,e){t.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},function(t,e){t.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},function(t,e){t.exports="<div data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== 'undefined') { %>\n<a target=_blank href=\"<%= imageLink %>\">\n<% } %>\n<img src=\"<%= imageUrl %>\">\n<% if(typeof imageLink !== 'undefined') { %>\n</a>\n<% } %>\n</div>\n"},function(t,e,n){(function(t,n){function r(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function i(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function o(t){return function(e){return t(e)}}function a(t,e){return null==t?void 0:t[e]}function s(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function l(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function u(t,e){return function(n){return t(e(n))}}function c(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function d(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function f(){this.__data__=Te?Te(null):{}}function h(t){return this.has(t)&&delete this.__data__[t]}function p(t){var e=this.__data__;if(Te){var n=e[t];return n===ht?void 0:n}return ue.call(e,t)?e[t]:void 0}function y(t){var e=this.__data__;return Te?void 0!==e[t]:ue.call(e,t)}function g(t,e){var n=this.__data__;return n[t]=Te&&void 0===e?ht:e,this}function v(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function m(){this.__data__=[]}function b(t){var e=this.__data__,n=U(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ye.call(e,n,1),!0}function _(t){var e=this.__data__,n=U(e,t);return n<0?void 0:e[n][1]}function E(t){return U(this.__data__,t)>-1}function T(t,e){var n=this.__data__,r=U(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function A(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function k(){this.__data__={hash:new d,map:new(me||v),string:new d}}function w(t){return q(this,t).delete(t)}function S(t){return q(this,t).get(t)}function L(t){return q(this,t).has(t)}function R(t,e){return q(this,t).set(t,e),this}function O(t){var e=-1,n=t?t.length:0;for(this.__data__=new A;++e<n;)this.add(t[e])}function C(t){return this.__data__.set(t,ht),this}function P(t){return this.__data__.has(t)}function D(t){this.__data__=new v(t)}function I(){this.__data__=new v}function x(t){return this.__data__.delete(t)}function N(t){return this.__data__.get(t)}function M(t){return this.__data__.has(t)}function F(t,e){var n=this.__data__;if(n instanceof v){var r=n.__data__;if(!me||r.length<ft-1)return r.push([t,e]),this;n=this.__data__=new A(r)}return n.set(t,e),this}function B(t,e){var n=Pe(t)||rt(t)?i(t.length,String):[],r=n.length,o=!!r;for(var a in t)!e&&!ue.call(t,a)||o&&("length"==a||Z(a,r))||n.push(a);return n}function U(t,e){for(var n=t.length;n--;)if(nt(t[n][0],e))return n;return-1}function j(t){return ce.call(t)}function G(t,e,n,r,i){return t===e||(null==t||null==e||!ut(t)&&!ct(e)?t!==t&&e!==e:Y(t,e,G,n,r,i))}function Y(t,e,n,r,i,o){var a=Pe(t),l=Pe(e),u=mt,c=mt;a||(u=Ce(t),u=u==vt?St:u),l||(c=Ce(e),c=c==vt?St:c);var d=u==St&&!s(t),f=c==St&&!s(e),h=u==c;if(h&&!d)return o||(o=new D),a||De(t)?H(t,e,n,r,i,o):z(t,e,u,n,r,i,o);if(!(i&yt)){var p=d&&ue.call(t,"__wrapped__"),y=f&&ue.call(e,"__wrapped__");if(p||y){var g=p?t.value():t,v=y?e.value():e;return o||(o=new D),n(g,v,r,i,o)}}return!!h&&(o||(o=new D),W(t,e,n,r,i,o))}function V(t){if(!ut(t)||Q(t))return!1;var e=st(t)||s(t)?de:$t;return e.test(et(t))}function K(t){return ct(t)&&lt(t.length)&&!!zt[ce.call(t)]}function $(t){if(!tt(t))return ge(t);var e=[];for(var n in Object(t))ue.call(t,n)&&"constructor"!=n&&e.push(n);return e}function H(t,e,n,i,o,a){var s=o&yt,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var d=-1,f=!0,h=o&pt?new O:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var p=t[d],y=e[d];if(i)var g=s?i(y,p,d,e,t,a):i(p,y,d,t,e,a);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!r(e,function(t,e){if(!h.has(e)&&(p===t||n(p,t,i,o,a)))return h.add(e)})){f=!1;break}}else if(p!==y&&!n(p,y,i,o,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function z(t,e,n,r,i,o,a){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case It:return!(t.byteLength!=e.byteLength||!r(new he(t),new he(e)));case bt:case _t:case wt:return nt(+t,+e);case Et:return t.name==e.name&&t.message==e.message;case Rt:case Ct:return t==e+"";case kt:var s=l;case Ot:var u=o&yt;if(s||(s=c),t.size!=e.size&&!u)return!1;var d=a.get(t);if(d)return d==e;o|=pt,a.set(t,e);var f=H(s(t),s(e),r,i,o,a);return a.delete(t),f;case Pt:if(Oe)return Oe.call(t)==Oe.call(e)}return!1}function W(t,e,n,r,i,o){var a=i&yt,s=dt(t),l=s.length,u=dt(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:ue.call(e,f)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var p=!0;o.set(t,e),o.set(e,t);for(var y=a;++d<l;){f=s[d];var g=t[f],v=e[f];if(r)var m=a?r(v,g,f,e,t,o):r(g,v,f,t,e,o);if(!(void 0===m?g===v||n(g,v,r,i,o):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(t),o.delete(e),p}function q(t,e){var n=t.__data__;return J(e)?n["string"==typeof e?"string":"hash"]:n.map}function X(t,e){var n=a(t,e);return V(n)?n:void 0}function Z(t,e){return e=null==e?gt:e,!!e&&("number"==typeof t||Ht.test(t))&&t>-1&&t%1==0&&t<e}function J(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Q(t){return!!se&&se in t}function tt(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||oe;return t===n}function et(t){if(null!=t){try{return le.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function nt(t,e){return t===e||t!==t&&e!==e}function rt(t){return ot(t)&&ue.call(t,"callee")&&(!pe.call(t,"callee")||ce.call(t)==vt)}function it(t){return null!=t&&lt(t.length)&&!st(t)}function ot(t){return ct(t)&&it(t)}function at(t,e){return G(t,e)}function st(t){var e=ut(t)?ce.call(t):"";return e==Tt||e==At}function lt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=gt}function ut(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ct(t){return!!t&&"object"==typeof t}function dt(t){return it(t)?B(t):$(t)}var ft=200,ht="__lodash_hash_undefined__",pt=1,yt=2,gt=9007199254740991,vt="[object Arguments]",mt="[object Array]",bt="[object Boolean]",_t="[object Date]",Et="[object Error]",Tt="[object Function]",At="[object GeneratorFunction]",kt="[object Map]",wt="[object Number]",St="[object Object]",Lt="[object Promise]",Rt="[object RegExp]",Ot="[object Set]",Ct="[object String]",Pt="[object Symbol]",Dt="[object WeakMap]",It="[object ArrayBuffer]",xt="[object DataView]",Nt="[object Float32Array]",Mt="[object Float64Array]",Ft="[object Int8Array]",Bt="[object Int16Array]",Ut="[object Int32Array]",jt="[object Uint8Array]",Gt="[object Uint8ClampedArray]",Yt="[object Uint16Array]",Vt="[object Uint32Array]",Kt=/[\\^$.*+?()[\]{}|]/g,$t=/^\[object .+?Constructor\]$/,Ht=/^(?:0|[1-9]\d*)$/,zt={};zt[Nt]=zt[Mt]=zt[Ft]=zt[Bt]=zt[Ut]=zt[jt]=zt[Gt]=zt[Yt]=zt[Vt]=!0,zt[vt]=zt[mt]=zt[It]=zt[bt]=zt[xt]=zt[_t]=zt[Et]=zt[Tt]=zt[kt]=zt[wt]=zt[St]=zt[Rt]=zt[Ot]=zt[Ct]=zt[Dt]=!1;var Wt="object"==typeof t&&t&&t.Object===Object&&t,qt="object"==typeof self&&self&&self.Object===Object&&self,Xt=Wt||qt||Function("return this")(),Zt="object"==typeof e&&e&&!e.nodeType&&e,Jt=Zt&&"object"==typeof n&&n&&!n.nodeType&&n,Qt=Jt&&Jt.exports===Zt,te=Qt&&Wt.process,ee=function(){try{return te&&te.binding("util")}catch(t){}}(),ne=ee&&ee.isTypedArray,re=Array.prototype,ie=Function.prototype,oe=Object.prototype,ae=Xt["__core-js_shared__"],se=function(){var t=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),le=ie.toString,ue=oe.hasOwnProperty,ce=oe.toString,de=RegExp("^"+le.call(ue).replace(Kt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=Xt.Symbol,he=Xt.Uint8Array,pe=oe.propertyIsEnumerable,ye=re.splice,ge=u(Object.keys,Object),ve=X(Xt,"DataView"),me=X(Xt,"Map"),be=X(Xt,"Promise"),_e=X(Xt,"Set"),Ee=X(Xt,"WeakMap"),Te=X(Object,"create"),Ae=et(ve),ke=et(me),we=et(be),Se=et(_e),Le=et(Ee),Re=fe?fe.prototype:void 0,Oe=Re?Re.valueOf:void 0;d.prototype.clear=f,d.prototype.delete=h,d.prototype.get=p,d.prototype.has=y,d.prototype.set=g,v.prototype.clear=m,v.prototype.delete=b,v.prototype.get=_,v.prototype.has=E,v.prototype.set=T,A.prototype.clear=k,A.prototype.delete=w,A.prototype.get=S,A.prototype.has=L,A.prototype.set=R,O.prototype.add=O.prototype.push=C,O.prototype.has=P,D.prototype.clear=I,D.prototype.delete=x,D.prototype.get=N,D.prototype.has=M,D.prototype.set=F;var Ce=j;(ve&&Ce(new ve(new ArrayBuffer(1)))!=xt||me&&Ce(new me)!=kt||be&&Ce(be.resolve())!=Lt||_e&&Ce(new _e)!=Ot||Ee&&Ce(new Ee)!=Dt)&&(Ce=function(t){var e=ce.call(t),n=e==St?t.constructor:void 0,r=n?et(n):void 0;if(r)switch(r){case Ae:return xt;case ke:return kt;case we:return Lt;case Se:return Ot;case Le:return Dt}return e});var Pe=Array.isArray,De=ne?o(ne):K;n.exports=at}).call(e,function(){return this}(),n(23)(t))},function(t,e){function n(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function r(t,e){return function(n){return t(e(n))}}function i(t){return!!t&&"object"==typeof t}function o(t){if(!i(t)||f.call(t)!=a||n(t))return!1;var e=h(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==d}var a="[object Object]",s=Function.prototype,l=Object.prototype,u=s.toString,c=l.hasOwnProperty,d=u.call(Object),f=l.toString,h=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e){function n(t,e){var n;if("function"!=typeof e)throw new TypeError(c);return t=l(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}function r(t){return n(2,t)}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function o(t){return!!t&&"object"==typeof t}function a(t){return"symbol"==typeof t||o(t)&&E.call(t)==p}function s(t){if(!t)return 0===t?t:0;if(t=u(t),t===d||t===-d){var e=t<0?-1:1;return e*f}return t===t?t:0}function l(t){var e=s(t),n=e%1;return e===e?n?e-n:e:0}function u(t){if("number"==typeof t)return t;if(a(t))return h;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(y,"");var n=v.test(t);return n||m.test(t)?b(t.slice(2),n?2:8):g.test(t)?h:+t}var c="Expected a function",d=1/0,f=1.7976931348623157e308,h=NaN,p="[object Symbol]",y=/^\s+|\s+$/g,g=/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,_=Object.prototype,E=_.toString;t.exports=r},function(t,e){(function(e){function n(t,e){return null==t?void 0:t[e]}function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function i(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function o(){this.__data__=yt?yt(null):{}}function a(t){return this.has(t)&&delete this.__data__[t]}function s(t){var e=this.__data__;if(yt){var n=e[t];return n===Y?void 0:n}return ut.call(e,t)?e[t]:void 0}function l(t){var e=this.__data__;return yt?void 0!==e[t]:ut.call(e,t)}function u(t,e){var n=this.__data__;return n[t]=yt&&void 0===e?Y:e,this}function c(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function d(){this.__data__=[]}function f(t){var e=this.__data__,n=T(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ht.call(e,n,1),!0}function h(t){var e=this.__data__,n=T(e,t);return n<0?void 0:e[n][1]}function p(t){return T(this.__data__,t)>-1}function y(t,e){var n=this.__data__,r=T(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function g(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function v(){this.__data__={hash:new i,map:new(pt||c),string:new i}}function m(t){return S(this,t).delete(t)}function b(t){return S(this,t).get(t)}function _(t){return S(this,t).has(t)}function E(t,e){return S(this,t).set(t,e),this}function T(t,e){for(var n=t.length;n--;)if(x(t[n][0],e))return n;return-1}function A(t){if(!M(t)||C(t))return!1;var e=N(t)||r(t)?dt:Q;return e.test(D(t))}function k(t){if("string"==typeof t)return t;if(B(t))return vt?vt.call(t):"";var e=t+"";return"0"==e&&1/t==-V?"-0":e}function w(t){return bt(t)?t:mt(t)}function S(t,e){var n=t.__data__;return O(e)?n["string"==typeof e?"string":"hash"]:n.map}function L(t,e){var r=n(t,e);return A(r)?r:void 0}function R(t,e){if(bt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!B(t))||(W.test(t)||!z.test(t)||null!=e&&t in Object(e))}function O(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function C(t){return!!st&&st in t}function P(t){if("string"==typeof t||B(t))return t;var e=t+"";return"0"==e&&1/t==-V?"-0":e}function D(t){if(null!=t){try{return lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function I(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(G);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(I.Cache||g),n}function x(t,e){return t===e||t!==t&&e!==e}function N(t){var e=M(t)?ct.call(t):"";return e==K||e==$}function M(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function F(t){return!!t&&"object"==typeof t}function B(t){return"symbol"==typeof t||F(t)&&ct.call(t)==H}function U(t){return null==t?"":k(t)}function j(t,e,n){e=R(e,t)?[e]:w(e);var r=-1,i=e.length;for(i||(t=void 0,i=1);++r<i;){var o=null==t?void 0:t[P(e[r])];void 0===o&&(r=i,o=n),t=N(o)?o.call(t):o}return t}var G="Expected a function",Y="__lodash_hash_undefined__",V=1/0,K="[object Function]",$="[object GeneratorFunction]",H="[object Symbol]",z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,q=/^\./,X=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,J=/\\(\\)?/g,Q=/^\[object .+?Constructor\]$/,tt="object"==typeof e&&e&&e.Object===Object&&e,et="object"==typeof self&&self&&self.Object===Object&&self,nt=tt||et||Function("return this")(),rt=Array.prototype,it=Function.prototype,ot=Object.prototype,at=nt["__core-js_shared__"],st=function(){var t=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");
+return t?"Symbol(src)_1."+t:""}(),lt=it.toString,ut=ot.hasOwnProperty,ct=ot.toString,dt=RegExp("^"+lt.call(ut).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=nt.Symbol,ht=rt.splice,pt=L(nt,"Map"),yt=L(Object,"create"),gt=ft?ft.prototype:void 0,vt=gt?gt.toString:void 0;i.prototype.clear=o,i.prototype.delete=a,i.prototype.get=s,i.prototype.has=l,i.prototype.set=u,c.prototype.clear=d,c.prototype.delete=f,c.prototype.get=h,c.prototype.has=p,c.prototype.set=y,g.prototype.clear=v,g.prototype.delete=m,g.prototype.get=b,g.prototype.has=_,g.prototype.set=E;var mt=I(function(t){t=U(t);var e=[];return q.test(t)&&e.push(""),t.replace(X,function(t,n,r,i){e.push(r?i.replace(J,"$1"):n||t)}),e});I.Cache=g;var bt=Array.isArray;t.exports=j}).call(e,function(){return this}())},function(t,e,n){(function(t,n){function r(t,e){var n=t?t.length:0;return!!n&&s(t,e,0)>-1}function i(t,e,n){for(var r=-1,i=t?t.length:0;++r<i;)if(n(e,t[r]))return!0;return!1}function o(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function a(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function s(t,e,n){if(e!==e)return a(t,l,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function l(t){return t!==t}function u(t){return function(e){return null==e?void 0:e[t]}}function c(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function d(t){return function(e){return t(e)}}function f(t,e){return t.has(e)}function h(t,e){return null==t?void 0:t[e]}function p(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function y(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function g(t,e){return function(n){return t(e(n))}}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function m(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function b(){this.__data__=sn?sn(null):{}}function _(t){return this.has(t)&&delete this.__data__[t]}function E(t){var e=this.__data__;if(sn){var n=e[t];return n===$t?void 0:n}return ze.call(e,t)?e[t]:void 0}function T(t){var e=this.__data__;return sn?void 0!==e[t]:ze.call(e,t)}function A(t,e){var n=this.__data__;return n[t]=sn&&void 0===e?$t:e,this}function k(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function w(){this.__data__=[]}function S(t){var e=this.__data__,n=H(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Qe.call(e,n,1),!0}function L(t){var e=this.__data__,n=H(e,t);return n<0?void 0:e[n][1]}function R(t){return H(this.__data__,t)>-1}function O(t,e){var n=this.__data__,r=H(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function C(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function P(){this.__data__={hash:new m,map:new(nn||k),string:new m}}function D(t){return ft(this,t).delete(t)}function I(t){return ft(this,t).get(t)}function x(t){return ft(this,t).has(t)}function N(t,e){return ft(this,t).set(t,e),this}function M(t){var e=-1,n=t?t.length:0;for(this.__data__=new C;++e<n;)this.add(t[e])}function F(t){return this.__data__.set(t,$t),this}function B(t){return this.__data__.has(t)}function U(t){this.__data__=new k(t)}function j(){this.__data__=new k}function G(t){return this.__data__.delete(t)}function Y(t){return this.__data__.get(t)}function V(t){return this.__data__.has(t)}function K(t,e){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!nn||r.length<Vt-1)return r.push([t,e]),this;n=this.__data__=new C(r)}return n.set(t,e),this}function $(t,e){var n=bn(t)||Rt(t)?c(t.length,String):[],r=n.length,i=!!r;for(var o in t)!e&&!ze.call(t,o)||i&&("length"==o||gt(o,r))||n.push(o);return n}function H(t,e){for(var n=t.length;n--;)if(Lt(t[n][0],e))return n;return-1}function z(t,e){e=vt(e,t)?[e]:lt(e);for(var n=0,r=e.length;null!=t&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function W(t){return We.call(t)}function q(t,e){return null!=t&&e in Object(t)}function X(t,e,n,r,i){return t===e||(null==t||null==e||!It(t)&&!xt(e)?t!==t&&e!==e:Z(t,e,X,n,r,i))}function Z(t,e,n,r,i,o){var a=bn(t),s=bn(e),l=Zt,u=Zt;a||(l=vn(t),l=l==Xt?oe:l),s||(u=vn(e),u=u==Xt?oe:u);var c=l==oe&&!p(t),d=u==oe&&!p(e),f=l==u;if(f&&!c)return o||(o=new U),a||_n(t)?ut(t,e,n,r,i,o):ct(t,e,l,n,r,i,o);if(!(i&zt)){var h=c&&ze.call(t,"__wrapped__"),y=d&&ze.call(e,"__wrapped__");if(h||y){var g=h?t.value():t,v=y?e.value():e;return o||(o=new U),n(g,v,r,i,o)}}return!!f&&(o||(o=new U),dt(t,e,n,r,i,o))}function J(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=n[i];var l=s[0],u=t[l],c=s[1];if(a&&s[2]){if(void 0===u&&!(l in t))return!1}else{var d=new U;if(r)var f=r(u,c,l,t,e,d);if(!(void 0===f?X(c,u,r,Ht|zt,d):f))return!1}}return!0}function Q(t){if(!It(t)||bt(t))return!1;var e=Pt(t)||p(t)?qe:Oe;return e.test(kt(t))}function tt(t){return xt(t)&&Dt(t.length)&&!!Pe[We.call(t)]}function et(t){return"function"==typeof t?t:null==t?jt:"object"==typeof t?bn(t)?it(t[0],t[1]):rt(t):Yt(t)}function nt(t){if(!_t(t))return tn(t);var e=[];for(var n in Object(t))ze.call(t,n)&&"constructor"!=n&&e.push(n);return e}function rt(t){var e=ht(t);return 1==e.length&&e[0][2]?Tt(e[0][0],e[0][1]):function(n){return n===t||J(n,t,e)}}function it(t,e){return vt(t)&&Et(e)?Tt(At(t),e):function(n){var r=Ft(n,t);return void 0===r&&r===e?Bt(n,t):X(e,r,void 0,Ht|zt)}}function ot(t){return function(e){return z(e,t)}}function at(t){if("string"==typeof t)return t;if(Nt(t))return yn?yn.call(t):"";var e=t+"";return"0"==e&&1/t==-Wt?"-0":e}function st(t,e,n){var o=-1,a=r,s=t.length,l=!0,u=[],c=u;if(n)l=!1,a=i;else if(s>=Vt){var d=e?null:gn(t);if(d)return v(d);l=!1,a=f,c=new M}else c=e?[]:u;t:for(;++o<s;){var h=t[o],p=e?e(h):h;if(h=n||0!==h?h:0,l&&p===p){for(var y=c.length;y--;)if(c[y]===p)continue t;e&&c.push(p),u.push(h)}else a(c,p,n)||(c!==u&&c.push(p),u.push(h))}return u}function lt(t){return bn(t)?t:mn(t)}function ut(t,e,n,r,i,a){var s=i&zt,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var d=-1,f=!0,h=i&Ht?new M:void 0;for(a.set(t,e),a.set(e,t);++d<l;){var p=t[d],y=e[d];if(r)var g=s?r(y,p,d,e,t,a):r(p,y,d,t,e,a);if(void 0!==g){if(g)continue;f=!1;break}if(h){if(!o(e,function(t,e){if(!h.has(e)&&(p===t||n(p,t,r,i,a)))return h.add(e)})){f=!1;break}}else if(p!==y&&!n(p,y,r,i,a)){f=!1;break}}return a.delete(t),a.delete(e),f}function ct(t,e,n,r,i,o,a){switch(n){case he:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fe:return!(t.byteLength!=e.byteLength||!r(new Ze(t),new Ze(e)));case Jt:case Qt:case ie:return Lt(+t,+e);case te:return t.name==e.name&&t.message==e.message;case se:case ue:return t==e+"";case re:var s=y;case le:var l=o&zt;if(s||(s=v),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;o|=Ht,a.set(t,e);var c=ut(s(t),s(e),r,i,o,a);return a.delete(t),c;case ce:if(pn)return pn.call(t)==pn.call(e)}return!1}function dt(t,e,n,r,i,o){var a=i&zt,s=Ut(t),l=s.length,u=Ut(e),c=u.length;if(l!=c&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:ze.call(e,f)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var p=!0;o.set(t,e),o.set(e,t);for(var y=a;++d<l;){f=s[d];var g=t[f],v=e[f];if(r)var m=a?r(v,g,f,e,t,o):r(g,v,f,t,e,o);if(!(void 0===m?g===v||n(g,v,r,i,o):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(t),o.delete(e),p}function ft(t,e){var n=t.__data__;return mt(e)?n["string"==typeof e?"string":"hash"]:n.map}function ht(t){for(var e=Ut(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Et(i)]}return e}function pt(t,e){var n=h(t,e);return Q(n)?n:void 0}function yt(t,e,n){e=vt(e,t)?[e]:lt(e);for(var r,i=-1,o=e.length;++i<o;){var a=At(e[i]);if(!(r=null!=t&&n(t,a)))break;t=t[a]}if(r)return r;var o=t?t.length:0;return!!o&&Dt(o)&&gt(a,o)&&(bn(t)||Rt(t))}function gt(t,e){return e=null==e?qt:e,!!e&&("number"==typeof t||Ce.test(t))&&t>-1&&t%1==0&&t<e}function vt(t,e){if(bn(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Nt(t))||(ke.test(t)||!Ae.test(t)||null!=e&&t in Object(e))}function mt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function bt(t){return!!$e&&$e in t}function _t(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Ve;return t===n}function Et(t){return t===t&&!It(t)}function Tt(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function At(t){if("string"==typeof t||Nt(t))return t;var e=t+"";return"0"==e&&1/t==-Wt?"-0":e}function kt(t){if(null!=t){try{return He.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function wt(t,e){return t&&t.length?st(t,et(e,2)):[]}function St(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Kt);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(St.Cache||C),n}function Lt(t,e){return t===e||t!==t&&e!==e}function Rt(t){return Ct(t)&&ze.call(t,"callee")&&(!Je.call(t,"callee")||We.call(t)==Xt)}function Ot(t){return null!=t&&Dt(t.length)&&!Pt(t)}function Ct(t){return xt(t)&&Ot(t)}function Pt(t){var e=It(t)?We.call(t):"";return e==ee||e==ne}function Dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=qt}function It(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function xt(t){return!!t&&"object"==typeof t}function Nt(t){return"symbol"==typeof t||xt(t)&&We.call(t)==ce}function Mt(t){return null==t?"":at(t)}function Ft(t,e,n){var r=null==t?void 0:z(t,e);return void 0===r?n:r}function Bt(t,e){return null!=t&&yt(t,e,q)}function Ut(t){return Ot(t)?$(t):nt(t)}function jt(t){return t}function Gt(){}function Yt(t){return vt(t)?u(At(t)):ot(t)}var Vt=200,Kt="Expected a function",$t="__lodash_hash_undefined__",Ht=1,zt=2,Wt=1/0,qt=9007199254740991,Xt="[object Arguments]",Zt="[object Array]",Jt="[object Boolean]",Qt="[object Date]",te="[object Error]",ee="[object Function]",ne="[object GeneratorFunction]",re="[object Map]",ie="[object Number]",oe="[object Object]",ae="[object Promise]",se="[object RegExp]",le="[object Set]",ue="[object String]",ce="[object Symbol]",de="[object WeakMap]",fe="[object ArrayBuffer]",he="[object DataView]",pe="[object Float32Array]",ye="[object Float64Array]",ge="[object Int8Array]",ve="[object Int16Array]",me="[object Int32Array]",be="[object Uint8Array]",_e="[object Uint8ClampedArray]",Ee="[object Uint16Array]",Te="[object Uint32Array]",Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/,we=/^\./,Se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Le=/[\\^$.*+?()[\]{}|]/g,Re=/\\(\\)?/g,Oe=/^\[object .+?Constructor\]$/,Ce=/^(?:0|[1-9]\d*)$/,Pe={};Pe[pe]=Pe[ye]=Pe[ge]=Pe[ve]=Pe[me]=Pe[be]=Pe[_e]=Pe[Ee]=Pe[Te]=!0,Pe[Xt]=Pe[Zt]=Pe[fe]=Pe[Jt]=Pe[he]=Pe[Qt]=Pe[te]=Pe[ee]=Pe[re]=Pe[ie]=Pe[oe]=Pe[se]=Pe[le]=Pe[ue]=Pe[de]=!1;var De="object"==typeof t&&t&&t.Object===Object&&t,Ie="object"==typeof self&&self&&self.Object===Object&&self,xe=De||Ie||Function("return this")(),Ne="object"==typeof e&&e&&!e.nodeType&&e,Me=Ne&&"object"==typeof n&&n&&!n.nodeType&&n,Fe=Me&&Me.exports===Ne,Be=Fe&&De.process,Ue=function(){try{return Be&&Be.binding("util")}catch(t){}}(),je=Ue&&Ue.isTypedArray,Ge=Array.prototype,Ye=Function.prototype,Ve=Object.prototype,Ke=xe["__core-js_shared__"],$e=function(){var t=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),He=Ye.toString,ze=Ve.hasOwnProperty,We=Ve.toString,qe=RegExp("^"+He.call(ze).replace(Le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=xe.Symbol,Ze=xe.Uint8Array,Je=Ve.propertyIsEnumerable,Qe=Ge.splice,tn=g(Object.keys,Object),en=pt(xe,"DataView"),nn=pt(xe,"Map"),rn=pt(xe,"Promise"),on=pt(xe,"Set"),an=pt(xe,"WeakMap"),sn=pt(Object,"create"),ln=kt(en),un=kt(nn),cn=kt(rn),dn=kt(on),fn=kt(an),hn=Xe?Xe.prototype:void 0,pn=hn?hn.valueOf:void 0,yn=hn?hn.toString:void 0;m.prototype.clear=b,m.prototype.delete=_,m.prototype.get=E,m.prototype.has=T,m.prototype.set=A,k.prototype.clear=w,k.prototype.delete=S,k.prototype.get=L,k.prototype.has=R,k.prototype.set=O,C.prototype.clear=P,C.prototype.delete=D,C.prototype.get=I,C.prototype.has=x,C.prototype.set=N,M.prototype.add=M.prototype.push=F,M.prototype.has=B,U.prototype.clear=j,U.prototype.delete=G,U.prototype.get=Y,U.prototype.has=V,U.prototype.set=K;var gn=on&&1/v(new on([,-0]))[1]==Wt?function(t){return new on(t)}:Gt,vn=W;(en&&vn(new en(new ArrayBuffer(1)))!=he||nn&&vn(new nn)!=re||rn&&vn(rn.resolve())!=ae||on&&vn(new on)!=le||an&&vn(new an)!=de)&&(vn=function(t){var e=We.call(t),n=e==oe?t.constructor:void 0,r=n?kt(n):void 0;if(r)switch(r){case ln:return he;case un:return re;case cn:return ae;case dn:return le;case fn:return de}return e});var mn=St(function(t){t=Mt(t);var e=[];return we.test(t)&&e.push(""),t.replace(Se,function(t,n,r,i){e.push(r?i.replace(Re,"$1"):n||t)}),e});St.Cache=C;var bn=Array.isArray,_n=je?d(je):tt;n.exports=wt}).call(e,function(){return this}(),n(23)(t))},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"></path></svg>'},function(t,e,n){t.exports=n.p+"38861cba61c66739c1452c3a71e39852.ttf"},function(t,e,n){t.exports=n.p+"4b76590b32dab62bc95c1b7951efae78.swf"},function(t,e,n){t.exports=n.p+"809981e5b09d5336c45d72d0869ada2a.swf"}])});
+//# sourceMappingURL=clappr.min.js.map \ No newline at end of file
diff --git a/assets/clapprio/clappr.min.js.map b/assets/clapprio/clappr.min.js.map
new file mode 100644
index 0000000..411c11b
--- /dev/null
+++ b/assets/clapprio/clappr.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///clappr.min.js","webpack:///webpack/bootstrap d556a0cfcd71319135ca","webpack:///./src/main.js","webpack:///./src/base/events.js","webpack:///./src/base/utils.js","webpack:///./src/base/playback.js","webpack:///./src/base/styler.js","webpack:///./~/clappr-zepto/zepto.min.js","webpack:///./src/base/template.js","webpack:///./~/css-loader/lib/css-base.js","webpack:///./src/components/browser.js","webpack:///./src/base/base_object.js","webpack:///./src/base/ui_object.js","webpack:///./src/components/mediator.js","webpack:///./src/base/core_plugin.js","webpack:///./src/base/container_plugin.js","webpack:///./src/base/ui_container_plugin.js","webpack:///./src/components/player_info.js","webpack:///./src/playbacks/html5_video/index.js","webpack:///./src/base/ui_core_plugin.js","webpack:///./src/playbacks/base_flash_playback/index.js","webpack:///./src/plugins/log/index.js","webpack:///./src/vendor/index.js","webpack:///./~/process/browser.js","webpack:///./src/icons/01-play.svg","webpack:///(webpack)/buildin/module.js","webpack:///./src/components/container/index.js","webpack:///./src/components/core/index.js","webpack:///./src/components/loader/index.js","webpack:///./src/components/media_control/index.js","webpack:///./src/playbacks/flash/index.js","webpack:///./src/playbacks/flashls/index.js","webpack:///./src/playbacks/hls/index.js","webpack:///./src/playbacks/html5_audio/index.js","webpack:///./src/playbacks/html_img/index.js","webpack:///./src/playbacks/no_op/index.js","webpack:///./src/plugins/poster/index.js","webpack:///./~/lodash.merge/index.js","webpack:///./src/icons/02-pause.svg","webpack:///./src/components/media_control/public/closed-hand.cur","webpack:///./src/components/container/container.js","webpack:///./src/components/container_factory/container_factory.js","webpack:///./src/components/container_factory/index.js","webpack:///./src/components/core/core.js","webpack:///./src/components/core_factory/core_factory.js","webpack:///./src/components/core_factory/index.js","webpack:///./src/components/loader/loader.js","webpack:///./src/components/media_control/media_control.js","webpack:///./src/components/player.js","webpack:///./src/playbacks/base_flash_playback/base_flash_playback.js","webpack:///./src/playbacks/flash/flash.js","webpack:///./src/playbacks/flashls/flashls.js","webpack:///./src/playbacks/flashls/flashls_events.js","webpack:///./src/playbacks/hls/hls.js","webpack:///./src/playbacks/html5_audio/html5_audio.js","webpack:///./src/playbacks/html5_video/html5_video.js","webpack:///./src/playbacks/html_img/html_img.js","webpack:///./src/playbacks/no_op/no_op.js","webpack:///./src/plugins/click_to_pause/click_to_pause.js","webpack:///./src/plugins/click_to_pause/index.js","webpack:///./src/plugins/dvr_controls/dvr_controls.js","webpack:///./src/plugins/dvr_controls/index.js","webpack:///./src/plugins/end_video.js","webpack:///./src/plugins/favicon/favicon.js","webpack:///./src/plugins/favicon/index.js","webpack:///./src/plugins/google_analytics/google_analytics.js","webpack:///./src/plugins/google_analytics/index.js","webpack:///./src/plugins/log/log.js","webpack:///./src/plugins/poster/poster.js","webpack:///./src/plugins/seek_time/index.js","webpack:///./src/plugins/seek_time/seek_time.js","webpack:///./src/plugins/sources.js","webpack:///./src/plugins/spinner_three_bounce/index.js","webpack:///./src/plugins/spinner_three_bounce/spinner_three_bounce.js","webpack:///./src/plugins/stats/index.js","webpack:///./src/plugins/stats/stats.js","webpack:///./src/plugins/strings.js","webpack:///./src/plugins/watermark/index.js","webpack:///./src/plugins/watermark/watermark.js","webpack:///./src/vendor/kibo.js","webpack:///./src/components/container/public/style.scss","webpack:///./src/components/core/public/style.scss","webpack:///./src/components/media_control/public/media-control.scss","webpack:///./src/playbacks/base_flash_playback/public/flash.scss","webpack:///./src/playbacks/html5_video/public/style.scss","webpack:///./src/playbacks/html_img/public/style.scss","webpack:///./src/playbacks/no_op/public/style.scss","webpack:///./src/plugins/dvr_controls/public/dvr_controls.scss","webpack:///./src/plugins/poster/public/poster.scss","webpack:///./src/plugins/seek_time/public/seek_time.scss","webpack:///./src/plugins/spinner_three_bounce/public/spinner.scss","webpack:///./src/plugins/watermark/public/watermark.scss","webpack:///./~/hls.js/dist/hls.js","webpack:///./src/components/media_control/public/media-control.html","webpack:///./src/playbacks/base_flash_playback/public/flash.html","webpack:///./src/playbacks/no_op/public/error.html","webpack:///./src/plugins/dvr_controls/public/index.html","webpack:///./src/plugins/poster/public/poster.html","webpack:///./src/plugins/seek_time/public/seek_time.html","webpack:///./src/plugins/spinner_three_bounce/public/spinner.html","webpack:///./src/plugins/watermark/public/watermark.html","webpack:///./~/lodash.isequal/index.js","webpack:///./~/lodash.isplainobject/index.js","webpack:///./~/lodash.once/index.js","webpack:///./~/lodash.result/index.js","webpack:///./~/lodash.uniqby/index.js","webpack:///./src/icons/03-stop.svg","webpack:///./src/icons/04-volume.svg","webpack:///./src/icons/05-mute.svg","webpack:///./src/icons/06-expand.svg","webpack:///./src/icons/07-shrink.svg","webpack:///./src/icons/08-hd.svg","webpack:///./src/components/core/public/Roboto.ttf","webpack:///./src/playbacks/flash/public/Player.swf","webpack:///./src/playbacks/flashls/public/HLSPlayer.swf"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_player","_player2","_utils","_utils2","_events","_events2","_playback","_playback2","_container_plugin","_container_plugin2","_core_plugin","_core_plugin2","_ui_core_plugin","_ui_core_plugin2","_ui_container_plugin","_ui_container_plugin2","_base_object","_base_object2","_ui_object","_ui_object2","_browser","_browser2","_container","_container2","_core","_core2","_loader","_loader2","_mediator","_mediator2","_media_control","_media_control2","_player_info","_player_info2","_base_flash_playback","_base_flash_playback2","_flash","_flash2","_flashls","_flashls2","_hls","_hls2","_html5_audio","_html5_audio2","_html5_video","_html5_video2","_html_img","_html_img2","_no_op","_no_op2","_poster","_poster2","_log","_log2","_styler","_styler2","_vendor","_vendor2","_template","_template2","_clapprZepto","_clapprZepto2","version","Player","Mediator","Events","Browser","PlayerInfo","MediaControl","ContainerPlugin","UIContainerPlugin","CorePlugin","UICorePlugin","Playback","Container","Core","Loader","BaseObject","UIObject","Utils","BaseFlashPlayback","Flash","FlasHLS","HLS","HTML5Audio","HTML5Video","HTMLImg","NoOp","Poster","Log","Styler","Vendor","template","$","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","constructor","prototype","_lodash","_lodash2","slice","Array","eventSplitter","eventsApi","action","name","rest","key","apply","concat","test","names","split","i","l","length","triggerEvents","events","args","klass","run","ev","callback","ctx","a1","a2","a3","exception","error","on","context","push","once","self","off","arguments","_callback","retain","j","k","keys","trigger","debug","allEvents","all","stopListening","listeningTo","_listeningTo","remove","_listenId","listenMethods","listenTo","listenToOnce","forEach","method","uniqueId","PLAYER_READY","PLAYER_RESIZE","PLAYER_FULLSCREEN","PLAYER_PLAY","PLAYER_PAUSE","PLAYER_STOP","PLAYER_ENDED","PLAYER_SEEK","PLAYER_ERROR","PLAYER_TIMEUPDATE","PLAYER_VOLUMEUPDATE","PLAYBACK_PROGRESS","PLAYBACK_TIMEUPDATE","PLAYBACK_READY","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","PLAYBACK_SETTINGSUPDATE","PLAYBACK_LOADEDMETADATA","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","PLAYBACK_LEVELS_AVAILABLE","PLAYBACK_LEVEL_SWITCH_START","PLAYBACK_LEVEL_SWITCH_END","PLAYBACK_PLAYBACKSTATE","PLAYBACK_DVR","PLAYBACK_MEDIACONTROL_DISABLE","PLAYBACK_MEDIACONTROL_ENABLE","PLAYBACK_ENDED","PLAYBACK_PLAY_INTENT","PLAYBACK_PLAY","PLAYBACK_PAUSE","PLAYBACK_STOP","PLAYBACK_ERROR","PLAYBACK_STATS_ADD","PLAYBACK_FRAGMENT_LOADED","PLAYBACK_LEVEL_SWITCH","CORE_OPTIONS_CHANGE","CORE_READY","CORE_FULLSCREEN","CONTAINER_PLAYBACKSTATE","CONTAINER_PLAYBACKDVRSTATECHANGED","CONTAINER_BITRATE","CONTAINER_STATS_REPORT","CONTAINER_DESTROYED","CONTAINER_READY","CONTAINER_ERROR","CONTAINER_LOADEDMETADATA","CONTAINER_TIMEUPDATE","CONTAINER_PROGRESS","CONTAINER_PLAY","CONTAINER_STOP","CONTAINER_PAUSE","CONTAINER_ENDED","CONTAINER_CLICK","CONTAINER_DBLCLICK","CONTAINER_CONTEXTMENU","CONTAINER_MOUSE_ENTER","CONTAINER_MOUSE_LEAVE","CONTAINER_SEEK","CONTAINER_VOLUME","CONTAINER_FULLSCREEN","CONTAINER_STATE_BUFFERING","CONTAINER_STATE_BUFFERFULL","CONTAINER_SETTINGSUPDATE","CONTAINER_HIGHDEFINITIONUPDATE","CONTAINER_MEDIACONTROL_SHOW","CONTAINER_MEDIACONTROL_HIDE","CONTAINER_MEDIACONTROL_DISABLE","CONTAINER_MEDIACONTROL_ENABLE","CONTAINER_STATS_ADD","CONTAINER_OPTIONS_CHANGE","MEDIACONTROL_RENDERED","MEDIACONTROL_FULLSCREEN","MEDIACONTROL_SHOW","MEDIACONTROL_HIDE","MEDIACONTROL_MOUSEMOVE_SEEKBAR","MEDIACONTROL_MOUSELEAVE_SEEKBAR","MEDIACONTROL_PLAYING","MEDIACONTROL_NOTPLAYING","MEDIACONTROL_CONTAINERCHANGED","CORE_CONTAINERS_CREATED","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","enumerable","writable","configurable","setPrototypeOf","__proto__","assign","source","prop","propDescriptor","getOwnPropertyDescriptor","extend","parent","properties","Surrogate","_parent","_len","_key","_this","initialize","formatTime","time","paddedHours","isFinite","parseInt","seconds","minutes","hours","days","out","trim","seekStringToSeconds","paramName","undefined","seekString","QueryString","params","hashParams","parts","match","factor","h","s","el","suffix","prefix","idsCounter","isNumber","parseFloat","currentScriptUrl","scripts","document","getElementsByTagName","src","getBrowserLanguage","window","navigator","language","now","performance","Date","removeArrayItem","arr","item","indexOf","splice","cancelAnimationFrame","requestAnimationFrame","Config","Fullscreen","_createClass","defineProperties","target","props","descriptor","protoProps","staticProps","isFullscreen","webkitFullscreenElement","webkitIsFullScreen","mozFullScreen","msFullscreenElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","querySelector","webkitEnterFullScreen","cancelFullscreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","_defaultConfig","volume","parse","_defaultValueFor","e","_createKeyspace","domain","restore","hasLocalstorage","localStorage","persist","paramsString","pl","search","decode","decodeURIComponent","replace","exec","toLowerCase","get","query","location","substring","_urlParams","hash","_hashParams","mozRequestAnimationFrame","webkitRequestAnimationFrame","fn","setTimeout","bind","mozCancelAnimationFrame","webkitCancelAnimationFrame","clearTimeout","_UIObject","options","i18n","settings","_i18n","play","pause","stop","seek","seekPercentage","percentage","getStartTimeOffset","getDuration","isPlaying","getPlaybackType","NO_OP","isHighDefinitionInUse","destroy","$el","canPlay","mimeType","VOD","AOD","LIVE","type","getStyleFor","style","baseUrl","html","toString","Zepto","D","t","String","S","L","Z","nodeType","DOCUMENT_NODE","F","getPrototypeOf","R","q","W","n","z","H","RegExp","_","I","f","u","createElement","body","appendChild","getComputedStyle","getPropertyValue","parentNode","removeChild","U","a","children","map","childNodes","X","selector","B","r","A","V","filter","Y","J","removeAttribute","setAttribute","G","className","baseVal","K","parseJSON","Q","N","P","o","column-count","columns","font-weight","line-height","opacity","z-index","zoom","d","g","v","y","w","x","b","tr","tbody","thead","tfoot","td","th","*","E","T","C","O","M","tabindex","readonly","for","class","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable","isArray","matches","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","matchesSelector","qsa","toUpperCase","fragment","$1","innerHTML","each","attr","isZ","init","find","ready","shift","getElementById","getElementsByClassName","querySelectorAll","contains","documentElement","isFunction","isWindow","isPlainObject","isEmptyObject","inArray","camelCase","uuid","support","expr","noop","grep","JSON","reduce","sort","toArray","readyState","addEventListener","size","every","not","add","is","has","eq","first","last","some","closest","parents","pluck","contents","contentDocument","siblings","empty","show","display","nodeName","replaceWith","before","wrap","wrapAll","cloneNode","append","wrapInner","unwrap","clone","hide","css","toggle","prev","next","text","textContent","getAttribute","removeAttr","data","val","multiple","selected","offset","offsetParent","top","left","position","getBoundingClientRect","pageXOffset","pageYOffset","width","Math","round","height","removeProperty","cssText","index","hasClass","addClass","join","removeClass","toggleClass","scrollTop","scrollTo","scrollX","scrollLeft","scrollY","detach","nextSibling","firstChild","insertBefore","eval","uniq","deserializeValue","zepto","_zid","ns","sel","del","relatedTarget","proxy","isImmediatePropagationStopped","_args","preventDefault","stopPropagation","removeEventListener","isDefaultPrevented","defaultPrevented","returnValue","getPreventDefault","originalEvent","focus","blur","mouseenter","mouseleave","click","mousedown","mouseup","mousemove","event","unshift","unbind","one","stopImmediatePropagation","delegate","undelegate","live","die","currentTarget","liveFired","Event","dispatchEvent","triggerHandler","createEvent","initEvent","global","active","beforeSend","success","resolveWith","rejectWith","complete","processData","param","traditional","url","dataType","href","ajaxJSONP","ajax","jsonpCallback","abort","promise","head","timeout","ajaxSettings","xhr","XMLHttpRequest","accepts","script","json","xml","crossDomain","cache","Deferred","protocol","host","jsonp","setRequestHeader","overrideMimeType","contentType","headers","onreadystatechange","status","getResponseHeader","responseText","responseXML","statusText","xhrFields","async","open","username","password","send","post","getJSON","load","encodeURIComponent","Callbacks","memory","stopOnFalse","disable","unique","disabled","lock","locked","fireWith","fire","fired","state","always","done","fail","then","resolve","reject","progress","notify","when","notifyWith","abs","pointerType","MSPOINTER_TYPE_TOUCH","isPrimary","MSGesture","velocityX","velocityY","touches","x2","y2","x1","pageX","y1","pageY","isDoubleTap","addPointer","pointerId","cancelTouch","Number","isNaN","visible","hidden","checked","console","evaluate","interpolate","escape","noMatch","escapes","'","\\","\r","\n","\t","
","
","escaper","htmlEntities","&","<",">","\"","entityRe","escapeExpr","string","counter","tmpl","render","matcher","variable","Function","list","result","mediaQuery","alreadyImportedModules","setItem","removeItem","hasFlash","fo","ActiveXObject","mimeTypes","enabledPlugin","getBrowserInfo","ua","userAgent","extra","appName","appVersion","browserInfo","isSafari","isChrome","isFirefox","isLegacyIE","isIE","isIE11","isChromecast","isMobile","isiOS","isAndroid","isWindowsPhone","isWin8App","isWiiU","isPS4","_Events","_options","delegateEventSplitter","_BaseObject","cid","_ensureElement","delegateEvents","undelegateEvents","setElement","element","eventName","attrs","opts","core","enabled","bindEvents","enable","getExternalInterface","container","playbackPlugins","currentSize","_players","getInstance","playerId","_kibo","_kibo2","Kibo","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","queueIndex","drainQueue","len","Item","array","process","nextTick","title","browser","env","argv","versions","addListener","removeListener","removeAllListeners","emit","binding","cwd","chdir","dir","umask","webpackPolyfill","deprecate","paths","addMapEntry","pair","set","addSetEntry","func","thisArg","arrayEach","iteratee","arrayPush","values","arrayReduce","accumulator","initAccum","baseTimes","baseUnary","getValue","object","isHostObject","mapToArray","overArg","transform","arg","setToArray","Hash","entries","clear","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hasOwnProperty","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","pop","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","Map","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArguments","skipIndexes","isIndex","assignMergeValue","assignValue","objValue","baseAssign","copyObject","baseClone","isDeep","isFull","customizer","stack","isObject","isArr","initCloneArray","copyArray","tag","getTag","isFunc","funcTag","genTag","isBuffer","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbols","cloneableTags","initCloneByTag","stacked","getAllKeys","subValue","baseCreate","proto","objectCreate","baseGetAllKeys","keysFunc","symbolsFunc","baseGetTag","objectToString","baseIsNative","isMasked","pattern","reIsNative","reIsHostCtor","toSource","baseIsTypedArray","isObjectLike","isLength","typedArrayTags","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseMerge","srcIndex","isTypedArray","srcValue","baseMergeDeep","newValue","mergeFunc","isCommon","isArrayLikeObject","toPlainObject","baseRest","start","nativeMax","otherArgs","buffer","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneMap","cloneFunc","cloneRegExp","regexp","reFlags","cloneSet","cloneSymbol","symbol","symbolValueOf","cloneTypedArray","typedArray","getSymbols","createAssigner","assigner","sources","guard","isIterateeCall","isKeyable","getNative","input","getPrototype","Ctor","arrayBufferTag","boolTag","dateTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","mapTag","numberTag","stringTag","regexpTag","setTag","symbolTag","MAX_SAFE_INTEGER","reIsUint","isArrayLike","maskSrcKey","objectProto","funcToString","other","propertyIsEnumerable","objectCtorString","keysIn","stubArray","stubFalse","arrayTag","errorTag","promiseTag","weakMapTag","reRegExpChar","freeGlobal","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","max","DataView","Promise","Set","WeakMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","valueOf","ArrayBuffer","ctorString","merge","_style","_style2","currentTime","playback","isReady","mediaControlDisabled","plugins","data-container","dblclick","doubleTap","contextmenu","ended","buffering","timeUpdated","onBuffering","bufferfull","settingsUpdate","loadedMetadata","highDefinitionUpdate","updateBitrate","playbackStateChanged","playbackDvrStateChanged","disableMediaControl","enableMediaControl","onEnded","playing","paused","stopped","dvrInUse","newBitrate","statsReport","metrics","isDvrEnabled","dvrEnabled","isDvrInUse","plugin","setStyle","animate","duration","getCurrentTime","errorObj","metadata","timeProgress","current","clicked","chromeless","allowUserInteraction","dblClicked","onContextMenu","setVolume","fullscreen","addPlugin","hasPlugin","getPlugin","mouseEnter","mouseLeave","isHD","updateStyle","configure","ContainerFactory","loader","createContainers","_this2","createContainer","findPlaybackPlugin","resolvedSource","playbackPlugin","defer","addContainerPlugins","containerPlugins","Plugin","_container_factory","_container_factory2","playerInfo","firstResize","containers","setupMediaControl","_boundFullscreenHandler","handleFullscreenChange","webkitfullscreenchange","data-player","containerFactory","setupContainers","resolveOnContainersReady","updateSize","setFullscreen","setPlayerSize","previousSize","resize","triggerResize","enableResizeObserver","_this3","checkSizeCallback","computedSize","clientWidth","clientHeight","resizeObserverInterval","setInterval","newSize","thereWasChange","oldHeight","oldWidth","disableResizeObserver","clearInterval","_this4","_this5","mediaControl","setMediaControlContainer","setContainer","removeContainer","appendContainer","renderContainers","getCurrentContainer","appendTo","parentElement","_this6","createMediaControl","focusElement","toggleFullscreen","onMediaControlShow","mediacontrol","external","getCurrentPlayback","showMediaControl","hideMediaControl","hideMediaControlDelay","showing","_this7","CoreFactory","player","addCorePlugins","corePlugins","setupExternalInterface","externalFunctions","_spinner_three_bounce","_spinner_three_bounce2","_stats","_stats2","_watermark","_watermark2","_google_analytics","_google_analytics2","_click_to_pause","_click_to_pause2","_dvr_controls","_dvr_controls2","_favicon","_favicon2","_seek_time","_seek_time2","_sources","_sources2","_end_video","_end_video2","_strings","_strings2","externalPlugins","validateExternalPluginsType","addExternalPlugins","groupPluginsByType","memo","pluginName","plugintypes","errorMessage","_mediaControl","_mediaControl2","_mediaControl3","_mediaControl4","_play","_play2","_pause","_pause2","_stop","_stop2","_volume","_volume2","_mute","_mute2","_expand","_expand2","_shrink","_shrink2","_hd","_hd2","persistConfig","currentPositionValue","currentDurationValue","initialVolume","mute","keepVisible","fullScreenOnVideoTagSupported","addEventListeners","right","userDisabled","stopDragHandler","stopDrag","updateDragHandler","updateDrag","data-media-control","click [data-play]","click [data-pause]","click [data-playpause]","click [data-stop]","click [data-playstop]","click [data-fullscreen]","click .bar-container[data-seekbar]","click .bar-container[data-volume]","click .drawer-icon[data-volume]","mouseenter .drawer-container[data-volume]","mouseleave .drawer-container[data-volume]","mousedown .bar-container[data-volume]","mousemove .bar-container[data-volume]","mousedown .bar-scrubber[data-seekbar]","mousemove .bar-container[data-seekbar]","mouseleave .bar-container[data-seekbar]","mouseenter .media-control-layer[data-controls]","mouseleave .media-control-layer[data-controls]","intendedVolume","playerResize","changeTogglePlay","onTimeUpdate","updateProgressBar","onVolumeChanged","onLoadedMetadataOnVideoTag","updateVolumeUI","video","webkitSupportsFullscreen","rendered","$volumeBarContainer","containerWidth","barWidth","$volumeBarBackground","pos","$volumeBarFill","$volumeBarScrubber","ceil","$volumeIcon","muted","applyButtonStyle","$playPauseToggle","$playStopToggle","mousemoveOnSeekBar","seekEnabled","offsetX","$seekBarContainer","$seekBarHover","mouseleaveOnSeekBar","onVolumeClick","getVolumeFromUIEvent","mousemoveOnVolumeBar","draggingVolumeBar","$fullscreenToggle","hideVolumeBar","togglePlayPause","togglePlayStop","startSeekDrag","draggingSeekBar","$seekBarLoaded","$seekBarPosition","$seekBarScrubber","startVolumeDrag","min","setSeekPercentage","offsetY","volumeFromUI","toggleMute","setWhenContainerReady","resetUserKeepVisible","showVolumeBar","hideVolumeId","loadedStart","total","loadedEnd","renderSeekBar","currentSeekBarPercentage","newPosition","newDuration","displayedPosition","$position","displayedDuration","$duration","setKeepVisible","resetKeepVisible","setUserKeepVisible","userKeepVisible","isVisible","clientX","lastMouseX","clientY","lastMouseY","hideId","delay","newSettings","getSettings","settingsChanged","stringify","$hdIndicator","createCachedElements","$layer","$volumeContainer","resetIndicators","initializeIcons","displayedSeekBarPercentage","seekRelative","delta","bindKeyEvents","unbindKeyEvents","kibo","down","parseColors","buttonsColor","buttons","seekbarColor","seekbar","stylesheet","previousSeekPercentage","disableKeyboardShortcuts","_core_factory","_core_factory2","defaultOptions","_normalizeSources","_registerOptionEventListeners","_coreFactory","parentId","setParentId","attachTo","_ready","onReady","onResize","onPlay","onPause","onStop","onSeek","onError","onVolumeUpdate","_addEventListeners","_onReady","_containerChanged","_onFullscreenChange","_addContainerEventListeners","_onPlay","_onPause","_onStop","_onEnded","_onSeek","_onError","_onTimeUpdate","_onVolumeUpdate","userEvents","userEvent","eventType","eventsMapping","eventFunction","autoPlay","getVolume","_mutedVolume","unmute","_flash3","_flash4","IE_CLASSID","_Playback","_setupFirefox","attributes","swfPath","playbackId","wmode","callbackName","data-flash-playback","_Player","_Player2","MAX_ATTEMPTS","_BaseFlashPlayback","_src","_baseUrl","_autoPlay","_isReadyState","_addListeners","_currentState","_bufferingState","_bootstrap","playerPlay","_firstPlay","insertAfter","_metadataLoaded","_attempts","message","_updateTime","getPosition","_progress","_checkState","_isIdle","getState","getBytesLoaded","getBytesTotal","_checkInitialSeek","seekTime","seekSeconds","playerResume","playerVolume","playerPause","playerStop","playerSeek","bootstrapId","resource","resourceParts","_flashls_events","_flashls_events2","_HLSPlayer","_HLSPlayer2","AUTO","_initHlsParameters","highDefinition","_loop","loop","_defaultSettings","_playbackType","_hasEnded","_levels","_currentLevel","playerSetCurrentLevel","_autoStartLoad","autoStartLoad","_capLevelToStage","capLevelToStage","_maxLevelCappingMode","maxLevelCappingMode","_minBufferLength","minBufferLength","_minBufferLengthCapping","minBufferLengthCapping","_maxBufferLength","maxBufferLength","_maxBackBufferLength","maxBackBufferLength","_lowBufferLength","lowBufferLength","_mediaTimePeriod","mediaTimePeriod","_fpsDroppedMonitoringPeriod","fpsDroppedMonitoringPeriod","_fpsDroppedMonitoringThreshold","fpsDroppedMonitoringThreshold","_capLevelonFPSDrop","capLevelonFPSDrop","_smoothAutoSwitchonFPSDrop","smoothAutoSwitchonFPSDrop","_switchDownOnLevelError","switchDownOnLevelError","_seekMode","seekMode","_keyLoadMaxRetry","keyLoadMaxRetry","_keyLoadMaxRetryTimeout","keyLoadMaxRetryTimeout","_fragmentLoadMaxRetry","fragmentLoadMaxRetry","_fragmentLoadMaxRetryTimeout","fragmentLoadMaxRetryTimeout","_fragmentLoadSkipAfterMaxRetry","fragmentLoadSkipAfterMaxRetry","_maxSkippedFragments","maxSkippedFragments","_flushLiveURLCache","flushLiveURLCache","_initialLiveManifestSize","initialLiveManifestSize","_manifestLoadMaxRetry","manifestLoadMaxRetry","_manifestLoadMaxRetryTimeout","manifestLoadMaxRetryTimeout","_manifestRedundantLoadmaxRetry","manifestRedundantLoadmaxRetry","_startFromBitrate","startFromBitrate","_startFromLevel","startFromLevel","_autoStartMaxDuration","autoStartMaxDuration","_seekFromLevel","seekFromLevel","_useHardwareVideoDecoder","useHardwareVideoDecoder","_hlsLogEnabled","hlsLogEnabled","_logDebug","logDebug","_logDebug2","logDebug2","_logWarn","logWarn","_logError","logError","_hlsMinimumDvrSize","hlsMinimumDvrSize","timeMetrics","_setPlaybackState","level","_levelChanged","code","_flashPlaybackError","loadmetrics","_onFragmentLoaded","_onLevelEndlist","playerLoad","_srcLoaded","_setFlashSettings","_updatePlaybackType","_shouldPlayOnManifestLoaded","_bootstrapAttempts","playerSetAutoStartLoad","playerSetCapLevelToStage","playerSetMaxLevelCappingMode","playerSetMinBufferLength","playerSetMinBufferLengthCapping","playerSetMaxBufferLength","playerSetMaxBackBufferLength","playerSetLowBufferLength","playerSetMediaTimePeriod","playerSetFpsDroppedMonitoringPeriod","playerSetFpsDroppedMonitoringThreshold","playerSetCapLevelonFPSDrop","playerSetSmoothAutoSwitchonFPSDrop","playerSetSwitchDownOnLevelError","playerSetSeekMode","playerSetKeyLoadMaxRetry","playerSetKeyLoadMaxRetryTimeout","playerSetFragmentLoadMaxRetry","playerSetFragmentLoadMaxRetryTimeout","playerSetFragmentLoadSkipAfterMaxRetry","playerSetMaxSkippedFragments","playerSetFlushLiveURLCache","playerSetInitialLiveManifestSize","playerSetManifestLoadMaxRetry","playerSetManifestLoadMaxRetryTimeout","playerSetManifestRedundantLoadmaxRetry","playerSetStartFromBitrate","playerSetStartFromLevel","playerSetAutoStartMaxDuration","playerSetSeekFromLevel","playerSetUseHardwareVideoDecoder","playerSetLogInfo","playerSetLogDebug","playerSetLogDebug2","playerSetLogWarn","playerSetLogError","setAutoStartLoad","setCapLevelToStage","setMaxLevelCappingMode","setSetMinBufferLength","setMinBufferLengthCapping","setMaxBufferLength","setMaxBackBufferLength","setLowBufferLength","setMediaTimePeriod","setFpsDroppedMonitoringPeriod","setFpsDroppedMonitoringThreshold","setCapLevelonFPSDrop","setSmoothAutoSwitchonFPSDrop","setSwitchDownOnLevelError","setSeekMode","setKeyLoadMaxRetry","setKeyLoadMaxRetryTimeout","setFragmentLoadMaxRetry","setFragmentLoadMaxRetryTimeout","setFragmentLoadSkipAfterMaxRetry","setMaxSkippedFragments","setFlushLiveURLCache","setInitialLiveManifestSize","setManifestLoadMaxRetry","setManifestLoadMaxRetryTimeout","setManifestRedundantLoadmaxRetry","setStartFromBitrate","setStartFromLevel","setAutoStartMaxDuration","setSeekFromLevel","setUseHardwareVideoDecoder","setSetLogInfo","setLogDebug","setLogDebug2","setLogWarn","setLogError","currentLevel","getLevels","bitrate","_fillLevels","bandwidth","_normalizeDuration","previousDVRStatus","_dvrEnabled","livePlayback","_updateSettings","_dvrInUse","getCurrentLevelIndex","getCurrentLevel","levels","getCurrentBitrate","setCurrentLevel","_updateCurrentState","getType","_startReportingProgress","_stopReportingProgress","_reportingProgress","buffered","getbufferLength","_manifestLoaded","_updateDvr","previousDvrInUse","dvr","levelsLength","label","_createCallbacks","Clappr","flashlsCallbacks","flashlsEvents","HLSEvents","instanceId","videoSize","manifest","audioLevelLoaded","levelLoaded","levelEndlist","fragmentLoaded","fragmentPlaying","playmetrics","timemetrics","newState","seekState","switch","newLevel","audioTracksListChange","trackList","audioTrackChange","trackId","_toConsumableArray","arr2","from","_HTML5VideoPlayback","_minDvrSize","_extrapolatedWindowNumSegments","extrapolatedWindowNumSegments","_lastTimeUpdate","_lastDuration","_playableRegionStartTime","_localStartTimeCorrelation","_localEndTimeCorrelation","_playableRegionDuration","_durationExcludesAfterLiveSyncPoint","_segmentTargetDuration","_playlistType","_recoverAttemptsRemaining","hlsRecoverAttempts","_startTimeUpdateTimer","_extrapolatedStartTime","corr","timePassed","_now","local","extrapolatedWindowStartTime","remote","_extrapolatedWindowDuration","actualEndTime","extrapolatedEndTime","_extrapolatedEndTime","_startTime","_setupHls","hlsjsConfig","MEDIA_ATTACHED","loadSource","LEVEL_LOADED","evt","LEVEL_UPDATED","_onLevelUpdated","LEVEL_SWITCH","_onLevelSwitch","FRAG_LOADED","ERROR","_onHLSJSError","attachMedia","_recover","_recoveredDecodingError","_recoveredAudioCodecError","swapAudioCodec","recoverMediaError","_setupSrc","srcUrl","_timeUpdateTimer","_onDurationChange","_stopTimeUpdateTimer","_duration","seekTo","warn","seekToLivePoint","isSeekEnabled","fatal","ErrorTypes","NETWORK_ERROR","startLoad","MEDIA_ERROR","update","_onProgress","bufferedPos","end","details","targetduration","startTimeChanged","durationChanged","fragments","previousPlayableRegionStartTime","previousPlayableRegionDuration","startTime","totalduration","fragmentTargetDuration","liveSyncDurationCount","DefaultConfig","hiddenAreaDuration","endTime","previousEndTime","endTimeChanged","isHls","isSupported","_HTML5Video","updateSettings","resourceUrl","mimetypes","wav","mp3","aac","oga","_canPlay","MIMETYPES","mp4","codec","ogg","3gpp","webm","mkv","m3u8","AUDIO_MIMETYPES","KNOWN_AUDIO_MIMETYPES","acc","_loadStarted","_playheadMoving","_playheadMovingTimer","_stopped","disableContextMenu","disableVideoTagContextMenu","playbackConfig","preload","poster","controls","useVideoTagDefaultControls","crossOrigin","x-webkit-playsinline","playInline","isAudioOnly","_mimeTypesForUrl","audioOnly","data-html5-video","canplay","canplaythrough","durationchange","loadeddata","loadedmetadata","seeked","seeking","stalled","timeupdate","waiting","_onLoadedMetadata","_handleBufferingEvents","autoSeekFromUrl","onDemandType","tagName","Infinity","_stopPlayheadMovingChecks","isMuted","_startPlayheadMovingChecks","_playheadMovingTimeOnCheck","_determineIfPlayheadMoving","_onWaiting","_onLoadedData","_onCanPlay","_onPlaying","playheadShouldBeMoving","HAVE_FUTURE_DATA","_typeFor","mimeTypesByExtension","extension","media","mediaType","canPlayType","data-html-img","_onLoad","_error","_error2","_noiseFrameNum","_started","data-no-op","playbackNotSupported","playbackNotSupportedMessage","showForNoOp","_animate","_noise","idata","createImageData","canvas","buffer32","Uint32Array","err","random","color","pow","putImageData","_animationHandle","getContext","ClickToPausePlugin","_ContainerPlugin","_index","_index2","DVRControls","_UICorePlugin","click .live-button","data-dvr-controls","containerChanged","dvrChanged","shouldRender","useDvrControls","backToLive","EndVideo","_CorePlugin","exitOnEnd","exitFullscreenOnEnd","oldIcon","Favicon","changeFavicon","setPlayIcon","setPauseIcon","resetIcon","createIcon","svg","fillStyle","path","Path2D","fill","icon","toDataURL","playIcon","changeIcon","pauseIcon","GoogleAnalytics","gaAccount","account","trackerName","gaTrackerName","domainName","gaDomainName","currentHDState","embedScript","_gat","onload","onBufferFull","onPlaybackChanged","CONTAINER_FULL_SCREEN","onFullscreen","onHD","onDVR","_gaq","playbackState","res","BOLD","INFO","DEBUG","WARN","LEVEL_DEBUG","LEVEL_INFO","LEVEL_WARN","LEVEL_ERROR","LEVEL_DISABLED","COLORS","DESCRIPTIONS","offLevel","onOff","BLACKLIST","log","info","previousLevel","klassDescription","_instance","setLevel","_poster3","_poster4","PosterPlugin","_UIContainerPlugin","hasStartedPlaying","playRequested","data-poster","showOnVideoEnd","showPlayButton","$playButton","shouldHideOnPlay","posterUrl","background-image","$playWrapper","_seek_time3","_seek_time4","SeekTime","hoveringOverSeekBar","hoverPosition","actualLiveTime","actualLiveServerTime","actualLiveServerTimeDiff","getTime","data-seek-time","mediaControlContainer","isLiveStreamWithDvr","useActualLiveTime","showTime","hideTime","onContainerChanged","updateDuration","calculateHoverPosition","getSeekTime","secondsSinceMidnight","setHours","shouldBeVisible","currentSeekTime","displayedSeekTime","$seekTimeEl","durationShown","$durationEl","currentDuration","elWidth","elLeftPos","SourcesPlugin","onContainersCreated","firstValidSource","_spinner","_spinner2","_spinner3","_spinner4","SpinnerThreeBouncePlugin","showTimeout","data-spinner","StatsPlugin","setInitialAttrs","reportInterval","onStatsAdd","firstPlay","startupTime","rebufferingTime","watchingTime","rebuffers","externalMetrics","watchingTimeInit","intervalId","report","startupTimeInit","rebufferingTimeInit","getRebufferingTime","getWatchingTime","totalTime","isRebuffering","metric","getStats","Strings","_initializeMessages","lang","_language","_messages","en","back_to_live","playback_not_supported","pt","es","ru","strings","_watermark3","_watermark4","WaterMarkPlugin","watermark","imageUrl","imageLink","watermarkLink","templateOptions","KEY_NAMES_BY_CODE","8","9","13","16","17","18","20","27","32","37","38","39","40","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","112","113","114","115","116","117","118","119","120","121","122","123","KEY_CODES_BY_NAME","MODIFIERS","registerEvent","attachEvent","unregisterEvent","detachEvent","stringContains","neatString","capitalize","isString","what","arrayIncludes","haystack","needle","extractModifiers","keyCombination","modifiers","extractKey","modifiersAndKey","keyName","keyCode","that","lastKeyCode","lastModifiers","keysDown","any","keysUp","downHandler","handler","upHandler","unloader","upOrDown","registeredKeys","lastModifiersAndKey","registerKeys","newKeys","unregisterKeys","up","lastKey","modifier","require","1","_dereq_","EventEmitter","_maxListeners","isUndefined","defaultMaxListeners","setMaxListeners","er","listeners","listener","newListener","warned","trace","ret","listenerCount","evlistener","emitter","2","bundleFn","resolveSources","workerSources","depPath","depKey","wkey","cacheKeys","exp","floor","wcache","skey","scache","URL","webkitURL","mozURL","msURL","blob","Blob","bare","workerUrl","createObjectURL","worker","Worker","objectURL","3","_eventHandler","_eventHandler2","_bufferHelper","_bufferHelper2","_errors","_logger","_ewmaBandwidthEstimator","_ewmaBandwidthEstimator2","AbrController","_EventHandler","hls","FRAG_LOADING","FRAG_BUFFERED","lastLoadedFragLevel","_autoLevelCapping","_nextAutoLevel","onCheck","abandonRulesCheck","clearTimer","frag","timer","bwEstimator","isLive","config","ewmaFast","ewmaSlow","abrEwmaFastLive","abrEwmaSlowLive","abrEwmaFastVoD","abrEwmaSlowVoD","abrEwmaDefaultEstimate","fragCurrent","stats","aborted","logger","playbackRate","autoLevel","requestDelay","trequest","loadRate","bw","expectedLen","fragLoadedDelay","bufferStarvationDelay","bufferInfo","maxBufferHole","fragLevelNextLoadedDelay","nextLoadLevel","toFixed","sample","FRAG_LOAD_EMERGENCY_ABORTED","bitrateTest","tparsed","tbuffered","tload","onFragBuffered","loadCounter","fragLoadingProcessingMs","tfirst","bitrateTestDelay","ErrorDetails","FRAG_LOAD_ERROR","FRAG_LOAD_TIMEOUT","currentFragDuration","currentBw","minAutoLevel","maxAutoLevel","maxFetchDuration","bwFactor","bwUpFactor","levelInfo","levelDetails","avgDuration","adjustedbw","fetchDuration","nextAutoLevel","minAutoBitrate","canEstimate","nextABRAutoLevel","nextLevel","autoLevelCapping","avgbw","getEstimate","bestLevel","findBestLevel","abrBandWidthFactor","abrBandWidthUpFactor","maxStarvationDelay","maxLoadingDelay","24","25","26","28","43","4","_binarySearch","_binarySearch2","_demuxer","_demuxer2","_levelHelper","_levelHelper2","_timeRanges","_timeRanges2","State","STOPPED","STARTING","IDLE","PAUSED","KEY_LOADING","FRAG_LOADING_WAITING_RETRY","WAITING_TRACK","PARSING","PARSED","ENDED","AudioStreamController","MEDIA_DETACHING","AUDIO_TRACKS_UPDATED","AUDIO_TRACK_SWITCH","AUDIO_TRACK_LOADED","KEY_LOADED","FRAG_PARSING_INIT_SEGMENT","FRAG_PARSING_DATA","FRAG_PARSED","BUFFER_CREATED","BUFFER_APPENDED","BUFFER_FLUSHED","audioCodecSwap","ticks","ontick","tick","stopLoad","startPosition","tracks","lastCurrentTime","fragLoadError","nextLoadPosition","fragPrevious","demuxer","doTick","track","trackDetails","startFragRequested","startFragPrefetch","mediaBuffer","bufferLen","bufferEnd","maxBufLen","maxMaxBufferLength","sn","endSN","BUFFER_EOS","fragLen","foundFrag","maxFragLookUpTolerance","candidate","startSN","decryptdata","uri","fragLoadIdx","maxThreshold","fragLoadingLoopThreshold","loadIdx","FRAG_LOOP_LOADING_ERROR","retryDate","isSeeking","onvseeking","onMediaSeeking","onvended","onMediaEnded","onvseeked","audioTracks","altAudio","BUFFER_FLUSHING","startOffset","endOffset","POSITIVE_INFINITY","PTSKnown","startTimeOffset","audioCodec","defaultAudioCodec","pendingAppending","accurateTimeOffset","payload","cc","audio","levelCodec","BUFFER_CODECS","initSegment","BUFFER_APPENDING","content","startPTS","endPTS","startDTS","endDTS","nb","updateFragPTSDTS","data1","data2","_checkAppendedParsed","audioTrack","loadError","fragLoadingMaxRetry","fragLoadingRetryDelay","fragLoadingMaxRetryTimeout","AUDIO_TRACK_LOAD_ERROR","AUDIO_TRACK_LOAD_TIMEOUT","KEY_LOAD_ERROR","KEY_LOAD_TIMEOUT","29","45","5","AudioTrackController","MANIFEST_LOADING","MANIFEST_LOADED","defaultFound","newId","AUDIO_TRACK_LOADING","audioTrackId","setAudioTrackInternal","6","BufferController","MEDIA_ATTACHING","MANIFEST_PARSED","BUFFER_RESET","_msDuration","_levelDuration","onsbue","onSBUpdateEnd","onsbe","onSBUpdateError","pendingTracks","audioExpected","videoExpected","sourceBufferNb","ms","mediaSource","MediaSource","onmso","onMediaSourceOpen","onmse","onMediaSourceEnded","onmsc","onMediaSourceClose","endOfStream","sourceBuffer","flushRange","segments","appended","MEDIA_DETACHED","checkPendingTracks","pendingTracksNb","createSourceBuffers","doAppending","_needsFlush","doFlush","_needsEos","checkEos","appending","updateMediaElementDuration","BUFFER_APPENDING_ERROR","sb","removeSourceBuffer","trackName","addSourceBuffer","BUFFER_ADD_CODEC_ERROR","updating","flushBufferCounter","range","flushBuffer","segment","appendBuffer","appendError","BUFFER_FULL_ERROR","BUFFER_APPEND_ERROR","appendErrorMaxRetry","typeIn","bufStart","bufEnd","flushStart","flushEnd","7","CapLevelController","FPS_DROP_LEVEL_CAPPING","capLevelToPlayerSize","restrictedLevels","isLevelRestricted","droppedLevel","HTMLVideoElement","firstLevel","getMaxLevel","detectPlayerSize","streamController","nextLevelSwitch","capLevelIndex","mWidth","mediaWidth","mHeight","mediaHeight","lWidth","lHeight","pixelRatio","devicePixelRatio","offsetWidth","contentScaleFactor","offsetHeight","_ewma","_ewma2","EwmaBandWidthEstimator","slow","fast","defaultEstimate","defaultEstimate_","minWeight_","minDelayMs_","slow_","fast_","durationMs","numBytes","weight","getTotalWeight","42","FPSController","isVideoPlaybackQualityAvailable","capLevelOnFPSDrop","getVideoPlaybackQuality","checkFPSInterval","decodedFrames","droppedFrames","lastTime","currentPeriod","currentDropped","lastDroppedFrames","currentDecoded","lastDecodedFrames","droppedFPS","FPS_DROP","totalDroppedFrames","videoPlaybackQuality","checkFPS","totalVideoFrames","droppedVideoFrames","webkitDecodedFrameCount","webkitDroppedFrameCount","10","LevelController","_manualLevel","canload","bitrateStart","levels0","bitrateSet","videoCodecFound","audioCodecFound","videoCodec","AUDIO","redundantLevelId","urlId","checkSupportedAudio","isTypeSupported","checkSupportedVideo","_firstLevel","MANIFEST_INCOMPATIBLE_CODECS_ERROR","reason","_level","LEVEL_LOADING","OTHER_ERROR","LEVEL_SWITCH_ERROR","levelId","levelError","LEVEL_LOAD_ERROR","LEVEL_LOAD_TIMEOUT","recoverable","abrController","mediaBuffered","isBuffered","retryDelay","levelLoadingRetryDelay","newDetails","reloadInterval","averagetargetduration","curLevel","curDetails","setLevelInternal","_startLevel","configStartLevel","startLevel","11","WAITING_LEVEL","StreamController","lastPaused","_doTickIdle","_checkBuffer","_checkFragmentChanged","maxBufferSize","levelLastLoaded","_fetchPayloadOrEos","_ref","_ensureFragmentAtLivePoint","_findFragment","_loadFragmentOrKey","_ref2","maxLatency","liveMaxLatencyDuration","liveMaxLatencyDurationCount","liveSyncPosition","computeLivePosition","targetSN","_ref3","deltaPTS","curSNIdx","dropped","_ref4","autoLevelEnabled","bufferRange","getBufferRange","rangeCurrent","fragPlaying","FRAG_CHANGED","immediateSwitch","previouslyPaused","fetchdelay","currentRange","nextRange","nextLevelId","fragLastKbps","followingBufferRange","onMediaSeeked","tolerance","fragStartOffset","fragEndOffset","heaac","audioCodecSwitch","startLevelLoaded","newLevelId","sliding","mergeDetails","fragLoaded","lastAudioCodec","channelCount","mergedTrack","audiovideo","drift","LEVEL_PTS_UPDATED","videoBuffer","mediaTrack","alternate","_reduceMaxBufferLength","minLength","startPositionBuffered","immediateLevelSwitchEnd","expectedPlaying","jumpThreshold","playheadMoving","seekHoleNudgeDuration","BUFFER_STALLED_ERROR","nextBufferStart","nextStart","maxSeekHole","hole","BUFFER_SEEK_OVER_HOLE","newRange","targetLatency","liveSyncDuration","nextState","previousState","_state","STREAM_STATE_TRANSITION","nextBufferRange","_liveSyncPosition","12","_cea608Parser","_cea608Parser2","TimelineController","FRAG_PARSING_USERDATA","Cues","cueHandler","enableCEA708Captions","channel1","newCue","screen","textTrack1","existingTrack1","getExistingTrack","clearCurrentCues","createTextTrack","channel2","textTrack2","existingTrack2","cea608Parser","cues","removeCue","channelNumber","textTracks","textTrack","propName","kind","addTextTrack","lastPts","NEGATIVE_INFINITY","closedCaptions","pts","samples","ccdatas","extractCea608Data","bytes","addData","byteArray","tmpByte","ccbyte1","ccbyte2","ccValid","ccType","count","actualCCBytes","AES","_tables","_precompute","tmp","encKey","decKey","sbox","decTable","keyLen","rcon","xInv","x4","x8","tEnc","tDec","encTable","sboxInv","encrypted0","encrypted1","encrypted2","encrypted3","b2","c2","nInnerRounds","kIndex","table","table0","table1","table2","table3","14","_aes","_aes2","AES128Decrypter","initVector","iv","word","encrypted","init0","init1","init2","init3","wordIx","encrypted32","Int32Array","decipher","decrypted","decrypted32","ntoh","decrypt","doDecrypt","step","localDecrypt","subarray","15","_aes128Decrypter","_aes128Decrypter2","Decrypter","browserCrypto","crypto","subtle","webkitSubtle","disableWebCrypto","enableSoftwareAES","decryptBySoftware","decryptByWebCrypto","importKey","importedKey","catch","onWebCryptoError","key8","iv8","view","getUint32","decrypter","FRAG_DECRYPT_ERROR","_adts","_adts2","_id","_id2","AACDemuxer","observer","remuxerClass","remuxer","insertDiscontinuity","_aacTrack","sequenceNumber","timeOffset","frameLength","frameDuration","frameIndex","headerLength","stamp","aacSample","id3","timeStamp","contiguous","lastCC","switchLevel","lastLevel","lastSN","audiosamplerate","getAudioConfig","samplerate","unit","dts","remux","hasTimeStamp","22","ADTS","adtsObjectType","adtsSampleingIndex","adtsExtensionSampleingIndex","adtsChanelConfig","adtsSampleingRates","FRAG_PARSING_ERROR","_aacdemuxer","_aacdemuxer2","_tsdemuxer","_tsdemuxer2","_mp4Remuxer","_mp4Remuxer2","_passthroughRemuxer","_passthroughRemuxer2","DemuxerInline","typeSupported","probe","mp2t","23","36","19","_demuxerInline","_demuxerInline2","_events3","_events4","DemuxerWorker","_len2","_key2","forwardMessage","postMessage","cmd","enableLogs","FRAG_PARSING_METADATA","_demuxerWorker","_demuxerWorker2","_decrypter","_decrypter2","Demuxer","enableMP2TPassThrough","enableWorker","work","onwmsg","onWorkerMessage","onerror","INTERNAL_EXCEPTION","filename","lineno","revokeObjectURL","demuxInitialized","terminate","localthis","decryptedData","pushDecrypted","21","ExpGolomb","bytesAvailable","bitsAvailable","workingBytes","availableBytes","skipBytes","loadWord","bits","valu","readBits","leadingZeroCount","skipLZ","skipBits","clz","readUEG","deltaScale","lastScale","nextScale","readEG","profileIdc","profileCompat","levelIdc","numRefFramesInPicOrderCntCycle","picWidthInMbsMinus1","picHeightInMapUnitsMinus1","frameMbsOnlyFlag","scalingListCount","frameCropLeftOffset","frameCropRightOffset","frameCropTopOffset","frameCropBottomOffset","sarScale","readUByte","skipUEG","chromaFormatIdc","readBoolean","skipScalingList","picOrderCntType","skipEG","sarRatio","aspectRatioIdc","ID3","_hasTimeStamp","byte1","byte2","byte3","byte4","tagSize","endPos","header","readUTF","_parseID3Frames","_length","_payload","fromCharCode","tagId","tagLen","tagStart","tagFlags","timestamp","pts33Bit","_timeStamp","_expGolomb","_expGolomb2","TSDemuxer","pmtParsed","_pmtId","_avcTrack","_id3Track","_txtTrack","aacOverFlow","aacLastPTS","avcSample","stt","pid","atf","pes","codecsOnly","passthrough","unknownPIDs","avcTrack","aacTrack","id3Track","avcId","aacId","id3Id","pmtId","avcData","pesData","aacData","id3Data","parsePAT","_parsePAT","parsePMT","_parsePMT","parsePES","_parsePES","parseAVCPES","_parseAVCPES","parseAACPES","_parseAACPES","parseID3PES","_parseID3PES","parsedPIDs","avc","trackData","prevSampleData","curSample","sampleData","units","prevUnitData","curUnit","nbNalu","_initPTS","_initDTS","sectionLength","tableEnd","programInfoLength","stream","pesFlags","pesPrefix","pesLen","pesHdrLen","pesPts","pesDts","payloadStartOffset","newData","forceKeyFrameOnDiscontinuity","sps","expGolombDecoder","_parseAVCNALu","_createAVCSample","discardEPB","payloadType","payloadSize","endOfCaptions","countryCode","providerCode","readUShort","userStructure","readUInt","userDataType","firstByte","secondByte","totalCCs","_insertSampleInOrder","readSPS","codecarray","codecstring","pps","pushAccesUnit","_units","lastUnit","overflow","unitType","lastUnitType","naluState","lastState","lastUnitStart","_getLastNalUnit","_lastUnit","_tmp","newLength","EPBPositions","sourceIndex","newPTS","MANIFEST_LOAD_ERROR","MANIFEST_LOAD_TIMEOUT","MANIFEST_PARSING_ERROR","EventHandler","onEvent","handledEvents","useGenericHandler","registerListeners","unregisterListeners","isEventHandler","onEventGeneric","eventToFunction","funcName","FRAG_LOAD_PROGRESS","DESTROYING","AAC","BufferHelper","maxHoleDuration","vbuffered","bufferedInfo","bufferStart","bufferStartNext","buffered2","diff","buf2len","buf2end","LevelHelper","oldDetails","PTSFrag","oldfragments","newfragments","ccOffset","oldFrag","newFrag","fragIdx","updatePTS","fromIdx","toIdx","fragFrom","fragTo","fragToPTS","30","_playlistLoader","_playlistLoader2","_fragmentLoader","_fragmentLoader2","_abrController","_abrController2","_bufferController","_bufferController2","_capLevelController","_capLevelController2","_audioStreamController","_audioStreamController2","_streamController","_streamController2","_levelController","_levelController2","_timelineController","_timelineController2","_fpsController","_fpsController2","_audioTrackController","_audioTrackController2","_xhrLoader","_xhrLoader2","_keyLoader","_keyLoader2","_cues","_cues2","Hls","defaultConfig","playlistLoader","fragmentLoader","levelController","bufferController","capLevelController","fpsController","audioStreamController","timelineController","audioTrackController","keyLoader","stalledInBufferedNudgeThreshold","manifestLoadingTimeOut","manifestLoadingMaxRetry","manifestLoadingRetryDelay","manifestLoadingMaxRetryTimeout","levelLoadingTimeOut","levelLoadingMaxRetry","levelLoadingMaxRetryTimeout","fragLoadingTimeOut","fLoader","pLoader","xhrSetup","fetchSetup","stretchShortVideoTrack","detachMedia","loadLevel","immediateLevelSwitch","manualLevel","33","34","41","47","31","FragmentLoader","loaders","loaderName","loaderContext","loaderConfig","loaderCallbacks","responseType","progressData","byteRangeStartOffset","byteRangeEndOffset","rangeStart","rangeEnd","maxRetry","maxRetryDelay","onSuccess","loadsuccess","loaderror","onTimeout","loadtimeout","onProgress","loadprogress","response","KeyLoader","decryptkey","decrypturl","_url","_url2","_attrList","_attrList2","PlaylistLoader","retry","manifestLoadingMaxRetryTimeOut","levelLoadingMaxRetryTimeOut","buildAbsoluteURL","baseurl","re","resolution","decimalResolution","decimalInteger","NAME","codecs","CODECS","avc1toavcoti","medias","TYPE","groupId","DEFAULT","autoselect","AUTOSELECT","forced","FORCED","URI","LANGUAGE","segmentNumber","uint8View","levelkey","cloneObj","createInitializationVector","avcdata","substr","fragdecryptdata","currentSN","programDateTime","tagList","fragmentDecryptdataFromLevelkey","decryptparams","keyAttrs","decryptmethod","enumeratedString","decrypturi","decryptiv","hexadecimalInteger","startParams","startAttrs","decimalFloatingPoint","isLevel","parseLevelPlaylist","parseMasterPlaylist","audiotracks","parseMasterPlaylistMedia","embeddedAudioFound","46","35","MP4","types","avc1","avcC","btrt","dinf","dref","esds","ftyp","hdlr","mdat","mdhd","mdia","mfhd","minf","moof","moov","mp4a","mvex","mvhd","sdtp","stbl","stco","stsc","stsd","stsz","stts","tfdt","tfhd","traf","trak","trun","trex","tkhd","vmhd","smhd","charCodeAt","videoHdlr","audioHdlr","HDLR_TYPES","STTS","STSC","STCO","STSZ","VMHD","SMHD","STSD","majorBrand","avc1Brand","minorVersion","FTYP","box","DINF","timescale","baseMediaDecodeTime","boxes","flags","dependsOn","isDependedOn","hasRedundancy","avcc","configlen","sampleDependencyTable","cts","arraylen","isLeading","paddingValue","isNonSync","degradPrio","movie","_aac","_aac2","_mp4Generator","_mp4Generator2","MP4Remuxer","ISGenerated","PES2MP4SCALEFACTOR","PES_TIMESCALE","MP4_TIMESCALE","videoTrack","generateIS","audioData","remuxAudio","audioTrackLength","remuxVideo","videoData","remuxEmptyAudio","remuxID3","remuxText","initPTS","initDTS","audioSamples","videoSamples","pesTimeScale","computePTSDTS","greatestCommonDivisor","mp4SampleDuration","firstPTS","firstDTS","nextDTS","lastPTS","lastDTS","pes2mp4ScaleFactor","inputSamples","outputSamples","PTSDTSshift","curr","nextAvcDts","_PTSNormalize","vendor","_i","_sample","setUint32","_i2","mp4SampleLength","compositionTimeOffset","lastFrameDuration","gapTolerance","deltaToFrameEnd","nextAacPts","mp4Sample","ptsnorm","dtsnorm","fillFrame","newStamp","mp4timeScale","expectedSampleDuration","samples0","pesFrameDuration","nextPtsNorm","ptsNorm","missing","getSilentFrame","_delta","numMissingFrames","_i3","lastSampleDuration","nbSamples","sampleDuration","silentFrame","reference","44","PassThroughRemuxer","rawData","AttrList","parseAttrList","attrName","intValue","stringValue","quote","lastIndexOf","BinarySearch","comparisonFunction","minIndex","maxIndex","currentIndex","currentElement","comparisonResult","specialCea608CharsCodes","92","94","95","96","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","getCharForByte","byte","charCode","NR_ROWS","NR_COLS","rowsLowCh1","rowsHighCh1","rowsLowCh2","rowsHighCh2","backgroundColors","verboseFilter","DATA","WARNING","TEXT","verboseLevel","setTime","newTime","severity","msg","minLevel","numArrayToHexArray","numArray","hexArray","PenState","foreground","underline","italics","background","flash","styles","attribs","newPenState","StyledUnicodeChar","uchar","penState","reset","equals","newChar","isDefault","Row","chars","currPenState","equal","isEmpty","absPos","relPos","newPos","setPenState","setCursor","moveCursor","setChar","backSpace","char","startPos","clearFromPos","setStyles","currChar","CaptionScreen","rows","currRow","nrRollUpRows","row","clearToEndOfRow","insertChar","setPenStyles","pacData","newRow","indent","prevPos","setPen","bkgData","nrRows","getDisplayText","topRowIndex","topRow","asOneRow","displayText","rowNr","rowText","getTextString","Cea608Channel","outputFilter","chNr","mode","verbose","displayedMemory","nonDisplayedMemory","lastOutputScreen","currRollUpRow","writeScreen","cueStartTime","lastCueEndTime","newHandler","setPAC","setBkgData","newMode","outputDataUpdate","setMode","setRollUpRows","rollUp","nrCols","colorIndex","colors","updateData","Cea608Parser","field","out1","out2","outputs","channels","currChNr","lastCmdA","lastCmdB","bufferedData","dataCounters","padding","getHandler","setHandler","byteList","cmdFound","charsFound","parseCmd","parseMidrow","parsePAC","parseBackgroundAttributes","parseChars","channel","insertChars","cond1","cond2","ccRCL","ccBS","ccAOF","ccAON","ccDER","ccRU","ccFON","ccRDC","ccTR","ccRTD","ccEDM","ccCR","ccENM","ccEOC","ccTO","ccMIDROW","case1","case2","interpretPAC","pacIndex","channelNr","charCodes","charCode1","oneCode","hexCodes","cueSplitAtTime","captionScreen","cue","indenting","VTTCue","TextTrackCue","line","align","addCue","EWMA","halfLife","alpha_","estimate_","totalWeight_","adjAlpha","zeroFactor","formatMsg","consolePrintFn","exportLoggerFunctions","debugConfig","functions","exportedLogger","fakeLogger","resultArray","TimeRanges","URLHelper","baseURL","relativeURL","relativeURLQuery","relativeURLHash","relativeURLHashSplit","relativeURLQuerySplit","baseURLHashSplit","baseURLQuerySplit","baseURLDomainSplit","baseURLProtocol","baseURLProtocolDomain","baseURLPath","builtURL","buildAbsolutePath","basePath","relativePath","nUpLn","nEnd","sRelPath","sDir","sPath","nStart","XhrLoader","requestTimeout","retryTimeout","callbacks","loadInternal","XDomainRequest","readystatechange","onprogress","responseURL","lengthComputable","arraySome","predicate","SetCache","setCacheAdd","setCacheHas","baseIsEqual","bitmask","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","PARTIAL_COMPARE_FLAG","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","isPartial","arrLength","othLength","seen","UNORDERED_COMPARE_FLAG","arrValue","othValue","compared","othIndex","convert","objProps","objLength","othProps","skipCtor","objCtor","othCtor","isEqual","FUNC_ERROR_TEXT","toInteger","isSymbol","toFinite","toNumber","INFINITY","sign","MAX_INTEGER","remainder","NAN","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","baseToString","symbolToString","castPath","stringToPath","isKey","reIsPlainProp","reIsDeepProp","toKey","memoize","resolver","memoized","Cache","defaultValue","reLeadingDot","rePropName","reEscapeChar","number","baseIndexOf","arrayIncludesWith","comparator","baseFindIndex","fromIndex","fromRight","baseIsNaN","baseProperty","cacheHas","baseGet","baseHasIn","baseIsMatch","matchData","noCustomizer","baseIteratee","identity","baseMatchesProperty","baseMatches","property","getMatchData","matchesStrictComparable","isStrictComparable","hasIn","basePropertyDeep","baseUniq","includes","createSet","outer","computed","seenIndex","hasPath","hasFunc","uniqBy"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,OAAAD,IAEAD,EAAA,OAAAC,KACCK,KAA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AAD,QAAA,0P3Gij+BM,SAASC,EAAQD,G4Gjj+BvBC,EAAAD,QAAA,qY5G0j+BM,SAASC,EAAQD,G6G1j+BvBC,EAAAD,QAAA,mN7Gmk+BM,SAASC,EAAQD,G8Gnk+BvBC,EAAAD,QAAA,kO9G4k+BM,SAASC,EAAQD,G+G5k+BvBC,EAAAD,QAAA,8W/Gql+BM,SAASC,EAAQD,EAASM,GgHrl+BhCL,EAAAD,QAAAM,EAAAQ,EAAA,wChH8l+BM,SAASb,EAAQD,EAASM,GiH9l+BhCL,EAAAD,QAAAM,EAAAQ,EAAA,wCjHum+BM,SAASb,EAAQD,EAASM,GkHvm+BhCL,EAAAD,QAAAM,EAAAQ,EAAA","file":"clappr.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Clappr\"] = factory();\n\telse\n\t\troot[\"Clappr\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Clappr\"] = factory();\n\telse\n\t\troot[\"Clappr\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"<%=baseUrl%>/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/*!*********************!*\\\n !*** ./src/main.js ***!\n \\*********************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _player = __webpack_require__(/*! components/player */ 46);\n\t\n\tvar _player2 = _interopRequireDefault(_player);\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _utils2 = _interopRequireDefault(_utils);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _container_plugin = __webpack_require__(/*! base/container_plugin */ 13);\n\t\n\tvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\t\n\tvar _core_plugin = __webpack_require__(/*! base/core_plugin */ 12);\n\t\n\tvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\t\n\tvar _ui_core_plugin = __webpack_require__(/*! base/ui_core_plugin */ 17);\n\t\n\tvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\t\n\tvar _ui_container_plugin = __webpack_require__(/*! base/ui_container_plugin */ 14);\n\t\n\tvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\t\n\tvar _base_object = __webpack_require__(/*! base/base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _ui_object = __webpack_require__(/*! base/ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _container = __webpack_require__(/*! components/container */ 24);\n\t\n\tvar _container2 = _interopRequireDefault(_container);\n\t\n\tvar _core = __webpack_require__(/*! components/core */ 25);\n\t\n\tvar _core2 = _interopRequireDefault(_core);\n\t\n\tvar _loader = __webpack_require__(/*! components/loader */ 26);\n\t\n\tvar _loader2 = _interopRequireDefault(_loader);\n\t\n\tvar _mediator = __webpack_require__(/*! components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tvar _media_control = __webpack_require__(/*! components/media_control */ 27);\n\t\n\tvar _media_control2 = _interopRequireDefault(_media_control);\n\t\n\tvar _player_info = __webpack_require__(/*! components/player_info */ 15);\n\t\n\tvar _player_info2 = _interopRequireDefault(_player_info);\n\t\n\tvar _base_flash_playback = __webpack_require__(/*! playbacks/base_flash_playback */ 18);\n\t\n\tvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\t\n\tvar _flash = __webpack_require__(/*! playbacks/flash */ 28);\n\t\n\tvar _flash2 = _interopRequireDefault(_flash);\n\t\n\tvar _flashls = __webpack_require__(/*! playbacks/flashls */ 29);\n\t\n\tvar _flashls2 = _interopRequireDefault(_flashls);\n\t\n\tvar _hls = __webpack_require__(/*! playbacks/hls */ 30);\n\t\n\tvar _hls2 = _interopRequireDefault(_hls);\n\t\n\tvar _html5_audio = __webpack_require__(/*! playbacks/html5_audio */ 31);\n\t\n\tvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\t\n\tvar _html5_video = __webpack_require__(/*! playbacks/html5_video */ 16);\n\t\n\tvar _html5_video2 = _interopRequireDefault(_html5_video);\n\t\n\tvar _html_img = __webpack_require__(/*! playbacks/html_img */ 32);\n\t\n\tvar _html_img2 = _interopRequireDefault(_html_img);\n\t\n\tvar _no_op = __webpack_require__(/*! playbacks/no_op */ 33);\n\t\n\tvar _no_op2 = _interopRequireDefault(_no_op);\n\t\n\tvar _poster = __webpack_require__(/*! plugins/poster */ 34);\n\t\n\tvar _poster2 = _interopRequireDefault(_poster);\n\t\n\tvar _log = __webpack_require__(/*! plugins/log */ 19);\n\t\n\tvar _log2 = _interopRequireDefault(_log);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _vendor = __webpack_require__(/*! vendor */ 20);\n\t\n\tvar _vendor2 = _interopRequireDefault(_vendor);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar version = (\"0.2.64\"); // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\texports.default = {\n\t Player: _player2.default,\n\t Mediator: _mediator2.default,\n\t Events: _events2.default,\n\t Browser: _browser2.default,\n\t PlayerInfo: _player_info2.default,\n\t MediaControl: _media_control2.default,\n\t ContainerPlugin: _container_plugin2.default,\n\t UIContainerPlugin: _ui_container_plugin2.default,\n\t CorePlugin: _core_plugin2.default,\n\t UICorePlugin: _ui_core_plugin2.default,\n\t Playback: _playback2.default,\n\t Container: _container2.default,\n\t Core: _core2.default,\n\t Loader: _loader2.default,\n\t BaseObject: _base_object2.default,\n\t UIObject: _ui_object2.default,\n\t Utils: _utils2.default,\n\t BaseFlashPlayback: _base_flash_playback2.default,\n\t Flash: _flash2.default,\n\t FlasHLS: _flashls2.default,\n\t HLS: _hls2.default,\n\t HTML5Audio: _html5_audio2.default,\n\t HTML5Video: _html5_video2.default,\n\t HTMLImg: _html_img2.default,\n\t NoOp: _no_op2.default,\n\t Poster: _poster2.default,\n\t Log: _log2.default,\n\t Styler: _styler2.default,\n\t Vendor: _vendor2.default,\n\t version: version,\n\t template: _template2.default,\n\t $: _clapprZepto2.default\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/*!****************************!*\\\n !*** ./src/base/events.js ***!\n \\****************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar _log = __webpack_require__(/*! plugins/log */ 19);\n\t\n\tvar _log2 = _interopRequireDefault(_log);\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.once */ 101);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar slice = Array.prototype.slice;\n\t\n\tvar eventSplitter = /\\s+/;\n\t\n\tvar eventsApi = function eventsApi(obj, action, name, rest) {\n\t if (!name) {\n\t return true;\n\t }\n\t\n\t // Handle event maps.\n\t if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n\t for (var key in name) {\n\t obj[action].apply(obj, [key, name[key]].concat(rest));\n\t }\n\t return false;\n\t }\n\t\n\t // Handle space separated event names.\n\t if (eventSplitter.test(name)) {\n\t var names = name.split(eventSplitter);\n\t for (var i = 0, l = names.length; i < l; i++) {\n\t obj[action].apply(obj, [names[i]].concat(rest));\n\t }\n\t return false;\n\t }\n\t\n\t return true;\n\t};\n\t\n\tvar triggerEvents = function triggerEvents(events, args, klass, name) {\n\t var ev = void 0,\n\t i = -1;\n\t var l = events.length,\n\t a1 = args[0],\n\t a2 = args[1],\n\t a3 = args[2];\n\t run();\n\t\n\t function run() {\n\t try {\n\t switch (args.length) {\n\t case 0:\n\t while (++i < l) {\n\t (ev = events[i]).callback.call(ev.ctx);\n\t }return;\n\t case 1:\n\t while (++i < l) {\n\t (ev = events[i]).callback.call(ev.ctx, a1);\n\t }return;\n\t case 2:\n\t while (++i < l) {\n\t (ev = events[i]).callback.call(ev.ctx, a1, a2);\n\t }return;\n\t case 3:\n\t while (++i < l) {\n\t (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);\n\t }return;\n\t default:\n\t while (++i < l) {\n\t (ev = events[i]).callback.apply(ev.ctx, args);\n\t }return;\n\t }\n\t } catch (exception) {\n\t _log2.default.error.apply(_log2.default, [klass, 'error on event', name, 'trigger', '-', exception]);\n\t run();\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * @class Events\n\t * @constructor\n\t * @module base\n\t */\n\t\n\tvar Events = function () {\n\t function Events() {\n\t _classCallCheck(this, Events);\n\t }\n\t\n\t /**\n\t * listen to an event indefinitely, if you want to stop you need to call `off`\n\t * @method on\n\t * @param {String} name\n\t * @param {Function} callback\n\t * @param {Object} context\n\t */\n\t Events.prototype.on = function on(name, callback, context) {\n\t if (!eventsApi(this, 'on', name, [callback, context]) || !callback) {\n\t return this;\n\t }\n\t this._events || (this._events = {});\n\t var events = this._events[name] || (this._events[name] = []);\n\t events.push({ callback: callback, context: context, ctx: context || this });\n\t return this;\n\t };\n\t\n\t /**\n\t * listen to an event only once\n\t * @method once\n\t * @param {String} name\n\t * @param {Function} callback\n\t * @param {Object} context\n\t */\n\t\n\t\n\t Events.prototype.once = function once(name, callback, context) {\n\t if (!eventsApi(this, 'once', name, [callback, context]) || !callback) {\n\t return this;\n\t }\n\t var self = this;\n\t var once = (0, _lodash2.default)(function () {\n\t self.off(name, once);\n\t callback.apply(this, arguments);\n\t });\n\t once._callback = callback;\n\t return this.on(name, once, context);\n\t };\n\t\n\t /**\n\t * stop listening to an event\n\t * @method off\n\t * @param {String} name\n\t * @param {Function} callback\n\t * @param {Object} context\n\t */\n\t\n\t\n\t Events.prototype.off = function off(name, callback, context) {\n\t var retain = void 0,\n\t ev = void 0,\n\t events = void 0,\n\t names = void 0,\n\t i = void 0,\n\t l = void 0,\n\t j = void 0,\n\t k = void 0;\n\t if (!this._events || !eventsApi(this, 'off', name, [callback, context])) {\n\t return this;\n\t }\n\t if (!name && !callback && !context) {\n\t this._events = void 0;\n\t return this;\n\t }\n\t names = name ? [name] : Object.keys(this._events);\n\t // jshint maxdepth:5\n\t for (i = 0, l = names.length; i < l; i++) {\n\t name = names[i];\n\t events = this._events[name];\n\t if (events) {\n\t this._events[name] = retain = [];\n\t if (callback || context) {\n\t for (j = 0, k = events.length; j < k; j++) {\n\t ev = events[j];\n\t if (callback && callback !== ev.callback && callback !== ev.callback._callback || context && context !== ev.context) {\n\t retain.push(ev);\n\t }\n\t }\n\t }\n\t if (!retain.length) {\n\t delete this._events[name];\n\t }\n\t }\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * triggers an event given its `name`\n\t * @method trigger\n\t * @param {String} name\n\t */\n\t\n\t\n\t Events.prototype.trigger = function trigger(name) {\n\t var klass = this.name || this.constructor.name;\n\t _log2.default.debug.apply(_log2.default, [klass].concat(Array.prototype.slice.call(arguments)));\n\t if (!this._events) {\n\t return this;\n\t }\n\t var args = slice.call(arguments, 1);\n\t if (!eventsApi(this, 'trigger', name, args)) {\n\t return this;\n\t }\n\t var events = this._events[name];\n\t var allEvents = this._events.all;\n\t if (events) {\n\t triggerEvents(events, args, klass, name);\n\t }\n\t if (allEvents) {\n\t triggerEvents(allEvents, arguments, klass, name);\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * stop listening an event for a given object\n\t * @method stopListening\n\t * @param {Object} obj\n\t * @param {String} name\n\t * @param {Function} callback\n\t */\n\t\n\t\n\t Events.prototype.stopListening = function stopListening(obj, name, callback) {\n\t var listeningTo = this._listeningTo;\n\t if (!listeningTo) {\n\t return this;\n\t }\n\t var remove = !name && !callback;\n\t if (!callback && (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n\t callback = this;\n\t }\n\t if (obj) {\n\t (listeningTo = {})[obj._listenId] = obj;\n\t }\n\t for (var id in listeningTo) {\n\t obj = listeningTo[id];\n\t obj.off(name, callback, this);\n\t if (remove || Object.keys(obj._events).length === 0) {\n\t delete this._listeningTo[id];\n\t }\n\t }\n\t return this;\n\t };\n\t\n\t return Events;\n\t}();\n\t\n\t/**\n\t * listen to an event indefinitely for a given `obj`\n\t * @method listenTo\n\t * @param {Object} obj\n\t * @param {String} name\n\t * @param {Function} callback\n\t * @param {Object} context\n\t * @example\n\t * ```javascript\n\t * this.listenTo(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)\n\t * ```\n\t */\n\t/**\n\t * listen to an event once for a given `obj`\n\t * @method listenToOnce\n\t * @param {Object} obj\n\t * @param {String} name\n\t * @param {Function} callback\n\t * @param {Object} context\n\t * @example\n\t * ```javascript\n\t * this.listenToOnce(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)\n\t * ```\n\t */\n\t\n\t\n\texports.default = Events;\n\tvar listenMethods = { listenTo: 'on', listenToOnce: 'once' };\n\t\n\tObject.keys(listenMethods).forEach(function (method) {\n\t Events.prototype[method] = function (obj, name, callback) {\n\t var listeningTo = this._listeningTo || (this._listeningTo = {});\n\t var id = obj._listenId || (obj._listenId = (0, _utils.uniqueId)('l'));\n\t listeningTo[id] = obj;\n\t if (!callback && (typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n\t callback = this;\n\t }\n\t obj[listenMethods[method]](name, callback, this);\n\t return this;\n\t };\n\t});\n\t\n\t// PLAYER EVENTS\n\t/**\n\t * Fired when the player is ready on startup\n\t *\n\t * @event PLAYER_READY\n\t */\n\tEvents.PLAYER_READY = 'ready';\n\t/**\n\t * Fired when player resizes\n\t *\n\t * @event PLAYER_RESIZE\n\t * @param {Object} currentSize an object with the current size\n\t */\n\tEvents.PLAYER_RESIZE = 'resize';\n\t/**\n\t * Fired when player changes its fullscreen state\n\t *\n\t * @event PLAYER_FULLSCREEN\n\t * @param {Boolean} whether or not the player is on fullscreen mode\n\t */\n\tEvents.PLAYER_FULLSCREEN = 'fullscreen';\n\t/**\n\t * Fired when player starts to play\n\t *\n\t * @event PLAYER_PLAY\n\t */\n\tEvents.PLAYER_PLAY = 'play';\n\t/**\n\t * Fired when player pauses\n\t *\n\t * @event PLAYER_PAUSE\n\t */\n\tEvents.PLAYER_PAUSE = 'pause';\n\t/**\n\t * Fired when player stops\n\t *\n\t * @event PLAYER_STOP\n\t */\n\tEvents.PLAYER_STOP = 'stop';\n\t/**\n\t * Fired when player ends the video\n\t *\n\t * @event PLAYER_ENDED\n\t */\n\tEvents.PLAYER_ENDED = 'ended';\n\t/**\n\t * Fired when player seeks the video\n\t *\n\t * @event PLAYER_SEEK\n\t * @param {Number} time the current time in seconds\n\t */\n\tEvents.PLAYER_SEEK = 'seek';\n\t/**\n\t * Fired when player receives an error\n\t *\n\t * @event PLAYER_ERROR\n\t * @param {Object} error the error\n\t */\n\tEvents.PLAYER_ERROR = 'error';\n\t/**\n\t * Fired when the time is updated on player\n\t *\n\t * @event PLAYER_TIMEUPDATE\n\t * @param {Object} progress Data\n\t * progress object\n\t * @param {Number} [progress.current]\n\t * current time\n\t * @param {Number} [progress.total]\n\t * total time\n\t */\n\tEvents.PLAYER_TIMEUPDATE = 'timeupdate';\n\t/**\n\t * Fired when player updates its volume\n\t *\n\t * @event PLAYER_VOLUMEUPDATE\n\t * @param {Number} volume the current volume\n\t */\n\tEvents.PLAYER_VOLUMEUPDATE = 'volumeupdate';\n\t\n\t// Playback Events\n\t/**\n\t * Fired when the playback is downloading the media\n\t *\n\t * @event PLAYBACK_PROGRESS\n\t * @param progress {Object}\n\t * Data progress object\n\t * @param [progress.start] {Number}\n\t * start position of buffered content at current position\n\t * @param [progress.current] {Number}\n\t * end position of buffered content at current position\n\t * @param [progress.total] {Number}\n\t * total content to be downloaded\n\t * @param buffered {Array}\n\t * array of buffered segments ({start, end}). [Only for supported playbacks]\n\t */\n\tEvents.PLAYBACK_PROGRESS = 'playback:progress';\n\t/**\n\t * Fired when the time is updated on playback\n\t *\n\t * @event PLAYBACK_TIMEUPDATE\n\t * @param {Object} progress Data\n\t * progress object\n\t * @param {Number} [progress.current]\n\t * current time\n\t * @param {Number} [progress.total]\n\t * total time\n\t */\n\tEvents.PLAYBACK_TIMEUPDATE = 'playback:timeupdate';\n\t/**\n\t * Fired when playback is ready\n\t *\n\t * @event PLAYBACK_READY\n\t */\n\tEvents.PLAYBACK_READY = 'playback:ready';\n\t/**\n\t * Fired when the playback starts having to buffer because\n\t * playback can currently not be smooth.\n\t *\n\t * This corresponds to the playback `buffering` property being\n\t * `true`.\n\t *\n\t * @event PLAYBACK_BUFFERING\n\t */\n\tEvents.PLAYBACK_BUFFERING = 'playback:buffering';\n\t/**\n\t * Fired when the playback has enough in the buffer to be\n\t * able to play smoothly, after previously being unable to\n\t * do this.\n\t *\n\t * This corresponds to the playback `buffering` property being\n\t * `false`.\n\t *\n\t * @event PLAYBACK_BUFFERFULL\n\t */\n\tEvents.PLAYBACK_BUFFERFULL = 'playback:bufferfull';\n\t/**\n\t * Fired when playback changes any settings (volume, seek and etc)\n\t *\n\t * @event PLAYBACK_SETTINGSUPDATE\n\t */\n\tEvents.PLAYBACK_SETTINGSUPDATE = 'playback:settingsupdate';\n\t/**\n\t * Fired when playback loaded its metadata\n\t *\n\t * @event PLAYBACK_LOADEDMETADATA\n\t * @param {Object} metadata Data\n\t * settings object\n\t * @param {Number} [metadata.duration]\n\t * the playback duration\n\t * @param {Object} [metadata.data]\n\t * extra meta data\n\t */\n\tEvents.PLAYBACK_LOADEDMETADATA = 'playback:loadedmetadata';\n\t/**\n\t * Fired when playback updates its video quality\n\t *\n\t * @event PLAYBACK_HIGHDEFINITIONUPDATE\n\t * @param {Boolean} isHD\n\t * true when is on HD, false otherwise\n\t */\n\tEvents.PLAYBACK_HIGHDEFINITIONUPDATE = 'playback:highdefinitionupdate';\n\t/**\n\t * Fired when playback updates its bitrate\n\t *\n\t * @event PLAYBACK_BITRATE\n\t * @param {Object} bitrate Data\n\t * bitrate object\n\t * @param {Number} [bitrate.bandwidth]\n\t * bitrate bandwidth when it's available\n\t * @param {Number} [bitrate.width]\n\t * playback width (ex: 720, 640, 1080)\n\t * @param {Number} [bitrate.height]\n\t * playback height (ex: 240, 480, 720)\n\t * @param {Number} [bitrate.level]\n\t * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)\n\t */\n\tEvents.PLAYBACK_BITRATE = 'playback:bitrate';\n\t/**\n\t * Fired when the playback has its levels\n\t *\n\t * @event PLAYBACK_LEVELS_AVAILABLE\n\t * @param {Array} levels\n\t * the ordered levels, each one with the following format `{id: 1, label: '500kbps'}` ps: id should be a number >= 0\n\t * @param {Number} initial\n\t * the initial level otherwise -1 (AUTO)\n\t */\n\tEvents.PLAYBACK_LEVELS_AVAILABLE = 'playback:levels:available';\n\t/**\n\t * Fired when the playback starts to switch level\n\t *\n\t * @event PLAYBACK_LEVEL_SWITCH_START\n\t *\n\t */\n\tEvents.PLAYBACK_LEVEL_SWITCH_START = 'playback:levels:switch:start';\n\t/**\n\t * Fired when the playback ends the level switch\n\t *\n\t * @event PLAYBACK_LEVEL_SWITCH_END\n\t *\n\t */\n\tEvents.PLAYBACK_LEVEL_SWITCH_END = 'playback:levels:switch:end';\n\t\n\t/**\n\t * Fired when playback internal state changes\n\t *\n\t * @event PLAYBACK_PLAYBACKSTATE\n\t * @param {Object} state Data\n\t * state object\n\t * @param {String} [state.type]\n\t * the playback type\n\t */\n\tEvents.PLAYBACK_PLAYBACKSTATE = 'playback:playbackstate';\n\t/**\n\t * Fired when DVR becomes enabled/disabled.\n\t *\n\t * @event PLAYBACK_DVR\n\t * @param {boolean} state true if dvr enabled\n\t */\n\tEvents.PLAYBACK_DVR = 'playback:dvr';\n\t// TODO doc\n\tEvents.PLAYBACK_MEDIACONTROL_DISABLE = 'playback:mediacontrol:disable';\n\t// TODO doc\n\tEvents.PLAYBACK_MEDIACONTROL_ENABLE = 'playback:mediacontrol:enable';\n\t/**\n\t * Fired when the media for a playback ends.\n\t *\n\t * @event PLAYBACK_ENDED\n\t * @param {String} name the name of the playback\n\t */\n\tEvents.PLAYBACK_ENDED = 'playback:ended';\n\t/**\n\t * Fired when user requests `play()`\n\t *\n\t * @event PLAYBACK_PLAY_INTENT\n\t */\n\tEvents.PLAYBACK_PLAY_INTENT = 'playback:play:intent';\n\t/**\n\t * Fired when the media for a playback starts playing.\n\t * This is not necessarily when the user requests `play()`\n\t * The media may have to buffer first.\n\t * I.e. `isPlaying()` might return `true` before this event is fired,\n\t * because `isPlaying()` represents the intended state.\n\t *\n\t * @event PLAYBACK_PLAY\n\t */\n\tEvents.PLAYBACK_PLAY = 'playback:play';\n\t/**\n\t * Fired when the media for a playback pauses.\n\t *\n\t * @event PLAYBACK_PAUSE\n\t */\n\tEvents.PLAYBACK_PAUSE = 'playback:pause';\n\t/**\n\t * Fired when the media for a playback is stopped.\n\t *\n\t * @event PLAYBACK_STOP\n\t */\n\tEvents.PLAYBACK_STOP = 'playback:stop';\n\t/**\n\t * Fired if an error occurs in the playback.\n\t *\n\t * @event PLAYBACK_ERROR\n\t * @param {Object} error An object containing the error details\n\t * @param {String} name Playback name\n\t */\n\tEvents.PLAYBACK_ERROR = 'playback:error';\n\t// TODO doc\n\tEvents.PLAYBACK_STATS_ADD = 'playback:stats:add';\n\t// TODO doc\n\tEvents.PLAYBACK_FRAGMENT_LOADED = 'playback:fragment:loaded';\n\t// TODO doc\n\tEvents.PLAYBACK_LEVEL_SWITCH = 'playback:level:switch';\n\t\n\t/**\n\t * Fired when the options were changed for the core\n\t *\n\t * @event CORE_OPTIONS_CHANGE\n\t */\n\tEvents.CORE_OPTIONS_CHANGE = 'core:options:change';\n\t/**\n\t * Fired after creating containers, when the core is ready\n\t *\n\t * @event CORE_READY\n\t */\n\tEvents.CORE_READY = 'core:ready';\n\t/**\n\t * Fired when the fullscreen state change\n\t *\n\t * @param {Boolean} whether or not the player is on fullscreen mode\n\t * @event CORE_READY\n\t */\n\tEvents.CORE_FULLSCREEN = 'core:fullscreen';\n\t\n\t// Container Events\n\t/**\n\t * Fired when the container internal state changes\n\t *\n\t * @event CONTAINER_PLAYBACKSTATE\n\t * @param {Object} state Data\n\t * state object\n\t * @param {String} [state.type]\n\t * the playback type\n\t */\n\tEvents.CONTAINER_PLAYBACKSTATE = 'container:playbackstate';\n\tEvents.CONTAINER_PLAYBACKDVRSTATECHANGED = 'container:dvr';\n\t/**\n\t * Fired when the container updates its bitrate\n\t *\n\t * @event CONTAINER_BITRATE\n\t * @param {Object} bitrate Data\n\t * bitrate object\n\t * @param {Number} [bitrate.bandwidth]\n\t * bitrate bandwidth when it's available\n\t * @param {Number} [bitrate.width]\n\t * playback width (ex: 720, 640, 1080)\n\t * @param {Number} [bitrate.height]\n\t * playback height (ex: 240, 480, 720)\n\t * @param {Number} [bitrate.level]\n\t * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)\n\t */\n\tEvents.CONTAINER_BITRATE = 'container:bitrate';\n\tEvents.CONTAINER_STATS_REPORT = 'container:stats:report';\n\tEvents.CONTAINER_DESTROYED = 'container:destroyed';\n\t/**\n\t * Fired when the container is ready\n\t *\n\t * @event CONTAINER_READY\n\t */\n\tEvents.CONTAINER_READY = 'container:ready';\n\tEvents.CONTAINER_ERROR = 'container:error';\n\t/**\n\t * Fired when the container loaded its metadata\n\t *\n\t * @event CONTAINER_LOADEDMETADATA\n\t * @param {Object} metadata Data\n\t * settings object\n\t * @param {Number} [metadata.duration]\n\t * the playback duration\n\t * @param {Object} [metadata.data]\n\t * extra meta data\n\t */\n\tEvents.CONTAINER_LOADEDMETADATA = 'container:loadedmetadata';\n\t/**\n\t * Fired when the time is updated on container\n\t *\n\t * @event CONTAINER_TIMEUPDATE\n\t * @param {Object} progress Data\n\t * progress object\n\t * @param {Number} [progress.current]\n\t * current time\n\t * @param {Number} [progress.total]\n\t * total time\n\t */\n\tEvents.CONTAINER_TIMEUPDATE = 'container:timeupdate';\n\t/**\n\t * Fired when the container is downloading the media\n\t *\n\t * @event CONTAINER_PROGRESS\n\t * @param {Object} progress Data\n\t * progress object\n\t * @param {Number} [progress.start]\n\t * initial downloaded content\n\t * @param {Number} [progress.current]\n\t * current dowloaded content\n\t * @param {Number} [progress.total]\n\t * total content to be downloaded\n\t */\n\tEvents.CONTAINER_PROGRESS = 'container:progress';\n\tEvents.CONTAINER_PLAY = 'container:play';\n\tEvents.CONTAINER_STOP = 'container:stop';\n\tEvents.CONTAINER_PAUSE = 'container:pause';\n\tEvents.CONTAINER_ENDED = 'container:ended';\n\tEvents.CONTAINER_CLICK = 'container:click';\n\tEvents.CONTAINER_DBLCLICK = 'container:dblclick';\n\tEvents.CONTAINER_CONTEXTMENU = 'container:contextmenu';\n\tEvents.CONTAINER_MOUSE_ENTER = 'container:mouseenter';\n\tEvents.CONTAINER_MOUSE_LEAVE = 'container:mouseleave';\n\t/**\n\t * Fired when the container seeks the video\n\t *\n\t * @event CONTAINER_SEEK\n\t * @param {Number} time the current time in seconds\n\t */\n\tEvents.CONTAINER_SEEK = 'container:seek';\n\tEvents.CONTAINER_VOLUME = 'container:volume';\n\tEvents.CONTAINER_FULLSCREEN = 'container:fullscreen';\n\t/**\n\t * Fired when container is buffering\n\t *\n\t * @event CONTAINER_STATE_BUFFERING\n\t */\n\tEvents.CONTAINER_STATE_BUFFERING = 'container:state:buffering';\n\t/**\n\t * Fired when the container filled the buffer\n\t *\n\t * @event CONTAINER_STATE_BUFFERFULL\n\t */\n\tEvents.CONTAINER_STATE_BUFFERFULL = 'container:state:bufferfull';\n\t/**\n\t * Fired when the container changes any settings (volume, seek and etc)\n\t *\n\t * @event CONTAINER_SETTINGSUPDATE\n\t */\n\tEvents.CONTAINER_SETTINGSUPDATE = 'container:settingsupdate';\n\t/**\n\t * Fired when container updates its video quality\n\t *\n\t * @event CONTAINER_HIGHDEFINITIONUPDATE\n\t * @param {Boolean} isHD\n\t * true when is on HD, false otherwise\n\t */\n\tEvents.CONTAINER_HIGHDEFINITIONUPDATE = 'container:highdefinitionupdate';\n\t\n\t/**\n\t * Fired when the media control shows\n\t *\n\t * @event CONTAINER_MEDIACONTROL_SHOW\n\t */\n\tEvents.CONTAINER_MEDIACONTROL_SHOW = 'container:mediacontrol:show';\n\t/**\n\t * Fired when the media control hides\n\t *\n\t * @event CONTAINER_MEDIACONTROL_HIDE\n\t */\n\tEvents.CONTAINER_MEDIACONTROL_HIDE = 'container:mediacontrol:hide';\n\t\n\tEvents.CONTAINER_MEDIACONTROL_DISABLE = 'container:mediacontrol:disable';\n\tEvents.CONTAINER_MEDIACONTROL_ENABLE = 'container:mediacontrol:enable';\n\tEvents.CONTAINER_STATS_ADD = 'container:stats:add';\n\t/**\n\t * Fired when the options were changed for the container\n\t *\n\t * @event CONTAINER_OPTIONS_CHANGE\n\t */\n\tEvents.CONTAINER_OPTIONS_CHANGE = 'container:options:change';\n\t\n\t// MediaControl Events\n\tEvents.MEDIACONTROL_RENDERED = 'mediacontrol:rendered';\n\t/**\n\t * Fired when the player enters/exit on fullscreen\n\t *\n\t * @event MEDIACONTROL_FULLSCREEN\n\t */\n\tEvents.MEDIACONTROL_FULLSCREEN = 'mediacontrol:fullscreen';\n\t/**\n\t * Fired when the media control shows\n\t *\n\t * @event MEDIACONTROL_SHOW\n\t */\n\tEvents.MEDIACONTROL_SHOW = 'mediacontrol:show';\n\t/**\n\t * Fired when the media control hides\n\t *\n\t * @event MEDIACONTROL_HIDE\n\t */\n\tEvents.MEDIACONTROL_HIDE = 'mediacontrol:hide';\n\t/**\n\t * Fired when mouse enters on the seekbar\n\t *\n\t * @event MEDIACONTROL_MOUSEMOVE_SEEKBAR\n\t * @param {Object} event\n\t * the javascript event\n\t */\n\tEvents.MEDIACONTROL_MOUSEMOVE_SEEKBAR = 'mediacontrol:mousemove:seekbar';\n\t/**\n\t * Fired when mouse leaves the seekbar\n\t *\n\t * @event MEDIACONTROL_MOUSELEAVE_SEEKBAR\n\t * @param {Object} event\n\t * the javascript event\n\t */\n\tEvents.MEDIACONTROL_MOUSELEAVE_SEEKBAR = 'mediacontrol:mouseleave:seekbar';\n\t/**\n\t * Fired when the media is being played\n\t *\n\t * @event MEDIACONTROL_PLAYING\n\t */\n\tEvents.MEDIACONTROL_PLAYING = 'mediacontrol:playing';\n\t/**\n\t * Fired when the media is not being played\n\t *\n\t * @event MEDIACONTROL_NOTPLAYING\n\t */\n\tEvents.MEDIACONTROL_NOTPLAYING = 'mediacontrol:notplaying';\n\t/**\n\t * Fired when the container was changed\n\t *\n\t * @event MEDIACONTROL_CONTAINERCHANGED\n\t */\n\tEvents.MEDIACONTROL_CONTAINERCHANGED = 'mediacontrol:containerchanged';\n\t\n\t// Core Events\n\tEvents.CORE_CONTAINERS_CREATED = 'core:containers:created';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 2 */\n/*!***************************!*\\\n !*** ./src/base/utils.js ***!\n \\***************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.cancelAnimationFrame = exports.requestAnimationFrame = exports.QueryString = exports.Config = exports.Fullscreen = undefined;\n\t\n\tvar _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; }; }();\n\t\n\texports.extend = extend;\n\texports.formatTime = formatTime;\n\texports.seekStringToSeconds = seekStringToSeconds;\n\texports.uniqueId = uniqueId;\n\texports.isNumber = isNumber;\n\texports.currentScriptUrl = currentScriptUrl;\n\texports.getBrowserLanguage = getBrowserLanguage;\n\texports.now = now;\n\texports.removeArrayItem = removeArrayItem;\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t/*jshint -W079 */\n\t\n\tfunction assign(obj, source) {\n\t if (source) {\n\t for (var prop in source) {\n\t var propDescriptor = Object.getOwnPropertyDescriptor(source, prop);\n\t propDescriptor ? Object.defineProperty(obj, prop, propDescriptor) : obj[prop] = source[prop];\n\t }\n\t }\n\t return obj;\n\t}\n\t\n\tfunction extend(parent, properties) {\n\t var Surrogate = function (_parent) {\n\t _inherits(Surrogate, _parent);\n\t\n\t function Surrogate() {\n\t _classCallCheck(this, Surrogate);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _this = _possibleConstructorReturn(this, _parent.call.apply(_parent, [this].concat(args)));\n\t\n\t if (properties.initialize) {\n\t properties.initialize.apply(_this, args);\n\t }\n\t return _this;\n\t }\n\t\n\t return Surrogate;\n\t }(parent);\n\t\n\t assign(Surrogate.prototype, properties);\n\t return Surrogate;\n\t}\n\t\n\tfunction formatTime(time, paddedHours) {\n\t if (!isFinite(time)) {\n\t return '--:--';\n\t }\n\t time = time * 1000;\n\t time = parseInt(time / 1000);\n\t var seconds = time % 60;\n\t time = parseInt(time / 60);\n\t var minutes = time % 60;\n\t time = parseInt(time / 60);\n\t var hours = time % 24;\n\t var days = parseInt(time / 24);\n\t var out = '';\n\t if (days && days > 0) {\n\t out += days + ':';\n\t if (hours < 1) {\n\t out += '00:';\n\t }\n\t }\n\t if (hours && hours > 0 || paddedHours) {\n\t out += ('0' + hours).slice(-2) + ':';\n\t }\n\t out += ('0' + minutes).slice(-2) + ':';\n\t out += ('0' + seconds).slice(-2);\n\t return out.trim();\n\t}\n\t\n\tvar Fullscreen = exports.Fullscreen = {\n\t isFullscreen: function isFullscreen() {\n\t return !!(document.webkitFullscreenElement || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement);\n\t },\n\t requestFullscreen: function requestFullscreen(el) {\n\t if (el.requestFullscreen) {\n\t el.requestFullscreen();\n\t } else if (el.webkitRequestFullscreen) {\n\t el.webkitRequestFullscreen();\n\t } else if (el.mozRequestFullScreen) {\n\t el.mozRequestFullScreen();\n\t } else if (el.msRequestFullscreen) {\n\t el.msRequestFullscreen();\n\t } else if (el.querySelector && el.querySelector('video') && el.querySelector('video').webkitEnterFullScreen) {\n\t el.querySelector('video').webkitEnterFullScreen();\n\t }\n\t },\n\t cancelFullscreen: function cancelFullscreen() {\n\t if (document.exitFullscreen) {\n\t document.exitFullscreen();\n\t } else if (document.webkitCancelFullScreen) {\n\t document.webkitCancelFullScreen();\n\t } else if (document.webkitExitFullscreen) {\n\t document.webkitExitFullscreen();\n\t } else if (document.mozCancelFullScreen) {\n\t document.mozCancelFullScreen();\n\t } else if (document.msExitFullscreen) {\n\t document.msExitFullscreen();\n\t }\n\t },\n\t fullscreenEnabled: function fullscreenEnabled() {\n\t return !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);\n\t }\n\t};\n\t\n\tvar Config = exports.Config = function () {\n\t function Config() {\n\t _classCallCheck(this, Config);\n\t }\n\t\n\t Config._defaultConfig = function _defaultConfig() {\n\t return {\n\t volume: {\n\t value: 100,\n\t parse: parseInt\n\t }\n\t };\n\t };\n\t\n\t Config._defaultValueFor = function _defaultValueFor(key) {\n\t try {\n\t return this._defaultConfig()[key].parse(this._defaultConfig()[key].value);\n\t } catch (e) {\n\t return undefined;\n\t }\n\t };\n\t\n\t Config._createKeyspace = function _createKeyspace(key) {\n\t return 'clappr.' + document.domain + '.' + key;\n\t };\n\t\n\t Config.restore = function restore(key) {\n\t if (_browser2.default.hasLocalstorage && localStorage[this._createKeyspace(key)]) {\n\t return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)]);\n\t }\n\t return this._defaultValueFor(key);\n\t };\n\t\n\t Config.persist = function persist(key, value) {\n\t if (_browser2.default.hasLocalstorage) {\n\t try {\n\t localStorage[this._createKeyspace(key)] = value;\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t }\n\t };\n\t\n\t return Config;\n\t}();\n\t\n\tvar QueryString = exports.QueryString = function () {\n\t function QueryString() {\n\t _classCallCheck(this, QueryString);\n\t }\n\t\n\t QueryString.parse = function parse(paramsString) {\n\t var match = void 0;\n\t var pl = /\\+/g,\n\t // Regex for replacing addition symbol with a space\n\t search = /([^&=]+)=?([^&]*)/g,\n\t decode = function decode(s) {\n\t return decodeURIComponent(s.replace(pl, ' '));\n\t },\n\t params = {};\n\t while (match = search.exec(paramsString)) {\n\t // eslint-disable-line no-cond-assign\n\t params[decode(match[1]).toLowerCase()] = decode(match[2]);\n\t }\n\t return params;\n\t };\n\t\n\t _createClass(QueryString, null, [{\n\t key: 'params',\n\t get: function get() {\n\t var query = window.location.search.substring(1);\n\t if (query !== this.query) {\n\t this._urlParams = this.parse(query);\n\t this.query = query;\n\t }\n\t return this._urlParams;\n\t }\n\t }, {\n\t key: 'hashParams',\n\t get: function get() {\n\t var hash = window.location.hash.substring(1);\n\t if (hash !== this.hash) {\n\t this._hashParams = this.parse(hash);\n\t this.hash = hash;\n\t }\n\t return this._hashParams;\n\t }\n\t }]);\n\t\n\t return QueryString;\n\t}();\n\t\n\tfunction seekStringToSeconds() {\n\t var paramName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 't';\n\t\n\t var seconds = 0;\n\t var seekString = QueryString.params[paramName] || QueryString.hashParams[paramName] || '';\n\t var parts = seekString.match(/[0-9]+[hms]+/g) || [];\n\t if (parts.length > 0) {\n\t (function () {\n\t var factor = { 'h': 3600, 'm': 60, 's': 1 };\n\t parts.forEach(function (el) {\n\t if (el) {\n\t var suffix = el[el.length - 1];\n\t var time = parseInt(el.slice(0, el.length - 1), 10);\n\t seconds += time * factor[suffix];\n\t }\n\t });\n\t })();\n\t } else if (seekString) {\n\t seconds = parseInt(seekString, 10);\n\t }\n\t return seconds;\n\t}\n\t\n\tvar idsCounter = {};\n\t\n\tfunction uniqueId(prefix) {\n\t idsCounter[prefix] || (idsCounter[prefix] = 0);\n\t var id = ++idsCounter[prefix];\n\t return prefix + id;\n\t}\n\t\n\tfunction isNumber(value) {\n\t return value - parseFloat(value) + 1 >= 0;\n\t}\n\t\n\tfunction currentScriptUrl() {\n\t var scripts = document.getElementsByTagName('script');\n\t return scripts.length ? scripts[scripts.length - 1].src : '';\n\t}\n\t\n\tvar requestAnimationFrame = exports.requestAnimationFrame = (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {\n\t window.setTimeout(fn, 1000 / 60);\n\t}).bind(window);\n\t\n\tvar cancelAnimationFrame = exports.cancelAnimationFrame = (window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout).bind(window);\n\t\n\tfunction getBrowserLanguage() {\n\t return window.navigator && window.navigator.language;\n\t}\n\t\n\tfunction now() {\n\t if (window.performance && window.performance.now) {\n\t return performance.now();\n\t }\n\t return Date.now();\n\t}\n\t\n\t// remove the item from the array if it exists in the array\n\tfunction removeArrayItem(arr, item) {\n\t var i = arr.indexOf(item);\n\t if (i >= 0) {\n\t arr.splice(i, 1);\n\t }\n\t}\n\t\n\texports.default = {\n\t Config: Config,\n\t Fullscreen: Fullscreen,\n\t QueryString: QueryString,\n\t extend: extend,\n\t formatTime: formatTime,\n\t seekStringToSeconds: seekStringToSeconds,\n\t uniqueId: uniqueId,\n\t currentScriptUrl: currentScriptUrl,\n\t isNumber: isNumber,\n\t requestAnimationFrame: requestAnimationFrame,\n\t cancelAnimationFrame: cancelAnimationFrame,\n\t getBrowserLanguage: getBrowserLanguage,\n\t now: now,\n\t removeArrayItem: removeArrayItem\n\t};\n\n/***/ },\n/* 3 */\n/*!******************************!*\\\n !*** ./src/base/playback.js ***!\n \\******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _ui_object = __webpack_require__(/*! ./ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t/**\n\t * An abstraction to represent a generic playback, it's like an interface to be implemented by subclasses.\n\t * @class Playback\n\t * @constructor\n\t * @extends UIObject\n\t * @module base\n\t */\n\tvar Playback = function (_UIObject) {\n\t _inherits(Playback, _UIObject);\n\t\n\t _createClass(Playback, [{\n\t key: 'isAudioOnly',\n\t\n\t /**\n\t * Determine if the playback does not contain video/has video but video should be ignored.\n\t * @property isAudioOnly\n\t * @type Boolean\n\t */\n\t get: function get() {\n\t return false;\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return false;\n\t }\n\t\n\t /**\n\t * The internationalization plugin.\n\t * @property i18n\n\t * @type {Strings}\n\t */\n\t\n\t }, {\n\t key: 'i18n',\n\t get: function get() {\n\t return this._i18n;\n\t }\n\t\n\t /**\n\t * Determine if the playback is having to buffer in order for\n\t * playback to be smooth.\n\t * (i.e if a live stream is playing smoothly, this will be false)\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return false;\n\t }\n\t\n\t /**\n\t * @method constructor\n\t * @param {Object} options the options object\n\t * @param {Strings} i18n the internationalization component\n\t */\n\t\n\t }]);\n\t\n\t function Playback(options, i18n) {\n\t _classCallCheck(this, Playback);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));\n\t\n\t _this.settings = {};\n\t _this._i18n = i18n;\n\t return _this;\n\t }\n\t\n\t /**\n\t * plays the playback.\n\t * @method play\n\t */\n\t\n\t\n\t Playback.prototype.play = function play() {};\n\t\n\t /**\n\t * pauses the playback.\n\t * @method pause\n\t */\n\t\n\t\n\t Playback.prototype.pause = function pause() {};\n\t\n\t /**\n\t * stops the playback.\n\t * @method stop\n\t */\n\t\n\t\n\t Playback.prototype.stop = function stop() {};\n\t\n\t /**\n\t * seeks the playback to a given `time` in seconds\n\t * @method seek\n\t * @param {Number} time should be a number between 0 and the video duration\n\t */\n\t\n\t\n\t Playback.prototype.seek = function seek(time) {}; // eslint-disable-line no-unused-vars\n\t\n\t /**\n\t * seeks the playback to a given `percentage` in percentage\n\t * @method seekPercentage\n\t * @param {Number} time should be a number between 0 and 100\n\t */\n\t\n\t\n\t Playback.prototype.seekPercentage = function seekPercentage(percentage) {}; // eslint-disable-line no-unused-vars\n\t\n\t\n\t /**\n\t * The time that \"0\" now represents relative to when playback started.\n\t * For a stream with a sliding window this will increase as content is\n\t * removed from the beginning.\n\t * @method getStartTimeOffset\n\t * @return {Number} time (in seconds) that time \"0\" represents.\n\t */\n\t\n\t\n\t Playback.prototype.getStartTimeOffset = function getStartTimeOffset() {\n\t return 0;\n\t };\n\t\n\t /**\n\t * gets the duration in seconds\n\t * @method getDuration\n\t * @return {Number} duration (in seconds) of the current source\n\t */\n\t\n\t\n\t Playback.prototype.getDuration = function getDuration() {\n\t return 0;\n\t };\n\t\n\t /**\n\t * checks if the playback is playing.\n\t * @method isPlaying\n\t * @return {Boolean} `true` if the current playback is playing, otherwise `false`\n\t */\n\t\n\t\n\t Playback.prototype.isPlaying = function isPlaying() {\n\t return false;\n\t };\n\t\n\t /**\n\t * checks if the playback is ready.\n\t * @property isReady\n\t * @type {Boolean} `true` if the current playback is ready, otherwise `false`\n\t */\n\t\n\t\n\t /**\n\t * gets the playback type (`'vod', 'live', 'aod'`)\n\t * @method getPlaybackType\n\t * @return {String} you should write the playback type otherwise it'll assume `'no_op'`\n\t * @example\n\t * ```javascript\n\t * html5VideoPlayback.getPlaybackType() //vod\n\t * html5AudioPlayback.getPlaybackType() //aod\n\t * html5VideoPlayback.getPlaybackType() //live\n\t * flashHlsPlayback.getPlaybackType() //live\n\t * ```\n\t */\n\t Playback.prototype.getPlaybackType = function getPlaybackType() {\n\t return Playback.NO_OP;\n\t };\n\t\n\t /**\n\t * checks if the playback is in HD.\n\t * @method isHighDefinitionInUse\n\t * @return {Boolean} `true` if the playback is playing in HD, otherwise `false`\n\t */\n\t\n\t\n\t Playback.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n\t return false;\n\t };\n\t\n\t /**\n\t * sets the volume for the playback\n\t * @method volume\n\t * @param {Number} value a number between 0 (`muted`) to 100 (`max`)\n\t */\n\t\n\t\n\t Playback.prototype.volume = function volume(value) {}; // eslint-disable-line no-unused-vars\n\t\n\t /**\n\t * destroys the playback, removing it from DOM\n\t * @method destroy\n\t */\n\t\n\t\n\t Playback.prototype.destroy = function destroy() {\n\t this.$el.remove();\n\t };\n\t\n\t _createClass(Playback, [{\n\t key: 'isReady',\n\t get: function get() {\n\t return false;\n\t }\n\t }]);\n\t\n\t return Playback;\n\t}(_ui_object2.default);\n\t\n\texports.default = Playback;\n\t\n\t\n\tPlayback.extend = function (properties) {\n\t return (0, _utils.extend)(Playback, properties);\n\t};\n\t\n\t/**\n\t * checks if the playback can play a given `source`\n\t * If a mimeType is provided then this will be used instead of inferring the mimetype\n\t * from the source extension.\n\t * @method canPlay\n\t * @static\n\t * @param {String} source the given source ex: `http://example.com/play.mp4`\n\t * @param {String} [mimeType] the given mime type, ex: `'application/vnd.apple.mpegurl'`\n\t * @return {Boolean} `true` if the playback is playable, otherwise `false`\n\t */\n\tPlayback.canPlay = function (source, mimeType) {\n\t // eslint-disable-line no-unused-vars\n\t return false;\n\t};\n\t\n\t/**\n\t * a playback type for video on demand\n\t *\n\t * @property VOD\n\t * @static\n\t * @type String\n\t */\n\tPlayback.VOD = 'vod';\n\t/**\n\t * a playback type for audio on demand\n\t *\n\t * @property AOD\n\t * @static\n\t * @type String\n\t */\n\tPlayback.AOD = 'aod';\n\t/**\n\t * a playback type for live video\n\t *\n\t * @property LIVE\n\t * @static\n\t * @type String\n\t */\n\tPlayback.LIVE = 'live';\n\t/**\n\t * a default playback type\n\t *\n\t * @property NO_OP\n\t * @static\n\t * @type String\n\t */\n\tPlayback.NO_OP = 'no_op';\n\t/**\n\t * the plugin type\n\t *\n\t * @property type\n\t * @static\n\t * @type String\n\t */\n\tPlayback.type = 'playback';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 4 */\n/*!****************************!*\\\n !*** ./src/base/styler.js ***!\n \\****************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _template = __webpack_require__(/*! ./template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t// Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar Styler = {\n\t getStyleFor: function getStyleFor(style) {\n\t var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { baseUrl: '' };\n\t\n\t return (0, _clapprZepto2.default)('<style class=\"clappr-style\"></style>').html((0, _template2.default)(style.toString())(options));\n\t }\n\t};\n\t\n\texports.default = Styler;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 5 */\n/*!*************************************!*\\\n !*** ./~/clappr-zepto/zepto.min.js ***!\n \\*************************************/\n/***/ function(module, exports) {\n\n\t/* Zepto v1.1.4-80-ga9184b2 - zepto event ajax callbacks deferred touch selector ie - zeptojs.com/license */\n\tvar Zepto=function(){function D(t){return null==t?String(t):j[S.call(t)]||\"object\"}function L(t){return\"function\"==D(t)}function k(t){return null!=t&&t==t.window}function Z(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return\"object\"==D(t)}function F(t){return $(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return\"number\"==typeof t.length}function q(t){return s.call(t,function(t){return null!=t})}function W(t){return t.length>0?n.fn.concat.apply([],t):t}function z(t){return t.replace(/::/g,\"/\").replace(/([A-Z]+)([A-Z][a-z])/g,\"$1_$2\").replace(/([a-z\\d])([A-Z])/g,\"$1_$2\").replace(/_/g,\"-\").toLowerCase()}function H(t){return t in c?c[t]:c[t]=new RegExp(\"(^|\\\\s)\"+t+\"(\\\\s|$)\")}function _(t,e){return\"number\"!=typeof e||l[z(t)]?e:e+\"px\"}function I(t){var e,n;return f[t]||(e=u.createElement(t),u.body.appendChild(e),n=getComputedStyle(e,\"\").getPropertyValue(\"display\"),e.parentNode.removeChild(e),\"none\"==n&&(n=\"block\"),f[t]=n),f[t]}function U(t){return\"children\"in t?a.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||\"\"}function B(n,i,r){for(e in i)r&&(F(i[e])||A(i[e]))?(F(i[e])&&!F(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),B(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function V(t,e){return null==e?n(t):n(t).filter(e)}function Y(t,e,n,i){return L(e)?e.call(t,n,i):e}function J(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function G(e,n){var i=e.className||\"\",r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function K(t){try{return t?\"true\"==t||(\"false\"==t?!1:\"null\"==t?null:+t+\"\"==t?+t:/^[\\[\\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function Q(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)Q(t.childNodes[n],e)}var t,e,n,i,N,P,r=[],o=r.concat,s=r.filter,a=r.slice,u=window.document,f={},c={},l={\"column-count\":1,columns:1,\"font-weight\":1,\"line-height\":1,opacity:1,\"z-index\":1,zoom:1},h=/^\\s*<(\\w+|!)[^>]*>/,p=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,d=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,m=/^(?:body|html)$/i,g=/([A-Z])/g,v=[\"val\",\"css\",\"html\",\"text\",\"data\",\"width\",\"height\",\"offset\"],y=[\"after\",\"prepend\",\"before\",\"append\"],w=u.createElement(\"table\"),x=u.createElement(\"tr\"),b={tr:u.createElement(\"tbody\"),tbody:w,thead:w,tfoot:w,td:x,th:x,\"*\":u.createElement(\"div\")},E=/complete|loaded|interactive/,T=/^[\\w-]*$/,j={},S=j.toString,C={},O=u.createElement(\"div\"),M={tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},A=Array.isArray||function(t){return t instanceof Array};return C.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~C.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},N=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():\"\"})},P=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},C.fragment=function(e,i,r){var o,s,f;return p.test(e)&&(o=n(u.createElement(RegExp.$1))),o||(e.replace&&(e=e.replace(d,\"<$1></$2>\")),i===t&&(i=h.test(e)&&RegExp.$1),i in b||(i=\"*\"),f=b[i],f.innerHTML=\"\"+e,o=n.each(a.call(f.childNodes),function(){f.removeChild(this)})),F(r)&&(s=n(o),n.each(r,function(t,e){v.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},C.Z=function(t,e){return new X(t,e)},C.isZ=function(t){return t instanceof C.Z},C.init=function(e,i){var r;if(!e)return C.Z();if(\"string\"==typeof e)if(e=e.trim(),\"<\"==e[0]&&h.test(e))r=C.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}else{if(L(e))return n(u).ready(e);if(C.isZ(e))return e;if(A(e))r=q(e);else if($(e))r=[e],e=null;else if(h.test(e))r=C.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}}return C.Z(r,e)},n=function(t,e){return C.init(t,e)},n.extend=function(t){var e,n=a.call(arguments,1);return\"boolean\"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){B(t,n,e)}),t},C.qsa=function(t,e){var n,i=\"#\"==e[0],r=!i&&\".\"==e[0],o=i||r?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:a.call(s&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=u.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=D,n.isFunction=L,n.isWindow=k,n.isArray=A,n.isPlainObject=F,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=N,n.trim=function(t){return null==t?\"\":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var n,r,o,i=[];if(R(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&i.push(n);else for(o in t)n=e(t[o],o),null!=n&&i.push(n);return W(i)},n.each=function(t,e){var n,i;if(R(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},n.grep=function(t,e){return s.call(t,e)},window.JSON&&(n.parseJSON=JSON.parse),n.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(t,e){j[\"[object \"+e+\"]\"]=e.toLowerCase()}),n.fn={constructor:C.Z,length:0,forEach:r.forEach,reduce:r.reduce,push:r.push,sort:r.sort,splice:r.splice,indexOf:r.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=C.isZ(e)?e.toArray():e;return o.apply(C.isZ(this)?this.toArray():this,n)},map:function(t){return n(n.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return n(a.apply(this,arguments))},ready:function(t){return E.test(u.readyState)&&u.body?t(n):u.addEventListener(\"DOMContentLoaded\",function(){t(n)},!1),this},get:function(e){return e===t?a.call(this):this[e>=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return L(t)?this.not(this.not(t)):n(s.call(this,function(e){return C.matches(e,t)}))},add:function(t,e){return n(P(this.concat(n(t,e))))},is:function(t){return this.length>0&&C.matches(this[0],t)},not:function(e){var i=[];if(L(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r=\"string\"==typeof e?this.filter(e):R(e)&&L(e.item)?a.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return $(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:n(t)},find:function(t){var e,i=this;return e=t?\"object\"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(C.qsa(this[0],t)):this.map(function(){return C.qsa(this,t)}):n()},closest:function(t,e){var i=this[0],r=!1;for(\"object\"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:C.matches(i,t));)i=i!==e&&!Z(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!Z(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return V(e,t)},parent:function(t){return V(P(this.pluck(\"parentNode\")),t)},children:function(t){return V(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||a.call(this.childNodes)})},siblings:function(t){return V(this.map(function(t,e){return s.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=\"\"})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){\"none\"==this.style.display&&(this.style.display=\"\"),\"none\"==getComputedStyle(this,\"\").getPropertyValue(\"display\")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=L(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=L(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css(\"display\",\"none\")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?\"none\"==i.css(\"display\"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck(\"previousElementSibling\")).filter(t||\"*\")},next:function(t){return n(this.pluck(\"nextElementSibling\")).filter(t||\"*\")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;n(this).empty().append(Y(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?\"\":\"\"+n}):0 in this?this[0].textContent:null},attr:function(n,i){var r;return\"string\"!=typeof n||1 in arguments?this.each(function(t){if(1===this.nodeType)if($(n))for(e in n)J(this,e,n[e]);else J(this,n,Y(this,i,t,this.getAttribute(n)))}):this.length&&1===this[0].nodeType?!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:t},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(\" \").forEach(function(t){J(this,t)},this)})},prop:function(t,e){return t=M[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(e,n){var i=\"data-\"+e.replace(g,\"-$1\").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?K(r):t},val:function(t){return 0 in arguments?this.each(function(e){this.value=Y(this,t,e,this.value)}):this[0]&&(this[0].multiple?n(this[0]).find(\"option\").filter(function(){return this.selected}).pluck(\"value\"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=Y(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};\"static\"==i.css(\"position\")&&(s.position=\"relative\"),i.css(s)});if(!this.length)return null;if(!n.contains(u.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,\"\"),\"string\"==typeof t)return o.style[N(t)]||r.getPropertyValue(t);if(A(t)){var s={};return n.each(t,function(t,e){s[e]=o.style[N(e)]||r.getPropertyValue(e)}),s}}var a=\"\";if(\"string\"==D(t))i||0===i?a=z(t)+\":\"+_(t,i):this.each(function(){this.style.removeProperty(z(t))});else for(e in t)t[e]||0===t[e]?a+=z(e)+\":\"+_(e,t[e])+\";\":this.each(function(){this.style.removeProperty(z(e))});return this.each(function(){this.style.cssText+=\";\"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(G(t))},H(t)):!1},addClass:function(t){return t?this.each(function(e){if(\"className\"in this){i=[];var r=G(this),o=Y(this,t,e,r);o.split(/\\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&G(this,r+(r?\" \":\"\")+i.join(\" \"))}}):this},removeClass:function(e){return this.each(function(n){if(\"className\"in this){if(e===t)return G(this,\"\");i=G(this),Y(this,e,n,i).split(/\\s+/g).forEach(function(t){i=i.replace(H(t),\" \")}),G(this,i.trim())}})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=Y(this,e,r,G(this));s.split(/\\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n=\"scrollTop\"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n=\"scrollLeft\"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=m.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css(\"margin-top\"))||0,i.left-=parseFloat(n(t).css(\"margin-left\"))||0,r.top+=parseFloat(n(e[0]).css(\"border-top-width\"))||0,r.left+=parseFloat(n(e[0]).css(\"border-left-width\"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||u.body;t&&!m.test(t.nodeName)&&\"static\"==n(t).css(\"position\");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,[\"width\",\"height\"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?k(s)?s[\"inner\"+i]:Z(s)?s.documentElement[\"scroll\"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,Y(this,r,t,s[e]()))})}}),y.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=D(e),\"object\"==t||\"array\"==t||null==e?e:C.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,a){o=i?a:a.parentNode,a=0==e?a.nextSibling:1==e?a.firstChild:2==e?a:null;var f=n.contains(u.documentElement,o);r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,a),f&&Q(t,function(t){null==t.nodeName||\"SCRIPT\"!==t.nodeName.toUpperCase()||t.type&&\"text/javascript\"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+\"To\":\"insert\"+(e?\"Before\":\"After\")]=function(e){return n(e)[t](this),this}}),C.Z.prototype=X.prototype=n.fn,C.uniq=P,C.deserializeValue=K,n.zepto=C,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(\"\"+t).split(\".\");return{e:e[0],ns:e.slice(1).sort().join(\" \")}}function d(t){return new RegExp(\"(?:^| )\"+t.replace(\" \",\" .* ?\")+\"(?: |$)\")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\\s/).forEach(function(i){if(\"ready\"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=T(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),\"addEventListener\"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||\"\").split(/\\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],\"removeEventListener\"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function T(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=w,r&&r.apply(i,arguments)},e[n]=x}),(i.defaultPrevented!==n?i.defaultPrevented:\"returnValue\"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function j(t){var e,i={originalEvent:t};for(e in t)b.test(e)||t[e]===n||(i[e]=t[e]);return T(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return\"string\"==typeof t},s={},a={},u=\"onfocusin\"in window,f={focus:\"focusin\",blur:\"focusout\"},c={mouseenter:\"mouseover\",mouseleave:\"mouseout\"};a.click=a.mousedown=a.mouseup=a.mousemove=\"MouseEvents\",t.event={add:v,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=l(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError(\"expected function\")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var w=function(){return!0},x=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:\"isDefaultPrevented\",stopImmediatePropagation:\"isImmediatePropagationStopped\",stopPropagation:\"isPropagationStopped\"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(u===n||a===!1)&&(u=a,a=n),u===!1&&(u=x),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(j(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=x),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):T(e),e._args=n,this.each(function(){e.type in f&&\"function\"==typeof this[e.type]?this[e.type]():\"dispatchEvent\"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=j(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},\"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error\".split(\" \").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||\"Events\"),i=!0;if(e)for(var r in e)\"bubbles\"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),T(n)}}(Zepto),function(t){function h(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function p(t,e,i,r){return t.global?h(e||n,i,r):void 0}function d(e){e.global&&0===t.active++&&p(e,null,\"ajaxStart\")}function m(e){e.global&&!--t.active&&p(e,null,\"ajaxStop\")}function g(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||p(e,n,\"ajaxBeforeSend\",[t,e])===!1?!1:void p(e,n,\"ajaxSend\",[t,e])}function v(t,e,n,i){var r=n.context,o=\"success\";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),p(n,r,\"ajaxSuccess\",[e,n,t]),w(o,e,n)}function y(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),p(i,o,\"ajaxError\",[n,i,t||e]),w(e,n,i)}function w(t,e,n){var i=n.context;n.complete.call(i,e,t),p(n,i,\"ajaxComplete\",[e,n]),m(n)}function x(){}function b(t){return t&&(t=t.split(\";\",2)[0]),t&&(t==f?\"html\":t==u?\"json\":s.test(t)?\"script\":a.test(t)&&\"xml\")||\"text\"}function E(t,e){return\"\"==e?t:(t+\"&\"+e).replace(/[&?]{1,2}/,\"?\")}function T(e){e.processData&&e.data&&\"string\"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&\"GET\"!=e.type.toUpperCase()||(e.url=E(e.url,e.data),e.data=void 0)}function j(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function C(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+\"[\"+(a||\"object\"==o||\"array\"==o?n:\"\")+\"]\"),!r&&s?e.add(u.name,u.value):\"array\"==o||!i&&\"object\"==o?C(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,s=/^(?:text|application)\\/javascript/i,a=/^(?:text|application)\\/xml/i,u=\"application/json\",f=\"text/html\",c=/^\\s*$/,l=n.createElement(\"a\");l.href=window.location.href,t.active=0,t.ajaxJSONP=function(i,r){if(!(\"type\"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||\"jsonp\"+ ++e,a=n.createElement(\"script\"),u=window[s],c=function(e){t(a).triggerHandler(\"error\",e||\"abort\")},l={abort:c};return r&&r.promise(l),t(a).on(\"load error\",function(e,n){clearTimeout(h),t(a).off().remove(),\"error\"!=e.type&&f?v(f[0],l,i,r):y(null,n||\"error\",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),g(l,i)===!1?(c(\"abort\"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\\?(.+)=\\?/,\"?$1=\"+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c(\"timeout\")},i.timeout)),l)},t.ajaxSettings={type:\"GET\",beforeSend:x,success:x,error:x,complete:x,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:\"text/javascript, application/javascript, application/x-javascript\",json:u,xml:\"application/xml, text/xml\",html:f,text:\"text/plain\"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var a,u,o=t.extend({},e||{}),s=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===o[i]&&(o[i]=t.ajaxSettings[i]);d(o),o.crossDomain||(a=n.createElement(\"a\"),a.href=o.url,a.href=a.href,o.crossDomain=l.protocol+\"//\"+l.host!=a.protocol+\"//\"+a.host),o.url||(o.url=window.location.toString()),(u=o.url.indexOf(\"#\"))>-1&&(o.url=o.url.slice(0,u)),T(o);var f=o.dataType,h=/\\?.+=\\?/.test(o.url);if(h&&(f=\"jsonp\"),o.cache!==!1&&(e&&e.cache===!0||\"script\"!=f&&\"jsonp\"!=f)||(o.url=E(o.url,\"_=\"+Date.now())),\"jsonp\"==f)return h||(o.url=E(o.url,o.jsonp?o.jsonp+\"=?\":o.jsonp===!1?\"\":\"callback=?\")),t.ajaxJSONP(o,s);var N,p=o.accepts[f],m={},w=function(t,e){m[t.toLowerCase()]=[t,e]},j=/^([\\w-]+:)\\/\\//.test(o.url)?RegExp.$1:window.location.protocol,S=o.xhr(),C=S.setRequestHeader;if(s&&s.promise(S),o.crossDomain||w(\"X-Requested-With\",\"XMLHttpRequest\"),w(\"Accept\",p||\"*/*\"),(p=o.mimeType||p)&&(p.indexOf(\",\")>-1&&(p=p.split(\",\",2)[0]),S.overrideMimeType&&S.overrideMimeType(p)),(o.contentType||o.contentType!==!1&&o.data&&\"GET\"!=o.type.toUpperCase())&&w(\"Content-Type\",o.contentType||\"application/x-www-form-urlencoded\"),o.headers)for(r in o.headers)w(r,o.headers[r]);if(S.setRequestHeader=w,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=x,clearTimeout(N);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&\"file:\"==j){f=f||b(o.mimeType||S.getResponseHeader(\"content-type\")),e=S.responseText;try{\"script\"==f?(1,eval)(e):\"xml\"==f?e=S.responseXML:\"json\"==f&&(e=c.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?y(n,\"parsererror\",S,o,s):v(e,S,o,s)}else y(S.statusText||null,S.status?\"error\":\"abort\",S,o,s)}},g(S,o)===!1)return S.abort(),y(null,\"abort\",S,o,s),S;if(o.xhrFields)for(r in o.xhrFields)S[r]=o.xhrFields[r];var P=\"async\"in o?o.async:!0;S.open(o.type,o.url,P,o.username,o.password);for(r in m)C.apply(S,m[r]);return o.timeout>0&&(N=setTimeout(function(){S.onreadystatechange=x,S.abort(),y(null,\"timeout\",S,o,s)},o.timeout)),S.send(o.data?o.data:null),S},t.get=function(){return t.ajax(j.apply(null,arguments))},t.post=function(){var e=j.apply(null,arguments);return e.type=\"POST\",t.ajax(e)},t.getJSON=function(){var e=j.apply(null,arguments);return e.dataType=\"json\",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\\s/),u=j(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t(\"<div>\").html(e.replace(o,\"\")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var S=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=\"\"),this.push(S(e)+\"=\"+S(n))},C(i,e,n),i.join(\"&\").replace(/%20/g,\"+\")}}(Zepto),function(t){t.Callbacks=function(e){e=t.extend({},e);var n,i,r,o,s,a,u=[],f=!e.once&&[],c=function(t){for(n=e.memory&&t,i=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;++a)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}r=!1,u&&(f?f.length&&c(f.shift()):n?u.length=0:l.disable())},l={add:function(){if(u){var i=u.length,a=function(n){t.each(n,function(t,n){\"function\"==typeof n?e.unique&&l.has(n)||u.push(n):n&&n.length&&\"string\"!=typeof n&&a(n)})};a(arguments),r?s=u.length:n&&(o=i,c(n))}return this},remove:function(){return u&&t.each(arguments,function(e,n){for(var i;(i=t.inArray(n,u,i))>-1;)u.splice(i,1),r&&(s>=i&&--s,a>=i&&--a)}),this},has:function(e){return!(!u||!(e?t.inArray(e,u)>-1:u.length))},empty:function(){return s=u.length=0,this},disable:function(){return u=f=n=void 0,this},disabled:function(){return!u},lock:function(){return f=void 0,n||l.disable(),this},locked:function(){return!f},fireWith:function(t,e){return!u||i&&!f||(e=e||[],e=[t,e.slice?e.slice():e],r?f.push(e):c(e)),this},fire:function(){return l.fireWith(this,arguments)},fired:function(){return!!i}};return l}}(Zepto),function(t){function n(e){var i=[[\"resolve\",\"done\",t.Callbacks({once:1,memory:1}),\"resolved\"],[\"reject\",\"fail\",t.Callbacks({once:1,memory:1}),\"rejected\"],[\"notify\",\"progress\",t.Callbacks({memory:1})]],r=\"pending\",o={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n(function(n){t.each(i,function(i,r){var a=t.isFunction(e[i])&&e[i];s[r[1]](function(){var e=a&&a.apply(this,arguments);if(e&&t.isFunction(e.promise))e.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var i=this===o?n.promise():this,s=a?[e]:arguments;n[r[0]+\"With\"](i,s)}})}),e=null}).promise()},promise:function(e){return null!=e?t.extend(e,o):o}},s={};return t.each(i,function(t,e){var n=e[2],a=e[3];o[e[1]]=n.add,a&&n.add(function(){r=a},i[1^t][2].disable,i[2][2].lock),s[e[0]]=function(){return s[e[0]+\"With\"](this===s?o:this,arguments),this},s[e[0]+\"With\"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s}var e=Array.prototype.slice;t.when=function(i){var f,c,l,r=e.call(arguments),o=r.length,s=0,a=1!==o||i&&t.isFunction(i.promise)?o:0,u=1===a?i:n(),h=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?e.call(arguments):r,i===f?u.notifyWith(n,i):--a||u.resolveWith(n,i)}};if(o>1)for(f=new Array(o),c=new Array(o),l=new Array(o);o>s;++s)r[s]&&t.isFunction(r[s].promise)?r[s].promise().done(h(s,l,r)).fail(u.reject).progress(h(s,c,f)):--a;return a||u.resolveWith(l,r),u.promise()},t.Deferred=n}(Zepto),function(t){function u(t,e,n,i){return Math.abs(t-e)>=Math.abs(n-i)?t-e>0?\"Left\":\"Right\":n-i>0?\"Up\":\"Down\"}function f(){o=null,e.last&&(e.el.trigger(\"longTap\"),e={})}function c(){o&&clearTimeout(o),o=null}function l(){n&&clearTimeout(n),i&&clearTimeout(i),r&&clearTimeout(r),o&&clearTimeout(o),n=i=r=o=null,e={}}function h(t){return(\"touch\"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function p(t,e){return t.type==\"pointer\"+e||t.type.toLowerCase()==\"mspointer\"+e}var n,i,r,o,a,e={},s=750;t(document).ready(function(){var d,m,y,w,g=0,v=0;\"MSGesture\"in window&&(a=new MSGesture,a.target=document.body),t(document).bind(\"MSGestureEnd\",function(t){var n=t.velocityX>1?\"Right\":t.velocityX<-1?\"Left\":t.velocityY>1?\"Down\":t.velocityY<-1?\"Up\":null;n&&(e.el.trigger(\"swipe\"),e.el.trigger(\"swipe\"+n))}).on(\"touchstart MSPointerDown pointerdown\",function(i){(!(w=p(i,\"down\"))||h(i))&&(y=w?i:i.touches[0],i.touches&&1===i.touches.length&&e.x2&&(e.x2=void 0,e.y2=void 0),d=Date.now(),m=d-(e.last||d),e.el=t(\"tagName\"in y.target?y.target:y.target.parentNode),n&&clearTimeout(n),e.x1=y.pageX,e.y1=y.pageY,m>0&&250>=m&&(e.isDoubleTap=!0),e.last=d,o=setTimeout(f,s),a&&w&&a.addPointer(i.pointerId))}).on(\"touchmove MSPointerMove pointermove\",function(t){(!(w=p(t,\"move\"))||h(t))&&(y=w?t:t.touches[0],c(),e.x2=y.pageX,e.y2=y.pageY,g+=Math.abs(e.x1-e.x2),v+=Math.abs(e.y1-e.y2))}).on(\"touchend MSPointerUp pointerup\",function(o){(!(w=p(o,\"up\"))||h(o))&&(c(),e.x2&&Math.abs(e.x1-e.x2)>30||e.y2&&Math.abs(e.y1-e.y2)>30?r=setTimeout(function(){e.el.trigger(\"swipe\"),e.el.trigger(\"swipe\"+u(e.x1,e.x2,e.y1,e.y2)),e={}},0):\"last\"in e&&(30>g&&30>v?i=setTimeout(function(){var i=t.Event(\"tap\");i.cancelTouch=l,e.el.trigger(i),e.isDoubleTap?(e.el&&e.el.trigger(\"doubleTap\"),e={}):n=setTimeout(function(){n=null,e.el&&e.el.trigger(\"singleTap\"),e={}},250)},0):e={}),g=v=0)}).on(\"touchcancel MSPointerCancel pointercancel\",l),t(window).on(\"scroll\",l)}),[\"swipe\",\"swipeLeft\",\"swipeRight\",\"swipeUp\",\"swipeDown\",\"doubleTap\",\"tap\",\"singleTap\",\"longTap\"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(Zepto),function(t){function r(e){return e=t(e),!(!e.width()&&!e.height())&&\"none\"!==e.css(\"display\")}function f(t,e){t=t.replace(/=#\\]/g,'=\"#\"]');var n,i,r=s.exec(t);if(r&&r[2]in o&&(n=o[r[2]],i=r[3],t=r[1],i)){var a=Number(i);i=isNaN(a)?i.replace(/^[\"']|[\"']$/g,\"\"):a}return e(t,n,i)}var e=t.zepto,n=e.qsa,i=e.matches,o=t.expr[\":\"]={visible:function(){return r(this)?this:void 0},hidden:function(){return r(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,i){return t(this).text().indexOf(i)>-1?this:void 0},has:function(t,n,i){return e.qsa(this,i).length?this:void 0}},s=new RegExp(\"(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*\"),a=/^\\s*>/,u=\"Zepto\"+ +new Date;e.qsa=function(i,r){return f(r,function(o,s,f){try{var c;!o&&s?o=\"*\":a.test(o)&&(c=t(i).addClass(u),o=\".\"+u+\" \"+o);var l=n(i,o)}catch(h){throw console.error(\"error performing selector: %o\",r),h}finally{c&&c.removeClass(u)}return s?e.uniq(t.map(l,function(t,e){return s.call(t,e,l,f)})):l})},e.matches=function(t,e){return f(e,function(e,n,r){return!(e&&!i(t,e)||n&&n.call(t,null,r)!==t)})}}(Zepto),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(n){return null}}}}();\n\tmodule.exports = Zepto;\n\n\n/***/ },\n/* 6 */\n/*!******************************!*\\\n !*** ./src/base/template.js ***!\n \\******************************/\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\t/* eslint-disable no-var */\n\t// Simple JavaScript Templating\n\t// Paul Miller (http://paulmillr.com)\n\t// http://underscorejs.org\n\t// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t\n\t// By default, Underscore uses ERB-style template delimiters, change the\n\t// following template settings to use alternative delimiters.\n\tvar settings = {\n\t evaluate: /<%([\\s\\S]+?)%>/g,\n\t interpolate: /<%=([\\s\\S]+?)%>/g,\n\t escape: /<%-([\\s\\S]+?)%>/g\n\t};\n\t\n\t// When customizing `templateSettings`, if you don't want to define an\n\t// interpolation, evaluation or escaping regex, we need one that is\n\t// guaranteed not to match.\n\tvar noMatch = /(.)^/;\n\t\n\t// Certain characters need to be escaped so that they can be put into a\n\t// string literal.\n\tvar escapes = {\n\t '\\'': '\\'',\n\t '\\\\': '\\\\',\n\t '\\r': 'r',\n\t '\\n': 'n',\n\t '\\t': 't',\n\t '\\u2028': 'u2028',\n\t '\\u2029': 'u2029'\n\t};\n\t\n\tvar escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g;\n\t\n\t// List of HTML entities for escaping.\n\tvar htmlEntities = {\n\t '&': '&amp;',\n\t '<': '&lt;',\n\t '>': '&gt;',\n\t '\"': '&quot;',\n\t '\\'': '&#x27;'\n\t};\n\t\n\tvar entityRe = new RegExp('[&<>\"\\']', 'g');\n\t\n\tvar escapeExpr = function escapeExpr(string) {\n\t if (string === null) {\n\t return '';\n\t }\n\t return ('' + string).replace(entityRe, function (match) {\n\t return htmlEntities[match];\n\t });\n\t};\n\t\n\tvar counter = 0;\n\t\n\t// JavaScript micro-templating, similar to John Resig's implementation.\n\t// Underscore templating handles arbitrary delimiters, preserves whitespace,\n\t// and correctly escapes quotes within interpolated code.\n\tvar tmpl = function tmpl(text, data) {\n\t var render;\n\t\n\t // Combine delimiters into one regular expression via alternation.\n\t var matcher = new RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g');\n\t\n\t // Compile the template source, escaping string literals appropriately.\n\t var index = 0;\n\t var source = '__p+=\\'';\n\t text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {\n\t source += text.slice(index, offset).replace(escaper, function (match) {\n\t return '\\\\' + escapes[match];\n\t });\n\t\n\t if (escape) {\n\t source += '\\'+\\n((__t=(' + escape + '))==null?\\'\\':escapeExpr(__t))+\\n\\'';\n\t }\n\t if (interpolate) {\n\t source += '\\'+\\n((__t=(' + interpolate + '))==null?\\'\\':__t)+\\n\\'';\n\t }\n\t if (evaluate) {\n\t source += '\\';\\n' + evaluate + '\\n__p+=\\'';\n\t }\n\t index = offset + match.length;\n\t return match;\n\t });\n\t source += '\\';\\n';\n\t\n\t // If a variable is not specified, place data values in local scope.\n\t if (!settings.variable) {\n\t source = 'with(obj||{}){\\n' + source + '}\\n';\n\t }\n\t\n\t source = 'var __t,__p=\\'\\',__j=Array.prototype.join,' + 'print=function(){__p+=__j.call(arguments,\\'\\');};\\n' + source + 'return __p;\\n//# sourceURL=/microtemplates/source[' + counter++ + ']';\n\t\n\t try {\n\t /*jshint -W054 */\n\t // TODO: find a way to avoid eval\n\t render = new Function(settings.variable || 'obj', 'escapeExpr', source);\n\t } catch (e) {\n\t e.source = source;\n\t throw e;\n\t }\n\t\n\t if (data) {\n\t return render(data, escapeExpr);\n\t }\n\t var template = function template(data) {\n\t return render.call(this, data, escapeExpr);\n\t };\n\t\n\t // Provide the compiled function source as a convenience for precompilation.\n\t template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}';\n\t\n\t return template;\n\t};\n\ttmpl.settings = settings;\n\t\n\tmodule.exports = tmpl;\n\n/***/ },\n/* 7 */\n/*!**************************************!*\\\n !*** ./~/css-loader/lib/css-base.js ***!\n \\**************************************/\n/***/ function(module, exports) {\n\n\t/*\r\n\t\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\t\tAuthor Tobias Koppers @sokra\r\n\t*/\r\n\t// css base code, injected by the css-loader\r\n\tmodule.exports = function() {\r\n\t\tvar list = [];\r\n\t\r\n\t\t// return the list of modules as css string\r\n\t\tlist.toString = function toString() {\r\n\t\t\tvar result = [];\r\n\t\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\t\tvar item = this[i];\r\n\t\t\t\tif(item[2]) {\r\n\t\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.push(item[1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn result.join(\"\");\r\n\t\t};\r\n\t\r\n\t\t// import a list of modules into the list\r\n\t\tlist.i = function(modules, mediaQuery) {\r\n\t\t\tif(typeof modules === \"string\")\r\n\t\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\t\tvar alreadyImportedModules = {};\r\n\t\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\t\tvar id = this[i][0];\r\n\t\t\t\tif(typeof id === \"number\")\r\n\t\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t\t}\r\n\t\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\t\tvar item = modules[i];\r\n\t\t\t\t// skip already imported module\r\n\t\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlist.push(item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn list;\r\n\t};\r\n\n\n/***/ },\n/* 8 */\n/*!***********************************!*\\\n !*** ./src/components/browser.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t// Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar Browser = {};\n\t\n\tvar hasLocalstorage = function hasLocalstorage() {\n\t try {\n\t localStorage.setItem('clappr', 'clappr');\n\t localStorage.removeItem('clappr');\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t};\n\t\n\tvar hasFlash = function hasFlash() {\n\t try {\n\t var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');\n\t return !!fo;\n\t } catch (e) {\n\t return !!(navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] !== undefined && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin);\n\t }\n\t};\n\t\n\tvar getBrowserInfo = function getBrowserInfo() {\n\t var ua = navigator.userAgent;\n\t var parts = ua.match(/\\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [],\n\t extra = void 0;\n\t if (/trident/i.test(parts[1])) {\n\t extra = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n\t return { name: 'IE', version: parseInt(extra[1] || '') };\n\t } else if (parts[1] === 'Chrome') {\n\t extra = ua.match(/\\bOPR\\/(\\d+)/);\n\t if (extra != null) {\n\t return { name: 'Opera', version: parseInt(extra[1]) };\n\t }\n\t }\n\t parts = parts[2] ? [parts[1], parts[2]] : [navigator.appName, navigator.appVersion, '-?'];\n\t\n\t if (extra = ua.match(/version\\/(\\d+)/i)) {\n\t parts.splice(1, 1, extra[1]);\n\t }\n\t return { name: parts[0], version: parseInt(parts[1]) };\n\t};\n\t\n\tvar browserInfo = getBrowserInfo();\n\t\n\tBrowser.isSafari = /safari/i.test(navigator.userAgent) && navigator.userAgent.indexOf('Chrome') === -1;\n\tBrowser.isChrome = /chrome/i.test(navigator.userAgent);\n\tBrowser.isFirefox = /firefox/i.test(navigator.userAgent);\n\tBrowser.isLegacyIE = !!window.ActiveXObject;\n\tBrowser.isIE = Browser.isLegacyIE || /trident.*rv:1\\d/i.test(navigator.userAgent);\n\tBrowser.isIE11 = /trident.*rv:11/i.test(navigator.userAgent);\n\tBrowser.isChromecast = Browser.isChrome && /CrKey/i.test(navigator.userAgent);\n\tBrowser.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Opera Mini/i.test(navigator.userAgent);\n\tBrowser.isiOS = /iPad|iPhone|iPod/i.test(navigator.userAgent);\n\tBrowser.isAndroid = /Android/i.test(navigator.userAgent);\n\tBrowser.isWindowsPhone = /Windows Phone/i.test(navigator.userAgent);\n\tBrowser.isWin8App = /MSAppHost/i.test(navigator.userAgent);\n\tBrowser.isWiiU = /WiiU/i.test(navigator.userAgent);\n\tBrowser.isPS4 = /PlayStation 4/i.test(navigator.userAgent);\n\tBrowser.hasLocalstorage = hasLocalstorage();\n\tBrowser.hasFlash = hasFlash();\n\t\n\tBrowser.name = browserInfo.name;\n\tBrowser.version = browserInfo.version;\n\t\n\texports.default = Browser;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 9 */\n/*!*********************************!*\\\n !*** ./src/base/base_object.js ***!\n \\*********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _events = __webpack_require__(/*! ./events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * @class BaseObject\n\t * @constructor\n\t * @extends Events\n\t * @module base\n\t */\n\tvar BaseObject = function (_Events) {\n\t _inherits(BaseObject, _Events);\n\t\n\t _createClass(BaseObject, [{\n\t key: 'options',\n\t\n\t /**\n\t * returns the object options\n\t * @property options\n\t * @type Object\n\t */\n\t get: function get() {\n\t return this._options;\n\t }\n\t\n\t /**\n\t * @method constructor\n\t * @param {Object} options\n\t */\n\t\n\t }]);\n\t\n\t function BaseObject() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t _classCallCheck(this, BaseObject);\n\t\n\t var _this = _possibleConstructorReturn(this, _Events.call(this, options));\n\t\n\t _this._options = options;\n\t _this.uniqueId = (0, _utils.uniqueId)('o');\n\t return _this;\n\t }\n\t /**\n\t * a unique id prefixed with `'o'`, `o1, o232`\n\t *\n\t * @property uniqueId\n\t * @type String\n\t */\n\t\n\t\n\t return BaseObject;\n\t}(_events2.default);\n\t\n\texports.default = BaseObject;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 10 */\n/*!*******************************!*\\\n !*** ./src/base/ui_object.js ***!\n \\*******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.result */ 102);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tvar _base_object = __webpack_require__(/*! ./base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar delegateEventSplitter = /^(\\S+)\\s*(.*)$/;\n\t\n\t/**\n\t * A base class to create ui object.\n\t * @class UIObject\n\t * @constructor\n\t * @extends BaseObject\n\t * @module base\n\t */\n\t\n\tvar UIObject = function (_BaseObject) {\n\t _inherits(UIObject, _BaseObject);\n\t\n\t _createClass(UIObject, [{\n\t key: 'tagName',\n\t\n\t /**\n\t * a unique id prefixed with `'c'`, `c1, c232`\n\t *\n\t * @property cid\n\t * @type String\n\t */\n\t /**\n\t * the dom element itself\n\t *\n\t * @property el\n\t * @type HTMLElement\n\t */\n\t /**\n\t * the dom element wrapped by `$`\n\t *\n\t * @property $el\n\t * @type HTMLElement\n\t */\n\t\n\t /**\n\t * gets the tag name for the ui component\n\t * @method tagName\n\t * @default div\n\t * @return {String} tag's name\n\t */\n\t get: function get() {\n\t return 'div';\n\t }\n\t /**\n\t * a literal object mapping element's events to methods\n\t * @property events\n\t * @type Object\n\t * @example\n\t *\n\t *```javascript\n\t *\n\t * class MyButton extends UIObject {\n\t * constructor(options) {\n\t * super(options)\n\t * this.myId = 0\n\t * }\n\t * get events() { return { 'click': 'myClick' } }\n\t * myClick(){ this.myId = 42 }\n\t * }\n\t *\n\t * // when you click on MyButton the method `myClick` will be called\n\t *```\n\t */\n\t\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {};\n\t }\n\t /**\n\t * a literal object mapping attributes and values to the element\n\t * element's attribute name and the value the attribute value\n\t * @property attributes\n\t * @type Object\n\t * @example\n\t *\n\t *```javascript\n\t *\n\t * class MyButton extends UIObject {\n\t * constructor(options) { super(options) }\n\t * get attributes() { return { class: 'my-button'} }\n\t * }\n\t *\n\t * // MyButton.el.className will be 'my-button'\n\t * ```\n\t */\n\t\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {};\n\t }\n\t\n\t /**\n\t * it builds an ui component by:\n\t * * creating an id for the component `cid`\n\t * * making sure the element is created `$el`\n\t * * delegating all `events` to the element\n\t * @method constructor\n\t * @param {Object} options the options object\n\t */\n\t\n\t }]);\n\t\n\t function UIObject(options) {\n\t _classCallCheck(this, UIObject);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));\n\t\n\t _this.cid = (0, _utils.uniqueId)('c');\n\t _this._ensureElement();\n\t _this.delegateEvents();\n\t return _this;\n\t }\n\t\n\t /**\n\t * selects within the component.\n\t * @method $\n\t * @param {String} selector a selector to find within the component.\n\t * @return {HTMLElement} an element, if it exists.\n\t * @example\n\t * ```javascript\n\t * fullScreenBarUIComponent.$('.button-full') //will return only `.button-full` within the component\n\t * ```\n\t */\n\t\n\t\n\t UIObject.prototype.$ = function $(selector) {\n\t return this.$el.find(selector);\n\t };\n\t\n\t /**\n\t * render the component, usually attach it to a real existent `element`\n\t * @method render\n\t * @return {UIObject} itself\n\t */\n\t\n\t\n\t UIObject.prototype.render = function render() {\n\t return this;\n\t };\n\t\n\t /**\n\t * removes the ui component from DOM\n\t * @method remove\n\t * @return {UIObject} itself\n\t */\n\t\n\t\n\t UIObject.prototype.remove = function remove() {\n\t this.$el.remove();\n\t this.stopListening();\n\t this.undelegateEvents();\n\t return this;\n\t };\n\t\n\t /**\n\t * set element to `el` and `$el`\n\t * @method setElement\n\t * @param {HTMLElement} element\n\t * @param {Boolean} delegate whether is delegate or not\n\t * @return {UIObject} itself\n\t */\n\t\n\t\n\t UIObject.prototype.setElement = function setElement(element, delegate) {\n\t if (this.$el) {\n\t this.undelegateEvents();\n\t }\n\t this.$el = element instanceof _clapprZepto2.default ? element : (0, _clapprZepto2.default)(element);\n\t this.el = this.$el[0];\n\t if (delegate !== false) {\n\t this.delegateEvents();\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * delegates all the original `events` on `element` to its callbacks\n\t * @method delegateEvents\n\t * @param {Object} events\n\t * @return {UIObject} itself\n\t */\n\t\n\t\n\t UIObject.prototype.delegateEvents = function delegateEvents(events) {\n\t if (!(events || (events = (0, _lodash2.default)(this, 'events')))) {\n\t return this;\n\t }\n\t this.undelegateEvents();\n\t for (var key in events) {\n\t var method = events[key];\n\t if (method && method.constructor !== Function) {\n\t method = this[events[key]];\n\t }\n\t if (!method) {\n\t continue;\n\t }\n\t\n\t var match = key.match(delegateEventSplitter);\n\t var eventName = match[1],\n\t selector = match[2];\n\t //method = _.bind(method, this)\n\t eventName += '.delegateEvents' + this.cid;\n\t if (selector === '') {\n\t this.$el.on(eventName, method.bind(this));\n\t } else {\n\t this.$el.on(eventName, selector, method.bind(this));\n\t }\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * undelegats all the `events`\n\t * @method undelegateEvents\n\t * @return {UIObject} itself\n\t */\n\t\n\t\n\t UIObject.prototype.undelegateEvents = function undelegateEvents() {\n\t this.$el.off('.delegateEvents' + this.cid);\n\t return this;\n\t };\n\t\n\t /**\n\t * ensures the creation of this ui component\n\t * @method _ensureElement\n\t * @private\n\t */\n\t\n\t\n\t UIObject.prototype._ensureElement = function _ensureElement() {\n\t if (!this.el) {\n\t var attrs = _clapprZepto2.default.extend({}, (0, _lodash2.default)(this, 'attributes'));\n\t if (this.id) {\n\t attrs.id = (0, _lodash2.default)(this, 'id');\n\t }\n\t if (this.className) {\n\t attrs['class'] = (0, _lodash2.default)(this, 'className');\n\t }\n\t var $el = (0, _clapprZepto2.default)('<' + (0, _lodash2.default)(this, 'tagName') + '>').attr(attrs);\n\t this.setElement($el, false);\n\t } else {\n\t this.setElement((0, _lodash2.default)(this, 'el'), false);\n\t }\n\t };\n\t\n\t return UIObject;\n\t}(_base_object2.default);\n\t\n\texports.default = UIObject;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 11 */\n/*!************************************!*\\\n !*** ./src/components/mediator.js ***!\n \\************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The mediator is a singleton for handling global events.\n\t */\n\t\n\tvar events = new _events2.default();\n\t\n\tvar Mediator = function Mediator() {\n\t _classCallCheck(this, Mediator);\n\t};\n\t\n\texports.default = Mediator;\n\t\n\t\n\tMediator.on = function (name, callback, context) {\n\t events.on(name, callback, context);\n\t return;\n\t};\n\t\n\tMediator.once = function (name, callback, context) {\n\t events.once(name, callback, context);\n\t return;\n\t};\n\t\n\tMediator.off = function (name, callback, context) {\n\t events.off(name, callback, context);\n\t return;\n\t};\n\t\n\tMediator.trigger = function (name) {\n\t for (var _len = arguments.length, opts = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t opts[_key - 1] = arguments[_key];\n\t }\n\t\n\t events.trigger.apply(events, [name].concat(opts));\n\t return;\n\t};\n\t\n\tMediator.stopListening = function (obj, name, callback) {\n\t events.stopListening(obj, name, callback);\n\t return;\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 12 */\n/*!*********************************!*\\\n !*** ./src/base/core_plugin.js ***!\n \\*********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _base_object = __webpack_require__(/*! ./base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar CorePlugin = function (_BaseObject) {\n\t _inherits(CorePlugin, _BaseObject);\n\t\n\t function CorePlugin(core) {\n\t _classCallCheck(this, CorePlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this, core.options));\n\t\n\t _this.core = core;\n\t _this.enabled = true;\n\t _this.bindEvents();\n\t return _this;\n\t }\n\t\n\t CorePlugin.prototype.bindEvents = function bindEvents() {};\n\t\n\t CorePlugin.prototype.enable = function enable() {\n\t if (!this.enabled) {\n\t this.bindEvents();\n\t this.enabled = true;\n\t }\n\t };\n\t\n\t CorePlugin.prototype.disable = function disable() {\n\t if (this.enabled) {\n\t this.stopListening();\n\t this.enabled = false;\n\t }\n\t };\n\t\n\t CorePlugin.prototype.getExternalInterface = function getExternalInterface() {\n\t return {};\n\t };\n\t\n\t CorePlugin.prototype.destroy = function destroy() {\n\t this.stopListening();\n\t };\n\t\n\t return CorePlugin;\n\t}(_base_object2.default);\n\t\n\texports.default = CorePlugin;\n\t\n\t\n\tCorePlugin.extend = function (properties) {\n\t return (0, _utils.extend)(CorePlugin, properties);\n\t};\n\t\n\tCorePlugin.type = 'core';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 13 */\n/*!**************************************!*\\\n !*** ./src/base/container_plugin.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _base_object = __webpack_require__(/*! ./base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t/**\n\t * The base class for a container plugin\n\t * @class ContainerPlugin\n\t * @constructor\n\t * @extends UIObject\n\t * @module base\n\t */\n\tvar ContainerPlugin = function (_BaseObject) {\n\t _inherits(ContainerPlugin, _BaseObject);\n\t\n\t function ContainerPlugin(container) {\n\t _classCallCheck(this, ContainerPlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this, container.options));\n\t\n\t _this.container = container;\n\t _this.enabled = true;\n\t _this.bindEvents();\n\t return _this;\n\t }\n\t\n\t ContainerPlugin.prototype.enable = function enable() {\n\t if (!this.enabled) {\n\t this.bindEvents();\n\t this.enabled = true;\n\t }\n\t };\n\t\n\t ContainerPlugin.prototype.disable = function disable() {\n\t if (this.enabled) {\n\t this.stopListening();\n\t this.enabled = false;\n\t }\n\t };\n\t\n\t ContainerPlugin.prototype.bindEvents = function bindEvents() {};\n\t\n\t ContainerPlugin.prototype.destroy = function destroy() {\n\t this.stopListening();\n\t };\n\t\n\t return ContainerPlugin;\n\t}(_base_object2.default);\n\t\n\texports.default = ContainerPlugin;\n\t\n\t\n\tContainerPlugin.extend = function (properties) {\n\t return (0, _utils.extend)(ContainerPlugin, properties);\n\t};\n\t\n\tContainerPlugin.type = 'container';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 14 */\n/*!*****************************************!*\\\n !*** ./src/base/ui_container_plugin.js ***!\n \\*****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _ui_object = __webpack_require__(/*! ./ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The base class for an ui container plugin\n\t * @class UIContainerPlugin\n\t * @constructor\n\t * @extends UIObject\n\t * @module base\n\t */\n\tvar UIContainerPlugin = function (_UIObject) {\n\t _inherits(UIContainerPlugin, _UIObject);\n\t\n\t function UIContainerPlugin(container) {\n\t _classCallCheck(this, UIContainerPlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, container.options));\n\t\n\t _this.container = container;\n\t _this.enabled = true;\n\t _this.bindEvents();\n\t return _this;\n\t }\n\t\n\t UIContainerPlugin.prototype.enable = function enable() {\n\t if (!this.enabled) {\n\t this.bindEvents();\n\t this.$el.show();\n\t this.enabled = true;\n\t }\n\t };\n\t\n\t UIContainerPlugin.prototype.disable = function disable() {\n\t this.stopListening();\n\t this.$el.hide();\n\t this.enabled = false;\n\t };\n\t\n\t UIContainerPlugin.prototype.bindEvents = function bindEvents() {};\n\t\n\t UIContainerPlugin.prototype.destroy = function destroy() {\n\t this.remove();\n\t };\n\t\n\t return UIContainerPlugin;\n\t}(_ui_object2.default);\n\t\n\texports.default = UIContainerPlugin;\n\t\n\t\n\tUIContainerPlugin.extend = function (properties) {\n\t return (0, _utils.extend)(UIContainerPlugin, properties);\n\t};\n\t\n\tUIContainerPlugin.type = 'container';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 15 */\n/*!***************************************!*\\\n !*** ./src/components/player_info.js ***!\n \\***************************************/\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar PlayerInfo = function PlayerInfo() {\n\t _classCallCheck(this, PlayerInfo);\n\t\n\t this.options = {};\n\t this.playbackPlugins = [];\n\t this.currentSize = { width: 0, height: 0 };\n\t};\n\t\n\tPlayerInfo._players = {};\n\t\n\tPlayerInfo.getInstance = function (playerId) {\n\t return PlayerInfo._players[playerId] || (PlayerInfo._players[playerId] = new PlayerInfo());\n\t};\n\t\n\texports.default = PlayerInfo;\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 16 */\n/*!********************************************!*\\\n !*** ./src/playbacks/html5_video/index.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./html5_video */ 53);\n\n/***/ },\n/* 17 */\n/*!************************************!*\\\n !*** ./src/base/ui_core_plugin.js ***!\n \\************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _utils = __webpack_require__(/*! ./utils */ 2);\n\t\n\tvar _ui_object = __webpack_require__(/*! ./ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar UICorePlugin = function (_UIObject) {\n\t _inherits(UICorePlugin, _UIObject);\n\t\n\t function UICorePlugin(core) {\n\t _classCallCheck(this, UICorePlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, core.options));\n\t\n\t _this.core = core;\n\t _this.enabled = true;\n\t _this.bindEvents();\n\t _this.render();\n\t return _this;\n\t }\n\t\n\t UICorePlugin.prototype.bindEvents = function bindEvents() {};\n\t\n\t UICorePlugin.prototype.getExternalInterface = function getExternalInterface() {\n\t return {};\n\t };\n\t\n\t UICorePlugin.prototype.enable = function enable() {\n\t if (!this.enabled) {\n\t this.bindEvents();\n\t this.$el.show();\n\t this.enabled = true;\n\t }\n\t };\n\t\n\t UICorePlugin.prototype.disable = function disable() {\n\t this.stopListening();\n\t this.$el.hide();\n\t this.enabled = false;\n\t };\n\t\n\t UICorePlugin.prototype.destroy = function destroy() {\n\t this.remove();\n\t };\n\t\n\t UICorePlugin.prototype.render = function render() {\n\t return this;\n\t };\n\t\n\t return UICorePlugin;\n\t}(_ui_object2.default);\n\t\n\texports.default = UICorePlugin;\n\t\n\t\n\tUICorePlugin.extend = function (properties) {\n\t return (0, _utils.extend)(UICorePlugin, properties);\n\t};\n\t\n\tUICorePlugin.type = 'core';\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 18 */\n/*!****************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/index.js ***!\n \\****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = __webpack_require__(/*! ./base_flash_playback */ 47);\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 19 */\n/*!**********************************!*\\\n !*** ./src/plugins/log/index.js ***!\n \\**********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./log */ 65);\n\n/***/ },\n/* 20 */\n/*!*****************************!*\\\n !*** ./src/vendor/index.js ***!\n \\*****************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _kibo = __webpack_require__(/*! ./kibo */ 77);\n\t\n\tvar _kibo2 = _interopRequireDefault(_kibo);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = { Kibo: _kibo2.default };\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 21 */\n/*!******************************!*\\\n !*** ./~/process/browser.js ***!\n \\******************************/\n/***/ function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ },\n/* 22 */\n/*!*******************************!*\\\n !*** ./src/icons/01-play.svg ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M1.425.35L14.575 8l-13.15 7.65V.35z\\\"></path></svg>\"\n\n/***/ },\n/* 23 */\n/*!***********************************!*\\\n !*** (webpack)/buildin/module.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = function(module) {\n\t\tif(!module.webpackPolyfill) {\n\t\t\tmodule.deprecate = function() {};\n\t\t\tmodule.paths = [];\n\t\t\t// module.parent = undefined by default\n\t\t\tmodule.children = [];\n\t\t\tmodule.webpackPolyfill = 1;\n\t\t}\n\t\treturn module;\n\t}\n\n\n/***/ },\n/* 24 */\n/*!*******************************************!*\\\n !*** ./src/components/container/index.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./container */ 38);\n\n/***/ },\n/* 25 */\n/*!**************************************!*\\\n !*** ./src/components/core/index.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./core */ 41);\n\n/***/ },\n/* 26 */\n/*!****************************************!*\\\n !*** ./src/components/loader/index.js ***!\n \\****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./loader */ 44);\n\n/***/ },\n/* 27 */\n/*!***********************************************!*\\\n !*** ./src/components/media_control/index.js ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./media_control */ 45);\n\n/***/ },\n/* 28 */\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/index.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./flash */ 48);\n\n/***/ },\n/* 29 */\n/*!****************************************!*\\\n !*** ./src/playbacks/flashls/index.js ***!\n \\****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./flashls */ 49);\n\n/***/ },\n/* 30 */\n/*!************************************!*\\\n !*** ./src/playbacks/hls/index.js ***!\n \\************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./hls */ 51);\n\n/***/ },\n/* 31 */\n/*!********************************************!*\\\n !*** ./src/playbacks/html5_audio/index.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./html5_audio */ 52);\n\n/***/ },\n/* 32 */\n/*!*****************************************!*\\\n !*** ./src/playbacks/html_img/index.js ***!\n \\*****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./html_img */ 54);\n\n/***/ },\n/* 33 */\n/*!**************************************!*\\\n !*** ./src/playbacks/no_op/index.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./no_op */ 55);\n\n/***/ },\n/* 34 */\n/*!*************************************!*\\\n !*** ./src/plugins/poster/index.js ***!\n \\*************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./poster */ 66);\n\n/***/ },\n/* 35 */\n/*!*********************************!*\\\n !*** ./~/lodash.merge/index.js ***!\n \\*********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global, module) {/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** Used as the size to enable large array optimizations. */\n\tvar LARGE_ARRAY_SIZE = 200;\n\t\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\t\n\t/** Used as references for various `Number` constants. */\n\tvar MAX_SAFE_INTEGER = 9007199254740991;\n\t\n\t/** `Object#toString` result references. */\n\tvar argsTag = '[object Arguments]',\n\t arrayTag = '[object Array]',\n\t boolTag = '[object Boolean]',\n\t dateTag = '[object Date]',\n\t errorTag = '[object Error]',\n\t funcTag = '[object Function]',\n\t genTag = '[object GeneratorFunction]',\n\t mapTag = '[object Map]',\n\t numberTag = '[object Number]',\n\t objectTag = '[object Object]',\n\t promiseTag = '[object Promise]',\n\t regexpTag = '[object RegExp]',\n\t setTag = '[object Set]',\n\t stringTag = '[object String]',\n\t symbolTag = '[object Symbol]',\n\t weakMapTag = '[object WeakMap]';\n\t\n\tvar arrayBufferTag = '[object ArrayBuffer]',\n\t dataViewTag = '[object DataView]',\n\t float32Tag = '[object Float32Array]',\n\t float64Tag = '[object Float64Array]',\n\t int8Tag = '[object Int8Array]',\n\t int16Tag = '[object Int16Array]',\n\t int32Tag = '[object Int32Array]',\n\t uint8Tag = '[object Uint8Array]',\n\t uint8ClampedTag = '[object Uint8ClampedArray]',\n\t uint16Tag = '[object Uint16Array]',\n\t uint32Tag = '[object Uint32Array]';\n\t\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\t\n\t/** Used to match `RegExp` flags from their coerced string values. */\n\tvar reFlags = /\\w*$/;\n\t\n\t/** Used to detect host constructors (Safari). */\n\tvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\t\n\t/** Used to detect unsigned integer values. */\n\tvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\t\n\t/** Used to identify `toStringTag` values of typed arrays. */\n\tvar typedArrayTags = {};\n\ttypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n\ttypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n\ttypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n\ttypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n\ttypedArrayTags[uint32Tag] = true;\n\ttypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n\ttypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n\ttypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n\ttypedArrayTags[errorTag] = typedArrayTags[funcTag] =\n\ttypedArrayTags[mapTag] = typedArrayTags[numberTag] =\n\ttypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n\ttypedArrayTags[setTag] = typedArrayTags[stringTag] =\n\ttypedArrayTags[weakMapTag] = false;\n\t\n\t/** Used to identify `toStringTag` values supported by `_.clone`. */\n\tvar cloneableTags = {};\n\tcloneableTags[argsTag] = cloneableTags[arrayTag] =\n\tcloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n\tcloneableTags[boolTag] = cloneableTags[dateTag] =\n\tcloneableTags[float32Tag] = cloneableTags[float64Tag] =\n\tcloneableTags[int8Tag] = cloneableTags[int16Tag] =\n\tcloneableTags[int32Tag] = cloneableTags[mapTag] =\n\tcloneableTags[numberTag] = cloneableTags[objectTag] =\n\tcloneableTags[regexpTag] = cloneableTags[setTag] =\n\tcloneableTags[stringTag] = cloneableTags[symbolTag] =\n\tcloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n\tcloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n\tcloneableTags[errorTag] = cloneableTags[funcTag] =\n\tcloneableTags[weakMapTag] = false;\n\t\n\t/** Detect free variable `global` from Node.js. */\n\tvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\t\n\t/** Detect free variable `self`. */\n\tvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\t\n\t/** Used as a reference to the global object. */\n\tvar root = freeGlobal || freeSelf || Function('return this')();\n\t\n\t/** Detect free variable `exports`. */\n\tvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\t\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\t\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\t\n\t/** Detect free variable `process` from Node.js. */\n\tvar freeProcess = moduleExports && freeGlobal.process;\n\t\n\t/** Used to access faster Node.js helpers. */\n\tvar nodeUtil = (function() {\n\t try {\n\t return freeProcess && freeProcess.binding('util');\n\t } catch (e) {}\n\t}());\n\t\n\t/* Node.js helper references. */\n\tvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\t\n\t/**\n\t * Adds the key-value `pair` to `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to modify.\n\t * @param {Array} pair The key-value pair to add.\n\t * @returns {Object} Returns `map`.\n\t */\n\tfunction addMapEntry(map, pair) {\n\t // Don't return `map.set` because it's not chainable in IE 11.\n\t map.set(pair[0], pair[1]);\n\t return map;\n\t}\n\t\n\t/**\n\t * Adds `value` to `set`.\n\t *\n\t * @private\n\t * @param {Object} set The set to modify.\n\t * @param {*} value The value to add.\n\t * @returns {Object} Returns `set`.\n\t */\n\tfunction addSetEntry(set, value) {\n\t // Don't return `set.add` because it's not chainable in IE 11.\n\t set.add(value);\n\t return set;\n\t}\n\t\n\t/**\n\t * A faster alternative to `Function#apply`, this function invokes `func`\n\t * with the `this` binding of `thisArg` and the arguments of `args`.\n\t *\n\t * @private\n\t * @param {Function} func The function to invoke.\n\t * @param {*} thisArg The `this` binding of `func`.\n\t * @param {Array} args The arguments to invoke `func` with.\n\t * @returns {*} Returns the result of `func`.\n\t */\n\tfunction apply(func, thisArg, args) {\n\t switch (args.length) {\n\t case 0: return func.call(thisArg);\n\t case 1: return func.call(thisArg, args[0]);\n\t case 2: return func.call(thisArg, args[0], args[1]);\n\t case 3: return func.call(thisArg, args[0], args[1], args[2]);\n\t }\n\t return func.apply(thisArg, args);\n\t}\n\t\n\t/**\n\t * A specialized version of `_.forEach` for arrays without support for\n\t * iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction arrayEach(array, iteratee) {\n\t var index = -1,\n\t length = array ? array.length : 0;\n\t\n\t while (++index < length) {\n\t if (iteratee(array[index], index, array) === false) {\n\t break;\n\t }\n\t }\n\t return array;\n\t}\n\t\n\t/**\n\t * Appends the elements of `values` to `array`.\n\t *\n\t * @private\n\t * @param {Array} array The array to modify.\n\t * @param {Array} values The values to append.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction arrayPush(array, values) {\n\t var index = -1,\n\t length = values.length,\n\t offset = array.length;\n\t\n\t while (++index < length) {\n\t array[offset + index] = values[index];\n\t }\n\t return array;\n\t}\n\t\n\t/**\n\t * A specialized version of `_.reduce` for arrays without support for\n\t * iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @param {*} [accumulator] The initial value.\n\t * @param {boolean} [initAccum] Specify using the first element of `array` as\n\t * the initial value.\n\t * @returns {*} Returns the accumulated value.\n\t */\n\tfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n\t var index = -1,\n\t length = array ? array.length : 0;\n\t\n\t if (initAccum && length) {\n\t accumulator = array[++index];\n\t }\n\t while (++index < length) {\n\t accumulator = iteratee(accumulator, array[index], index, array);\n\t }\n\t return accumulator;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.times` without support for iteratee shorthands\n\t * or max array length checks.\n\t *\n\t * @private\n\t * @param {number} n The number of times to invoke `iteratee`.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns the array of results.\n\t */\n\tfunction baseTimes(n, iteratee) {\n\t var index = -1,\n\t result = Array(n);\n\t\n\t while (++index < n) {\n\t result[index] = iteratee(index);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.unary` without support for storing metadata.\n\t *\n\t * @private\n\t * @param {Function} func The function to cap arguments for.\n\t * @returns {Function} Returns the new capped function.\n\t */\n\tfunction baseUnary(func) {\n\t return function(value) {\n\t return func(value);\n\t };\n\t}\n\t\n\t/**\n\t * Gets the value at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction getValue(object, key) {\n\t return object == null ? undefined : object[key];\n\t}\n\t\n\t/**\n\t * Checks if `value` is a host object in IE < 9.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n\t */\n\tfunction isHostObject(value) {\n\t // Many host objects are `Object` objects that can coerce to strings\n\t // despite having improperly defined `toString` methods.\n\t var result = false;\n\t if (value != null && typeof value.toString != 'function') {\n\t try {\n\t result = !!(value + '');\n\t } catch (e) {}\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Converts `map` to its key-value pairs.\n\t *\n\t * @private\n\t * @param {Object} map The map to convert.\n\t * @returns {Array} Returns the key-value pairs.\n\t */\n\tfunction mapToArray(map) {\n\t var index = -1,\n\t result = Array(map.size);\n\t\n\t map.forEach(function(value, key) {\n\t result[++index] = [key, value];\n\t });\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a unary function that invokes `func` with its argument transformed.\n\t *\n\t * @private\n\t * @param {Function} func The function to wrap.\n\t * @param {Function} transform The argument transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overArg(func, transform) {\n\t return function(arg) {\n\t return func(transform(arg));\n\t };\n\t}\n\t\n\t/**\n\t * Converts `set` to an array of its values.\n\t *\n\t * @private\n\t * @param {Object} set The set to convert.\n\t * @returns {Array} Returns the values.\n\t */\n\tfunction setToArray(set) {\n\t var index = -1,\n\t result = Array(set.size);\n\t\n\t set.forEach(function(value) {\n\t result[++index] = value;\n\t });\n\t return result;\n\t}\n\t\n\t/** Used for built-in method references. */\n\tvar arrayProto = Array.prototype,\n\t funcProto = Function.prototype,\n\t objectProto = Object.prototype;\n\t\n\t/** Used to detect overreaching core-js shims. */\n\tvar coreJsData = root['__core-js_shared__'];\n\t\n\t/** Used to detect methods masquerading as native. */\n\tvar maskSrcKey = (function() {\n\t var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n\t return uid ? ('Symbol(src)_1.' + uid) : '';\n\t}());\n\t\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\t\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty = objectProto.hasOwnProperty;\n\t\n\t/** Used to infer the `Object` constructor. */\n\tvar objectCtorString = funcToString.call(Object);\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/** Used to detect if a method is native. */\n\tvar reIsNative = RegExp('^' +\n\t funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n\t .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n\t);\n\t\n\t/** Built-in value references. */\n\tvar Buffer = moduleExports ? root.Buffer : undefined,\n\t Symbol = root.Symbol,\n\t Uint8Array = root.Uint8Array,\n\t getPrototype = overArg(Object.getPrototypeOf, Object),\n\t objectCreate = Object.create,\n\t propertyIsEnumerable = objectProto.propertyIsEnumerable,\n\t splice = arrayProto.splice;\n\t\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeGetSymbols = Object.getOwnPropertySymbols,\n\t nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n\t nativeKeys = overArg(Object.keys, Object),\n\t nativeMax = Math.max;\n\t\n\t/* Built-in method references that are verified to be native. */\n\tvar DataView = getNative(root, 'DataView'),\n\t Map = getNative(root, 'Map'),\n\t Promise = getNative(root, 'Promise'),\n\t Set = getNative(root, 'Set'),\n\t WeakMap = getNative(root, 'WeakMap'),\n\t nativeCreate = getNative(Object, 'create');\n\t\n\t/** Used to detect maps, sets, and weakmaps. */\n\tvar dataViewCtorString = toSource(DataView),\n\t mapCtorString = toSource(Map),\n\t promiseCtorString = toSource(Promise),\n\t setCtorString = toSource(Set),\n\t weakMapCtorString = toSource(WeakMap);\n\t\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto = Symbol ? Symbol.prototype : undefined,\n\t symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\t\n\t/**\n\t * Creates a hash object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Hash(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the hash.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Hash\n\t */\n\tfunction hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the hash.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Hash\n\t * @param {Object} hash The hash to modify.\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction hashDelete(key) {\n\t return this.has(key) && delete this.__data__[key];\n\t}\n\t\n\t/**\n\t * Gets the hash value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction hashGet(key) {\n\t var data = this.__data__;\n\t if (nativeCreate) {\n\t var result = data[key];\n\t return result === HASH_UNDEFINED ? undefined : result;\n\t }\n\t return hasOwnProperty.call(data, key) ? data[key] : undefined;\n\t}\n\t\n\t/**\n\t * Checks if a hash value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Hash\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction hashHas(key) {\n\t var data = this.__data__;\n\t return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n\t}\n\t\n\t/**\n\t * Sets the hash `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the hash instance.\n\t */\n\tfunction hashSet(key, value) {\n\t var data = this.__data__;\n\t data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n\t return this;\n\t}\n\t\n\t// Add methods to `Hash`.\n\tHash.prototype.clear = hashClear;\n\tHash.prototype['delete'] = hashDelete;\n\tHash.prototype.get = hashGet;\n\tHash.prototype.has = hashHas;\n\tHash.prototype.set = hashSet;\n\t\n\t/**\n\t * Creates an list cache object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction ListCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the list cache.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf ListCache\n\t */\n\tfunction listCacheClear() {\n\t this.__data__ = [];\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the list cache.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction listCacheDelete(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t return false;\n\t }\n\t var lastIndex = data.length - 1;\n\t if (index == lastIndex) {\n\t data.pop();\n\t } else {\n\t splice.call(data, index, 1);\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * Gets the list cache value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction listCacheGet(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t return index < 0 ? undefined : data[index][1];\n\t}\n\t\n\t/**\n\t * Checks if a list cache value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf ListCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction listCacheHas(key) {\n\t return assocIndexOf(this.__data__, key) > -1;\n\t}\n\t\n\t/**\n\t * Sets the list cache `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the list cache instance.\n\t */\n\tfunction listCacheSet(key, value) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t data.push([key, value]);\n\t } else {\n\t data[index][1] = value;\n\t }\n\t return this;\n\t}\n\t\n\t// Add methods to `ListCache`.\n\tListCache.prototype.clear = listCacheClear;\n\tListCache.prototype['delete'] = listCacheDelete;\n\tListCache.prototype.get = listCacheGet;\n\tListCache.prototype.has = listCacheHas;\n\tListCache.prototype.set = listCacheSet;\n\t\n\t/**\n\t * Creates a map cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction MapCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the map.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf MapCache\n\t */\n\tfunction mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map || ListCache),\n\t 'string': new Hash\n\t };\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the map.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction mapCacheDelete(key) {\n\t return getMapData(this, key)['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the map value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction mapCacheGet(key) {\n\t return getMapData(this, key).get(key);\n\t}\n\t\n\t/**\n\t * Checks if a map value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf MapCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction mapCacheHas(key) {\n\t return getMapData(this, key).has(key);\n\t}\n\t\n\t/**\n\t * Sets the map `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the map cache instance.\n\t */\n\tfunction mapCacheSet(key, value) {\n\t getMapData(this, key).set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `MapCache`.\n\tMapCache.prototype.clear = mapCacheClear;\n\tMapCache.prototype['delete'] = mapCacheDelete;\n\tMapCache.prototype.get = mapCacheGet;\n\tMapCache.prototype.has = mapCacheHas;\n\tMapCache.prototype.set = mapCacheSet;\n\t\n\t/**\n\t * Creates a stack cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Stack(entries) {\n\t this.__data__ = new ListCache(entries);\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the stack.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Stack\n\t */\n\tfunction stackClear() {\n\t this.__data__ = new ListCache;\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the stack.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction stackDelete(key) {\n\t return this.__data__['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the stack value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction stackGet(key) {\n\t return this.__data__.get(key);\n\t}\n\t\n\t/**\n\t * Checks if a stack value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Stack\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction stackHas(key) {\n\t return this.__data__.has(key);\n\t}\n\t\n\t/**\n\t * Sets the stack `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the stack cache instance.\n\t */\n\tfunction stackSet(key, value) {\n\t var cache = this.__data__;\n\t if (cache instanceof ListCache) {\n\t var pairs = cache.__data__;\n\t if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n\t pairs.push([key, value]);\n\t return this;\n\t }\n\t cache = this.__data__ = new MapCache(pairs);\n\t }\n\t cache.set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `Stack`.\n\tStack.prototype.clear = stackClear;\n\tStack.prototype['delete'] = stackDelete;\n\tStack.prototype.get = stackGet;\n\tStack.prototype.has = stackHas;\n\tStack.prototype.set = stackSet;\n\t\n\t/**\n\t * Creates an array of the enumerable property names of the array-like `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @param {boolean} inherited Specify returning inherited property names.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction arrayLikeKeys(value, inherited) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t // Safari 9 makes `arguments.length` enumerable in strict mode.\n\t var result = (isArray(value) || isArguments(value))\n\t ? baseTimes(value.length, String)\n\t : [];\n\t\n\t var length = result.length,\n\t skipIndexes = !!length;\n\t\n\t for (var key in value) {\n\t if ((inherited || hasOwnProperty.call(value, key)) &&\n\t !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * This function is like `assignValue` except that it doesn't assign\n\t * `undefined` values.\n\t *\n\t * @private\n\t * @param {Object} object The object to modify.\n\t * @param {string} key The key of the property to assign.\n\t * @param {*} value The value to assign.\n\t */\n\tfunction assignMergeValue(object, key, value) {\n\t if ((value !== undefined && !eq(object[key], value)) ||\n\t (typeof key == 'number' && value === undefined && !(key in object))) {\n\t object[key] = value;\n\t }\n\t}\n\t\n\t/**\n\t * Assigns `value` to `key` of `object` if the existing value is not equivalent\n\t * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * for equality comparisons.\n\t *\n\t * @private\n\t * @param {Object} object The object to modify.\n\t * @param {string} key The key of the property to assign.\n\t * @param {*} value The value to assign.\n\t */\n\tfunction assignValue(object, key, value) {\n\t var objValue = object[key];\n\t if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n\t (value === undefined && !(key in object))) {\n\t object[key] = value;\n\t }\n\t}\n\t\n\t/**\n\t * Gets the index at which the `key` is found in `array` of key-value pairs.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} key The key to search for.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction assocIndexOf(array, key) {\n\t var length = array.length;\n\t while (length--) {\n\t if (eq(array[length][0], key)) {\n\t return length;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.assign` without support for multiple sources\n\t * or `customizer` functions.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction baseAssign(object, source) {\n\t return object && copyObject(source, keys(source), object);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n\t * traversed objects.\n\t *\n\t * @private\n\t * @param {*} value The value to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @param {boolean} [isFull] Specify a clone including symbols.\n\t * @param {Function} [customizer] The function to customize cloning.\n\t * @param {string} [key] The key of `value`.\n\t * @param {Object} [object] The parent object of `value`.\n\t * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n\t * @returns {*} Returns the cloned value.\n\t */\n\tfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n\t var result;\n\t if (customizer) {\n\t result = object ? customizer(value, key, object, stack) : customizer(value);\n\t }\n\t if (result !== undefined) {\n\t return result;\n\t }\n\t if (!isObject(value)) {\n\t return value;\n\t }\n\t var isArr = isArray(value);\n\t if (isArr) {\n\t result = initCloneArray(value);\n\t if (!isDeep) {\n\t return copyArray(value, result);\n\t }\n\t } else {\n\t var tag = getTag(value),\n\t isFunc = tag == funcTag || tag == genTag;\n\t\n\t if (isBuffer(value)) {\n\t return cloneBuffer(value, isDeep);\n\t }\n\t if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n\t if (isHostObject(value)) {\n\t return object ? value : {};\n\t }\n\t result = initCloneObject(isFunc ? {} : value);\n\t if (!isDeep) {\n\t return copySymbols(value, baseAssign(result, value));\n\t }\n\t } else {\n\t if (!cloneableTags[tag]) {\n\t return object ? value : {};\n\t }\n\t result = initCloneByTag(value, tag, baseClone, isDeep);\n\t }\n\t }\n\t // Check for circular references and return its corresponding clone.\n\t stack || (stack = new Stack);\n\t var stacked = stack.get(value);\n\t if (stacked) {\n\t return stacked;\n\t }\n\t stack.set(value, result);\n\t\n\t if (!isArr) {\n\t var props = isFull ? getAllKeys(value) : keys(value);\n\t }\n\t arrayEach(props || value, function(subValue, key) {\n\t if (props) {\n\t key = subValue;\n\t subValue = value[key];\n\t }\n\t // Recursively populate clone (susceptible to call stack limits).\n\t assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n\t });\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.create` without support for assigning\n\t * properties to the created object.\n\t *\n\t * @private\n\t * @param {Object} prototype The object to inherit from.\n\t * @returns {Object} Returns the new object.\n\t */\n\tfunction baseCreate(proto) {\n\t return isObject(proto) ? objectCreate(proto) : {};\n\t}\n\t\n\t/**\n\t * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n\t * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n\t * symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {Function} keysFunc The function to get the keys of `object`.\n\t * @param {Function} symbolsFunc The function to get the symbols of `object`.\n\t * @returns {Array} Returns the array of property names and symbols.\n\t */\n\tfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n\t var result = keysFunc(object);\n\t return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n\t}\n\t\n\t/**\n\t * The base implementation of `getTag`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tfunction baseGetTag(value) {\n\t return objectToString.call(value);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isNative` without bad shim checks.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a native function,\n\t * else `false`.\n\t */\n\tfunction baseIsNative(value) {\n\t if (!isObject(value) || isMasked(value)) {\n\t return false;\n\t }\n\t var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n\t return pattern.test(toSource(value));\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isTypedArray` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t */\n\tfunction baseIsTypedArray(value) {\n\t return isObjectLike(value) &&\n\t isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n\t}\n\t\n\t/**\n\t * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeys(object) {\n\t if (!isPrototype(object)) {\n\t return nativeKeys(object);\n\t }\n\t var result = [];\n\t for (var key in Object(object)) {\n\t if (hasOwnProperty.call(object, key) && key != 'constructor') {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeysIn(object) {\n\t if (!isObject(object)) {\n\t return nativeKeysIn(object);\n\t }\n\t var isProto = isPrototype(object),\n\t result = [];\n\t\n\t for (var key in object) {\n\t if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.merge` without support for multiple sources.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @param {number} srcIndex The index of `source`.\n\t * @param {Function} [customizer] The function to customize merged values.\n\t * @param {Object} [stack] Tracks traversed source values and their merged\n\t * counterparts.\n\t */\n\tfunction baseMerge(object, source, srcIndex, customizer, stack) {\n\t if (object === source) {\n\t return;\n\t }\n\t if (!(isArray(source) || isTypedArray(source))) {\n\t var props = baseKeysIn(source);\n\t }\n\t arrayEach(props || source, function(srcValue, key) {\n\t if (props) {\n\t key = srcValue;\n\t srcValue = source[key];\n\t }\n\t if (isObject(srcValue)) {\n\t stack || (stack = new Stack);\n\t baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n\t }\n\t else {\n\t var newValue = customizer\n\t ? customizer(object[key], srcValue, (key + ''), object, source, stack)\n\t : undefined;\n\t\n\t if (newValue === undefined) {\n\t newValue = srcValue;\n\t }\n\t assignMergeValue(object, key, newValue);\n\t }\n\t });\n\t}\n\t\n\t/**\n\t * A specialized version of `baseMerge` for arrays and objects which performs\n\t * deep merges and tracks traversed objects enabling objects with circular\n\t * references to be merged.\n\t *\n\t * @private\n\t * @param {Object} object The destination object.\n\t * @param {Object} source The source object.\n\t * @param {string} key The key of the value to merge.\n\t * @param {number} srcIndex The index of `source`.\n\t * @param {Function} mergeFunc The function to merge values.\n\t * @param {Function} [customizer] The function to customize assigned values.\n\t * @param {Object} [stack] Tracks traversed source values and their merged\n\t * counterparts.\n\t */\n\tfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n\t var objValue = object[key],\n\t srcValue = source[key],\n\t stacked = stack.get(srcValue);\n\t\n\t if (stacked) {\n\t assignMergeValue(object, key, stacked);\n\t return;\n\t }\n\t var newValue = customizer\n\t ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n\t : undefined;\n\t\n\t var isCommon = newValue === undefined;\n\t\n\t if (isCommon) {\n\t newValue = srcValue;\n\t if (isArray(srcValue) || isTypedArray(srcValue)) {\n\t if (isArray(objValue)) {\n\t newValue = objValue;\n\t }\n\t else if (isArrayLikeObject(objValue)) {\n\t newValue = copyArray(objValue);\n\t }\n\t else {\n\t isCommon = false;\n\t newValue = baseClone(srcValue, true);\n\t }\n\t }\n\t else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n\t if (isArguments(objValue)) {\n\t newValue = toPlainObject(objValue);\n\t }\n\t else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n\t isCommon = false;\n\t newValue = baseClone(srcValue, true);\n\t }\n\t else {\n\t newValue = objValue;\n\t }\n\t }\n\t else {\n\t isCommon = false;\n\t }\n\t }\n\t if (isCommon) {\n\t // Recursively merge objects and arrays (susceptible to call stack limits).\n\t stack.set(srcValue, newValue);\n\t mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n\t stack['delete'](srcValue);\n\t }\n\t assignMergeValue(object, key, newValue);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n\t *\n\t * @private\n\t * @param {Function} func The function to apply a rest parameter to.\n\t * @param {number} [start=func.length-1] The start position of the rest parameter.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction baseRest(func, start) {\n\t start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n\t return function() {\n\t var args = arguments,\n\t index = -1,\n\t length = nativeMax(args.length - start, 0),\n\t array = Array(length);\n\t\n\t while (++index < length) {\n\t array[index] = args[start + index];\n\t }\n\t index = -1;\n\t var otherArgs = Array(start + 1);\n\t while (++index < start) {\n\t otherArgs[index] = args[index];\n\t }\n\t otherArgs[start] = array;\n\t return apply(func, this, otherArgs);\n\t };\n\t}\n\t\n\t/**\n\t * Creates a clone of `buffer`.\n\t *\n\t * @private\n\t * @param {Buffer} buffer The buffer to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Buffer} Returns the cloned buffer.\n\t */\n\tfunction cloneBuffer(buffer, isDeep) {\n\t if (isDeep) {\n\t return buffer.slice();\n\t }\n\t var result = new buffer.constructor(buffer.length);\n\t buffer.copy(result);\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a clone of `arrayBuffer`.\n\t *\n\t * @private\n\t * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n\t * @returns {ArrayBuffer} Returns the cloned array buffer.\n\t */\n\tfunction cloneArrayBuffer(arrayBuffer) {\n\t var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n\t new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a clone of `dataView`.\n\t *\n\t * @private\n\t * @param {Object} dataView The data view to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned data view.\n\t */\n\tfunction cloneDataView(dataView, isDeep) {\n\t var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n\t return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n\t}\n\t\n\t/**\n\t * Creates a clone of `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to clone.\n\t * @param {Function} cloneFunc The function to clone values.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned map.\n\t */\n\tfunction cloneMap(map, isDeep, cloneFunc) {\n\t var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n\t return arrayReduce(array, addMapEntry, new map.constructor);\n\t}\n\t\n\t/**\n\t * Creates a clone of `regexp`.\n\t *\n\t * @private\n\t * @param {Object} regexp The regexp to clone.\n\t * @returns {Object} Returns the cloned regexp.\n\t */\n\tfunction cloneRegExp(regexp) {\n\t var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n\t result.lastIndex = regexp.lastIndex;\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a clone of `set`.\n\t *\n\t * @private\n\t * @param {Object} set The set to clone.\n\t * @param {Function} cloneFunc The function to clone values.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned set.\n\t */\n\tfunction cloneSet(set, isDeep, cloneFunc) {\n\t var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n\t return arrayReduce(array, addSetEntry, new set.constructor);\n\t}\n\t\n\t/**\n\t * Creates a clone of the `symbol` object.\n\t *\n\t * @private\n\t * @param {Object} symbol The symbol object to clone.\n\t * @returns {Object} Returns the cloned symbol object.\n\t */\n\tfunction cloneSymbol(symbol) {\n\t return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n\t}\n\t\n\t/**\n\t * Creates a clone of `typedArray`.\n\t *\n\t * @private\n\t * @param {Object} typedArray The typed array to clone.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the cloned typed array.\n\t */\n\tfunction cloneTypedArray(typedArray, isDeep) {\n\t var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n\t return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n\t}\n\t\n\t/**\n\t * Copies the values of `source` to `array`.\n\t *\n\t * @private\n\t * @param {Array} source The array to copy values from.\n\t * @param {Array} [array=[]] The array to copy values to.\n\t * @returns {Array} Returns `array`.\n\t */\n\tfunction copyArray(source, array) {\n\t var index = -1,\n\t length = source.length;\n\t\n\t array || (array = Array(length));\n\t while (++index < length) {\n\t array[index] = source[index];\n\t }\n\t return array;\n\t}\n\t\n\t/**\n\t * Copies properties of `source` to `object`.\n\t *\n\t * @private\n\t * @param {Object} source The object to copy properties from.\n\t * @param {Array} props The property identifiers to copy.\n\t * @param {Object} [object={}] The object to copy properties to.\n\t * @param {Function} [customizer] The function to customize copied values.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction copyObject(source, props, object, customizer) {\n\t object || (object = {});\n\t\n\t var index = -1,\n\t length = props.length;\n\t\n\t while (++index < length) {\n\t var key = props[index];\n\t\n\t var newValue = customizer\n\t ? customizer(object[key], source[key], key, object, source)\n\t : undefined;\n\t\n\t assignValue(object, key, newValue === undefined ? source[key] : newValue);\n\t }\n\t return object;\n\t}\n\t\n\t/**\n\t * Copies own symbol properties of `source` to `object`.\n\t *\n\t * @private\n\t * @param {Object} source The object to copy symbols from.\n\t * @param {Object} [object={}] The object to copy symbols to.\n\t * @returns {Object} Returns `object`.\n\t */\n\tfunction copySymbols(source, object) {\n\t return copyObject(source, getSymbols(source), object);\n\t}\n\t\n\t/**\n\t * Creates a function like `_.assign`.\n\t *\n\t * @private\n\t * @param {Function} assigner The function to assign values.\n\t * @returns {Function} Returns the new assigner function.\n\t */\n\tfunction createAssigner(assigner) {\n\t return baseRest(function(object, sources) {\n\t var index = -1,\n\t length = sources.length,\n\t customizer = length > 1 ? sources[length - 1] : undefined,\n\t guard = length > 2 ? sources[2] : undefined;\n\t\n\t customizer = (assigner.length > 3 && typeof customizer == 'function')\n\t ? (length--, customizer)\n\t : undefined;\n\t\n\t if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n\t customizer = length < 3 ? undefined : customizer;\n\t length = 1;\n\t }\n\t object = Object(object);\n\t while (++index < length) {\n\t var source = sources[index];\n\t if (source) {\n\t assigner(object, source, index, customizer);\n\t }\n\t }\n\t return object;\n\t });\n\t}\n\t\n\t/**\n\t * Creates an array of own enumerable property names and symbols of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names and symbols.\n\t */\n\tfunction getAllKeys(object) {\n\t return baseGetAllKeys(object, keys, getSymbols);\n\t}\n\t\n\t/**\n\t * Gets the data for `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to query.\n\t * @param {string} key The reference key.\n\t * @returns {*} Returns the map data.\n\t */\n\tfunction getMapData(map, key) {\n\t var data = map.__data__;\n\t return isKeyable(key)\n\t ? data[typeof key == 'string' ? 'string' : 'hash']\n\t : data.map;\n\t}\n\t\n\t/**\n\t * Gets the native function at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the method to get.\n\t * @returns {*} Returns the function if it's native, else `undefined`.\n\t */\n\tfunction getNative(object, key) {\n\t var value = getValue(object, key);\n\t return baseIsNative(value) ? value : undefined;\n\t}\n\t\n\t/**\n\t * Creates an array of the own enumerable symbol properties of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of symbols.\n\t */\n\tvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\t\n\t/**\n\t * Gets the `toStringTag` of `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tvar getTag = baseGetTag;\n\t\n\t// Fallback for data views, maps, sets, and weak maps in IE 11,\n\t// for data views in Edge < 14, and promises in Node.js.\n\tif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n\t (Map && getTag(new Map) != mapTag) ||\n\t (Promise && getTag(Promise.resolve()) != promiseTag) ||\n\t (Set && getTag(new Set) != setTag) ||\n\t (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n\t getTag = function(value) {\n\t var result = objectToString.call(value),\n\t Ctor = result == objectTag ? value.constructor : undefined,\n\t ctorString = Ctor ? toSource(Ctor) : undefined;\n\t\n\t if (ctorString) {\n\t switch (ctorString) {\n\t case dataViewCtorString: return dataViewTag;\n\t case mapCtorString: return mapTag;\n\t case promiseCtorString: return promiseTag;\n\t case setCtorString: return setTag;\n\t case weakMapCtorString: return weakMapTag;\n\t }\n\t }\n\t return result;\n\t };\n\t}\n\t\n\t/**\n\t * Initializes an array clone.\n\t *\n\t * @private\n\t * @param {Array} array The array to clone.\n\t * @returns {Array} Returns the initialized clone.\n\t */\n\tfunction initCloneArray(array) {\n\t var length = array.length,\n\t result = array.constructor(length);\n\t\n\t // Add properties assigned by `RegExp#exec`.\n\t if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n\t result.index = array.index;\n\t result.input = array.input;\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Initializes an object clone.\n\t *\n\t * @private\n\t * @param {Object} object The object to clone.\n\t * @returns {Object} Returns the initialized clone.\n\t */\n\tfunction initCloneObject(object) {\n\t return (typeof object.constructor == 'function' && !isPrototype(object))\n\t ? baseCreate(getPrototype(object))\n\t : {};\n\t}\n\t\n\t/**\n\t * Initializes an object clone based on its `toStringTag`.\n\t *\n\t * **Note:** This function only supports cloning values with tags of\n\t * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n\t *\n\t * @private\n\t * @param {Object} object The object to clone.\n\t * @param {string} tag The `toStringTag` of the object to clone.\n\t * @param {Function} cloneFunc The function to clone values.\n\t * @param {boolean} [isDeep] Specify a deep clone.\n\t * @returns {Object} Returns the initialized clone.\n\t */\n\tfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n\t var Ctor = object.constructor;\n\t switch (tag) {\n\t case arrayBufferTag:\n\t return cloneArrayBuffer(object);\n\t\n\t case boolTag:\n\t case dateTag:\n\t return new Ctor(+object);\n\t\n\t case dataViewTag:\n\t return cloneDataView(object, isDeep);\n\t\n\t case float32Tag: case float64Tag:\n\t case int8Tag: case int16Tag: case int32Tag:\n\t case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n\t return cloneTypedArray(object, isDeep);\n\t\n\t case mapTag:\n\t return cloneMap(object, isDeep, cloneFunc);\n\t\n\t case numberTag:\n\t case stringTag:\n\t return new Ctor(object);\n\t\n\t case regexpTag:\n\t return cloneRegExp(object);\n\t\n\t case setTag:\n\t return cloneSet(object, isDeep, cloneFunc);\n\t\n\t case symbolTag:\n\t return cloneSymbol(object);\n\t }\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like index.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n\t * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n\t */\n\tfunction isIndex(value, length) {\n\t length = length == null ? MAX_SAFE_INTEGER : length;\n\t return !!length &&\n\t (typeof value == 'number' || reIsUint.test(value)) &&\n\t (value > -1 && value % 1 == 0 && value < length);\n\t}\n\t\n\t/**\n\t * Checks if the given arguments are from an iteratee call.\n\t *\n\t * @private\n\t * @param {*} value The potential iteratee value argument.\n\t * @param {*} index The potential iteratee index or key argument.\n\t * @param {*} object The potential iteratee object argument.\n\t * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n\t * else `false`.\n\t */\n\tfunction isIterateeCall(value, index, object) {\n\t if (!isObject(object)) {\n\t return false;\n\t }\n\t var type = typeof index;\n\t if (type == 'number'\n\t ? (isArrayLike(object) && isIndex(index, object.length))\n\t : (type == 'string' && index in object)\n\t ) {\n\t return eq(object[index], value);\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * Checks if `value` is suitable for use as unique object key.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n\t */\n\tfunction isKeyable(value) {\n\t var type = typeof value;\n\t return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n\t ? (value !== '__proto__')\n\t : (value === null);\n\t}\n\t\n\t/**\n\t * Checks if `func` has its source masked.\n\t *\n\t * @private\n\t * @param {Function} func The function to check.\n\t * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n\t */\n\tfunction isMasked(func) {\n\t return !!maskSrcKey && (maskSrcKey in func);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a prototype object.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n\t */\n\tfunction isPrototype(value) {\n\t var Ctor = value && value.constructor,\n\t proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\t\n\t return value === proto;\n\t}\n\t\n\t/**\n\t * This function is like\n\t * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * except that it includes inherited enumerable properties.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction nativeKeysIn(object) {\n\t var result = [];\n\t if (object != null) {\n\t for (var key in Object(object)) {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Converts `func` to its source code.\n\t *\n\t * @private\n\t * @param {Function} func The function to process.\n\t * @returns {string} Returns the source code.\n\t */\n\tfunction toSource(func) {\n\t if (func != null) {\n\t try {\n\t return funcToString.call(func);\n\t } catch (e) {}\n\t try {\n\t return (func + '');\n\t } catch (e) {}\n\t }\n\t return '';\n\t}\n\t\n\t/**\n\t * Performs a\n\t * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * comparison between two values to determine if they are equivalent.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.eq(object, object);\n\t * // => true\n\t *\n\t * _.eq(object, other);\n\t * // => false\n\t *\n\t * _.eq('a', 'a');\n\t * // => true\n\t *\n\t * _.eq('a', Object('a'));\n\t * // => false\n\t *\n\t * _.eq(NaN, NaN);\n\t * // => true\n\t */\n\tfunction eq(value, other) {\n\t return value === other || (value !== value && other !== other);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely an `arguments` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArguments(function() { return arguments; }());\n\t * // => true\n\t *\n\t * _.isArguments([1, 2, 3]);\n\t * // => false\n\t */\n\tfunction isArguments(value) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n\t (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as an `Array` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n\t * @example\n\t *\n\t * _.isArray([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArray(document.body.children);\n\t * // => false\n\t *\n\t * _.isArray('abc');\n\t * // => false\n\t *\n\t * _.isArray(_.noop);\n\t * // => false\n\t */\n\tvar isArray = Array.isArray;\n\t\n\t/**\n\t * Checks if `value` is array-like. A value is considered array-like if it's\n\t * not a function and has a `value.length` that's an integer greater than or\n\t * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n\t * @example\n\t *\n\t * _.isArrayLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLike(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLike('abc');\n\t * // => true\n\t *\n\t * _.isArrayLike(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLike(value) {\n\t return value != null && isLength(value.length) && !isFunction(value);\n\t}\n\t\n\t/**\n\t * This method is like `_.isArrayLike` except that it also checks if `value`\n\t * is an object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array-like object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArrayLikeObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject('abc');\n\t * // => false\n\t *\n\t * _.isArrayLikeObject(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLikeObject(value) {\n\t return isObjectLike(value) && isArrayLike(value);\n\t}\n\t\n\t/**\n\t * Checks if `value` is a buffer.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.3.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n\t * @example\n\t *\n\t * _.isBuffer(new Buffer(2));\n\t * // => true\n\t *\n\t * _.isBuffer(new Uint8Array(2));\n\t * // => false\n\t */\n\tvar isBuffer = nativeIsBuffer || stubFalse;\n\t\n\t/**\n\t * Checks if `value` is classified as a `Function` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n\t * @example\n\t *\n\t * _.isFunction(_);\n\t * // => true\n\t *\n\t * _.isFunction(/abc/);\n\t * // => false\n\t */\n\tfunction isFunction(value) {\n\t // The use of `Object#toString` avoids issues with the `typeof` operator\n\t // in Safari 8-9 which returns 'object' for typed array and other constructors.\n\t var tag = isObject(value) ? objectToString.call(value) : '';\n\t return tag == funcTag || tag == genTag;\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like length.\n\t *\n\t * **Note:** This method is loosely based on\n\t * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n\t * @example\n\t *\n\t * _.isLength(3);\n\t * // => true\n\t *\n\t * _.isLength(Number.MIN_VALUE);\n\t * // => false\n\t *\n\t * _.isLength(Infinity);\n\t * // => false\n\t *\n\t * _.isLength('3');\n\t * // => false\n\t */\n\tfunction isLength(value) {\n\t return typeof value == 'number' &&\n\t value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n\t}\n\t\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject(value) {\n\t var type = typeof value;\n\t return !!value && (type == 'object' || type == 'function');\n\t}\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is a plain object, that is, an object created by the\n\t * `Object` constructor or one with a `[[Prototype]]` of `null`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.8.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * }\n\t *\n\t * _.isPlainObject(new Foo);\n\t * // => false\n\t *\n\t * _.isPlainObject([1, 2, 3]);\n\t * // => false\n\t *\n\t * _.isPlainObject({ 'x': 0, 'y': 0 });\n\t * // => true\n\t *\n\t * _.isPlainObject(Object.create(null));\n\t * // => true\n\t */\n\tfunction isPlainObject(value) {\n\t if (!isObjectLike(value) ||\n\t objectToString.call(value) != objectTag || isHostObject(value)) {\n\t return false;\n\t }\n\t var proto = getPrototype(value);\n\t if (proto === null) {\n\t return true;\n\t }\n\t var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n\t return (typeof Ctor == 'function' &&\n\t Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a typed array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t * @example\n\t *\n\t * _.isTypedArray(new Uint8Array);\n\t * // => true\n\t *\n\t * _.isTypedArray([]);\n\t * // => false\n\t */\n\tvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\t\n\t/**\n\t * Converts `value` to a plain object flattening inherited enumerable string\n\t * keyed properties of `value` to own properties of the plain object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to convert.\n\t * @returns {Object} Returns the converted plain object.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.assign({ 'a': 1 }, new Foo);\n\t * // => { 'a': 1, 'b': 2 }\n\t *\n\t * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n\t * // => { 'a': 1, 'b': 2, 'c': 3 }\n\t */\n\tfunction toPlainObject(value) {\n\t return copyObject(value, keysIn(value));\n\t}\n\t\n\t/**\n\t * Creates an array of the own enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects. See the\n\t * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * for more details.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keys(new Foo);\n\t * // => ['a', 'b'] (iteration order is not guaranteed)\n\t *\n\t * _.keys('hi');\n\t * // => ['0', '1']\n\t */\n\tfunction keys(object) {\n\t return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n\t}\n\t\n\t/**\n\t * Creates an array of the own and inherited enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keysIn(new Foo);\n\t * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n\t */\n\tfunction keysIn(object) {\n\t return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n\t}\n\t\n\t/**\n\t * This method is like `_.assign` except that it recursively merges own and\n\t * inherited enumerable string keyed properties of source objects into the\n\t * destination object. Source properties that resolve to `undefined` are\n\t * skipped if a destination value exists. Array and plain object properties\n\t * are merged recursively. Other objects and value types are overridden by\n\t * assignment. Source objects are applied from left to right. Subsequent\n\t * sources overwrite property assignments of previous sources.\n\t *\n\t * **Note:** This method mutates `object`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.5.0\n\t * @category Object\n\t * @param {Object} object The destination object.\n\t * @param {...Object} [sources] The source objects.\n\t * @returns {Object} Returns `object`.\n\t * @example\n\t *\n\t * var object = {\n\t * 'a': [{ 'b': 2 }, { 'd': 4 }]\n\t * };\n\t *\n\t * var other = {\n\t * 'a': [{ 'c': 3 }, { 'e': 5 }]\n\t * };\n\t *\n\t * _.merge(object, other);\n\t * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n\t */\n\tvar merge = createAssigner(function(object, source, srcIndex) {\n\t baseMerge(object, source, srcIndex);\n\t});\n\t\n\t/**\n\t * This method returns a new empty array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.13.0\n\t * @category Util\n\t * @returns {Array} Returns the new empty array.\n\t * @example\n\t *\n\t * var arrays = _.times(2, _.stubArray);\n\t *\n\t * console.log(arrays);\n\t * // => [[], []]\n\t *\n\t * console.log(arrays[0] === arrays[1]);\n\t * // => false\n\t */\n\tfunction stubArray() {\n\t return [];\n\t}\n\t\n\t/**\n\t * This method returns `false`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.13.0\n\t * @category Util\n\t * @returns {boolean} Returns `false`.\n\t * @example\n\t *\n\t * _.times(2, _.stubFalse);\n\t * // => [false, false]\n\t */\n\tfunction stubFalse() {\n\t return false;\n\t}\n\t\n\tmodule.exports = merge;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(/*! ./../webpack/buildin/module.js */ 23)(module)))\n\n/***/ },\n/* 36 */\n/*!********************************!*\\\n !*** ./src/icons/02-pause.svg ***!\n \\********************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z\\\"></path></svg>\"\n\n/***/ },\n/* 37 */\n/*!*************************************************************!*\\\n !*** ./src/components/media_control/public/closed-hand.cur ***!\n \\*************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__.p + \"a8c874b93b3d848f39a71260c57e3863.cur\";\n\n/***/ },\n/* 38 */\n/*!***********************************************!*\\\n !*** ./src/components/container/container.js ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _ui_object = __webpack_require__(/*! base/ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 78);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * Container is responsible for the video rendering and state\n\t */\n\t\n\t/**\n\t * An abstraction to represent a container for a given playback\n\t * TODO: describe its responsabilities\n\t * @class Container\n\t * @constructor\n\t * @extends UIObject\n\t * @module base\n\t */\n\tvar Container = function (_UIObject) {\n\t _inherits(Container, _UIObject);\n\t\n\t _createClass(Container, [{\n\t key: 'name',\n\t\n\t /**\n\t * container's name\n\t * @method name\n\t * @default Container\n\t * @return {String} container's name\n\t */\n\t get: function get() {\n\t return 'Container';\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return { class: 'container', 'data-container': '' };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'click': 'clicked',\n\t 'dblclick': 'dblClicked',\n\t 'doubleTap': 'dblClicked',\n\t 'contextmenu': 'onContextMenu',\n\t 'mouseenter': 'mouseEnter',\n\t 'mouseleave': 'mouseLeave'\n\t };\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return this.playback.ended;\n\t }\n\t\n\t /**\n\t * Determine if the playback is having to buffer in order for\n\t * playback to be smooth.\n\t * (i.e if a live stream is playing smoothly, this will be false)\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return this.playback.buffering;\n\t }\n\t\n\t /**\n\t * The internationalization plugin.\n\t * @property i18n\n\t * @type {Strings}\n\t */\n\t\n\t }, {\n\t key: 'i18n',\n\t get: function get() {\n\t return this._i18n;\n\t }\n\t\n\t /**\n\t * it builds a container\n\t * @method constructor\n\t * @param {Object} options the options object\n\t * @param {Strings} i18n the internationalization component\n\t */\n\t\n\t }]);\n\t\n\t function Container(options, i18n) {\n\t _classCallCheck(this, Container);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));\n\t\n\t _this._i18n = i18n;\n\t _this.currentTime = 0;\n\t _this.volume = 100;\n\t _this.playback = options.playback;\n\t _this.settings = _clapprZepto2.default.extend({}, _this.playback.settings);\n\t _this.isReady = false;\n\t _this.mediaControlDisabled = false;\n\t _this.plugins = [_this.playback];\n\t _this.bindEvents();\n\t return _this;\n\t }\n\t\n\t /**\n\t * binds playback events to the methods of the container.\n\t * it listens to playback's events and triggers them as container events.\n\t *\n\t * | Playback |\n\t * |----------|\n\t * | progress |\n\t * | timeupdate |\n\t * | ready |\n\t * | buffering |\n\t * | bufferfull |\n\t * | settingsupdate |\n\t * | loadedmetadata |\n\t * | highdefinitionupdate |\n\t * | bitrate |\n\t * | playbackstate |\n\t * | dvr |\n\t * | mediacontrol_disable |\n\t * | mediacontrol_enable |\n\t * | ended |\n\t * | play |\n\t * | pause |\n\t * | error |\n\t *\n\t * ps: the events usually translate from PLABACK_x to CONTAINER_x, you can check all the events at `Event` class.\n\t *\n\t * @method bindEvents\n\t */\n\t\n\t\n\t Container.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_PROGRESS, this.progress);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_TIMEUPDATE, this.timeUpdated);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_READY, this.ready);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_BUFFERING, this.onBuffering);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_BUFFERFULL, this.bufferfull);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_SETTINGSUPDATE, this.settingsUpdate);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_LOADEDMETADATA, this.loadedMetadata);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_BITRATE, this.updateBitrate);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_PLAYBACKSTATE, this.playbackStateChanged);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_DVR, this.playbackDvrStateChanged);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_MEDIACONTROL_DISABLE, this.disableMediaControl);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_MEDIACONTROL_ENABLE, this.enableMediaControl);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_ENDED, this.onEnded);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_PLAY, this.playing);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_PAUSE, this.paused);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_STOP, this.stopped);\n\t this.listenTo(this.playback, _events2.default.PLAYBACK_ERROR, this.error);\n\t };\n\t\n\t Container.prototype.playbackStateChanged = function playbackStateChanged(state) {\n\t this.trigger(_events2.default.CONTAINER_PLAYBACKSTATE, state);\n\t };\n\t\n\t Container.prototype.playbackDvrStateChanged = function playbackDvrStateChanged(dvrInUse) {\n\t this.settings = this.playback.settings;\n\t this.dvrInUse = dvrInUse;\n\t this.trigger(_events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, dvrInUse);\n\t };\n\t\n\t Container.prototype.updateBitrate = function updateBitrate(newBitrate) {\n\t this.trigger(_events2.default.CONTAINER_BITRATE, newBitrate);\n\t };\n\t\n\t Container.prototype.statsReport = function statsReport(metrics) {\n\t this.trigger(_events2.default.CONTAINER_STATS_REPORT, metrics);\n\t };\n\t\n\t Container.prototype.getPlaybackType = function getPlaybackType() {\n\t return this.playback.getPlaybackType();\n\t };\n\t\n\t /**\n\t * returns `true` if DVR is enable otherwise `false`.\n\t * @method isDvrEnabled\n\t * @return {Boolean}\n\t */\n\t\n\t\n\t Container.prototype.isDvrEnabled = function isDvrEnabled() {\n\t return !!this.playback.dvrEnabled;\n\t };\n\t\n\t /**\n\t * returns `true` if DVR is in use otherwise `false`.\n\t * @method isDvrInUse\n\t * @return {Boolean}\n\t */\n\t\n\t\n\t Container.prototype.isDvrInUse = function isDvrInUse() {\n\t return !!this.dvrInUse;\n\t };\n\t\n\t /**\n\t * destroys the container\n\t * @method destroy\n\t */\n\t\n\t\n\t Container.prototype.destroy = function destroy() {\n\t this.trigger(_events2.default.CONTAINER_DESTROYED, this, this.name);\n\t this.stopListening();\n\t this.plugins.forEach(function (plugin) {\n\t return plugin.destroy();\n\t });\n\t this.$el.remove();\n\t };\n\t\n\t Container.prototype.setStyle = function setStyle(style) {\n\t this.$el.css(style);\n\t };\n\t\n\t Container.prototype.animate = function animate(style, duration) {\n\t return this.$el.animate(style, duration).promise();\n\t };\n\t\n\t Container.prototype.ready = function ready() {\n\t this.isReady = true;\n\t this.trigger(_events2.default.CONTAINER_READY, this.name);\n\t };\n\t\n\t Container.prototype.isPlaying = function isPlaying() {\n\t return this.playback.isPlaying();\n\t };\n\t\n\t Container.prototype.getStartTimeOffset = function getStartTimeOffset() {\n\t return this.playback.getStartTimeOffset();\n\t };\n\t\n\t Container.prototype.getCurrentTime = function getCurrentTime() {\n\t return this.currentTime;\n\t };\n\t\n\t Container.prototype.getDuration = function getDuration() {\n\t return this.playback.getDuration();\n\t };\n\t\n\t Container.prototype.error = function error(errorObj) {\n\t if (!this.isReady) {\n\t this.ready();\n\t }\n\t this.trigger(_events2.default.CONTAINER_ERROR, { error: errorObj, container: this }, this.name);\n\t };\n\t\n\t Container.prototype.loadedMetadata = function loadedMetadata(metadata) {\n\t this.trigger(_events2.default.CONTAINER_LOADEDMETADATA, metadata);\n\t };\n\t\n\t Container.prototype.timeUpdated = function timeUpdated(timeProgress) {\n\t this.currentTime = timeProgress.current;\n\t this.trigger(_events2.default.CONTAINER_TIMEUPDATE, timeProgress, this.name);\n\t };\n\t\n\t Container.prototype.progress = function progress() {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t this.trigger.apply(this, [_events2.default.CONTAINER_PROGRESS].concat(args, [this.name]));\n\t };\n\t\n\t Container.prototype.playing = function playing() {\n\t this.trigger(_events2.default.CONTAINER_PLAY, this.name);\n\t };\n\t\n\t Container.prototype.paused = function paused() {\n\t this.trigger(_events2.default.CONTAINER_PAUSE, this.name);\n\t };\n\t\n\t /**\n\t * plays the playback\n\t * @method play\n\t */\n\t\n\t\n\t Container.prototype.play = function play() {\n\t this.playback.play();\n\t };\n\t\n\t /**\n\t * stops the playback\n\t * @method stop\n\t */\n\t\n\t\n\t Container.prototype.stop = function stop() {\n\t this.playback.stop();\n\t this.currentTime = 0;\n\t };\n\t\n\t /**\n\t * pauses the playback\n\t * @method pause\n\t */\n\t\n\t\n\t Container.prototype.pause = function pause() {\n\t this.playback.pause();\n\t };\n\t\n\t Container.prototype.onEnded = function onEnded() {\n\t this.trigger(_events2.default.CONTAINER_ENDED, this, this.name);\n\t this.currentTime = 0;\n\t };\n\t\n\t Container.prototype.stopped = function stopped() {\n\t this.trigger(_events2.default.CONTAINER_STOP);\n\t };\n\t\n\t Container.prototype.clicked = function clicked() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.trigger(_events2.default.CONTAINER_CLICK, this, this.name);\n\t }\n\t };\n\t\n\t Container.prototype.dblClicked = function dblClicked() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.trigger(_events2.default.CONTAINER_DBLCLICK, this, this.name);\n\t }\n\t };\n\t\n\t Container.prototype.onContextMenu = function onContextMenu() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.trigger(_events2.default.CONTAINER_CONTEXTMENU, this, this.name);\n\t }\n\t };\n\t\n\t Container.prototype.seek = function seek(time) {\n\t this.trigger(_events2.default.CONTAINER_SEEK, time, this.name);\n\t this.playback.seek(time);\n\t };\n\t\n\t Container.prototype.seekPercentage = function seekPercentage(percentage) {\n\t var duration = this.getDuration();\n\t if (percentage >= 0 && percentage <= 100) {\n\t var time = duration * (percentage / 100);\n\t this.seek(time);\n\t }\n\t };\n\t\n\t Container.prototype.setVolume = function setVolume(value) {\n\t this.volume = parseInt(value, 10);\n\t this.trigger(_events2.default.CONTAINER_VOLUME, value, this.name);\n\t this.playback.volume(value);\n\t };\n\t\n\t Container.prototype.fullscreen = function fullscreen() {\n\t this.trigger(_events2.default.CONTAINER_FULLSCREEN, this.name);\n\t };\n\t\n\t Container.prototype.onBuffering = function onBuffering() {\n\t this.trigger(_events2.default.CONTAINER_STATE_BUFFERING, this.name);\n\t };\n\t\n\t Container.prototype.bufferfull = function bufferfull() {\n\t this.trigger(_events2.default.CONTAINER_STATE_BUFFERFULL, this.name);\n\t };\n\t\n\t /**\n\t * adds plugin to the container\n\t * @method addPlugin\n\t * @param {Object} plugin\n\t */\n\t\n\t\n\t Container.prototype.addPlugin = function addPlugin(plugin) {\n\t this.plugins.push(plugin);\n\t };\n\t\n\t /**\n\t * checks if a plugin, given its name, exist\n\t * @method hasPlugin\n\t * @param {String} name\n\t * @return {Boolean}\n\t */\n\t\n\t\n\t Container.prototype.hasPlugin = function hasPlugin(name) {\n\t return !!this.getPlugin(name);\n\t };\n\t\n\t /**\n\t * get the plugin given its name\n\t * @method getPlugin\n\t * @param {String} name\n\t */\n\t\n\t\n\t Container.prototype.getPlugin = function getPlugin(name) {\n\t return this.plugins.filter(function (plugin) {\n\t return plugin.name === name;\n\t })[0];\n\t };\n\t\n\t Container.prototype.mouseEnter = function mouseEnter() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.trigger(_events2.default.CONTAINER_MOUSE_ENTER);\n\t }\n\t };\n\t\n\t Container.prototype.mouseLeave = function mouseLeave() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.trigger(_events2.default.CONTAINER_MOUSE_LEAVE);\n\t }\n\t };\n\t\n\t Container.prototype.settingsUpdate = function settingsUpdate() {\n\t this.settings = this.playback.settings;\n\t this.trigger(_events2.default.CONTAINER_SETTINGSUPDATE);\n\t };\n\t\n\t Container.prototype.highDefinitionUpdate = function highDefinitionUpdate(isHD) {\n\t this.trigger(_events2.default.CONTAINER_HIGHDEFINITIONUPDATE, isHD);\n\t };\n\t\n\t Container.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n\t return this.playback.isHighDefinitionInUse();\n\t };\n\t\n\t Container.prototype.disableMediaControl = function disableMediaControl() {\n\t if (!this.mediaControlDisabled) {\n\t this.mediaControlDisabled = true;\n\t this.trigger(_events2.default.CONTAINER_MEDIACONTROL_DISABLE);\n\t }\n\t };\n\t\n\t Container.prototype.enableMediaControl = function enableMediaControl() {\n\t if (this.mediaControlDisabled) {\n\t this.mediaControlDisabled = false;\n\t this.trigger(_events2.default.CONTAINER_MEDIACONTROL_ENABLE);\n\t }\n\t };\n\t\n\t Container.prototype.updateStyle = function updateStyle() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.$el.removeClass('chromeless');\n\t } else {\n\t this.$el.addClass('chromeless');\n\t }\n\t };\n\t\n\t /**\n\t * enables to configure the container after its creation\n\t * @method configure\n\t * @param {Object} options all the options to change in form of a javascript object\n\t */\n\t\n\t\n\t Container.prototype.configure = function configure(options) {\n\t this._options = _clapprZepto2.default.extend(this._options, options);\n\t this.updateStyle();\n\t this.trigger(_events2.default.CONTAINER_OPTIONS_CHANGE);\n\t };\n\t\n\t Container.prototype.render = function render() {\n\t var s = _styler2.default.getStyleFor(_style2.default);\n\t this.$el.append(s);\n\t this.$el.append(this.playback.render().el);\n\t this.updateStyle();\n\t return this;\n\t };\n\t\n\t return Container;\n\t}(_ui_object2.default);\n\t\n\texports.default = Container;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 39 */\n/*!***************************************************************!*\\\n !*** ./src/components/container_factory/container_factory.js ***!\n \\***************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _base_object = __webpack_require__(/*! base/base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _container = __webpack_require__(/*! components/container */ 24);\n\t\n\tvar _container2 = _interopRequireDefault(_container);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.isplainobject */ 100);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The ContainerFactory is responsible for manage playback bootstrap and create containers.\n\t */\n\t\n\tvar ContainerFactory = function (_BaseObject) {\n\t _inherits(ContainerFactory, _BaseObject);\n\t\n\t _createClass(ContainerFactory, [{\n\t key: 'options',\n\t get: function get() {\n\t return this._options;\n\t },\n\t set: function set(options) {\n\t this._options = options;\n\t }\n\t }]);\n\t\n\t function ContainerFactory(options, loader, i18n) {\n\t _classCallCheck(this, ContainerFactory);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));\n\t\n\t _this._i18n = i18n;\n\t _this.loader = loader;\n\t return _this;\n\t }\n\t\n\t ContainerFactory.prototype.createContainers = function createContainers() {\n\t var _this2 = this;\n\t\n\t return _clapprZepto2.default.Deferred(function (promise) {\n\t promise.resolve(_this2.options.sources.map(function (source) {\n\t return _this2.createContainer(source);\n\t }));\n\t });\n\t };\n\t\n\t ContainerFactory.prototype.findPlaybackPlugin = function findPlaybackPlugin(source, mimeType) {\n\t return this.loader.playbackPlugins.filter(function (p) {\n\t return p.canPlay(source, mimeType);\n\t })[0];\n\t };\n\t\n\t ContainerFactory.prototype.createContainer = function createContainer(source) {\n\t var resolvedSource = null,\n\t mimeType = this.options.mimeType;\n\t if ((0, _lodash2.default)(source)) {\n\t resolvedSource = source.source.toString();\n\t if (source.mimeType) {\n\t mimeType = source.mimeType;\n\t }\n\t } else {\n\t resolvedSource = source.toString();\n\t }\n\t\n\t if (resolvedSource.match(/^\\/\\//)) resolvedSource = window.location.protocol + resolvedSource;\n\t\n\t var options = _clapprZepto2.default.extend({}, this.options, {\n\t src: resolvedSource,\n\t mimeType: mimeType\n\t });\n\t var playbackPlugin = this.findPlaybackPlugin(resolvedSource, mimeType);\n\t var playback = new playbackPlugin(options, this._i18n);\n\t\n\t options = _clapprZepto2.default.extend({}, options, { playback: playback });\n\t\n\t var container = new _container2.default(options, this._i18n);\n\t var defer = _clapprZepto2.default.Deferred();\n\t defer.promise(container);\n\t this.addContainerPlugins(container);\n\t this.listenToOnce(container, _events2.default.CONTAINER_READY, function () {\n\t return defer.resolve(container);\n\t });\n\t return container;\n\t };\n\t\n\t ContainerFactory.prototype.addContainerPlugins = function addContainerPlugins(container) {\n\t this.loader.containerPlugins.forEach(function (Plugin) {\n\t container.addPlugin(new Plugin(container));\n\t });\n\t };\n\t\n\t return ContainerFactory;\n\t}(_base_object2.default);\n\t\n\texports.default = ContainerFactory;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 40 */\n/*!***************************************************!*\\\n !*** ./src/components/container_factory/index.js ***!\n \\***************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./container_factory */ 39);\n\n/***/ },\n/* 41 */\n/*!*************************************!*\\\n !*** ./src/components/core/core.js ***!\n \\*************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _ui_object = __webpack_require__(/*! base/ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _container_factory = __webpack_require__(/*! components/container_factory */ 40);\n\t\n\tvar _container_factory2 = _interopRequireDefault(_container_factory);\n\t\n\tvar _media_control = __webpack_require__(/*! components/media_control */ 27);\n\t\n\tvar _media_control2 = _interopRequireDefault(_media_control);\n\t\n\tvar _mediator = __webpack_require__(/*! components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tvar _player_info = __webpack_require__(/*! components/player_info */ 15);\n\t\n\tvar _player_info2 = _interopRequireDefault(_player_info);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 79);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The Core is responsible to manage Containers, the mediator, MediaControl\n\t * and the player state.\n\t * @class Core\n\t * @constructor\n\t * @extends UIObject\n\t * @module components\n\t */\n\tvar Core = function (_UIObject) {\n\t _inherits(Core, _UIObject);\n\t\n\t _createClass(Core, [{\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'webkitfullscreenchange': 'handleFullscreenChange',\n\t 'mousemove': 'showMediaControl',\n\t 'mouseleave': 'hideMediaControl'\n\t };\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'data-player': '',\n\t tabindex: 9999\n\t };\n\t }\n\t\n\t /**\n\t * checks if the core is ready.\n\t * @property isReady\n\t * @type {Boolean} `true` if the core is ready, otherwise `false`\n\t */\n\t\n\t }, {\n\t key: 'isReady',\n\t get: function get() {\n\t return !!this.ready;\n\t }\n\t\n\t /**\n\t * The internationalization plugin.\n\t * @property i18n\n\t * @type {Strings}\n\t */\n\t\n\t }, {\n\t key: 'i18n',\n\t get: function get() {\n\t return this.getPlugin('strings') || { t: function t(key) {\n\t return key;\n\t } };\n\t }\n\t }]);\n\t\n\t function Core(options) {\n\t _classCallCheck(this, Core);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));\n\t\n\t _this.playerInfo = _player_info2.default.getInstance(options.playerId);\n\t _this.firstResize = true;\n\t _this.plugins = [];\n\t _this.containers = [];\n\t _this.setupMediaControl(null);\n\t //FIXME fullscreen api sucks\n\t _this._boundFullscreenHandler = function () {\n\t return _this.handleFullscreenChange();\n\t };\n\t (0, _clapprZepto2.default)(document).bind('fullscreenchange', _this._boundFullscreenHandler);\n\t (0, _clapprZepto2.default)(document).bind('MSFullscreenChange', _this._boundFullscreenHandler);\n\t (0, _clapprZepto2.default)(document).bind('mozfullscreenchange', _this._boundFullscreenHandler);\n\t return _this;\n\t }\n\t\n\t Core.prototype.createContainers = function createContainers(options) {\n\t var _this2 = this;\n\t\n\t this.defer = _clapprZepto2.default.Deferred();\n\t this.defer.promise(this);\n\t this.containerFactory = new _container_factory2.default(options, options.loader, this.i18n);\n\t this.containerFactory.createContainers().then(function (containers) {\n\t return _this2.setupContainers(containers);\n\t }).then(function (containers) {\n\t return _this2.resolveOnContainersReady(containers);\n\t });\n\t };\n\t\n\t Core.prototype.updateSize = function updateSize() {\n\t if (_utils.Fullscreen.isFullscreen()) {\n\t this.setFullscreen();\n\t } else {\n\t this.setPlayerSize();\n\t }\n\t };\n\t\n\t Core.prototype.setFullscreen = function setFullscreen() {\n\t if (!_browser2.default.isiOS) {\n\t this.$el.addClass('fullscreen');\n\t this.$el.removeAttr('style');\n\t this.playerInfo.previousSize = { width: this.options.width, height: this.options.height };\n\t this.playerInfo.currentSize = { width: (0, _clapprZepto2.default)(window).width(), height: (0, _clapprZepto2.default)(window).height() };\n\t }\n\t };\n\t\n\t Core.prototype.setPlayerSize = function setPlayerSize() {\n\t this.$el.removeClass('fullscreen');\n\t this.playerInfo.currentSize = this.playerInfo.previousSize;\n\t this.playerInfo.previousSize = { width: (0, _clapprZepto2.default)(window).width(), height: (0, _clapprZepto2.default)(window).height() };\n\t this.resize(this.playerInfo.currentSize);\n\t };\n\t\n\t Core.prototype.resize = function resize(options) {\n\t if (!(0, _utils.isNumber)(options.height) && !(0, _utils.isNumber)(options.width)) {\n\t this.el.style.height = '' + options.height;\n\t this.el.style.width = '' + options.width;\n\t } else {\n\t this.el.style.height = options.height + 'px';\n\t this.el.style.width = options.width + 'px';\n\t }\n\t this.playerInfo.previousSize = { width: this.options.width, height: this.options.height };\n\t this.options.width = options.width;\n\t this.options.height = options.height;\n\t this.playerInfo.currentSize = options;\n\t this.triggerResize(this.playerInfo.currentSize);\n\t };\n\t\n\t Core.prototype.enableResizeObserver = function enableResizeObserver() {\n\t var _this3 = this;\n\t\n\t var checkSizeCallback = function checkSizeCallback() {\n\t if (_this3.playerInfo.computedSize.width != _this3.el.clientWidth || _this3.playerInfo.computedSize.height != _this3.el.clientHeight) {\n\t _this3.playerInfo.computedSize = { width: _this3.el.clientWidth, height: _this3.el.clientHeight };\n\t _this3.triggerResize(_this3.playerInfo.computedSize);\n\t }\n\t };\n\t this.resizeObserverInterval = setInterval(checkSizeCallback, 500);\n\t };\n\t\n\t Core.prototype.triggerResize = function triggerResize(newSize) {\n\t var thereWasChange = this.firstResize || this.oldHeight !== newSize.height || this.oldWidth !== newSize.width;\n\t if (thereWasChange) {\n\t _mediator2.default.trigger(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, newSize);\n\t this.oldHeight = newSize.height;\n\t this.oldWidth = newSize.width;\n\t this.firstResize = false;\n\t }\n\t };\n\t\n\t Core.prototype.disableResizeObserver = function disableResizeObserver() {\n\t if (this.resizeObserverInterval) clearInterval(this.resizeObserverInterval);\n\t };\n\t\n\t Core.prototype.resolveOnContainersReady = function resolveOnContainersReady(containers) {\n\t var _this4 = this;\n\t\n\t _clapprZepto2.default.when.apply(_clapprZepto2.default, containers).done(function () {\n\t _this4.defer.resolve(_this4);\n\t _this4.ready = true;\n\t _this4.trigger(_events2.default.CORE_READY);\n\t });\n\t };\n\t\n\t Core.prototype.addPlugin = function addPlugin(plugin) {\n\t this.plugins.push(plugin);\n\t };\n\t\n\t Core.prototype.hasPlugin = function hasPlugin(name) {\n\t return !!this.getPlugin(name);\n\t };\n\t\n\t Core.prototype.getPlugin = function getPlugin(name) {\n\t return this.plugins.filter(function (plugin) {\n\t return plugin.name === name;\n\t })[0];\n\t };\n\t\n\t Core.prototype.load = function load(sources, mimeType) {\n\t var _this5 = this;\n\t\n\t this.options.mimeType = mimeType;\n\t sources = sources && sources.constructor === Array ? sources : [sources];\n\t this.containers.forEach(function (container) {\n\t return container.destroy();\n\t });\n\t this.mediaControl.container = null;\n\t this.containerFactory.options = _clapprZepto2.default.extend(this.options, { sources: sources });\n\t this.containerFactory.createContainers().then(function (containers) {\n\t _this5.setupContainers(containers);\n\t });\n\t };\n\t\n\t Core.prototype.destroy = function destroy() {\n\t this.disableResizeObserver();\n\t this.containers.forEach(function (container) {\n\t return container.destroy();\n\t });\n\t this.plugins.forEach(function (plugin) {\n\t return plugin.destroy();\n\t });\n\t this.$el.remove();\n\t this.mediaControl.destroy();\n\t (0, _clapprZepto2.default)(document).unbind('fullscreenchange', this._boundFullscreenHandler);\n\t (0, _clapprZepto2.default)(document).unbind('MSFullscreenChange', this._boundFullscreenHandler);\n\t (0, _clapprZepto2.default)(document).unbind('mozfullscreenchange', this._boundFullscreenHandler);\n\t };\n\t\n\t Core.prototype.handleFullscreenChange = function handleFullscreenChange() {\n\t this.trigger(_events2.default.CORE_FULLSCREEN, _utils.Fullscreen.isFullscreen());\n\t this.updateSize();\n\t this.mediaControl.show();\n\t };\n\t\n\t Core.prototype.setMediaControlContainer = function setMediaControlContainer(container) {\n\t this.mediaControl.setContainer(container);\n\t this.mediaControl.render();\n\t };\n\t\n\t Core.prototype.disableMediaControl = function disableMediaControl() {\n\t this.mediaControl.disable();\n\t this.$el.removeClass('nocursor');\n\t };\n\t\n\t Core.prototype.enableMediaControl = function enableMediaControl() {\n\t this.mediaControl.enable();\n\t };\n\t\n\t Core.prototype.removeContainer = function removeContainer(container) {\n\t this.stopListening(container);\n\t this.containers = this.containers.filter(function (c) {\n\t return c !== container;\n\t });\n\t };\n\t\n\t Core.prototype.appendContainer = function appendContainer(container) {\n\t this.listenTo(container, _events2.default.CONTAINER_DESTROYED, this.removeContainer);\n\t this.containers.push(container);\n\t };\n\t\n\t Core.prototype.setupContainers = function setupContainers(containers) {\n\t containers.map(this.appendContainer.bind(this));\n\t this.trigger(_events2.default.CORE_CONTAINERS_CREATED);\n\t this.renderContainers();\n\t this.setupMediaControl(this.getCurrentContainer());\n\t this.render();\n\t this.$el.appendTo(this.options.parentElement);\n\t return this.containers;\n\t };\n\t\n\t Core.prototype.renderContainers = function renderContainers() {\n\t var _this6 = this;\n\t\n\t this.containers.map(function (container) {\n\t return _this6.el.appendChild(container.render().el);\n\t });\n\t };\n\t\n\t Core.prototype.createContainer = function createContainer(source, options) {\n\t var container = this.containerFactory.createContainer(source, options);\n\t this.appendContainer(container);\n\t this.el.appendChild(container.render().el);\n\t return container;\n\t };\n\t\n\t Core.prototype.setupMediaControl = function setupMediaControl(container) {\n\t if (this.mediaControl) {\n\t this.mediaControl.setContainer(container);\n\t } else {\n\t this.mediaControl = this.createMediaControl(_clapprZepto2.default.extend({ container: container, focusElement: this.el }, this.options));\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_FULLSCREEN, this.toggleFullscreen);\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_SHOW, this.onMediaControlShow.bind(this, true));\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_HIDE, this.onMediaControlShow.bind(this, false));\n\t }\n\t };\n\t\n\t Core.prototype.createMediaControl = function createMediaControl(options) {\n\t if (options.mediacontrol && options.mediacontrol.external) {\n\t return new options.mediacontrol.external(options).render();\n\t } else {\n\t return new _media_control2.default(options).render();\n\t }\n\t };\n\t\n\t Core.prototype.getCurrentContainer = function getCurrentContainer() {\n\t if (!this.mediaControl || !this.mediaControl.container) {\n\t return this.containers[0];\n\t }\n\t return this.mediaControl.container;\n\t };\n\t\n\t Core.prototype.getCurrentPlayback = function getCurrentPlayback() {\n\t var container = this.getCurrentContainer();\n\t return container && container.playback;\n\t };\n\t\n\t Core.prototype.getPlaybackType = function getPlaybackType() {\n\t var container = this.getCurrentContainer();\n\t return container && container.getPlaybackType();\n\t };\n\t\n\t Core.prototype.toggleFullscreen = function toggleFullscreen() {\n\t if (!_utils.Fullscreen.isFullscreen()) {\n\t _utils.Fullscreen.requestFullscreen(this.el);\n\t if (!_browser2.default.isiOS) {\n\t this.$el.addClass('fullscreen');\n\t }\n\t } else {\n\t _utils.Fullscreen.cancelFullscreen();\n\t if (!_browser2.default.isiOS) {\n\t this.$el.removeClass('fullscreen nocursor');\n\t }\n\t }\n\t this.mediaControl.show();\n\t };\n\t\n\t Core.prototype.showMediaControl = function showMediaControl(event) {\n\t this.mediaControl.show(event);\n\t };\n\t\n\t Core.prototype.hideMediaControl = function hideMediaControl() {\n\t this.mediaControl.hide(this.options.hideMediaControlDelay);\n\t };\n\t\n\t Core.prototype.onMediaControlShow = function onMediaControlShow(showing) {\n\t this.getCurrentContainer().trigger(showing ? _events2.default.CONTAINER_MEDIACONTROL_SHOW : _events2.default.CONTAINER_MEDIACONTROL_HIDE);\n\t\n\t if (showing) this.$el.removeClass('nocursor');else if (_utils.Fullscreen.isFullscreen()) this.$el.addClass('nocursor');\n\t };\n\t\n\t /**\n\t * enables to configure the container after its creation\n\t * @method configure\n\t * @param {Object} options all the options to change in form of a javascript object\n\t */\n\t\n\t\n\t Core.prototype.configure = function configure(options) {\n\t var _this7 = this;\n\t\n\t this._options = _clapprZepto2.default.extend(this._options, options);\n\t var sources = options.source || options.sources;\n\t\n\t if (sources) {\n\t this.load(sources, options.mimeType || this.options.mimeType);\n\t } else {\n\t this.trigger(_events2.default.CORE_OPTIONS_CHANGE);\n\t\n\t this.containers.forEach(function (container) {\n\t container.configure(_this7.options);\n\t });\n\t }\n\t };\n\t\n\t Core.prototype.render = function render() {\n\t var style = _styler2.default.getStyleFor(_style2.default, { baseUrl: this.options.baseUrl });\n\t this.$el.append(style);\n\t this.$el.append(this.mediaControl.render().el);\n\t\n\t this.options.width = this.options.width || this.$el.width();\n\t this.options.height = this.options.height || this.$el.height();\n\t var size = { width: this.options.width, height: this.options.height };\n\t this.playerInfo.previousSize = this.playerInfo.currentSize = this.playerInfo.computedSize = size;\n\t this.updateSize();\n\t\n\t this.previousSize = { width: this.$el.width(), height: this.$el.height() };\n\t\n\t this.enableResizeObserver();\n\t\n\t return this;\n\t };\n\t\n\t return Core;\n\t}(_ui_object2.default);\n\t\n\texports.default = Core;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 42 */\n/*!*****************************************************!*\\\n !*** ./src/components/core_factory/core_factory.js ***!\n \\*****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _base_object = __webpack_require__(/*! base/base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _core = __webpack_require__(/*! components/core */ 25);\n\t\n\tvar _core2 = _interopRequireDefault(_core);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The Core Factory is responsible for instantiate the core and it's plugins.\n\t * @class CoreFactory\n\t * @constructor\n\t * @extends BaseObject\n\t * @module components\n\t */\n\tvar CoreFactory = function (_BaseObject) {\n\t _inherits(CoreFactory, _BaseObject);\n\t\n\t _createClass(CoreFactory, [{\n\t key: 'loader',\n\t get: function get() {\n\t return this.player.loader;\n\t }\n\t\n\t /**\n\t * it builds the core factory\n\t * @method constructor\n\t * @param {Player} player the player object\n\t */\n\t\n\t }]);\n\t\n\t function CoreFactory(player) {\n\t _classCallCheck(this, CoreFactory);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this));\n\t\n\t _this.player = player;\n\t _this._options = player.options;\n\t return _this;\n\t }\n\t\n\t /**\n\t * creates a core and its plugins\n\t * @method create\n\t * @return {Core} created core\n\t */\n\t\n\t\n\t CoreFactory.prototype.create = function create() {\n\t this.options.loader = this.loader;\n\t this.core = new _core2.default(this.options);\n\t this.addCorePlugins();\n\t this.core.createContainers(this.options);\n\t return this.core;\n\t };\n\t\n\t /**\n\t * given the core plugins (`loader.corePlugins`) it builds each one\n\t * @method addCorePlugins\n\t * @return {Core} the core with all plugins\n\t */\n\t\n\t\n\t CoreFactory.prototype.addCorePlugins = function addCorePlugins() {\n\t var _this2 = this;\n\t\n\t this.loader.corePlugins.forEach(function (Plugin) {\n\t var plugin = new Plugin(_this2.core);\n\t _this2.core.addPlugin(plugin);\n\t _this2.setupExternalInterface(plugin);\n\t });\n\t return this.core;\n\t };\n\t\n\t CoreFactory.prototype.setupExternalInterface = function setupExternalInterface(plugin) {\n\t var externalFunctions = plugin.getExternalInterface();\n\t for (var key in externalFunctions) {\n\t this.player[key] = externalFunctions[key].bind(plugin);\n\t }\n\t };\n\t\n\t return CoreFactory;\n\t}(_base_object2.default);\n\t\n\texports.default = CoreFactory;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 43 */\n/*!**********************************************!*\\\n !*** ./src/components/core_factory/index.js ***!\n \\**********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./core_factory */ 42);\n\n/***/ },\n/* 44 */\n/*!*****************************************!*\\\n !*** ./src/components/loader/loader.js ***!\n \\*****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _base_object = __webpack_require__(/*! base/base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _player_info = __webpack_require__(/*! components/player_info */ 15);\n\t\n\tvar _player_info2 = _interopRequireDefault(_player_info);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.uniqby */ 103);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tvar _html5_video = __webpack_require__(/*! playbacks/html5_video */ 16);\n\t\n\tvar _html5_video2 = _interopRequireDefault(_html5_video);\n\t\n\tvar _flash = __webpack_require__(/*! playbacks/flash */ 28);\n\t\n\tvar _flash2 = _interopRequireDefault(_flash);\n\t\n\tvar _html5_audio = __webpack_require__(/*! playbacks/html5_audio */ 31);\n\t\n\tvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\t\n\tvar _flashls = __webpack_require__(/*! playbacks/flashls */ 29);\n\t\n\tvar _flashls2 = _interopRequireDefault(_flashls);\n\t\n\tvar _hls = __webpack_require__(/*! playbacks/hls */ 30);\n\t\n\tvar _hls2 = _interopRequireDefault(_hls);\n\t\n\tvar _html_img = __webpack_require__(/*! playbacks/html_img */ 32);\n\t\n\tvar _html_img2 = _interopRequireDefault(_html_img);\n\t\n\tvar _no_op = __webpack_require__(/*! playbacks/no_op */ 33);\n\t\n\tvar _no_op2 = _interopRequireDefault(_no_op);\n\t\n\tvar _spinner_three_bounce = __webpack_require__(/*! plugins/spinner_three_bounce */ 70);\n\t\n\tvar _spinner_three_bounce2 = _interopRequireDefault(_spinner_three_bounce);\n\t\n\tvar _stats = __webpack_require__(/*! plugins/stats */ 72);\n\t\n\tvar _stats2 = _interopRequireDefault(_stats);\n\t\n\tvar _watermark = __webpack_require__(/*! plugins/watermark */ 75);\n\t\n\tvar _watermark2 = _interopRequireDefault(_watermark);\n\t\n\tvar _poster = __webpack_require__(/*! plugins/poster */ 34);\n\t\n\tvar _poster2 = _interopRequireDefault(_poster);\n\t\n\tvar _google_analytics = __webpack_require__(/*! plugins/google_analytics */ 64);\n\t\n\tvar _google_analytics2 = _interopRequireDefault(_google_analytics);\n\t\n\tvar _click_to_pause = __webpack_require__(/*! plugins/click_to_pause */ 57);\n\t\n\tvar _click_to_pause2 = _interopRequireDefault(_click_to_pause);\n\t\n\tvar _dvr_controls = __webpack_require__(/*! plugins/dvr_controls */ 59);\n\t\n\tvar _dvr_controls2 = _interopRequireDefault(_dvr_controls);\n\t\n\tvar _favicon = __webpack_require__(/*! plugins/favicon */ 62);\n\t\n\tvar _favicon2 = _interopRequireDefault(_favicon);\n\t\n\tvar _seek_time = __webpack_require__(/*! plugins/seek_time */ 67);\n\t\n\tvar _seek_time2 = _interopRequireDefault(_seek_time);\n\t\n\tvar _sources = __webpack_require__(/*! plugins/sources */ 69);\n\t\n\tvar _sources2 = _interopRequireDefault(_sources);\n\t\n\tvar _end_video = __webpack_require__(/*! plugins/end_video */ 60);\n\t\n\tvar _end_video2 = _interopRequireDefault(_end_video);\n\t\n\tvar _strings = __webpack_require__(/*! plugins/strings */ 74);\n\t\n\tvar _strings2 = _interopRequireDefault(_strings);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/* Playback Plugins */\n\t\n\t\n\t/* Container Plugins */\n\t\n\t\n\t/* Core Plugins */\n\t\n\t\n\t/**\n\t * It keeps a list of the default plugins (playback, container, core) and it merges external plugins with its internals.\n\t * @class Loader\n\t * @constructor\n\t * @extends BaseObject\n\t * @module components\n\t */\n\tvar Loader = function (_BaseObject) {\n\t _inherits(Loader, _BaseObject);\n\t\n\t /**\n\t * builds the loader\n\t * @method constructor\n\t * @param {Object} externalPlugins the external plugins\n\t * @param {Number} playerId you can embed multiple instances of clappr, therefore this is the unique id of each one.\n\t */\n\t function Loader(externalPlugins, playerId) {\n\t _classCallCheck(this, Loader);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this));\n\t\n\t _this.playerId = playerId;\n\t _this.playbackPlugins = [_hls2.default, _html5_video2.default, _html5_audio2.default, _flash2.default, _flashls2.default, _html_img2.default, _no_op2.default];\n\t _this.containerPlugins = [_spinner_three_bounce2.default, _watermark2.default, _poster2.default, _stats2.default, _google_analytics2.default, _click_to_pause2.default];\n\t _this.corePlugins = [_dvr_controls2.default, _favicon2.default, _seek_time2.default, _sources2.default, _end_video2.default, _strings2.default];\n\t if (externalPlugins) {\n\t if (!Array.isArray(externalPlugins)) {\n\t _this.validateExternalPluginsType(externalPlugins);\n\t }\n\t _this.addExternalPlugins(externalPlugins);\n\t }\n\t return _this;\n\t }\n\t\n\t /**\n\t * groups by type the external plugins that were passed through `options.plugins` it they're on a flat array\n\t * @method addExternalPlugins\n\t * @private\n\t * @param {Object} an config object or an array of plugins\n\t * @return {Object} plugins the config object with the plugins separated by type\n\t */\n\t\n\t\n\t Loader.prototype.groupPluginsByType = function groupPluginsByType(plugins) {\n\t if (Array.isArray(plugins)) {\n\t plugins = plugins.reduce(function (memo, plugin) {\n\t memo[plugin.type] || (memo[plugin.type] = []);\n\t memo[plugin.type].push(plugin);\n\t return memo;\n\t }, {});\n\t }\n\t return plugins;\n\t };\n\t\n\t /**\n\t * adds all the external plugins that were passed through `options.plugins`\n\t * @method addExternalPlugins\n\t * @private\n\t * @param {Object} plugins the config object with all plugins\n\t */\n\t\n\t\n\t Loader.prototype.addExternalPlugins = function addExternalPlugins(plugins) {\n\t plugins = this.groupPluginsByType(plugins);\n\t var pluginName = function pluginName(plugin) {\n\t return plugin.prototype.name;\n\t };\n\t if (plugins.playback) {\n\t this.playbackPlugins = (0, _lodash2.default)(plugins.playback.concat(this.playbackPlugins), pluginName);\n\t }\n\t if (plugins.container) {\n\t this.containerPlugins = (0, _lodash2.default)(plugins.container.concat(this.containerPlugins), pluginName);\n\t }\n\t if (plugins.core) {\n\t this.corePlugins = (0, _lodash2.default)(plugins.core.concat(this.corePlugins), pluginName);\n\t }\n\t _player_info2.default.getInstance(this.playerId).playbackPlugins = this.playbackPlugins;\n\t };\n\t\n\t /**\n\t * validate if the external plugins that were passed through `options.plugins` are associated to the correct type\n\t * @method validateExternalPluginsType\n\t * @private\n\t * @param {Object} plugins the config object with all plugins\n\t */\n\t\n\t\n\t Loader.prototype.validateExternalPluginsType = function validateExternalPluginsType(plugins) {\n\t var plugintypes = ['playback', 'container', 'core'];\n\t plugintypes.forEach(function (type) {\n\t (plugins[type] || []).forEach(function (el) {\n\t var errorMessage = 'external ' + el.type + ' plugin on ' + type + ' array';\n\t if (el.type !== type) {\n\t throw new ReferenceError(errorMessage);\n\t }\n\t });\n\t });\n\t };\n\t\n\t return Loader;\n\t}(_base_object2.default);\n\t\n\texports.default = Loader;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 45 */\n/*!*******************************************************!*\\\n !*** ./src/components/media_control/media_control.js ***!\n \\*******************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _vendor = __webpack_require__(/*! vendor */ 20);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _ui_object = __webpack_require__(/*! base/ui_object */ 10);\n\t\n\tvar _ui_object2 = _interopRequireDefault(_ui_object);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _mediator = __webpack_require__(/*! components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.merge */ 35);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tvar _mediaControl = __webpack_require__(/*! ./public/media-control.scss */ 80);\n\t\n\tvar _mediaControl2 = _interopRequireDefault(_mediaControl);\n\t\n\tvar _mediaControl3 = __webpack_require__(/*! ./public/media-control.html */ 91);\n\t\n\tvar _mediaControl4 = _interopRequireDefault(_mediaControl3);\n\t\n\tvar _play = __webpack_require__(/*! icons/01-play.svg */ 22);\n\t\n\tvar _play2 = _interopRequireDefault(_play);\n\t\n\tvar _pause = __webpack_require__(/*! icons/02-pause.svg */ 36);\n\t\n\tvar _pause2 = _interopRequireDefault(_pause);\n\t\n\tvar _stop = __webpack_require__(/*! icons/03-stop.svg */ 104);\n\t\n\tvar _stop2 = _interopRequireDefault(_stop);\n\t\n\tvar _volume = __webpack_require__(/*! icons/04-volume.svg */ 105);\n\t\n\tvar _volume2 = _interopRequireDefault(_volume);\n\t\n\tvar _mute = __webpack_require__(/*! icons/05-mute.svg */ 106);\n\t\n\tvar _mute2 = _interopRequireDefault(_mute);\n\t\n\tvar _expand = __webpack_require__(/*! icons/06-expand.svg */ 107);\n\t\n\tvar _expand2 = _interopRequireDefault(_expand);\n\t\n\tvar _shrink = __webpack_require__(/*! icons/07-shrink.svg */ 108);\n\t\n\tvar _shrink2 = _interopRequireDefault(_shrink);\n\t\n\tvar _hd = __webpack_require__(/*! icons/08-hd.svg */ 109);\n\t\n\tvar _hd2 = _interopRequireDefault(_hd);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t/**\n\t * The MediaControl is responsible for displaying the Player controls.\n\t */\n\t\n\tvar MediaControl = function (_UIObject) {\n\t _inherits(MediaControl, _UIObject);\n\t\n\t _createClass(MediaControl, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'MediaControl';\n\t }\n\t }, {\n\t key: 'disabled',\n\t get: function get() {\n\t return this.userDisabled || this.container && this.container.getPlaybackType() === _playback2.default.NO_OP;\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'class': 'media-control',\n\t 'data-media-control': ''\n\t };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'click [data-play]': 'play',\n\t 'click [data-pause]': 'pause',\n\t 'click [data-playpause]': 'togglePlayPause',\n\t 'click [data-stop]': 'stop',\n\t 'click [data-playstop]': 'togglePlayStop',\n\t 'click [data-fullscreen]': 'toggleFullscreen',\n\t 'click .bar-container[data-seekbar]': 'seek',\n\t 'click .bar-container[data-volume]': 'onVolumeClick',\n\t 'click .drawer-icon[data-volume]': 'toggleMute',\n\t 'mouseenter .drawer-container[data-volume]': 'showVolumeBar',\n\t 'mouseleave .drawer-container[data-volume]': 'hideVolumeBar',\n\t 'mousedown .bar-container[data-volume]': 'startVolumeDrag',\n\t 'mousemove .bar-container[data-volume]': 'mousemoveOnVolumeBar',\n\t 'mousedown .bar-scrubber[data-seekbar]': 'startSeekDrag',\n\t 'mousemove .bar-container[data-seekbar]': 'mousemoveOnSeekBar',\n\t 'mouseleave .bar-container[data-seekbar]': 'mouseleaveOnSeekBar',\n\t 'mouseenter .media-control-layer[data-controls]': 'setUserKeepVisible',\n\t 'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible'\n\t };\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_mediaControl4.default);\n\t }\n\t }, {\n\t key: 'stylesheet',\n\t get: function get() {\n\t return _styler2.default.getStyleFor(_mediaControl2.default, { baseUrl: this.options.baseUrl });\n\t }\n\t }, {\n\t key: 'volume',\n\t get: function get() {\n\t return this.container && this.container.isReady ? this.container.volume : this.intendedVolume;\n\t }\n\t }, {\n\t key: 'muted',\n\t get: function get() {\n\t return this.volume === 0;\n\t }\n\t }]);\n\t\n\t function MediaControl(options) {\n\t _classCallCheck(this, MediaControl);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIObject.call(this, options));\n\t\n\t _this.persistConfig = _this.options.persistConfig;\n\t _this.container = options.container;\n\t _this.currentPositionValue = null;\n\t _this.currentDurationValue = null;\n\t var initialVolume = _this.persistConfig ? _utils.Config.restore('volume') : 100;\n\t _this.setVolume(_this.options.mute ? 0 : initialVolume);\n\t _this.keepVisible = false;\n\t _this.fullScreenOnVideoTagSupported = null; // unknown\n\t _this.addEventListeners();\n\t _this.settings = {\n\t left: ['play', 'stop', 'pause'],\n\t right: ['volume'],\n\t default: ['position', 'seekbar', 'duration']\n\t };\n\t\n\t if (_this.container) {\n\t if (!_clapprZepto2.default.isEmptyObject(_this.container.settings)) {\n\t _this.settings = _clapprZepto2.default.extend({}, _this.container.settings);\n\t }\n\t } else {\n\t _this.settings = {};\n\t }\n\t\n\t _this.userDisabled = false;\n\t if (_this.container && _this.container.mediaControlDisabled || _this.options.chromeless) {\n\t _this.disable();\n\t }\n\t _this.stopDragHandler = function (event) {\n\t return _this.stopDrag(event);\n\t };\n\t _this.updateDragHandler = function (event) {\n\t return _this.updateDrag(event);\n\t };\n\t (0, _clapprZepto2.default)(document).bind('mouseup', _this.stopDragHandler);\n\t (0, _clapprZepto2.default)(document).bind('mousemove', _this.updateDragHandler);\n\t return _this;\n\t }\n\t\n\t MediaControl.prototype.addEventListeners = function addEventListeners() {\n\t if (this.container) {\n\t _mediator2.default.on(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.changeTogglePlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.changeTogglePlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_DBLCLICK, this.toggleFullscreen);\n\t this.listenTo(this.container, _events2.default.CONTAINER_TIMEUPDATE, this.onTimeUpdate);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PROGRESS, this.updateProgressBar);\n\t this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.settingsUpdate);\n\t this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate);\n\t this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_DISABLE, this.disable);\n\t this.listenTo(this.container, _events2.default.CONTAINER_MEDIACONTROL_ENABLE, this.enable);\n\t this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.ended);\n\t this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, this.onVolumeChanged);\n\t if (this.container.playback.el.nodeName.toLowerCase() === 'video') {\n\t // wait until the metadata has loaded and then check if fullscreen on video tag is supported\n\t this.listenToOnce(this.container, _events2.default.CONTAINER_LOADEDMETADATA, this.onLoadedMetadataOnVideoTag);\n\t }\n\t }\n\t };\n\t\n\t MediaControl.prototype.disable = function disable() {\n\t this.userDisabled = true;\n\t this.hide();\n\t this.$el.hide();\n\t };\n\t\n\t MediaControl.prototype.enable = function enable() {\n\t if (this.options.chromeless) return;\n\t this.userDisabled = false;\n\t this.show();\n\t };\n\t\n\t MediaControl.prototype.play = function play() {\n\t this.container.play();\n\t };\n\t\n\t MediaControl.prototype.pause = function pause() {\n\t this.container.pause();\n\t };\n\t\n\t MediaControl.prototype.stop = function stop() {\n\t this.container.stop();\n\t };\n\t\n\t MediaControl.prototype.onVolumeChanged = function onVolumeChanged() {\n\t this.updateVolumeUI();\n\t };\n\t\n\t MediaControl.prototype.onLoadedMetadataOnVideoTag = function onLoadedMetadataOnVideoTag() {\n\t var video = this.container.playback.el;\n\t // video.webkitSupportsFullscreen is deprecated but iOS appears to only use this\n\t // see https://github.com/clappr/clappr/issues/1127\n\t if (!_utils.Fullscreen.fullscreenEnabled() && video.webkitSupportsFullscreen) {\n\t this.fullScreenOnVideoTagSupported = true;\n\t this.settingsUpdate();\n\t }\n\t };\n\t\n\t MediaControl.prototype.updateVolumeUI = function updateVolumeUI() {\n\t if (!this.rendered) {\n\t // this will be called after a render\n\t return;\n\t }\n\t // update volume bar scrubber/fill on bar mode\n\t this.$volumeBarContainer.find('.bar-fill-2').css({});\n\t var containerWidth = this.$volumeBarContainer.width();\n\t var barWidth = this.$volumeBarBackground.width();\n\t var offset = (containerWidth - barWidth) / 2.0;\n\t var pos = barWidth * this.volume / 100.0 + offset;\n\t this.$volumeBarFill.css({ width: this.volume + '%' });\n\t this.$volumeBarScrubber.css({ left: pos });\n\t\n\t // update volume bar segments on segmented bar mode\n\t this.$volumeBarContainer.find('.segmented-bar-element').removeClass('fill');\n\t var item = Math.ceil(this.volume / 10.0);\n\t this.$volumeBarContainer.find('.segmented-bar-element').slice(0, item).addClass('fill');\n\t this.$volumeIcon.html('');\n\t this.$volumeIcon.removeClass('muted');\n\t if (!this.muted) {\n\t this.$volumeIcon.append(_volume2.default);\n\t } else {\n\t this.$volumeIcon.append(_mute2.default);\n\t this.$volumeIcon.addClass('muted');\n\t }\n\t this.applyButtonStyle(this.$volumeIcon);\n\t };\n\t\n\t MediaControl.prototype.changeTogglePlay = function changeTogglePlay() {\n\t this.$playPauseToggle.html('');\n\t this.$playStopToggle.html('');\n\t if (this.container && this.container.isPlaying()) {\n\t this.$playPauseToggle.append(_pause2.default);\n\t this.$playStopToggle.append(_stop2.default);\n\t this.trigger(_events2.default.MEDIACONTROL_PLAYING);\n\t } else {\n\t this.$playPauseToggle.append(_play2.default);\n\t this.$playStopToggle.append(_play2.default);\n\t this.trigger(_events2.default.MEDIACONTROL_NOTPLAYING);\n\t if (_browser2.default.isMobile) {\n\t this.show();\n\t }\n\t }\n\t this.applyButtonStyle(this.$playPauseToggle);\n\t this.applyButtonStyle(this.$playStopToggle);\n\t };\n\t\n\t MediaControl.prototype.mousemoveOnSeekBar = function mousemoveOnSeekBar(event) {\n\t if (this.settings.seekEnabled) {\n\t var offsetX = event.pageX - this.$seekBarContainer.offset().left - this.$seekBarHover.width() / 2;\n\t this.$seekBarHover.css({ left: offsetX });\n\t }\n\t this.trigger(_events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, event);\n\t };\n\t\n\t MediaControl.prototype.mouseleaveOnSeekBar = function mouseleaveOnSeekBar(event) {\n\t this.trigger(_events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, event);\n\t };\n\t\n\t MediaControl.prototype.onVolumeClick = function onVolumeClick(event) {\n\t this.setVolume(this.getVolumeFromUIEvent(event));\n\t };\n\t\n\t MediaControl.prototype.mousemoveOnVolumeBar = function mousemoveOnVolumeBar(event) {\n\t if (this.draggingVolumeBar) {\n\t this.setVolume(this.getVolumeFromUIEvent(event));\n\t }\n\t };\n\t\n\t MediaControl.prototype.playerResize = function playerResize(size) {\n\t this.$fullscreenToggle.html('');\n\t if (_utils.Fullscreen.isFullscreen()) {\n\t this.$fullscreenToggle.append(_shrink2.default);\n\t } else {\n\t this.$fullscreenToggle.append(_expand2.default);\n\t }\n\t this.applyButtonStyle(this.$fullscreenToggle);\n\t this.$el.removeClass('w320');\n\t if (size.width <= 320 || this.options.hideVolumeBar) {\n\t this.$el.addClass('w320');\n\t }\n\t };\n\t\n\t MediaControl.prototype.togglePlayPause = function togglePlayPause() {\n\t if (this.container.isPlaying()) {\n\t this.container.pause();\n\t } else {\n\t this.container.play();\n\t }\n\t return false;\n\t };\n\t\n\t MediaControl.prototype.togglePlayStop = function togglePlayStop() {\n\t if (this.container.isPlaying()) {\n\t this.container.stop();\n\t } else {\n\t this.container.play();\n\t }\n\t };\n\t\n\t MediaControl.prototype.startSeekDrag = function startSeekDrag(event) {\n\t if (!this.settings.seekEnabled) return;\n\t this.draggingSeekBar = true;\n\t this.$el.addClass('dragging');\n\t this.$seekBarLoaded.addClass('media-control-notransition');\n\t this.$seekBarPosition.addClass('media-control-notransition');\n\t this.$seekBarScrubber.addClass('media-control-notransition');\n\t if (event) {\n\t event.preventDefault();\n\t }\n\t };\n\t\n\t MediaControl.prototype.startVolumeDrag = function startVolumeDrag(event) {\n\t this.draggingVolumeBar = true;\n\t this.$el.addClass('dragging');\n\t if (event) {\n\t event.preventDefault();\n\t }\n\t };\n\t\n\t MediaControl.prototype.stopDrag = function stopDrag(event) {\n\t if (this.draggingSeekBar) {\n\t this.seek(event);\n\t }\n\t this.$el.removeClass('dragging');\n\t this.$seekBarLoaded.removeClass('media-control-notransition');\n\t this.$seekBarPosition.removeClass('media-control-notransition');\n\t this.$seekBarScrubber.removeClass('media-control-notransition dragging');\n\t this.draggingSeekBar = false;\n\t this.draggingVolumeBar = false;\n\t };\n\t\n\t MediaControl.prototype.updateDrag = function updateDrag(event) {\n\t if (this.draggingSeekBar) {\n\t event.preventDefault();\n\t var offsetX = event.pageX - this.$seekBarContainer.offset().left;\n\t var pos = offsetX / this.$seekBarContainer.width() * 100;\n\t pos = Math.min(100, Math.max(pos, 0));\n\t this.setSeekPercentage(pos);\n\t } else if (this.draggingVolumeBar) {\n\t event.preventDefault();\n\t this.setVolume(this.getVolumeFromUIEvent(event));\n\t }\n\t };\n\t\n\t MediaControl.prototype.getVolumeFromUIEvent = function getVolumeFromUIEvent(event) {\n\t var offsetY = event.pageX - this.$volumeBarContainer.offset().left;\n\t var volumeFromUI = offsetY / this.$volumeBarContainer.width() * 100;\n\t return volumeFromUI;\n\t };\n\t\n\t MediaControl.prototype.toggleMute = function toggleMute() {\n\t this.setVolume(this.muted ? 100 : 0);\n\t };\n\t\n\t MediaControl.prototype.setVolume = function setVolume(value) {\n\t var _this2 = this;\n\t\n\t value = Math.min(100, Math.max(value, 0));\n\t // this will hold the intended volume\n\t // it may not actually get set to this straight away\n\t // if the container is not ready etc\n\t this.intendedVolume = value;\n\t this.persistConfig && _utils.Config.persist('volume', value);\n\t var setWhenContainerReady = function setWhenContainerReady() {\n\t if (_this2.container.isReady) {\n\t _this2.container.setVolume(value);\n\t } else {\n\t _this2.listenToOnce(_this2.container, _events2.default.CONTAINER_READY, function () {\n\t _this2.container.setVolume(value);\n\t });\n\t }\n\t };\n\t\n\t if (!this.container) {\n\t this.listenToOnce(this, _events2.default.MEDIACONTROL_CONTAINERCHANGED, function () {\n\t setWhenContainerReady();\n\t });\n\t } else {\n\t setWhenContainerReady();\n\t }\n\t };\n\t\n\t MediaControl.prototype.toggleFullscreen = function toggleFullscreen() {\n\t this.trigger(_events2.default.MEDIACONTROL_FULLSCREEN, this.name);\n\t this.container.fullscreen();\n\t this.resetUserKeepVisible();\n\t };\n\t\n\t MediaControl.prototype.setContainer = function setContainer(container) {\n\t if (this.container) {\n\t this.stopListening(this.container);\n\t this.fullScreenOnVideoTagSupported = null;\n\t }\n\t _mediator2.default.off(this.options.playerId + ':' + _events2.default.PLAYER_RESIZE, this.playerResize, this);\n\t this.container = container;\n\t // set the new container to match the volume of the last one\n\t this.setVolume(this.intendedVolume);\n\t this.changeTogglePlay();\n\t this.addEventListeners();\n\t this.settingsUpdate();\n\t this.container.trigger(_events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.container.isDvrInUse());\n\t if (this.container.mediaControlDisabled) {\n\t this.disable();\n\t }\n\t this.trigger(_events2.default.MEDIACONTROL_CONTAINERCHANGED);\n\t };\n\t\n\t MediaControl.prototype.showVolumeBar = function showVolumeBar() {\n\t if (this.hideVolumeId) {\n\t clearTimeout(this.hideVolumeId);\n\t }\n\t this.$volumeBarContainer.removeClass('volume-bar-hide');\n\t };\n\t\n\t MediaControl.prototype.hideVolumeBar = function hideVolumeBar() {\n\t var _this3 = this;\n\t\n\t var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 400;\n\t\n\t if (!this.$volumeBarContainer) return;\n\t if (this.draggingVolumeBar) {\n\t this.hideVolumeId = setTimeout(function () {\n\t return _this3.hideVolumeBar();\n\t }, timeout);\n\t } else {\n\t if (this.hideVolumeId) {\n\t clearTimeout(this.hideVolumeId);\n\t }\n\t this.hideVolumeId = setTimeout(function () {\n\t return _this3.$volumeBarContainer.addClass('volume-bar-hide');\n\t }, timeout);\n\t }\n\t };\n\t\n\t MediaControl.prototype.ended = function ended() {\n\t this.changeTogglePlay();\n\t };\n\t\n\t MediaControl.prototype.updateProgressBar = function updateProgressBar(progress) {\n\t var loadedStart = progress.start / progress.total * 100;\n\t var loadedEnd = progress.current / progress.total * 100;\n\t this.$seekBarLoaded.css({ left: loadedStart + '%', width: loadedEnd - loadedStart + '%' });\n\t };\n\t\n\t MediaControl.prototype.onTimeUpdate = function onTimeUpdate(timeProgress) {\n\t if (this.draggingSeekBar) return;\n\t // TODO why should current time ever be negative?\n\t var position = timeProgress.current < 0 ? timeProgress.total : timeProgress.current;\n\t\n\t this.currentPositionValue = position;\n\t this.currentDurationValue = timeProgress.total;\n\t this.renderSeekBar();\n\t };\n\t\n\t MediaControl.prototype.renderSeekBar = function renderSeekBar() {\n\t if (this.currentPositionValue === null || this.currentDurationValue === null) {\n\t // this will be triggered as soon as these beocome available\n\t return;\n\t }\n\t\n\t // default to 100%\n\t this.currentSeekBarPercentage = 100;\n\t if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrInUse()) {\n\t this.currentSeekBarPercentage = this.currentPositionValue / this.currentDurationValue * 100;\n\t }\n\t this.setSeekPercentage(this.currentSeekBarPercentage);\n\t\n\t var newPosition = (0, _utils.formatTime)(this.currentPositionValue);\n\t var newDuration = (0, _utils.formatTime)(this.currentDurationValue);\n\t if (newPosition !== this.displayedPosition) {\n\t this.$position.text(newPosition);\n\t this.displayedPosition = newPosition;\n\t }\n\t if (newDuration !== this.displayedDuration) {\n\t this.$duration.text(newDuration);\n\t this.displayedDuration = newDuration;\n\t }\n\t };\n\t\n\t MediaControl.prototype.seek = function seek(event) {\n\t if (!this.settings.seekEnabled) return;\n\t var offsetX = event.pageX - this.$seekBarContainer.offset().left;\n\t var pos = offsetX / this.$seekBarContainer.width() * 100;\n\t pos = Math.min(100, Math.max(pos, 0));\n\t this.container.seekPercentage(pos);\n\t this.setSeekPercentage(pos);\n\t return false;\n\t };\n\t\n\t MediaControl.prototype.setKeepVisible = function setKeepVisible() {\n\t this.keepVisible = true;\n\t };\n\t\n\t MediaControl.prototype.resetKeepVisible = function resetKeepVisible() {\n\t this.keepVisible = false;\n\t };\n\t\n\t MediaControl.prototype.setUserKeepVisible = function setUserKeepVisible() {\n\t this.userKeepVisible = true;\n\t };\n\t\n\t MediaControl.prototype.resetUserKeepVisible = function resetUserKeepVisible() {\n\t this.userKeepVisible = false;\n\t };\n\t\n\t MediaControl.prototype.isVisible = function isVisible() {\n\t return !this.$el.hasClass('media-control-hide');\n\t };\n\t\n\t MediaControl.prototype.show = function show(event) {\n\t var _this4 = this;\n\t\n\t if (this.disabled) {\n\t return;\n\t }\n\t var timeout = 2000;\n\t if (!event || event.clientX !== this.lastMouseX && event.clientY !== this.lastMouseY || navigator.userAgent.match(/firefox/i)) {\n\t clearTimeout(this.hideId);\n\t this.$el.show();\n\t this.trigger(_events2.default.MEDIACONTROL_SHOW, this.name);\n\t this.$el.removeClass('media-control-hide');\n\t this.hideId = setTimeout(function () {\n\t return _this4.hide();\n\t }, timeout);\n\t if (event) {\n\t this.lastMouseX = event.clientX;\n\t this.lastMouseY = event.clientY;\n\t }\n\t }\n\t };\n\t\n\t MediaControl.prototype.hide = function hide() {\n\t var _this5 = this;\n\t\n\t var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\t\n\t if (!this.isVisible() || _browser2.default.isMobile && !this.container.isPlaying()) {\n\t return;\n\t }\n\t var timeout = delay || 2000;\n\t clearTimeout(this.hideId);\n\t if (!this.disabled && this.options.hideMediaControl === false) {\n\t return;\n\t }\n\t if (!this.disabled && (delay || this.userKeepVisible || this.keepVisible || this.draggingSeekBar || this.draggingVolumeBar)) {\n\t this.hideId = setTimeout(function () {\n\t return _this5.hide();\n\t }, timeout);\n\t } else {\n\t this.trigger(_events2.default.MEDIACONTROL_HIDE, this.name);\n\t this.$el.addClass('media-control-hide');\n\t this.hideVolumeBar(0);\n\t }\n\t };\n\t\n\t MediaControl.prototype.settingsUpdate = function settingsUpdate() {\n\t var newSettings = this.getSettings();\n\t if (newSettings && !this.fullScreenOnVideoTagSupported && !_utils.Fullscreen.fullscreenEnabled()) {\n\t // remove fullscreen from settings if it is present\n\t newSettings.default && (0, _utils.removeArrayItem)(newSettings.default, 'fullscreen');\n\t newSettings.left && (0, _utils.removeArrayItem)(newSettings.left, 'fullscreen');\n\t newSettings.right && (0, _utils.removeArrayItem)(newSettings.right, 'fullscreen');\n\t }\n\t var settingsChanged = JSON.stringify(this.settings) !== JSON.stringify(newSettings);\n\t if (settingsChanged) {\n\t this.settings = newSettings;\n\t this.render();\n\t }\n\t };\n\t\n\t MediaControl.prototype.getSettings = function getSettings() {\n\t return (0, _lodash2.default)({}, this.container.settings);\n\t };\n\t\n\t MediaControl.prototype.highDefinitionUpdate = function highDefinitionUpdate(isHD) {\n\t var method = isHD ? 'addClass' : 'removeClass';\n\t this.$hdIndicator[method]('enabled');\n\t };\n\t\n\t MediaControl.prototype.createCachedElements = function createCachedElements() {\n\t var $layer = this.$el.find('.media-control-layer');\n\t this.$duration = $layer.find('.media-control-indicator[data-duration]');\n\t this.$fullscreenToggle = $layer.find('button.media-control-button[data-fullscreen]');\n\t this.$playPauseToggle = $layer.find('button.media-control-button[data-playpause]');\n\t this.$playStopToggle = $layer.find('button.media-control-button[data-playstop]');\n\t this.$position = $layer.find('.media-control-indicator[data-position]');\n\t this.$seekBarContainer = $layer.find('.bar-container[data-seekbar]');\n\t this.$seekBarHover = $layer.find('.bar-hover[data-seekbar]');\n\t this.$seekBarLoaded = $layer.find('.bar-fill-1[data-seekbar]');\n\t this.$seekBarPosition = $layer.find('.bar-fill-2[data-seekbar]');\n\t this.$seekBarScrubber = $layer.find('.bar-scrubber[data-seekbar]');\n\t this.$volumeBarContainer = $layer.find('.bar-container[data-volume]');\n\t this.$volumeContainer = $layer.find('.drawer-container[data-volume]');\n\t this.$volumeIcon = $layer.find('.drawer-icon[data-volume]');\n\t this.$volumeBarBackground = this.$el.find('.bar-background[data-volume]');\n\t this.$volumeBarFill = this.$el.find('.bar-fill-1[data-volume]');\n\t this.$volumeBarScrubber = this.$el.find('.bar-scrubber[data-volume]');\n\t this.$hdIndicator = this.$el.find('button.media-control-button[data-hd-indicator]');\n\t this.resetIndicators();\n\t this.initializeIcons();\n\t };\n\t\n\t MediaControl.prototype.resetIndicators = function resetIndicators() {\n\t this.displayedPosition = this.$position.text();\n\t this.displayedDuration = this.$duration.text();\n\t };\n\t\n\t MediaControl.prototype.initializeIcons = function initializeIcons() {\n\t var $layer = this.$el.find('.media-control-layer');\n\t $layer.find('button.media-control-button[data-play]').append(_play2.default);\n\t $layer.find('button.media-control-button[data-pause]').append(_pause2.default);\n\t $layer.find('button.media-control-button[data-stop]').append(_stop2.default);\n\t this.$playPauseToggle.append(_play2.default);\n\t this.$playStopToggle.append(_play2.default);\n\t this.$volumeIcon.append(_volume2.default);\n\t this.$fullscreenToggle.append(_expand2.default);\n\t this.$hdIndicator.append(_hd2.default);\n\t };\n\t\n\t MediaControl.prototype.setSeekPercentage = function setSeekPercentage(value) {\n\t value = Math.max(Math.min(value, 100.0), 0);\n\t if (this.displayedSeekBarPercentage === value) {\n\t // not changed since last update\n\t return;\n\t }\n\t this.displayedSeekBarPercentage = value;\n\t\n\t this.$seekBarPosition.removeClass('media-control-notransition');\n\t this.$seekBarScrubber.removeClass('media-control-notransition');\n\t this.$seekBarPosition.css({ width: value + '%' });\n\t this.$seekBarScrubber.css({ left: value + '%' });\n\t };\n\t\n\t MediaControl.prototype.seekRelative = function seekRelative(delta) {\n\t if (!this.settings.seekEnabled) return;\n\t var currentTime = this.container.getCurrentTime();\n\t var duration = this.container.getDuration();\n\t var position = Math.min(Math.max(currentTime + delta, 0), duration);\n\t position = Math.min(position * 100 / duration, 100);\n\t this.container.seekPercentage(position);\n\t };\n\t\n\t MediaControl.prototype.bindKeyEvents = function bindKeyEvents() {\n\t var _this6 = this;\n\t\n\t this.unbindKeyEvents();\n\t this.kibo = new _vendor.Kibo(this.options.focusElement);\n\t this.kibo.down(['space'], function () {\n\t return _this6.togglePlayPause();\n\t });\n\t this.kibo.down(['left'], function () {\n\t return _this6.seekRelative(-15);\n\t });\n\t this.kibo.down(['right'], function () {\n\t return _this6.seekRelative(15);\n\t });\n\t var keys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];\n\t keys.forEach(function (i) {\n\t _this6.kibo.down(i.toString(), function () {\n\t return _this6.settings.seekEnabled && _this6.container.seekPercentage(i * 10);\n\t });\n\t });\n\t };\n\t\n\t MediaControl.prototype.unbindKeyEvents = function unbindKeyEvents() {\n\t if (this.kibo) {\n\t this.kibo.off('space');\n\t this.kibo.off('left');\n\t this.kibo.off('right');\n\t this.kibo.off([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);\n\t }\n\t };\n\t\n\t MediaControl.prototype.parseColors = function parseColors() {\n\t if (this.options.mediacontrol) {\n\t this.buttonsColor = this.options.mediacontrol.buttons;\n\t var seekbarColor = this.options.mediacontrol.seekbar;\n\t this.$el.find('.bar-fill-2[data-seekbar]').css('background-color', seekbarColor);\n\t this.$el.find('.media-control-icon svg path').css('fill', this.buttonsColor);\n\t this.$el.find('.segmented-bar-element[data-volume]').css('boxShadow', 'inset 2px 0 0 ' + this.buttonsColor);\n\t }\n\t };\n\t\n\t MediaControl.prototype.applyButtonStyle = function applyButtonStyle(element) {\n\t if (this.buttonsColor && element) {\n\t (0, _clapprZepto2.default)(element).find('svg path').css('fill', this.buttonsColor);\n\t }\n\t };\n\t\n\t MediaControl.prototype.destroy = function destroy() {\n\t this.remove();\n\t (0, _clapprZepto2.default)(document).unbind('mouseup', this.stopDragHandler);\n\t (0, _clapprZepto2.default)(document).unbind('mousemove', this.updateDragHandler);\n\t this.unbindKeyEvents();\n\t };\n\t\n\t MediaControl.prototype.render = function render() {\n\t var _this7 = this;\n\t\n\t var timeout = 1000;\n\t this.$el.html(this.template({ settings: this.settings }));\n\t this.$el.append(this.stylesheet);\n\t this.createCachedElements();\n\t this.$playPauseToggle.addClass('paused');\n\t this.$playStopToggle.addClass('stopped');\n\t\n\t this.changeTogglePlay();\n\t this.hideId = setTimeout(function () {\n\t return _this7.hide();\n\t }, timeout);\n\t if (this.disabled) {\n\t this.hide();\n\t }\n\t\n\t if (_browser2.default.isSafari && _browser2.default.isMobile) {\n\t this.$volumeContainer.css('display', 'none');\n\t }\n\t\n\t this.$seekBarPosition.addClass('media-control-notransition');\n\t this.$seekBarScrubber.addClass('media-control-notransition');\n\t\n\t var previousSeekPercentage = 0;\n\t if (this.displayedSeekBarPercentage) {\n\t previousSeekPercentage = this.displayedSeekBarPercentage;\n\t }\n\t this.displayedSeekBarPercentage = null;\n\t this.setSeekPercentage(previousSeekPercentage);\n\t\n\t process.nextTick(function () {\n\t if (!_this7.settings.seekEnabled) {\n\t _this7.$seekBarContainer.addClass('seek-disabled');\n\t }\n\t if (!_this7.options.disableKeyboardShortcuts) {\n\t _this7.bindKeyEvents();\n\t }\n\t _this7.playerResize({ width: _this7.options.width, height: _this7.options.height });\n\t _this7.hideVolumeBar(0);\n\t });\n\t\n\t this.parseColors();\n\t this.highDefinitionUpdate();\n\t\n\t this.rendered = true;\n\t this.updateVolumeUI();\n\t this.trigger(_events2.default.MEDIACONTROL_RENDERED);\n\t return this;\n\t };\n\t\n\t return MediaControl;\n\t}(_ui_object2.default);\n\t\n\texports.default = MediaControl;\n\t\n\t\n\tMediaControl.extend = function (properties) {\n\t return (0, _utils.extend)(MediaControl, properties);\n\t};\n\tmodule.exports = exports['default'];\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./~/process/browser.js */ 21)))\n\n/***/ },\n/* 46 */\n/*!**********************************!*\\\n !*** ./src/components/player.js ***!\n \\**********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _base_object = __webpack_require__(/*! base/base_object */ 9);\n\t\n\tvar _base_object2 = _interopRequireDefault(_base_object);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _core_factory = __webpack_require__(/*! components/core_factory */ 43);\n\t\n\tvar _core_factory2 = _interopRequireDefault(_core_factory);\n\t\n\tvar _loader = __webpack_require__(/*! components/loader */ 26);\n\t\n\tvar _loader2 = _interopRequireDefault(_loader);\n\t\n\tvar _player_info = __webpack_require__(/*! components/player_info */ 15);\n\t\n\tvar _player_info2 = _interopRequireDefault(_player_info);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar baseUrl = (0, _utils.currentScriptUrl)().replace(/\\/[^\\/]+$/, '');\n\t\n\t/**\n\t * @class Player\n\t * @constructor\n\t * @extends BaseObject\n\t * @module components\n\t * @example\n\t * ### Using the Player\n\t *\n\t * Add the following script on your HTML:\n\t * ```html\n\t * <head>\n\t * <script type=\"text/javascript\" src=\"http://cdn.clappr.io/latest/clappr.min.js\"></script>\n\t * </head>\n\t * ```\n\t * Now, create the player:\n\t * ```html\n\t * <body>\n\t * <div id=\"player\"></div>\n\t * <script>\n\t * var player = new Clappr.Player({source: \"http://your.video/here.mp4\", parentId: \"#player\"});\n\t * </script>\n\t * </body>\n\t * ```\n\t */\n\t\n\tvar Player = function (_BaseObject) {\n\t _inherits(Player, _BaseObject);\n\t\n\t _createClass(Player, [{\n\t key: 'loader',\n\t set: function set(loader) {\n\t this._loader = loader;\n\t },\n\t get: function get() {\n\t if (!this._loader) {\n\t this._loader = new _loader2.default(this.options.plugins || {}, this.options.playerId);\n\t }\n\t return this._loader;\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return this.core.mediaControl.container.ended;\n\t }\n\t\n\t /**\n\t * Determine if the playback is having to buffer in order for\n\t * playback to be smooth.\n\t * (i.e if a live stream is playing smoothly, this will be false)\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return this.core.mediaControl.container.buffering;\n\t }\n\t\n\t /*\n\t * determine if the player is ready.\n\t * @property isReady\n\t * @type {Boolean} `true` if the player is ready. ie PLAYER_READY event has fired\n\t */\n\t\n\t }, {\n\t key: 'isReady',\n\t get: function get() {\n\t return !!this._ready;\n\t }\n\t\n\t /**\n\t * An events map that allows the user to add custom callbacks in player's options.\n\t * @property eventsMapping\n\t * @type {Object}\n\t */\n\t\n\t }, {\n\t key: 'eventsMapping',\n\t get: function get() {\n\t return {\n\t onReady: _events2.default.PLAYER_READY,\n\t onResize: _events2.default.PLAYER_RESIZE,\n\t onPlay: _events2.default.PLAYER_PLAY,\n\t onPause: _events2.default.PLAYER_PAUSE,\n\t onStop: _events2.default.PLAYER_STOP,\n\t onEnded: _events2.default.PLAYER_ENDED,\n\t onSeek: _events2.default.PLAYER_SEEK,\n\t onError: _events2.default.PLAYER_ERROR,\n\t onTimeUpdate: _events2.default.PLAYER_TIMEUPDATE,\n\t onVolumeUpdate: _events2.default.PLAYER_VOLUMEUPDATE\n\t };\n\t }\n\t\n\t /**\n\t * ## Player's constructor\n\t *\n\t * You might pass the options object to build the player.\n\t * ```javascript\n\t * var options = {source: \"http://example.com/video.mp4\", param1: \"val1\"};\n\t * var player = new Clappr.Player(options);\n\t * ```\n\t *\n\t * @method constructor\n\t * @param {Object} options Data\n\t * options to build a player instance\n\t * @param {Number} [options.width]\n\t * player's width **default**: `640`\n\t * @param {Number} [options.height]\n\t * player's height **default**: `360`\n\t * @param {String} [options.parentId]\n\t * the id of the element on the page that the player should be inserted into\n\t * @param {Object} [options.parent]\n\t * a reference to a dom element that the player should be inserted into\n\t * @param {String} [options.source]\n\t * The media source URL, or {source: <<source URL>>, mimeType: <<source mime type>>}\n\t * @param {Object} [options.sources]\n\t * An array of media source URL's, or an array of {source: <<source URL>>, mimeType: <<source mime type>>}\n\t * @param {Boolean} [options.autoPlay]\n\t * automatically play after page load **default**: `false`\n\t * @param {Boolean} [options.loop]\n\t * automatically replay after it ends **default**: `false`\n\t * @param {Boolean} [options.chromeless]\n\t * player acts in chromeless mode **default**: `false`\n\t * @param {Boolean} [options.allowUserInteraction]\n\t * whether or not the player should handle click events when in chromeless mode **default**: `false` on desktops browsers, `true` on mobile.\n\t * @param {Boolean} [options.disableKeyboardShortcuts]\n\t * disable keyboard shortcuts. **default**: `false`. `true` if `allowUserInteraction` is `false`.\n\t * @param {Boolean} [options.muted]\n\t * start the video muted **default**: `false`\n\t * @param {String} [options.mimeType]\n\t * add `mimeType: \"application/vnd.apple.mpegurl\"` if you need to use a url without extension.\n\t * @param {String} [options.actualLiveTime]\n\t * show duration and seek time relative to actual time.\n\t * @param {String} [options.actualLiveServerTime]\n\t * specify server time as a string, format: \"2015/11/26 06:01:03\". This option is meant to be used with actualLiveTime.\n\t * @param {Boolean} [options.persistConfig]\n\t * persist player's settings (volume) through the same domain **default**: `true`\n\t * @param {String} [options.preload]\n\t * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n\t * @param {Number} [options.maxBufferLength]\n\t * the default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.\n\t * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.\n\t * To change this behavior use `maxBufferLength` where **value is in seconds**.\n\t * @param {String} [options.gaAccount]\n\t * enable Google Analytics events dispatch **(play/pause/stop/buffering/etc)** by adding your `gaAccount`\n\t * @param {String} [options.gaTrackerName]\n\t * besides `gaAccount` you can optionally, pass your favorite trackerName as `gaTrackerName`\n\t * @param {Object} [options.mediacontrol]\n\t * customize control bar colors, example: `mediacontrol: {seekbar: \"#E113D3\", buttons: \"#66B2FF\"}`\n\t * @param {Boolean} [options.hideMediaControl]\n\t * control media control auto hide **default**: `true`\n\t * @param {Boolean} [options.hideVolumeBar]\n\t * when embedded with width less than 320, volume bar will hide. You can force this behavior for all sizes by adding `true` **default**: `false`\n\t * @param {String} [options.watermark]\n\t * put `watermark: 'http://url/img.png'` on your embed parameters to automatically add watermark on your video.\n\t * You can customize corner position by defining position parameter. Positions can be `bottom-left`, `bottom-right`, `top-left` and `top-right`.\n\t * @param {String} [options.watermarkLink]\n\t * `watermarkLink: 'http://example.net/'` - define URL to open when the watermark is clicked. If not provided watermark will not be clickable.\n\t * @param {Boolean} [options.disableVideoTagContextMenu]\n\t * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n\t * @param {Boolean} [options.autoSeekFromUrl]\n\t * Automatically seek to the seconds provided in the url (e.g example.com?t=100) **default**: `true`\n\t * @param {Boolean} [options.exitFullscreenOnEnd]\n\t * Automatically exit full screen when the media finishes. **default**: `true`\n\t * @param {String} [options.poster]\n\t * define a poster by adding its address `poster: 'http://url/img.png'`. It will appear after video embed, disappear on play and go back when user stops the video.\n\t * @param {String} [options.playbackNotSupportedMessage]\n\t * define a custom message to be displayed when a playback is not supported.\n\t * @param {Object} [options.events]\n\t * Specify listeners which will be registered with their corresponding player events.\n\t * E.g. onReady -> \"PLAYER_READY\", onTimeUpdate -> \"PLAYER_TIMEUPDATE\"\n\t */\n\t\n\t }]);\n\t\n\t function Player(options) {\n\t _classCallCheck(this, Player);\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseObject.call(this, options));\n\t\n\t var defaultOptions = { playerId: (0, _utils.uniqueId)(''), persistConfig: true, width: 640, height: 360, baseUrl: baseUrl, allowUserInteraction: _browser2.default.isMobile };\n\t _this._options = _clapprZepto2.default.extend(defaultOptions, options);\n\t _this.options.sources = _this._normalizeSources(options);\n\t if (!_this.options.chromeless) {\n\t // \"allowUserInteraction\" cannot be false if not in chromeless mode.\n\t _this.options.allowUserInteraction = true;\n\t }\n\t if (!_this.options.allowUserInteraction) {\n\t // if user iteraction is not allowed ensure keyboard shortcuts are disabled\n\t _this.options.disableKeyboardShortcuts = true;\n\t }\n\t _this._registerOptionEventListeners();\n\t _this._coreFactory = new _core_factory2.default(_this);\n\t _this.playerInfo = _player_info2.default.getInstance(_this.options.playerId);\n\t _this.playerInfo.currentSize = { width: options.width, height: options.height };\n\t _this.playerInfo.options = _this.options;\n\t if (_this.options.parentId) {\n\t _this.setParentId(_this.options.parentId);\n\t } else if (_this.options.parent) {\n\t _this.attachTo(_this.options.parent);\n\t }\n\t return _this;\n\t }\n\t\n\t /**\n\t * Specify a `parentId` to the player.\n\t * @method setParentId\n\t * @param {String} parentId the element parent id.\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.setParentId = function setParentId(parentId) {\n\t var el = document.querySelector(parentId);\n\t if (el) {\n\t this.attachTo(el);\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * You can use this method to attach the player to a given element. You don't need to do this when you specify it during the player instantiation passing the `parentId` param.\n\t * @method attachTo\n\t * @param {Object} element a given element.\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.attachTo = function attachTo(element) {\n\t this.options.parentElement = element;\n\t this.core = this._coreFactory.create();\n\t this._addEventListeners();\n\t return this;\n\t };\n\t\n\t Player.prototype._addEventListeners = function _addEventListeners() {\n\t if (!this.core.isReady) {\n\t this.listenToOnce(this.core, _events2.default.CORE_READY, this._onReady);\n\t } else {\n\t this._onReady();\n\t }\n\t this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this._containerChanged);\n\t this.listenTo(this.core, _events2.default.CORE_FULLSCREEN, this._onFullscreenChange);\n\t return this;\n\t };\n\t\n\t Player.prototype._addContainerEventListeners = function _addContainerEventListeners() {\n\t var container = this.core.mediaControl.container;\n\t if (container) {\n\t this.listenTo(container, _events2.default.CONTAINER_PLAY, this._onPlay);\n\t this.listenTo(container, _events2.default.CONTAINER_PAUSE, this._onPause);\n\t this.listenTo(container, _events2.default.CONTAINER_STOP, this._onStop);\n\t this.listenTo(container, _events2.default.CONTAINER_ENDED, this._onEnded);\n\t this.listenTo(container, _events2.default.CONTAINER_SEEK, this._onSeek);\n\t this.listenTo(container, _events2.default.CONTAINER_ERROR, this._onError);\n\t this.listenTo(container, _events2.default.CONTAINER_TIMEUPDATE, this._onTimeUpdate);\n\t this.listenTo(container, _events2.default.CONTAINER_VOLUME, this._onVolumeUpdate);\n\t }\n\t return this;\n\t };\n\t\n\t Player.prototype._registerOptionEventListeners = function _registerOptionEventListeners() {\n\t var _this2 = this;\n\t\n\t var userEvents = this.options.events || {};\n\t Object.keys(userEvents).forEach(function (userEvent) {\n\t var eventType = _this2.eventsMapping[userEvent];\n\t if (eventType) {\n\t var eventFunction = userEvents[userEvent];\n\t eventFunction = typeof eventFunction === 'function' && eventFunction;\n\t eventFunction && _this2.on(eventType, eventFunction);\n\t }\n\t });\n\t return this;\n\t };\n\t\n\t Player.prototype._containerChanged = function _containerChanged() {\n\t this.stopListening();\n\t this._addEventListeners();\n\t };\n\t\n\t Player.prototype._onReady = function _onReady() {\n\t this._ready = true;\n\t this._addContainerEventListeners();\n\t this.trigger(_events2.default.PLAYER_READY);\n\t };\n\t\n\t Player.prototype._onFullscreenChange = function _onFullscreenChange(fullscreen) {\n\t this.trigger(_events2.default.PLAYER_FULLSCREEN, fullscreen);\n\t };\n\t\n\t Player.prototype._onVolumeUpdate = function _onVolumeUpdate(volume) {\n\t this.trigger(_events2.default.PLAYER_VOLUMEUPDATE, volume);\n\t };\n\t\n\t Player.prototype._onPlay = function _onPlay() {\n\t this.trigger(_events2.default.PLAYER_PLAY);\n\t };\n\t\n\t Player.prototype._onPause = function _onPause() {\n\t this.trigger(_events2.default.PLAYER_PAUSE);\n\t };\n\t\n\t Player.prototype._onStop = function _onStop() {\n\t this.trigger(_events2.default.PLAYER_STOP, this.getCurrentTime());\n\t };\n\t\n\t Player.prototype._onEnded = function _onEnded() {\n\t this.trigger(_events2.default.PLAYER_ENDED);\n\t };\n\t\n\t Player.prototype._onSeek = function _onSeek(time) {\n\t this.trigger(_events2.default.PLAYER_SEEK, time);\n\t };\n\t\n\t Player.prototype._onTimeUpdate = function _onTimeUpdate(timeProgress) {\n\t this.trigger(_events2.default.PLAYER_TIMEUPDATE, timeProgress);\n\t };\n\t\n\t Player.prototype._onError = function _onError(error) {\n\t this.trigger(_events2.default.PLAYER_ERROR, error);\n\t };\n\t\n\t Player.prototype._normalizeSources = function _normalizeSources(options) {\n\t var sources = options.sources || (options.source !== undefined ? [options.source] : []);\n\t return sources.length === 0 ? [{ source: '', mimeType: '' }] : sources;\n\t };\n\t\n\t /**\n\t * resizes the current player canvas.\n\t * @method resize\n\t * @param {Object} size should be a literal object with `height` and `width`.\n\t * @return {Player} itself\n\t * @example\n\t * ```javascript\n\t * player.resize({height: 360, width: 640})\n\t * ```\n\t */\n\t\n\t\n\t Player.prototype.resize = function resize(size) {\n\t this.core.resize(size);\n\t return this;\n\t };\n\t\n\t /**\n\t * loads a new source.\n\t * @method load\n\t * @param {Array|String} sources source or sources of video.\n\t * An array item can be a string or {source: <<source URL>>, mimeType: <<source mime type>>}\n\t * @param {String} mimeType a mime type, example: `'application/vnd.apple.mpegurl'`\n\t * @param {Boolean} [autoPlay=false] whether playing should be started immediately\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.load = function load(sources, mimeType, autoPlay) {\n\t if (autoPlay !== undefined) {\n\t this.configure({ autoPlay: !!autoPlay });\n\t }\n\t this.core.load(sources, mimeType);\n\t return this;\n\t };\n\t\n\t /**\n\t * destroys the current player and removes it from the DOM.\n\t * @method destroy\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.destroy = function destroy() {\n\t this.core.destroy();\n\t return this;\n\t };\n\t\n\t /**\n\t * plays the current video (`source`).\n\t * @method play\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.play = function play() {\n\t this.core.mediaControl.container.play();\n\t return this;\n\t };\n\t\n\t /**\n\t * pauses the current video (`source`).\n\t * @method pause\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.pause = function pause() {\n\t this.core.mediaControl.container.pause();\n\t return this;\n\t };\n\t\n\t /**\n\t * stops the current video (`source`).\n\t * @method stop\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.stop = function stop() {\n\t this.core.mediaControl.container.stop();\n\t return this;\n\t };\n\t\n\t /**\n\t * seeks the current video (`source`). For example, `player.seek(120)` will seek to second 120 (2minutes) of the current video.\n\t * @method seek\n\t * @param {Number} time should be a number between 0 and the video duration.\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.seek = function seek(time) {\n\t this.core.mediaControl.container.seek(time);\n\t return this;\n\t };\n\t\n\t /**\n\t * seeks the current video (`source`). For example, `player.seek(50)` will seek to the middle of the current video.\n\t * @method seekPercentage\n\t * @param {Number} time should be a number between 0 and 100.\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.seekPercentage = function seekPercentage(percentage) {\n\t this.core.mediaControl.container.seekPercentage(percentage);\n\t return this;\n\t };\n\t\n\t /**\n\t * Set the volume for the current video (`source`).\n\t * @method setVolume\n\t * @param {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.setVolume = function setVolume(volume) {\n\t if (this.core && this.core.mediaControl) {\n\t this.core.mediaControl.setVolume(volume);\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Get the volume for the current video\n\t * @method getVolume\n\t * @return {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.\n\t */\n\t\n\t\n\t Player.prototype.getVolume = function getVolume() {\n\t return this.core && this.core.mediaControl ? this.core.mediaControl.volume : 0;\n\t };\n\t\n\t /**\n\t * mutes the current video (`source`).\n\t * @method mute\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.mute = function mute() {\n\t this._mutedVolume = this.getVolume();\n\t this.setVolume(0);\n\t return this;\n\t };\n\t\n\t /**\n\t * unmutes the current video (`source`).\n\t * @method unmute\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.unmute = function unmute() {\n\t this.setVolume(typeof this._mutedVolume === 'number' ? this._mutedVolume : 100);\n\t this._mutedVolume = null;\n\t return this;\n\t };\n\t\n\t /**\n\t * checks if the player is playing.\n\t * @method isPlaying\n\t * @return {Boolean} `true` if the current source is playing, otherwise `false`\n\t */\n\t\n\t\n\t Player.prototype.isPlaying = function isPlaying() {\n\t return this.core.mediaControl.container.isPlaying();\n\t };\n\t\n\t /**\n\t * returns `true` if DVR is enable otherwise `false`.\n\t * @method isDvrEnabled\n\t * @return {Boolean}\n\t */\n\t\n\t\n\t Player.prototype.isDvrEnabled = function isDvrEnabled() {\n\t return this.core.mediaControl.container.isDvrEnabled();\n\t };\n\t\n\t /**\n\t * returns `true` if DVR is in use otherwise `false`.\n\t * @method isDvrInUse\n\t * @return {Boolean}\n\t */\n\t\n\t\n\t Player.prototype.isDvrInUse = function isDvrInUse() {\n\t return this.core.mediaControl.container.isDvrInUse();\n\t };\n\t\n\t /**\n\t * enables to configure a player after its creation\n\t * @method configure\n\t * @param {Object} options all the options to change in form of a javascript object\n\t * @return {Player} itself\n\t */\n\t\n\t\n\t Player.prototype.configure = function configure(options) {\n\t this.core.configure(options);\n\t return this;\n\t };\n\t\n\t /**\n\t * get a plugin by its name.\n\t * @method getPlugin\n\t * @param {String} name of the plugin.\n\t * @return {Object} the plugin instance\n\t * @example\n\t * ```javascript\n\t * var poster = player.getPlugin('poster');\n\t * poster.hidePlayButton();\n\t * ```\n\t */\n\t\n\t\n\t Player.prototype.getPlugin = function getPlugin(name) {\n\t var plugins = this.core.plugins.concat(this.core.mediaControl.container.plugins);\n\t return plugins.filter(function (plugin) {\n\t return plugin.name === name;\n\t })[0];\n\t };\n\t\n\t /**\n\t * the current time in seconds.\n\t * @method getCurrentTime\n\t * @return {Number} current time (in seconds) of the current source\n\t */\n\t\n\t\n\t Player.prototype.getCurrentTime = function getCurrentTime() {\n\t return this.core.mediaControl.container.getCurrentTime();\n\t };\n\t\n\t /**\n\t * The time that \"0\" now represents relative to when playback started.\n\t * For a stream with a sliding window this will increase as content is\n\t * removed from the beginning.\n\t * @method getStartTimeOffset\n\t * @return {Number} time (in seconds) that time \"0\" represents.\n\t */\n\t\n\t\n\t Player.prototype.getStartTimeOffset = function getStartTimeOffset() {\n\t return this.core.mediaControl.container.getStartTimeOffset();\n\t };\n\t\n\t /**\n\t * the duration time in seconds.\n\t * @method getDuration\n\t * @return {Number} duration time (in seconds) of the current source\n\t */\n\t\n\t\n\t Player.prototype.getDuration = function getDuration() {\n\t return this.core.mediaControl.container.getDuration();\n\t };\n\t\n\t return Player;\n\t}(_base_object2.default);\n\t\n\texports.default = Player;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 47 */\n/*!******************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/base_flash_playback.js ***!\n \\******************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _flash = __webpack_require__(/*! ./public/flash.html */ 92);\n\t\n\tvar _flash2 = _interopRequireDefault(_flash);\n\t\n\tvar _flash3 = __webpack_require__(/*! ./public/flash.scss */ 81);\n\t\n\tvar _flash4 = _interopRequireDefault(_flash3);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2015 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar IE_CLASSID = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';\n\t\n\tvar BaseFlashPlayback = function (_Playback) {\n\t _inherits(BaseFlashPlayback, _Playback);\n\t\n\t function BaseFlashPlayback() {\n\t _classCallCheck(this, BaseFlashPlayback);\n\t\n\t return _possibleConstructorReturn(this, _Playback.apply(this, arguments));\n\t }\n\t\n\t BaseFlashPlayback.prototype.setElement = function setElement(element) {\n\t this.$el = element;\n\t this.el = element[0];\n\t };\n\t\n\t BaseFlashPlayback.prototype._setupFirefox = function _setupFirefox() {\n\t var $el = this.$('embed');\n\t $el.attr('data-flash-playback', this.name);\n\t $el.addClass(this.attributes.class);\n\t this.setElement($el);\n\t };\n\t\n\t BaseFlashPlayback.prototype.render = function render() {\n\t this.$el.html(this.template({\n\t cid: this.cid,\n\t swfPath: this.swfPath,\n\t baseUrl: this.baseUrl,\n\t playbackId: this.uniqueId,\n\t wmode: this.wmode,\n\t callbackName: 'window.Clappr.flashlsCallbacks.' + this.cid }));\n\t\n\t if (_browser2.default.isIE) {\n\t this.$('embed').remove();\n\t\n\t if (_browser2.default.isLegacyIE) {\n\t this.$el.attr('classid', IE_CLASSID);\n\t }\n\t }\n\t\n\t if (_browser2.default.isFirefox) {\n\t this._setupFirefox();\n\t }\n\t\n\t this.el.id = this.cid;\n\t this.$el.append(_styler2.default.getStyleFor(_flash4.default));\n\t\n\t return this;\n\t };\n\t\n\t _createClass(BaseFlashPlayback, [{\n\t key: 'tagName',\n\t get: function get() {\n\t return 'object';\n\t }\n\t }, {\n\t key: 'swfPath',\n\t get: function get() {\n\t return '';\n\t }\n\t }, {\n\t key: 'wmode',\n\t get: function get() {\n\t return 'transparent';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_flash2.default);\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t var type = 'application/x-shockwave-flash';\n\t\n\t if (_browser2.default.isLegacyIE) {\n\t type = '';\n\t }\n\t\n\t return {\n\t class: 'clappr-flash-playback',\n\t type: type,\n\t width: '100%',\n\t height: '100%',\n\t 'data-flash-playback': this.name\n\t };\n\t }\n\t }]);\n\t\n\t return BaseFlashPlayback;\n\t}(_playback2.default);\n\t\n\texports.default = BaseFlashPlayback;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 48 */\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/flash.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _base_flash_playback = __webpack_require__(/*! playbacks/base_flash_playback */ 18);\n\t\n\tvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _mediator = __webpack_require__(/*! components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _Player = __webpack_require__(/*! ./public/Player.swf */ 111);\n\t\n\tvar _Player2 = _interopRequireDefault(_Player);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar MAX_ATTEMPTS = 60;\n\t\n\tvar Flash = function (_BaseFlashPlayback) {\n\t _inherits(Flash, _BaseFlashPlayback);\n\t\n\t _createClass(Flash, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'flash';\n\t }\n\t }, {\n\t key: 'swfPath',\n\t get: function get() {\n\t return (0, _template2.default)(_Player2.default)({ baseUrl: this._baseUrl });\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return this._currentState === 'ENDED';\n\t }\n\t\n\t /**\n\t * Determine if the playback is buffering.\n\t * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return !!this._bufferingState && this._currentState !== 'ENDED';\n\t }\n\t }]);\n\t\n\t function Flash() {\n\t _classCallCheck(this, Flash);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\t\n\t _this._src = _this.options.src;\n\t _this._baseUrl = _this.options.baseUrl;\n\t _this._autoPlay = _this.options.autoPlay;\n\t _this.settings = { default: ['seekbar'] };\n\t _this.settings.left = ['playpause', 'position', 'duration'];\n\t _this.settings.right = ['fullscreen', 'volume'];\n\t _this.settings.seekEnabled = true;\n\t _this._isReadyState = false;\n\t _this._addListeners();\n\t return _this;\n\t }\n\t\n\t Flash.prototype._bootstrap = function _bootstrap() {\n\t var _this2 = this;\n\t\n\t if (this.el.playerPlay) {\n\t this.el.width = '100%';\n\t this.el.height = '100%';\n\t if (this._currentState === 'PLAYING') {\n\t this._firstPlay();\n\t } else {\n\t this._currentState = 'IDLE';\n\t this._autoPlay && this.play();\n\t }\n\t (0, _clapprZepto2.default)('<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%\" />').insertAfter(this.$el);\n\t if (this.getDuration() > 0) {\n\t this._metadataLoaded();\n\t } else {\n\t _mediator2.default.once(this.uniqueId + ':timeupdate', this._metadataLoaded, this);\n\t }\n\t } else {\n\t this._attempts = this._attempts || 0;\n\t if (++this._attempts <= MAX_ATTEMPTS) {\n\t setTimeout(function () {\n\t return _this2._bootstrap();\n\t }, 50);\n\t } else {\n\t this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);\n\t }\n\t }\n\t };\n\t\n\t Flash.prototype._metadataLoaded = function _metadataLoaded() {\n\t this._isReadyState = true;\n\t this.trigger(_events2.default.PLAYBACK_READY, this.name);\n\t this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n\t };\n\t\n\t Flash.prototype.getPlaybackType = function getPlaybackType() {\n\t return _playback2.default.VOD;\n\t };\n\t\n\t Flash.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n\t return false;\n\t };\n\t\n\t Flash.prototype._updateTime = function _updateTime() {\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.getPosition(), total: this.el.getDuration() }, this.name);\n\t };\n\t\n\t Flash.prototype._addListeners = function _addListeners() {\n\t _mediator2.default.on(this.uniqueId + ':progress', this._progress, this);\n\t _mediator2.default.on(this.uniqueId + ':timeupdate', this._updateTime, this);\n\t _mediator2.default.on(this.uniqueId + ':statechanged', this._checkState, this);\n\t _mediator2.default.on(this.uniqueId + ':flashready', this._bootstrap, this);\n\t };\n\t\n\t Flash.prototype.stopListening = function stopListening() {\n\t _BaseFlashPlayback.prototype.stopListening.call(this);\n\t _mediator2.default.off(this.uniqueId + ':progress');\n\t _mediator2.default.off(this.uniqueId + ':timeupdate');\n\t _mediator2.default.off(this.uniqueId + ':statechanged');\n\t _mediator2.default.off(this.uniqueId + ':flashready');\n\t };\n\t\n\t Flash.prototype._checkState = function _checkState() {\n\t if (this._isIdle || this._currentState === 'PAUSED') {\n\t return;\n\t } else if (this._currentState !== 'PLAYING_BUFFERING' && this.el.getState() === 'PLAYING_BUFFERING') {\n\t this._bufferingState = true;\n\t this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);\n\t this._currentState = 'PLAYING_BUFFERING';\n\t } else if (this.el.getState() === 'PLAYING') {\n\t this._bufferingState = false;\n\t this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n\t this._currentState = 'PLAYING';\n\t } else if (this.el.getState() === 'IDLE') {\n\t this._currentState = 'IDLE';\n\t } else if (this.el.getState() === 'ENDED') {\n\t this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.el.getDuration() }, this.name);\n\t this._currentState = 'ENDED';\n\t this._isIdle = true;\n\t }\n\t };\n\t\n\t Flash.prototype._progress = function _progress() {\n\t if (this._currentState !== 'IDLE' && this._currentState !== 'ENDED') {\n\t this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n\t start: 0,\n\t current: this.el.getBytesLoaded(),\n\t total: this.el.getBytesTotal()\n\t });\n\t }\n\t };\n\t\n\t Flash.prototype._firstPlay = function _firstPlay() {\n\t var _this3 = this;\n\t\n\t if (this.el.playerPlay) {\n\t this._isIdle = false;\n\t this.el.playerPlay(this._src);\n\t this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n\t return _this3._checkInitialSeek();\n\t });\n\t this._currentState = 'PLAYING';\n\t } else {\n\t this.listenToOnce(this, _events2.default.PLAYBACK_READY, this._firstPlay);\n\t }\n\t };\n\t\n\t Flash.prototype._checkInitialSeek = function _checkInitialSeek() {\n\t var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);\n\t if (seekTime !== 0) {\n\t this.seekSeconds(seekTime);\n\t }\n\t };\n\t\n\t Flash.prototype.play = function play() {\n\t this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n\t if (this._currentState === 'PAUSED' || this._currentState === 'PLAYING_BUFFERING') {\n\t this._currentState = 'PLAYING';\n\t this.el.playerResume();\n\t this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n\t } else if (this._currentState !== 'PLAYING') {\n\t this._firstPlay();\n\t this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n\t }\n\t };\n\t\n\t Flash.prototype.volume = function volume(value) {\n\t var _this4 = this;\n\t\n\t if (this.isReady) {\n\t this.el.playerVolume(value);\n\t } else {\n\t this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n\t return _this4.volume(value);\n\t });\n\t }\n\t };\n\t\n\t Flash.prototype.pause = function pause() {\n\t this._currentState = 'PAUSED';\n\t this.el.playerPause();\n\t this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n\t };\n\t\n\t Flash.prototype.stop = function stop() {\n\t this.el.playerStop();\n\t this.trigger(_events2.default.PLAYBACK_STOP);\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n\t };\n\t\n\t Flash.prototype.isPlaying = function isPlaying() {\n\t return !!(this.isReady && this._currentState.indexOf('PLAYING') > -1);\n\t };\n\t\n\t Flash.prototype.getDuration = function getDuration() {\n\t return this.el.getDuration();\n\t };\n\t\n\t Flash.prototype.seekPercentage = function seekPercentage(percentage) {\n\t var _this5 = this;\n\t\n\t if (this.el.getDuration() > 0) {\n\t var seekSeconds = this.el.getDuration() * (percentage / 100);\n\t this.seek(seekSeconds);\n\t } else {\n\t this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n\t return _this5.seekPercentage(percentage);\n\t });\n\t }\n\t };\n\t\n\t Flash.prototype.seek = function seek(time) {\n\t var _this6 = this;\n\t\n\t if (this.isReady && this.el.playerSeek) {\n\t this.el.playerSeek(time);\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: this.el.getDuration() }, this.name);\n\t if (this._currentState === 'PAUSED') {\n\t this.el.playerPause();\n\t }\n\t } else {\n\t this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n\t return _this6.seek(time);\n\t });\n\t }\n\t };\n\t\n\t Flash.prototype.destroy = function destroy() {\n\t clearInterval(this.bootstrapId);\n\t _BaseFlashPlayback.prototype.stopListening.call(this);\n\t this.$el.remove();\n\t };\n\t\n\t _createClass(Flash, [{\n\t key: 'isReady',\n\t get: function get() {\n\t return this._isReadyState;\n\t }\n\t }]);\n\t\n\t return Flash;\n\t}(_base_flash_playback2.default);\n\t\n\texports.default = Flash;\n\t\n\t\n\tFlash.canPlay = function (resource) {\n\t if (!_browser2.default.hasFlash || !resource || resource.constructor !== String) {\n\t return false;\n\t } else {\n\t var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n\t return resourceParts.length > 1 && !_browser2.default.isMobile && resourceParts[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/);\n\t }\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 49 */\n/*!******************************************!*\\\n !*** ./src/playbacks/flashls/flashls.js ***!\n \\******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _base_flash_playback = __webpack_require__(/*! playbacks/base_flash_playback */ 18);\n\t\n\tvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _mediator = __webpack_require__(/*! components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _flashls_events = __webpack_require__(/*! ./flashls_events */ 50);\n\t\n\tvar _flashls_events2 = _interopRequireDefault(_flashls_events);\n\t\n\tvar _HLSPlayer = __webpack_require__(/*! ./public/HLSPlayer.swf */ 112);\n\t\n\tvar _HLSPlayer2 = _interopRequireDefault(_HLSPlayer);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar MAX_ATTEMPTS = 60;\n\tvar AUTO = -1;\n\t\n\tvar FlasHLS = function (_BaseFlashPlayback) {\n\t _inherits(FlasHLS, _BaseFlashPlayback);\n\t\n\t _createClass(FlasHLS, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'flashls';\n\t }\n\t }, {\n\t key: 'swfPath',\n\t get: function get() {\n\t return (0, _template2.default)(_HLSPlayer2.default)({ baseUrl: this._baseUrl });\n\t }\n\t }, {\n\t key: 'levels',\n\t get: function get() {\n\t return this._levels || [];\n\t }\n\t }, {\n\t key: 'currentLevel',\n\t get: function get() {\n\t if (this._currentLevel === null || this._currentLevel === undefined) {\n\t return AUTO;\n\t } else {\n\t return this._currentLevel; //0 is a valid level ID\n\t }\n\t },\n\t set: function set(id) {\n\t this._currentLevel = id;\n\t this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);\n\t this.el.playerSetCurrentLevel(id);\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return this._hasEnded;\n\t }\n\t\n\t /**\n\t * Determine if the playback is buffering.\n\t * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return !!this._bufferingState && !this._hasEnded;\n\t }\n\t }]);\n\t\n\t function FlasHLS() {\n\t _classCallCheck(this, FlasHLS);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _this = _possibleConstructorReturn(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\t\n\t _this._src = _this.options.src;\n\t _this._baseUrl = _this.options.baseUrl;\n\t _this._initHlsParameters(_this.options);\n\t // TODO can this be private?\n\t _this.highDefinition = false;\n\t _this._autoPlay = _this.options.autoPlay;\n\t _this._loop = _this.options.loop;\n\t _this._defaultSettings = {\n\t left: ['playstop'],\n\t default: ['seekbar'],\n\t right: ['fullscreen', 'volume', 'hd-indicator'],\n\t seekEnabled: false\n\t };\n\t _this.settings = _clapprZepto2.default.extend({}, _this._defaultSettings);\n\t _this._playbackType = _playback2.default.LIVE;\n\t _this._hasEnded = false;\n\t _this._addListeners();\n\t return _this;\n\t }\n\t\n\t FlasHLS.prototype._initHlsParameters = function _initHlsParameters(options) {\n\t this._autoStartLoad = options.autoStartLoad === undefined ? true : options.autoStartLoad;\n\t this._capLevelToStage = options.capLevelToStage === undefined ? false : options.capLevelToStage;\n\t this._maxLevelCappingMode = options.maxLevelCappingMode === undefined ? 'downscale' : options.maxLevelCappingMode;\n\t this._minBufferLength = options.minBufferLength === undefined ? -1 : options.minBufferLength;\n\t this._minBufferLengthCapping = options.minBufferLengthCapping === undefined ? -1 : options.minBufferLengthCapping;\n\t this._maxBufferLength = options.maxBufferLength === undefined ? 120 : options.maxBufferLength;\n\t this._maxBackBufferLength = options.maxBackBufferLength === undefined ? 30 : options.maxBackBufferLength;\n\t this._lowBufferLength = options.lowBufferLength === undefined ? 3 : options.lowBufferLength;\n\t this._mediaTimePeriod = options.mediaTimePeriod === undefined ? 100 : options.mediaTimePeriod;\n\t this._fpsDroppedMonitoringPeriod = options.fpsDroppedMonitoringPeriod === undefined ? 5000 : options.fpsDroppedMonitoringPeriod;\n\t this._fpsDroppedMonitoringThreshold = options.fpsDroppedMonitoringThreshold === undefined ? 0.2 : options.fpsDroppedMonitoringThreshold;\n\t this._capLevelonFPSDrop = options.capLevelonFPSDrop === undefined ? false : options.capLevelonFPSDrop;\n\t this._smoothAutoSwitchonFPSDrop = options.smoothAutoSwitchonFPSDrop === undefined ? this.capLevelonFPSDrop : options.smoothAutoSwitchonFPSDrop;\n\t this._switchDownOnLevelError = options.switchDownOnLevelError === undefined ? true : options.switchDownOnLevelError;\n\t this._seekMode = options.seekMode === undefined ? 'ACCURATE' : options.seekMode;\n\t this._keyLoadMaxRetry = options.keyLoadMaxRetry === undefined ? 3 : options.keyLoadMaxRetry;\n\t this._keyLoadMaxRetryTimeout = options.keyLoadMaxRetryTimeout === undefined ? 64000 : options.keyLoadMaxRetryTimeout;\n\t this._fragmentLoadMaxRetry = options.fragmentLoadMaxRetry === undefined ? 3 : options.fragmentLoadMaxRetry;\n\t this._fragmentLoadMaxRetryTimeout = options.fragmentLoadMaxRetryTimeout === undefined ? 4000 : options.fragmentLoadMaxRetryTimeout;\n\t this._fragmentLoadSkipAfterMaxRetry = options.fragmentLoadSkipAfterMaxRetry === undefined ? true : options.fragmentLoadSkipAfterMaxRetry;\n\t this._maxSkippedFragments = options.maxSkippedFragments === undefined ? 5 : options.maxSkippedFragments;\n\t this._flushLiveURLCache = options.flushLiveURLCache === undefined ? false : options.flushLiveURLCache;\n\t this._initialLiveManifestSize = options.initialLiveManifestSize === undefined ? 1 : options.initialLiveManifestSize;\n\t this._manifestLoadMaxRetry = options.manifestLoadMaxRetry === undefined ? 3 : options.manifestLoadMaxRetry;\n\t this._manifestLoadMaxRetryTimeout = options.manifestLoadMaxRetryTimeout === undefined ? 64000 : options.manifestLoadMaxRetryTimeout;\n\t this._manifestRedundantLoadmaxRetry = options.manifestRedundantLoadmaxRetry === undefined ? 3 : options.manifestRedundantLoadmaxRetry;\n\t this._startFromBitrate = options.startFromBitrate === undefined ? -1 : options.startFromBitrate;\n\t this._startFromLevel = options.startFromLevel === undefined ? -1 : options.startFromLevel;\n\t this._autoStartMaxDuration = options.autoStartMaxDuration === undefined ? -1 : options.autoStartMaxDuration;\n\t this._seekFromLevel = options.seekFromLevel === undefined ? -1 : options.seekFromLevel;\n\t this._useHardwareVideoDecoder = options.useHardwareVideoDecoder === undefined ? false : options.useHardwareVideoDecoder;\n\t this._hlsLogEnabled = options.hlsLogEnabled === undefined ? true : options.hlsLogEnabled;\n\t this._logDebug = options.logDebug === undefined ? false : options.logDebug;\n\t this._logDebug2 = options.logDebug2 === undefined ? false : options.logDebug2;\n\t this._logWarn = options.logWarn === undefined ? true : options.logWarn;\n\t this._logError = options.logError === undefined ? true : options.logError;\n\t this._hlsMinimumDvrSize = options.hlsMinimumDvrSize === undefined ? 60 : options.hlsMinimumDvrSize;\n\t };\n\t\n\t FlasHLS.prototype._addListeners = function _addListeners() {\n\t var _this2 = this;\n\t\n\t _mediator2.default.on(this.cid + ':flashready', function () {\n\t return _this2._bootstrap();\n\t });\n\t _mediator2.default.on(this.cid + ':timeupdate', function (timeMetrics) {\n\t return _this2._updateTime(timeMetrics);\n\t });\n\t _mediator2.default.on(this.cid + ':playbackstate', function (state) {\n\t return _this2._setPlaybackState(state);\n\t });\n\t _mediator2.default.on(this.cid + ':levelchanged', function (level) {\n\t return _this2._levelChanged(level);\n\t });\n\t _mediator2.default.on(this.cid + ':error', function (code, url, message) {\n\t return _this2._flashPlaybackError(code, url, message);\n\t });\n\t _mediator2.default.on(this.cid + ':fragmentloaded', function (loadmetrics) {\n\t return _this2._onFragmentLoaded(loadmetrics);\n\t });\n\t _mediator2.default.on(this.cid + ':levelendlist', function (level) {\n\t return _this2._onLevelEndlist(level);\n\t });\n\t };\n\t\n\t FlasHLS.prototype.stopListening = function stopListening() {\n\t _BaseFlashPlayback.prototype.stopListening.call(this);\n\t _mediator2.default.off(this.cid + ':flashready');\n\t _mediator2.default.off(this.cid + ':timeupdate');\n\t _mediator2.default.off(this.cid + ':playbackstate');\n\t _mediator2.default.off(this.cid + ':levelchanged');\n\t _mediator2.default.off(this.cid + ':playbackerror');\n\t _mediator2.default.off(this.cid + ':fragmentloaded');\n\t _mediator2.default.off(this.cid + ':manifestloaded');\n\t _mediator2.default.off(this.cid + ':levelendlist');\n\t };\n\t\n\t FlasHLS.prototype._bootstrap = function _bootstrap() {\n\t var _this3 = this;\n\t\n\t if (this.el.playerLoad) {\n\t this.el.width = '100%';\n\t this.el.height = '100%';\n\t this._isReadyState = true;\n\t this._srcLoaded = false;\n\t this._currentState = 'IDLE';\n\t this._setFlashSettings();\n\t this._updatePlaybackType();\n\t if (this._autoPlay || this._shouldPlayOnManifestLoaded) {\n\t this.play();\n\t }\n\t this.trigger(_events2.default.PLAYBACK_READY, this.name);\n\t } else {\n\t this._bootstrapAttempts = this._bootstrapAttempts || 0;\n\t if (++this._bootstrapAttempts <= MAX_ATTEMPTS) {\n\t setTimeout(function () {\n\t return _this3._bootstrap();\n\t }, 50);\n\t } else {\n\t this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);\n\t }\n\t }\n\t };\n\t\n\t FlasHLS.prototype._setFlashSettings = function _setFlashSettings() {\n\t this.el.playerSetAutoStartLoad(this._autoStartLoad);\n\t this.el.playerSetCapLevelToStage(this._capLevelToStage);\n\t this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);\n\t this.el.playerSetMinBufferLength(this._minBufferLength);\n\t this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);\n\t this.el.playerSetMaxBufferLength(this._maxBufferLength);\n\t this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);\n\t this.el.playerSetLowBufferLength(this._lowBufferLength);\n\t this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);\n\t this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);\n\t this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);\n\t this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);\n\t this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);\n\t this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);\n\t this.el.playerSetSeekMode(this._seekMode);\n\t this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);\n\t this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);\n\t this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);\n\t this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);\n\t this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);\n\t this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);\n\t this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);\n\t this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);\n\t this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);\n\t this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);\n\t this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);\n\t this.el.playerSetStartFromBitrate(this._startFromBitrate);\n\t this.el.playerSetStartFromLevel(this._startFromLevel);\n\t this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);\n\t this.el.playerSetSeekFromLevel(this._seekFromLevel);\n\t this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);\n\t this.el.playerSetLogInfo(this._hlsLogEnabled);\n\t this.el.playerSetLogDebug(this._logDebug);\n\t this.el.playerSetLogDebug2(this._logDebug2);\n\t this.el.playerSetLogWarn(this._logWarn);\n\t this.el.playerSetLogError(this._logError);\n\t };\n\t\n\t FlasHLS.prototype.setAutoStartLoad = function setAutoStartLoad(autoStartLoad) {\n\t this._autoStartLoad = autoStartLoad;\n\t this.el.playerSetAutoStartLoad(this._autoStartLoad);\n\t };\n\t\n\t FlasHLS.prototype.setCapLevelToStage = function setCapLevelToStage(capLevelToStage) {\n\t this._capLevelToStage = capLevelToStage;\n\t this.el.playerSetCapLevelToStage(this._capLevelToStage);\n\t };\n\t\n\t FlasHLS.prototype.setMaxLevelCappingMode = function setMaxLevelCappingMode(maxLevelCappingMode) {\n\t this._maxLevelCappingMode = maxLevelCappingMode;\n\t this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);\n\t };\n\t\n\t FlasHLS.prototype.setSetMinBufferLength = function setSetMinBufferLength(minBufferLength) {\n\t this._minBufferLength = minBufferLength;\n\t this.el.playerSetMinBufferLength(this._minBufferLength);\n\t };\n\t\n\t FlasHLS.prototype.setMinBufferLengthCapping = function setMinBufferLengthCapping(minBufferLengthCapping) {\n\t this._minBufferLengthCapping = minBufferLengthCapping;\n\t this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);\n\t };\n\t\n\t FlasHLS.prototype.setMaxBufferLength = function setMaxBufferLength(maxBufferLength) {\n\t this._maxBufferLength = maxBufferLength;\n\t this.el.playerSetMaxBufferLength(this._maxBufferLength);\n\t };\n\t\n\t FlasHLS.prototype.setMaxBackBufferLength = function setMaxBackBufferLength(maxBackBufferLength) {\n\t this._maxBackBufferLength = maxBackBufferLength;\n\t this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);\n\t };\n\t\n\t FlasHLS.prototype.setLowBufferLength = function setLowBufferLength(lowBufferLength) {\n\t this._lowBufferLength = lowBufferLength;\n\t this.el.playerSetLowBufferLength(this._lowBufferLength);\n\t };\n\t\n\t FlasHLS.prototype.setMediaTimePeriod = function setMediaTimePeriod(mediaTimePeriod) {\n\t this._mediaTimePeriod = mediaTimePeriod;\n\t this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);\n\t };\n\t\n\t FlasHLS.prototype.setFpsDroppedMonitoringPeriod = function setFpsDroppedMonitoringPeriod(fpsDroppedMonitoringPeriod) {\n\t this._fpsDroppedMonitoringPeriod = fpsDroppedMonitoringPeriod;\n\t this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);\n\t };\n\t\n\t FlasHLS.prototype.setFpsDroppedMonitoringThreshold = function setFpsDroppedMonitoringThreshold(fpsDroppedMonitoringThreshold) {\n\t this._fpsDroppedMonitoringThreshold = fpsDroppedMonitoringThreshold;\n\t this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);\n\t };\n\t\n\t FlasHLS.prototype.setCapLevelonFPSDrop = function setCapLevelonFPSDrop(capLevelonFPSDrop) {\n\t this._capLevelonFPSDrop = capLevelonFPSDrop;\n\t this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);\n\t };\n\t\n\t FlasHLS.prototype.setSmoothAutoSwitchonFPSDrop = function setSmoothAutoSwitchonFPSDrop(smoothAutoSwitchonFPSDrop) {\n\t this._smoothAutoSwitchonFPSDrop = smoothAutoSwitchonFPSDrop;\n\t this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);\n\t };\n\t\n\t FlasHLS.prototype.setSwitchDownOnLevelError = function setSwitchDownOnLevelError(switchDownOnLevelError) {\n\t this._switchDownOnLevelError = switchDownOnLevelError;\n\t this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);\n\t };\n\t\n\t FlasHLS.prototype.setSeekMode = function setSeekMode(seekMode) {\n\t this._seekMode = seekMode;\n\t this.el.playerSetSeekMode(this._seekMode);\n\t };\n\t\n\t FlasHLS.prototype.setKeyLoadMaxRetry = function setKeyLoadMaxRetry(keyLoadMaxRetry) {\n\t this._keyLoadMaxRetry = keyLoadMaxRetry;\n\t this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);\n\t };\n\t\n\t FlasHLS.prototype.setKeyLoadMaxRetryTimeout = function setKeyLoadMaxRetryTimeout(keyLoadMaxRetryTimeout) {\n\t this._keyLoadMaxRetryTimeout = keyLoadMaxRetryTimeout;\n\t this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);\n\t };\n\t\n\t FlasHLS.prototype.setFragmentLoadMaxRetry = function setFragmentLoadMaxRetry(fragmentLoadMaxRetry) {\n\t this._fragmentLoadMaxRetry = fragmentLoadMaxRetry;\n\t this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);\n\t };\n\t\n\t FlasHLS.prototype.setFragmentLoadMaxRetryTimeout = function setFragmentLoadMaxRetryTimeout(fragmentLoadMaxRetryTimeout) {\n\t this._fragmentLoadMaxRetryTimeout = fragmentLoadMaxRetryTimeout;\n\t this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);\n\t };\n\t\n\t FlasHLS.prototype.setFragmentLoadSkipAfterMaxRetry = function setFragmentLoadSkipAfterMaxRetry(fragmentLoadSkipAfterMaxRetry) {\n\t this._fragmentLoadSkipAfterMaxRetry = fragmentLoadSkipAfterMaxRetry;\n\t this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);\n\t };\n\t\n\t FlasHLS.prototype.setMaxSkippedFragments = function setMaxSkippedFragments(maxSkippedFragments) {\n\t this._maxSkippedFragments = maxSkippedFragments;\n\t this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);\n\t };\n\t\n\t FlasHLS.prototype.setFlushLiveURLCache = function setFlushLiveURLCache(flushLiveURLCache) {\n\t this._flushLiveURLCache = flushLiveURLCache;\n\t this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);\n\t };\n\t\n\t FlasHLS.prototype.setInitialLiveManifestSize = function setInitialLiveManifestSize(initialLiveManifestSize) {\n\t this._initialLiveManifestSize = initialLiveManifestSize;\n\t this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);\n\t };\n\t\n\t FlasHLS.prototype.setManifestLoadMaxRetry = function setManifestLoadMaxRetry(manifestLoadMaxRetry) {\n\t this._manifestLoadMaxRetry = manifestLoadMaxRetry;\n\t this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);\n\t };\n\t\n\t FlasHLS.prototype.setManifestLoadMaxRetryTimeout = function setManifestLoadMaxRetryTimeout(manifestLoadMaxRetryTimeout) {\n\t this._manifestLoadMaxRetryTimeout = manifestLoadMaxRetryTimeout;\n\t this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);\n\t };\n\t\n\t FlasHLS.prototype.setManifestRedundantLoadmaxRetry = function setManifestRedundantLoadmaxRetry(manifestRedundantLoadmaxRetry) {\n\t this._manifestRedundantLoadmaxRetry = manifestRedundantLoadmaxRetry;\n\t this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);\n\t };\n\t\n\t FlasHLS.prototype.setStartFromBitrate = function setStartFromBitrate(startFromBitrate) {\n\t this._startFromBitrate = startFromBitrate;\n\t this.el.playerSetStartFromBitrate(this._startFromBitrate);\n\t };\n\t\n\t FlasHLS.prototype.setStartFromLevel = function setStartFromLevel(startFromLevel) {\n\t this._startFromLevel = startFromLevel;\n\t this.el.playerSetStartFromLevel(this._startFromLevel);\n\t };\n\t\n\t FlasHLS.prototype.setAutoStartMaxDuration = function setAutoStartMaxDuration(autoStartMaxDuration) {\n\t this._autoStartMaxDuration = autoStartMaxDuration;\n\t this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);\n\t };\n\t\n\t FlasHLS.prototype.setSeekFromLevel = function setSeekFromLevel(seekFromLevel) {\n\t this._seekFromLevel = seekFromLevel;\n\t this.el.playerSetSeekFromLevel(this._seekFromLevel);\n\t };\n\t\n\t FlasHLS.prototype.setUseHardwareVideoDecoder = function setUseHardwareVideoDecoder(useHardwareVideoDecoder) {\n\t this._useHardwareVideoDecoder = useHardwareVideoDecoder;\n\t this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);\n\t };\n\t\n\t FlasHLS.prototype.setSetLogInfo = function setSetLogInfo(hlsLogEnabled) {\n\t this._hlsLogEnabled = hlsLogEnabled;\n\t this.el.playerSetLogInfo(this._hlsLogEnabled);\n\t };\n\t\n\t FlasHLS.prototype.setLogDebug = function setLogDebug(logDebug) {\n\t this._logDebug = logDebug;\n\t this.el.playerSetLogDebug(this._logDebug);\n\t };\n\t\n\t FlasHLS.prototype.setLogDebug2 = function setLogDebug2(logDebug2) {\n\t this._logDebug2 = logDebug2;\n\t this.el.playerSetLogDebug2(this._logDebug2);\n\t };\n\t\n\t FlasHLS.prototype.setLogWarn = function setLogWarn(logWarn) {\n\t this._logWarn = logWarn;\n\t this.el.playerSetLogWarn(this._logWarn);\n\t };\n\t\n\t FlasHLS.prototype.setLogError = function setLogError(logError) {\n\t this._logError = logError;\n\t this.el.playerSetLogError(this._logError);\n\t };\n\t\n\t FlasHLS.prototype._levelChanged = function _levelChanged(level) {\n\t var currentLevel = this.el.getLevels()[level];\n\t if (currentLevel) {\n\t this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;\n\t this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n\t\n\t if (!this._levels || this._levels.length === 0) this._fillLevels();\n\t\n\t this.trigger(_events2.default.PLAYBACK_BITRATE, {\n\t height: currentLevel.height,\n\t width: currentLevel.width,\n\t bandwidth: currentLevel.bitrate,\n\t bitrate: currentLevel.bitrate,\n\t level: level\n\t });\n\t this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n\t }\n\t };\n\t\n\t FlasHLS.prototype._updateTime = function _updateTime(timeMetrics) {\n\t if (this._currentState === 'IDLE') {\n\t return;\n\t }\n\t\n\t var duration = this._normalizeDuration(timeMetrics.duration);\n\t var position = Math.min(Math.max(timeMetrics.position, 0), duration);\n\t var previousDVRStatus = this._dvrEnabled;\n\t var livePlayback = this._playbackType === _playback2.default.LIVE;\n\t this._dvrEnabled = livePlayback && duration > this._hlsMinimumDvrSize;\n\t\n\t if (duration === 100 || livePlayback === undefined) {\n\t return;\n\t }\n\t\n\t if (this._dvrEnabled !== previousDVRStatus) {\n\t this._updateSettings();\n\t this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n\t }\n\t\n\t if (livePlayback && (!this._dvrEnabled || !this._dvrInUse)) {\n\t position = duration;\n\t }\n\t\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: position, total: duration }, this.name);\n\t };\n\t\n\t FlasHLS.prototype.play = function play() {\n\t this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n\t if (this._currentState === 'PAUSED') {\n\t this.el.playerResume();\n\t } else if (!this._srcLoaded && this._currentState !== 'PLAYING') {\n\t this._firstPlay();\n\t } else {\n\t this.el.playerPlay();\n\t }\n\t };\n\t\n\t FlasHLS.prototype.getPlaybackType = function getPlaybackType() {\n\t return this._playbackType ? this._playbackType : null;\n\t };\n\t\n\t FlasHLS.prototype.getCurrentLevelIndex = function getCurrentLevelIndex() {\n\t return this._currentLevel;\n\t };\n\t\n\t FlasHLS.prototype.getCurrentLevel = function getCurrentLevel() {\n\t return this.levels[this.currentLevel];\n\t };\n\t\n\t FlasHLS.prototype.getCurrentBitrate = function getCurrentBitrate() {\n\t return this.levels[this.currentLevel].bitrate;\n\t };\n\t\n\t FlasHLS.prototype.setCurrentLevel = function setCurrentLevel(level) {\n\t this.currentLevel = level;\n\t };\n\t\n\t FlasHLS.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n\t return this.highDefinition;\n\t };\n\t\n\t FlasHLS.prototype.getLevels = function getLevels() {\n\t return this.levels;\n\t };\n\t\n\t FlasHLS.prototype._setPlaybackState = function _setPlaybackState(state) {\n\t if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING'].indexOf(state) >= 0) {\n\t this._bufferingState = true;\n\t this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);\n\t this._updateCurrentState(state);\n\t } else if (['PLAYING', 'PAUSED'].indexOf(state) >= 0) {\n\t if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING', 'IDLE'].indexOf(this._currentState) >= 0) {\n\t this._bufferingState = false;\n\t this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n\t }\n\t this._updateCurrentState(state);\n\t } else if (state === 'IDLE') {\n\t this._srcLoaded = false;\n\t if (this._loop && ['PLAYING_BUFFERING', 'PLAYING'].indexOf(this._currentState) >= 0) {\n\t this.play();\n\t this.seek(0);\n\t } else {\n\t this._updateCurrentState(state);\n\t this._hasEnded = true;\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.getDuration() }, this.name);\n\t this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n\t }\n\t }\n\t };\n\t\n\t FlasHLS.prototype._updateCurrentState = function _updateCurrentState(state) {\n\t this._currentState = state;\n\t if (state !== 'IDLE') {\n\t this._hasEnded = false;\n\t }\n\t this._updatePlaybackType();\n\t if (state === 'PLAYING') {\n\t this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n\t } else if (state === 'PAUSED') {\n\t this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n\t }\n\t };\n\t\n\t FlasHLS.prototype._updatePlaybackType = function _updatePlaybackType() {\n\t this._playbackType = this.el.getType();\n\t if (this._playbackType) {\n\t this._playbackType = this._playbackType.toLowerCase();\n\t if (this._playbackType === _playback2.default.VOD) {\n\t this._startReportingProgress();\n\t } else {\n\t this._stopReportingProgress();\n\t }\n\t }\n\t this.trigger(_events2.default.PLAYBACK_PLAYBACKSTATE, { type: this._playbackType });\n\t };\n\t\n\t FlasHLS.prototype._startReportingProgress = function _startReportingProgress() {\n\t if (!this._reportingProgress) {\n\t this._reportingProgress = true;\n\t }\n\t };\n\t\n\t FlasHLS.prototype._stopReportingProgress = function _stopReportingProgress() {\n\t this._reportingProgress = false;\n\t };\n\t\n\t FlasHLS.prototype._onFragmentLoaded = function _onFragmentLoaded(loadmetrics) {\n\t this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, loadmetrics);\n\t if (this._reportingProgress && this.el.getPosition) {\n\t var buffered = this.el.getPosition() + this.el.getbufferLength();\n\t this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n\t start: this.el.getPosition(),\n\t current: buffered,\n\t total: this.el.getDuration()\n\t });\n\t }\n\t };\n\t\n\t FlasHLS.prototype._onLevelEndlist = function _onLevelEndlist() {\n\t this._updatePlaybackType();\n\t };\n\t\n\t FlasHLS.prototype._firstPlay = function _firstPlay() {\n\t var _this4 = this;\n\t\n\t this._shouldPlayOnManifestLoaded = true;\n\t if (this.el.playerLoad) {\n\t _mediator2.default.once(this.cid + ':manifestloaded', function (duration, loadmetrics) {\n\t return _this4._manifestLoaded(duration, loadmetrics);\n\t });\n\t this._setFlashSettings(); //ensure flushLiveURLCache will work (#327)\n\t this.el.playerLoad(this._src);\n\t this._srcLoaded = true;\n\t }\n\t };\n\t\n\t FlasHLS.prototype.volume = function volume(value) {\n\t var _this5 = this;\n\t\n\t if (this.isReady) {\n\t this.el.playerVolume(value);\n\t } else {\n\t this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n\t return _this5.volume(value);\n\t });\n\t }\n\t };\n\t\n\t FlasHLS.prototype.pause = function pause() {\n\t if (this._playbackType !== _playback2.default.LIVE || this._dvrEnabled) {\n\t this.el.playerPause();\n\t if (this._playbackType === _playback2.default.LIVE && this._dvrEnabled) {\n\t this._updateDvr(true);\n\t }\n\t }\n\t };\n\t\n\t FlasHLS.prototype.stop = function stop() {\n\t this._srcLoaded = false;\n\t this.el.playerStop();\n\t this.trigger(_events2.default.PLAYBACK_STOP);\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n\t };\n\t\n\t FlasHLS.prototype.isPlaying = function isPlaying() {\n\t if (this._currentState) {\n\t return !!this._currentState.match(/playing/i);\n\t }\n\t return false;\n\t };\n\t\n\t FlasHLS.prototype.getDuration = function getDuration() {\n\t return this._normalizeDuration(this.el.getDuration());\n\t };\n\t\n\t FlasHLS.prototype._normalizeDuration = function _normalizeDuration(duration) {\n\t if (this._playbackType === _playback2.default.LIVE) {\n\t // estimate 10 seconds of buffer time for live streams for seek positions\n\t duration = Math.max(0, duration - 10);\n\t }\n\t return duration;\n\t };\n\t\n\t FlasHLS.prototype.seekPercentage = function seekPercentage(percentage) {\n\t var duration = this.el.getDuration();\n\t var time = 0;\n\t if (percentage > 0) {\n\t time = duration * percentage / 100;\n\t }\n\t this.seek(time);\n\t };\n\t\n\t FlasHLS.prototype.seek = function seek(time) {\n\t var duration = this.getDuration();\n\t if (this._playbackType === _playback2.default.LIVE) {\n\t // seek operations to a time within 3 seconds from live stream will position playhead back to live\n\t var dvrInUse = duration - time > 3;\n\t this._updateDvr(dvrInUse);\n\t }\n\t this.el.playerSeek(time);\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: duration }, this.name);\n\t };\n\t\n\t FlasHLS.prototype._updateDvr = function _updateDvr(dvrInUse) {\n\t var previousDvrInUse = !!this._dvrInUse;\n\t this._dvrInUse = dvrInUse;\n\t if (this._dvrInUse !== previousDvrInUse) {\n\t this._updateSettings();\n\t this.trigger(_events2.default.PLAYBACK_DVR, this._dvrInUse);\n\t this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': this._dvrInUse });\n\t }\n\t };\n\t\n\t FlasHLS.prototype._flashPlaybackError = function _flashPlaybackError(code, url, message) {\n\t this.trigger(_events2.default.PLAYBACK_ERROR, { code: code, url: url, message: message });\n\t this.trigger(_events2.default.PLAYBACK_STOP);\n\t };\n\t\n\t FlasHLS.prototype._manifestLoaded = function _manifestLoaded(duration, loadmetrics) {\n\t if (this._shouldPlayOnManifestLoaded) {\n\t this._shouldPlayOnManifestLoaded = false;\n\t // this method initialises the player (and starts playback)\n\t // this needs to happen before PLAYBACK_LOADEDMETADATA is fired\n\t // as the user may call seek() in a LOADEDMETADATA listener.\n\t /// when playerPlay() is called the player seeks to 0\n\t this.el.playerPlay();\n\t }\n\t\n\t this._fillLevels();\n\t this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: duration, data: loadmetrics });\n\t };\n\t\n\t FlasHLS.prototype._fillLevels = function _fillLevels() {\n\t var levels = this.el.getLevels();\n\t var levelsLength = levels.length;\n\t this._levels = [];\n\t\n\t for (var index = 0; index < levelsLength; index++) {\n\t this._levels.push({ id: index, label: levels[index].height + 'p', level: levels[index] });\n\t }\n\t this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n\t };\n\t\n\t FlasHLS.prototype.destroy = function destroy() {\n\t this.stopListening();\n\t this.$el.remove();\n\t };\n\t\n\t FlasHLS.prototype._updateSettings = function _updateSettings() {\n\t this.settings = _clapprZepto2.default.extend({}, this._defaultSettings);\n\t if (this._playbackType === _playback2.default.VOD || this._dvrInUse) {\n\t this.settings.left = ['playpause', 'position', 'duration'];\n\t this.settings.seekEnabled = true;\n\t } else if (this._dvrEnabled) {\n\t this.settings.left = ['playpause'];\n\t this.settings.seekEnabled = true;\n\t } else {\n\t this.settings.seekEnabled = false;\n\t }\n\t };\n\t\n\t FlasHLS.prototype._createCallbacks = function _createCallbacks() {\n\t var _this6 = this;\n\t\n\t if (!window.Clappr) {\n\t window.Clappr = {};\n\t }\n\t if (!window.Clappr.flashlsCallbacks) {\n\t window.Clappr.flashlsCallbacks = {};\n\t }\n\t this.flashlsEvents = new _flashls_events2.default(this.cid);\n\t window.Clappr.flashlsCallbacks[this.cid] = function (eventName, args) {\n\t _this6.flashlsEvents[eventName].apply(_this6.flashlsEvents, args);\n\t };\n\t };\n\t\n\t FlasHLS.prototype.render = function render() {\n\t _BaseFlashPlayback.prototype.render.call(this);\n\t this._createCallbacks();\n\t return this;\n\t };\n\t\n\t _createClass(FlasHLS, [{\n\t key: 'isReady',\n\t get: function get() {\n\t return this._isReadyState;\n\t }\n\t }, {\n\t key: 'dvrEnabled',\n\t get: function get() {\n\t return !!this._dvrEnabled;\n\t }\n\t }]);\n\t\n\t return FlasHLS;\n\t}(_base_flash_playback2.default);\n\t\n\texports.default = FlasHLS;\n\t\n\t\n\tFlasHLS.canPlay = function (resource, mimeType) {\n\t var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n\t return _browser2.default.hasFlash && (resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl');\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 50 */\n/*!*************************************************!*\\\n !*** ./src/playbacks/flashls/flashls_events.js ***!\n \\*************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _mediator = __webpack_require__(/*! ../../components/mediator */ 11);\n\t\n\tvar _mediator2 = _interopRequireDefault(_mediator);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar HLSEvents = function () {\n\t function HLSEvents(instanceId) {\n\t _classCallCheck(this, HLSEvents);\n\t\n\t this.instanceId = instanceId;\n\t }\n\t\n\t HLSEvents.prototype.ready = function ready() {\n\t _mediator2.default.trigger(this.instanceId + ':flashready');\n\t };\n\t\n\t HLSEvents.prototype.videoSize = function videoSize(width, height) {\n\t _mediator2.default.trigger(this.instanceId + ':videosizechanged', width, height);\n\t };\n\t\n\t HLSEvents.prototype.complete = function complete() {\n\t _mediator2.default.trigger(this.instanceId + ':complete');\n\t };\n\t\n\t HLSEvents.prototype.error = function error(code, url, message) {\n\t _mediator2.default.trigger(this.instanceId + ':error', code, url, message);\n\t };\n\t\n\t HLSEvents.prototype.manifest = function manifest(duration, loadmetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':manifestloaded', duration, loadmetrics);\n\t };\n\t\n\t HLSEvents.prototype.audioLevelLoaded = function audioLevelLoaded(loadmetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':audiolevelloaded', loadmetrics);\n\t };\n\t\n\t HLSEvents.prototype.levelLoaded = function levelLoaded(loadmetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':levelloaded', loadmetrics);\n\t };\n\t\n\t HLSEvents.prototype.levelEndlist = function levelEndlist(level) {\n\t _mediator2.default.trigger(this.instanceId + ':levelendlist', level);\n\t };\n\t\n\t HLSEvents.prototype.fragmentLoaded = function fragmentLoaded(loadmetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':fragmentloaded', loadmetrics);\n\t };\n\t\n\t HLSEvents.prototype.fragmentPlaying = function fragmentPlaying(playmetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':fragmentplaying', playmetrics);\n\t };\n\t\n\t HLSEvents.prototype.position = function position(timemetrics) {\n\t _mediator2.default.trigger(this.instanceId + ':timeupdate', timemetrics);\n\t };\n\t\n\t HLSEvents.prototype.state = function state(newState) {\n\t _mediator2.default.trigger(this.instanceId + ':playbackstate', newState);\n\t };\n\t\n\t HLSEvents.prototype.seekState = function seekState(newState) {\n\t _mediator2.default.trigger(this.instanceId + ':seekstate', newState);\n\t };\n\t\n\t HLSEvents.prototype.switch = function _switch(newLevel) {\n\t _mediator2.default.trigger(this.instanceId + ':levelchanged', newLevel);\n\t };\n\t\n\t HLSEvents.prototype.audioTracksListChange = function audioTracksListChange(trackList) {\n\t _mediator2.default.trigger(this.instanceId + ':audiotracklistchanged', trackList);\n\t };\n\t\n\t HLSEvents.prototype.audioTrackChange = function audioTrackChange(trackId) {\n\t _mediator2.default.trigger(this.instanceId + ':audiotrackchanged', trackId);\n\t };\n\t\n\t return HLSEvents;\n\t}();\n\t\n\texports.default = HLSEvents;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 51 */\n/*!**********************************!*\\\n !*** ./src/playbacks/hls/hls.js ***!\n \\**********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _html5_video = __webpack_require__(/*! playbacks/html5_video */ 16);\n\t\n\tvar _html5_video2 = _interopRequireDefault(_html5_video);\n\t\n\tvar _hls = __webpack_require__(/*! hls.js */ 90);\n\t\n\tvar _hls2 = _interopRequireDefault(_hls);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.isequal */ 99);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _log = __webpack_require__(/*! plugins/log */ 19);\n\t\n\tvar _log2 = _interopRequireDefault(_log);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar AUTO = -1;\n\t\n\tvar HLS = function (_HTML5VideoPlayback) {\n\t _inherits(HLS, _HTML5VideoPlayback);\n\t\n\t _createClass(HLS, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'hls';\n\t }\n\t }, {\n\t key: 'levels',\n\t get: function get() {\n\t return this._levels || [];\n\t }\n\t }, {\n\t key: 'currentLevel',\n\t get: function get() {\n\t if (this._currentLevel === null || this._currentLevel === undefined) {\n\t return AUTO;\n\t } else {\n\t return this._currentLevel; //0 is a valid level ID\n\t }\n\t },\n\t set: function set(id) {\n\t this._currentLevel = id;\n\t this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);\n\t this._hls.currentLevel = this._currentLevel;\n\t }\n\t }, {\n\t key: '_startTime',\n\t get: function get() {\n\t if (this._playbackType === _playback2.default.LIVE && this._playlistType !== 'EVENT') {\n\t return this._extrapolatedStartTime;\n\t }\n\t return this._playableRegionStartTime;\n\t }\n\t }, {\n\t key: '_now',\n\t get: function get() {\n\t return (0, _utils.now)();\n\t }\n\t\n\t // the time in the video element which should represent the start of the sliding window\n\t // extrapolated to increase in real time (instead of jumping as the early segments are removed)\n\t\n\t }, {\n\t key: '_extrapolatedStartTime',\n\t get: function get() {\n\t if (!this._localStartTimeCorrelation) {\n\t return this._playableRegionStartTime;\n\t }\n\t var corr = this._localStartTimeCorrelation;\n\t var timePassed = this._now - corr.local;\n\t var extrapolatedWindowStartTime = (corr.remote + timePassed) / 1000;\n\t // cap at the end of the extrapolated window duration\n\t return Math.min(extrapolatedWindowStartTime, this._playableRegionStartTime + this._extrapolatedWindowDuration);\n\t }\n\t\n\t // the time in the video element which should represent the end of the content\n\t // extrapolated to increase in real time (instead of jumping as segments are added)\n\t\n\t }, {\n\t key: '_extrapolatedEndTime',\n\t get: function get() {\n\t var actualEndTime = this._playableRegionStartTime + this._playableRegionDuration;\n\t if (!this._localEndTimeCorrelation) {\n\t return actualEndTime;\n\t }\n\t var corr = this._localEndTimeCorrelation;\n\t var timePassed = this._now - corr.local;\n\t var extrapolatedEndTime = (corr.remote + timePassed) / 1000;\n\t return Math.max(actualEndTime - this._extrapolatedWindowDuration, Math.min(extrapolatedEndTime, actualEndTime));\n\t }\n\t }, {\n\t key: '_duration',\n\t get: function get() {\n\t return this._extrapolatedEndTime - this._startTime;\n\t }\n\t\n\t // Returns the duration (seconds) of the window that the extrapolated start time is allowed\n\t // to move in before being capped.\n\t // The extrapolated start time should never reach the cap at the end of the window as the\n\t // window should slide as chunks are removed from the start.\n\t // This also applies to the extrapolated end time in the same way.\n\t //\n\t // If chunks aren't being removed for some reason that the start time will reach and remain fixed at\n\t // playableRegionStartTime + extrapolatedWindowDuration\n\t //\n\t // <-- window duration -->\n\t // I.e playableRegionStartTime |-----------------------|\n\t // | --> . . .\n\t // . --> | --> . .\n\t // . . --> | --> .\n\t // . . . --> |\n\t // . . . .\n\t // extrapolatedStartTime\n\t\n\t }, {\n\t key: '_extrapolatedWindowDuration',\n\t get: function get() {\n\t if (this._segmentTargetDuration === null) {\n\t return 0;\n\t }\n\t return this._extrapolatedWindowNumSegments * this._segmentTargetDuration;\n\t }\n\t }]);\n\t\n\t function HLS() {\n\t _classCallCheck(this, HLS);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t // backwards compatibility (TODO: remove on 0.3.0)\n\t var _this = _possibleConstructorReturn(this, _HTML5VideoPlayback.call.apply(_HTML5VideoPlayback, [this].concat(args)));\n\t\n\t _this.options.playback || (_this.options.playback = _this.options);\n\t _this._minDvrSize = typeof _this.options.hlsMinimumDvrSize === 'undefined' ? 60 : _this.options.hlsMinimumDvrSize;\n\t // The size of the start time extrapolation window measured as a multiple of segments.\n\t // Should be 2 or higher, or 0 to disable. Should only need to be increased above 2 if more than one segment is\n\t // removed from the start of the playlist at a time. E.g if the playlist is cached for 10 seconds and new chunks are\n\t // added/removed every 5.\n\t _this._extrapolatedWindowNumSegments = !_this.options.playback || typeof _this.options.playback.extrapolatedWindowNumSegments === 'undefined' ? 2 : _this.options.playback.extrapolatedWindowNumSegments;\n\t\n\t _this._playbackType = _playback2.default.VOD;\n\t _this._lastTimeUpdate = null;\n\t _this._lastDuration = null;\n\t // for hls streams which have dvr with a sliding window,\n\t // the content at the start of the playlist is removed as new\n\t // content is appended at the end.\n\t // this means the actual playable start time will increase as the\n\t // start content is deleted\n\t // For streams with dvr where the entire recording is kept from the\n\t // beginning this should stay as 0\n\t _this._playableRegionStartTime = 0;\n\t // {local, remote} remote is the time in the video element that should represent 0\n\t // local is the system time when the 'remote' measurment took place\n\t _this._localStartTimeCorrelation = null;\n\t // {local, remote} remote is the time in the video element that should represents the end\n\t // local is the system time when the 'remote' measurment took place\n\t _this._localEndTimeCorrelation = null;\n\t // if content is removed from the beginning then this empty area should\n\t // be ignored. \"playableRegionDuration\" excludes the empty area\n\t _this._playableRegionDuration = 0;\n\t // true when the actual duration is longer than hlsjs's live sync point\n\t // when this is false playableRegionDuration will be the actual duration\n\t // when this is true playableRegionDuration will exclude the time after the sync point\n\t _this._durationExcludesAfterLiveSyncPoint = false;\n\t // #EXT-X-TARGETDURATION\n\t _this._segmentTargetDuration = null;\n\t // #EXT-X-PLAYLIST-TYPE\n\t _this._playlistType = null;\n\t _this._recoverAttemptsRemaining = _this.options.hlsRecoverAttempts || 16;\n\t _this._startTimeUpdateTimer();\n\t return _this;\n\t }\n\t\n\t HLS.prototype._setupHls = function _setupHls() {\n\t var _this2 = this;\n\t\n\t this._hls = new _hls2.default(this.options.playback.hlsjsConfig || {});\n\t this._hls.on(_hls2.default.Events.MEDIA_ATTACHED, function () {\n\t return _this2._hls.loadSource(_this2.options.src);\n\t });\n\t this._hls.on(_hls2.default.Events.LEVEL_LOADED, function (evt, data) {\n\t return _this2._updatePlaybackType(evt, data);\n\t });\n\t this._hls.on(_hls2.default.Events.LEVEL_UPDATED, function (evt, data) {\n\t return _this2._onLevelUpdated(evt, data);\n\t });\n\t this._hls.on(_hls2.default.Events.LEVEL_SWITCH, function (evt, data) {\n\t return _this2._onLevelSwitch(evt, data);\n\t });\n\t this._hls.on(_hls2.default.Events.FRAG_LOADED, function (evt, data) {\n\t return _this2._onFragmentLoaded(evt, data);\n\t });\n\t this._hls.on(_hls2.default.Events.ERROR, function (evt, data) {\n\t return _this2._onHLSJSError(evt, data);\n\t });\n\t this._hls.attachMedia(this.el);\n\t };\n\t\n\t HLS.prototype._recover = function _recover(evt, data) {\n\t if (!this._recoveredDecodingError) {\n\t this._recoveredDecodingError = true;\n\t this._hls.recoverMediaError();\n\t } else if (!this._recoveredAudioCodecError) {\n\t this._recoveredAudioCodecError = true;\n\t this._hls.swapAudioCodec();\n\t this._hls.recoverMediaError();\n\t } else {\n\t _log2.default.error('hlsjs: failed to recover');\n\t this.trigger(_events2.default.PLAYBACK_ERROR, 'hlsjs: could not recover from error, evt ' + evt + ', data ' + data + ' ', this.name);\n\t }\n\t };\n\t\n\t // override\n\t\n\t\n\t HLS.prototype._setupSrc = function _setupSrc(srcUrl) {// eslint-disable-line no-unused-vars\n\t // this playback manages the src on the video element itself\n\t };\n\t\n\t HLS.prototype._startTimeUpdateTimer = function _startTimeUpdateTimer() {\n\t var _this3 = this;\n\t\n\t this._timeUpdateTimer = setInterval(function () {\n\t _this3._onDurationChange();\n\t _this3._onTimeUpdate();\n\t }, 100);\n\t };\n\t\n\t HLS.prototype._stopTimeUpdateTimer = function _stopTimeUpdateTimer() {\n\t clearInterval(this._timeUpdateTimer);\n\t };\n\t\n\t // the duration on the video element itself should not be used\n\t // as this does not necesarily represent the duration of the stream\n\t // https://github.com/clappr/clappr/issues/668#issuecomment-157036678\n\t\n\t\n\t HLS.prototype.getDuration = function getDuration() {\n\t return this._duration;\n\t };\n\t\n\t HLS.prototype.getCurrentTime = function getCurrentTime() {\n\t // e.g. can be < 0 if user pauses near the start\n\t // eventually they will then be kicked to the end by hlsjs if they run out of buffer\n\t // before the official start time\n\t return Math.max(0, this.el.currentTime - this._startTime);\n\t };\n\t\n\t // the time that \"0\" now represents relative to when playback started\n\t // for a stream with a sliding window this will increase as content is\n\t // removed from the beginning\n\t\n\t\n\t HLS.prototype.getStartTimeOffset = function getStartTimeOffset() {\n\t return this._startTime;\n\t };\n\t\n\t HLS.prototype.seekPercentage = function seekPercentage(percentage) {\n\t var seekTo = this._duration;\n\t if (percentage > 0) {\n\t seekTo = this._duration * (percentage / 100);\n\t }\n\t this.seek(seekTo);\n\t };\n\t\n\t HLS.prototype.seek = function seek(time) {\n\t if (time < 0) {\n\t _log2.default.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.');\n\t time = this.getDuration();\n\t }\n\t // assume live if time within 3 seconds of end of stream\n\t this.dvrEnabled && this._updateDvr(time < this.getDuration() - 3);\n\t time += this._startTime;\n\t _HTML5VideoPlayback.prototype.seek.call(this, time);\n\t };\n\t\n\t HLS.prototype.seekToLivePoint = function seekToLivePoint() {\n\t this.seek(this.getDuration());\n\t };\n\t\n\t HLS.prototype._updateDvr = function _updateDvr(status) {\n\t this.trigger(_events2.default.PLAYBACK_DVR, status);\n\t this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': status });\n\t };\n\t\n\t HLS.prototype._updateSettings = function _updateSettings() {\n\t if (this._playbackType === _playback2.default.VOD) {\n\t this.settings.left = ['playpause', 'position', 'duration'];\n\t } else if (this.dvrEnabled) {\n\t this.settings.left = ['playpause'];\n\t } else {\n\t this.settings.left = ['playstop'];\n\t }\n\t this.settings.seekEnabled = this.isSeekEnabled();\n\t this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n\t };\n\t\n\t HLS.prototype._onHLSJSError = function _onHLSJSError(evt, data) {\n\t // only report/handle errors if they are fatal\n\t // hlsjs should automatically handle non fatal errors\n\t if (data.fatal) {\n\t if (this._recoverAttemptsRemaining > 0) {\n\t this._recoverAttemptsRemaining -= 1;\n\t switch (data.type) {\n\t case _hls2.default.ErrorTypes.NETWORK_ERROR:\n\t _log2.default.warn('hlsjs: trying to recover from network error, evt ' + evt + ', data ' + data + ' ');\n\t this._hls.startLoad();\n\t break;\n\t case _hls2.default.ErrorTypes.MEDIA_ERROR:\n\t _log2.default.warn('hlsjs: trying to recover from media error, evt ' + evt + ', data ' + data + ' ');\n\t this._recover(evt, data);\n\t break;\n\t default:\n\t _log2.default.error('hlsjs: trying to recover from error, evt ' + evt + ', data ' + data + ' ');\n\t this.trigger(_events2.default.PLAYBACK_ERROR, 'hlsjs: could not recover from error, evt ' + evt + ', data ' + data + ' ', this.name);\n\t break;\n\t }\n\t } else {\n\t _log2.default.error('hlsjs: could not recover from error after maximum number of attempts, evt ' + evt + ', data ' + data + ' ');\n\t this.trigger(_events2.default.PLAYBACK_ERROR, { evt: evt, data: data }, this.name);\n\t }\n\t } else {\n\t _log2.default.warn('hlsjs: non-fatal error occurred, evt ' + evt + ', data ' + data + ' ');\n\t }\n\t };\n\t\n\t HLS.prototype._onTimeUpdate = function _onTimeUpdate() {\n\t var update = { current: this.getCurrentTime(), total: this.getDuration() };\n\t if ((0, _lodash2.default)(update, this._lastTimeUpdate)) {\n\t return;\n\t }\n\t this._lastTimeUpdate = update;\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, update, this.name);\n\t };\n\t\n\t HLS.prototype._onDurationChange = function _onDurationChange() {\n\t var duration = this.getDuration();\n\t if (this._lastDuration === duration) {\n\t return;\n\t }\n\t this._lastDuration = duration;\n\t _HTML5VideoPlayback.prototype._onDurationChange.call(this);\n\t };\n\t\n\t HLS.prototype._onProgress = function _onProgress() {\n\t if (!this.el.buffered.length) {\n\t return;\n\t }\n\t var buffered = [];\n\t var bufferedPos = 0;\n\t for (var i = 0; i < this.el.buffered.length; i++) {\n\t buffered = [].concat(_toConsumableArray(buffered), [{\n\t // for a stream with sliding window dvr something that is buffered my slide off the start of the timeline\n\t start: Math.max(0, this.el.buffered.start(i) - this._playableRegionStartTime),\n\t end: Math.max(0, this.el.buffered.end(i) - this._playableRegionStartTime)\n\t }]);\n\t if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {\n\t bufferedPos = i;\n\t }\n\t }\n\t var progress = {\n\t start: buffered[bufferedPos].start,\n\t current: buffered[bufferedPos].end,\n\t total: this.getDuration()\n\t };\n\t this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);\n\t };\n\t\n\t HLS.prototype.play = function play() {\n\t if (!this._hls) {\n\t this._setupHls();\n\t }\n\t _HTML5VideoPlayback.prototype.play.call(this);\n\t };\n\t\n\t HLS.prototype.pause = function pause() {\n\t if (!this._hls) {\n\t return;\n\t }\n\t _HTML5VideoPlayback.prototype.pause.call(this);\n\t if (this.dvrEnabled) {\n\t this._updateDvr(true);\n\t }\n\t };\n\t\n\t HLS.prototype.stop = function stop() {\n\t if (this._hls) {\n\t _HTML5VideoPlayback.prototype.stop.call(this);\n\t this._hls.destroy();\n\t delete this._hls;\n\t }\n\t };\n\t\n\t HLS.prototype.destroy = function destroy() {\n\t this._stopTimeUpdateTimer();\n\t if (this._hls) {\n\t this._hls.destroy();\n\t delete this._hls;\n\t }\n\t _HTML5VideoPlayback.prototype.destroy.call(this);\n\t };\n\t\n\t HLS.prototype._updatePlaybackType = function _updatePlaybackType(evt, data) {\n\t this._playbackType = data.details.live ? _playback2.default.LIVE : _playback2.default.VOD;\n\t this._fillLevels();\n\t this._onLevelUpdated(evt, data);\n\t };\n\t\n\t HLS.prototype._fillLevels = function _fillLevels() {\n\t this._levels = this._hls.levels.map(function (level, index) {\n\t return { id: index, level: level, label: level.bitrate / 1000 + 'Kbps' };\n\t });\n\t this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n\t };\n\t\n\t HLS.prototype._onLevelUpdated = function _onLevelUpdated(evt, data) {\n\t this._segmentTargetDuration = data.details.targetduration;\n\t this._playlistType = data.details.type || null;\n\t\n\t var startTimeChanged = false;\n\t var durationChanged = false;\n\t var fragments = data.details.fragments;\n\t var previousPlayableRegionStartTime = this._playableRegionStartTime;\n\t var previousPlayableRegionDuration = this._playableRegionDuration;\n\t\n\t if (fragments.length === 0) {\n\t return;\n\t }\n\t\n\t if (this._playableRegionStartTime !== fragments[0].start) {\n\t startTimeChanged = true;\n\t this._playableRegionStartTime = fragments[0].start;\n\t }\n\t\n\t if (startTimeChanged) {\n\t if (!this._localStartTimeCorrelation) {\n\t // set the correlation to map to middle of the extrapolation window\n\t this._localStartTimeCorrelation = {\n\t local: this._now,\n\t remote: (fragments[0].start + this._extrapolatedWindowDuration / 2) * 1000\n\t };\n\t } else {\n\t // check if the correlation still works\n\t var corr = this._localStartTimeCorrelation;\n\t var timePassed = this._now - corr.local;\n\t // this should point to a time within the extrapolation window\n\t var startTime = (corr.remote + timePassed) / 1000;\n\t if (startTime < fragments[0].start) {\n\t // our start time is now earlier than the first chunk\n\t // (maybe the chunk was removed early)\n\t // reset correlation so that it sits at the beginning of the first available chunk\n\t this._localStartTimeCorrelation = {\n\t local: this._now,\n\t remote: fragments[0].start * 1000\n\t };\n\t } else if (startTime > previousPlayableRegionStartTime + this._extrapolatedWindowDuration) {\n\t // start time was past the end of the old extrapolation window (so would have been capped)\n\t // see if now that time would be inside the window, and if it would be set the correlation\n\t // so that it resumes from the time it was at at the end of the old window\n\t // update the correlation so that the time starts counting again from the value it's on now\n\t this._localStartTimeCorrelation = {\n\t local: this._now,\n\t remote: Math.max(fragments[0].start, previousPlayableRegionStartTime + this._extrapolatedWindowDuration) * 1000\n\t };\n\t }\n\t }\n\t }\n\t\n\t var newDuration = data.details.totalduration;\n\t // if it's a live stream then shorten the duration to remove access\n\t // to the area after hlsjs's live sync point\n\t // seeks to areas after this point sometimes have issues\n\t if (this._playbackType === _playback2.default.LIVE) {\n\t var fragmentTargetDuration = data.details.targetduration;\n\t var hlsjsConfig = this.options.playback || {};\n\t var liveSyncDurationCount = hlsjsConfig.liveSyncDurationCount || _hls2.default.DefaultConfig.liveSyncDurationCount;\n\t var hiddenAreaDuration = fragmentTargetDuration * liveSyncDurationCount;\n\t if (hiddenAreaDuration <= newDuration) {\n\t newDuration -= hiddenAreaDuration;\n\t this._durationExcludesAfterLiveSyncPoint = true;\n\t } else {\n\t this._durationExcludesAfterLiveSyncPoint = false;\n\t }\n\t }\n\t\n\t if (newDuration !== this._playableRegionDuration) {\n\t durationChanged = true;\n\t this._playableRegionDuration = newDuration;\n\t }\n\t\n\t // Note the end time is not the playableRegionDuration\n\t // The end time will always increase even if content is removed from the beginning\n\t var endTime = fragments[0].start + newDuration;\n\t var previousEndTime = previousPlayableRegionStartTime + previousPlayableRegionDuration;\n\t var endTimeChanged = endTime !== previousEndTime;\n\t if (endTimeChanged) {\n\t if (!this._localEndTimeCorrelation) {\n\t // set the correlation to map to the end\n\t this._localEndTimeCorrelation = {\n\t local: this._now,\n\t remote: endTime * 1000\n\t };\n\t } else {\n\t // check if the correlation still works\n\t var _corr = this._localEndTimeCorrelation;\n\t var _timePassed = this._now - _corr.local;\n\t // this should point to a time within the extrapolation window from the end\n\t var extrapolatedEndTime = (_corr.remote + _timePassed) / 1000;\n\t if (extrapolatedEndTime > endTime) {\n\t this._localEndTimeCorrelation = {\n\t local: this._now,\n\t remote: endTime * 1000\n\t };\n\t } else if (extrapolatedEndTime < endTime - this._extrapolatedWindowDuration) {\n\t // our extrapolated end time is now earlier than the extrapolation window from the actual end time\n\t // (maybe a chunk became available early)\n\t // reset correlation so that it sits at the beginning of the extrapolation window from the end time\n\t this._localEndTimeCorrelation = {\n\t local: this._now,\n\t remote: (endTime - this._extrapolatedWindowDuration) * 1000\n\t };\n\t } else if (extrapolatedEndTime > previousEndTime) {\n\t // end time was past the old end time (so would have been capped)\n\t // set the correlation so that it resumes from the time it was at at the end of the old window\n\t this._localEndTimeCorrelation = {\n\t local: this._now,\n\t remote: previousEndTime * 1000\n\t };\n\t }\n\t }\n\t }\n\t\n\t // now that the values have been updated call any methods that use on them so they get the updated values\n\t // immediately\n\t durationChanged && this._onDurationChange();\n\t startTimeChanged && this._onProgress();\n\t };\n\t\n\t HLS.prototype._onFragmentLoaded = function _onFragmentLoaded(evt, data) {\n\t this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, data);\n\t };\n\t\n\t HLS.prototype._onLevelSwitch = function _onLevelSwitch(evt, data) {\n\t if (!this.levels.length) {\n\t this._fillLevels();\n\t }\n\t this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n\t this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH, data);\n\t var currentLevel = this._hls.levels[data.level];\n\t if (currentLevel) {\n\t // TODO should highDefinition be private and maybe have a read only accessor if it's used somewhere\n\t this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;\n\t this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n\t this.trigger(_events2.default.PLAYBACK_BITRATE, {\n\t height: currentLevel.height,\n\t width: currentLevel.width,\n\t bandwidth: currentLevel.bitrate,\n\t bitrate: currentLevel.bitrate,\n\t level: data.level\n\t });\n\t }\n\t };\n\t\n\t HLS.prototype.getPlaybackType = function getPlaybackType() {\n\t return this._playbackType;\n\t };\n\t\n\t HLS.prototype.isSeekEnabled = function isSeekEnabled() {\n\t return this._playbackType === _playback2.default.VOD || this.dvrEnabled;\n\t };\n\t\n\t _createClass(HLS, [{\n\t key: 'dvrEnabled',\n\t get: function get() {\n\t // enabled when:\n\t // - the duration does not include content after hlsjs's live sync point\n\t // - the playable region duration is longer than the configured duration to enable dvr after\n\t // - the playback type is LIVE.\n\t return this._durationExcludesAfterLiveSyncPoint && this._duration >= this._minDvrSize && this.getPlaybackType() === _playback2.default.LIVE;\n\t }\n\t }]);\n\t\n\t return HLS;\n\t}(_html5_video2.default);\n\t\n\texports.default = HLS;\n\t\n\t\n\tHLS.canPlay = function (resource, mimeType) {\n\t var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n\t var isHls = resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl';\n\t\n\t return !!(_hls2.default.isSupported() && isHls && !_browser2.default.isSafari);\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 52 */\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_audio/html5_audio.js ***!\n \\**************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _html5_video = __webpack_require__(/*! playbacks/html5_video */ 16);\n\t\n\tvar _html5_video2 = _interopRequireDefault(_html5_video);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\t// TODO: remove this playback and change HTML5Video to HTML5Playback (breaking change, only after 0.3.0)\n\tvar HTML5Audio = function (_HTML5Video) {\n\t _inherits(HTML5Audio, _HTML5Video);\n\t\n\t function HTML5Audio() {\n\t _classCallCheck(this, HTML5Audio);\n\t\n\t return _possibleConstructorReturn(this, _HTML5Video.apply(this, arguments));\n\t }\n\t\n\t HTML5Audio.prototype.updateSettings = function updateSettings() {\n\t this.settings.left = ['playpause', 'position', 'duration'];\n\t this.settings.seekEnabled = this.isSeekEnabled();\n\t this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n\t };\n\t\n\t HTML5Audio.prototype.getPlaybackType = function getPlaybackType() {\n\t return _playback2.default.AOD;\n\t };\n\t\n\t _createClass(HTML5Audio, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'html5_audio';\n\t }\n\t }, {\n\t key: 'tagName',\n\t get: function get() {\n\t return 'audio';\n\t }\n\t }, {\n\t key: 'isAudioOnly',\n\t get: function get() {\n\t return true;\n\t }\n\t }]);\n\t\n\t return HTML5Audio;\n\t}(_html5_video2.default);\n\t\n\texports.default = HTML5Audio;\n\t\n\t\n\tHTML5Audio.canPlay = function (resourceUrl, mimeType) {\n\t var mimetypes = {\n\t 'wav': ['audio/wav'],\n\t 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n\t 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n\t 'oga': ['audio/ogg']\n\t };\n\t return _html5_video2.default._canPlay('audio', mimetypes, resourceUrl, mimeType);\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 53 */\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_video/html5_video.js ***!\n \\**************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _browser = __webpack_require__(/*! components/browser */ 8);\n\t\n\tvar _browser2 = _interopRequireDefault(_browser);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 82);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar MIMETYPES = {\n\t 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {\n\t return 'video/mp4; codecs=\"' + codec + ', mp4a.40.2\"';\n\t }),\n\t 'ogg': ['video/ogg; codecs=\"theora, vorbis\"', 'video/ogg; codecs=\"dirac\"', 'video/ogg; codecs=\"theora, speex\"'],\n\t '3gpp': ['video/3gpp; codecs=\"mp4v.20.8, samr\"'],\n\t 'webm': ['video/webm; codecs=\"vp8, vorbis\"'],\n\t 'mkv': ['video/x-matroska; codecs=\"theora, vorbis\"'],\n\t 'm3u8': ['application/x-mpegurl']\n\t};\n\tMIMETYPES['ogv'] = MIMETYPES['ogg'];\n\tMIMETYPES['3gp'] = MIMETYPES['3gpp'];\n\t\n\tvar AUDIO_MIMETYPES = {\n\t 'wav': ['audio/wav'],\n\t 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n\t 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n\t 'oga': ['audio/ogg']\n\t};\n\t\n\tvar KNOWN_AUDIO_MIMETYPES = Object.keys(AUDIO_MIMETYPES).reduce(function (acc, k) {\n\t return [].concat(_toConsumableArray(acc), _toConsumableArray(AUDIO_MIMETYPES[k]));\n\t}, []);\n\t\n\t// TODO: rename this Playback to HTML5Playback (breaking change, only after 0.3.0)\n\t\n\tvar HTML5Video = function (_Playback) {\n\t _inherits(HTML5Video, _Playback);\n\t\n\t _createClass(HTML5Video, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'html5_video';\n\t }\n\t }, {\n\t key: 'tagName',\n\t get: function get() {\n\t return this.isAudioOnly ? 'audio' : 'video';\n\t }\n\t }, {\n\t key: 'isAudioOnly',\n\t get: function get() {\n\t var resourceUrl = this.options.src;\n\t var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, AUDIO_MIMETYPES, this.options.mimeType);\n\t return this.options.playback && this.options.playback.audioOnly || this.options.audioOnly || KNOWN_AUDIO_MIMETYPES.indexOf(mimeTypes[0]) >= 0;\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'data-html5-video': ''\n\t };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'canplay': '_onCanPlay',\n\t 'canplaythrough': '_handleBufferingEvents',\n\t 'durationchange': '_onDurationChange',\n\t 'ended': '_onEnded',\n\t 'error': '_onError',\n\t 'loadeddata': '_onLoadedData',\n\t 'loadedmetadata': '_onLoadedMetadata',\n\t 'pause': '_onPause',\n\t 'playing': '_onPlaying',\n\t 'progress': '_onProgress',\n\t 'seeked': '_handleBufferingEvents',\n\t 'seeking': '_handleBufferingEvents',\n\t 'stalled': '_handleBufferingEvents',\n\t 'timeupdate': '_onTimeUpdate',\n\t 'waiting': '_onWaiting'\n\t };\n\t }\n\t\n\t /**\n\t * Determine if the playback has ended.\n\t * @property ended\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'ended',\n\t get: function get() {\n\t return this.el.ended;\n\t }\n\t\n\t /**\n\t * Determine if the playback is having to buffer in order for\n\t * playback to be smooth.\n\t * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n\t * @property buffering\n\t * @type Boolean\n\t */\n\t\n\t }, {\n\t key: 'buffering',\n\t get: function get() {\n\t return !!this._bufferingState;\n\t }\n\t }]);\n\t\n\t function HTML5Video() {\n\t _classCallCheck(this, HTML5Video);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _this = _possibleConstructorReturn(this, _Playback.call.apply(_Playback, [this].concat(args)));\n\t\n\t _this._loadStarted = false;\n\t _this._playheadMoving = false;\n\t _this._playheadMovingTimer = null;\n\t _this._stopped = false;\n\t _this._setupSrc(_this.options.src);\n\t // backwards compatibility (TODO: remove on 0.3.0)\n\t _this.options.playback || (_this.options.playback = _this.options || {});\n\t _this.options.playback.disableContextMenu = _this.options.playback.disableContextMenu || _this.options.disableVideoTagContextMenu;\n\t\n\t var playbackConfig = _this.options.playback;\n\t var preload = playbackConfig.preload || (_browser2.default.isSafari ? 'auto' : _this.options.preload);\n\t\n\t _clapprZepto2.default.extend(_this.el, {\n\t loop: _this.options.loop,\n\t poster: _this.options.poster,\n\t preload: preload || 'metadata',\n\t controls: (playbackConfig.controls || _this.options.useVideoTagDefaultControls) && 'controls',\n\t crossOrigin: playbackConfig.crossOrigin,\n\t 'x-webkit-playsinline': playbackConfig.playInline\n\t });\n\t\n\t // TODO should settings be private?\n\t _this.settings = { default: ['seekbar'] };\n\t _this.settings.left = ['playpause', 'position', 'duration'];\n\t _this.settings.right = ['fullscreen', 'volume', 'hd-indicator'];\n\t\n\t // https://github.com/clappr/clappr/issues/1076\n\t _this.options.autoPlay && process.nextTick(function () {\n\t return _this.play();\n\t });\n\t return _this;\n\t }\n\t\n\t /**\n\t * Sets the source url on the <video> element, and also the 'src' property.\n\t * @method setupSrc\n\t * @private\n\t * @param {String} srcUrl The source URL.\n\t */\n\t\n\t\n\t HTML5Video.prototype._setupSrc = function _setupSrc(srcUrl) {\n\t if (this.el.src === srcUrl) {\n\t return;\n\t }\n\t this._src = srcUrl;\n\t this.el.src = srcUrl;\n\t };\n\t\n\t HTML5Video.prototype._onLoadedMetadata = function _onLoadedMetadata(e) {\n\t this._handleBufferingEvents();\n\t this.trigger(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: e.target.duration, data: e });\n\t this._updateSettings();\n\t var autoSeekFromUrl = typeof this._options.autoSeekFromUrl === 'undefined' || this._options.autoSeekFromUrl;\n\t if (this.getPlaybackType() !== _playback2.default.LIVE && autoSeekFromUrl) {\n\t this._checkInitialSeek();\n\t }\n\t };\n\t\n\t HTML5Video.prototype._onDurationChange = function _onDurationChange() {\n\t this._updateSettings();\n\t this._onTimeUpdate();\n\t // onProgress uses the duration\n\t this._onProgress();\n\t };\n\t\n\t HTML5Video.prototype._updateSettings = function _updateSettings() {\n\t // we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.\n\t // that's why we check it again and update media control accordingly.\n\t if (this.getPlaybackType() === _playback2.default.VOD || this.getPlaybackType() === _playback2.default.AOD) {\n\t this.settings.left = ['playpause', 'position', 'duration'];\n\t } else {\n\t this.settings.left = ['playstop'];\n\t }\n\t this.settings.seekEnabled = this.isSeekEnabled();\n\t this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n\t };\n\t\n\t HTML5Video.prototype.isSeekEnabled = function isSeekEnabled() {\n\t return isFinite(this.getDuration());\n\t };\n\t\n\t HTML5Video.prototype.getPlaybackType = function getPlaybackType() {\n\t var onDemandType = this.tagName === 'audio' ? _playback2.default.AOD : _playback2.default.VOD;\n\t return [0, undefined, Infinity].indexOf(this.el.duration) >= 0 ? _playback2.default.LIVE : onDemandType;\n\t };\n\t\n\t HTML5Video.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n\t return false;\n\t };\n\t\n\t HTML5Video.prototype.play = function play() {\n\t this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n\t this._stopped = false;\n\t this._setupSrc(this._src);\n\t this._handleBufferingEvents();\n\t this.el.play();\n\t };\n\t\n\t HTML5Video.prototype.pause = function pause() {\n\t this.el.pause();\n\t };\n\t\n\t HTML5Video.prototype.stop = function stop() {\n\t this.pause();\n\t this._stopped = true;\n\t // src will be added again in play()\n\t this.el.removeAttribute('src');\n\t this._stopPlayheadMovingChecks();\n\t this._handleBufferingEvents();\n\t this.trigger(_events2.default.PLAYBACK_STOP);\n\t };\n\t\n\t HTML5Video.prototype.volume = function volume(value) {\n\t this.el.volume = value / 100;\n\t };\n\t\n\t HTML5Video.prototype.mute = function mute() {\n\t this.el.volume = 0;\n\t };\n\t\n\t HTML5Video.prototype.unmute = function unmute() {\n\t this.el.volume = 1;\n\t };\n\t\n\t HTML5Video.prototype.isMuted = function isMuted() {\n\t return !!this.el.volume;\n\t };\n\t\n\t HTML5Video.prototype.isPlaying = function isPlaying() {\n\t return !this.el.paused && !this.el.ended;\n\t };\n\t\n\t HTML5Video.prototype._startPlayheadMovingChecks = function _startPlayheadMovingChecks() {\n\t if (this._playheadMovingTimer !== null) {\n\t return;\n\t }\n\t this._playheadMovingTimeOnCheck = null;\n\t this._determineIfPlayheadMoving();\n\t this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), 500);\n\t };\n\t\n\t HTML5Video.prototype._stopPlayheadMovingChecks = function _stopPlayheadMovingChecks() {\n\t if (this._playheadMovingTimer === null) {\n\t return;\n\t }\n\t clearInterval(this._playheadMovingTimer);\n\t this._playheadMovingTimer = null;\n\t this._playheadMoving = false;\n\t };\n\t\n\t HTML5Video.prototype._determineIfPlayheadMoving = function _determineIfPlayheadMoving() {\n\t var before = this._playheadMovingTimeOnCheck;\n\t var now = this.el.currentTime;\n\t this._playheadMoving = before !== now;\n\t this._playheadMovingTimeOnCheck = now;\n\t this._handleBufferingEvents();\n\t };\n\t\n\t // this seems to happen when the user is having to wait\n\t // for something to happen AFTER A USER INTERACTION\n\t // e.g the player might be buffering, but when `play()` is called\n\t // only at this point will this be called.\n\t // Or the user may seek somewhere but the new area requires buffering,\n\t // so it will fire then as well.\n\t // On devices where playing is blocked until requested with a user action,\n\t // buffering may start, but never finish until the user initiates a play,\n\t // but this only happens when play is actually requested\n\t\n\t\n\t HTML5Video.prototype._onWaiting = function _onWaiting() {\n\t this._loadStarted = true;\n\t this._handleBufferingEvents();\n\t };\n\t\n\t // called after the first frame has loaded\n\t // note this doesn't fire on ios before the user has requested play\n\t // ideally the \"loadstart\" event would be used instead, but this fires\n\t // before a user has requested play on iOS, and also this is always fired\n\t // even if the preload setting is \"none\". In both these cases this causes\n\t // infinite buffering until the user does something which isn't great.\n\t\n\t\n\t HTML5Video.prototype._onLoadedData = function _onLoadedData() {\n\t this._loadStarted = true;\n\t this._handleBufferingEvents();\n\t };\n\t\n\t // note this doesn't fire on ios before user has requested play\n\t\n\t\n\t HTML5Video.prototype._onCanPlay = function _onCanPlay() {\n\t this._handleBufferingEvents();\n\t };\n\t\n\t HTML5Video.prototype._onPlaying = function _onPlaying() {\n\t this._startPlayheadMovingChecks();\n\t this._handleBufferingEvents();\n\t this.trigger(_events2.default.PLAYBACK_PLAY);\n\t };\n\t\n\t HTML5Video.prototype._onPause = function _onPause() {\n\t this._stopPlayheadMovingChecks();\n\t this._handleBufferingEvents();\n\t this.trigger(_events2.default.PLAYBACK_PAUSE);\n\t };\n\t\n\t HTML5Video.prototype._onEnded = function _onEnded() {\n\t this._handleBufferingEvents();\n\t this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n\t };\n\t\n\t // The playback should be classed as buffering if the following are true:\n\t // - the ready state is less then HAVE_FUTURE_DATA or the playhead isn't moving and it should be\n\t // - the media hasn't \"ended\",\n\t // - the media hasn't been stopped\n\t // - loading has started\n\t\n\t\n\t HTML5Video.prototype._handleBufferingEvents = function _handleBufferingEvents() {\n\t var playheadShouldBeMoving = !this.el.ended && !this.el.paused;\n\t var buffering = this._loadStarted && !this.el.ended && !this._stopped && (playheadShouldBeMoving && !this._playheadMoving || this.el.readyState < this.el.HAVE_FUTURE_DATA);\n\t if (this._bufferingState !== buffering) {\n\t this._bufferingState = buffering;\n\t if (buffering) {\n\t this.trigger(_events2.default.PLAYBACK_BUFFERING, this.name);\n\t } else {\n\t this.trigger(_events2.default.PLAYBACK_BUFFERFULL, this.name);\n\t }\n\t }\n\t };\n\t\n\t HTML5Video.prototype._onError = function _onError() {\n\t this.trigger(_events2.default.PLAYBACK_ERROR, this.el.error, this.name);\n\t };\n\t\n\t HTML5Video.prototype.destroy = function destroy() {\n\t this.$el.remove();\n\t this.el.src = '';\n\t this._src = null;\n\t };\n\t\n\t HTML5Video.prototype.seek = function seek(time) {\n\t this.el.currentTime = time;\n\t };\n\t\n\t HTML5Video.prototype.seekPercentage = function seekPercentage(percentage) {\n\t var time = this.el.duration * (percentage / 100);\n\t this.seek(time);\n\t };\n\t\n\t HTML5Video.prototype._checkInitialSeek = function _checkInitialSeek() {\n\t var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);\n\t if (seekTime !== 0) {\n\t this.seek(seekTime);\n\t }\n\t };\n\t\n\t HTML5Video.prototype.getCurrentTime = function getCurrentTime() {\n\t return this.el.currentTime;\n\t };\n\t\n\t HTML5Video.prototype.getDuration = function getDuration() {\n\t return this.el.duration;\n\t };\n\t\n\t HTML5Video.prototype._onTimeUpdate = function _onTimeUpdate() {\n\t this._handleBufferingEvents();\n\t if (this.getPlaybackType() === _playback2.default.LIVE) {\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 1, total: 1 }, this.name);\n\t } else {\n\t this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.currentTime, total: this.el.duration }, this.name);\n\t }\n\t };\n\t\n\t HTML5Video.prototype._onProgress = function _onProgress() {\n\t if (!this.el.buffered.length) {\n\t return;\n\t }\n\t var buffered = [];\n\t var bufferedPos = 0;\n\t for (var i = 0; i < this.el.buffered.length; i++) {\n\t buffered = [].concat(_toConsumableArray(buffered), [{ start: this.el.buffered.start(i), end: this.el.buffered.end(i) }]);\n\t if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {\n\t bufferedPos = i;\n\t }\n\t }\n\t var progress = {\n\t start: buffered[bufferedPos].start,\n\t current: buffered[bufferedPos].end,\n\t total: this.el.duration\n\t };\n\t this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);\n\t };\n\t\n\t HTML5Video.prototype._typeFor = function _typeFor(src) {\n\t var mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType);\n\t if (mimeTypes.length == 0) {\n\t mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType);\n\t }\n\t var mimeType = mimeTypes[0] || '';\n\t return mimeType.split(';')[0];\n\t };\n\t\n\t HTML5Video.prototype._ready = function _ready() {\n\t if (this._isReadyState) {\n\t return;\n\t }\n\t this._isReadyState = true;\n\t this.trigger(_events2.default.PLAYBACK_READY, this.name);\n\t };\n\t\n\t HTML5Video.prototype.render = function render() {\n\t var style = _styler2.default.getStyleFor(_style2.default);\n\t\n\t if (this.options.playback.disableContextMenu) {\n\t this.$el.on('contextmenu', function () {\n\t return false;\n\t });\n\t }\n\t\n\t this.$el.append(style);\n\t this._ready();\n\t return this;\n\t };\n\t\n\t _createClass(HTML5Video, [{\n\t key: 'isReady',\n\t get: function get() {\n\t return this._isReadyState;\n\t }\n\t }]);\n\t\n\t return HTML5Video;\n\t}(_playback2.default);\n\t\n\texports.default = HTML5Video;\n\t\n\t\n\tHTML5Video._mimeTypesForUrl = function (resourceUrl, mimeTypesByExtension, mimeType) {\n\t var extension = (resourceUrl.split('?')[0].match(/.*\\.(.*)$/) || [])[1];\n\t var mimeTypes = mimeType || extension && mimeTypesByExtension[extension.toLowerCase()] || [];\n\t return mimeTypes.constructor === Array ? mimeTypes : [mimeTypes];\n\t};\n\t\n\tHTML5Video._canPlay = function (type, mimeTypesByExtension, resourceUrl, mimeType) {\n\t var mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, mimeTypesByExtension, mimeType);\n\t var media = document.createElement(type);\n\t return !!mimeTypes.filter(function (mediaType) {\n\t return !!media.canPlayType(mediaType).replace(/no/, '');\n\t })[0];\n\t};\n\t\n\tHTML5Video.canPlay = function (resourceUrl, mimeType) {\n\t return HTML5Video._canPlay('audio', AUDIO_MIMETYPES, resourceUrl, mimeType) || HTML5Video._canPlay('video', MIMETYPES, resourceUrl, mimeType);\n\t};\n\t\n\tmodule.exports = HTML5Video;\n\tmodule.exports = exports['default'];\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./~/process/browser.js */ 21)))\n\n/***/ },\n/* 54 */\n/*!********************************************!*\\\n !*** ./src/playbacks/html_img/html_img.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 83);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar HTMLImg = function (_Playback) {\n\t _inherits(HTMLImg, _Playback);\n\t\n\t HTMLImg.prototype.getPlaybackType = function getPlaybackType() {\n\t return _playback2.default.NO_OP;\n\t };\n\t\n\t _createClass(HTMLImg, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'html_img';\n\t }\n\t }, {\n\t key: 'tagName',\n\t get: function get() {\n\t return 'img';\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'data-html-img': ''\n\t };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'load': '_onLoad',\n\t 'abort': '_onError',\n\t 'error': '_onError'\n\t };\n\t }\n\t }]);\n\t\n\t function HTMLImg(params) {\n\t _classCallCheck(this, HTMLImg);\n\t\n\t var _this = _possibleConstructorReturn(this, _Playback.call(this, params));\n\t\n\t _this.el.src = params.src;\n\t return _this;\n\t }\n\t\n\t HTMLImg.prototype.render = function render() {\n\t var style = _styler2.default.getStyleFor(_style2.default);\n\t this.$el.append(style);\n\t this.trigger(_events2.default.PLAYBACK_READY, this.name);\n\t return this;\n\t };\n\t\n\t HTMLImg.prototype._onLoad = function _onLoad() {\n\t this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n\t };\n\t\n\t HTMLImg.prototype._onError = function _onError(evt) {\n\t var m = evt.type === 'error' ? 'load error' : 'loading aborted';\n\t this.trigger(_events2.default.PLAYBACK_ERROR, { message: m }, this.name);\n\t };\n\t\n\t return HTMLImg;\n\t}(_playback2.default);\n\t\n\texports.default = HTMLImg;\n\t\n\t\n\tHTMLImg.canPlay = function (resource) {\n\t return (/\\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\\?.*)$/i.test(resource)\n\t );\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 55 */\n/*!**************************************!*\\\n !*** ./src/playbacks/no_op/no_op.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _style = __webpack_require__(/*! ./public/style.scss */ 84);\n\t\n\tvar _style2 = _interopRequireDefault(_style);\n\t\n\tvar _error = __webpack_require__(/*! ./public/error.html */ 93);\n\t\n\tvar _error2 = _interopRequireDefault(_error);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar NoOp = function (_Playback) {\n\t _inherits(NoOp, _Playback);\n\t\n\t _createClass(NoOp, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'no_op';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_error2.default);\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return { 'data-no-op': '' };\n\t }\n\t }]);\n\t\n\t function NoOp() {\n\t _classCallCheck(this, NoOp);\n\t\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t var _this = _possibleConstructorReturn(this, _Playback.call.apply(_Playback, [this].concat(args)));\n\t\n\t _this._noiseFrameNum = -1;\n\t _this._started = false;\n\t return _this;\n\t }\n\t\n\t NoOp.prototype.render = function render() {\n\t var style = _styler2.default.getStyleFor(_style2.default);\n\t var playbackNotSupported = this.options.playbackNotSupportedMessage || this.i18n.t('playback_not_supported');\n\t this.$el.html(this.template({ message: playbackNotSupported }));\n\t this.$el.append(style);\n\t this.trigger(_events2.default.PLAYBACK_READY, this.name);\n\t var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);\n\t if (this.options.autoPlay || !showForNoOp) {\n\t this.play();\n\t }\n\t return this;\n\t };\n\t\n\t NoOp.prototype.play = function play() {\n\t if (!this._started) {\n\t this._started = true;\n\t this.trigger(_events2.default.PLAYBACK_PLAY);\n\t this._animate();\n\t }\n\t };\n\t\n\t NoOp.prototype._noise = function _noise() {\n\t this._noiseFrameNum = (this._noiseFrameNum + 1) % 5;\n\t if (this._noiseFrameNum) {\n\t // only update noise every 5 frames to save cpu\n\t return;\n\t }\n\t\n\t var idata = this.context.createImageData(this.context.canvas.width, this.context.canvas.height);\n\t var buffer32 = void 0;\n\t try {\n\t buffer32 = new Uint32Array(idata.data.buffer);\n\t } catch (err) {\n\t buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4);\n\t var data = idata.data;\n\t for (var i = 0; i < data.length; i++) {\n\t buffer32[i] = data[i];\n\t }\n\t }\n\t\n\t var len = buffer32.length,\n\t m = Math.random() * 6 + 4;\n\t var run = 0,\n\t color = 0;\n\t for (var _i = 0; _i < len;) {\n\t if (run < 0) {\n\t run = m * Math.random();\n\t var p = Math.pow(Math.random(), 0.4);\n\t color = 255 * p << 24;\n\t }\n\t run -= 1;\n\t buffer32[_i++] = color;\n\t }\n\t this.context.putImageData(idata, 0, 0);\n\t };\n\t\n\t NoOp.prototype._loop = function _loop() {\n\t var _this2 = this;\n\t\n\t if (this._stop) {\n\t return;\n\t }\n\t this._noise();\n\t this._animationHandle = (0, _utils.requestAnimationFrame)(function () {\n\t return _this2._loop();\n\t });\n\t };\n\t\n\t NoOp.prototype.destroy = function destroy() {\n\t if (this._animationHandle) {\n\t (0, _utils.cancelAnimationFrame)(this._animationHandle);\n\t this._stop = true;\n\t }\n\t };\n\t\n\t NoOp.prototype._animate = function _animate() {\n\t this.canvas = this.$el.find('canvas[data-no-op-canvas]')[0];\n\t this.context = this.canvas.getContext('2d');\n\t this._loop();\n\t };\n\t\n\t return NoOp;\n\t}(_playback2.default);\n\t\n\texports.default = NoOp;\n\t\n\t\n\tNoOp.canPlay = function (source) {\n\t // eslint-disable-line no-unused-vars\n\t return true;\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 56 */\n/*!******************************************************!*\\\n !*** ./src/plugins/click_to_pause/click_to_pause.js ***!\n \\******************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _container_plugin = __webpack_require__(/*! base/container_plugin */ 13);\n\t\n\tvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } //Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar ClickToPausePlugin = function (_ContainerPlugin) {\n\t _inherits(ClickToPausePlugin, _ContainerPlugin);\n\t\n\t _createClass(ClickToPausePlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'click_to_pause';\n\t }\n\t }]);\n\t\n\t function ClickToPausePlugin(container) {\n\t _classCallCheck(this, ClickToPausePlugin);\n\t\n\t return _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));\n\t }\n\t\n\t ClickToPausePlugin.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.container, _events2.default.CONTAINER_CLICK, this.click);\n\t this.listenTo(this.container, _events2.default.CONTAINER_SETTINGSUPDATE, this.settingsUpdate);\n\t };\n\t\n\t ClickToPausePlugin.prototype.click = function click() {\n\t if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled()) {\n\t if (this.container.isPlaying()) {\n\t this.container.pause();\n\t } else {\n\t this.container.play();\n\t }\n\t }\n\t };\n\t\n\t ClickToPausePlugin.prototype.settingsUpdate = function settingsUpdate() {\n\t this.container.$el.removeClass('pointer-enabled');\n\t if (this.container.getPlaybackType() !== _playback2.default.LIVE || this.container.isDvrEnabled()) {\n\t this.container.$el.addClass('pointer-enabled');\n\t }\n\t };\n\t\n\t return ClickToPausePlugin;\n\t}(_container_plugin2.default);\n\t\n\texports.default = ClickToPausePlugin;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 57 */\n/*!*********************************************!*\\\n !*** ./src/plugins/click_to_pause/index.js ***!\n \\*********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./click_to_pause */ 56);\n\n/***/ },\n/* 58 */\n/*!**************************************************!*\\\n !*** ./src/plugins/dvr_controls/dvr_controls.js ***!\n \\**************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _ui_core_plugin = __webpack_require__(/*! base/ui_core_plugin */ 17);\n\t\n\tvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _dvr_controls = __webpack_require__(/*! ./public/dvr_controls.scss */ 85);\n\t\n\tvar _dvr_controls2 = _interopRequireDefault(_dvr_controls);\n\t\n\tvar _index = __webpack_require__(/*! ./public/index.html */ 94);\n\t\n\tvar _index2 = _interopRequireDefault(_index);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar DVRControls = function (_UICorePlugin) {\n\t _inherits(DVRControls, _UICorePlugin);\n\t\n\t _createClass(DVRControls, [{\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_index2.default);\n\t }\n\t }, {\n\t key: 'name',\n\t get: function get() {\n\t return 'dvr_controls';\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'click .live-button': 'click'\n\t };\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'class': 'dvr-controls',\n\t 'data-dvr-controls': ''\n\t };\n\t }\n\t }]);\n\t\n\t function DVRControls(core) {\n\t _classCallCheck(this, DVRControls);\n\t\n\t var _this = _possibleConstructorReturn(this, _UICorePlugin.call(this, core));\n\t\n\t _this.settingsUpdate();\n\t return _this;\n\t }\n\t\n\t DVRControls.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);\n\t this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.settingsUpdate);\n\t this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.render);\n\t if (this.core.getCurrentContainer()) {\n\t this.listenToOnce(this.core.getCurrentContainer(), _events2.default.CONTAINER_TIMEUPDATE, this.render);\n\t this.listenTo(this.core.getCurrentContainer(), _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.dvrChanged);\n\t }\n\t };\n\t\n\t DVRControls.prototype.containerChanged = function containerChanged() {\n\t this.stopListening();\n\t this.bindEvents();\n\t };\n\t\n\t DVRControls.prototype.dvrChanged = function dvrChanged(dvrEnabled) {\n\t this.settingsUpdate();\n\t this.core.mediaControl.$el.addClass('live');\n\t if (dvrEnabled) {\n\t this.core.mediaControl.$el.addClass('dvr');\n\t this.core.mediaControl.$el.find('.media-control-indicator[data-position], .media-control-indicator[data-duration]').hide();\n\t } else {\n\t this.core.mediaControl.$el.removeClass('dvr');\n\t }\n\t };\n\t\n\t DVRControls.prototype.click = function click() {\n\t var mediaControl = this.core.mediaControl;\n\t var container = mediaControl.container;\n\t if (!container.isPlaying()) {\n\t container.play();\n\t }\n\t if (mediaControl.$el.hasClass('dvr')) {\n\t container.seek(container.getDuration());\n\t }\n\t };\n\t\n\t DVRControls.prototype.settingsUpdate = function settingsUpdate() {\n\t var _this2 = this;\n\t\n\t this.stopListening();\n\t if (this.shouldRender()) {\n\t this.render();\n\t this.$el.click(function () {\n\t return _this2.click();\n\t });\n\t }\n\t this.bindEvents();\n\t };\n\t\n\t DVRControls.prototype.shouldRender = function shouldRender() {\n\t var useDvrControls = this.core.options.useDvrControls === undefined || !!this.core.options.useDvrControls;\n\t return useDvrControls && this.core.getPlaybackType() === _playback2.default.LIVE;\n\t };\n\t\n\t DVRControls.prototype.render = function render() {\n\t this.style = this.style || _styler2.default.getStyleFor(_dvr_controls2.default, { baseUrl: this.core.options.baseUrl });\n\t this.$el.html(this.template({\n\t live: this.core.i18n.t('live'),\n\t backToLive: this.core.i18n.t('back_to_live')\n\t }));\n\t this.$el.append(this.style);\n\t if (this.shouldRender()) {\n\t this.core.mediaControl.$el.addClass('live');\n\t this.core.mediaControl.$('.media-control-left-panel[data-media-control]').append(this.$el);\n\t }\n\t return this;\n\t };\n\t\n\t return DVRControls;\n\t}(_ui_core_plugin2.default);\n\t\n\texports.default = DVRControls;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 59 */\n/*!*******************************************!*\\\n !*** ./src/plugins/dvr_controls/index.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./dvr_controls */ 58);\n\n/***/ },\n/* 60 */\n/*!**********************************!*\\\n !*** ./src/plugins/end_video.js ***!\n \\**********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _core_plugin = __webpack_require__(/*! base/core_plugin */ 12);\n\t\n\tvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar EndVideo = function (_CorePlugin) {\n\t _inherits(EndVideo, _CorePlugin);\n\t\n\t function EndVideo() {\n\t _classCallCheck(this, EndVideo);\n\t\n\t return _possibleConstructorReturn(this, _CorePlugin.apply(this, arguments));\n\t }\n\t\n\t EndVideo.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);\n\t var container = this.core.getCurrentContainer();\n\t if (container) {\n\t this.listenTo(container, _events2.default.CONTAINER_ENDED, this.ended);\n\t this.listenTo(container, _events2.default.CONTAINER_STOP, this.ended);\n\t }\n\t };\n\t\n\t EndVideo.prototype.containerChanged = function containerChanged() {\n\t this.stopListening();\n\t this.bindEvents();\n\t };\n\t\n\t EndVideo.prototype.ended = function ended() {\n\t var exitOnEnd = typeof this.core.options.exitFullscreenOnEnd === 'undefined' || this.core.options.exitFullscreenOnEnd;\n\t if (exitOnEnd && _utils.Fullscreen.isFullscreen()) {\n\t this.core.toggleFullscreen();\n\t }\n\t };\n\t\n\t _createClass(EndVideo, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'end_video';\n\t }\n\t }]);\n\t\n\t return EndVideo;\n\t}(_core_plugin2.default);\n\t\n\texports.default = EndVideo;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 61 */\n/*!****************************************!*\\\n !*** ./src/plugins/favicon/favicon.js ***!\n \\****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _core_plugin = __webpack_require__(/*! base/core_plugin */ 12);\n\t\n\tvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tvar _play = __webpack_require__(/*! icons/01-play.svg */ 22);\n\t\n\tvar _play2 = _interopRequireDefault(_play);\n\t\n\tvar _pause = __webpack_require__(/*! icons/02-pause.svg */ 36);\n\t\n\tvar _pause2 = _interopRequireDefault(_pause);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar oldIcon = (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]');\n\t\n\tvar Favicon = function (_CorePlugin) {\n\t _inherits(Favicon, _CorePlugin);\n\t\n\t _createClass(Favicon, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'favicon';\n\t }\n\t }, {\n\t key: 'oldIcon',\n\t get: function get() {\n\t return oldIcon;\n\t }\n\t }]);\n\t\n\t function Favicon(core) {\n\t _classCallCheck(this, Favicon);\n\t\n\t var _this = _possibleConstructorReturn(this, _CorePlugin.call(this, core));\n\t\n\t _this._container = null;\n\t _this.configure();\n\t return _this;\n\t }\n\t\n\t Favicon.prototype.configure = function configure() {\n\t if (this.core.options.changeFavicon) {\n\t if (!this.enabled) {\n\t this.stopListening(this.core, _events2.default.CORE_OPTIONS_CHANGE);\n\t this.enable();\n\t }\n\t } else if (this.enabled) {\n\t this.disable();\n\t this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);\n\t }\n\t };\n\t\n\t Favicon.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.core, _events2.default.CORE_OPTIONS_CHANGE, this.configure);\n\t this.listenTo(this.core.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged);\n\t if (this.core.mediaControl.container) {\n\t this.containerChanged();\n\t }\n\t };\n\t\n\t Favicon.prototype.containerChanged = function containerChanged() {\n\t this._container && this.stopListening(this._container);\n\t this._container = this.core.mediaControl.container;\n\t this.listenTo(this._container, _events2.default.CONTAINER_PLAY, this.setPlayIcon);\n\t this.listenTo(this._container, _events2.default.CONTAINER_PAUSE, this.setPauseIcon);\n\t this.listenTo(this._container, _events2.default.CONTAINER_STOP, this.resetIcon);\n\t this.listenTo(this._container, _events2.default.CONTAINER_ENDED, this.resetIcon);\n\t this.listenTo(this._container, _events2.default.CONTAINER_ERROR, this.resetIcon);\n\t this.resetIcon();\n\t };\n\t\n\t Favicon.prototype.disable = function disable() {\n\t _CorePlugin.prototype.disable.call(this);\n\t this.resetIcon();\n\t };\n\t\n\t Favicon.prototype.destroy = function destroy() {\n\t _CorePlugin.prototype.destroy.call(this);\n\t this.resetIcon();\n\t };\n\t\n\t Favicon.prototype.createIcon = function createIcon(svg) {\n\t var canvas = (0, _clapprZepto2.default)('<canvas/>');\n\t canvas[0].width = 16;\n\t canvas[0].height = 16;\n\t var ctx = canvas[0].getContext('2d');\n\t ctx.fillStyle = '#000';\n\t var d = (0, _clapprZepto2.default)(svg).find('path').attr('d');\n\t var path = new Path2D(d);\n\t ctx.fill(path);\n\t var icon = (0, _clapprZepto2.default)('<link rel=\"shortcut icon\" type=\"image/png\"/>');\n\t icon.attr('href', canvas[0].toDataURL('image/png'));\n\t return icon;\n\t };\n\t\n\t Favicon.prototype.setPlayIcon = function setPlayIcon() {\n\t if (!this.playIcon) {\n\t this.playIcon = this.createIcon(_play2.default);\n\t }\n\t this.changeIcon(this.playIcon);\n\t };\n\t\n\t Favicon.prototype.setPauseIcon = function setPauseIcon() {\n\t if (!this.pauseIcon) {\n\t this.pauseIcon = this.createIcon(_pause2.default);\n\t }\n\t this.changeIcon(this.pauseIcon);\n\t };\n\t\n\t Favicon.prototype.resetIcon = function resetIcon() {\n\t (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]').remove();\n\t (0, _clapprZepto2.default)('head').append(this.oldIcon);\n\t };\n\t\n\t Favicon.prototype.changeIcon = function changeIcon(icon) {\n\t if (icon) {\n\t (0, _clapprZepto2.default)('link[rel=\"shortcut icon\"]').remove();\n\t (0, _clapprZepto2.default)('head').append(icon);\n\t }\n\t };\n\t\n\t return Favicon;\n\t}(_core_plugin2.default);\n\t\n\texports.default = Favicon;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 62 */\n/*!**************************************!*\\\n !*** ./src/plugins/favicon/index.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./favicon.js */ 61);\n\n/***/ },\n/* 63 */\n/*!**********************************************************!*\\\n !*** ./src/plugins/google_analytics/google_analytics.js ***!\n \\**********************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _container_plugin = __webpack_require__(/*! base/container_plugin */ 13);\n\t\n\tvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar GoogleAnalytics = function (_ContainerPlugin) {\n\t _inherits(GoogleAnalytics, _ContainerPlugin);\n\t\n\t _createClass(GoogleAnalytics, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'google_analytics';\n\t }\n\t }]);\n\t\n\t function GoogleAnalytics(container) {\n\t _classCallCheck(this, GoogleAnalytics);\n\t\n\t var _this = _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));\n\t\n\t if (_this.container.options.gaAccount) {\n\t _this.account = _this.container.options.gaAccount;\n\t _this.trackerName = _this.container.options.gaTrackerName ? _this.container.options.gaTrackerName + '.' : 'Clappr.';\n\t _this.domainName = _this.container.options.gaDomainName;\n\t _this.currentHDState = undefined;\n\t _this.embedScript();\n\t }\n\t return _this;\n\t }\n\t\n\t GoogleAnalytics.prototype.embedScript = function embedScript() {\n\t var _this2 = this;\n\t\n\t if (!window._gat) {\n\t var script = document.createElement('script');\n\t script.setAttribute('type', 'text/javascript');\n\t script.setAttribute('async', 'async');\n\t script.setAttribute('src', '//www.google-analytics.com/ga.js');\n\t script.onload = function () {\n\t return _this2.addEventListeners();\n\t };\n\t document.body.appendChild(script);\n\t } else {\n\t this.addEventListeners();\n\t }\n\t };\n\t\n\t GoogleAnalytics.prototype.addEventListeners = function addEventListeners() {\n\t var _this3 = this;\n\t\n\t if (this.container) {\n\t this.listenTo(this.container, _events2.default.CONTAINER_READY, this.onReady);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PAUSE, this.onPause);\n\t this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onEnded);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);\n\t this.listenTo(this.container, _events2.default.CONTAINER_ERROR, this.onError);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKSTATE, this.onPlaybackChanged);\n\t this.listenTo(this.container, _events2.default.CONTAINER_VOLUME, function (event) {\n\t return _this3.onVolumeChanged(event);\n\t });\n\t this.listenTo(this.container, _events2.default.CONTAINER_SEEK, function (event) {\n\t return _this3.onSeek(event);\n\t });\n\t this.listenTo(this.container, _events2.default.CONTAINER_FULL_SCREEN, this.onFullscreen);\n\t this.listenTo(this.container, _events2.default.CONTAINER_HIGHDEFINITIONUPDATE, this.onHD);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDVR);\n\t }\n\t _gaq.push([this.trackerName + '_setAccount', this.account]);\n\t if (this.domainName) _gaq.push([this.trackerName + '_setDomainName', this.domainName]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onReady = function onReady() {\n\t this.push(['Video', 'Playback', this.container.playback.name]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onPlay = function onPlay() {\n\t this.push(['Video', 'Play', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onStop = function onStop() {\n\t this.push(['Video', 'Stop', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onEnded = function onEnded() {\n\t this.push(['Video', 'Ended', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onBuffering = function onBuffering() {\n\t this.push(['Video', 'Buffering', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onBufferFull = function onBufferFull() {\n\t this.push(['Video', 'Bufferfull', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onError = function onError() {\n\t this.push(['Video', 'Error', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onHD = function onHD(isHD) {\n\t var status = isHD ? 'ON' : 'OFF';\n\t if (status !== this.currentHDState) {\n\t this.currentHDState = status;\n\t this.push(['Video', 'HD - ' + status, this.container.playback.src]);\n\t }\n\t };\n\t\n\t GoogleAnalytics.prototype.onPlaybackChanged = function onPlaybackChanged(playbackState) {\n\t if (playbackState.type !== null) {\n\t this.push(['Video', 'Playback Type - ' + playbackState.type, this.container.playback.src]);\n\t }\n\t };\n\t\n\t GoogleAnalytics.prototype.onDVR = function onDVR(dvrInUse) {\n\t var status = dvrInUse ? 'ON' : 'OFF';\n\t this.push(['Interaction', 'DVR - ' + status, this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onPause = function onPause() {\n\t this.push(['Video', 'Pause', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onSeek = function onSeek() {\n\t this.push(['Video', 'Seek', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onVolumeChanged = function onVolumeChanged() {\n\t this.push(['Interaction', 'Volume', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.onFullscreen = function onFullscreen() {\n\t this.push(['Interaction', 'Fullscreen', this.container.playback.src]);\n\t };\n\t\n\t GoogleAnalytics.prototype.push = function push(array) {\n\t var res = [this.trackerName + '_trackEvent'].concat(array);\n\t _gaq.push(res);\n\t };\n\t\n\t return GoogleAnalytics;\n\t}(_container_plugin2.default);\n\t\n\texports.default = GoogleAnalytics;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 64 */\n/*!***********************************************!*\\\n !*** ./src/plugins/google_analytics/index.js ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./google_analytics */ 63);\n\n/***/ },\n/* 65 */\n/*!********************************!*\\\n !*** ./src/plugins/log/log.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _vendor = __webpack_require__(/*! vendor */ 20);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar BOLD = 'font-weight: bold; font-size: 13px;';\n\tvar INFO = 'color: #006600;' + BOLD;\n\tvar DEBUG = 'color: #0000ff;' + BOLD;\n\tvar WARN = 'color: #ff8000;' + BOLD;\n\tvar ERROR = 'color: #ff0000;' + BOLD;\n\t\n\tvar LEVEL_DEBUG = 0;\n\tvar LEVEL_INFO = 1;\n\tvar LEVEL_WARN = 2;\n\tvar LEVEL_ERROR = 3;\n\tvar LEVEL_DISABLED = LEVEL_ERROR;\n\t\n\tvar COLORS = [DEBUG, INFO, WARN, ERROR, ERROR];\n\tvar DESCRIPTIONS = ['debug', 'info', 'warn', 'error', 'disabled'];\n\t\n\tvar Log = function () {\n\t function Log() {\n\t var _this = this;\n\t\n\t var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LEVEL_INFO;\n\t var offLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LEVEL_DISABLED;\n\t\n\t _classCallCheck(this, Log);\n\t\n\t this.kibo = new _vendor.Kibo();\n\t this.kibo.down(['ctrl shift d'], function () {\n\t return _this.onOff();\n\t });\n\t this.BLACKLIST = ['timeupdate', 'playback:timeupdate', 'playback:progress', 'container:hover', 'container:timeupdate', 'container:progress'];\n\t this.level = level;\n\t this.offLevel = offLevel;\n\t }\n\t\n\t Log.prototype.debug = function debug(klass) {\n\t this.log(klass, LEVEL_DEBUG, Array.prototype.slice.call(arguments, 1));\n\t };\n\t\n\t Log.prototype.info = function info(klass) {\n\t this.log(klass, LEVEL_INFO, Array.prototype.slice.call(arguments, 1));\n\t };\n\t\n\t Log.prototype.warn = function warn(klass) {\n\t this.log(klass, LEVEL_WARN, Array.prototype.slice.call(arguments, 1));\n\t };\n\t\n\t Log.prototype.error = function error(klass) {\n\t this.log(klass, LEVEL_ERROR, Array.prototype.slice.call(arguments, 1));\n\t };\n\t\n\t Log.prototype.onOff = function onOff() {\n\t if (this.level === this.offLevel) {\n\t this.level = this.previousLevel;\n\t } else {\n\t this.previousLevel = this.level;\n\t this.level = this.offLevel;\n\t }\n\t // handle instances where console.log is unavailable\n\t if (window.console && window.console.log) {\n\t window.console.log('%c[Clappr.Log] set log level to ' + DESCRIPTIONS[this.level], WARN);\n\t }\n\t };\n\t\n\t Log.prototype.level = function level(newLevel) {\n\t this.level = newLevel;\n\t };\n\t\n\t Log.prototype.log = function log(klass, level, message) {\n\t if (this.BLACKLIST.indexOf(message[0]) >= 0) return;\n\t if (level < this.level) return;\n\t\n\t if (!message) {\n\t message = klass;\n\t klass = null;\n\t }\n\t var color = COLORS[level];\n\t var klassDescription = '';\n\t if (klass) {\n\t klassDescription = '[' + klass + ']';\n\t }\n\t if (window.console && window.console.log) {\n\t window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message));\n\t }\n\t };\n\t\n\t return Log;\n\t}();\n\t\n\texports.default = Log;\n\t\n\t\n\tLog.LEVEL_DEBUG = LEVEL_DEBUG;\n\tLog.LEVEL_INFO = LEVEL_INFO;\n\tLog.LEVEL_WARN = LEVEL_WARN;\n\tLog.LEVEL_ERROR = LEVEL_ERROR;\n\t\n\tLog.getInstance = function () {\n\t if (this._instance === undefined) {\n\t this._instance = new this();\n\t this._instance.previousLevel = this._instance.level;\n\t this._instance.level = this._instance.offLevel;\n\t }\n\t return this._instance;\n\t};\n\t\n\tLog.setLevel = function (level) {\n\t this.getInstance().level = level;\n\t};\n\t\n\tLog.debug = function () {\n\t this.getInstance().debug.apply(this.getInstance(), arguments);\n\t};\n\tLog.info = function () {\n\t this.getInstance().info.apply(this.getInstance(), arguments);\n\t};\n\tLog.warn = function () {\n\t this.getInstance().warn.apply(this.getInstance(), arguments);\n\t};\n\tLog.error = function () {\n\t this.getInstance().error.apply(this.getInstance(), arguments);\n\t};\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 66 */\n/*!**************************************!*\\\n !*** ./src/plugins/poster/poster.js ***!\n \\**************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _ui_container_plugin = __webpack_require__(/*! base/ui_container_plugin */ 14);\n\t\n\tvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _poster = __webpack_require__(/*! ./public/poster.scss */ 86);\n\t\n\tvar _poster2 = _interopRequireDefault(_poster);\n\t\n\tvar _poster3 = __webpack_require__(/*! ./public/poster.html */ 95);\n\t\n\tvar _poster4 = _interopRequireDefault(_poster3);\n\t\n\tvar _play = __webpack_require__(/*! icons/01-play.svg */ 22);\n\t\n\tvar _play2 = _interopRequireDefault(_play);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } //Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar PosterPlugin = function (_UIContainerPlugin) {\n\t _inherits(PosterPlugin, _UIContainerPlugin);\n\t\n\t _createClass(PosterPlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'poster';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_poster4.default);\n\t }\n\t }, {\n\t key: 'shouldRender',\n\t get: function get() {\n\t var showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp);\n\t return this.container.playback.name !== 'html_img' && (this.container.playback.getPlaybackType() !== _playback2.default.NO_OP || showForNoOp);\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'class': 'player-poster',\n\t 'data-poster': ''\n\t };\n\t }\n\t }, {\n\t key: 'events',\n\t get: function get() {\n\t return {\n\t 'click': 'clicked'\n\t };\n\t }\n\t }, {\n\t key: 'showOnVideoEnd',\n\t get: function get() {\n\t return !this.options.poster || this.options.poster.showOnVideoEnd || this.options.poster.showOnVideoEnd === undefined;\n\t }\n\t }]);\n\t\n\t function PosterPlugin(container) {\n\t _classCallCheck(this, PosterPlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));\n\t\n\t _this.hasStartedPlaying = false;\n\t _this.playRequested = false;\n\t _this.render();\n\t process.nextTick(function () {\n\t return _this.update();\n\t });\n\t return _this;\n\t }\n\t\n\t PosterPlugin.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.update);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.update);\n\t this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.render);\n\t this.showOnVideoEnd && this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);\n\t };\n\t\n\t PosterPlugin.prototype.stopListening = function stopListening() {\n\t _UIContainerPlugin.prototype.stopListening.call(this);\n\t };\n\t\n\t PosterPlugin.prototype.onPlay = function onPlay() {\n\t this.hasStartedPlaying = true;\n\t this.update();\n\t };\n\t\n\t PosterPlugin.prototype.onStop = function onStop() {\n\t this.hasStartedPlaying = false;\n\t this.playRequested = false;\n\t this.update();\n\t };\n\t\n\t PosterPlugin.prototype.showPlayButton = function showPlayButton(show) {\n\t if (show && (!this.options.chromeless || this.options.allowUserInteraction)) {\n\t this.$playButton.show();\n\t this.$el.addClass('clickable');\n\t } else {\n\t this.$playButton.hide();\n\t this.$el.removeClass('clickable');\n\t }\n\t };\n\t\n\t PosterPlugin.prototype.clicked = function clicked() {\n\t if (!this.options.chromeless || this.options.allowUserInteraction) {\n\t this.playRequested = true;\n\t this.update();\n\t this.container.play();\n\t }\n\t return false;\n\t };\n\t\n\t PosterPlugin.prototype.shouldHideOnPlay = function shouldHideOnPlay() {\n\t // Audio broadcasts should keep the poster up; video should hide poster while playing.\n\t return !this.container.playback.isAudioOnly;\n\t };\n\t\n\t PosterPlugin.prototype.update = function update() {\n\t if (!this.shouldRender) {\n\t return;\n\t }\n\t var showPlayButton = !this.playRequested && !this.hasStartedPlaying && !this.container.buffering;\n\t this.showPlayButton(showPlayButton);\n\t if (!this.hasStartedPlaying) {\n\t this.container.disableMediaControl();\n\t this.$el.show();\n\t } else {\n\t this.container.enableMediaControl();\n\t if (this.shouldHideOnPlay()) {\n\t this.$el.hide();\n\t }\n\t }\n\t };\n\t\n\t PosterPlugin.prototype.render = function render() {\n\t if (!this.shouldRender) {\n\t return;\n\t }\n\t var style = _styler2.default.getStyleFor(_poster2.default, { baseUrl: this.options.baseUrl });\n\t this.$el.html(this.template());\n\t this.$el.append(style);\n\t if (this.options.poster) {\n\t var posterUrl = this.options.poster.url || this.options.poster;\n\t this.$el.css({ 'background-image': 'url(' + posterUrl + ')' });\n\t }\n\t this.container.$el.append(this.el);\n\t this.$playWrapper = this.$el.find('.play-wrapper');\n\t this.$playWrapper.append(_play2.default);\n\t this.$playButton = this.$playWrapper.find('svg');\n\t this.$playButton.addClass('poster-icon');\n\t this.$playButton.attr('data-poster', '');\n\t\n\t var buttonsColor = this.options.mediacontrol && this.options.mediacontrol.buttons;\n\t if (buttonsColor) {\n\t this.$el.find('svg path').css('fill', buttonsColor);\n\t }\n\t\n\t if (this.options.mediacontrol && this.options.mediacontrol.buttons) {\n\t buttonsColor = this.options.mediacontrol.buttons;\n\t this.$playButton.css('color', buttonsColor);\n\t }\n\t this.update();\n\t return this;\n\t };\n\t\n\t return PosterPlugin;\n\t}(_ui_container_plugin2.default);\n\t\n\texports.default = PosterPlugin;\n\tmodule.exports = exports['default'];\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./~/process/browser.js */ 21)))\n\n/***/ },\n/* 67 */\n/*!****************************************!*\\\n !*** ./src/plugins/seek_time/index.js ***!\n \\****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./seek_time */ 68);\n\n/***/ },\n/* 68 */\n/*!********************************************!*\\\n !*** ./src/plugins/seek_time/seek_time.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _ui_core_plugin = __webpack_require__(/*! base/ui_core_plugin */ 17);\n\t\n\tvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _playback = __webpack_require__(/*! base/playback */ 3);\n\t\n\tvar _playback2 = _interopRequireDefault(_playback);\n\t\n\tvar _seek_time = __webpack_require__(/*! ./public/seek_time.scss */ 87);\n\t\n\tvar _seek_time2 = _interopRequireDefault(_seek_time);\n\t\n\tvar _seek_time3 = __webpack_require__(/*! ./public/seek_time.html */ 96);\n\t\n\tvar _seek_time4 = _interopRequireDefault(_seek_time3);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar SeekTime = function (_UICorePlugin) {\n\t _inherits(SeekTime, _UICorePlugin);\n\t\n\t _createClass(SeekTime, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'seek_time';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_seek_time4.default);\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'class': 'seek-time',\n\t 'data-seek-time': ''\n\t };\n\t }\n\t }, {\n\t key: 'mediaControl',\n\t get: function get() {\n\t return this.core.mediaControl;\n\t }\n\t }, {\n\t key: 'mediaControlContainer',\n\t get: function get() {\n\t return this.mediaControl.container;\n\t }\n\t }, {\n\t key: 'isLiveStreamWithDvr',\n\t get: function get() {\n\t return this.mediaControlContainer && this.mediaControlContainer.getPlaybackType() === _playback2.default.LIVE && this.mediaControlContainer.isDvrEnabled();\n\t }\n\t }, {\n\t key: 'durationShown',\n\t get: function get() {\n\t return this.isLiveStreamWithDvr && !this.useActualLiveTime;\n\t }\n\t }, {\n\t key: 'useActualLiveTime',\n\t get: function get() {\n\t return this.actualLiveTime && this.isLiveStreamWithDvr;\n\t }\n\t }]);\n\t\n\t function SeekTime(core) {\n\t _classCallCheck(this, SeekTime);\n\t\n\t var _this = _possibleConstructorReturn(this, _UICorePlugin.call(this, core));\n\t\n\t _this.hoveringOverSeekBar = false;\n\t _this.hoverPosition = null;\n\t _this.duration = null;\n\t _this.actualLiveTime = !!_this.mediaControl.options.actualLiveTime;\n\t if (_this.actualLiveTime) {\n\t if (_this.mediaControl.options.actualLiveServerTime) {\n\t _this.actualLiveServerTimeDiff = new Date().getTime() - new Date(_this.mediaControl.options.actualLiveServerTime).getTime();\n\t } else {\n\t _this.actualLiveServerTimeDiff = 0;\n\t }\n\t }\n\t return _this;\n\t }\n\t\n\t SeekTime.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_RENDERED, this.render);\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime);\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime);\n\t this.listenTo(this.mediaControl, _events2.default.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);\n\t if (this.mediaControlContainer) {\n\t this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_PLAYBACKDVRSTATECHANGED, this.update);\n\t this.listenTo(this.mediaControlContainer, _events2.default.CONTAINER_TIMEUPDATE, this.updateDuration);\n\t }\n\t };\n\t\n\t SeekTime.prototype.onContainerChanged = function onContainerChanged() {\n\t this.stopListening();\n\t this.bindEvents();\n\t };\n\t\n\t SeekTime.prototype.updateDuration = function updateDuration(timeProgress) {\n\t this.duration = timeProgress.total;\n\t this.update();\n\t };\n\t\n\t SeekTime.prototype.showTime = function showTime(event) {\n\t this.hoveringOverSeekBar = true;\n\t this.calculateHoverPosition(event);\n\t this.update();\n\t };\n\t\n\t SeekTime.prototype.hideTime = function hideTime() {\n\t this.hoveringOverSeekBar = false;\n\t this.update();\n\t };\n\t\n\t SeekTime.prototype.calculateHoverPosition = function calculateHoverPosition(event) {\n\t var offset = event.pageX - this.mediaControl.$seekBarContainer.offset().left;\n\t // proportion into the seek bar that the mouse is hovered over 0-1\n\t this.hoverPosition = Math.min(1, Math.max(offset / this.mediaControl.$seekBarContainer.width(), 0));\n\t };\n\t\n\t SeekTime.prototype.getSeekTime = function getSeekTime() {\n\t var seekTime = void 0,\n\t secondsSinceMidnight = void 0;\n\t if (this.useActualLiveTime) {\n\t var d = new Date(new Date().getTime() - this.actualLiveServerTimeDiff),\n\t e = new Date(d);\n\t secondsSinceMidnight = (e - d.setHours(0, 0, 0, 0)) / 1000;\n\t seekTime = secondsSinceMidnight - this.duration + this.hoverPosition * this.duration;\n\t if (seekTime < 0) {\n\t seekTime += 86400;\n\t }\n\t } else {\n\t seekTime = this.hoverPosition * this.duration;\n\t }\n\t return { seekTime: seekTime, secondsSinceMidnight: secondsSinceMidnight };\n\t };\n\t\n\t SeekTime.prototype.update = function update() {\n\t if (!this.rendered) {\n\t // update() is always called after a render\n\t return;\n\t }\n\t if (!this.shouldBeVisible()) {\n\t this.$el.hide();\n\t this.$el.css('left', '-100%');\n\t } else {\n\t var seekTime = this.getSeekTime();\n\t var currentSeekTime = (0, _utils.formatTime)(seekTime.seekTime, this.useActualLiveTime);\n\t // only update dom if necessary, ie time actually changed\n\t if (currentSeekTime !== this.displayedSeekTime) {\n\t this.$seekTimeEl.text(currentSeekTime);\n\t this.displayedSeekTime = currentSeekTime;\n\t }\n\t\n\t if (this.durationShown) {\n\t this.$durationEl.show();\n\t var currentDuration = (0, _utils.formatTime)(this.actualLiveTime ? seekTime.secondsSinceMidnight : this.duration, this.actualLiveTime);\n\t if (currentDuration !== this.displayedDuration) {\n\t this.$durationEl.text(currentDuration);\n\t this.displayedDuration = currentDuration;\n\t }\n\t } else {\n\t this.$durationEl.hide();\n\t }\n\t\n\t // the element must be unhidden before its width is requested, otherwise it's width will be reported as 0\n\t this.$el.show();\n\t var containerWidth = this.mediaControl.$seekBarContainer.width();\n\t var elWidth = this.$el.width();\n\t var elLeftPos = this.hoverPosition * containerWidth;\n\t elLeftPos -= elWidth / 2;\n\t elLeftPos = Math.max(0, Math.min(elLeftPos, containerWidth - elWidth));\n\t this.$el.css('left', elLeftPos);\n\t }\n\t };\n\t\n\t SeekTime.prototype.shouldBeVisible = function shouldBeVisible() {\n\t return this.mediaControlContainer && this.mediaControlContainer.settings.seekEnabled && this.hoveringOverSeekBar && this.hoverPosition !== null && this.duration !== null;\n\t };\n\t\n\t SeekTime.prototype.render = function render() {\n\t this.rendered = true;\n\t this.displayedDuration = null;\n\t this.displayedSeekTime = null;\n\t var style = _styler2.default.getStyleFor(_seek_time2.default);\n\t this.$el.html(this.template());\n\t this.$el.append(style);\n\t this.$el.hide();\n\t this.mediaControl.$el.append(this.el);\n\t this.$seekTimeEl = this.$el.find('[data-seek-time]');\n\t this.$durationEl = this.$el.find('[data-duration]');\n\t this.$durationEl.hide();\n\t this.update();\n\t };\n\t\n\t return SeekTime;\n\t}(_ui_core_plugin2.default);\n\t\n\texports.default = SeekTime;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 69 */\n/*!********************************!*\\\n !*** ./src/plugins/sources.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _core_plugin = __webpack_require__(/*! base/core_plugin */ 12);\n\t\n\tvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\tvar SourcesPlugin = function (_CorePlugin) {\n\t _inherits(SourcesPlugin, _CorePlugin);\n\t\n\t function SourcesPlugin() {\n\t _classCallCheck(this, SourcesPlugin);\n\t\n\t return _possibleConstructorReturn(this, _CorePlugin.apply(this, arguments));\n\t }\n\t\n\t SourcesPlugin.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.core, _events2.default.CORE_CONTAINERS_CREATED, this.onContainersCreated);\n\t };\n\t\n\t SourcesPlugin.prototype.onContainersCreated = function onContainersCreated() {\n\t var firstValidSource = this.core.containers.filter(function (container) {\n\t return container.playback.name !== 'no_op';\n\t })[0] || this.core.containers[0];\n\t if (firstValidSource) {\n\t this.core.containers.forEach(function (container) {\n\t if (container !== firstValidSource) {\n\t container.destroy();\n\t }\n\t });\n\t }\n\t };\n\t\n\t _createClass(SourcesPlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'sources';\n\t }\n\t }]);\n\t\n\t return SourcesPlugin;\n\t}(_core_plugin2.default);\n\t\n\texports.default = SourcesPlugin;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 70 */\n/*!***************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/index.js ***!\n \\***************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./spinner_three_bounce */ 71);\n\n/***/ },\n/* 71 */\n/*!******************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/spinner_three_bounce.js ***!\n \\******************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _ui_container_plugin = __webpack_require__(/*! base/ui_container_plugin */ 14);\n\t\n\tvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _spinner = __webpack_require__(/*! ./public/spinner.html */ 97);\n\t\n\tvar _spinner2 = _interopRequireDefault(_spinner);\n\t\n\tvar _spinner3 = __webpack_require__(/*! ./public/spinner.scss */ 88);\n\t\n\tvar _spinner4 = _interopRequireDefault(_spinner3);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar SpinnerThreeBouncePlugin = function (_UIContainerPlugin) {\n\t _inherits(SpinnerThreeBouncePlugin, _UIContainerPlugin);\n\t\n\t _createClass(SpinnerThreeBouncePlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'spinner';\n\t }\n\t }, {\n\t key: 'attributes',\n\t get: function get() {\n\t return {\n\t 'data-spinner': '',\n\t 'class': 'spinner-three-bounce'\n\t };\n\t }\n\t }]);\n\t\n\t function SpinnerThreeBouncePlugin(container) {\n\t _classCallCheck(this, SpinnerThreeBouncePlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));\n\t\n\t _this.template = (0, _template2.default)(_spinner2.default);\n\t _this.showTimeout = null;\n\t _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERING, _this.onBuffering);\n\t _this.listenTo(_this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, _this.onBufferFull);\n\t _this.listenTo(_this.container, _events2.default.CONTAINER_STOP, _this.onStop);\n\t _this.listenTo(_this.container, _events2.default.CONTAINER_ENDED, _this.onStop);\n\t _this.listenTo(_this.container, _events2.default.CONTAINER_ERROR, _this.onStop);\n\t _this.render();\n\t return _this;\n\t }\n\t\n\t SpinnerThreeBouncePlugin.prototype.onBuffering = function onBuffering() {\n\t this.show();\n\t };\n\t\n\t SpinnerThreeBouncePlugin.prototype.onBufferFull = function onBufferFull() {\n\t this.hide();\n\t };\n\t\n\t SpinnerThreeBouncePlugin.prototype.onStop = function onStop() {\n\t this.hide();\n\t };\n\t\n\t SpinnerThreeBouncePlugin.prototype.show = function show() {\n\t var _this2 = this;\n\t\n\t if (this.showTimeout === null) {\n\t this.showTimeout = setTimeout(function () {\n\t return _this2.$el.show();\n\t }, 300);\n\t }\n\t };\n\t\n\t SpinnerThreeBouncePlugin.prototype.hide = function hide() {\n\t if (this.showTimeout !== null) {\n\t clearTimeout(this.showTimeout);\n\t this.showTimeout = null;\n\t }\n\t this.$el.hide();\n\t };\n\t\n\t SpinnerThreeBouncePlugin.prototype.render = function render() {\n\t this.$el.html(this.template());\n\t var style = _styler2.default.getStyleFor(_spinner4.default);\n\t this.container.$el.append(style);\n\t this.container.$el.append(this.$el);\n\t this.$el.hide();\n\t if (this.container.buffering) {\n\t this.onBuffering();\n\t }\n\t return this;\n\t };\n\t\n\t return SpinnerThreeBouncePlugin;\n\t}(_ui_container_plugin2.default);\n\t\n\texports.default = SpinnerThreeBouncePlugin;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 72 */\n/*!************************************!*\\\n !*** ./src/plugins/stats/index.js ***!\n \\************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./stats */ 73);\n\n/***/ },\n/* 73 */\n/*!************************************!*\\\n !*** ./src/plugins/stats/stats.js ***!\n \\************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _container_plugin = __webpack_require__(/*! base/container_plugin */ 13);\n\t\n\tvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ 5);\n\t\n\tvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar StatsPlugin = function (_ContainerPlugin) {\n\t _inherits(StatsPlugin, _ContainerPlugin);\n\t\n\t _createClass(StatsPlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'stats';\n\t }\n\t }]);\n\t\n\t function StatsPlugin(container) {\n\t _classCallCheck(this, StatsPlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _ContainerPlugin.call(this, container));\n\t\n\t _this.setInitialAttrs();\n\t _this.reportInterval = _this.options.reportInterval || 5000;\n\t _this.state = 'IDLE';\n\t return _this;\n\t }\n\t\n\t StatsPlugin.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.container.playback, _events2.default.PLAYBACK_PLAY, this.onPlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_ENDED, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_DESTROYED, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERING, this.onBuffering);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATE_BUFFERFULL, this.onBufferFull);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STATS_ADD, this.onStatsAdd);\n\t this.listenTo(this.container, _events2.default.CONTAINER_BITRATE, this.onStatsAdd);\n\t this.listenTo(this.container.playback, _events2.default.PLAYBACK_STATS_ADD, this.onStatsAdd);\n\t };\n\t\n\t StatsPlugin.prototype.setInitialAttrs = function setInitialAttrs() {\n\t this.firstPlay = true;\n\t this.startupTime = 0;\n\t this.rebufferingTime = 0;\n\t this.watchingTime = 0;\n\t this.rebuffers = 0;\n\t this.externalMetrics = {};\n\t };\n\t\n\t StatsPlugin.prototype.onPlay = function onPlay() {\n\t this.state = 'PLAYING';\n\t this.watchingTimeInit = Date.now();\n\t if (!this.intervalId) {\n\t this.intervalId = setInterval(this.report.bind(this), this.reportInterval);\n\t }\n\t };\n\t\n\t StatsPlugin.prototype.onStop = function onStop() {\n\t clearInterval(this.intervalId);\n\t this.report();\n\t this.intervalId = undefined;\n\t this.state = 'STOPPED';\n\t };\n\t\n\t StatsPlugin.prototype.onBuffering = function onBuffering() {\n\t if (this.firstPlay) {\n\t this.startupTimeInit = Date.now();\n\t } else {\n\t this.rebufferingTimeInit = Date.now();\n\t }\n\t this.state = 'BUFFERING';\n\t this.rebuffers++;\n\t };\n\t\n\t StatsPlugin.prototype.onBufferFull = function onBufferFull() {\n\t if (this.firstPlay && this.startupTimeInit) {\n\t this.firstPlay = false;\n\t this.startupTime = Date.now() - this.startupTimeInit;\n\t this.watchingTimeInit = Date.now();\n\t } else if (this.rebufferingTimeInit) {\n\t this.rebufferingTime += this.getRebufferingTime();\n\t }\n\t this.rebufferingTimeInit = undefined;\n\t this.state = 'PLAYING';\n\t };\n\t\n\t StatsPlugin.prototype.getRebufferingTime = function getRebufferingTime() {\n\t return Date.now() - this.rebufferingTimeInit;\n\t };\n\t\n\t StatsPlugin.prototype.getWatchingTime = function getWatchingTime() {\n\t var totalTime = Date.now() - this.watchingTimeInit;\n\t return totalTime - this.rebufferingTime;\n\t };\n\t\n\t StatsPlugin.prototype.isRebuffering = function isRebuffering() {\n\t return !!this.rebufferingTimeInit;\n\t };\n\t\n\t StatsPlugin.prototype.onStatsAdd = function onStatsAdd(metric) {\n\t _clapprZepto2.default.extend(this.externalMetrics, metric);\n\t };\n\t\n\t StatsPlugin.prototype.getStats = function getStats() {\n\t var metrics = {\n\t startupTime: this.startupTime,\n\t rebuffers: this.rebuffers,\n\t rebufferingTime: this.isRebuffering() ? this.rebufferingTime + this.getRebufferingTime() : this.rebufferingTime,\n\t watchingTime: this.isRebuffering() ? this.getWatchingTime() - this.getRebufferingTime() : this.getWatchingTime()\n\t };\n\t _clapprZepto2.default.extend(metrics, this.externalMetrics);\n\t return metrics;\n\t };\n\t\n\t StatsPlugin.prototype.report = function report() {\n\t this.container.statsReport(this.getStats());\n\t };\n\t\n\t return StatsPlugin;\n\t}(_container_plugin2.default);\n\t\n\texports.default = StatsPlugin;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 74 */\n/*!********************************!*\\\n !*** ./src/plugins/strings.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _utils = __webpack_require__(/*! base/utils */ 2);\n\t\n\tvar _core_plugin = __webpack_require__(/*! base/core_plugin */ 12);\n\t\n\tvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\t\n\tvar _lodash = __webpack_require__(/*! lodash.merge */ 35);\n\t\n\tvar _lodash2 = _interopRequireDefault(_lodash);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t/**\n\t * The internationalization (i18n) plugin\n\t * @class Strings\n\t * @constructor\n\t * @extends CorePlugin\n\t * @module plugins\n\t */\n\tvar Strings = function (_CorePlugin) {\n\t _inherits(Strings, _CorePlugin);\n\t\n\t _createClass(Strings, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'strings';\n\t }\n\t }]);\n\t\n\t function Strings(core) {\n\t _classCallCheck(this, Strings);\n\t\n\t var _this = _possibleConstructorReturn(this, _CorePlugin.call(this, core));\n\t\n\t _this._initializeMessages();\n\t return _this;\n\t }\n\t /**\n\t * Gets a translated string for the given key.\n\t * @method t\n\t * @param {String} key the key to all messages\n\t * @return {String} translated label\n\t */\n\t\n\t\n\t Strings.prototype.t = function t(key) {\n\t var lang = this._language();\n\t var i18n = lang && this._messages[lang] || this._messages['en'];\n\t return i18n[key] || key;\n\t };\n\t\n\t Strings.prototype._language = function _language() {\n\t return this.core.options.language || (0, _utils.getBrowserLanguage)();\n\t };\n\t\n\t Strings.prototype._initializeMessages = function _initializeMessages() {\n\t this._messages = (0, _lodash2.default)({\n\t 'en': {\n\t 'live': 'live',\n\t 'back_to_live': 'back to live',\n\t 'playback_not_supported': 'Your browser does not support the playback of this video. Please try using a different browser.'\n\t },\n\t 'pt': {\n\t 'live': 'ao vivo',\n\t 'back_to_live': 'voltar para o ao vivo',\n\t 'playback_not_supported': 'Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.'\n\t },\n\t 'es': {\n\t 'live': 'vivo',\n\t 'back_to_live': 'volver en vivo',\n\t 'playback_not_supported': 'Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente.'\n\t },\n\t 'ru': {\n\t 'live': 'прямой эфир',\n\t 'back_to_live': 'к прямому эфиру',\n\t 'playback_not_supported': 'Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер.'\n\t }\n\t }, this.core.options.strings || {});\n\t\n\t this._messages['pt-BR'] = this._messages['pt'];\n\t this._messages['en-US'] = this._messages['en'];\n\t this._messages['es-419'] = this._messages['es'];\n\t };\n\t\n\t return Strings;\n\t}(_core_plugin2.default);\n\t\n\texports.default = Strings;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 75 */\n/*!****************************************!*\\\n !*** ./src/plugins/watermark/index.js ***!\n \\****************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tmodule.exports = __webpack_require__(/*! ./watermark */ 76);\n\n/***/ },\n/* 76 */\n/*!********************************************!*\\\n !*** ./src/plugins/watermark/watermark.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _ui_container_plugin = __webpack_require__(/*! base/ui_container_plugin */ 14);\n\t\n\tvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\t\n\tvar _events = __webpack_require__(/*! base/events */ 1);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _styler = __webpack_require__(/*! base/styler */ 4);\n\t\n\tvar _styler2 = _interopRequireDefault(_styler);\n\t\n\tvar _template = __webpack_require__(/*! base/template */ 6);\n\t\n\tvar _template2 = _interopRequireDefault(_template);\n\t\n\tvar _watermark = __webpack_require__(/*! ./public/watermark.scss */ 89);\n\t\n\tvar _watermark2 = _interopRequireDefault(_watermark);\n\t\n\tvar _watermark3 = __webpack_require__(/*! ./public/watermark.html */ 98);\n\t\n\tvar _watermark4 = _interopRequireDefault(_watermark3);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright 2014 Globo.com Player authors. All rights reserved.\n\t// Use of this source code is governed by a BSD-style\n\t// license that can be found in the LICENSE file.\n\t\n\tvar WaterMarkPlugin = function (_UIContainerPlugin) {\n\t _inherits(WaterMarkPlugin, _UIContainerPlugin);\n\t\n\t _createClass(WaterMarkPlugin, [{\n\t key: 'name',\n\t get: function get() {\n\t return 'watermark';\n\t }\n\t }, {\n\t key: 'template',\n\t get: function get() {\n\t return (0, _template2.default)(_watermark4.default);\n\t }\n\t }]);\n\t\n\t function WaterMarkPlugin(container) {\n\t _classCallCheck(this, WaterMarkPlugin);\n\t\n\t var _this = _possibleConstructorReturn(this, _UIContainerPlugin.call(this, container));\n\t\n\t _this.configure();\n\t return _this;\n\t }\n\t\n\t WaterMarkPlugin.prototype.bindEvents = function bindEvents() {\n\t this.listenTo(this.container, _events2.default.CONTAINER_PLAY, this.onPlay);\n\t this.listenTo(this.container, _events2.default.CONTAINER_STOP, this.onStop);\n\t this.listenTo(this.container, _events2.default.CONTAINER_OPTIONS_CHANGE, this.configure);\n\t };\n\t\n\t WaterMarkPlugin.prototype.configure = function configure() {\n\t this.position = this.options.position || 'bottom-right';\n\t if (this.options.watermark) {\n\t this.imageUrl = this.options.watermark;\n\t this.imageLink = this.options.watermarkLink;\n\t this.render();\n\t } else {\n\t this.$el.remove();\n\t }\n\t };\n\t\n\t WaterMarkPlugin.prototype.onPlay = function onPlay() {\n\t if (!this.hidden) this.$el.show();\n\t };\n\t\n\t WaterMarkPlugin.prototype.onStop = function onStop() {\n\t this.$el.hide();\n\t };\n\t\n\t WaterMarkPlugin.prototype.render = function render() {\n\t this.$el.hide();\n\t var templateOptions = { position: this.position, imageUrl: this.imageUrl, imageLink: this.imageLink };\n\t this.$el.html(this.template(templateOptions));\n\t var style = _styler2.default.getStyleFor(_watermark2.default);\n\t this.container.$el.append(style);\n\t this.container.$el.append(this.$el);\n\t return this;\n\t };\n\t\n\t return WaterMarkPlugin;\n\t}(_ui_container_plugin2.default);\n\t\n\texports.default = WaterMarkPlugin;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 77 */\n/*!****************************!*\\\n !*** ./src/vendor/kibo.js ***!\n \\****************************/\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t/* eslint-disable */\n\t// Kibo is released under the MIT License. Copyright (c) 2013 marquete.\n\t// see https://github.com/marquete/kibo\n\t\n\tvar Kibo = function Kibo(element) {\n\t this.element = element || window.document;\n\t this.initialize();\n\t};\n\t\n\tKibo.KEY_NAMES_BY_CODE = {\n\t 8: 'backspace', 9: 'tab', 13: 'enter',\n\t 16: 'shift', 17: 'ctrl', 18: 'alt',\n\t 20: 'caps_lock',\n\t 27: 'esc',\n\t 32: 'space',\n\t 37: 'left', 38: 'up', 39: 'right', 40: 'down',\n\t 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9',\n\t 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j',\n\t 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't',\n\t 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 112: 'f1', 113: 'f2', 114: 'f3',\n\t 115: 'f4', 116: 'f5', 117: 'f6', 118: 'f7', 119: 'f8', 120: 'f9', 121: 'f10', 122: 'f11', 123: 'f12'\n\t};\n\t\n\tKibo.KEY_CODES_BY_NAME = {};\n\t(function () {\n\t for (var key in Kibo.KEY_NAMES_BY_CODE) {\n\t if (Object.prototype.hasOwnProperty.call(Kibo.KEY_NAMES_BY_CODE, key)) {\n\t Kibo.KEY_CODES_BY_NAME[Kibo.KEY_NAMES_BY_CODE[key]] = +key;\n\t }\n\t }\n\t})();\n\t\n\tKibo.MODIFIERS = ['shift', 'ctrl', 'alt'];\n\t\n\tKibo.registerEvent = function () {\n\t if (document.addEventListener) {\n\t return function (element, eventName, func) {\n\t element.addEventListener(eventName, func, false);\n\t };\n\t } else if (document.attachEvent) {\n\t return function (element, eventName, func) {\n\t element.attachEvent('on' + eventName, func);\n\t };\n\t }\n\t}();\n\t\n\tKibo.unregisterEvent = function () {\n\t if (document.removeEventListener) {\n\t return function (element, eventName, func) {\n\t element.removeEventListener(eventName, func, false);\n\t };\n\t } else if (document.detachEvent) {\n\t return function (element, eventName, func) {\n\t element.detachEvent('on' + eventName, func);\n\t };\n\t }\n\t}();\n\t\n\tKibo.stringContains = function (string, substring) {\n\t return string.indexOf(substring) !== -1;\n\t};\n\t\n\tKibo.neatString = function (string) {\n\t return string.replace(/^\\s+|\\s+$/g, '').replace(/\\s+/g, ' ');\n\t};\n\t\n\tKibo.capitalize = function (string) {\n\t return string.toLowerCase().replace(/^./, function (match) {\n\t return match.toUpperCase();\n\t });\n\t};\n\t\n\tKibo.isString = function (what) {\n\t return Kibo.stringContains(Object.prototype.toString.call(what), 'String');\n\t};\n\t\n\tKibo.arrayIncludes = function () {\n\t if (Array.prototype.indexOf) {\n\t return function (haystack, needle) {\n\t return haystack.indexOf(needle) !== -1;\n\t };\n\t } else {\n\t return function (haystack, needle) {\n\t for (var i = 0; i < haystack.length; i++) {\n\t if (haystack[i] === needle) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t };\n\t }\n\t}();\n\t\n\tKibo.extractModifiers = function (keyCombination) {\n\t var modifiers, i;\n\t modifiers = [];\n\t for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n\t if (Kibo.stringContains(keyCombination, Kibo.MODIFIERS[i])) {\n\t modifiers.push(Kibo.MODIFIERS[i]);\n\t }\n\t }\n\t return modifiers;\n\t};\n\t\n\tKibo.extractKey = function (keyCombination) {\n\t var keys, i;\n\t keys = Kibo.neatString(keyCombination).split(' ');\n\t for (i = 0; i < keys.length; i++) {\n\t if (!Kibo.arrayIncludes(Kibo.MODIFIERS, keys[i])) {\n\t return keys[i];\n\t }\n\t }\n\t};\n\t\n\tKibo.modifiersAndKey = function (keyCombination) {\n\t var result, key;\n\t\n\t if (Kibo.stringContains(keyCombination, 'any')) {\n\t return Kibo.neatString(keyCombination).split(' ').slice(0, 2).join(' ');\n\t }\n\t\n\t result = Kibo.extractModifiers(keyCombination);\n\t\n\t key = Kibo.extractKey(keyCombination);\n\t if (key && !Kibo.arrayIncludes(Kibo.MODIFIERS, key)) {\n\t result.push(key);\n\t }\n\t\n\t return result.join(' ');\n\t};\n\t\n\tKibo.keyName = function (keyCode) {\n\t return Kibo.KEY_NAMES_BY_CODE[keyCode + ''];\n\t};\n\t\n\tKibo.keyCode = function (keyName) {\n\t return +Kibo.KEY_CODES_BY_NAME[keyName];\n\t};\n\t\n\tKibo.prototype.initialize = function () {\n\t var i,\n\t that = this;\n\t\n\t this.lastKeyCode = -1;\n\t this.lastModifiers = {};\n\t for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n\t this.lastModifiers[Kibo.MODIFIERS[i]] = false;\n\t }\n\t\n\t this.keysDown = { any: [] };\n\t this.keysUp = { any: [] };\n\t this.downHandler = this.handler('down');\n\t this.upHandler = this.handler('up');\n\t\n\t Kibo.registerEvent(this.element, 'keydown', this.downHandler);\n\t Kibo.registerEvent(this.element, 'keyup', this.upHandler);\n\t Kibo.registerEvent(window, 'unload', function unloader() {\n\t Kibo.unregisterEvent(that.element, 'keydown', that.downHandler);\n\t Kibo.unregisterEvent(that.element, 'keyup', that.upHandler);\n\t Kibo.unregisterEvent(window, 'unload', unloader);\n\t });\n\t};\n\t\n\tKibo.prototype.handler = function (upOrDown) {\n\t var that = this;\n\t return function (e) {\n\t var i, registeredKeys, lastModifiersAndKey;\n\t\n\t e = e || window.event;\n\t\n\t that.lastKeyCode = e.keyCode;\n\t for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n\t that.lastModifiers[Kibo.MODIFIERS[i]] = e[Kibo.MODIFIERS[i] + 'Key'];\n\t }\n\t if (Kibo.arrayIncludes(Kibo.MODIFIERS, Kibo.keyName(that.lastKeyCode))) {\n\t that.lastModifiers[Kibo.keyName(that.lastKeyCode)] = true;\n\t }\n\t\n\t registeredKeys = that['keys' + Kibo.capitalize(upOrDown)];\n\t\n\t for (i = 0; i < registeredKeys.any.length; i++) {\n\t if (registeredKeys.any[i](e) === false && e.preventDefault) {\n\t e.preventDefault();\n\t }\n\t }\n\t\n\t lastModifiersAndKey = that.lastModifiersAndKey();\n\t if (registeredKeys[lastModifiersAndKey]) {\n\t for (i = 0; i < registeredKeys[lastModifiersAndKey].length; i++) {\n\t if (registeredKeys[lastModifiersAndKey][i](e) === false && e.preventDefault) {\n\t e.preventDefault();\n\t }\n\t }\n\t }\n\t };\n\t};\n\t\n\tKibo.prototype.registerKeys = function (upOrDown, newKeys, func) {\n\t var i,\n\t keys,\n\t registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\t\n\t if (Kibo.isString(newKeys)) {\n\t newKeys = [newKeys];\n\t }\n\t\n\t for (i = 0; i < newKeys.length; i++) {\n\t keys = newKeys[i];\n\t keys = Kibo.modifiersAndKey(keys + '');\n\t\n\t if (registeredKeys[keys]) {\n\t registeredKeys[keys].push(func);\n\t } else {\n\t registeredKeys[keys] = [func];\n\t }\n\t }\n\t\n\t return this;\n\t};\n\t\n\t// jshint maxdepth:5\n\tKibo.prototype.unregisterKeys = function (upOrDown, newKeys, func) {\n\t var i,\n\t j,\n\t keys,\n\t registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\t\n\t if (Kibo.isString(newKeys)) {\n\t newKeys = [newKeys];\n\t }\n\t\n\t for (i = 0; i < newKeys.length; i++) {\n\t keys = newKeys[i];\n\t keys = Kibo.modifiersAndKey(keys + '');\n\t\n\t if (func === null) {\n\t delete registeredKeys[keys];\n\t } else {\n\t if (registeredKeys[keys]) {\n\t for (j = 0; j < registeredKeys[keys].length; j++) {\n\t if (String(registeredKeys[keys][j]) === String(func)) {\n\t registeredKeys[keys].splice(j, 1);\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t\n\t return this;\n\t};\n\t\n\tKibo.prototype.off = function (keys) {\n\t return this.unregisterKeys('down', keys, null);\n\t};\n\t\n\tKibo.prototype.delegate = function (upOrDown, keys, func) {\n\t return func !== null || func !== undefined ? this.registerKeys(upOrDown, keys, func) : this.unregisterKeys(upOrDown, keys, func);\n\t};\n\t\n\tKibo.prototype.down = function (keys, func) {\n\t return this.delegate('down', keys, func);\n\t};\n\t\n\tKibo.prototype.up = function (keys, func) {\n\t return this.delegate('up', keys, func);\n\t};\n\t\n\tKibo.prototype.lastKey = function (modifier) {\n\t if (!modifier) {\n\t return Kibo.keyName(this.lastKeyCode);\n\t }\n\t\n\t return this.lastModifiers[modifier];\n\t};\n\t\n\tKibo.prototype.lastModifiersAndKey = function () {\n\t var result, i;\n\t\n\t result = [];\n\t for (i = 0; i < Kibo.MODIFIERS.length; i++) {\n\t if (this.lastKey(Kibo.MODIFIERS[i])) {\n\t result.push(Kibo.MODIFIERS[i]);\n\t }\n\t }\n\t\n\t if (!Kibo.arrayIncludes(result, this.lastKey())) {\n\t result.push(this.lastKey());\n\t }\n\t\n\t return result.join(' ');\n\t};\n\t\n\texports.default = Kibo;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 78 */\n/*!****************************************************!*\\\n !*** ./src/components/container/public/style.scss ***!\n \\****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".container[data-container]{position:absolute;background-color:#000;height:100%;width:100%}.container[data-container] .chromeless{cursor:default}[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled{cursor:pointer}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 79 */\n/*!***********************************************!*\\\n !*** ./src/components/core/public/style.scss ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \"@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(\" + __webpack_require__(/*! ./Roboto.ttf */ 110) + \") format(\\\"truetype\\\")}[data-player]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);position:relative;margin:0;padding:0;border:0;font-style:normal;font-weight:400;text-align:center;overflow:hidden;font-size:100%;font-family:Roboto,Open Sans,Arial,sans-serif;text-shadow:0 0 0;box-sizing:border-box}[data-player] a,[data-player] abbr,[data-player] acronym,[data-player] address,[data-player] applet,[data-player] article,[data-player] aside,[data-player] audio,[data-player] b,[data-player] big,[data-player] blockquote,[data-player] canvas,[data-player] caption,[data-player] center,[data-player] cite,[data-player] code,[data-player] dd,[data-player] del,[data-player] details,[data-player] dfn,[data-player] div,[data-player] dl,[data-player] dt,[data-player] em,[data-player] embed,[data-player] fieldset,[data-player] figcaption,[data-player] figure,[data-player] footer,[data-player] form,[data-player] h1,[data-player] h2,[data-player] h3,[data-player] h4,[data-player] h5,[data-player] h6,[data-player] header,[data-player] hgroup,[data-player] i,[data-player] iframe,[data-player] img,[data-player] ins,[data-player] kbd,[data-player] label,[data-player] legend,[data-player] li,[data-player] mark,[data-player] menu,[data-player] nav,[data-player] object,[data-player] ol,[data-player] output,[data-player] p,[data-player] pre,[data-player] q,[data-player] ruby,[data-player] s,[data-player] samp,[data-player] section,[data-player] small,[data-player] span,[data-player] strike,[data-player] strong,[data-player] sub,[data-player] summary,[data-player] sup,[data-player] table,[data-player] tbody,[data-player] td,[data-player] tfoot,[data-player] th,[data-player] thead,[data-player] time,[data-player] tr,[data-player] tt,[data-player] u,[data-player] ul,[data-player] var,[data-player] video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}[data-player] table{border-collapse:collapse;border-spacing:0}[data-player] caption,[data-player] td,[data-player] th{text-align:left;font-weight:400;vertical-align:middle}[data-player] blockquote,[data-player] q{quotes:none}[data-player] blockquote:after,[data-player] blockquote:before,[data-player] q:after,[data-player] q:before{content:\\\"\\\";content:none}[data-player] a img{border:none}[data-player]:focus{outline:0}[data-player] *{max-width:none;box-sizing:inherit;float:none}[data-player] div{display:block}[data-player].fullscreen{width:100%!important;height:100%!important;top:0;left:0}[data-player].nocursor{cursor:none}.clappr-style{display:none!important}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 80 */\n/*!****************************************************************!*\\\n !*** ./src/components/media_control/public/media-control.scss ***!\n \\****************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".media-control-notransition{-webkit-transition:none!important;transition:none!important}.media-control[data-media-control]{position:absolute;width:100%;height:100%;z-index:9999;pointer-events:none}.media-control[data-media-control].dragging{pointer-events:auto;cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url(\" + __webpack_require__(/*! ./closed-hand.cur */ 37) + \"),move}.media-control[data-media-control].dragging *{cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url(\" + __webpack_require__(/*! ./closed-hand.cur */ 37) + \"),move}.media-control[data-media-control] .media-control-background[data-background]{position:absolute;height:40%;width:100%;bottom:0;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.9));background:linear-gradient(transparent,rgba(0,0,0,.9));-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.media-control[data-media-control] .media-control-icon{line-height:0;letter-spacing:0;speak:none;color:#fff;opacity:.5;vertical-align:middle;text-align:left;-webkit-transition:all .1s ease;transition:all .1s ease}.media-control[data-media-control] .media-control-icon:hover{color:#fff;opacity:.75;text-shadow:hsla(0,0%,100%,.8) 0 0 5px}.media-control[data-media-control].media-control-hide .media-control-background[data-background]{opacity:0}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls]{bottom:-50px}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls]{position:absolute;bottom:7px;width:100%;height:32px;font-size:0;vertical-align:middle;pointer-events:auto;-webkit-transition:bottom .4s ease-out;transition:bottom .4s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control]{position:absolute;top:0;left:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control]{height:100%;text-align:center;line-height:32px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control]{position:absolute;top:0;right:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button{background-color:transparent;border:0;margin:0 6px;padding:0;cursor:pointer;display:inline-block;width:32px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg{width:100%;height:22px}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus{outline:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop]{float:left;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen]{float:right;background-color:transparent;border:0;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator]{cursor:default;float:right;background-color:transparent;border:0;height:100%;display:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled{opacity:1;display:block}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover{opacity:1;text-shadow:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop]{float:left}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration],.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{display:inline-block;font-size:10px;color:#fff;cursor:default;line-height:32px;position:relative}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{margin:0 6px 0 7px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]{color:hsla(0,0%,100%,.5);margin-right:6px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before{content:\\\"|\\\";margin-right:7px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{position:absolute;top:-20px;left:0;display:inline-block;vertical-align:middle;width:100%;height:25px;cursor:pointer}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{width:100%;height:1px;position:relative;top:12px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled{cursor:default}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2px;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume]{float:right;display:inline-block;height:32px;cursor:pointer;margin:0 6px;box-sizing:border-box}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume]{float:left;bottom:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]{background-color:transparent;border:0;box-sizing:content-box;width:32px;height:32px;opacity:.5}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover{opacity:.75}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg{height:24px;position:relative;top:3px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg{margin-left:2px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume]{float:left;position:relative;overflow:hidden;top:6px;width:42px;height:18px;padding:3px 0;-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume]{height:1px;position:relative;top:7px;margin:0 3px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:0;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]{float:left;width:4px;padding-left:2px;height:12px;opacity:.5;box-shadow:inset 2px 0 0 #fff;-webkit-transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill{box-shadow:inset 2px 0 0 #fff;opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1){padding-left:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover{-webkit-transform:scaleY(1.5);transform:scaleY(1.5)}.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide{width:0;height:12px;top:9px;padding:0}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 81 */\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.scss ***!\n \\*************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".clappr-flash-playback[data-flash-playback]{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 82 */\n/*!*****************************************************!*\\\n !*** ./src/playbacks/html5_video/public/style.scss ***!\n \\*****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \"[data-html5-video]{position:absolute;height:100%;width:100%;display:block}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 83 */\n/*!**************************************************!*\\\n !*** ./src/playbacks/html_img/public/style.scss ***!\n \\**************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \"[data-html-img]{max-width:100%;max-height:100%}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 84 */\n/*!***********************************************!*\\\n !*** ./src/playbacks/no_op/public/style.scss ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \"[data-no-op]{position:absolute;height:100%;width:100%;text-align:center}[data-no-op] p[data-no-op-msg]{position:absolute;text-align:center;font-size:25px;left:0;right:0;color:#fff;padding:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);max-height:100%;overflow:auto}[data-no-op] canvas[data-no-op-canvas]{background-color:#777;height:100%;width:100%}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 85 */\n/*!***********************************************************!*\\\n !*** ./src/plugins/dvr_controls/public/dvr_controls.scss ***!\n \\***********************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".dvr-controls[data-dvr-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.dvr-controls[data-dvr-controls] .live-info{cursor:default;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase}.dvr-controls[data-dvr-controls] .live-info:before{content:\\\"\\\";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#ff0101}.dvr-controls[data-dvr-controls] .live-info.disabled{opacity:.3}.dvr-controls[data-dvr-controls] .live-info.disabled:before{background-color:#fff}.dvr-controls[data-dvr-controls] .live-button{cursor:pointer;outline:none;display:none;border:0;color:#fff;background-color:transparent;height:32px;padding:0;opacity:.7;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase;-webkit-transition:all .1s ease;transition:all .1s ease}.dvr-controls[data-dvr-controls] .live-button:before{content:\\\"\\\";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#fff}.dvr-controls[data-dvr-controls] .live-button:hover{opacity:1;text-shadow:hsla(0,0%,100%,.75) 0 0 5px}.dvr .dvr-controls[data-dvr-controls] .live-info{display:none}.dvr .dvr-controls[data-dvr-controls] .live-button{display:block}.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#005aff}.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#ff0101}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 86 */\n/*!***********************************************!*\\\n !*** ./src/plugins/poster/public/poster.scss ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".player-poster[data-poster]{display:-webkit-box;display:-moz-box;display:box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;box-pack:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-ms-flex-pack:center;-webkit-box-align:center;box-align:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-ms-flex-align:center;position:absolute;height:100%;width:100%;z-index:998;top:0;left:0;background-color:#000;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.player-poster[data-poster].clickable{cursor:pointer}.player-poster[data-poster]:hover .play-wrapper[data-poster]{opacity:1}.player-poster[data-poster] .play-wrapper[data-poster]{width:100%;height:25%;margin:0 auto;opacity:.75;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.player-poster[data-poster] .play-wrapper[data-poster] svg{height:100%}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#fff}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 87 */\n/*!*****************************************************!*\\\n !*** ./src/plugins/seek_time/public/seek_time.scss ***!\n \\*****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".seek-time[data-seek-time]{position:absolute;white-space:nowrap;height:20px;line-height:20px;font-size:0;left:-100%;bottom:55px;background-color:rgba(2,2,2,.5);z-index:9999;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.seek-time[data-seek-time].hidden[data-seek-time]{opacity:0}.seek-time[data-seek-time] [data-seek-time]{display:inline-block;color:#fff;font-size:10px;padding-left:7px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]{display:inline-block;color:hsla(0,0%,100%,.5);font-size:10px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]:before{content:\\\"|\\\";margin-right:7px}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 88 */\n/*!**************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/public/spinner.scss ***!\n \\**************************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \".spinner-three-bounce[data-spinner]{position:absolute;margin:0 auto;width:70px;text-align:center;z-index:999;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.spinner-three-bounce[data-spinner]>div{width:18px;height:18px;background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner-three-bounce[data-spinner] [data-bounce1]{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner-three-bounce[data-spinner] [data-bounce2]{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 89 */\n/*!*****************************************************!*\\\n !*** ./src/plugins/watermark/public/watermark.scss ***!\n \\*****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\texports = module.exports = __webpack_require__(/*! ./../../../../~/css-loader/lib/css-base.js */ 7)();\n\t// imports\n\t\n\t\n\t// module\n\texports.push([module.id, \"[data-watermark]{position:absolute;min-width:70px;max-width:200px;width:12%;text-align:center;z-index:10}[data-watermark] a{outline:none;cursor:pointer}[data-watermark] img{max-width:100%}[data-watermark-bottom-left]{bottom:10px;left:10px}[data-watermark-bottom-right]{bottom:10px;right:42px}[data-watermark-top-left]{top:10px;left:10px}[data-watermark-top-right]{top:10px;right:37px}\", \"\"]);\n\t\n\t// exports\n\n\n/***/ },\n/* 90 */\n/*!******************************!*\\\n !*** ./~/hls.js/dist/hls.js ***!\n \\******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar require;var require;(function(f){if(true){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Hls = f()}})(function(){var define,module,exports;return (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 require(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})({1:[function(_dereq_,module,exports){\n\t// Copyright Joyent, Inc. and other Node contributors.\n\t//\n\t// Permission is hereby granted, free of charge, to any person obtaining a\n\t// copy of this software and associated documentation files (the\n\t// \"Software\"), to deal in the Software without restriction, including\n\t// without limitation the rights to use, copy, modify, merge, publish,\n\t// distribute, sublicense, and/or sell copies of the Software, and to permit\n\t// persons to whom the Software is furnished to do so, subject to the\n\t// following conditions:\n\t//\n\t// The above copyright notice and this permission notice shall be included\n\t// in all copies or substantial portions of the Software.\n\t//\n\t// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\t// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n\t// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n\t// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n\t// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n\t// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n\t// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t\n\tfunction EventEmitter() {\n\t this._events = this._events || {};\n\t this._maxListeners = this._maxListeners || undefined;\n\t}\n\tmodule.exports = EventEmitter;\n\t\n\t// Backwards-compat with node 0.10.x\n\tEventEmitter.EventEmitter = EventEmitter;\n\t\n\tEventEmitter.prototype._events = undefined;\n\tEventEmitter.prototype._maxListeners = undefined;\n\t\n\t// By default EventEmitters will print a warning if more than 10 listeners are\n\t// added to it. This is a useful default which helps finding memory leaks.\n\tEventEmitter.defaultMaxListeners = 10;\n\t\n\t// Obviously not all Emitters should be limited to 10. This function allows\n\t// that to be increased. Set to zero for unlimited.\n\tEventEmitter.prototype.setMaxListeners = function(n) {\n\t if (!isNumber(n) || n < 0 || isNaN(n))\n\t throw TypeError('n must be a positive number');\n\t this._maxListeners = n;\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.emit = function(type) {\n\t var er, handler, len, args, i, listeners;\n\t\n\t if (!this._events)\n\t this._events = {};\n\t\n\t // If there is no 'error' event listener then throw.\n\t if (type === 'error') {\n\t if (!this._events.error ||\n\t (isObject(this._events.error) && !this._events.error.length)) {\n\t er = arguments[1];\n\t if (er instanceof Error) {\n\t throw er; // Unhandled 'error' event\n\t }\n\t throw TypeError('Uncaught, unspecified \"error\" event.');\n\t }\n\t }\n\t\n\t handler = this._events[type];\n\t\n\t if (isUndefined(handler))\n\t return false;\n\t\n\t if (isFunction(handler)) {\n\t switch (arguments.length) {\n\t // fast cases\n\t case 1:\n\t handler.call(this);\n\t break;\n\t case 2:\n\t handler.call(this, arguments[1]);\n\t break;\n\t case 3:\n\t handler.call(this, arguments[1], arguments[2]);\n\t break;\n\t // slower\n\t default:\n\t args = Array.prototype.slice.call(arguments, 1);\n\t handler.apply(this, args);\n\t }\n\t } else if (isObject(handler)) {\n\t args = Array.prototype.slice.call(arguments, 1);\n\t listeners = handler.slice();\n\t len = listeners.length;\n\t for (i = 0; i < len; i++)\n\t listeners[i].apply(this, args);\n\t }\n\t\n\t return true;\n\t};\n\t\n\tEventEmitter.prototype.addListener = function(type, listener) {\n\t var m;\n\t\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t if (!this._events)\n\t this._events = {};\n\t\n\t // To avoid recursion in the case that type === \"newListener\"! Before\n\t // adding it to the listeners, first emit \"newListener\".\n\t if (this._events.newListener)\n\t this.emit('newListener', type,\n\t isFunction(listener.listener) ?\n\t listener.listener : listener);\n\t\n\t if (!this._events[type])\n\t // Optimize the case of one listener. Don't need the extra array object.\n\t this._events[type] = listener;\n\t else if (isObject(this._events[type]))\n\t // If we've already got an array, just append.\n\t this._events[type].push(listener);\n\t else\n\t // Adding the second element, need to change to array.\n\t this._events[type] = [this._events[type], listener];\n\t\n\t // Check for listener leak\n\t if (isObject(this._events[type]) && !this._events[type].warned) {\n\t if (!isUndefined(this._maxListeners)) {\n\t m = this._maxListeners;\n\t } else {\n\t m = EventEmitter.defaultMaxListeners;\n\t }\n\t\n\t if (m && m > 0 && this._events[type].length > m) {\n\t this._events[type].warned = true;\n\t console.error('(node) warning: possible EventEmitter memory ' +\n\t 'leak detected. %d listeners added. ' +\n\t 'Use emitter.setMaxListeners() to increase limit.',\n\t this._events[type].length);\n\t if (typeof console.trace === 'function') {\n\t // not supported in IE 10\n\t console.trace();\n\t }\n\t }\n\t }\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\t\n\tEventEmitter.prototype.once = function(type, listener) {\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t var fired = false;\n\t\n\t function g() {\n\t this.removeListener(type, g);\n\t\n\t if (!fired) {\n\t fired = true;\n\t listener.apply(this, arguments);\n\t }\n\t }\n\t\n\t g.listener = listener;\n\t this.on(type, g);\n\t\n\t return this;\n\t};\n\t\n\t// emits a 'removeListener' event iff the listener was removed\n\tEventEmitter.prototype.removeListener = function(type, listener) {\n\t var list, position, length, i;\n\t\n\t if (!isFunction(listener))\n\t throw TypeError('listener must be a function');\n\t\n\t if (!this._events || !this._events[type])\n\t return this;\n\t\n\t list = this._events[type];\n\t length = list.length;\n\t position = -1;\n\t\n\t if (list === listener ||\n\t (isFunction(list.listener) && list.listener === listener)) {\n\t delete this._events[type];\n\t if (this._events.removeListener)\n\t this.emit('removeListener', type, listener);\n\t\n\t } else if (isObject(list)) {\n\t for (i = length; i-- > 0;) {\n\t if (list[i] === listener ||\n\t (list[i].listener && list[i].listener === listener)) {\n\t position = i;\n\t break;\n\t }\n\t }\n\t\n\t if (position < 0)\n\t return this;\n\t\n\t if (list.length === 1) {\n\t list.length = 0;\n\t delete this._events[type];\n\t } else {\n\t list.splice(position, 1);\n\t }\n\t\n\t if (this._events.removeListener)\n\t this.emit('removeListener', type, listener);\n\t }\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.removeAllListeners = function(type) {\n\t var key, listeners;\n\t\n\t if (!this._events)\n\t return this;\n\t\n\t // not listening for removeListener, no need to emit\n\t if (!this._events.removeListener) {\n\t if (arguments.length === 0)\n\t this._events = {};\n\t else if (this._events[type])\n\t delete this._events[type];\n\t return this;\n\t }\n\t\n\t // emit removeListener for all listeners on all events\n\t if (arguments.length === 0) {\n\t for (key in this._events) {\n\t if (key === 'removeListener') continue;\n\t this.removeAllListeners(key);\n\t }\n\t this.removeAllListeners('removeListener');\n\t this._events = {};\n\t return this;\n\t }\n\t\n\t listeners = this._events[type];\n\t\n\t if (isFunction(listeners)) {\n\t this.removeListener(type, listeners);\n\t } else if (listeners) {\n\t // LIFO order\n\t while (listeners.length)\n\t this.removeListener(type, listeners[listeners.length - 1]);\n\t }\n\t delete this._events[type];\n\t\n\t return this;\n\t};\n\t\n\tEventEmitter.prototype.listeners = function(type) {\n\t var ret;\n\t if (!this._events || !this._events[type])\n\t ret = [];\n\t else if (isFunction(this._events[type]))\n\t ret = [this._events[type]];\n\t else\n\t ret = this._events[type].slice();\n\t return ret;\n\t};\n\t\n\tEventEmitter.prototype.listenerCount = function(type) {\n\t if (this._events) {\n\t var evlistener = this._events[type];\n\t\n\t if (isFunction(evlistener))\n\t return 1;\n\t else if (evlistener)\n\t return evlistener.length;\n\t }\n\t return 0;\n\t};\n\t\n\tEventEmitter.listenerCount = function(emitter, type) {\n\t return emitter.listenerCount(type);\n\t};\n\t\n\tfunction isFunction(arg) {\n\t return typeof arg === 'function';\n\t}\n\t\n\tfunction isNumber(arg) {\n\t return typeof arg === 'number';\n\t}\n\t\n\tfunction isObject(arg) {\n\t return typeof arg === 'object' && arg !== null;\n\t}\n\t\n\tfunction isUndefined(arg) {\n\t return arg === void 0;\n\t}\n\t\n\t},{}],2:[function(_dereq_,module,exports){\n\tvar bundleFn = arguments[3];\n\tvar sources = arguments[4];\n\tvar cache = arguments[5];\n\t\n\tvar stringify = JSON.stringify;\n\t\n\tmodule.exports = function (fn, options) {\n\t var wkey;\n\t var cacheKeys = Object.keys(cache);\n\t\n\t for (var i = 0, l = cacheKeys.length; i < l; i++) {\n\t var key = cacheKeys[i];\n\t var exp = cache[key].exports;\n\t // Using babel as a transpiler to use esmodule, the export will always\n\t // be an object with the default export as a property of it. To ensure\n\t // the existing api and babel esmodule exports are both supported we\n\t // check for both\n\t if (exp === fn || exp && exp.default === fn) {\n\t wkey = key;\n\t break;\n\t }\n\t }\n\t\n\t if (!wkey) {\n\t wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n\t var wcache = {};\n\t for (var i = 0, l = cacheKeys.length; i < l; i++) {\n\t var key = cacheKeys[i];\n\t wcache[key] = key;\n\t }\n\t sources[wkey] = [\n\t Function(['require','module','exports'], '(' + fn + ')(self)'),\n\t wcache\n\t ];\n\t }\n\t var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n\t\n\t var scache = {}; scache[wkey] = wkey;\n\t sources[skey] = [\n\t Function(['require'], (\n\t // try to call default if defined to also support babel esmodule\n\t // exports\n\t 'var f = require(' + stringify(wkey) + ');' +\n\t '(f.default ? f.default : f)(self);'\n\t )),\n\t scache\n\t ];\n\t\n\t var workerSources = {};\n\t resolveSources(skey);\n\t\n\t function resolveSources(key) {\n\t workerSources[key] = true;\n\t\n\t for (var depPath in sources[key][1]) {\n\t var depKey = sources[key][1][depPath];\n\t if (!workerSources[depKey]) {\n\t resolveSources(depKey);\n\t }\n\t }\n\t }\n\t\n\t var src = '(' + bundleFn + ')({'\n\t + Object.keys(workerSources).map(function (key) {\n\t return stringify(key) + ':['\n\t + sources[key][0]\n\t + ',' + stringify(sources[key][1]) + ']'\n\t ;\n\t }).join(',')\n\t + '},{},[' + stringify(skey) + '])'\n\t ;\n\t\n\t var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\t\n\t var blob = new Blob([src], { type: 'text/javascript' });\n\t if (options && options.bare) { return blob; }\n\t var workerUrl = URL.createObjectURL(blob);\n\t var worker = new Worker(workerUrl);\n\t worker.objectURL = workerUrl;\n\t return worker;\n\t};\n\t\n\t},{}],3:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _bufferHelper = _dereq_(28);\n\t\n\tvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _ewmaBandwidthEstimator = _dereq_(8);\n\t\n\tvar _ewmaBandwidthEstimator2 = _interopRequireDefault(_ewmaBandwidthEstimator);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * simple ABR Controller\n\t * - compute next level based on last fragment bw heuristics\n\t * - implement an abandon rules triggered if we have less than 2 frag buffered and if computed bw shows that we risk buffer stalling\n\t */\n\t\n\tvar AbrController = function (_EventHandler) {\n\t _inherits(AbrController, _EventHandler);\n\t\n\t function AbrController(hls) {\n\t _classCallCheck(this, AbrController);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AbrController).call(this, hls, _events2.default.FRAG_LOADING, _events2.default.FRAG_LOADED, _events2.default.FRAG_BUFFERED, _events2.default.ERROR));\n\t\n\t _this.lastLoadedFragLevel = 0;\n\t _this._autoLevelCapping = -1;\n\t _this._nextAutoLevel = -1;\n\t _this.hls = hls;\n\t _this.onCheck = _this.abandonRulesCheck.bind(_this);\n\t return _this;\n\t }\n\t\n\t _createClass(AbrController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.clearTimer();\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onFragLoading',\n\t value: function onFragLoading(data) {\n\t var frag = data.frag;\n\t if (frag.type === 'main') {\n\t if (!this.timer) {\n\t this.timer = setInterval(this.onCheck, 100);\n\t }\n\t // lazy init of bw Estimator, rationale is that we use different params for Live/VoD\n\t // so we need to wait for stream manifest / playlist type to instantiate it.\n\t if (!this.bwEstimator) {\n\t var hls = this.hls,\n\t level = data.frag.level,\n\t isLive = hls.levels[level].details.live,\n\t config = hls.config,\n\t ewmaFast = void 0,\n\t ewmaSlow = void 0;\n\t\n\t if (isLive) {\n\t ewmaFast = config.abrEwmaFastLive;\n\t ewmaSlow = config.abrEwmaSlowLive;\n\t } else {\n\t ewmaFast = config.abrEwmaFastVoD;\n\t ewmaSlow = config.abrEwmaSlowVoD;\n\t }\n\t this.bwEstimator = new _ewmaBandwidthEstimator2.default(hls, ewmaSlow, ewmaFast, config.abrEwmaDefaultEstimate);\n\t }\n\t this.fragCurrent = frag;\n\t }\n\t }\n\t }, {\n\t key: 'abandonRulesCheck',\n\t value: function abandonRulesCheck() {\n\t /*\n\t monitor fragment retrieval time...\n\t we compute expected time of arrival of the complete fragment.\n\t we compare it to expected time of buffer starvation\n\t */\n\t var hls = this.hls,\n\t v = hls.media,\n\t frag = this.fragCurrent,\n\t loader = frag.loader;\n\t\n\t // if loader has been destroyed or loading has been aborted, stop timer and return\n\t if (!loader || loader.stats && loader.stats.aborted) {\n\t _logger.logger.warn('frag loader destroy or aborted, disarm abandonRules');\n\t this.clearTimer();\n\t return;\n\t }\n\t var stats = loader.stats;\n\t /* only monitor frag retrieval time if\n\t (video not paused OR first fragment being loaded(ready state === HAVE_NOTHING = 0)) AND autoswitching enabled AND not lowest level (=> means that we have several levels) */\n\t if (v && (!v.paused && v.playbackRate !== 0 || !v.readyState) && frag.autoLevel && frag.level) {\n\t var requestDelay = performance.now() - stats.trequest,\n\t playbackRate = Math.abs(v.playbackRate);\n\t // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n\t if (requestDelay > 500 * frag.duration / playbackRate) {\n\t var levels = hls.levels,\n\t loadRate = Math.max(1, stats.bw ? stats.bw / 8 : stats.loaded * 1000 / requestDelay),\n\t // byte/s; at least 1 byte/s to avoid division by zero\n\t // compute expected fragment length using frag duration and level bitrate. also ensure that expected len is gte than already loaded size\n\t expectedLen = stats.total ? stats.total : Math.max(stats.loaded, Math.round(frag.duration * levels[frag.level].bitrate / 8)),\n\t pos = v.currentTime,\n\t fragLoadedDelay = (expectedLen - stats.loaded) / loadRate,\n\t bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, hls.config.maxBufferHole).end - pos) / playbackRate;\n\t // consider emergency switch down only if we have less than 2 frag buffered AND\n\t // time to finish loading current fragment is bigger than buffer starvation delay\n\t // ie if we risk buffer starvation if bw does not increase quickly\n\t if (bufferStarvationDelay < 2 * frag.duration / playbackRate && fragLoadedDelay > bufferStarvationDelay) {\n\t var fragLevelNextLoadedDelay = void 0,\n\t nextLoadLevel = void 0;\n\t // lets iterate through lower level and try to find the biggest one that could avoid rebuffering\n\t // we start from current level - 1 and we step down , until we find a matching level\n\t for (nextLoadLevel = frag.level - 1; nextLoadLevel >= 0; nextLoadLevel--) {\n\t // compute time to load next fragment at lower level\n\t // 0.8 : consider only 80% of current bw to be conservative\n\t // 8 = bits per byte (bps/Bps)\n\t fragLevelNextLoadedDelay = frag.duration * levels[nextLoadLevel].bitrate / (8 * 0.8 * loadRate);\n\t if (fragLevelNextLoadedDelay < bufferStarvationDelay) {\n\t // we found a lower level that be rebuffering free with current estimated bw !\n\t break;\n\t }\n\t }\n\t // only emergency switch down if it takes less time to load new fragment at lowest level instead\n\t // of finishing loading current one ...\n\t if (fragLevelNextLoadedDelay < fragLoadedDelay) {\n\t // ensure nextLoadLevel is not negative\n\t nextLoadLevel = Math.max(0, nextLoadLevel);\n\t _logger.logger.warn('loading too slow, abort fragment loading and switch to level ' + nextLoadLevel + ':fragLoadedDelay[' + nextLoadLevel + ']<fragLoadedDelay[' + (frag.level - 1) + '];bufferStarvationDelay:' + fragLevelNextLoadedDelay.toFixed(1) + '<' + fragLoadedDelay.toFixed(1) + ':' + bufferStarvationDelay.toFixed(1));\n\t // force next load level in auto mode\n\t hls.nextLoadLevel = nextLoadLevel;\n\t // update bw estimate for this fragment before cancelling load (this will help reducing the bw)\n\t this.bwEstimator.sample(requestDelay, stats.loaded);\n\t //abort fragment loading\n\t loader.abort();\n\t // stop abandon rules timer\n\t this.clearTimer();\n\t hls.trigger(_events2.default.FRAG_LOAD_EMERGENCY_ABORTED, { frag: frag, stats: stats });\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onFragLoaded',\n\t value: function onFragLoaded(data) {\n\t var frag = data.frag;\n\t if (frag.type === 'main') {\n\t // stop monitoring bw once frag loaded\n\t this.clearTimer();\n\t // store level id after successful fragment load\n\t this.lastLoadedFragLevel = frag.level;\n\t // reset forced auto level value so that next level will be selected\n\t this._nextAutoLevel = -1;\n\t // if fragment has been loaded to perform a bitrate test,\n\t if (data.frag.bitrateTest) {\n\t var stats = data.stats;\n\t stats.tparsed = stats.tbuffered = stats.tload;\n\t this.onFragBuffered(data);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onFragBuffered',\n\t value: function onFragBuffered(data) {\n\t var stats = data.stats,\n\t frag = data.frag;\n\t // only update stats on first frag buffering\n\t // if same frag is loaded multiple times, it might be in browser cache, and loaded quickly\n\t // and leading to wrong bw estimation\n\t // on bitrate test, also only update stats once (if tload = tbuffered == on FRAG_LOADED)\n\t if (stats.aborted !== true && frag.loadCounter === 1 && frag.type === 'main' && (!frag.bitrateTest || stats.tload === stats.tbuffered)) {\n\t var fragLoadingProcessingMs = stats.tbuffered - stats.trequest;\n\t _logger.logger.log('latency/loading/parsing/append/kbps:' + Math.round(stats.tfirst - stats.trequest) + '/' + Math.round(stats.tload - stats.tfirst) + '/' + Math.round(stats.tparsed - stats.tload) + '/' + Math.round(stats.tbuffered - stats.tparsed) + '/' + Math.round(8 * stats.loaded / (stats.tbuffered - stats.trequest)));\n\t this.bwEstimator.sample(fragLoadingProcessingMs, stats.loaded);\n\t // if fragment has been loaded to perform a bitrate test, (hls.startLevel = -1), store bitrate test delay duration\n\t if (frag.bitrateTest) {\n\t this.bitrateTestDelay = fragLoadingProcessingMs / 1000;\n\t } else {\n\t this.bitrateTestDelay = 0;\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onError',\n\t value: function onError(data) {\n\t // stop timer in case of frag loading error\n\t switch (data.details) {\n\t case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n\t case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n\t this.clearTimer();\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }, {\n\t key: 'clearTimer',\n\t value: function clearTimer() {\n\t if (this.timer) {\n\t clearInterval(this.timer);\n\t this.timer = null;\n\t }\n\t }\n\t\n\t /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n\t\n\t }, {\n\t key: 'findBestLevel',\n\t value: function findBestLevel(currentLevel, currentFragDuration, currentBw, minAutoLevel, maxAutoLevel, maxFetchDuration, bwFactor, bwUpFactor, levels) {\n\t for (var i = maxAutoLevel; i >= minAutoLevel; i--) {\n\t var levelInfo = levels[i],\n\t levelDetails = levelInfo.details,\n\t avgDuration = levelDetails ? levelDetails.totalduration / levelDetails.fragments.length : currentFragDuration,\n\t adjustedbw = void 0;\n\t // follow algorithm captured from stagefright :\n\t // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp\n\t // Pick the highest bandwidth stream below or equal to estimated bandwidth.\n\t // consider only 80% of the available bandwidth, but if we are switching up,\n\t // be even more conservative (70%) to avoid overestimating and immediately\n\t // switching back.\n\t if (i <= currentLevel) {\n\t adjustedbw = bwFactor * currentBw;\n\t } else {\n\t adjustedbw = bwUpFactor * currentBw;\n\t }\n\t var bitrate = levels[i].bitrate,\n\t fetchDuration = bitrate * avgDuration / adjustedbw;\n\t\n\t _logger.logger.trace('level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: ' + i + '/' + Math.round(adjustedbw) + '/' + bitrate + '/' + avgDuration + '/' + maxFetchDuration + '/' + fetchDuration);\n\t // if adjusted bw is greater than level bitrate AND\n\t if (adjustedbw > bitrate && (\n\t // fragment fetchDuration unknown or fragment fetchDuration less than max allowed fetch duration, then this level matches\n\t !fetchDuration || fetchDuration < maxFetchDuration)) {\n\t // as we are looping from highest to lowest, this will return the best achievable quality level\n\t\n\t return i;\n\t }\n\t }\n\t // not enough time budget even with quality level 0 ... rebuffering might happen\n\t return -1;\n\t }\n\t }, {\n\t key: 'autoLevelCapping',\n\t get: function get() {\n\t return this._autoLevelCapping;\n\t }\n\t\n\t /** set the capping/max level value that could be used by automatic level selection algorithm **/\n\t ,\n\t set: function set(newLevel) {\n\t this._autoLevelCapping = newLevel;\n\t }\n\t }, {\n\t key: 'nextAutoLevel',\n\t get: function get() {\n\t var nextAutoLevel = this._nextAutoLevel,\n\t bwEstimator = this.bwEstimator,\n\t hls = this.hls,\n\t levels = hls.levels,\n\t minAutoBitrate = hls.config.minAutoBitrate;\n\t // in case next auto level has been forced, and bw not available or not reliable\n\t if (nextAutoLevel !== -1 && (!bwEstimator || !bwEstimator.canEstimate())) {\n\t // cap next auto level by max auto level\n\t return Math.min(nextAutoLevel, this.maxAutoLevel);\n\t }\n\t // compute next level using ABR logic\n\t var nextABRAutoLevel = this.nextABRAutoLevel;\n\t if (nextAutoLevel !== -1) {\n\t // nextAutoLevel is defined, use it to cap ABR computed quality level\n\t nextABRAutoLevel = Math.min(nextAutoLevel, nextABRAutoLevel);\n\t }\n\t if (minAutoBitrate !== undefined) {\n\t while (levels[nextABRAutoLevel].bitrate < minAutoBitrate) {\n\t nextABRAutoLevel++;\n\t }\n\t }\n\t return nextABRAutoLevel;\n\t },\n\t set: function set(nextLevel) {\n\t this._nextAutoLevel = nextLevel;\n\t }\n\t }, {\n\t key: 'minAutoLevel',\n\t get: function get() {\n\t var hls = this.hls,\n\t levels = hls.levels,\n\t minAutoBitrate = hls.config.minAutoBitrate;\n\t for (var i = 0; i < levels.length; i++) {\n\t if (levels[i].bitrate > minAutoBitrate) {\n\t return i;\n\t }\n\t }\n\t return 0;\n\t }\n\t }, {\n\t key: 'maxAutoLevel',\n\t get: function get() {\n\t var levels = this.hls.levels,\n\t autoLevelCapping = this._autoLevelCapping,\n\t maxAutoLevel;\n\t if (autoLevelCapping === -1 && levels && levels.length) {\n\t maxAutoLevel = levels.length - 1;\n\t } else {\n\t maxAutoLevel = autoLevelCapping;\n\t }\n\t return maxAutoLevel;\n\t }\n\t }, {\n\t key: 'nextABRAutoLevel',\n\t get: function get() {\n\t var hls = this.hls,\n\t maxAutoLevel = this.maxAutoLevel,\n\t levels = hls.levels,\n\t config = hls.config,\n\t minAutoLevel = this.minAutoLevel;\n\t var v = hls.media,\n\t currentLevel = this.lastLoadedFragLevel,\n\t currentFragDuration = this.fragCurrent ? this.fragCurrent.duration : 0,\n\t pos = v ? v.currentTime : 0,\n\t\n\t // playbackRate is the absolute value of the playback rate; if v.playbackRate is 0, we use 1 to load as\n\t // if we're playing back at the normal rate.\n\t playbackRate = v && v.playbackRate !== 0 ? Math.abs(v.playbackRate) : 1.0,\n\t avgbw = this.bwEstimator ? this.bwEstimator.getEstimate() : config.abrEwmaDefaultEstimate,\n\t\n\t // bufferStarvationDelay is the wall-clock time left until the playback buffer is exhausted.\n\t bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, config.maxBufferHole).end - pos) / playbackRate;\n\t\n\t // First, look to see if we can find a level matching with our avg bandwidth AND that could also guarantee no rebuffering at all\n\t var bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, config.abrBandWidthFactor, config.abrBandWidthUpFactor, levels);\n\t if (bestLevel >= 0) {\n\t return bestLevel;\n\t } else {\n\t _logger.logger.trace('rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering');\n\t // not possible to get rid of rebuffering ... let's try to find level that will guarantee less than maxStarvationDelay of rebuffering\n\t // if no matching level found, logic will return 0\n\t var maxStarvationDelay = config.maxStarvationDelay,\n\t bwFactor = config.abrBandWidthFactor,\n\t bwUpFactor = config.abrBandWidthUpFactor;\n\t if (bufferStarvationDelay === 0) {\n\t // in case buffer is empty, let's check if previous fragment was loaded to perform a bitrate test\n\t var bitrateTestDelay = this.bitrateTestDelay;\n\t if (bitrateTestDelay) {\n\t // if it is the case, then we need to adjust our max starvation delay using maxLoadingDelay config value\n\t // max video loading delay used in automatic start level selection :\n\t // in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level +\n\t // the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )\n\t maxStarvationDelay = config.maxLoadingDelay - bitrateTestDelay;\n\t _logger.logger.trace('bitrate test took ' + Math.round(1000 * bitrateTestDelay) + 'ms, set first fragment max fetchDuration to ' + Math.round(1000 * maxStarvationDelay) + ' ms');\n\t // don't use conservative factor on bitrate test\n\t bwFactor = bwUpFactor = 1;\n\t }\n\t }\n\t bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay + maxStarvationDelay, bwFactor, bwUpFactor, levels);\n\t return Math.max(bestLevel, 0);\n\t }\n\t }\n\t }]);\n\t\n\t return AbrController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = AbrController;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"43\":43,\"8\":8}],4:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _binarySearch = _dereq_(39);\n\t\n\tvar _binarySearch2 = _interopRequireDefault(_binarySearch);\n\t\n\tvar _bufferHelper = _dereq_(28);\n\t\n\tvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\t\n\tvar _demuxer = _dereq_(20);\n\t\n\tvar _demuxer2 = _interopRequireDefault(_demuxer);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _levelHelper = _dereq_(29);\n\t\n\tvar _levelHelper2 = _interopRequireDefault(_levelHelper);\n\t\n\tvar _timeRanges = _dereq_(45);\n\t\n\tvar _timeRanges2 = _interopRequireDefault(_timeRanges);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Audio Stream Controller\n\t */\n\t\n\tvar State = {\n\t STOPPED: 'STOPPED',\n\t STARTING: 'STARTING',\n\t IDLE: 'IDLE',\n\t PAUSED: 'PAUSED',\n\t KEY_LOADING: 'KEY_LOADING',\n\t FRAG_LOADING: 'FRAG_LOADING',\n\t FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n\t WAITING_TRACK: 'WAITING_TRACK',\n\t PARSING: 'PARSING',\n\t PARSED: 'PARSED',\n\t ENDED: 'ENDED',\n\t ERROR: 'ERROR'\n\t};\n\t\n\tvar AudioStreamController = function (_EventHandler) {\n\t _inherits(AudioStreamController, _EventHandler);\n\t\n\t function AudioStreamController(hls) {\n\t _classCallCheck(this, AudioStreamController);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AudioStreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.AUDIO_TRACKS_UPDATED, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.AUDIO_TRACK_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));\n\t\n\t _this.config = hls.config;\n\t _this.audioCodecSwap = false;\n\t _this.ticks = 0;\n\t _this.ontick = _this.tick.bind(_this);\n\t return _this;\n\t }\n\t\n\t _createClass(AudioStreamController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.stopLoad();\n\t if (this.timer) {\n\t clearInterval(this.timer);\n\t this.timer = null;\n\t }\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t this.state = State.STOPPED;\n\t }\n\t }, {\n\t key: 'startLoad',\n\t value: function startLoad(startPosition) {\n\t if (this.tracks) {\n\t var media = this.media,\n\t lastCurrentTime = this.lastCurrentTime;\n\t this.stopLoad();\n\t if (!this.timer) {\n\t this.timer = setInterval(this.ontick, 100);\n\t }\n\t this.fragLoadError = 0;\n\t if (media && lastCurrentTime) {\n\t _logger.logger.log('configure startPosition @' + lastCurrentTime);\n\t this.state = State.IDLE;\n\t } else {\n\t this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n\t this.state = State.STARTING;\n\t }\n\t this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n\t this.tick();\n\t } else {\n\t this.startPosition = startPosition;\n\t this.state = State.STOPPED;\n\t }\n\t }\n\t }, {\n\t key: 'stopLoad',\n\t value: function stopLoad() {\n\t var frag = this.fragCurrent;\n\t if (frag) {\n\t if (frag.loader) {\n\t frag.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t }\n\t this.fragPrevious = null;\n\t if (this.demuxer) {\n\t this.demuxer.destroy();\n\t this.demuxer = null;\n\t }\n\t this.state = State.STOPPED;\n\t }\n\t }, {\n\t key: 'tick',\n\t value: function tick() {\n\t this.ticks++;\n\t if (this.ticks === 1) {\n\t this.doTick();\n\t if (this.ticks > 1) {\n\t setTimeout(this.tick, 1);\n\t }\n\t this.ticks = 0;\n\t }\n\t }\n\t }, {\n\t key: 'doTick',\n\t value: function doTick() {\n\t var pos,\n\t track,\n\t trackDetails,\n\t hls = this.hls,\n\t config = hls.config;\n\t //logger.log('audioStream:' + this.state);\n\t switch (this.state) {\n\t case State.ERROR:\n\t //don't do anything in error state to avoid breaking further ...\n\t case State.PAUSED:\n\t //don't do anything in paused state either ...\n\t break;\n\t case State.STARTING:\n\t this.state = State.WAITING_TRACK;\n\t this.loadedmetadata = false;\n\t break;\n\t case State.IDLE:\n\t // if video not attached AND\n\t // start fragment already requested OR start frag prefetch disable\n\t // exit loop\n\t // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n\t if (!this.media && (this.startFragRequested || !config.startFragPrefetch)) {\n\t break;\n\t }\n\t // determine next candidate fragment to be loaded, based on current position and\n\t // end of buffer position\n\t // if we have not yet loaded any fragment, start loading from start position\n\t if (this.loadedmetadata) {\n\t pos = this.media.currentTime;\n\t } else {\n\t pos = this.nextLoadPosition;\n\t }\n\t var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n\t var bufferInfo = _bufferHelper2.default.bufferInfo(media, pos, config.maxBufferHole),\n\t bufferLen = bufferInfo.len,\n\t bufferEnd = bufferInfo.end,\n\t fragPrevious = this.fragPrevious,\n\t maxBufLen = config.maxMaxBufferLength;\n\t\n\t // if buffer length is less than maxBufLen try to load a new fragment\n\t if (bufferLen < maxBufLen && this.trackId < this.tracks.length) {\n\t trackDetails = this.tracks[this.trackId].details;\n\t // if track info not retrieved yet, switch state and wait for track retrieval\n\t if (typeof trackDetails === 'undefined') {\n\t this.state = State.WAITING_TRACK;\n\t break;\n\t }\n\t\n\t // we just got done loading the final fragment, check if we need to finalize media stream\n\t if (!trackDetails.live && fragPrevious && fragPrevious.sn === trackDetails.endSN) {\n\t // if we are not seeking or if we are seeking but everything (almost) til the end is buffered, let's signal eos\n\t // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching\n\t // between different renditions. using half frag duration should help cope with these cases.\n\t if (!this.media.seeking || this.media.duration - bufferEnd < fragPrevious.duration / 2) {\n\t // Finalize the media stream\n\t this.hls.trigger(_events2.default.BUFFER_EOS, { type: 'audio' });\n\t this.state = State.ENDED;\n\t break;\n\t }\n\t }\n\t\n\t // find fragment index, contiguous with end of buffer position\n\t var fragments = trackDetails.fragments,\n\t fragLen = fragments.length,\n\t start = fragments[0].start,\n\t end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n\t frag = void 0;\n\t\n\t // if bufferEnd before start of playlist, load first fragment\n\t if (bufferEnd < start) {\n\t frag = fragments[0];\n\t } else {\n\t (function () {\n\t var foundFrag = void 0;\n\t var maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n\t if (bufferEnd < end) {\n\t if (bufferEnd > end - maxFragLookUpTolerance) {\n\t maxFragLookUpTolerance = 0;\n\t }\n\t foundFrag = _binarySearch2.default.search(fragments, function (candidate) {\n\t // offset should be within fragment boundary - config.maxFragLookUpTolerance\n\t // this is to cope with situations like\n\t // bufferEnd = 9.991\n\t // frag[Ø] : [0,10]\n\t // frag[1] : [10,20]\n\t // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n\t // frag start frag start+duration\n\t // |-----------------------------|\n\t // <---> <--->\n\t // ...--------><-----------------------------><---------....\n\t // previous frag matching fragment next frag\n\t // return -1 return 0 return 1\n\t //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n\t if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {\n\t return 1;\n\t } else if (candidate.start - maxFragLookUpTolerance > bufferEnd) {\n\t return -1;\n\t }\n\t return 0;\n\t });\n\t } else {\n\t // reach end of playlist\n\t foundFrag = fragments[fragLen - 1];\n\t }\n\t if (foundFrag) {\n\t frag = foundFrag;\n\t start = foundFrag.start;\n\t //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n\t if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n\t if (frag.sn < trackDetails.endSN) {\n\t frag = fragments[frag.sn + 1 - trackDetails.startSN];\n\t _logger.logger.log('SN just loaded, load next one: ' + frag.sn);\n\t } else {\n\t frag = null;\n\t }\n\t }\n\t }\n\t })();\n\t }\n\t if (frag) {\n\t //logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n\t if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {\n\t _logger.logger.log('Loading key for ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId);\n\t this.state = State.KEY_LOADING;\n\t hls.trigger(_events2.default.KEY_LOADING, { frag: frag });\n\t } else {\n\t _logger.logger.log('Loading ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId + ', currentTime:' + pos + ',bufferEnd:' + bufferEnd.toFixed(3));\n\t // ensure that we are not reloading the same fragments in loop ...\n\t if (this.fragLoadIdx !== undefined) {\n\t this.fragLoadIdx++;\n\t } else {\n\t this.fragLoadIdx = 0;\n\t }\n\t if (frag.loadCounter) {\n\t frag.loadCounter++;\n\t var maxThreshold = config.fragLoadingLoopThreshold;\n\t // if this frag has already been loaded 3 times, and if it has been reloaded recently\n\t if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });\n\t return;\n\t }\n\t } else {\n\t frag.loadCounter = 1;\n\t }\n\t frag.loadIdx = this.fragLoadIdx;\n\t this.fragCurrent = frag;\n\t this.startFragRequested = true;\n\t hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });\n\t this.state = State.FRAG_LOADING;\n\t }\n\t }\n\t }\n\t break;\n\t case State.WAITING_TRACK:\n\t track = this.tracks[this.trackId];\n\t // check if playlist is already loaded\n\t if (track && track.details) {\n\t this.state = State.IDLE;\n\t }\n\t break;\n\t case State.FRAG_LOADING_WAITING_RETRY:\n\t var now = performance.now();\n\t var retryDate = this.retryDate;\n\t media = this.media;\n\t var isSeeking = media && media.seeking;\n\t // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n\t if (!retryDate || now >= retryDate || isSeeking) {\n\t _logger.logger.log('audioStreamController: retryDate reached, switch back to IDLE state');\n\t this.state = State.IDLE;\n\t }\n\t break;\n\t case State.STOPPED:\n\t case State.FRAG_LOADING:\n\t case State.PARSING:\n\t case State.PARSED:\n\t case State.ENDED:\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }, {\n\t key: 'onMediaAttached',\n\t value: function onMediaAttached(data) {\n\t var media = this.media = this.mediaBuffer = data.media;\n\t this.onvseeking = this.onMediaSeeking.bind(this);\n\t this.onvended = this.onMediaEnded.bind(this);\n\t media.addEventListener('seeking', this.onvseeking);\n\t media.addEventListener('ended', this.onvended);\n\t var config = this.config;\n\t if (this.tracks && config.autoStartLoad) {\n\t this.startLoad(config.startPosition);\n\t }\n\t }\n\t }, {\n\t key: 'onMediaDetaching',\n\t value: function onMediaDetaching() {\n\t var media = this.media;\n\t if (media && media.ended) {\n\t _logger.logger.log('MSE detaching and video ended, reset startPosition');\n\t this.startPosition = this.lastCurrentTime = 0;\n\t }\n\t\n\t // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n\t var tracks = this.tracks;\n\t if (tracks) {\n\t // reset fragment load counter\n\t tracks.forEach(function (track) {\n\t if (track.details) {\n\t track.details.fragments.forEach(function (fragment) {\n\t fragment.loadCounter = undefined;\n\t });\n\t }\n\t });\n\t }\n\t // remove video listeners\n\t if (media) {\n\t media.removeEventListener('seeking', this.onvseeking);\n\t media.removeEventListener('ended', this.onvended);\n\t this.onvseeking = this.onvseeked = this.onvended = null;\n\t }\n\t this.media = null;\n\t this.loadedmetadata = false;\n\t this.stopLoad();\n\t }\n\t }, {\n\t key: 'onMediaSeeking',\n\t value: function onMediaSeeking() {\n\t if (this.state === State.ENDED) {\n\t // switch to IDLE state to check for potential new fragment\n\t this.state = State.IDLE;\n\t }\n\t if (this.media) {\n\t this.lastCurrentTime = this.media.currentTime;\n\t }\n\t // avoid reporting fragment loop loading error in case user is seeking several times on same position\n\t if (this.fragLoadIdx !== undefined) {\n\t this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n\t }\n\t // tick to speed up processing\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onMediaEnded',\n\t value: function onMediaEnded() {\n\t // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n\t this.startPosition = this.lastCurrentTime = 0;\n\t }\n\t }, {\n\t key: 'onAudioTracksUpdated',\n\t value: function onAudioTracksUpdated(data) {\n\t _logger.logger.log('audio tracks updated');\n\t this.tracks = data.audioTracks;\n\t }\n\t }, {\n\t key: 'onAudioTrackSwitch',\n\t value: function onAudioTrackSwitch(data) {\n\t // if any URL found on new audio track, it is an alternate audio track\n\t var altAudio = !!data.url;\n\t this.trackId = data.id;\n\t this.state = State.IDLE;\n\t\n\t this.fragCurrent = null;\n\t this.state = State.PAUSED;\n\t // destroy useless demuxer when switching audio to main\n\t if (!altAudio) {\n\t if (this.demuxer) {\n\t this.demuxer.destroy();\n\t this.demuxer = null;\n\t }\n\t } else {\n\t // switching to audio track, start timer if not already started\n\t if (!this.timer) {\n\t this.timer = setInterval(this.ontick, 100);\n\t }\n\t }\n\t // flush audio source buffer\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onAudioTrackLoaded',\n\t value: function onAudioTrackLoaded(data) {\n\t var details = data.details,\n\t trackId = data.id,\n\t track = this.tracks[trackId],\n\t duration = details.totalduration;\n\t\n\t _logger.logger.log('track ' + trackId + ' loaded [' + details.startSN + ',' + details.endSN + '],duration:' + duration);\n\t details.PTSKnown = false;\n\t track.details = details;\n\t\n\t // compute start position\n\t if (!this.startFragRequested) {\n\t // compute start position if set to -1. use it straight away if value is defined\n\t if (this.startPosition === -1) {\n\t // first, check if start time offset has been set in playlist, if yes, use this value\n\t var startTimeOffset = details.startTimeOffset;\n\t if (!isNaN(startTimeOffset)) {\n\t _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);\n\t this.startPosition = startTimeOffset;\n\t } else {\n\t this.startPosition = 0;\n\t }\n\t }\n\t this.nextLoadPosition = this.startPosition;\n\t }\n\t // only switch batck to IDLE state if we were waiting for track to start downloading a new fragment\n\t if (this.state === State.WAITING_TRACK) {\n\t this.state = State.IDLE;\n\t }\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onKeyLoaded',\n\t value: function onKeyLoaded() {\n\t if (this.state === State.KEY_LOADING) {\n\t this.state = State.IDLE;\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onFragLoaded',\n\t value: function onFragLoaded(data) {\n\t var fragCurrent = this.fragCurrent;\n\t if (this.state === State.FRAG_LOADING && fragCurrent && data.frag.type === 'audio' && data.frag.level === fragCurrent.level && data.frag.sn === fragCurrent.sn) {\n\t this.state = State.PARSING;\n\t // transmux the MPEG-TS data to ISO-BMFF segments\n\t this.stats = data.stats;\n\t var track = this.tracks[this.trackId],\n\t details = track.details,\n\t duration = details.totalduration,\n\t start = fragCurrent.start,\n\t trackId = fragCurrent.level,\n\t sn = fragCurrent.sn,\n\t audioCodec = this.config.defaultAudioCodec || track.audioCodec;\n\t this.pendingAppending = 0;\n\t if (!this.demuxer) {\n\t this.demuxer = new _demuxer2.default(this.hls, 'audio');\n\t }\n\t _logger.logger.log('Demuxing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],track ' + trackId);\n\t // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n\t var accurateTimeOffset = details.PTSKnown || !details.live;\n\t this.demuxer.push(data.payload, audioCodec, null, start, fragCurrent.cc, trackId, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);\n\t }\n\t this.fragLoadError = 0;\n\t }\n\t }, {\n\t key: 'onFragParsingInitSegment',\n\t value: function onFragParsingInitSegment(data) {\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n\t var tracks = data.tracks,\n\t track = void 0;\n\t\n\t // include levelCodec in audio and video tracks\n\t track = tracks.audio;\n\t if (track) {\n\t track.levelCodec = 'mp4a.40.2';\n\t track.id = data.id;\n\t this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);\n\t _logger.logger.log('audio track:audio,container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');\n\t var initSegment = track.initSegment;\n\t if (initSegment) {\n\t this.pendingAppending++;\n\t this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: 'audio', data: initSegment, parent: 'audio', content: 'initSegment' });\n\t }\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onFragParsingData',\n\t value: function onFragParsingData(data) {\n\t var _this2 = this;\n\t\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n\t var track = this.tracks[this.trackId],\n\t frag = this.fragCurrent;\n\t\n\t _logger.logger.log('parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb);\n\t _levelHelper2.default.updateFragPTSDTS(track.details, frag.sn, data.startPTS, data.endPTS);\n\t\n\t [data.data1, data.data2].forEach(function (buffer) {\n\t if (buffer) {\n\t _this2.pendingAppending++;\n\t _this2.hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'audio', content: 'data' });\n\t }\n\t });\n\t this.nextLoadPosition = data.endPTS;\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onFragParsed',\n\t value: function onFragParsed(data) {\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n\t this.stats.tparsed = performance.now();\n\t this.state = State.PARSED;\n\t this._checkAppendedParsed();\n\t }\n\t }\n\t }, {\n\t key: 'onBufferCreated',\n\t value: function onBufferCreated(data) {\n\t var audioTrack = data.tracks.audio;\n\t if (audioTrack) {\n\t this.mediaBuffer = audioTrack.buffer;\n\t this.loadedmetadata = true;\n\t }\n\t }\n\t }, {\n\t key: 'onBufferAppended',\n\t value: function onBufferAppended(data) {\n\t if (data.parent === 'audio') {\n\t switch (this.state) {\n\t case State.PARSING:\n\t case State.PARSED:\n\t this.pendingAppending--;\n\t this._checkAppendedParsed();\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }\n\t }, {\n\t key: '_checkAppendedParsed',\n\t value: function _checkAppendedParsed() {\n\t //trigger handler right now\n\t if (this.state === State.PARSED && this.pendingAppending === 0) {\n\t var frag = this.fragCurrent,\n\t stats = this.stats;\n\t if (frag) {\n\t this.fragPrevious = frag;\n\t stats.tbuffered = performance.now();\n\t this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'audio' });\n\t var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n\t _logger.logger.log('audio buffered : ' + _timeRanges2.default.toString(media.buffered));\n\t this.state = State.IDLE;\n\t }\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onError',\n\t value: function onError(data) {\n\t var frag = data.frag;\n\t // don't handle frag error not related to audio fragment\n\t if (frag && frag.type !== 'audio') {\n\t return;\n\t }\n\t switch (data.details) {\n\t case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n\t case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n\t if (!data.fatal) {\n\t var loadError = this.fragLoadError;\n\t if (loadError) {\n\t loadError++;\n\t } else {\n\t loadError = 1;\n\t }\n\t var config = this.config;\n\t if (loadError <= config.fragLoadingMaxRetry) {\n\t this.fragLoadError = loadError;\n\t // reset load counter to avoid frag loop loading error\n\t frag.loadCounter = 0;\n\t // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n\t var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n\t _logger.logger.warn('audioStreamController: frag loading failed, retry in ' + delay + ' ms');\n\t this.retryDate = performance.now() + delay;\n\t // retry loading state\n\t this.state = State.FRAG_LOADING_WAITING_RETRY;\n\t } else {\n\t _logger.logger.error('audioStreamController: ' + data.details + ' reaches max retry, redispatch as fatal ...');\n\t // redispatch same error but with fatal set to true\n\t data.fatal = true;\n\t this.hls.trigger(_events2.default.ERROR, data);\n\t this.state = State.ERROR;\n\t }\n\t }\n\t break;\n\t case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n\t case _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:\n\t case _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:\n\t case _errors.ErrorDetails.KEY_LOAD_ERROR:\n\t case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n\t // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n\t if (this.state !== State.ERROR) {\n\t // if fatal error, stop processing, otherwise move to IDLE to retry loading\n\t this.state = data.fatal ? State.ERROR : State.IDLE;\n\t _logger.logger.warn('audioStreamController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');\n\t }\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }, {\n\t key: 'onBufferFlushed',\n\t value: function onBufferFlushed() {\n\t // increase fragment load Index to avoid frag loop loading error after buffer flush\n\t this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n\t // move to IDLE once flush complete. this should trigger new fragment loading\n\t this.state = State.IDLE;\n\t // reset reference to frag\n\t this.fragPrevious = null;\n\t this.tick();\n\t }\n\t }]);\n\t\n\t return AudioStreamController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = AudioStreamController;\n\t\n\t},{\"20\":20,\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"29\":29,\"39\":39,\"43\":43,\"45\":45}],5:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * audio track controller\n\t */\n\t\n\tvar AudioTrackController = function (_EventHandler) {\n\t _inherits(AudioTrackController, _EventHandler);\n\t\n\t function AudioTrackController(hls) {\n\t _classCallCheck(this, AudioTrackController);\n\t\n\t return _possibleConstructorReturn(this, Object.getPrototypeOf(AudioTrackController).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_LOADED, _events2.default.AUDIO_TRACK_LOADED));\n\t }\n\t\n\t _createClass(AudioTrackController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onManifestLoading',\n\t value: function onManifestLoading() {\n\t // reset audio tracks on manifest loading\n\t this.tracks = [];\n\t this.trackId = -1;\n\t }\n\t }, {\n\t key: 'onManifestLoaded',\n\t value: function onManifestLoaded(data) {\n\t var _this2 = this;\n\t\n\t var tracks = data.audioTracks || [];\n\t var defaultFound = false;\n\t this.tracks = tracks;\n\t this.hls.trigger(_events2.default.AUDIO_TRACKS_UPDATED, { audioTracks: tracks });\n\t // loop through available audio tracks and autoselect default if needed\n\t var id = 0;\n\t tracks.forEach(function (track) {\n\t if (track.default) {\n\t _this2.audioTrack = id;\n\t defaultFound = true;\n\t return;\n\t }\n\t id++;\n\t });\n\t if (defaultFound === false && tracks.length) {\n\t _logger.logger.log('no default audio track defined, use first audio track as default');\n\t this.audioTrack = 0;\n\t }\n\t }\n\t }, {\n\t key: 'onAudioTrackLoaded',\n\t value: function onAudioTrackLoaded(data) {\n\t if (data.id < this.tracks.length) {\n\t _logger.logger.log('audioTrack ' + data.id + ' loaded');\n\t this.tracks[data.id].details = data.details;\n\t // check if current playlist is a live playlist\n\t if (data.details.live && !this.timer) {\n\t // if live playlist we will have to reload it periodically\n\t // set reload period to playlist target duration\n\t this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);\n\t }\n\t if (!data.details.live && this.timer) {\n\t // playlist is not live and timer is armed : stopping it\n\t clearInterval(this.timer);\n\t this.timer = null;\n\t }\n\t }\n\t }\n\t\n\t /** get alternate audio tracks list from playlist **/\n\t\n\t }, {\n\t key: 'setAudioTrackInternal',\n\t value: function setAudioTrackInternal(newId) {\n\t // check if level idx is valid\n\t if (newId >= 0 && newId < this.tracks.length) {\n\t // stopping live reloading timer if any\n\t if (this.timer) {\n\t clearInterval(this.timer);\n\t this.timer = null;\n\t }\n\t this.trackId = newId;\n\t _logger.logger.log('switching to audioTrack ' + newId);\n\t var audioTrack = this.tracks[newId],\n\t type = audioTrack.type,\n\t url = audioTrack.url;\n\t this.hls.trigger(_events2.default.AUDIO_TRACK_SWITCH, { id: newId, type: type, url: url });\n\t // check if we need to load playlist for this audio Track\n\t var details = audioTrack.details;\n\t if (url && (details === undefined || details.live === true)) {\n\t // track not retrieved yet, or live playlist we need to (re)load it\n\t _logger.logger.log('(re)loading playlist for audioTrack ' + newId);\n\t this.hls.trigger(_events2.default.AUDIO_TRACK_LOADING, { url: url, id: newId });\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'audioTracks',\n\t get: function get() {\n\t return this.tracks;\n\t }\n\t\n\t /** get index of the selected audio track (index in audio track lists) **/\n\t\n\t }, {\n\t key: 'audioTrack',\n\t get: function get() {\n\t return this.trackId;\n\t }\n\t\n\t /** select an audio track, based on its index in audio track lists**/\n\t ,\n\t set: function set(audioTrackId) {\n\t if (this.trackId !== audioTrackId || this.tracks[audioTrackId].details === undefined) {\n\t this.setAudioTrackInternal(audioTrackId);\n\t }\n\t }\n\t }]);\n\t\n\t return AudioTrackController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = AudioTrackController;\n\t\n\t},{\"25\":25,\"26\":26,\"43\":43}],6:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Buffer Controller\n\t */\n\t\n\tvar BufferController = function (_EventHandler) {\n\t _inherits(BufferController, _EventHandler);\n\t\n\t function BufferController(hls) {\n\t _classCallCheck(this, BufferController);\n\t\n\t // the value that we have set mediasource.duration to\n\t // (the actual duration may be tweaked slighly by the browser)\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(BufferController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_PARSED, _events2.default.BUFFER_RESET, _events2.default.BUFFER_APPENDING, _events2.default.BUFFER_CODECS, _events2.default.BUFFER_EOS, _events2.default.BUFFER_FLUSHING, _events2.default.LEVEL_UPDATED));\n\t\n\t _this._msDuration = null;\n\t // the value that we want to set mediaSource.duration to\n\t _this._levelDuration = null;\n\t\n\t // Source Buffer listeners\n\t _this.onsbue = _this.onSBUpdateEnd.bind(_this);\n\t _this.onsbe = _this.onSBUpdateError.bind(_this);\n\t _this.pendingTracks = {};\n\t return _this;\n\t }\n\t\n\t _createClass(BufferController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onManifestParsed',\n\t value: function onManifestParsed(data) {\n\t var audioExpected = data.audio,\n\t videoExpected = data.video,\n\t sourceBufferNb = 0;\n\t // in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller\n\t // sourcebuffers will be created all at once when the expected nb of tracks will be reached\n\t // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller\n\t // it will contain the expected nb of source buffers, no need to compute it\n\t if (data.altAudio && (audioExpected || videoExpected)) {\n\t sourceBufferNb = (audioExpected ? 1 : 0) + (videoExpected ? 1 : 0);\n\t _logger.logger.log(sourceBufferNb + ' sourceBuffer(s) expected');\n\t }\n\t this.sourceBufferNb = sourceBufferNb;\n\t }\n\t }, {\n\t key: 'onMediaAttaching',\n\t value: function onMediaAttaching(data) {\n\t var media = this.media = data.media;\n\t if (media) {\n\t // setup the media source\n\t var ms = this.mediaSource = new MediaSource();\n\t //Media Source listeners\n\t this.onmso = this.onMediaSourceOpen.bind(this);\n\t this.onmse = this.onMediaSourceEnded.bind(this);\n\t this.onmsc = this.onMediaSourceClose.bind(this);\n\t ms.addEventListener('sourceopen', this.onmso);\n\t ms.addEventListener('sourceended', this.onmse);\n\t ms.addEventListener('sourceclose', this.onmsc);\n\t // link video and media Source\n\t media.src = URL.createObjectURL(ms);\n\t }\n\t }\n\t }, {\n\t key: 'onMediaDetaching',\n\t value: function onMediaDetaching() {\n\t _logger.logger.log('media source detaching');\n\t var ms = this.mediaSource;\n\t if (ms) {\n\t if (ms.readyState === 'open') {\n\t try {\n\t // endOfStream could trigger exception if any sourcebuffer is in updating state\n\t // we don't really care about checking sourcebuffer state here,\n\t // as we are anyway detaching the MediaSource\n\t // let's just avoid this exception to propagate\n\t ms.endOfStream();\n\t } catch (err) {\n\t _logger.logger.warn('onMediaDetaching:' + err.message + ' while calling endOfStream');\n\t }\n\t }\n\t ms.removeEventListener('sourceopen', this.onmso);\n\t ms.removeEventListener('sourceended', this.onmse);\n\t ms.removeEventListener('sourceclose', this.onmsc);\n\t\n\t // Detach properly the MediaSource from the HTMLMediaElement as\n\t // suggested in https://github.com/w3c/media-source/issues/53.\n\t if (this.media) {\n\t this.media.removeAttribute('src');\n\t this.media.load();\n\t }\n\t\n\t this.mediaSource = null;\n\t this.media = null;\n\t this.pendingTracks = {};\n\t this.sourceBuffer = {};\n\t this.flushRange = [];\n\t this.segments = [];\n\t this.appended = 0;\n\t }\n\t this.onmso = this.onmse = this.onmsc = null;\n\t this.hls.trigger(_events2.default.MEDIA_DETACHED);\n\t }\n\t }, {\n\t key: 'onMediaSourceOpen',\n\t value: function onMediaSourceOpen() {\n\t _logger.logger.log('media source opened');\n\t this.hls.trigger(_events2.default.MEDIA_ATTACHED, { media: this.media });\n\t var mediaSource = this.mediaSource;\n\t if (mediaSource) {\n\t // once received, don't listen anymore to sourceopen event\n\t mediaSource.removeEventListener('sourceopen', this.onmso);\n\t }\n\t this.checkPendingTracks();\n\t }\n\t }, {\n\t key: 'checkPendingTracks',\n\t value: function checkPendingTracks() {\n\t // if any buffer codecs pending, check if we have enough to create sourceBuffers\n\t var pendingTracks = this.pendingTracks,\n\t pendingTracksNb = Object.keys(pendingTracks).length;\n\t // if any pending tracks and (if nb of pending tracks gt or equal than expected nb or if unknown expected nb)\n\t if (pendingTracksNb && (this.sourceBufferNb <= pendingTracksNb || this.sourceBufferNb === 0)) {\n\t // ok, let's create them now !\n\t this.createSourceBuffers(pendingTracks);\n\t this.pendingTracks = {};\n\t // append any pending segments now !\n\t this.doAppending();\n\t }\n\t }\n\t }, {\n\t key: 'onMediaSourceClose',\n\t value: function onMediaSourceClose() {\n\t _logger.logger.log('media source closed');\n\t }\n\t }, {\n\t key: 'onMediaSourceEnded',\n\t value: function onMediaSourceEnded() {\n\t _logger.logger.log('media source ended');\n\t }\n\t }, {\n\t key: 'onSBUpdateEnd',\n\t value: function onSBUpdateEnd() {\n\t\n\t if (this._needsFlush) {\n\t this.doFlush();\n\t }\n\t\n\t if (this._needsEos) {\n\t this.checkEos();\n\t }\n\t this.appending = false;\n\t this.hls.trigger(_events2.default.BUFFER_APPENDED, { parent: this.parent });\n\t\n\t // don't append in flushing mode\n\t if (!this._needsFlush) {\n\t this.doAppending();\n\t }\n\t\n\t this.updateMediaElementDuration();\n\t }\n\t }, {\n\t key: 'onSBUpdateError',\n\t value: function onSBUpdateError(event) {\n\t _logger.logger.error('sourceBuffer error:' + event);\n\t // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n\t // this error might not always be fatal (it is fatal if decode error is set, in that case\n\t // it will be followed by a mediaElement error ...)\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });\n\t // we don't need to do more than that, as accordin to the spec, updateend will be fired just after\n\t }\n\t }, {\n\t key: 'onBufferReset',\n\t value: function onBufferReset() {\n\t var sourceBuffer = this.sourceBuffer;\n\t for (var type in sourceBuffer) {\n\t var sb = sourceBuffer[type];\n\t try {\n\t this.mediaSource.removeSourceBuffer(sb);\n\t sb.removeEventListener('updateend', this.onsbue);\n\t sb.removeEventListener('error', this.onsbe);\n\t } catch (err) {}\n\t }\n\t this.sourceBuffer = {};\n\t this.flushRange = [];\n\t this.segments = [];\n\t this.appended = 0;\n\t }\n\t }, {\n\t key: 'onBufferCodecs',\n\t value: function onBufferCodecs(tracks) {\n\t // if source buffer(s) not created yet, appended buffer tracks in this.pendingTracks\n\t // if sourcebuffers already created, do nothing ...\n\t if (Object.keys(this.sourceBuffer).length === 0) {\n\t for (var trackName in tracks) {\n\t this.pendingTracks[trackName] = tracks[trackName];\n\t }\n\t var mediaSource = this.mediaSource;\n\t if (mediaSource && mediaSource.readyState === 'open') {\n\t // try to create sourcebuffers if mediasource opened\n\t this.checkPendingTracks();\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'createSourceBuffers',\n\t value: function createSourceBuffers(tracks) {\n\t var sourceBuffer = this.sourceBuffer,\n\t mediaSource = this.mediaSource;\n\t\n\t for (var trackName in tracks) {\n\t if (!sourceBuffer[trackName]) {\n\t var track = tracks[trackName];\n\t // use levelCodec as first priority\n\t var codec = track.levelCodec || track.codec;\n\t var mimeType = track.container + ';codecs=' + codec;\n\t _logger.logger.log('creating sourceBuffer(' + mimeType + ')');\n\t try {\n\t var sb = sourceBuffer[trackName] = mediaSource.addSourceBuffer(mimeType);\n\t sb.addEventListener('updateend', this.onsbue);\n\t sb.addEventListener('error', this.onsbe);\n\t track.buffer = sb;\n\t } catch (err) {\n\t _logger.logger.error('error while trying to add sourceBuffer:' + err.message);\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_ADD_CODEC_ERROR, fatal: false, err: err, mimeType: mimeType });\n\t }\n\t }\n\t }\n\t this.hls.trigger(_events2.default.BUFFER_CREATED, { tracks: tracks });\n\t }\n\t }, {\n\t key: 'onBufferAppending',\n\t value: function onBufferAppending(data) {\n\t if (!this._needsFlush) {\n\t if (!this.segments) {\n\t this.segments = [data];\n\t } else {\n\t this.segments.push(data);\n\t }\n\t this.doAppending();\n\t }\n\t }\n\t }, {\n\t key: 'onBufferAppendFail',\n\t value: function onBufferAppendFail(data) {\n\t _logger.logger.error('sourceBuffer error:' + data.event);\n\t // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n\t // this error might not always be fatal (it is fatal if decode error is set, in that case\n\t // it will be followed by a mediaElement error ...)\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false, frag: this.fragCurrent });\n\t }\n\t\n\t // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()\n\t\n\t }, {\n\t key: 'onBufferEos',\n\t value: function onBufferEos(data) {\n\t var sb = this.sourceBuffer;\n\t var dataType = data.type;\n\t for (var type in sb) {\n\t if (!dataType || type === dataType) {\n\t if (!sb[type].ended) {\n\t sb[type].ended = true;\n\t _logger.logger.log(type + ' sourceBuffer now EOS');\n\t }\n\t }\n\t }\n\t this.checkEos();\n\t }\n\t\n\t // if all source buffers are marked as ended, signal endOfStream() to MediaSource.\n\t\n\t }, {\n\t key: 'checkEos',\n\t value: function checkEos() {\n\t var sb = this.sourceBuffer,\n\t mediaSource = this.mediaSource;\n\t if (!mediaSource || mediaSource.readyState !== 'open') {\n\t this._needsEos = false;\n\t return;\n\t }\n\t for (var type in sb) {\n\t if (!sb[type].ended) {\n\t return;\n\t }\n\t if (sb[type].updating) {\n\t this._needsEos = true;\n\t return;\n\t }\n\t }\n\t _logger.logger.log('all media data available, signal endOfStream() to MediaSource and stop loading fragment');\n\t //Notify the media element that it now has all of the media data\n\t mediaSource.endOfStream();\n\t this._needsEos = false;\n\t }\n\t }, {\n\t key: 'onBufferFlushing',\n\t value: function onBufferFlushing(data) {\n\t this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: data.type });\n\t // attempt flush immediatly\n\t this.flushBufferCounter = 0;\n\t this.doFlush();\n\t }\n\t }, {\n\t key: 'onLevelUpdated',\n\t value: function onLevelUpdated(event) {\n\t var details = event.details;\n\t if (details.fragments.length === 0) {\n\t return;\n\t }\n\t this._levelDuration = details.totalduration + details.fragments[0].start;\n\t this.updateMediaElementDuration();\n\t }\n\t\n\t // https://github.com/dailymotion/hls.js/issues/355\n\t\n\t }, {\n\t key: 'updateMediaElementDuration',\n\t value: function updateMediaElementDuration() {\n\t if (this._levelDuration === null) {\n\t return;\n\t }\n\t var media = this.media,\n\t mediaSource = this.mediaSource,\n\t sourceBuffer = this.sourceBuffer;\n\t if (!media || !mediaSource || !sourceBuffer || media.readyState === 0 || mediaSource.readyState !== 'open') {\n\t return;\n\t }\n\t for (var type in sourceBuffer) {\n\t if (sourceBuffer[type].updating) {\n\t // can't set duration whilst a buffer is updating\n\t return;\n\t }\n\t }\n\t if (this._msDuration === null) {\n\t // initialise to the value that the media source is reporting\n\t this._msDuration = mediaSource.duration;\n\t }\n\t // this._levelDuration was the last value we set.\n\t // not using mediaSource.duration as the browser may tweak this value\n\t // only update mediasource duration if its value increase, this is to avoid\n\t // flushing already buffered portion when switching between quality level, as they\n\t if (this._levelDuration > this._msDuration) {\n\t _logger.logger.log('Updating mediasource duration to ' + this._levelDuration);\n\t mediaSource.duration = this._levelDuration;\n\t this._msDuration = this._levelDuration;\n\t }\n\t }\n\t }, {\n\t key: 'doFlush',\n\t value: function doFlush() {\n\t // loop through all buffer ranges to flush\n\t while (this.flushRange.length) {\n\t var range = this.flushRange[0];\n\t // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n\t if (this.flushBuffer(range.start, range.end, range.type)) {\n\t // range flushed, remove from flush array\n\t this.flushRange.shift();\n\t this.flushBufferCounter = 0;\n\t } else {\n\t this._needsFlush = true;\n\t // avoid looping, wait for SB update end to retrigger a flush\n\t return;\n\t }\n\t }\n\t if (this.flushRange.length === 0) {\n\t // everything flushed\n\t this._needsFlush = false;\n\t\n\t // let's recompute this.appended, which is used to avoid flush looping\n\t var appended = 0;\n\t var sourceBuffer = this.sourceBuffer;\n\t for (var type in sourceBuffer) {\n\t appended += sourceBuffer[type].buffered.length;\n\t }\n\t this.appended = appended;\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHED);\n\t }\n\t }\n\t }, {\n\t key: 'doAppending',\n\t value: function doAppending() {\n\t var hls = this.hls,\n\t sourceBuffer = this.sourceBuffer,\n\t segments = this.segments;\n\t if (Object.keys(sourceBuffer).length) {\n\t if (this.media.error) {\n\t this.segments = [];\n\t _logger.logger.error('trying to append although a media error occured, flush segment and abort');\n\t return;\n\t }\n\t if (this.appending) {\n\t //logger.log(`sb appending in progress`);\n\t return;\n\t }\n\t if (segments && segments.length) {\n\t var segment = segments.shift();\n\t try {\n\t var type = segment.type;\n\t if (sourceBuffer[type]) {\n\t // reset sourceBuffer ended flag before appending segment\n\t sourceBuffer[type].ended = false;\n\t //logger.log(`appending ${segment.content} ${segment.type} SB, size:${segment.data.length}, ${segment.parent}`);\n\t this.parent = segment.parent;\n\t sourceBuffer[type].appendBuffer(segment.data);\n\t this.appendError = 0;\n\t this.appended++;\n\t this.appending = true;\n\t } else {\n\t // in case we don't have any source buffer matching with this segment type,\n\t // it means that Mediasource fails to create sourcebuffer\n\t // discard this segment, and trigger update end\n\t this.onSBUpdateEnd();\n\t }\n\t } catch (err) {\n\t // in case any error occured while appending, put back segment in segments table\n\t _logger.logger.error('error while trying to append buffer:' + err.message);\n\t segments.unshift(segment);\n\t var event = { type: _errors.ErrorTypes.MEDIA_ERROR };\n\t if (err.code !== 22) {\n\t if (this.appendError) {\n\t this.appendError++;\n\t } else {\n\t this.appendError = 1;\n\t }\n\t event.details = _errors.ErrorDetails.BUFFER_APPEND_ERROR;\n\t event.frag = this.fragCurrent;\n\t /* with UHD content, we could get loop of quota exceeded error until\n\t browser is able to evict some data from sourcebuffer. retrying help recovering this\n\t */\n\t if (this.appendError > hls.config.appendErrorMaxRetry) {\n\t _logger.logger.log('fail ' + hls.config.appendErrorMaxRetry + ' times to append segment in sourceBuffer');\n\t segments = [];\n\t event.fatal = true;\n\t hls.trigger(_events2.default.ERROR, event);\n\t return;\n\t } else {\n\t event.fatal = false;\n\t hls.trigger(_events2.default.ERROR, event);\n\t }\n\t } else {\n\t // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n\t // let's stop appending any segments, and report BUFFER_FULL_ERROR error\n\t this.segments = [];\n\t event.details = _errors.ErrorDetails.BUFFER_FULL_ERROR;\n\t hls.trigger(_events2.default.ERROR, event);\n\t return;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t\n\t /*\n\t flush specified buffered range,\n\t return true once range has been flushed.\n\t as sourceBuffer.remove() is asynchronous, flushBuffer will be retriggered on sourceBuffer update end\n\t */\n\t\n\t }, {\n\t key: 'flushBuffer',\n\t value: function flushBuffer(startOffset, endOffset, typeIn) {\n\t var sb,\n\t i,\n\t bufStart,\n\t bufEnd,\n\t flushStart,\n\t flushEnd,\n\t sourceBuffer = this.sourceBuffer;\n\t if (Object.keys(sourceBuffer).length) {\n\t _logger.logger.log('flushBuffer,pos/start/end: ' + this.media.currentTime + '/' + startOffset + '/' + endOffset);\n\t // safeguard to avoid infinite looping : don't try to flush more than the nb of appended segments\n\t if (this.flushBufferCounter < this.appended) {\n\t for (var type in sourceBuffer) {\n\t // check if sourcebuffer type is defined (typeIn): if yes, let's only flush this one\n\t // if no, let's flush all sourcebuffers\n\t if (typeIn && type !== typeIn) {\n\t continue;\n\t }\n\t sb = sourceBuffer[type];\n\t // we are going to flush buffer, mark source buffer as 'not ended'\n\t sb.ended = false;\n\t if (!sb.updating) {\n\t for (i = 0; i < sb.buffered.length; i++) {\n\t bufStart = sb.buffered.start(i);\n\t bufEnd = sb.buffered.end(i);\n\t // workaround firefox not able to properly flush multiple buffered range.\n\t if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1 && endOffset === Number.POSITIVE_INFINITY) {\n\t flushStart = startOffset;\n\t flushEnd = endOffset;\n\t } else {\n\t flushStart = Math.max(bufStart, startOffset);\n\t flushEnd = Math.min(bufEnd, endOffset);\n\t }\n\t /* sometimes sourcebuffer.remove() does not flush\n\t the exact expected time range.\n\t to avoid rounding issues/infinite loop,\n\t only flush buffer range of length greater than 500ms.\n\t */\n\t if (Math.min(flushEnd, bufEnd) - flushStart > 0.5) {\n\t this.flushBufferCounter++;\n\t _logger.logger.log('flush ' + type + ' [' + flushStart + ',' + flushEnd + '], of [' + bufStart + ',' + bufEnd + '], pos:' + this.media.currentTime);\n\t sb.remove(flushStart, flushEnd);\n\t return false;\n\t }\n\t }\n\t } else {\n\t //logger.log('abort ' + type + ' append in progress');\n\t // this will abort any appending in progress\n\t //sb.abort();\n\t _logger.logger.warn('cannot flush, sb updating in progress');\n\t return false;\n\t }\n\t }\n\t } else {\n\t _logger.logger.warn('abort flushing too many retries');\n\t }\n\t _logger.logger.log('buffer flushed');\n\t }\n\t // everything flushed !\n\t return true;\n\t }\n\t }]);\n\t\n\t return BufferController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = BufferController;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],7:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * cap stream level to media size dimension controller\n\t */\n\t\n\tvar CapLevelController = function (_EventHandler) {\n\t _inherits(CapLevelController, _EventHandler);\n\t\n\t function CapLevelController(hls) {\n\t _classCallCheck(this, CapLevelController);\n\t\n\t return _possibleConstructorReturn(this, Object.getPrototypeOf(CapLevelController).call(this, hls, _events2.default.FPS_DROP_LEVEL_CAPPING, _events2.default.MEDIA_ATTACHING, _events2.default.MANIFEST_PARSED));\n\t }\n\t\n\t _createClass(CapLevelController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.hls.config.capLevelToPlayerSize) {\n\t this.media = this.restrictedLevels = null;\n\t this.autoLevelCapping = Number.POSITIVE_INFINITY;\n\t if (this.timer) {\n\t this.timer = clearInterval(this.timer);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onFpsDropLevelCapping',\n\t value: function onFpsDropLevelCapping(data) {\n\t if (!this.restrictedLevels) {\n\t this.restrictedLevels = [];\n\t }\n\t if (!this.isLevelRestricted(data.droppedLevel)) {\n\t this.restrictedLevels.push(data.droppedLevel);\n\t }\n\t }\n\t }, {\n\t key: 'onMediaAttaching',\n\t value: function onMediaAttaching(data) {\n\t this.media = data.media instanceof HTMLVideoElement ? data.media : null;\n\t }\n\t }, {\n\t key: 'onManifestParsed',\n\t value: function onManifestParsed(data) {\n\t if (this.hls.config.capLevelToPlayerSize) {\n\t this.autoLevelCapping = Number.POSITIVE_INFINITY;\n\t this.levels = data.levels;\n\t this.hls.firstLevel = this.getMaxLevel(data.firstLevel);\n\t clearInterval(this.timer);\n\t this.timer = setInterval(this.detectPlayerSize.bind(this), 1000);\n\t this.detectPlayerSize();\n\t }\n\t }\n\t }, {\n\t key: 'detectPlayerSize',\n\t value: function detectPlayerSize() {\n\t if (this.media) {\n\t var levelsLength = this.levels ? this.levels.length : 0;\n\t if (levelsLength) {\n\t this.hls.autoLevelCapping = this.getMaxLevel(levelsLength - 1);\n\t if (this.hls.autoLevelCapping > this.autoLevelCapping) {\n\t // if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch\n\t // usually happen when the user go to the fullscreen mode.\n\t this.hls.streamController.nextLevelSwitch();\n\t }\n\t this.autoLevelCapping = this.hls.autoLevelCapping;\n\t }\n\t }\n\t }\n\t\n\t /*\n\t * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)\n\t */\n\t\n\t }, {\n\t key: 'getMaxLevel',\n\t value: function getMaxLevel(capLevelIndex) {\n\t var result = 0,\n\t i = void 0,\n\t level = void 0,\n\t mWidth = this.mediaWidth,\n\t mHeight = this.mediaHeight,\n\t lWidth = 0,\n\t lHeight = 0;\n\t\n\t for (i = 0; i <= capLevelIndex; i++) {\n\t level = this.levels[i];\n\t if (this.isLevelRestricted(i)) {\n\t break;\n\t }\n\t result = i;\n\t lWidth = level.width;\n\t lHeight = level.height;\n\t if (mWidth <= lWidth || mHeight <= lHeight) {\n\t break;\n\t }\n\t }\n\t return result;\n\t }\n\t }, {\n\t key: 'isLevelRestricted',\n\t value: function isLevelRestricted(level) {\n\t return this.restrictedLevels && this.restrictedLevels.indexOf(level) !== -1 ? true : false;\n\t }\n\t }, {\n\t key: 'contentScaleFactor',\n\t get: function get() {\n\t var pixelRatio = 1;\n\t try {\n\t pixelRatio = window.devicePixelRatio;\n\t } catch (e) {}\n\t return pixelRatio;\n\t }\n\t }, {\n\t key: 'mediaWidth',\n\t get: function get() {\n\t var width = void 0;\n\t if (this.media) {\n\t width = this.media.width || this.media.clientWidth || this.media.offsetWidth;\n\t width *= this.contentScaleFactor;\n\t }\n\t return width;\n\t }\n\t }, {\n\t key: 'mediaHeight',\n\t get: function get() {\n\t var height = void 0;\n\t if (this.media) {\n\t height = this.media.height || this.media.clientHeight || this.media.offsetHeight;\n\t height *= this.contentScaleFactor;\n\t }\n\t return height;\n\t }\n\t }]);\n\t\n\t return CapLevelController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = CapLevelController;\n\t\n\t},{\"25\":25,\"26\":26}],8:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /*\n\t * EWMA Bandwidth Estimator\n\t * - heavily inspired from shaka-player\n\t * Tracks bandwidth samples and estimates available bandwidth.\n\t * Based on the minimum of two exponentially-weighted moving averages with\n\t * different half-lives.\n\t */\n\t\n\tvar _ewma = _dereq_(42);\n\t\n\tvar _ewma2 = _interopRequireDefault(_ewma);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar EwmaBandWidthEstimator = function () {\n\t function EwmaBandWidthEstimator(hls, slow, fast, defaultEstimate) {\n\t _classCallCheck(this, EwmaBandWidthEstimator);\n\t\n\t this.hls = hls;\n\t this.defaultEstimate_ = defaultEstimate;\n\t this.minWeight_ = 0.001;\n\t this.minDelayMs_ = 50;\n\t this.slow_ = new _ewma2.default(slow);\n\t this.fast_ = new _ewma2.default(fast);\n\t }\n\t\n\t _createClass(EwmaBandWidthEstimator, [{\n\t key: 'sample',\n\t value: function sample(durationMs, numBytes) {\n\t durationMs = Math.max(durationMs, this.minDelayMs_);\n\t var bandwidth = 8000 * numBytes / durationMs,\n\t\n\t //console.log('instant bw:'+ Math.round(bandwidth));\n\t // we weight sample using loading duration....\n\t weight = durationMs / 1000;\n\t this.fast_.sample(weight, bandwidth);\n\t this.slow_.sample(weight, bandwidth);\n\t }\n\t }, {\n\t key: 'canEstimate',\n\t value: function canEstimate() {\n\t var fast = this.fast_;\n\t return fast && fast.getTotalWeight() >= this.minWeight_;\n\t }\n\t }, {\n\t key: 'getEstimate',\n\t value: function getEstimate() {\n\t if (this.canEstimate()) {\n\t //console.log('slow estimate:'+ Math.round(this.slow_.getEstimate()));\n\t //console.log('fast estimate:'+ Math.round(this.fast_.getEstimate()));\n\t // Take the minimum of these two estimates. This should have the effect of\n\t // adapting down quickly, but up more slowly.\n\t return Math.min(this.fast_.getEstimate(), this.slow_.getEstimate());\n\t } else {\n\t return this.defaultEstimate_;\n\t }\n\t }\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {}\n\t }]);\n\t\n\t return EwmaBandWidthEstimator;\n\t}();\n\t\n\texports.default = EwmaBandWidthEstimator;\n\t\n\t},{\"42\":42}],9:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * FPS Controller\n\t */\n\t\n\tvar FPSController = function (_EventHandler) {\n\t _inherits(FPSController, _EventHandler);\n\t\n\t function FPSController(hls) {\n\t _classCallCheck(this, FPSController);\n\t\n\t return _possibleConstructorReturn(this, Object.getPrototypeOf(FPSController).call(this, hls, _events2.default.MEDIA_ATTACHING));\n\t }\n\t\n\t _createClass(FPSController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.timer) {\n\t clearInterval(this.timer);\n\t }\n\t this.isVideoPlaybackQualityAvailable = false;\n\t }\n\t }, {\n\t key: 'onMediaAttaching',\n\t value: function onMediaAttaching(data) {\n\t if (this.hls.config.capLevelOnFPSDrop) {\n\t this.video = data.media instanceof HTMLVideoElement ? data.media : null;\n\t if (typeof this.video.getVideoPlaybackQuality === 'function') {\n\t this.isVideoPlaybackQualityAvailable = true;\n\t }\n\t clearInterval(this.timer);\n\t this.timer = setInterval(this.checkFPSInterval.bind(this), this.hls.config.fpsDroppedMonitoringPeriod);\n\t }\n\t }\n\t }, {\n\t key: 'checkFPS',\n\t value: function checkFPS(video, decodedFrames, droppedFrames) {\n\t var currentTime = performance.now();\n\t if (decodedFrames) {\n\t if (this.lastTime) {\n\t var currentPeriod = currentTime - this.lastTime,\n\t currentDropped = droppedFrames - this.lastDroppedFrames,\n\t currentDecoded = decodedFrames - this.lastDecodedFrames,\n\t droppedFPS = 1000 * currentDropped / currentPeriod;\n\t this.hls.trigger(_events2.default.FPS_DROP, { currentDropped: currentDropped, currentDecoded: currentDecoded, totalDroppedFrames: droppedFrames });\n\t if (droppedFPS > 0) {\n\t //logger.log('checkFPS : droppedFPS/decodedFPS:' + droppedFPS/(1000 * currentDecoded / currentPeriod));\n\t if (currentDropped > this.hls.config.fpsDroppedMonitoringThreshold * currentDecoded) {\n\t var currentLevel = this.hls.currentLevel;\n\t _logger.logger.warn('drop FPS ratio greater than max allowed value for currentLevel: ' + currentLevel);\n\t if (currentLevel > 0 && (this.hls.autoLevelCapping === -1 || this.hls.autoLevelCapping >= currentLevel)) {\n\t currentLevel = currentLevel - 1;\n\t this.hls.trigger(_events2.default.FPS_DROP_LEVEL_CAPPING, { level: currentLevel, droppedLevel: this.hls.currentLevel });\n\t this.hls.autoLevelCapping = currentLevel;\n\t this.hls.streamController.nextLevelSwitch();\n\t }\n\t }\n\t }\n\t }\n\t this.lastTime = currentTime;\n\t this.lastDroppedFrames = droppedFrames;\n\t this.lastDecodedFrames = decodedFrames;\n\t }\n\t }\n\t }, {\n\t key: 'checkFPSInterval',\n\t value: function checkFPSInterval() {\n\t if (this.video) {\n\t if (this.isVideoPlaybackQualityAvailable) {\n\t var videoPlaybackQuality = this.video.getVideoPlaybackQuality();\n\t this.checkFPS(this.video, videoPlaybackQuality.totalVideoFrames, videoPlaybackQuality.droppedVideoFrames);\n\t } else {\n\t this.checkFPS(this.video, this.video.webkitDecodedFrameCount, this.video.webkitDroppedFrameCount);\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return FPSController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = FPSController;\n\t\n\t},{\"25\":25,\"26\":26,\"43\":43}],10:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _bufferHelper = _dereq_(28);\n\t\n\tvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Level Controller\n\t */\n\t\n\tvar LevelController = function (_EventHandler) {\n\t _inherits(LevelController, _EventHandler);\n\t\n\t function LevelController(hls) {\n\t _classCallCheck(this, LevelController);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(LevelController).call(this, hls, _events2.default.MANIFEST_LOADED, _events2.default.LEVEL_LOADED, _events2.default.ERROR));\n\t\n\t _this.ontick = _this.tick.bind(_this);\n\t _this._manualLevel = _this._autoLevelCapping = -1;\n\t return _this;\n\t }\n\t\n\t _createClass(LevelController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t if (this.timer) {\n\t clearTimeout(this.timer);\n\t this.timer = null;\n\t }\n\t this._manualLevel = -1;\n\t }\n\t }, {\n\t key: 'startLoad',\n\t value: function startLoad() {\n\t this.canload = true;\n\t // speed up live playlist refresh if timer exists\n\t if (this.timer) {\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'stopLoad',\n\t value: function stopLoad() {\n\t this.canload = false;\n\t }\n\t }, {\n\t key: 'onManifestLoaded',\n\t value: function onManifestLoaded(data) {\n\t var levels0 = [],\n\t levels = [],\n\t bitrateStart,\n\t i,\n\t bitrateSet = {},\n\t videoCodecFound = false,\n\t audioCodecFound = false,\n\t hls = this.hls;\n\t\n\t // regroup redundant level together\n\t data.levels.forEach(function (level) {\n\t if (level.videoCodec) {\n\t videoCodecFound = true;\n\t }\n\t if (level.audioCodec || level.attrs && level.attrs.AUDIO) {\n\t audioCodecFound = true;\n\t }\n\t var redundantLevelId = bitrateSet[level.bitrate];\n\t if (redundantLevelId === undefined) {\n\t bitrateSet[level.bitrate] = levels0.length;\n\t level.url = [level.url];\n\t level.urlId = 0;\n\t levels0.push(level);\n\t } else {\n\t levels0[redundantLevelId].url.push(level.url);\n\t }\n\t });\n\t\n\t // remove audio-only level if we also have levels with audio+video codecs signalled\n\t if (videoCodecFound && audioCodecFound) {\n\t levels0.forEach(function (level) {\n\t if (level.videoCodec) {\n\t levels.push(level);\n\t }\n\t });\n\t } else {\n\t levels = levels0;\n\t }\n\t\n\t // only keep level with supported audio/video codecs\n\t levels = levels.filter(function (level) {\n\t var checkSupportedAudio = function checkSupportedAudio(codec) {\n\t return MediaSource.isTypeSupported('audio/mp4;codecs=' + codec);\n\t };\n\t var checkSupportedVideo = function checkSupportedVideo(codec) {\n\t return MediaSource.isTypeSupported('video/mp4;codecs=' + codec);\n\t };\n\t var audioCodec = level.audioCodec,\n\t videoCodec = level.videoCodec;\n\t\n\t return (!audioCodec || checkSupportedAudio(audioCodec)) && (!videoCodec || checkSupportedVideo(videoCodec));\n\t });\n\t\n\t if (levels.length) {\n\t // start bitrate is the first bitrate of the manifest\n\t bitrateStart = levels[0].bitrate;\n\t // sort level on bitrate\n\t levels.sort(function (a, b) {\n\t return a.bitrate - b.bitrate;\n\t });\n\t this._levels = levels;\n\t // find index of first level in sorted levels\n\t for (i = 0; i < levels.length; i++) {\n\t if (levels[i].bitrate === bitrateStart) {\n\t this._firstLevel = i;\n\t _logger.logger.log('manifest loaded,' + levels.length + ' level(s) found, first bitrate:' + bitrateStart);\n\t break;\n\t }\n\t }\n\t hls.trigger(_events2.default.MANIFEST_PARSED, { levels: this._levels, firstLevel: this._firstLevel, stats: data.stats, audio: audioCodecFound, video: videoCodecFound, altAudio: data.audioTracks.length > 0 });\n\t } else {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR, fatal: true, url: hls.url, reason: 'no level with compatible codecs found in manifest' });\n\t }\n\t return;\n\t }\n\t }, {\n\t key: 'setLevelInternal',\n\t value: function setLevelInternal(newLevel) {\n\t var levels = this._levels;\n\t // check if level idx is valid\n\t if (newLevel >= 0 && newLevel < levels.length) {\n\t // stopping live reloading timer if any\n\t if (this.timer) {\n\t clearTimeout(this.timer);\n\t this.timer = null;\n\t }\n\t if (this._level !== newLevel) {\n\t _logger.logger.log('switching to level ' + newLevel);\n\t this._level = newLevel;\n\t }\n\t this.hls.trigger(_events2.default.LEVEL_SWITCH, { level: newLevel });\n\t var level = levels[newLevel],\n\t levelDetails = level.details;\n\t // check if we need to load playlist for this level\n\t if (!levelDetails || levelDetails.live === true) {\n\t // level not retrieved yet, or live playlist we need to (re)load it\n\t var urlId = level.urlId;\n\t this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: newLevel, id: urlId });\n\t }\n\t } else {\n\t // invalid level id given, trigger error\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.LEVEL_SWITCH_ERROR, level: newLevel, fatal: false, reason: 'invalid level idx' });\n\t }\n\t }\n\t }, {\n\t key: 'onError',\n\t value: function onError(data) {\n\t if (data.fatal) {\n\t return;\n\t }\n\t\n\t var details = data.details,\n\t hls = this.hls,\n\t levelId = void 0,\n\t level = void 0,\n\t levelError = false;\n\t // try to recover not fatal errors\n\t switch (details) {\n\t case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n\t case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n\t case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n\t case _errors.ErrorDetails.KEY_LOAD_ERROR:\n\t case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n\t levelId = data.frag.level;\n\t break;\n\t case _errors.ErrorDetails.LEVEL_LOAD_ERROR:\n\t case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n\t levelId = data.context.level;\n\t levelError = true;\n\t break;\n\t default:\n\t break;\n\t }\n\t /* try to switch to a redundant stream if any available.\n\t * if no redundant stream available, emergency switch down (if in auto mode and current level not 0)\n\t * otherwise, we cannot recover this network error ...\n\t */\n\t if (levelId !== undefined) {\n\t level = this._levels[levelId];\n\t if (level.urlId < level.url.length - 1) {\n\t level.urlId++;\n\t level.details = undefined;\n\t _logger.logger.warn('level controller,' + details + ' for level ' + levelId + ': switching to redundant stream id ' + level.urlId);\n\t } else {\n\t // we could try to recover if in auto mode and current level not lowest level (0)\n\t var recoverable = this._manualLevel === -1 && levelId;\n\t if (recoverable) {\n\t _logger.logger.warn('level controller,' + details + ': emergency switch-down for next fragment');\n\t hls.abrController.nextAutoLevel = 0;\n\t } else if (level && level.details && level.details.live) {\n\t _logger.logger.warn('level controller,' + details + ' on live stream, discard');\n\t if (levelError) {\n\t // reset this._level so that another call to set level() will retrigger a frag load\n\t this._level = undefined;\n\t }\n\t // other errors are handled by stream controller\n\t } else if (details === _errors.ErrorDetails.LEVEL_LOAD_ERROR || details === _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT) {\n\t var _hls = this.hls,\n\t media = _hls.media,\n\t\n\t // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n\t mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);\n\t if (mediaBuffered) {\n\t var retryDelay = _hls.config.levelLoadingRetryDelay;\n\t _logger.logger.warn('level controller,' + details + ', but media buffered, retry in ' + retryDelay + 'ms');\n\t this.timer = setTimeout(this.ontick, retryDelay);\n\t } else {\n\t _logger.logger.error('cannot recover ' + details + ' error');\n\t this._level = undefined;\n\t // stopping live reloading timer if any\n\t if (this.timer) {\n\t clearTimeout(this.timer);\n\t this.timer = null;\n\t }\n\t // redispatch same error but with fatal set to true\n\t data.fatal = true;\n\t _hls.trigger(_events2.default.ERROR, data);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onLevelLoaded',\n\t value: function onLevelLoaded(data) {\n\t // only process level loaded events matching with expected level\n\t if (data.level === this._level) {\n\t var newDetails = data.details;\n\t // if current playlist is a live playlist, arm a timer to reload it\n\t if (newDetails.live) {\n\t var reloadInterval = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration),\n\t curLevel = this._levels[data.level],\n\t curDetails = curLevel.details;\n\t if (curDetails && newDetails.endSN === curDetails.endSN) {\n\t // follow HLS Spec, If the client reloads a Playlist file and finds that it has not\n\t // changed then it MUST wait for a period of one-half the target\n\t // duration before retrying.\n\t reloadInterval /= 2;\n\t _logger.logger.log('same live playlist, reload twice faster');\n\t }\n\t // decrement reloadInterval with level loading delay\n\t reloadInterval -= performance.now() - data.stats.trequest;\n\t // in any case, don't reload more than every second\n\t reloadInterval = Math.max(1000, Math.round(reloadInterval));\n\t _logger.logger.log('live playlist, reload in ' + reloadInterval + ' ms');\n\t this.timer = setTimeout(this.ontick, reloadInterval);\n\t } else {\n\t this.timer = null;\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'tick',\n\t value: function tick() {\n\t var levelId = this._level;\n\t if (levelId !== undefined && this.canload) {\n\t var level = this._levels[levelId],\n\t urlId = level.urlId;\n\t this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: levelId, id: urlId });\n\t }\n\t }\n\t }, {\n\t key: 'levels',\n\t get: function get() {\n\t return this._levels;\n\t }\n\t }, {\n\t key: 'level',\n\t get: function get() {\n\t return this._level;\n\t },\n\t set: function set(newLevel) {\n\t var levels = this._levels;\n\t if (levels && levels.length > newLevel) {\n\t if (this._level !== newLevel || levels[newLevel].details === undefined) {\n\t this.setLevelInternal(newLevel);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'manualLevel',\n\t get: function get() {\n\t return this._manualLevel;\n\t },\n\t set: function set(newLevel) {\n\t this._manualLevel = newLevel;\n\t if (this._startLevel === undefined) {\n\t this._startLevel = newLevel;\n\t }\n\t if (newLevel !== -1) {\n\t this.level = newLevel;\n\t }\n\t }\n\t }, {\n\t key: 'firstLevel',\n\t get: function get() {\n\t return this._firstLevel;\n\t },\n\t set: function set(newLevel) {\n\t this._firstLevel = newLevel;\n\t }\n\t }, {\n\t key: 'startLevel',\n\t get: function get() {\n\t // hls.startLevel takes precedence over config.startLevel\n\t // if none of these values are defined, fallback on this._firstLevel (first quality level appearing in variant manifest)\n\t if (this._startLevel === undefined) {\n\t var configStartLevel = this.hls.config.startLevel;\n\t if (configStartLevel !== undefined) {\n\t return configStartLevel;\n\t } else {\n\t return this._firstLevel;\n\t }\n\t } else {\n\t return this._startLevel;\n\t }\n\t },\n\t set: function set(newLevel) {\n\t this._startLevel = newLevel;\n\t }\n\t }, {\n\t key: 'nextLoadLevel',\n\t get: function get() {\n\t if (this._manualLevel !== -1) {\n\t return this._manualLevel;\n\t } else {\n\t return this.hls.abrController.nextAutoLevel;\n\t }\n\t },\n\t set: function set(nextLevel) {\n\t this.level = nextLevel;\n\t if (this._manualLevel === -1) {\n\t this.hls.abrController.nextAutoLevel = nextLevel;\n\t }\n\t }\n\t }]);\n\t\n\t return LevelController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = LevelController;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"43\":43}],11:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _binarySearch = _dereq_(39);\n\t\n\tvar _binarySearch2 = _interopRequireDefault(_binarySearch);\n\t\n\tvar _bufferHelper = _dereq_(28);\n\t\n\tvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\t\n\tvar _demuxer = _dereq_(20);\n\t\n\tvar _demuxer2 = _interopRequireDefault(_demuxer);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _levelHelper = _dereq_(29);\n\t\n\tvar _levelHelper2 = _interopRequireDefault(_levelHelper);\n\t\n\tvar _timeRanges = _dereq_(45);\n\t\n\tvar _timeRanges2 = _interopRequireDefault(_timeRanges);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Stream Controller\n\t */\n\t\n\tvar State = {\n\t STOPPED: 'STOPPED',\n\t IDLE: 'IDLE',\n\t PAUSED: 'PAUSED',\n\t KEY_LOADING: 'KEY_LOADING',\n\t FRAG_LOADING: 'FRAG_LOADING',\n\t FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n\t WAITING_LEVEL: 'WAITING_LEVEL',\n\t PARSING: 'PARSING',\n\t PARSED: 'PARSED',\n\t ENDED: 'ENDED',\n\t ERROR: 'ERROR'\n\t};\n\t\n\tvar StreamController = function (_EventHandler) {\n\t _inherits(StreamController, _EventHandler);\n\t\n\t function StreamController(hls) {\n\t _classCallCheck(this, StreamController);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(StreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_PARSED, _events2.default.LEVEL_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_LOAD_EMERGENCY_ABORTED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));\n\t\n\t _this.config = hls.config;\n\t _this.audioCodecSwap = false;\n\t _this.ticks = 0;\n\t _this.ontick = _this.tick.bind(_this);\n\t return _this;\n\t }\n\t\n\t _createClass(StreamController, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.stopLoad();\n\t if (this.timer) {\n\t clearInterval(this.timer);\n\t this.timer = null;\n\t }\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t this.state = State.STOPPED;\n\t }\n\t }, {\n\t key: 'startLoad',\n\t value: function startLoad(startPosition) {\n\t if (this.levels) {\n\t var media = this.media,\n\t lastCurrentTime = this.lastCurrentTime,\n\t hls = this.hls;\n\t this.stopLoad();\n\t if (!this.timer) {\n\t this.timer = setInterval(this.ontick, 100);\n\t }\n\t this.level = -1;\n\t this.fragLoadError = 0;\n\t if (media && lastCurrentTime > 0) {\n\t _logger.logger.log('configure startPosition @' + lastCurrentTime.toFixed(3));\n\t if (!this.lastPaused) {\n\t _logger.logger.log('resuming video');\n\t media.play();\n\t }\n\t } else {\n\t this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n\t }\n\t if (!this.startFragRequested) {\n\t // determine load level\n\t var startLevel = hls.startLevel;\n\t if (startLevel === -1) {\n\t // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n\t startLevel = 0;\n\t this.bitrateTest = true;\n\t }\n\t // set new level to playlist loader : this will trigger start level load\n\t // hls.nextLoadLevel remains until it is set to a new value or until a new frag is successfully loaded\n\t this.level = hls.nextLoadLevel = startLevel;\n\t this.loadedmetadata = false;\n\t }\n\t this.state = State.IDLE;\n\t this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n\t this.tick();\n\t } else {\n\t _logger.logger.warn('cannot start loading as manifest not parsed yet');\n\t this.state = State.STOPPED;\n\t }\n\t }\n\t }, {\n\t key: 'stopLoad',\n\t value: function stopLoad() {\n\t var frag = this.fragCurrent;\n\t if (frag) {\n\t if (frag.loader) {\n\t frag.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t }\n\t this.fragPrevious = null;\n\t if (this.demuxer) {\n\t this.demuxer.destroy();\n\t this.demuxer = null;\n\t }\n\t this.state = State.STOPPED;\n\t }\n\t }, {\n\t key: 'tick',\n\t value: function tick() {\n\t this.ticks++;\n\t if (this.ticks === 1) {\n\t this.doTick();\n\t if (this.ticks > 1) {\n\t setTimeout(this.tick, 1);\n\t }\n\t this.ticks = 0;\n\t }\n\t }\n\t }, {\n\t key: 'doTick',\n\t value: function doTick() {\n\t switch (this.state) {\n\t case State.ERROR:\n\t //don't do anything in error state to avoid breaking further ...\n\t case State.PAUSED:\n\t //don't do anything in paused state either ...\n\t break;\n\t case State.IDLE:\n\t // when this returns false there was an error and we shall return immediatly\n\t // from current tick\n\t if (!this._doTickIdle()) {\n\t return;\n\t }\n\t break;\n\t case State.WAITING_LEVEL:\n\t var level = this.levels[this.level];\n\t // check if playlist is already loaded\n\t if (level && level.details) {\n\t this.state = State.IDLE;\n\t }\n\t break;\n\t case State.FRAG_LOADING_WAITING_RETRY:\n\t var now = performance.now();\n\t var retryDate = this.retryDate;\n\t // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n\t if (!retryDate || now >= retryDate || this.media && this.media.seeking) {\n\t _logger.logger.log('mediaController: retryDate reached, switch back to IDLE state');\n\t this.state = State.IDLE;\n\t }\n\t break;\n\t case State.ERROR:\n\t case State.PAUSED:\n\t case State.STOPPED:\n\t case State.FRAG_LOADING:\n\t case State.PARSING:\n\t case State.PARSED:\n\t case State.ENDED:\n\t break;\n\t default:\n\t break;\n\t }\n\t // check buffer\n\t this._checkBuffer();\n\t // check/update current fragment\n\t this._checkFragmentChanged();\n\t }\n\t\n\t // Ironically the \"idle\" state is the on we do the most logic in it seems ....\n\t // NOTE: Maybe we could rather schedule a check for buffer length after half of the currently\n\t // played segment, or on pause/play/seek instead of naively checking every 100ms?\n\t\n\t }, {\n\t key: '_doTickIdle',\n\t value: function _doTickIdle() {\n\t var hls = this.hls,\n\t config = hls.config,\n\t media = this.media;\n\t\n\t // if video not attached AND\n\t // start fragment already requested OR start frag prefetch disable\n\t // exit loop\n\t // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n\t if (!media && (this.startFragRequested || !config.startFragPrefetch)) {\n\t return true;\n\t }\n\t\n\t // if we have not yet loaded any fragment, start loading from start position\n\t var pos = void 0;\n\t if (this.loadedmetadata) {\n\t pos = media.currentTime;\n\t } else {\n\t pos = this.nextLoadPosition;\n\t }\n\t // determine next load level\n\t var level = hls.nextLoadLevel;\n\t\n\t // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s\n\t var maxBufLen = void 0;\n\t if (this.levels[level].hasOwnProperty('bitrate')) {\n\t maxBufLen = Math.max(8 * config.maxBufferSize / this.levels[level].bitrate, config.maxBufferLength);\n\t } else {\n\t maxBufLen = config.maxBufferLength;\n\t }\n\t maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);\n\t\n\t // determine next candidate fragment to be loaded, based on current position and end of buffer position\n\t // ensure up to `config.maxMaxBufferLength` of buffer upfront\n\t\n\t var bufferInfo = _bufferHelper2.default.bufferInfo(this.mediaBuffer ? this.mediaBuffer : media, pos, config.maxBufferHole),\n\t bufferLen = bufferInfo.len;\n\t // Stay idle if we are still with buffer margins\n\t if (bufferLen >= maxBufLen) {\n\t return true;\n\t }\n\t\n\t // if buffer length is less than maxBufLen try to load a new fragment ...\n\t _logger.logger.trace('buffer length of ' + bufferLen.toFixed(3) + ' is below max of ' + maxBufLen.toFixed(3) + '. checking for more payload ...');\n\t\n\t // set next load level : this will trigger a playlist load if needed\n\t hls.nextLoadLevel = level;\n\t this.level = level;\n\t\n\t var levelDetails = this.levels[level].details;\n\t // if level info not retrieved yet, switch state and wait for level retrieval\n\t // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load\n\t // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)\n\t if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) {\n\t this.state = State.WAITING_LEVEL;\n\t return true;\n\t }\n\t\n\t // we just got done loading the final fragment, check if we need to finalize media stream\n\t var fragPrevious = this.fragPrevious;\n\t if (!levelDetails.live && fragPrevious && fragPrevious.sn === levelDetails.endSN) {\n\t // if (we are not seeking AND current position is buffered) OR (if we are seeking but everything (almost) til the end is buffered), let's signal eos\n\t // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching\n\t // between different renditions. using half frag duration should help cope with these cases.\n\t if (!media.seeking && bufferInfo.len || media.duration - bufferInfo.end <= fragPrevious.duration / 2) {\n\t // Finalize the media stream\n\t var data = {};\n\t if (this.altAudio) {\n\t data.type = 'video';\n\t }\n\t this.hls.trigger(_events2.default.BUFFER_EOS, data);\n\t this.state = State.ENDED;\n\t return true;\n\t }\n\t }\n\t\n\t // if we have the levelDetails for the selected variant, lets continue enrichen our stream (load keys/fragments or trigger EOS, etc..)\n\t return this._fetchPayloadOrEos({ pos: pos, bufferInfo: bufferInfo, levelDetails: levelDetails });\n\t }\n\t }, {\n\t key: '_fetchPayloadOrEos',\n\t value: function _fetchPayloadOrEos(_ref) {\n\t var pos = _ref.pos;\n\t var bufferInfo = _ref.bufferInfo;\n\t var levelDetails = _ref.levelDetails;\n\t\n\t var fragPrevious = this.fragPrevious,\n\t level = this.level,\n\t fragments = levelDetails.fragments,\n\t fragLen = fragments.length;\n\t\n\t // empty playlist\n\t if (fragLen === 0) {\n\t return false;\n\t }\n\t\n\t // find fragment index, contiguous with end of buffer position\n\t var start = fragments[0].start,\n\t end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n\t bufferEnd = bufferInfo.end,\n\t frag = void 0;\n\t\n\t // in case of live playlist we need to ensure that requested position is not located before playlist start\n\t if (levelDetails.live) {\n\t frag = this._ensureFragmentAtLivePoint({ levelDetails: levelDetails, bufferEnd: bufferEnd, start: start, end: end, fragPrevious: fragPrevious, fragments: fragments, fragLen: fragLen });\n\t // if it explicitely returns null don't load any fragment and exit function now\n\t if (frag === null) {\n\t return false;\n\t }\n\t } else {\n\t // VoD playlist: if bufferEnd before start of playlist, load first fragment\n\t if (bufferEnd < start) {\n\t frag = fragments[0];\n\t }\n\t }\n\t if (!frag) {\n\t frag = this._findFragment({ start: start, fragPrevious: fragPrevious, fragLen: fragLen, fragments: fragments, bufferEnd: bufferEnd, end: end, levelDetails: levelDetails });\n\t }\n\t if (frag) {\n\t return this._loadFragmentOrKey({ frag: frag, level: level, levelDetails: levelDetails, pos: pos, bufferEnd: bufferEnd });\n\t }\n\t return true;\n\t }\n\t }, {\n\t key: '_ensureFragmentAtLivePoint',\n\t value: function _ensureFragmentAtLivePoint(_ref2) {\n\t var levelDetails = _ref2.levelDetails;\n\t var bufferEnd = _ref2.bufferEnd;\n\t var start = _ref2.start;\n\t var end = _ref2.end;\n\t var fragPrevious = _ref2.fragPrevious;\n\t var fragments = _ref2.fragments;\n\t var fragLen = _ref2.fragLen;\n\t\n\t var config = this.hls.config,\n\t media = this.media;\n\t\n\t var frag = void 0;\n\t\n\t // check if requested position is within seekable boundaries :\n\t //logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n\t var maxLatency = config.liveMaxLatencyDuration !== undefined ? config.liveMaxLatencyDuration : config.liveMaxLatencyDurationCount * levelDetails.targetduration;\n\t\n\t if (bufferEnd < Math.max(start, end - maxLatency)) {\n\t var liveSyncPosition = this.liveSyncPosition = this.computeLivePosition(start, levelDetails);\n\t _logger.logger.log('buffer end: ' + bufferEnd.toFixed(3) + ' is located too far from the end of live sliding playlist, reset currentTime to : ' + liveSyncPosition.toFixed(3));\n\t bufferEnd = liveSyncPosition;\n\t if (media && media.readyState && media.duration > liveSyncPosition) {\n\t media.currentTime = liveSyncPosition;\n\t }\n\t }\n\t\n\t // if end of buffer greater than live edge, don't load any fragment\n\t // this could happen if live playlist intermittently slides in the past.\n\t // level 1 loaded [182580161,182580167]\n\t // level 1 loaded [182580162,182580169]\n\t // Loading 182580168 of [182580162 ,182580169],level 1 ..\n\t // Loading 182580169 of [182580162 ,182580169],level 1 ..\n\t // level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168\n\t // level 1 loaded [182580164,182580171]\n\t //\n\t // don't return null in case media not loaded yet (readystate === 0)\n\t if (levelDetails.PTSKnown && bufferEnd > end && media && media.readyState) {\n\t return null;\n\t }\n\t\n\t if (this.startFragRequested && !levelDetails.PTSKnown) {\n\t /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n\t try to load frag matching with next SN.\n\t even if SN are not synchronized between playlists, loading this frag will help us\n\t compute playlist sliding and find the right one after in case it was not the right consecutive one */\n\t if (fragPrevious) {\n\t var targetSN = fragPrevious.sn + 1;\n\t if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n\t frag = fragments[targetSN - levelDetails.startSN];\n\t _logger.logger.log('live playlist, switching playlist, load frag with next SN: ' + frag.sn);\n\t }\n\t }\n\t if (!frag) {\n\t /* we have no idea about which fragment should be loaded.\n\t so let's load mid fragment. it will help computing playlist sliding and find the right one\n\t */\n\t frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n\t _logger.logger.log('live playlist, switching playlist, unknown, load middle frag : ' + frag.sn);\n\t }\n\t }\n\t return frag;\n\t }\n\t }, {\n\t key: '_findFragment',\n\t value: function _findFragment(_ref3) {\n\t var start = _ref3.start;\n\t var fragPrevious = _ref3.fragPrevious;\n\t var fragLen = _ref3.fragLen;\n\t var fragments = _ref3.fragments;\n\t var bufferEnd = _ref3.bufferEnd;\n\t var end = _ref3.end;\n\t var levelDetails = _ref3.levelDetails;\n\t\n\t var config = this.hls.config;\n\t\n\t var frag = void 0,\n\t foundFrag = void 0,\n\t maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n\t\n\t if (bufferEnd < end) {\n\t if (bufferEnd > end - maxFragLookUpTolerance) {\n\t maxFragLookUpTolerance = 0;\n\t }\n\t foundFrag = _binarySearch2.default.search(fragments, function (candidate) {\n\t // offset should be within fragment boundary - config.maxFragLookUpTolerance\n\t // this is to cope with situations like\n\t // bufferEnd = 9.991\n\t // frag[Ø] : [0,10]\n\t // frag[1] : [10,20]\n\t // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n\t // frag start frag start+duration\n\t // |-----------------------------|\n\t // <---> <--->\n\t // ...--------><-----------------------------><---------....\n\t // previous frag matching fragment next frag\n\t // return -1 return 0 return 1\n\t //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n\t if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {\n\t return 1;\n\t } // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n\t else if (candidate.start - maxFragLookUpTolerance > bufferEnd && candidate.start) {\n\t return -1;\n\t }\n\t return 0;\n\t });\n\t } else {\n\t // reach end of playlist\n\t foundFrag = fragments[fragLen - 1];\n\t }\n\t if (foundFrag) {\n\t frag = foundFrag;\n\t start = foundFrag.start;\n\t //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n\t if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n\t if (frag.sn < levelDetails.endSN) {\n\t var deltaPTS = fragPrevious.deltaPTS,\n\t curSNIdx = frag.sn - levelDetails.startSN;\n\t // if there is a significant delta between audio and video, larger than max allowed hole,\n\t // and if previous remuxed fragment did not start with a keyframe. (fragPrevious.dropped)\n\t // let's try to load previous fragment again to get last keyframe\n\t // then we will reload again current fragment (that way we should be able to fill the buffer hole ...)\n\t if (deltaPTS && deltaPTS > config.maxBufferHole && fragPrevious.dropped && curSNIdx) {\n\t frag = fragments[curSNIdx - 1];\n\t _logger.logger.warn('SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this');\n\t // decrement previous frag load counter to avoid frag loop loading error when next fragment will get reloaded\n\t fragPrevious.loadCounter--;\n\t } else {\n\t frag = fragments[curSNIdx + 1];\n\t _logger.logger.log('SN just loaded, load next one: ' + frag.sn);\n\t }\n\t } else {\n\t frag = null;\n\t }\n\t }\n\t }\n\t return frag;\n\t }\n\t }, {\n\t key: '_loadFragmentOrKey',\n\t value: function _loadFragmentOrKey(_ref4) {\n\t var frag = _ref4.frag;\n\t var level = _ref4.level;\n\t var levelDetails = _ref4.levelDetails;\n\t var pos = _ref4.pos;\n\t var bufferEnd = _ref4.bufferEnd;\n\t\n\t var hls = this.hls,\n\t config = hls.config;\n\t\n\t //logger.log('loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n\t if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {\n\t _logger.logger.log('Loading key for ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level);\n\t this.state = State.KEY_LOADING;\n\t hls.trigger(_events2.default.KEY_LOADING, { frag: frag });\n\t } else {\n\t _logger.logger.log('Loading ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level + ', currentTime:' + pos.toFixed(3) + ',bufferEnd:' + bufferEnd.toFixed(3));\n\t // ensure that we are not reloading the same fragments in loop ...\n\t if (this.fragLoadIdx !== undefined) {\n\t this.fragLoadIdx++;\n\t } else {\n\t this.fragLoadIdx = 0;\n\t }\n\t if (frag.loadCounter) {\n\t frag.loadCounter++;\n\t var maxThreshold = config.fragLoadingLoopThreshold;\n\t // if this frag has already been loaded 3 times, and if it has been reloaded recently\n\t if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });\n\t return false;\n\t }\n\t } else {\n\t frag.loadCounter = 1;\n\t }\n\t frag.loadIdx = this.fragLoadIdx;\n\t this.fragCurrent = frag;\n\t this.startFragRequested = true;\n\t frag.autoLevel = hls.autoLevelEnabled;\n\t frag.bitrateTest = this.bitrateTest;\n\t hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });\n\t this.state = State.FRAG_LOADING;\n\t return true;\n\t }\n\t }\n\t }, {\n\t key: 'getBufferRange',\n\t value: function getBufferRange(position) {\n\t var i,\n\t range,\n\t bufferRange = this.bufferRange;\n\t if (bufferRange) {\n\t for (i = bufferRange.length - 1; i >= 0; i--) {\n\t range = bufferRange[i];\n\t if (position >= range.start && position <= range.end) {\n\t return range;\n\t }\n\t }\n\t }\n\t return null;\n\t }\n\t }, {\n\t key: 'followingBufferRange',\n\t value: function followingBufferRange(range) {\n\t if (range) {\n\t // try to get range of next fragment (500ms after this range)\n\t return this.getBufferRange(range.end + 0.5);\n\t }\n\t return null;\n\t }\n\t }, {\n\t key: '_checkFragmentChanged',\n\t value: function _checkFragmentChanged() {\n\t var rangeCurrent,\n\t currentTime,\n\t video = this.media;\n\t if (video && video.readyState && video.seeking === false) {\n\t currentTime = video.currentTime;\n\t /* if video element is in seeked state, currentTime can only increase.\n\t (assuming that playback rate is positive ...)\n\t As sometimes currentTime jumps back to zero after a\n\t media decode error, check this, to avoid seeking back to\n\t wrong position after a media decode error\n\t */\n\t if (currentTime > video.playbackRate * this.lastCurrentTime) {\n\t this.lastCurrentTime = currentTime;\n\t }\n\t if (_bufferHelper2.default.isBuffered(video, currentTime)) {\n\t rangeCurrent = this.getBufferRange(currentTime);\n\t } else if (_bufferHelper2.default.isBuffered(video, currentTime + 0.1)) {\n\t /* ensure that FRAG_CHANGED event is triggered at startup,\n\t when first video frame is displayed and playback is paused.\n\t add a tolerance of 100ms, in case current position is not buffered,\n\t check if current pos+100ms is buffered and use that buffer range\n\t for FRAG_CHANGED event reporting */\n\t rangeCurrent = this.getBufferRange(currentTime + 0.1);\n\t }\n\t if (rangeCurrent) {\n\t var fragPlaying = rangeCurrent.frag;\n\t if (fragPlaying !== this.fragPlaying) {\n\t this.fragPlaying = fragPlaying;\n\t this.hls.trigger(_events2.default.FRAG_CHANGED, { frag: fragPlaying });\n\t }\n\t }\n\t }\n\t }\n\t\n\t /*\n\t on immediate level switch :\n\t - pause playback if playing\n\t - cancel any pending load request\n\t - and trigger a buffer flush\n\t */\n\t\n\t }, {\n\t key: 'immediateLevelSwitch',\n\t value: function immediateLevelSwitch() {\n\t _logger.logger.log('immediateLevelSwitch');\n\t if (!this.immediateSwitch) {\n\t this.immediateSwitch = true;\n\t var media = this.media,\n\t previouslyPaused = void 0;\n\t if (media) {\n\t previouslyPaused = media.paused;\n\t media.pause();\n\t } else {\n\t // don't restart playback after instant level switch in case media not attached\n\t previouslyPaused = true;\n\t }\n\t this.previouslyPaused = previouslyPaused;\n\t }\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && fragCurrent.loader) {\n\t fragCurrent.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t this.state = State.PAUSED;\n\t // flush everything\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });\n\t }\n\t\n\t /*\n\t on immediate level switch end, after new fragment has been buffered :\n\t - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)\n\t - resume the playback if needed\n\t */\n\t\n\t }, {\n\t key: 'immediateLevelSwitchEnd',\n\t value: function immediateLevelSwitchEnd() {\n\t var media = this.media;\n\t if (media && media.buffered.length) {\n\t this.immediateSwitch = false;\n\t if (_bufferHelper2.default.isBuffered(media, media.currentTime)) {\n\t // only nudge if currentTime is buffered\n\t media.currentTime -= 0.0001;\n\t }\n\t if (!this.previouslyPaused) {\n\t media.play();\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'nextLevelSwitch',\n\t value: function nextLevelSwitch() {\n\t /* try to switch ASAP without breaking video playback :\n\t in order to ensure smooth but quick level switching,\n\t we need to find the next flushable buffer range\n\t we should take into account new segment fetch time\n\t */\n\t var media = this.media;\n\t // ensure that media is defined and that metadata are available (to retrieve currentTime)\n\t if (media && media.readyState) {\n\t var fetchdelay = void 0,\n\t currentRange = void 0,\n\t nextRange = void 0;\n\t // increase fragment load Index to avoid frag loop loading error after buffer flush\n\t this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n\t currentRange = this.getBufferRange(media.currentTime);\n\t if (currentRange && currentRange.start > 1) {\n\t // flush buffer preceding current fragment (flush until current fragment start offset)\n\t // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n\t this.state = State.PAUSED;\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: currentRange.start - 1 });\n\t }\n\t if (!media.paused) {\n\t // add a safety delay of 1s\n\t var nextLevelId = this.hls.nextLoadLevel,\n\t nextLevel = this.levels[nextLevelId],\n\t fragLastKbps = this.fragLastKbps;\n\t if (fragLastKbps && this.fragCurrent) {\n\t fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n\t } else {\n\t fetchdelay = 0;\n\t }\n\t } else {\n\t fetchdelay = 0;\n\t }\n\t //logger.log('fetchdelay:'+fetchdelay);\n\t // find buffer range that will be reached once new fragment will be fetched\n\t nextRange = this.getBufferRange(media.currentTime + fetchdelay);\n\t if (nextRange) {\n\t // we can flush buffer range following this one without stalling playback\n\t nextRange = this.followingBufferRange(nextRange);\n\t if (nextRange) {\n\t // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && fragCurrent.loader) {\n\t fragCurrent.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t // flush position is the start position of this new buffer\n\t this.state = State.PAUSED;\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: nextRange.start, endOffset: Number.POSITIVE_INFINITY });\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onMediaAttached',\n\t value: function onMediaAttached(data) {\n\t var media = this.media = this.mediaBuffer = data.media;\n\t this.onvseeking = this.onMediaSeeking.bind(this);\n\t this.onvseeked = this.onMediaSeeked.bind(this);\n\t this.onvended = this.onMediaEnded.bind(this);\n\t media.addEventListener('seeking', this.onvseeking);\n\t media.addEventListener('seeked', this.onvseeked);\n\t media.addEventListener('ended', this.onvended);\n\t var config = this.config;\n\t if (this.levels && config.autoStartLoad) {\n\t this.hls.startLoad(config.startPosition);\n\t }\n\t }\n\t }, {\n\t key: 'onMediaDetaching',\n\t value: function onMediaDetaching() {\n\t var media = this.media;\n\t if (media && media.ended) {\n\t _logger.logger.log('MSE detaching and video ended, reset startPosition');\n\t this.startPosition = this.lastCurrentTime = 0;\n\t }\n\t\n\t // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n\t var levels = this.levels;\n\t if (levels) {\n\t // reset fragment load counter\n\t levels.forEach(function (level) {\n\t if (level.details) {\n\t level.details.fragments.forEach(function (fragment) {\n\t fragment.loadCounter = undefined;\n\t });\n\t }\n\t });\n\t }\n\t // remove video listeners\n\t if (media) {\n\t media.removeEventListener('seeking', this.onvseeking);\n\t media.removeEventListener('seeked', this.onvseeked);\n\t media.removeEventListener('ended', this.onvended);\n\t this.onvseeking = this.onvseeked = this.onvended = null;\n\t }\n\t this.media = null;\n\t this.loadedmetadata = false;\n\t this.stopLoad();\n\t }\n\t }, {\n\t key: 'onMediaSeeking',\n\t value: function onMediaSeeking() {\n\t var media = this.media,\n\t currentTime = media ? media.currentTime : undefined,\n\t config = this.config;\n\t _logger.logger.log('media seeking to ' + currentTime.toFixed(3));\n\t if (this.state === State.FRAG_LOADING) {\n\t var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, this.config.maxBufferHole),\n\t fragCurrent = this.fragCurrent;\n\t // check if we are seeking to a unbuffered area AND if frag loading is in progress\n\t if (bufferInfo.len === 0 && fragCurrent) {\n\t var tolerance = config.maxFragLookUpTolerance,\n\t fragStartOffset = fragCurrent.start - tolerance,\n\t fragEndOffset = fragCurrent.start + fragCurrent.duration + tolerance;\n\t // check if we seek position will be out of currently loaded frag range : if out cancel frag load, if in, don't do anything\n\t if (currentTime < fragStartOffset || currentTime > fragEndOffset) {\n\t if (fragCurrent.loader) {\n\t _logger.logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n\t fragCurrent.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t this.fragPrevious = null;\n\t // switch to IDLE state to load new fragment\n\t this.state = State.IDLE;\n\t } else {\n\t _logger.logger.log('seeking outside of buffer but within currently loaded fragment range');\n\t }\n\t }\n\t } else if (this.state === State.ENDED) {\n\t // switch to IDLE state to check for potential new fragment\n\t this.state = State.IDLE;\n\t }\n\t if (media) {\n\t this.lastCurrentTime = currentTime;\n\t }\n\t // avoid reporting fragment loop loading error in case user is seeking several times on same position\n\t if (this.state !== State.FRAG_LOADING && this.fragLoadIdx !== undefined) {\n\t this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;\n\t }\n\t // tick to speed up processing\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onMediaSeeked',\n\t value: function onMediaSeeked() {\n\t _logger.logger.log('media seeked to ' + this.media.currentTime.toFixed(3));\n\t // tick to speed up FRAGMENT_PLAYING triggering\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onMediaEnded',\n\t value: function onMediaEnded() {\n\t _logger.logger.log('media ended');\n\t // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n\t this.startPosition = this.lastCurrentTime = 0;\n\t }\n\t }, {\n\t key: 'onManifestLoading',\n\t value: function onManifestLoading() {\n\t // reset buffer on manifest loading\n\t _logger.logger.log('trigger BUFFER_RESET');\n\t this.hls.trigger(_events2.default.BUFFER_RESET);\n\t this.bufferRange = [];\n\t this.stalled = false;\n\t this.startPosition = this.lastCurrentTime = 0;\n\t }\n\t }, {\n\t key: 'onManifestParsed',\n\t value: function onManifestParsed(data) {\n\t var aac = false,\n\t heaac = false,\n\t codec;\n\t data.levels.forEach(function (level) {\n\t // detect if we have different kind of audio codecs used amongst playlists\n\t codec = level.audioCodec;\n\t if (codec) {\n\t if (codec.indexOf('mp4a.40.2') !== -1) {\n\t aac = true;\n\t }\n\t if (codec.indexOf('mp4a.40.5') !== -1) {\n\t heaac = true;\n\t }\n\t }\n\t });\n\t this.audioCodecSwitch = aac && heaac;\n\t if (this.audioCodecSwitch) {\n\t _logger.logger.log('both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC');\n\t }\n\t this.levels = data.levels;\n\t this.startLevelLoaded = false;\n\t this.startFragRequested = false;\n\t var config = this.config;\n\t if (config.autoStartLoad) {\n\t this.hls.startLoad(config.startPosition);\n\t }\n\t }\n\t }, {\n\t key: 'onLevelLoaded',\n\t value: function onLevelLoaded(data) {\n\t var newDetails = data.details,\n\t newLevelId = data.level,\n\t curLevel = this.levels[newLevelId],\n\t duration = newDetails.totalduration,\n\t sliding = 0;\n\t\n\t _logger.logger.log('level ' + newLevelId + ' loaded [' + newDetails.startSN + ',' + newDetails.endSN + '],duration:' + duration);\n\t this.levelLastLoaded = newLevelId;\n\t\n\t if (newDetails.live) {\n\t var curDetails = curLevel.details;\n\t if (curDetails && newDetails.fragments.length > 0) {\n\t // we already have details for that level, merge them\n\t _levelHelper2.default.mergeDetails(curDetails, newDetails);\n\t sliding = newDetails.fragments[0].start;\n\t this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n\t if (newDetails.PTSKnown) {\n\t _logger.logger.log('live playlist sliding:' + sliding.toFixed(3));\n\t } else {\n\t _logger.logger.log('live playlist - outdated PTS, unknown sliding');\n\t }\n\t } else {\n\t newDetails.PTSKnown = false;\n\t _logger.logger.log('live playlist - first load, unknown sliding');\n\t }\n\t } else {\n\t newDetails.PTSKnown = false;\n\t }\n\t // override level info\n\t curLevel.details = newDetails;\n\t this.hls.trigger(_events2.default.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n\t\n\t if (this.startFragRequested === false) {\n\t // compute start position if set to -1. use it straight away if value is defined\n\t if (this.startPosition === -1 || this.lastCurrentTime === -1) {\n\t // first, check if start time offset has been set in playlist, if yes, use this value\n\t var startTimeOffset = newDetails.startTimeOffset;\n\t if (!isNaN(startTimeOffset)) {\n\t if (startTimeOffset < 0) {\n\t _logger.logger.log('negative start time offset ' + startTimeOffset + ', count from end of last fragment');\n\t startTimeOffset = sliding + duration + startTimeOffset;\n\t }\n\t _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);\n\t this.startPosition = startTimeOffset;\n\t } else {\n\t // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n\t if (newDetails.live) {\n\t this.startPosition = this.computeLivePosition(sliding, newDetails);\n\t _logger.logger.log('configure startPosition to ' + this.startPosition);\n\t } else {\n\t this.startPosition = 0;\n\t }\n\t }\n\t }\n\t this.nextLoadPosition = this.startPosition;\n\t }\n\t // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n\t if (this.state === State.WAITING_LEVEL) {\n\t this.state = State.IDLE;\n\t }\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onKeyLoaded',\n\t value: function onKeyLoaded() {\n\t if (this.state === State.KEY_LOADING) {\n\t this.state = State.IDLE;\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onFragLoaded',\n\t value: function onFragLoaded(data) {\n\t var fragCurrent = this.fragCurrent,\n\t fragLoaded = data.frag;\n\t if (this.state === State.FRAG_LOADING && fragCurrent && fragLoaded.type === 'main' && fragLoaded.level === fragCurrent.level && fragLoaded.sn === fragCurrent.sn) {\n\t var stats = data.stats,\n\t currentLevel = this.levels[fragCurrent.level],\n\t details = currentLevel.details;\n\t _logger.logger.log('Loaded ' + fragCurrent.sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + fragCurrent.level);\n\t // reset frag bitrate test in any case after frag loaded event\n\t this.bitrateTest = false;\n\t // if this frag was loaded to perform a bitrate test AND if hls.nextLoadLevel is greater than 0\n\t // then this means that we should be able to load a fragment at a higher quality level\n\t if (fragLoaded.bitrateTest === true && this.hls.nextLoadLevel) {\n\t // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n\t this.state = State.IDLE;\n\t this.startFragRequested = false;\n\t stats.tparsed = stats.tbuffered = performance.now();\n\t this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n\t this.tick();\n\t } else {\n\t this.state = State.PARSING;\n\t // transmux the MPEG-TS data to ISO-BMFF segments\n\t this.stats = stats;\n\t var duration = details.totalduration,\n\t start = !isNaN(fragCurrent.startDTS) ? fragCurrent.startDTS : fragCurrent.start,\n\t level = fragCurrent.level,\n\t sn = fragCurrent.sn,\n\t audioCodec = this.config.defaultAudioCodec || currentLevel.audioCodec;\n\t if (this.audioCodecSwap) {\n\t _logger.logger.log('swapping playlist audio codec');\n\t if (audioCodec === undefined) {\n\t audioCodec = this.lastAudioCodec;\n\t }\n\t if (audioCodec) {\n\t if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n\t audioCodec = 'mp4a.40.2';\n\t } else {\n\t audioCodec = 'mp4a.40.5';\n\t }\n\t }\n\t }\n\t this.pendingAppending = 0;\n\t _logger.logger.log('Parsing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + level + ', cc ' + fragCurrent.cc);\n\t var demuxer = this.demuxer;\n\t if (!demuxer) {\n\t demuxer = this.demuxer = new _demuxer2.default(this.hls, 'main');\n\t }\n\t // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n\t var accurateTimeOffset = details.PTSKnown || !details.live;\n\t demuxer.push(data.payload, audioCodec, currentLevel.videoCodec, start, fragCurrent.cc, level, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);\n\t }\n\t }\n\t this.fragLoadError = 0;\n\t }\n\t }, {\n\t key: 'onFragParsingInitSegment',\n\t value: function onFragParsingInitSegment(data) {\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n\t var tracks = data.tracks,\n\t trackName,\n\t track;\n\t\n\t // if audio track is expected to come from audio stream controller, discard any coming from main\n\t if (tracks.audio && this.altAudio) {\n\t delete tracks.audio;\n\t }\n\t // include levelCodec in audio and video tracks\n\t track = tracks.audio;\n\t if (track) {\n\t var audioCodec = this.levels[this.level].audioCodec,\n\t ua = navigator.userAgent.toLowerCase();\n\t if (audioCodec && this.audioCodecSwap) {\n\t _logger.logger.log('swapping playlist audio codec');\n\t if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n\t audioCodec = 'mp4a.40.2';\n\t } else {\n\t audioCodec = 'mp4a.40.5';\n\t }\n\t }\n\t // in case AAC and HE-AAC audio codecs are signalled in manifest\n\t // force HE-AAC , as it seems that most browsers prefers that way,\n\t // except for mono streams OR on FF\n\t // these conditions might need to be reviewed ...\n\t if (this.audioCodecSwitch) {\n\t // don't force HE-AAC if mono stream\n\t if (track.metadata.channelCount !== 1 &&\n\t // don't force HE-AAC if firefox\n\t ua.indexOf('firefox') === -1) {\n\t audioCodec = 'mp4a.40.5';\n\t }\n\t }\n\t // HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise\n\t if (ua.indexOf('android') !== -1) {\n\t audioCodec = 'mp4a.40.2';\n\t _logger.logger.log('Android: force audio codec to' + audioCodec);\n\t }\n\t track.levelCodec = audioCodec;\n\t track.id = data.id;\n\t }\n\t track = tracks.video;\n\t if (track) {\n\t track.levelCodec = this.levels[this.level].videoCodec;\n\t track.id = data.id;\n\t }\n\t\n\t // if remuxer specify that a unique track needs to generated,\n\t // let's merge all tracks together\n\t if (data.unique) {\n\t var mergedTrack = {\n\t codec: '',\n\t levelCodec: ''\n\t };\n\t for (trackName in data.tracks) {\n\t track = tracks[trackName];\n\t mergedTrack.container = track.container;\n\t if (mergedTrack.codec) {\n\t mergedTrack.codec += ',';\n\t mergedTrack.levelCodec += ',';\n\t }\n\t if (track.codec) {\n\t mergedTrack.codec += track.codec;\n\t }\n\t if (track.levelCodec) {\n\t mergedTrack.levelCodec += track.levelCodec;\n\t }\n\t }\n\t tracks = { audiovideo: mergedTrack };\n\t }\n\t this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);\n\t // loop through tracks that are going to be provided to bufferController\n\t for (trackName in tracks) {\n\t track = tracks[trackName];\n\t _logger.logger.log('main track:' + trackName + ',container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');\n\t var initSegment = track.initSegment;\n\t if (initSegment) {\n\t this.pendingAppending++;\n\t this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: trackName, data: initSegment, parent: 'main', content: 'initSegment' });\n\t }\n\t }\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onFragParsingData',\n\t value: function onFragParsingData(data) {\n\t var _this2 = this;\n\t\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && !(data.type === 'audio' && this.altAudio) && // filter out main audio if audio track is loaded through audio stream controller\n\t this.state === State.PARSING) {\n\t var level = this.levels[this.level],\n\t frag = this.fragCurrent;\n\t\n\t _logger.logger.log('Parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb + ',dropped:' + (data.dropped || 0));\n\t\n\t var drift = _levelHelper2.default.updateFragPTSDTS(level.details, frag.sn, data.startPTS, data.endPTS, data.startDTS, data.endDTS),\n\t hls = this.hls;\n\t hls.trigger(_events2.default.LEVEL_PTS_UPDATED, { details: level.details, level: this.level, drift: drift });\n\t\n\t // has remuxer dropped video frames located before first keyframe ?\n\t if (data.type === 'video') {\n\t frag.dropped = data.dropped;\n\t }\n\t\n\t [data.data1, data.data2].forEach(function (buffer) {\n\t if (buffer) {\n\t _this2.pendingAppending++;\n\t hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'main', content: 'data' });\n\t }\n\t });\n\t\n\t this.nextLoadPosition = data.endPTS;\n\t this.bufferRange.push({ type: data.type, start: data.startPTS, end: data.endPTS, frag: frag });\n\t\n\t //trigger handler right now\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onFragParsed',\n\t value: function onFragParsed(data) {\n\t var fragCurrent = this.fragCurrent;\n\t if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n\t this.stats.tparsed = performance.now();\n\t this.state = State.PARSED;\n\t this._checkAppendedParsed();\n\t }\n\t }\n\t }, {\n\t key: 'onAudioTrackSwitch',\n\t value: function onAudioTrackSwitch(data) {\n\t // if any URL found on new audio track, it is an alternate audio track\n\t var altAudio = !!data.url;\n\t // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered\n\t if (!altAudio) {\n\t if (this.mediaBuffer !== this.media) {\n\t _logger.logger.log('switching on main audio, use media.buffered to schedule main fragment loading');\n\t this.mediaBuffer = this.media;\n\t var fragCurrent = this.fragCurrent;\n\t // we need to refill audio buffer from main: cancel any frag loading to speed up audio switch\n\t if (fragCurrent.loader) {\n\t _logger.logger.log('switching to main audio track, cancel main fragment load');\n\t fragCurrent.loader.abort();\n\t }\n\t this.fragCurrent = null;\n\t this.fragPrevious = null;\n\t // destroy demuxer to force init segment generation (following audio switch)\n\t if (this.demuxer) {\n\t this.demuxer.destroy();\n\t this.demuxer = null;\n\t }\n\t // switch to IDLE state to load new fragment\n\t this.state = State.IDLE;\n\t }\n\t } else {\n\t // if we switch on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered\n\t if (this.videoBuffer && this.mediaBuffer !== this.videoBuffer) {\n\t _logger.logger.log('switching on alternate audio, use video.buffered to schedule main fragment loading');\n\t this.mediaBuffer = this.videoBuffer;\n\t }\n\t }\n\t this.altAudio = altAudio;\n\t }\n\t }, {\n\t key: 'onBufferCreated',\n\t value: function onBufferCreated(data) {\n\t var tracks = data.tracks,\n\t mediaTrack = void 0,\n\t name = void 0,\n\t alternate = false;\n\t for (var type in tracks) {\n\t var track = tracks[type];\n\t if (track.id === 'main') {\n\t name = type;\n\t mediaTrack = track;\n\t // keep video source buffer reference\n\t if (type === 'video') {\n\t this.videoBuffer = tracks[type].buffer;\n\t }\n\t } else {\n\t alternate = true;\n\t }\n\t }\n\t if (alternate && mediaTrack) {\n\t _logger.logger.log('alternate track found, use ' + name + '.buffered to schedule main fragment loading');\n\t this.mediaBuffer = mediaTrack.buffer;\n\t } else {\n\t this.mediaBuffer = this.media;\n\t }\n\t }\n\t }, {\n\t key: 'onBufferAppended',\n\t value: function onBufferAppended(data) {\n\t if (data.parent === 'main') {\n\t switch (this.state) {\n\t case State.PARSING:\n\t case State.PARSED:\n\t this.pendingAppending--;\n\t this._checkAppendedParsed();\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }\n\t }, {\n\t key: '_checkAppendedParsed',\n\t value: function _checkAppendedParsed() {\n\t //trigger handler right now\n\t if (this.state === State.PARSED && this.pendingAppending === 0) {\n\t var frag = this.fragCurrent,\n\t stats = this.stats;\n\t if (frag) {\n\t this.fragPrevious = frag;\n\t stats.tbuffered = performance.now();\n\t // we should get rid of this.fragLastKbps\n\t this.fragLastKbps = Math.round(8 * stats.total / (stats.tbuffered - stats.tfirst));\n\t this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'main' });\n\t var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n\t _logger.logger.log('main buffered : ' + _timeRanges2.default.toString(media.buffered));\n\t this.state = State.IDLE;\n\t }\n\t this.tick();\n\t }\n\t }\n\t }, {\n\t key: 'onError',\n\t value: function onError(data) {\n\t var frag = data.frag || this.fragCurrent;\n\t // don't handle frag error not related to main fragment\n\t if (frag && frag.type !== 'main') {\n\t return;\n\t }\n\t var media = this.media,\n\t\n\t // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n\t mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);\n\t switch (data.details) {\n\t case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n\t case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n\t if (!data.fatal) {\n\t var loadError = this.fragLoadError;\n\t if (loadError) {\n\t loadError++;\n\t } else {\n\t loadError = 1;\n\t }\n\t var config = this.config;\n\t // keep retrying / don't raise fatal network error if current position is buffered\n\t if (loadError <= config.fragLoadingMaxRetry || mediaBuffered) {\n\t this.fragLoadError = loadError;\n\t // reset load counter to avoid frag loop loading error\n\t frag.loadCounter = 0;\n\t // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n\t var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n\t _logger.logger.warn('mediaController: frag loading failed, retry in ' + delay + ' ms');\n\t this.retryDate = performance.now() + delay;\n\t // retry loading state\n\t this.state = State.FRAG_LOADING_WAITING_RETRY;\n\t } else {\n\t _logger.logger.error('mediaController: ' + data.details + ' reaches max retry, redispatch as fatal ...');\n\t // redispatch same error but with fatal set to true\n\t data.fatal = true;\n\t this.hls.trigger(_events2.default.ERROR, data);\n\t this.state = State.ERROR;\n\t }\n\t }\n\t break;\n\t case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n\t if (!data.fatal) {\n\t // if buffer is not empty\n\t if (mediaBuffered) {\n\t // try to reduce max buffer length : rationale is that we could get\n\t // frag loop loading error because of buffer eviction\n\t this._reduceMaxBufferLength(frag.duration);\n\t this.state = State.IDLE;\n\t } else {\n\t // buffer empty. report as fatal if in manual mode or if lowest level.\n\t // level controller takes care of emergency switch down logic\n\t if (!frag.autoLevel || frag.level === 0) {\n\t // redispatch same error but with fatal set to true\n\t data.fatal = true;\n\t this.hls.trigger(_events2.default.ERROR, data);\n\t this.state = State.ERROR;\n\t }\n\t }\n\t }\n\t break;\n\t case _errors.ErrorDetails.LEVEL_LOAD_ERROR:\n\t case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n\t case _errors.ErrorDetails.KEY_LOAD_ERROR:\n\t case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n\t // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n\t if (this.state !== State.ERROR) {\n\t // if fatal error, stop processing, otherwise move to IDLE to retry loading\n\t this.state = data.fatal ? State.ERROR : State.IDLE;\n\t _logger.logger.warn('mediaController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');\n\t }\n\t break;\n\t case _errors.ErrorDetails.BUFFER_FULL_ERROR:\n\t // if in appending state\n\t if (this.state === State.PARSING || this.state === State.PARSED) {\n\t // reduce max buf len if current position is buffered\n\t if (mediaBuffered) {\n\t this._reduceMaxBufferLength(frag.duration);\n\t this.state = State.IDLE;\n\t } else {\n\t // current position is not buffered, but browser is still complaining about buffer full error\n\t // this happens on IE/Edge, refer to https://github.com/dailymotion/hls.js/pull/708\n\t // in that case flush the whole buffer to recover\n\t _logger.logger.warn('buffer full error also media.currentTime is not buffered, flush everything');\n\t this.fragCurrent = null;\n\t this.state = State.PAUSED;\n\t // flush everything\n\t this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });\n\t }\n\t }\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }, {\n\t key: '_reduceMaxBufferLength',\n\t value: function _reduceMaxBufferLength(minLength) {\n\t var config = this.config;\n\t if (config.maxMaxBufferLength >= minLength) {\n\t // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n\t config.maxMaxBufferLength /= 2;\n\t _logger.logger.warn('reduce max buffer length to ' + config.maxMaxBufferLength + 's and switch to IDLE state');\n\t // increase fragment load Index to avoid frag loop loading error after buffer flush\n\t this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;\n\t }\n\t }\n\t }, {\n\t key: '_checkBuffer',\n\t value: function _checkBuffer() {\n\t var media = this.media;\n\t // if ready state different from HAVE_NOTHING (numeric value 0), we are allowed to seek\n\t if (media && media.readyState) {\n\t var currentTime = media.currentTime,\n\t buffered = media.buffered;\n\t // adjust currentTime to start position on loaded metadata\n\t if (!this.loadedmetadata && buffered.length) {\n\t this.loadedmetadata = true;\n\t // only adjust currentTime if different from startPosition or if startPosition not buffered\n\t // at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered\n\t var startPosition = this.startPosition,\n\t startPositionBuffered = _bufferHelper2.default.isBuffered(media, startPosition);\n\t // if currentTime not matching with expected startPosition or startPosition not buffered\n\t if (currentTime !== startPosition || !startPositionBuffered) {\n\t _logger.logger.log('target start position:' + startPosition);\n\t // if startPosition not buffered, let's seek to buffered.start(0)\n\t if (!startPositionBuffered) {\n\t startPosition = buffered.start(0);\n\t _logger.logger.log('target start position not buffered, seek to buffered.start(0) ' + startPosition);\n\t }\n\t _logger.logger.log('adjust currentTime from ' + currentTime + ' to ' + startPosition);\n\t media.currentTime = startPosition;\n\t }\n\t } else if (this.immediateSwitch) {\n\t this.immediateLevelSwitchEnd();\n\t } else {\n\t var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, 0),\n\t expectedPlaying = !(media.paused || // not playing when media is paused\n\t media.ended || // not playing when media is ended\n\t media.buffered.length === 0),\n\t // not playing if nothing buffered\n\t jumpThreshold = 0.5,\n\t // tolerance needed as some browsers stalls playback before reaching buffered range end\n\t playheadMoving = currentTime > media.playbackRate * this.lastCurrentTime,\n\t config = this.config;\n\t\n\t if (this.stalled && playheadMoving) {\n\t this.stalled = false;\n\t _logger.logger.log('playback not stuck anymore @' + currentTime);\n\t }\n\t // check buffer upfront\n\t // if less than jumpThreshold second is buffered, let's check in more details\n\t if (expectedPlaying && bufferInfo.len <= jumpThreshold) {\n\t if (playheadMoving) {\n\t // playhead moving\n\t jumpThreshold = 0;\n\t this.seekHoleNudgeDuration = 0;\n\t } else {\n\t // playhead not moving AND media expected to play\n\t if (!this.stalled) {\n\t this.seekHoleNudgeDuration = 0;\n\t _logger.logger.log('playback seems stuck @' + currentTime);\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_STALLED_ERROR, fatal: false });\n\t this.stalled = true;\n\t } else {\n\t this.seekHoleNudgeDuration += config.seekHoleNudgeDuration;\n\t }\n\t }\n\t // if we are below threshold, try to jump to start of next buffer range if close\n\t if (bufferInfo.len <= jumpThreshold) {\n\t // no buffer available @ currentTime, check if next buffer is close (within a config.maxSeekHole second range)\n\t var nextBufferStart = bufferInfo.nextStart,\n\t delta = nextBufferStart - currentTime;\n\t if (nextBufferStart && delta < config.maxSeekHole && delta > 0) {\n\t // next buffer is close ! adjust currentTime to nextBufferStart\n\t // this will ensure effective video decoding\n\t _logger.logger.log('adjust currentTime from ' + media.currentTime + ' to next buffered @ ' + nextBufferStart + ' + nudge ' + this.seekHoleNudgeDuration);\n\t var hole = nextBufferStart + this.seekHoleNudgeDuration - media.currentTime;\n\t media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false, hole: hole });\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'onFragLoadEmergencyAborted',\n\t value: function onFragLoadEmergencyAborted() {\n\t this.state = State.IDLE;\n\t // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n\t // in that case, reset startFragRequested flag\n\t if (!this.loadedmetadata) {\n\t this.startFragRequested = false;\n\t }\n\t this.tick();\n\t }\n\t }, {\n\t key: 'onBufferFlushed',\n\t value: function onBufferFlushed() {\n\t /* after successful buffer flushing, rebuild buffer Range array\n\t loop through existing buffer range and check if\n\t corresponding range is still buffered. only push to new array already buffered range\n\t use mediaBuffered instead of media (so that we will check against video.buffered ranges in case of alt audio track)\n\t */\n\t var media = this.mediaBuffer ? this.mediaBuffer : this.media,\n\t bufferRange = this.bufferRange,\n\t newRange = [],\n\t range = void 0,\n\t i = void 0;\n\t for (i = 0; i < bufferRange.length; i++) {\n\t range = bufferRange[i];\n\t if (_bufferHelper2.default.isBuffered(media, (range.start + range.end) / 2)) {\n\t newRange.push(range);\n\t }\n\t }\n\t this.bufferRange = newRange;\n\t\n\t // increase fragment load Index to avoid frag loop loading error after buffer flush\n\t this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n\t // move to IDLE once flush complete. this should trigger new fragment loading\n\t this.state = State.IDLE;\n\t // reset reference to frag\n\t this.fragPrevious = null;\n\t }\n\t }, {\n\t key: 'swapAudioCodec',\n\t value: function swapAudioCodec() {\n\t this.audioCodecSwap = !this.audioCodecSwap;\n\t }\n\t }, {\n\t key: 'computeLivePosition',\n\t value: function computeLivePosition(sliding, levelDetails) {\n\t var targetLatency = this.config.liveSyncDuration !== undefined ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * levelDetails.targetduration;\n\t return sliding + Math.max(0, levelDetails.totalduration - targetLatency);\n\t }\n\t }, {\n\t key: 'state',\n\t set: function set(nextState) {\n\t if (this.state !== nextState) {\n\t var previousState = this.state;\n\t this._state = nextState;\n\t _logger.logger.log('engine state transition from ' + previousState + ' to ' + nextState);\n\t this.hls.trigger(_events2.default.STREAM_STATE_TRANSITION, { previousState: previousState, nextState: nextState });\n\t }\n\t },\n\t get: function get() {\n\t return this._state;\n\t }\n\t }, {\n\t key: 'currentLevel',\n\t get: function get() {\n\t var media = this.media;\n\t if (media) {\n\t var range = this.getBufferRange(media.currentTime);\n\t if (range) {\n\t return range.frag.level;\n\t }\n\t }\n\t return -1;\n\t }\n\t }, {\n\t key: 'nextBufferRange',\n\t get: function get() {\n\t var media = this.media;\n\t if (media) {\n\t // first get end range of current fragment\n\t return this.followingBufferRange(this.getBufferRange(media.currentTime));\n\t } else {\n\t return null;\n\t }\n\t }\n\t }, {\n\t key: 'nextLevel',\n\t get: function get() {\n\t var range = this.nextBufferRange;\n\t if (range) {\n\t return range.frag.level;\n\t } else {\n\t return -1;\n\t }\n\t }\n\t }, {\n\t key: 'liveSyncPosition',\n\t get: function get() {\n\t return this._liveSyncPosition;\n\t },\n\t set: function set(value) {\n\t this._liveSyncPosition = value;\n\t }\n\t }]);\n\t\n\t return StreamController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = StreamController;\n\t\n\t},{\"20\":20,\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"29\":29,\"39\":39,\"43\":43,\"45\":45}],12:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _cea608Parser = _dereq_(40);\n\t\n\tvar _cea608Parser2 = _interopRequireDefault(_cea608Parser);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Timeline Controller\n\t */\n\t\n\tvar TimelineController = function (_EventHandler) {\n\t _inherits(TimelineController, _EventHandler);\n\t\n\t function TimelineController(hls) {\n\t _classCallCheck(this, TimelineController);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(TimelineController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.FRAG_PARSING_USERDATA, _events2.default.MANIFEST_LOADING, _events2.default.FRAG_LOADED, _events2.default.LEVEL_SWITCH));\n\t\n\t _this.hls = hls;\n\t _this.config = hls.config;\n\t _this.enabled = true;\n\t _this.Cues = hls.config.cueHandler;\n\t\n\t if (_this.config.enableCEA708Captions) {\n\t var self = _this;\n\t\n\t var channel1 = {\n\t 'newCue': function newCue(startTime, endTime, screen) {\n\t if (!self.textTrack1) {\n\t //Enable reuse of existing text track.\n\t var existingTrack1 = self.getExistingTrack('1');\n\t if (!existingTrack1) {\n\t self.textTrack1 = self.createTextTrack('captions', 'English', 'en');\n\t self.textTrack1.textTrack1 = true;\n\t } else {\n\t self.textTrack1 = existingTrack1;\n\t self.clearCurrentCues(self.textTrack1);\n\t\n\t var e = new window.Event('addtrack');\n\t e.track = self.textTrack1;\n\t self.media.dispatchEvent(e);\n\t }\n\t }\n\t\n\t self.Cues.newCue(self.textTrack1, startTime, endTime, screen);\n\t }\n\t };\n\t\n\t var channel2 = {\n\t 'newCue': function newCue(startTime, endTime, screen) {\n\t if (!self.textTrack2) {\n\t //Enable reuse of existing text track.\n\t var existingTrack2 = self.getExistingTrack('2');\n\t if (!existingTrack2) {\n\t self.textTrack2 = self.createTextTrack('captions', 'Spanish', 'es');\n\t self.textTrack2.textTrack2 = true;\n\t } else {\n\t self.textTrack2 = existingTrack2;\n\t self.clearCurrentCues(self.textTrack2);\n\t\n\t var e = new window.Event('addtrack');\n\t e.track = self.textTrack2;\n\t self.media.dispatchEvent(e);\n\t }\n\t }\n\t\n\t self.Cues.newCue(self.textTrack2, startTime, endTime, screen);\n\t }\n\t };\n\t\n\t _this.cea608Parser = new _cea608Parser2.default(0, channel1, channel2);\n\t }\n\t return _this;\n\t }\n\t\n\t _createClass(TimelineController, [{\n\t key: 'clearCurrentCues',\n\t value: function clearCurrentCues(track) {\n\t if (track && track.cues) {\n\t while (track.cues.length > 0) {\n\t track.removeCue(track.cues[0]);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'getExistingTrack',\n\t value: function getExistingTrack(channelNumber) {\n\t var media = this.media;\n\t if (media) {\n\t for (var i = 0; i < media.textTracks.length; i++) {\n\t var textTrack = media.textTracks[i];\n\t var propName = 'textTrack' + channelNumber;\n\t if (textTrack[propName] === true) {\n\t return textTrack;\n\t }\n\t }\n\t }\n\t return null;\n\t }\n\t }, {\n\t key: 'createTextTrack',\n\t value: function createTextTrack(kind, label, lang) {\n\t if (this.media) {\n\t return this.media.addTextTrack(kind, label, lang);\n\t }\n\t }\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onMediaAttaching',\n\t value: function onMediaAttaching(data) {\n\t this.media = data.media;\n\t }\n\t }, {\n\t key: 'onMediaDetaching',\n\t value: function onMediaDetaching() {}\n\t }, {\n\t key: 'onManifestLoading',\n\t value: function onManifestLoading() {\n\t this.lastPts = Number.NEGATIVE_INFINITY;\n\t }\n\t }, {\n\t key: 'onLevelSwitch',\n\t value: function onLevelSwitch() {\n\t if (this.hls.currentLevel.closedCaptions === 'NONE') {\n\t this.enabled = false;\n\t } else {\n\t this.enabled = true;\n\t }\n\t }\n\t }, {\n\t key: 'onFragLoaded',\n\t value: function onFragLoaded(data) {\n\t if (data.frag.type === 'main') {\n\t var pts = data.frag.start; //Number.POSITIVE_INFINITY;\n\t // if this is a frag for a previously loaded timerange, remove all captions\n\t // TODO: consider just removing captions for the timerange\n\t if (pts <= this.lastPts) {\n\t this.clearCurrentCues(this.textTrack1);\n\t this.clearCurrentCues(this.textTrack2);\n\t }\n\t this.lastPts = pts;\n\t }\n\t }\n\t }, {\n\t key: 'onFragParsingUserdata',\n\t value: function onFragParsingUserdata(data) {\n\t // push all of the CEA-708 messages into the interpreter\n\t // immediately. It will create the proper timestamps based on our PTS value\n\t if (this.enabled) {\n\t for (var i = 0; i < data.samples.length; i++) {\n\t var ccdatas = this.extractCea608Data(data.samples[i].bytes);\n\t this.cea608Parser.addData(data.samples[i].pts, ccdatas);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'extractCea608Data',\n\t value: function extractCea608Data(byteArray) {\n\t var count = byteArray[0] & 31;\n\t var position = 2;\n\t var tmpByte, ccbyte1, ccbyte2, ccValid, ccType;\n\t var actualCCBytes = [];\n\t\n\t for (var j = 0; j < count; j++) {\n\t tmpByte = byteArray[position++];\n\t ccbyte1 = 0x7F & byteArray[position++];\n\t ccbyte2 = 0x7F & byteArray[position++];\n\t ccValid = (4 & tmpByte) === 0 ? false : true;\n\t ccType = 3 & tmpByte;\n\t\n\t if (ccbyte1 === 0 && ccbyte2 === 0) {\n\t continue;\n\t }\n\t\n\t if (ccValid) {\n\t if (ccType === 0) // || ccType === 1\n\t {\n\t actualCCBytes.push(ccbyte1);\n\t actualCCBytes.push(ccbyte2);\n\t }\n\t }\n\t }\n\t return actualCCBytes;\n\t }\n\t }]);\n\t\n\t return TimelineController;\n\t}(_eventHandler2.default);\n\t\n\texports.default = TimelineController;\n\t\n\t},{\"25\":25,\"26\":26,\"40\":40}],13:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t *\n\t * This file contains an adaptation of the AES decryption algorithm\n\t * from the Standford Javascript Cryptography Library. That work is\n\t * covered by the following copyright and permissions notice:\n\t *\n\t * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n\t * All rights reserved.\n\t *\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * 1. Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t *\n\t * 2. Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n\t * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\t * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\t * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n\t * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n\t * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n\t * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n\t * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n\t * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n\t * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n\t * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t *\n\t * The views and conclusions contained in the software and documentation\n\t * are those of the authors and should not be interpreted as representing\n\t * official policies, either expressed or implied, of the authors.\n\t */\n\t\n\tvar AES = function () {\n\t\n\t /**\n\t * Schedule out an AES key for both encryption and decryption. This\n\t * is a low-level class. Use a cipher mode to do bulk encryption.\n\t *\n\t * @constructor\n\t * @param key {Array} The key as an array of 4, 6 or 8 words.\n\t */\n\t\n\t function AES(key) {\n\t _classCallCheck(this, AES);\n\t\n\t /**\n\t * The expanded S-box and inverse S-box tables. These will be computed\n\t * on the client so that we don't have to send them down the wire.\n\t *\n\t * There are two tables, _tables[0] is for encryption and\n\t * _tables[1] is for decryption.\n\t *\n\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t * last (_tables[01][4]) is the S-box itself.\n\t *\n\t * @private\n\t */\n\t this._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\t\n\t this._precompute();\n\t\n\t var i,\n\t j,\n\t tmp,\n\t encKey,\n\t decKey,\n\t sbox = this._tables[0][4],\n\t decTable = this._tables[1],\n\t keyLen = key.length,\n\t rcon = 1;\n\t\n\t if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t throw new Error('Invalid aes key size=' + keyLen);\n\t }\n\t\n\t encKey = key.slice(0);\n\t decKey = [];\n\t this._key = [encKey, decKey];\n\t\n\t // schedule encryption keys\n\t for (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t tmp = encKey[i - 1];\n\t\n\t // apply sbox\n\t if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n\t tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\t\n\t // shift rows and add rcon\n\t if (i % keyLen === 0) {\n\t tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t rcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t }\n\t }\n\t\n\t encKey[i] = encKey[i - keyLen] ^ tmp;\n\t }\n\t\n\t // schedule decryption keys\n\t for (j = 0; i; j++, i--) {\n\t tmp = encKey[j & 3 ? i : i - 4];\n\t if (i <= 4 || j < 4) {\n\t decKey[j] = tmp;\n\t } else {\n\t decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t\n\t\n\t _createClass(AES, [{\n\t key: '_precompute',\n\t value: function _precompute() {\n\t var encTable = this._tables[0],\n\t decTable = this._tables[1],\n\t sbox = encTable[4],\n\t sboxInv = decTable[4],\n\t i,\n\t x,\n\t xInv,\n\t d = [],\n\t th = [],\n\t x2,\n\t x4,\n\t x8,\n\t s,\n\t tEnc,\n\t tDec;\n\t\n\t // Compute double and third tables\n\t for (i = 0; i < 256; i++) {\n\t th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t }\n\t\n\t for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t // Compute sbox\n\t s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t s = s >> 8 ^ s & 255 ^ 99;\n\t sbox[x] = s;\n\t sboxInv[s] = x;\n\t\n\t // Compute MixColumns\n\t x8 = d[x4 = d[x2 = d[x]]];\n\t tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\t\n\t for (i = 0; i < 4; i++) {\n\t encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t }\n\t }\n\t\n\t // Compactify. Considerable speedup on Firefox.\n\t for (i = 0; i < 5; i++) {\n\t encTable[i] = encTable[i].slice(0);\n\t decTable[i] = decTable[i].slice(0);\n\t }\n\t }\n\t\n\t /**\n\t * Decrypt 16 bytes, specified as four 32-bit words.\n\t * @param encrypted0 {number} the first word to decrypt\n\t * @param encrypted1 {number} the second word to decrypt\n\t * @param encrypted2 {number} the third word to decrypt\n\t * @param encrypted3 {number} the fourth word to decrypt\n\t * @param out {Int32Array} the array to write the decrypted words\n\t * into\n\t * @param offset {number} the offset into the output array to start\n\t * writing results\n\t * @return {Array} The plaintext.\n\t */\n\t\n\t }, {\n\t key: 'decrypt',\n\t value: function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n\t var key = this._key[1],\n\t\n\t // state variables a,b,c,d are loaded with pre-whitened data\n\t a = encrypted0 ^ key[0],\n\t b = encrypted3 ^ key[1],\n\t c = encrypted2 ^ key[2],\n\t d = encrypted1 ^ key[3],\n\t a2,\n\t b2,\n\t c2,\n\t nInnerRounds = key.length / 4 - 2,\n\t // key.length === 2 ?\n\t i,\n\t kIndex = 4,\n\t table = this._tables[1],\n\t\n\t\n\t // load up the tables\n\t table0 = table[0],\n\t table1 = table[1],\n\t table2 = table[2],\n\t table3 = table[3],\n\t sbox = table[4];\n\t\n\t // Inner rounds. Cribbed from OpenSSL.\n\t for (i = 0; i < nInnerRounds; i++) {\n\t a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n\t b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n\t c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n\t d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n\t kIndex += 4;\n\t a = a2;b = b2;c = c2;\n\t }\n\t\n\t // Last round.\n\t for (i = 0; i < 4; i++) {\n\t out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n\t a2 = a;a = b;b = c;c = d;d = a2;\n\t }\n\t }\n\t }]);\n\t\n\t return AES;\n\t}();\n\t\n\texports.default = AES;\n\t\n\t},{}],14:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /*\n\t *\n\t * This file contains an adaptation of the AES decryption algorithm\n\t * from the Standford Javascript Cryptography Library. That work is\n\t * covered by the following copyright and permissions notice:\n\t *\n\t * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n\t * All rights reserved.\n\t *\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * 1. Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t *\n\t * 2. Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n\t * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\t * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\t * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n\t * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n\t * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n\t * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n\t * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n\t * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n\t * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n\t * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t *\n\t * The views and conclusions contained in the software and documentation\n\t * are those of the authors and should not be interpreted as representing\n\t * official policies, either expressed or implied, of the authors.\n\t */\n\t\n\tvar _aes = _dereq_(13);\n\t\n\tvar _aes2 = _interopRequireDefault(_aes);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar AES128Decrypter = function () {\n\t function AES128Decrypter(key, initVector) {\n\t _classCallCheck(this, AES128Decrypter);\n\t\n\t this.key = key;\n\t this.iv = initVector;\n\t }\n\t\n\t /**\n\t * Convert network-order (big-endian) bytes into their little-endian\n\t * representation.\n\t */\n\t\n\t\n\t _createClass(AES128Decrypter, [{\n\t key: 'ntoh',\n\t value: function ntoh(word) {\n\t return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n\t }\n\t\n\t /**\n\t * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n\t * @param encrypted {Uint8Array} the encrypted bytes\n\t * @param key {Uint32Array} the bytes of the decryption key\n\t * @param initVector {Uint32Array} the initialization vector (IV) to\n\t * use for the first round of CBC.\n\t * @return {Uint8Array} the decrypted bytes\n\t *\n\t * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n\t * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n\t * @see https://tools.ietf.org/html/rfc2315\n\t */\n\t\n\t }, {\n\t key: 'doDecrypt',\n\t value: function doDecrypt(encrypted, key, initVector) {\n\t var\n\t // word-level access to the encrypted bytes\n\t encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2),\n\t decipher = new _aes2.default(Array.prototype.slice.call(key)),\n\t\n\t\n\t // byte and word-level access for the decrypted output\n\t decrypted = new Uint8Array(encrypted.byteLength),\n\t decrypted32 = new Int32Array(decrypted.buffer),\n\t\n\t\n\t // temporary variables for working with the IV, encrypted, and\n\t // decrypted data\n\t init0,\n\t init1,\n\t init2,\n\t init3,\n\t encrypted0,\n\t encrypted1,\n\t encrypted2,\n\t encrypted3,\n\t\n\t\n\t // iteration variable\n\t wordIx;\n\t\n\t // pull out the words of the IV to ensure we don't modify the\n\t // passed-in reference and easier access\n\t init0 = ~ ~initVector[0];\n\t init1 = ~ ~initVector[1];\n\t init2 = ~ ~initVector[2];\n\t init3 = ~ ~initVector[3];\n\t\n\t // decrypt four word sequences, applying cipher-block chaining (CBC)\n\t // to each decrypted block\n\t for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n\t // convert big-endian (network order) words into little-endian\n\t // (javascript order)\n\t encrypted0 = ~ ~this.ntoh(encrypted32[wordIx]);\n\t encrypted1 = ~ ~this.ntoh(encrypted32[wordIx + 1]);\n\t encrypted2 = ~ ~this.ntoh(encrypted32[wordIx + 2]);\n\t encrypted3 = ~ ~this.ntoh(encrypted32[wordIx + 3]);\n\t\n\t // decrypt the block\n\t decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx);\n\t\n\t // XOR with the IV, and restore network byte-order to obtain the\n\t // plaintext\n\t decrypted32[wordIx] = this.ntoh(decrypted32[wordIx] ^ init0);\n\t decrypted32[wordIx + 1] = this.ntoh(decrypted32[wordIx + 1] ^ init1);\n\t decrypted32[wordIx + 2] = this.ntoh(decrypted32[wordIx + 2] ^ init2);\n\t decrypted32[wordIx + 3] = this.ntoh(decrypted32[wordIx + 3] ^ init3);\n\t\n\t // setup the IV for the next round\n\t init0 = encrypted0;\n\t init1 = encrypted1;\n\t init2 = encrypted2;\n\t init3 = encrypted3;\n\t }\n\t\n\t return decrypted;\n\t }\n\t }, {\n\t key: 'localDecrypt',\n\t value: function localDecrypt(encrypted, key, initVector, decrypted) {\n\t var bytes = this.doDecrypt(encrypted, key, initVector);\n\t decrypted.set(bytes, encrypted.byteOffset);\n\t }\n\t }, {\n\t key: 'decrypt',\n\t value: function decrypt(encrypted) {\n\t var step = 4 * 8000,\n\t\n\t //encrypted32 = new Int32Array(encrypted.buffer),\n\t encrypted32 = new Int32Array(encrypted),\n\t decrypted = new Uint8Array(encrypted.byteLength),\n\t i = 0;\n\t\n\t // split up the encryption job and do the individual chunks asynchronously\n\t var key = this.key;\n\t var initVector = this.iv;\n\t this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n\t\n\t for (i = step; i < encrypted32.length; i += step) {\n\t initVector = new Uint32Array([this.ntoh(encrypted32[i - 4]), this.ntoh(encrypted32[i - 3]), this.ntoh(encrypted32[i - 2]), this.ntoh(encrypted32[i - 1])]);\n\t this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n\t }\n\t\n\t return decrypted;\n\t }\n\t }]);\n\t\n\t return AES128Decrypter;\n\t}();\n\t\n\texports.default = AES128Decrypter;\n\t\n\t},{\"13\":13}],15:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /*\n\t * AES128 decryption.\n\t */\n\t\n\tvar _aes128Decrypter = _dereq_(14);\n\t\n\tvar _aes128Decrypter2 = _interopRequireDefault(_aes128Decrypter);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Decrypter = function () {\n\t function Decrypter(hls) {\n\t _classCallCheck(this, Decrypter);\n\t\n\t this.hls = hls;\n\t try {\n\t var browserCrypto = window ? window.crypto : crypto;\n\t this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;\n\t this.disableWebCrypto = !this.subtle;\n\t } catch (e) {\n\t this.disableWebCrypto = true;\n\t }\n\t }\n\t\n\t _createClass(Decrypter, [{\n\t key: 'destroy',\n\t value: function destroy() {}\n\t }, {\n\t key: 'decrypt',\n\t value: function decrypt(data, key, iv, callback) {\n\t if (this.disableWebCrypto && this.hls.config.enableSoftwareAES) {\n\t this.decryptBySoftware(data, key, iv, callback);\n\t } else {\n\t this.decryptByWebCrypto(data, key, iv, callback);\n\t }\n\t }\n\t }, {\n\t key: 'decryptByWebCrypto',\n\t value: function decryptByWebCrypto(data, key, iv, callback) {\n\t var _this = this;\n\t\n\t _logger.logger.log('decrypting by WebCrypto API');\n\t\n\t this.subtle.importKey('raw', key, { name: 'AES-CBC', length: 128 }, false, ['decrypt']).then(function (importedKey) {\n\t _this.subtle.decrypt({ name: 'AES-CBC', iv: iv.buffer }, importedKey, data).then(callback).catch(function (err) {\n\t _this.onWebCryptoError(err, data, key, iv, callback);\n\t });\n\t }).catch(function (err) {\n\t _this.onWebCryptoError(err, data, key, iv, callback);\n\t });\n\t }\n\t }, {\n\t key: 'decryptBySoftware',\n\t value: function decryptBySoftware(data, key8, iv8, callback) {\n\t _logger.logger.log('decrypting by JavaScript Implementation');\n\t\n\t var view = new DataView(key8.buffer);\n\t var key = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\t\n\t view = new DataView(iv8.buffer);\n\t var iv = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\t\n\t var decrypter = new _aes128Decrypter2.default(key, iv);\n\t callback(decrypter.decrypt(data).buffer);\n\t }\n\t }, {\n\t key: 'onWebCryptoError',\n\t value: function onWebCryptoError(err, data, key, iv, callback) {\n\t if (this.hls.config.enableSoftwareAES) {\n\t _logger.logger.log('disabling to use WebCrypto API');\n\t this.disableWebCrypto = true;\n\t this.decryptBySoftware(data, key, iv, callback);\n\t } else {\n\t _logger.logger.error('decrypting error : ' + err.message);\n\t this.hls.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_DECRYPT_ERROR, fatal: true, reason: err.message });\n\t }\n\t }\n\t }]);\n\t\n\t return Decrypter;\n\t}();\n\t\n\texports.default = Decrypter;\n\t\n\t},{\"14\":14,\"24\":24,\"43\":43}],16:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * AAC demuxer\n\t */\n\t\n\t\n\tvar _adts = _dereq_(17);\n\t\n\tvar _adts2 = _interopRequireDefault(_adts);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _id = _dereq_(22);\n\t\n\tvar _id2 = _interopRequireDefault(_id);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar AACDemuxer = function () {\n\t function AACDemuxer(observer, id, remuxerClass, config) {\n\t _classCallCheck(this, AACDemuxer);\n\t\n\t this.observer = observer;\n\t this.id = id;\n\t this.remuxerClass = remuxerClass;\n\t this.config = config;\n\t this.remuxer = new this.remuxerClass(observer, id, config);\n\t this.insertDiscontinuity();\n\t }\n\t\n\t _createClass(AACDemuxer, [{\n\t key: 'insertDiscontinuity',\n\t value: function insertDiscontinuity() {\n\t this._aacTrack = { container: 'audio/adts', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n\t }\n\t }, {\n\t key: 'push',\n\t\n\t\n\t // feed incoming data to the front of the parsing pipeline\n\t value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n\t var track,\n\t id3 = new _id2.default(data),\n\t pts = 90 * id3.timeStamp,\n\t config,\n\t frameLength,\n\t frameDuration,\n\t frameIndex,\n\t offset,\n\t headerLength,\n\t stamp,\n\t len,\n\t aacSample;\n\t\n\t var contiguous = false;\n\t if (cc !== this.lastCC) {\n\t _logger.logger.log(this.id + ' discontinuity detected');\n\t this.lastCC = cc;\n\t this.insertDiscontinuity();\n\t this.remuxer.switchLevel();\n\t this.remuxer.insertDiscontinuity();\n\t } else if (level !== this.lastLevel) {\n\t _logger.logger.log('audio track switch detected');\n\t this.lastLevel = level;\n\t this.remuxer.switchLevel();\n\t this.insertDiscontinuity();\n\t } else if (sn === this.lastSN + 1) {\n\t contiguous = true;\n\t }\n\t track = this._aacTrack;\n\t this.lastSN = sn;\n\t this.lastLevel = level;\n\t\n\t // look for ADTS header (0xFFFx)\n\t for (offset = id3.length, len = data.length; offset < len - 1; offset++) {\n\t if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n\t break;\n\t }\n\t }\n\t\n\t if (!track.audiosamplerate) {\n\t config = _adts2.default.getAudioConfig(this.observer, data, offset, audioCodec);\n\t track.config = config.config;\n\t track.audiosamplerate = config.samplerate;\n\t track.channelCount = config.channelCount;\n\t track.codec = config.codec;\n\t track.duration = duration;\n\t _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);\n\t }\n\t frameIndex = 0;\n\t frameDuration = 1024 * 90000 / track.audiosamplerate;\n\t while (offset + 5 < len) {\n\t // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n\t headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;\n\t // retrieve frame size\n\t frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;\n\t frameLength -= headerLength;\n\t //stamp = pes.pts;\n\t\n\t if (frameLength > 0 && offset + headerLength + frameLength <= len) {\n\t stamp = pts + frameIndex * frameDuration;\n\t //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n\t aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };\n\t track.samples.push(aacSample);\n\t track.len += frameLength;\n\t offset += frameLength + headerLength;\n\t frameIndex++;\n\t // look for ADTS header (0xFFFx)\n\t for (; offset < len - 1; offset++) {\n\t if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n\t break;\n\t }\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\t this.remuxer.remux(level, sn, this._aacTrack, { samples: [] }, { samples: [{ pts: pts, dts: pts, unit: id3.payload }] }, { samples: [] }, timeOffset, contiguous, accurateTimeOffset);\n\t }\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {}\n\t }], [{\n\t key: 'probe',\n\t value: function probe(data) {\n\t // check if data contains ID3 timestamp and ADTS sync worc\n\t var id3 = new _id2.default(data),\n\t offset,\n\t len;\n\t if (id3.hasTimeStamp) {\n\t // look for ADTS header (0xFFFx)\n\t for (offset = id3.length, len = data.length; offset < len - 1; offset++) {\n\t if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n\t //logger.log('ADTS sync word found !');\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t }\n\t }]);\n\t\n\t return AACDemuxer;\n\t}();\n\t\n\texports.default = AACDemuxer;\n\t\n\t},{\"17\":17,\"22\":22,\"43\":43}],17:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * ADTS parser helper\n\t */\n\t\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ADTS = function () {\n\t function ADTS() {\n\t _classCallCheck(this, ADTS);\n\t }\n\t\n\t _createClass(ADTS, null, [{\n\t key: 'getAudioConfig',\n\t value: function getAudioConfig(observer, data, offset, audioCodec) {\n\t var adtsObjectType,\n\t // :int\n\t adtsSampleingIndex,\n\t // :int\n\t adtsExtensionSampleingIndex,\n\t // :int\n\t adtsChanelConfig,\n\t // :int\n\t config,\n\t userAgent = navigator.userAgent.toLowerCase(),\n\t adtsSampleingRates = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n\t // byte 2\n\t adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;\n\t adtsSampleingIndex = (data[offset + 2] & 0x3C) >>> 2;\n\t if (adtsSampleingIndex > adtsSampleingRates.length - 1) {\n\t observer.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'invalid ADTS sampling index:' + adtsSampleingIndex });\n\t return;\n\t }\n\t adtsChanelConfig = (data[offset + 2] & 0x01) << 2;\n\t // byte 3\n\t adtsChanelConfig |= (data[offset + 3] & 0xC0) >>> 6;\n\t _logger.logger.log('manifest codec:' + audioCodec + ',ADTS data:type:' + adtsObjectType + ',sampleingIndex:' + adtsSampleingIndex + '[' + adtsSampleingRates[adtsSampleingIndex] + 'Hz],channelConfig:' + adtsChanelConfig);\n\t // firefox/Opera: freq less than 24kHz = AAC SBR (HE-AAC)\n\t if (/firefox|OPR/i.test(userAgent)) {\n\t if (adtsSampleingIndex >= 6) {\n\t adtsObjectType = 5;\n\t config = new Array(4);\n\t // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n\t // there is a factor 2 between frame sample rate and output sample rate\n\t // multiply frequency by 2 (see table below, equivalent to substract 3)\n\t adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n\t } else {\n\t adtsObjectType = 2;\n\t config = new Array(2);\n\t adtsExtensionSampleingIndex = adtsSampleingIndex;\n\t }\n\t // Android : always use AAC\n\t } else if (userAgent.indexOf('android') !== -1) {\n\t adtsObjectType = 2;\n\t config = new Array(2);\n\t adtsExtensionSampleingIndex = adtsSampleingIndex;\n\t } else {\n\t /* for other browsers (Chrome/Vivaldi ...)\n\t always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)\n\t */\n\t adtsObjectType = 5;\n\t config = new Array(4);\n\t // if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)\n\t if (audioCodec && (audioCodec.indexOf('mp4a.40.29') !== -1 || audioCodec.indexOf('mp4a.40.5') !== -1) || !audioCodec && adtsSampleingIndex >= 6) {\n\t // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n\t // there is a factor 2 between frame sample rate and output sample rate\n\t // multiply frequency by 2 (see table below, equivalent to substract 3)\n\t adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n\t } else {\n\t // if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)\n\t // Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.\n\t if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && adtsSampleingIndex >= 6 && adtsChanelConfig === 1 || !audioCodec && adtsChanelConfig === 1) {\n\t adtsObjectType = 2;\n\t config = new Array(2);\n\t }\n\t adtsExtensionSampleingIndex = adtsSampleingIndex;\n\t }\n\t }\n\t /* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config\n\t ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()\n\t Audio Profile / Audio Object Type\n\t 0: Null\n\t 1: AAC Main\n\t 2: AAC LC (Low Complexity)\n\t 3: AAC SSR (Scalable Sample Rate)\n\t 4: AAC LTP (Long Term Prediction)\n\t 5: SBR (Spectral Band Replication)\n\t 6: AAC Scalable\n\t sampling freq\n\t 0: 96000 Hz\n\t 1: 88200 Hz\n\t 2: 64000 Hz\n\t 3: 48000 Hz\n\t 4: 44100 Hz\n\t 5: 32000 Hz\n\t 6: 24000 Hz\n\t 7: 22050 Hz\n\t 8: 16000 Hz\n\t 9: 12000 Hz\n\t 10: 11025 Hz\n\t 11: 8000 Hz\n\t 12: 7350 Hz\n\t 13: Reserved\n\t 14: Reserved\n\t 15: frequency is written explictly\n\t Channel Configurations\n\t These are the channel configurations:\n\t 0: Defined in AOT Specifc Config\n\t 1: 1 channel: front-center\n\t 2: 2 channels: front-left, front-right\n\t */\n\t // audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1\n\t config[0] = adtsObjectType << 3;\n\t // samplingFrequencyIndex\n\t config[0] |= (adtsSampleingIndex & 0x0E) >> 1;\n\t config[1] |= (adtsSampleingIndex & 0x01) << 7;\n\t // channelConfiguration\n\t config[1] |= adtsChanelConfig << 3;\n\t if (adtsObjectType === 5) {\n\t // adtsExtensionSampleingIndex\n\t config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;\n\t config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;\n\t // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???\n\t // https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc\n\t config[2] |= 2 << 2;\n\t config[3] = 0;\n\t }\n\t return { config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: 'mp4a.40.' + adtsObjectType };\n\t }\n\t }]);\n\t\n\t return ADTS;\n\t}();\n\t\n\texports.default = ADTS;\n\t\n\t},{\"24\":24,\"43\":43}],18:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /* inline demuxer.\n\t * probe fragments and instantiate appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...)\n\t */\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _aacdemuxer = _dereq_(16);\n\t\n\tvar _aacdemuxer2 = _interopRequireDefault(_aacdemuxer);\n\t\n\tvar _tsdemuxer = _dereq_(23);\n\t\n\tvar _tsdemuxer2 = _interopRequireDefault(_tsdemuxer);\n\t\n\tvar _mp4Remuxer = _dereq_(36);\n\t\n\tvar _mp4Remuxer2 = _interopRequireDefault(_mp4Remuxer);\n\t\n\tvar _passthroughRemuxer = _dereq_(37);\n\t\n\tvar _passthroughRemuxer2 = _interopRequireDefault(_passthroughRemuxer);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar DemuxerInline = function () {\n\t function DemuxerInline(hls, id, typeSupported) {\n\t var config = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];\n\t\n\t _classCallCheck(this, DemuxerInline);\n\t\n\t this.hls = hls;\n\t this.id = id;\n\t this.config = this.hls.config || config;\n\t this.typeSupported = typeSupported;\n\t }\n\t\n\t _createClass(DemuxerInline, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t var demuxer = this.demuxer;\n\t if (demuxer) {\n\t demuxer.destroy();\n\t }\n\t }\n\t }, {\n\t key: 'push',\n\t value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n\t var demuxer = this.demuxer;\n\t if (!demuxer) {\n\t var hls = this.hls,\n\t id = this.id;\n\t // probe for content type\n\t if (_tsdemuxer2.default.probe(data)) {\n\t if (this.typeSupported.mp2t === true) {\n\t demuxer = new _tsdemuxer2.default(hls, id, _passthroughRemuxer2.default, this.config);\n\t } else {\n\t demuxer = new _tsdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);\n\t }\n\t } else if (_aacdemuxer2.default.probe(data)) {\n\t demuxer = new _aacdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);\n\t } else {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'no demux matching with content found' });\n\t return;\n\t }\n\t this.demuxer = demuxer;\n\t }\n\t demuxer.push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n\t }\n\t }]);\n\t\n\t return DemuxerInline;\n\t}();\n\t\n\texports.default = DemuxerInline;\n\t\n\t},{\"16\":16,\"23\":23,\"24\":24,\"26\":26,\"36\":36,\"37\":37}],19:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _demuxerInline = _dereq_(18);\n\t\n\tvar _demuxerInline2 = _interopRequireDefault(_demuxerInline);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _events3 = _dereq_(1);\n\t\n\tvar _events4 = _interopRequireDefault(_events3);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t/* demuxer web worker.\n\t * - listen to worker message, and trigger DemuxerInline upon reception of Fragments.\n\t * - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead.\n\t */\n\t\n\tvar DemuxerWorker = function DemuxerWorker(self) {\n\t // observer setup\n\t var observer = new _events4.default();\n\t observer.trigger = function trigger(event) {\n\t for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t data[_key - 1] = arguments[_key];\n\t }\n\t\n\t observer.emit.apply(observer, [event, event].concat(data));\n\t };\n\t\n\t observer.off = function off(event) {\n\t for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n\t data[_key2 - 1] = arguments[_key2];\n\t }\n\t\n\t observer.removeListener.apply(observer, [event].concat(data));\n\t };\n\t\n\t var forwardMessage = function forwardMessage(ev, data) {\n\t self.postMessage({ event: ev, data: data });\n\t };\n\t\n\t self.addEventListener('message', function (ev) {\n\t var data = ev.data;\n\t //console.log('demuxer cmd:' + data.cmd);\n\t switch (data.cmd) {\n\t case 'init':\n\t var config = JSON.parse(data.config);\n\t self.demuxer = new _demuxerInline2.default(observer, data.id, data.typeSupported, config);\n\t try {\n\t (0, _logger.enableLogs)(config.debug);\n\t } catch (err) {\n\t console.warn('demuxerWorker: unable to enable logs');\n\t }\n\t // signal end of worker init\n\t forwardMessage('init', null);\n\t break;\n\t case 'demux':\n\t self.demuxer.push(new Uint8Array(data.data), data.audioCodec, data.videoCodec, data.timeOffset, data.cc, data.level, data.sn, data.duration, data.accurateTimeOffset);\n\t break;\n\t default:\n\t break;\n\t }\n\t });\n\t\n\t // forward events to main thread\n\t observer.on(_events2.default.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n\t observer.on(_events2.default.FRAG_PARSED, forwardMessage);\n\t observer.on(_events2.default.ERROR, forwardMessage);\n\t observer.on(_events2.default.FRAG_PARSING_METADATA, forwardMessage);\n\t observer.on(_events2.default.FRAG_PARSING_USERDATA, forwardMessage);\n\t\n\t // special case for FRAG_PARSING_DATA: pass data1/data2 as transferable object (no copy)\n\t observer.on(_events2.default.FRAG_PARSING_DATA, function (ev, data) {\n\t var data1 = data.data1.buffer,\n\t data2 = data.data2.buffer;\n\t // remove data1 and data2 reference from data to avoid copying them ...\n\t delete data.data1;\n\t delete data.data2;\n\t self.postMessage({ event: ev, data: data, data1: data1, data2: data2 }, [data1, data2]);\n\t });\n\t};\n\t\n\texports.default = DemuxerWorker;\n\t\n\t},{\"1\":1,\"18\":18,\"26\":26,\"43\":43}],20:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _demuxerInline = _dereq_(18);\n\t\n\tvar _demuxerInline2 = _interopRequireDefault(_demuxerInline);\n\t\n\tvar _demuxerWorker = _dereq_(19);\n\t\n\tvar _demuxerWorker2 = _interopRequireDefault(_demuxerWorker);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _decrypter = _dereq_(15);\n\t\n\tvar _decrypter2 = _interopRequireDefault(_decrypter);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Demuxer = function () {\n\t function Demuxer(hls, id) {\n\t _classCallCheck(this, Demuxer);\n\t\n\t this.hls = hls;\n\t this.id = id;\n\t var typeSupported = {\n\t mp4: MediaSource.isTypeSupported('video/mp4'),\n\t mp2t: hls.config.enableMP2TPassThrough && MediaSource.isTypeSupported('video/mp2t')\n\t };\n\t if (hls.config.enableWorker && typeof Worker !== 'undefined') {\n\t _logger.logger.log('demuxing in webworker');\n\t var w = void 0;\n\t try {\n\t var work = _dereq_(2);\n\t w = this.w = work(_demuxerWorker2.default);\n\t this.onwmsg = this.onWorkerMessage.bind(this);\n\t w.addEventListener('message', this.onwmsg);\n\t w.onerror = function (event) {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: true, event: 'demuxerWorker', err: { message: event.message + ' (' + event.filename + ':' + event.lineno + ')' } });\n\t };\n\t w.postMessage({ cmd: 'init', typeSupported: typeSupported, id: id, config: JSON.stringify(hls.config) });\n\t } catch (err) {\n\t _logger.logger.error('error while initializing DemuxerWorker, fallback on DemuxerInline');\n\t if (w) {\n\t // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n\t URL.revokeObjectURL(w.objectURL);\n\t }\n\t this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);\n\t }\n\t } else {\n\t this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);\n\t }\n\t this.demuxInitialized = true;\n\t }\n\t\n\t _createClass(Demuxer, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t var w = this.w;\n\t if (w) {\n\t w.removeEventListener('message', this.onwmsg);\n\t w.terminate();\n\t this.w = null;\n\t } else {\n\t var demuxer = this.demuxer;\n\t if (demuxer) {\n\t demuxer.destroy();\n\t this.demuxer = null;\n\t }\n\t }\n\t var decrypter = this.decrypter;\n\t if (decrypter) {\n\t decrypter.destroy();\n\t this.decrypter = null;\n\t }\n\t }\n\t }, {\n\t key: 'pushDecrypted',\n\t value: function pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n\t var w = this.w;\n\t if (w) {\n\t // post fragment payload as transferable objects (no copy)\n\t w.postMessage({ cmd: 'demux', data: data, audioCodec: audioCodec, videoCodec: videoCodec, timeOffset: timeOffset, cc: cc, level: level, sn: sn, duration: duration, accurateTimeOffset: accurateTimeOffset }, [data]);\n\t } else {\n\t var demuxer = this.demuxer;\n\t if (demuxer) {\n\t demuxer.push(new Uint8Array(data), audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'push',\n\t value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, decryptdata, accurateTimeOffset) {\n\t if (data.byteLength > 0 && decryptdata != null && decryptdata.key != null && decryptdata.method === 'AES-128') {\n\t if (this.decrypter == null) {\n\t this.decrypter = new _decrypter2.default(this.hls);\n\t }\n\t\n\t var localthis = this;\n\t this.decrypter.decrypt(data, decryptdata.key, decryptdata.iv, function (decryptedData) {\n\t localthis.pushDecrypted(decryptedData, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n\t });\n\t } else {\n\t this.pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n\t }\n\t }\n\t }, {\n\t key: 'onWorkerMessage',\n\t value: function onWorkerMessage(ev) {\n\t var data = ev.data,\n\t hls = this.hls;\n\t //console.log('onWorkerMessage:' + data.event);\n\t switch (data.event) {\n\t case 'init':\n\t // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n\t URL.revokeObjectURL(this.w.objectURL);\n\t break;\n\t // special case for FRAG_PARSING_DATA: data1 and data2 are transferable objects\n\t case _events2.default.FRAG_PARSING_DATA:\n\t data.data.data1 = new Uint8Array(data.data1);\n\t data.data.data2 = new Uint8Array(data.data2);\n\t /* falls through */\n\t default:\n\t hls.trigger(data.event, data.data);\n\t break;\n\t }\n\t }\n\t }]);\n\t\n\t return Demuxer;\n\t}();\n\t\n\texports.default = Demuxer;\n\t\n\t},{\"15\":15,\"18\":18,\"19\":19,\"2\":2,\"24\":24,\"26\":26,\"43\":43}],21:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.\n\t */\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar ExpGolomb = function () {\n\t function ExpGolomb(data) {\n\t _classCallCheck(this, ExpGolomb);\n\t\n\t this.data = data;\n\t // the number of bytes left to examine in this.data\n\t this.bytesAvailable = this.data.byteLength;\n\t // the current word being examined\n\t this.word = 0; // :uint\n\t // the number of bits left to examine in the current word\n\t this.bitsAvailable = 0; // :uint\n\t }\n\t\n\t // ():void\n\t\n\t\n\t _createClass(ExpGolomb, [{\n\t key: 'loadWord',\n\t value: function loadWord() {\n\t var position = this.data.byteLength - this.bytesAvailable,\n\t workingBytes = new Uint8Array(4),\n\t availableBytes = Math.min(4, this.bytesAvailable);\n\t if (availableBytes === 0) {\n\t throw new Error('no bytes available');\n\t }\n\t workingBytes.set(this.data.subarray(position, position + availableBytes));\n\t this.word = new DataView(workingBytes.buffer).getUint32(0);\n\t // track the amount of this.data that has been processed\n\t this.bitsAvailable = availableBytes * 8;\n\t this.bytesAvailable -= availableBytes;\n\t }\n\t\n\t // (count:int):void\n\t\n\t }, {\n\t key: 'skipBits',\n\t value: function skipBits(count) {\n\t var skipBytes; // :int\n\t if (this.bitsAvailable > count) {\n\t this.word <<= count;\n\t this.bitsAvailable -= count;\n\t } else {\n\t count -= this.bitsAvailable;\n\t skipBytes = count >> 3;\n\t count -= skipBytes >> 3;\n\t this.bytesAvailable -= skipBytes;\n\t this.loadWord();\n\t this.word <<= count;\n\t this.bitsAvailable -= count;\n\t }\n\t }\n\t\n\t // (size:int):uint\n\t\n\t }, {\n\t key: 'readBits',\n\t value: function readBits(size) {\n\t var bits = Math.min(this.bitsAvailable, size),\n\t // :uint\n\t valu = this.word >>> 32 - bits; // :uint\n\t if (size > 32) {\n\t _logger.logger.error('Cannot read more than 32 bits at a time');\n\t }\n\t this.bitsAvailable -= bits;\n\t if (this.bitsAvailable > 0) {\n\t this.word <<= bits;\n\t } else if (this.bytesAvailable > 0) {\n\t this.loadWord();\n\t }\n\t bits = size - bits;\n\t if (bits > 0 && this.bitsAvailable) {\n\t return valu << bits | this.readBits(bits);\n\t } else {\n\t return valu;\n\t }\n\t }\n\t\n\t // ():uint\n\t\n\t }, {\n\t key: 'skipLZ',\n\t value: function skipLZ() {\n\t var leadingZeroCount; // :uint\n\t for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {\n\t if (0 !== (this.word & 0x80000000 >>> leadingZeroCount)) {\n\t // the first bit of working word is 1\n\t this.word <<= leadingZeroCount;\n\t this.bitsAvailable -= leadingZeroCount;\n\t return leadingZeroCount;\n\t }\n\t }\n\t // we exhausted word and still have not found a 1\n\t this.loadWord();\n\t return leadingZeroCount + this.skipLZ();\n\t }\n\t\n\t // ():void\n\t\n\t }, {\n\t key: 'skipUEG',\n\t value: function skipUEG() {\n\t this.skipBits(1 + this.skipLZ());\n\t }\n\t\n\t // ():void\n\t\n\t }, {\n\t key: 'skipEG',\n\t value: function skipEG() {\n\t this.skipBits(1 + this.skipLZ());\n\t }\n\t\n\t // ():uint\n\t\n\t }, {\n\t key: 'readUEG',\n\t value: function readUEG() {\n\t var clz = this.skipLZ(); // :uint\n\t return this.readBits(clz + 1) - 1;\n\t }\n\t\n\t // ():int\n\t\n\t }, {\n\t key: 'readEG',\n\t value: function readEG() {\n\t var valu = this.readUEG(); // :int\n\t if (0x01 & valu) {\n\t // the number is odd if the low order bit is set\n\t return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n\t } else {\n\t return -1 * (valu >>> 1); // divide by two then make it negative\n\t }\n\t }\n\t\n\t // Some convenience functions\n\t // :Boolean\n\t\n\t }, {\n\t key: 'readBoolean',\n\t value: function readBoolean() {\n\t return 1 === this.readBits(1);\n\t }\n\t\n\t // ():int\n\t\n\t }, {\n\t key: 'readUByte',\n\t value: function readUByte() {\n\t return this.readBits(8);\n\t }\n\t\n\t // ():int\n\t\n\t }, {\n\t key: 'readUShort',\n\t value: function readUShort() {\n\t return this.readBits(16);\n\t }\n\t // ():int\n\t\n\t }, {\n\t key: 'readUInt',\n\t value: function readUInt() {\n\t return this.readBits(32);\n\t }\n\t\n\t /**\n\t * Advance the ExpGolomb decoder past a scaling list. The scaling\n\t * list is optionally transmitted as part of a sequence parameter\n\t * set and is not relevant to transmuxing.\n\t * @param count {number} the number of entries in this scaling list\n\t * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n\t */\n\t\n\t }, {\n\t key: 'skipScalingList',\n\t value: function skipScalingList(count) {\n\t var lastScale = 8,\n\t nextScale = 8,\n\t j,\n\t deltaScale;\n\t for (j = 0; j < count; j++) {\n\t if (nextScale !== 0) {\n\t deltaScale = this.readEG();\n\t nextScale = (lastScale + deltaScale + 256) % 256;\n\t }\n\t lastScale = nextScale === 0 ? lastScale : nextScale;\n\t }\n\t }\n\t\n\t /**\n\t * Read a sequence parameter set and return some interesting video\n\t * properties. A sequence parameter set is the H264 metadata that\n\t * describes the properties of upcoming video frames.\n\t * @param data {Uint8Array} the bytes of a sequence parameter set\n\t * @return {object} an object with configuration parsed from the\n\t * sequence parameter set, including the dimensions of the\n\t * associated video frames.\n\t */\n\t\n\t }, {\n\t key: 'readSPS',\n\t value: function readSPS() {\n\t var frameCropLeftOffset = 0,\n\t frameCropRightOffset = 0,\n\t frameCropTopOffset = 0,\n\t frameCropBottomOffset = 0,\n\t sarScale = 1,\n\t profileIdc,\n\t profileCompat,\n\t levelIdc,\n\t numRefFramesInPicOrderCntCycle,\n\t picWidthInMbsMinus1,\n\t picHeightInMapUnitsMinus1,\n\t frameMbsOnlyFlag,\n\t scalingListCount,\n\t i;\n\t this.readUByte();\n\t profileIdc = this.readUByte(); // profile_idc\n\t profileCompat = this.readBits(5); // constraint_set[0-4]_flag, u(5)\n\t this.skipBits(3); // reserved_zero_3bits u(3),\n\t levelIdc = this.readUByte(); //level_idc u(8)\n\t this.skipUEG(); // seq_parameter_set_id\n\t // some profiles have more optional data we don't need\n\t if (profileIdc === 100 || profileIdc === 110 || profileIdc === 122 || profileIdc === 244 || profileIdc === 44 || profileIdc === 83 || profileIdc === 86 || profileIdc === 118 || profileIdc === 128) {\n\t var chromaFormatIdc = this.readUEG();\n\t if (chromaFormatIdc === 3) {\n\t this.skipBits(1); // separate_colour_plane_flag\n\t }\n\t this.skipUEG(); // bit_depth_luma_minus8\n\t this.skipUEG(); // bit_depth_chroma_minus8\n\t this.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n\t if (this.readBoolean()) {\n\t // seq_scaling_matrix_present_flag\n\t scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n\t for (i = 0; i < scalingListCount; i++) {\n\t if (this.readBoolean()) {\n\t // seq_scaling_list_present_flag[ i ]\n\t if (i < 6) {\n\t this.skipScalingList(16);\n\t } else {\n\t this.skipScalingList(64);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t this.skipUEG(); // log2_max_frame_num_minus4\n\t var picOrderCntType = this.readUEG();\n\t if (picOrderCntType === 0) {\n\t this.readUEG(); //log2_max_pic_order_cnt_lsb_minus4\n\t } else if (picOrderCntType === 1) {\n\t this.skipBits(1); // delta_pic_order_always_zero_flag\n\t this.skipEG(); // offset_for_non_ref_pic\n\t this.skipEG(); // offset_for_top_to_bottom_field\n\t numRefFramesInPicOrderCntCycle = this.readUEG();\n\t for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n\t this.skipEG(); // offset_for_ref_frame[ i ]\n\t }\n\t }\n\t this.skipUEG(); // max_num_ref_frames\n\t this.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\t picWidthInMbsMinus1 = this.readUEG();\n\t picHeightInMapUnitsMinus1 = this.readUEG();\n\t frameMbsOnlyFlag = this.readBits(1);\n\t if (frameMbsOnlyFlag === 0) {\n\t this.skipBits(1); // mb_adaptive_frame_field_flag\n\t }\n\t this.skipBits(1); // direct_8x8_inference_flag\n\t if (this.readBoolean()) {\n\t // frame_cropping_flag\n\t frameCropLeftOffset = this.readUEG();\n\t frameCropRightOffset = this.readUEG();\n\t frameCropTopOffset = this.readUEG();\n\t frameCropBottomOffset = this.readUEG();\n\t }\n\t if (this.readBoolean()) {\n\t // vui_parameters_present_flag\n\t if (this.readBoolean()) {\n\t // aspect_ratio_info_present_flag\n\t var sarRatio = void 0;\n\t var aspectRatioIdc = this.readUByte();\n\t switch (aspectRatioIdc) {\n\t case 1:\n\t sarRatio = [1, 1];break;\n\t case 2:\n\t sarRatio = [12, 11];break;\n\t case 3:\n\t sarRatio = [10, 11];break;\n\t case 4:\n\t sarRatio = [16, 11];break;\n\t case 5:\n\t sarRatio = [40, 33];break;\n\t case 6:\n\t sarRatio = [24, 11];break;\n\t case 7:\n\t sarRatio = [20, 11];break;\n\t case 8:\n\t sarRatio = [32, 11];break;\n\t case 9:\n\t sarRatio = [80, 33];break;\n\t case 10:\n\t sarRatio = [18, 11];break;\n\t case 11:\n\t sarRatio = [15, 11];break;\n\t case 12:\n\t sarRatio = [64, 33];break;\n\t case 13:\n\t sarRatio = [160, 99];break;\n\t case 14:\n\t sarRatio = [4, 3];break;\n\t case 15:\n\t sarRatio = [3, 2];break;\n\t case 16:\n\t sarRatio = [2, 1];break;\n\t case 255:\n\t {\n\t sarRatio = [this.readUByte() << 8 | this.readUByte(), this.readUByte() << 8 | this.readUByte()];\n\t break;\n\t }\n\t }\n\t if (sarRatio) {\n\t sarScale = sarRatio[0] / sarRatio[1];\n\t }\n\t }\n\t }\n\t return {\n\t width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\n\t height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - (frameMbsOnlyFlag ? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset)\n\t };\n\t }\n\t }, {\n\t key: 'readSliceType',\n\t value: function readSliceType() {\n\t // skip NALu type\n\t this.readUByte();\n\t // discard first_mb_in_slice\n\t this.readUEG();\n\t // return slice_type\n\t return this.readUEG();\n\t }\n\t }]);\n\t\n\t return ExpGolomb;\n\t}();\n\t\n\texports.default = ExpGolomb;\n\t\n\t},{\"43\":43}],22:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * ID3 parser\n\t */\n\t\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t//import Hex from '../utils/hex';\n\t\n\tvar ID3 = function () {\n\t function ID3(data) {\n\t _classCallCheck(this, ID3);\n\t\n\t this._hasTimeStamp = false;\n\t var offset = 0,\n\t byte1,\n\t byte2,\n\t byte3,\n\t byte4,\n\t tagSize,\n\t endPos,\n\t header,\n\t len;\n\t do {\n\t header = this.readUTF(data, offset, 3);\n\t offset += 3;\n\t // first check for ID3 header\n\t if (header === 'ID3') {\n\t // skip 24 bits\n\t offset += 3;\n\t // retrieve tag(s) length\n\t byte1 = data[offset++] & 0x7f;\n\t byte2 = data[offset++] & 0x7f;\n\t byte3 = data[offset++] & 0x7f;\n\t byte4 = data[offset++] & 0x7f;\n\t tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;\n\t endPos = offset + tagSize;\n\t //logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);\n\t\n\t // read ID3 tags\n\t this._parseID3Frames(data, offset, endPos);\n\t offset = endPos;\n\t } else if (header === '3DI') {\n\t // http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer\n\t offset += 7;\n\t _logger.logger.log('3DI footer found, end: ' + offset);\n\t } else {\n\t offset -= 3;\n\t len = offset;\n\t if (len) {\n\t //logger.log(`ID3 len: ${len}`);\n\t if (!this.hasTimeStamp) {\n\t _logger.logger.warn('ID3 tag found, but no timestamp');\n\t }\n\t this._length = len;\n\t this._payload = data.subarray(0, len);\n\t }\n\t return;\n\t }\n\t } while (true);\n\t }\n\t\n\t _createClass(ID3, [{\n\t key: 'readUTF',\n\t value: function readUTF(data, start, len) {\n\t\n\t var result = '',\n\t offset = start,\n\t end = start + len;\n\t do {\n\t result += String.fromCharCode(data[offset++]);\n\t } while (offset < end);\n\t return result;\n\t }\n\t }, {\n\t key: '_parseID3Frames',\n\t value: function _parseID3Frames(data, offset, endPos) {\n\t var tagId, tagLen, tagStart, tagFlags, timestamp;\n\t while (offset + 8 <= endPos) {\n\t tagId = this.readUTF(data, offset, 4);\n\t offset += 4;\n\t\n\t tagLen = data[offset++] << 24 + data[offset++] << 16 + data[offset++] << 8 + data[offset++];\n\t\n\t tagFlags = data[offset++] << 8 + data[offset++];\n\t\n\t tagStart = offset;\n\t //logger.log(\"ID3 tag id:\" + tagId);\n\t switch (tagId) {\n\t case 'PRIV':\n\t //logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));\n\t // owner should be \"com.apple.streaming.transportStreamTimestamp\"\n\t if (this.readUTF(data, offset, 44) === 'com.apple.streaming.transportStreamTimestamp') {\n\t offset += 44;\n\t // smelling even better ! we found the right descriptor\n\t // skip null character (string end) + 3 first bytes\n\t offset += 4;\n\t\n\t // timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.\n\t var pts33Bit = data[offset++] & 0x1;\n\t this._hasTimeStamp = true;\n\t\n\t timestamp = ((data[offset++] << 23) + (data[offset++] << 15) + (data[offset++] << 7) + data[offset++]) / 45;\n\t\n\t if (pts33Bit) {\n\t timestamp += 47721858.84; // 2^32 / 90\n\t }\n\t timestamp = Math.round(timestamp);\n\t _logger.logger.trace('ID3 timestamp found: ' + timestamp);\n\t this._timeStamp = timestamp;\n\t }\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'hasTimeStamp',\n\t get: function get() {\n\t return this._hasTimeStamp;\n\t }\n\t }, {\n\t key: 'timeStamp',\n\t get: function get() {\n\t return this._timeStamp;\n\t }\n\t }, {\n\t key: 'length',\n\t get: function get() {\n\t return this._length;\n\t }\n\t }, {\n\t key: 'payload',\n\t get: function get() {\n\t return this._payload;\n\t }\n\t }]);\n\t\n\t return ID3;\n\t}();\n\t\n\texports.default = ID3;\n\t\n\t},{\"43\":43}],23:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * highly optimized TS demuxer:\n\t * parse PAT, PMT\n\t * extract PES packet from audio and video PIDs\n\t * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet\n\t * trigger the remuxer upon parsing completion\n\t * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.\n\t * it also controls the remuxing process :\n\t * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.\n\t */\n\t\n\t// import Hex from '../utils/hex';\n\t\n\t\n\tvar _adts = _dereq_(17);\n\t\n\tvar _adts2 = _interopRequireDefault(_adts);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _expGolomb = _dereq_(21);\n\t\n\tvar _expGolomb2 = _interopRequireDefault(_expGolomb);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar TSDemuxer = function () {\n\t function TSDemuxer(observer, id, remuxerClass, config) {\n\t _classCallCheck(this, TSDemuxer);\n\t\n\t this.observer = observer;\n\t this.id = id;\n\t this.remuxerClass = remuxerClass;\n\t this.config = config;\n\t this.lastCC = 0;\n\t this.remuxer = new this.remuxerClass(observer, id, config);\n\t }\n\t\n\t _createClass(TSDemuxer, [{\n\t key: 'switchLevel',\n\t value: function switchLevel() {\n\t this.pmtParsed = false;\n\t this._pmtId = -1;\n\t this._avcTrack = { container: 'video/mp2t', type: 'video', id: -1, sequenceNumber: 0, samples: [], len: 0, dropped: 0 };\n\t this._aacTrack = { container: 'video/mp2t', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n\t this._id3Track = { type: 'id3', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n\t this._txtTrack = { type: 'text', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n\t // flush any partial content\n\t this.aacOverFlow = null;\n\t this.aacLastPTS = null;\n\t this.avcSample = null;\n\t this.remuxer.switchLevel();\n\t }\n\t }, {\n\t key: 'insertDiscontinuity',\n\t value: function insertDiscontinuity() {\n\t this.switchLevel();\n\t this.remuxer.insertDiscontinuity();\n\t }\n\t\n\t // feed incoming data to the front of the parsing pipeline\n\t\n\t }, {\n\t key: 'push',\n\t value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n\t var start,\n\t len = data.length,\n\t stt,\n\t pid,\n\t atf,\n\t offset,\n\t pes,\n\t codecsOnly = this.remuxer.passthrough,\n\t unknownPIDs = false;\n\t\n\t this.audioCodec = audioCodec;\n\t this.videoCodec = videoCodec;\n\t this._duration = duration;\n\t this.contiguous = false;\n\t this.accurateTimeOffset = accurateTimeOffset;\n\t if (cc !== this.lastCC) {\n\t _logger.logger.log('discontinuity detected');\n\t this.insertDiscontinuity();\n\t this.lastCC = cc;\n\t }\n\t if (level !== this.lastLevel) {\n\t _logger.logger.log('level switch detected');\n\t this.switchLevel();\n\t this.lastLevel = level;\n\t } else if (sn === this.lastSN + 1) {\n\t this.contiguous = true;\n\t }\n\t this.lastSN = sn;\n\t\n\t var pmtParsed = this.pmtParsed,\n\t avcTrack = this._avcTrack,\n\t aacTrack = this._aacTrack,\n\t id3Track = this._id3Track,\n\t avcId = avcTrack.id,\n\t aacId = aacTrack.id,\n\t id3Id = id3Track.id,\n\t pmtId = this._pmtId,\n\t avcData = avcTrack.pesData,\n\t aacData = aacTrack.pesData,\n\t id3Data = id3Track.pesData,\n\t parsePAT = this._parsePAT,\n\t parsePMT = this._parsePMT,\n\t parsePES = this._parsePES,\n\t parseAVCPES = this._parseAVCPES.bind(this),\n\t parseAACPES = this._parseAACPES.bind(this),\n\t parseID3PES = this._parseID3PES.bind(this);\n\t\n\t // don't parse last TS packet if incomplete\n\t len -= len % 188;\n\t // loop through TS packets\n\t for (start = 0; start < len; start += 188) {\n\t if (data[start] === 0x47) {\n\t stt = !!(data[start + 1] & 0x40);\n\t // pid is a 13-bit field starting at the last bit of TS[1]\n\t pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];\n\t atf = (data[start + 3] & 0x30) >> 4;\n\t // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.\n\t if (atf > 1) {\n\t offset = start + 5 + data[start + 4];\n\t // continue if there is only adaptation field\n\t if (offset === start + 188) {\n\t continue;\n\t }\n\t } else {\n\t offset = start + 4;\n\t }\n\t switch (pid) {\n\t case avcId:\n\t if (stt) {\n\t if (avcData && (pes = parsePES(avcData))) {\n\t parseAVCPES(pes, false);\n\t if (codecsOnly) {\n\t // if we have video codec info AND\n\t // if audio PID is undefined OR if we have audio codec info,\n\t // we have all codec info !\n\t if (avcTrack.codec && (aacId === -1 || aacTrack.codec)) {\n\t this.remux(level, sn, data, timeOffset);\n\t return;\n\t }\n\t }\n\t }\n\t avcData = { data: [], size: 0 };\n\t }\n\t if (avcData) {\n\t avcData.data.push(data.subarray(offset, start + 188));\n\t avcData.size += start + 188 - offset;\n\t }\n\t break;\n\t case aacId:\n\t if (stt) {\n\t if (aacData && (pes = parsePES(aacData))) {\n\t parseAACPES(pes);\n\t if (codecsOnly) {\n\t // here we now that we have audio codec info\n\t // if video PID is undefined OR if we have video codec info,\n\t // we have all codec infos !\n\t if (aacTrack.codec && (avcId === -1 || avcTrack.codec)) {\n\t this.remux(level, sn, data, timeOffset);\n\t return;\n\t }\n\t }\n\t }\n\t aacData = { data: [], size: 0 };\n\t }\n\t if (aacData) {\n\t aacData.data.push(data.subarray(offset, start + 188));\n\t aacData.size += start + 188 - offset;\n\t }\n\t break;\n\t case id3Id:\n\t if (stt) {\n\t if (id3Data && (pes = parsePES(id3Data))) {\n\t parseID3PES(pes);\n\t }\n\t id3Data = { data: [], size: 0 };\n\t }\n\t if (id3Data) {\n\t id3Data.data.push(data.subarray(offset, start + 188));\n\t id3Data.size += start + 188 - offset;\n\t }\n\t break;\n\t case 0:\n\t if (stt) {\n\t offset += data[offset] + 1;\n\t }\n\t pmtId = this._pmtId = parsePAT(data, offset);\n\t break;\n\t case pmtId:\n\t if (stt) {\n\t offset += data[offset] + 1;\n\t }\n\t var parsedPIDs = parsePMT(data, offset);\n\t avcId = avcTrack.id = parsedPIDs.avc;\n\t aacId = aacTrack.id = parsedPIDs.aac;\n\t id3Id = id3Track.id = parsedPIDs.id3;\n\t if (unknownPIDs && !pmtParsed) {\n\t _logger.logger.log('reparse from beginning');\n\t unknownPIDs = false;\n\t // we set it to -188, the += 188 in the for loop will reset start to 0\n\t start = -188;\n\t }\n\t pmtParsed = this.pmtParsed = true;\n\t break;\n\t case 17:\n\t case 0x1fff:\n\t break;\n\t default:\n\t unknownPIDs = true;\n\t break;\n\t }\n\t } else {\n\t this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47' });\n\t }\n\t }\n\t // try to parse last PES packets\n\t if (avcData && (pes = parsePES(avcData))) {\n\t parseAVCPES(pes, true);\n\t avcTrack.pesData = null;\n\t } else {\n\t // either avcData null or PES truncated, keep it for next frag parsing\n\t avcTrack.pesData = avcData;\n\t }\n\t\n\t if (aacData && (pes = parsePES(aacData))) {\n\t parseAACPES(pes);\n\t aacTrack.pesData = null;\n\t } else {\n\t if (aacData && aacData.size) {\n\t _logger.logger.log('last AAC PES packet truncated,might overlap between fragments');\n\t }\n\t // either aacData null or PES truncated, keep it for next frag parsing\n\t aacTrack.pesData = aacData;\n\t }\n\t\n\t if (id3Data && (pes = parsePES(id3Data))) {\n\t parseID3PES(pes);\n\t id3Track.pesData = null;\n\t } else {\n\t // either id3Data null or PES truncated, keep it for next frag parsing\n\t id3Track.pesData = id3Data;\n\t }\n\t this.remux(level, sn, null, timeOffset);\n\t }\n\t }, {\n\t key: 'remux',\n\t value: function remux(level, sn, data, timeOffset) {\n\t var avcTrack = this._avcTrack,\n\t samples = avcTrack.samples;\n\t\n\t // compute total/avc sample length and nb of NAL units\n\t var trackData = samples.reduce(function (prevSampleData, curSample) {\n\t var sampleData = curSample.units.units.reduce(function (prevUnitData, curUnit) {\n\t return {\n\t len: prevUnitData.len + curUnit.data.length,\n\t nbNalu: prevUnitData.nbNalu + 1\n\t };\n\t }, { len: 0, nbNalu: 0 });\n\t curSample.length = sampleData.len;\n\t return {\n\t len: prevSampleData.len + sampleData.len,\n\t nbNalu: prevSampleData.nbNalu + sampleData.nbNalu\n\t };\n\t }, { len: 0, nbNalu: 0 });\n\t avcTrack.len = trackData.len;\n\t avcTrack.nbNalu = trackData.nbNalu;\n\t this.remuxer.remux(level, sn, this._aacTrack, this._avcTrack, this._id3Track, this._txtTrack, timeOffset, this.contiguous, this.accurateTimeOffset, data);\n\t }\n\t }, {\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.switchLevel();\n\t this._initPTS = this._initDTS = undefined;\n\t this._duration = 0;\n\t }\n\t }, {\n\t key: '_parsePAT',\n\t value: function _parsePAT(data, offset) {\n\t // skip the PSI header and parse the first PMT entry\n\t return (data[offset + 10] & 0x1F) << 8 | data[offset + 11];\n\t //logger.log('PMT PID:' + this._pmtId);\n\t }\n\t }, {\n\t key: '_parsePMT',\n\t value: function _parsePMT(data, offset) {\n\t var sectionLength,\n\t tableEnd,\n\t programInfoLength,\n\t pid,\n\t result = { aac: -1, avc: -1, id3: -1 };\n\t sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];\n\t tableEnd = offset + 3 + sectionLength - 4;\n\t // to determine where the table is, we have to figure out how\n\t // long the program info descriptors are\n\t programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];\n\t // advance the offset to the first entry in the mapping table\n\t offset += 12 + programInfoLength;\n\t while (offset < tableEnd) {\n\t pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];\n\t switch (data[offset]) {\n\t // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)\n\t case 0x0f:\n\t //logger.log('AAC PID:' + pid);\n\t if (result.aac === -1) {\n\t result.aac = pid;\n\t }\n\t break;\n\t // Packetized metadata (ID3)\n\t case 0x15:\n\t //logger.log('ID3 PID:' + pid);\n\t if (result.id3 === -1) {\n\t result.id3 = pid;\n\t }\n\t break;\n\t // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)\n\t case 0x1b:\n\t //logger.log('AVC PID:' + pid);\n\t if (result.avc === -1) {\n\t result.avc = pid;\n\t }\n\t break;\n\t case 0x24:\n\t _logger.logger.warn('HEVC stream type found, not supported for now');\n\t break;\n\t default:\n\t _logger.logger.log('unkown stream type:' + data[offset]);\n\t break;\n\t }\n\t // move to the next table entry\n\t // skip past the elementary stream descriptors, if present\n\t offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;\n\t }\n\t return result;\n\t }\n\t }, {\n\t key: '_parsePES',\n\t value: function _parsePES(stream) {\n\t var i = 0,\n\t frag,\n\t pesFlags,\n\t pesPrefix,\n\t pesLen,\n\t pesHdrLen,\n\t pesData,\n\t pesPts,\n\t pesDts,\n\t payloadStartOffset,\n\t data = stream.data;\n\t // safety check\n\t if (!stream || stream.size === 0) {\n\t return null;\n\t }\n\t\n\t // we might need up to 19 bytes to read PES header\n\t // if first chunk of data is less than 19 bytes, let's merge it with following ones until we get 19 bytes\n\t // usually only one merge is needed (and this is rare ...)\n\t while (data[0].length < 19 && data.length > 1) {\n\t var newData = new Uint8Array(data[0].length + data[1].length);\n\t newData.set(data[0]);\n\t newData.set(data[1], data[0].length);\n\t data[0] = newData;\n\t data.splice(1, 1);\n\t }\n\t //retrieve PTS/DTS from first fragment\n\t frag = data[0];\n\t pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];\n\t if (pesPrefix === 1) {\n\t pesLen = (frag[4] << 8) + frag[5];\n\t // if PES len is not zero and not matching with total len, stop parsing. PES might be truncated\n\t // minus 6 : PES header size\n\t if (pesLen && pesLen !== stream.size - 6) {\n\t return null;\n\t }\n\t pesFlags = frag[7];\n\t if (pesFlags & 0xC0) {\n\t /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n\t as PTS / DTS is 33 bit we cannot use bitwise operator in JS,\n\t as Bitwise operators treat their operands as a sequence of 32 bits */\n\t pesPts = (frag[9] & 0x0E) * 536870912 + // 1 << 29\n\t (frag[10] & 0xFF) * 4194304 + // 1 << 22\n\t (frag[11] & 0xFE) * 16384 + // 1 << 14\n\t (frag[12] & 0xFF) * 128 + // 1 << 7\n\t (frag[13] & 0xFE) / 2;\n\t // check if greater than 2^32 -1\n\t if (pesPts > 4294967295) {\n\t // decrement 2^33\n\t pesPts -= 8589934592;\n\t }\n\t if (pesFlags & 0x40) {\n\t pesDts = (frag[14] & 0x0E) * 536870912 + // 1 << 29\n\t (frag[15] & 0xFF) * 4194304 + // 1 << 22\n\t (frag[16] & 0xFE) * 16384 + // 1 << 14\n\t (frag[17] & 0xFF) * 128 + // 1 << 7\n\t (frag[18] & 0xFE) / 2;\n\t // check if greater than 2^32 -1\n\t if (pesDts > 4294967295) {\n\t // decrement 2^33\n\t pesDts -= 8589934592;\n\t }\n\t } else {\n\t pesDts = pesPts;\n\t }\n\t }\n\t pesHdrLen = frag[8];\n\t // 9 bytes : 6 bytes for PES header + 3 bytes for PES extension\n\t payloadStartOffset = pesHdrLen + 9;\n\t\n\t stream.size -= payloadStartOffset;\n\t //reassemble PES packet\n\t pesData = new Uint8Array(stream.size);\n\t while (data.length) {\n\t frag = data.shift();\n\t var len = frag.byteLength;\n\t if (payloadStartOffset) {\n\t if (payloadStartOffset > len) {\n\t // trim full frag if PES header bigger than frag\n\t payloadStartOffset -= len;\n\t continue;\n\t } else {\n\t // trim partial frag if PES header smaller than frag\n\t frag = frag.subarray(payloadStartOffset);\n\t len -= payloadStartOffset;\n\t payloadStartOffset = 0;\n\t }\n\t }\n\t pesData.set(frag, i);\n\t i += len;\n\t }\n\t if (pesLen) {\n\t // payload size : remove PES header + PES extension\n\t pesLen -= pesHdrLen + 3;\n\t }\n\t return { data: pesData, pts: pesPts, dts: pesDts, len: pesLen };\n\t } else {\n\t return null;\n\t }\n\t }\n\t }, {\n\t key: 'pushAccesUnit',\n\t value: function pushAccesUnit(avcSample, avcTrack) {\n\t if (avcSample.units.units.length) {\n\t // only push AVC sample if starting with a keyframe is not mandatory OR\n\t // if keyframe already found in this fragment OR\n\t // keyframe found in last fragment (track.sps) AND\n\t // samples already appended (we already found a keyframe in this fragment) OR fragment is contiguous\n\t if (!this.config.forceKeyFrameOnDiscontinuity || avcSample.key === true || avcTrack.sps && (avcTrack.samples.length || this.contiguous)) {\n\t avcTrack.samples.push(avcSample);\n\t } else {\n\t // dropped samples, track it\n\t avcTrack.dropped++;\n\t }\n\t }\n\t if (avcSample.debug.length) {\n\t _logger.logger.log(avcSample.pts + '/' + avcSample.dts + ':' + avcSample.debug + ',' + avcSample.units.length);\n\t }\n\t }\n\t }, {\n\t key: '_parseAVCPES',\n\t value: function _parseAVCPES(pes, last) {\n\t var _this = this;\n\t\n\t //logger.log('parse new PES');\n\t var track = this._avcTrack,\n\t units = this._parseAVCNALu(pes.data),\n\t debug = false,\n\t expGolombDecoder,\n\t avcSample = this.avcSample,\n\t push,\n\t i;\n\t //free pes.data to save up some memory\n\t pes.data = null;\n\t\n\t units.forEach(function (unit) {\n\t switch (unit.type) {\n\t //NDR\n\t case 1:\n\t push = true;\n\t if (debug && avcSample) {\n\t avcSample.debug += 'NDR ';\n\t }\n\t break;\n\t //IDR\n\t case 5:\n\t push = true;\n\t // handle PES not starting with AUD\n\t if (!avcSample) {\n\t avcSample = _this.avcSample = _this._createAVCSample(true, pes.pts, pes.dts, '');\n\t }\n\t if (debug) {\n\t avcSample.debug += 'IDR ';\n\t }\n\t avcSample.key = true;\n\t break;\n\t //SEI\n\t case 6:\n\t push = true;\n\t if (debug && avcSample) {\n\t avcSample.debug += 'SEI ';\n\t }\n\t expGolombDecoder = new _expGolomb2.default(_this.discardEPB(unit.data));\n\t\n\t // skip frameType\n\t expGolombDecoder.readUByte();\n\t\n\t var payloadType = 0;\n\t var payloadSize = 0;\n\t var endOfCaptions = false;\n\t var b = 0;\n\t\n\t while (!endOfCaptions && expGolombDecoder.bytesAvailable > 1) {\n\t payloadType = 0;\n\t do {\n\t b = expGolombDecoder.readUByte();\n\t payloadType += b;\n\t } while (b === 0xFF);\n\t\n\t // Parse payload size.\n\t payloadSize = 0;\n\t do {\n\t b = expGolombDecoder.readUByte();\n\t payloadSize += b;\n\t } while (b === 0xFF);\n\t\n\t // TODO: there can be more than one payload in an SEI packet...\n\t // TODO: need to read type and size in a while loop to get them all\n\t if (payloadType === 4 && expGolombDecoder.bytesAvailable !== 0) {\n\t\n\t endOfCaptions = true;\n\t\n\t var countryCode = expGolombDecoder.readUByte();\n\t\n\t if (countryCode === 181) {\n\t var providerCode = expGolombDecoder.readUShort();\n\t\n\t if (providerCode === 49) {\n\t var userStructure = expGolombDecoder.readUInt();\n\t\n\t if (userStructure === 0x47413934) {\n\t var userDataType = expGolombDecoder.readUByte();\n\t\n\t // Raw CEA-608 bytes wrapped in CEA-708 packet\n\t if (userDataType === 3) {\n\t var firstByte = expGolombDecoder.readUByte();\n\t var secondByte = expGolombDecoder.readUByte();\n\t\n\t var totalCCs = 31 & firstByte;\n\t var byteArray = [firstByte, secondByte];\n\t\n\t for (i = 0; i < totalCCs; i++) {\n\t // 3 bytes per CC\n\t byteArray.push(expGolombDecoder.readUByte());\n\t byteArray.push(expGolombDecoder.readUByte());\n\t byteArray.push(expGolombDecoder.readUByte());\n\t }\n\t\n\t _this._insertSampleInOrder(_this._txtTrack.samples, { type: 3, pts: pes.pts, bytes: byteArray });\n\t }\n\t }\n\t }\n\t }\n\t } else if (payloadSize < expGolombDecoder.bytesAvailable) {\n\t for (i = 0; i < payloadSize; i++) {\n\t expGolombDecoder.readUByte();\n\t }\n\t }\n\t }\n\t break;\n\t //SPS\n\t case 7:\n\t push = true;\n\t if (debug && avcSample) {\n\t avcSample.debug += 'SPS ';\n\t }\n\t if (!track.sps) {\n\t expGolombDecoder = new _expGolomb2.default(unit.data);\n\t var config = expGolombDecoder.readSPS();\n\t track.width = config.width;\n\t track.height = config.height;\n\t track.sps = [unit.data];\n\t track.duration = _this._duration;\n\t var codecarray = unit.data.subarray(1, 4);\n\t var codecstring = 'avc1.';\n\t for (i = 0; i < 3; i++) {\n\t var h = codecarray[i].toString(16);\n\t if (h.length < 2) {\n\t h = '0' + h;\n\t }\n\t codecstring += h;\n\t }\n\t track.codec = codecstring;\n\t }\n\t break;\n\t //PPS\n\t case 8:\n\t push = true;\n\t if (debug && avcSample) {\n\t avcSample.debug += 'PPS ';\n\t }\n\t if (!track.pps) {\n\t track.pps = [unit.data];\n\t }\n\t break;\n\t // AUD\n\t case 9:\n\t push = false;\n\t if (avcSample) {\n\t _this.pushAccesUnit(avcSample, track);\n\t }\n\t avcSample = _this.avcSample = _this._createAVCSample(false, pes.pts, pes.dts, debug ? 'AUD ' : '');\n\t break;\n\t // Filler Data\n\t case 12:\n\t push = false;\n\t break;\n\t default:\n\t push = false;\n\t if (avcSample) {\n\t avcSample.debug += 'unknown NAL ' + unit.type + ' ';\n\t }\n\t break;\n\t }\n\t if (avcSample && push) {\n\t var _units = avcSample.units;\n\t _units.units.push(unit);\n\t }\n\t });\n\t // if last PES packet, push samples\n\t if (last && avcSample) {\n\t this.pushAccesUnit(avcSample, track);\n\t this.avcSample = null;\n\t }\n\t }\n\t }, {\n\t key: '_createAVCSample',\n\t value: function _createAVCSample(key, pts, dts, debug) {\n\t return { key: key, pts: pts, dts: dts, units: { units: [], length: 0 }, debug: debug };\n\t }\n\t }, {\n\t key: '_insertSampleInOrder',\n\t value: function _insertSampleInOrder(arr, data) {\n\t var len = arr.length;\n\t if (len > 0) {\n\t if (data.pts >= arr[len - 1].pts) {\n\t arr.push(data);\n\t } else {\n\t for (var pos = len - 1; pos >= 0; pos--) {\n\t if (data.pts < arr[pos].pts) {\n\t arr.splice(pos, 0, data);\n\t break;\n\t }\n\t }\n\t }\n\t } else {\n\t arr.push(data);\n\t }\n\t }\n\t }, {\n\t key: '_getLastNalUnit',\n\t value: function _getLastNalUnit() {\n\t var avcSample = this.avcSample,\n\t lastUnit = void 0;\n\t // try to fallback to previous sample if current one is empty\n\t if (!avcSample || avcSample.units.units.length === 0) {\n\t var track = this._avcTrack,\n\t samples = track.samples;\n\t avcSample = samples[samples.length - 1];\n\t }\n\t if (avcSample) {\n\t var units = avcSample.units.units;\n\t lastUnit = units[units.length - 1];\n\t }\n\t return lastUnit;\n\t }\n\t }, {\n\t key: '_parseAVCNALu',\n\t value: function _parseAVCNALu(array) {\n\t var i = 0,\n\t len = array.byteLength,\n\t value,\n\t overflow,\n\t track = this._avcTrack,\n\t state = track.naluState || 0,\n\t lastState = state;\n\t var units = [],\n\t unit,\n\t unitType,\n\t lastUnitStart = -1,\n\t lastUnitType;\n\t //logger.log('PES:' + Hex.hexDump(array));\n\t while (i < len) {\n\t value = array[i++];\n\t // finding 3 or 4-byte start codes (00 00 01 OR 00 00 00 01)\n\t switch (state) {\n\t case 0:\n\t if (value === 0) {\n\t state = 1;\n\t }\n\t break;\n\t case 1:\n\t if (value === 0) {\n\t state = 2;\n\t } else {\n\t state = 0;\n\t }\n\t break;\n\t case 2:\n\t case 3:\n\t if (value === 0) {\n\t state = 3;\n\t } else if (value === 1) {\n\t if (lastUnitStart >= 0) {\n\t unit = { data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType };\n\t //logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n\t units.push(unit);\n\t } else {\n\t // lastUnitStart is undefined => this is the first start code found in this PES packet\n\t // first check if start code delimiter is overlapping between 2 PES packets,\n\t // ie it started in last packet (lastState not zero)\n\t // and ended at the beginning of this PES packet (i <= 4 - lastState)\n\t var lastUnit = this._getLastNalUnit();\n\t if (lastUnit) {\n\t if (lastState && i <= 4 - lastState) {\n\t // start delimiter overlapping between PES packets\n\t // strip start delimiter bytes from the end of last NAL unit\n\t // check if lastUnit had a state different from zero\n\t if (lastUnit.state) {\n\t // strip last bytes\n\t lastUnit.data = lastUnit.data.subarray(0, lastUnit.data.byteLength - lastState);\n\t }\n\t }\n\t // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.\n\t overflow = i - state - 1;\n\t if (overflow > 0) {\n\t //logger.log('first NALU found with overflow:' + overflow);\n\t var tmp = new Uint8Array(lastUnit.data.byteLength + overflow);\n\t tmp.set(lastUnit.data, 0);\n\t tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);\n\t lastUnit.data = tmp;\n\t }\n\t }\n\t }\n\t // check if we can read unit type\n\t if (i < len) {\n\t unitType = array[i] & 0x1f;\n\t //logger.log('find NALU @ offset:' + i + ',type:' + unitType);\n\t lastUnitStart = i;\n\t lastUnitType = unitType;\n\t state = 0;\n\t } else {\n\t // not enough byte to read unit type. let's read it on next PES parsing\n\t state = -1;\n\t }\n\t } else {\n\t state = 0;\n\t }\n\t break;\n\t case -1:\n\t // special use case where we found 3 or 4-byte start codes exactly at the end of previous PES packet\n\t lastUnitStart = 0;\n\t // NALu type is value read from offset 0\n\t lastUnitType = value & 0x1f;\n\t state = 0;\n\t break;\n\t default:\n\t break;\n\t }\n\t }\n\t if (lastUnitStart >= 0 && state >= 0) {\n\t unit = { data: array.subarray(lastUnitStart, len), type: lastUnitType, state: state };\n\t units.push(unit);\n\t //logger.log('pushing NALU, type/size/state:' + unit.type + '/' + unit.data.byteLength + '/' + state);\n\t }\n\t // no NALu found\n\t if (units.length === 0) {\n\t // append pes.data to previous NAL unit\n\t var _lastUnit = this._getLastNalUnit();\n\t if (_lastUnit) {\n\t var _tmp = new Uint8Array(_lastUnit.data.byteLength + array.byteLength);\n\t _tmp.set(_lastUnit.data, 0);\n\t _tmp.set(array, _lastUnit.data.byteLength);\n\t _lastUnit.data = _tmp;\n\t }\n\t }\n\t track.naluState = state;\n\t return units;\n\t }\n\t\n\t /**\n\t * remove Emulation Prevention bytes from a RBSP\n\t */\n\t\n\t }, {\n\t key: 'discardEPB',\n\t value: function discardEPB(data) {\n\t var length = data.byteLength,\n\t EPBPositions = [],\n\t i = 1,\n\t newLength,\n\t newData;\n\t\n\t // Find all `Emulation Prevention Bytes`\n\t while (i < length - 2) {\n\t if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n\t EPBPositions.push(i + 2);\n\t i += 2;\n\t } else {\n\t i++;\n\t }\n\t }\n\t\n\t // If no Emulation Prevention Bytes were found just return the original\n\t // array\n\t if (EPBPositions.length === 0) {\n\t return data;\n\t }\n\t\n\t // Create a new array to hold the NAL unit data\n\t newLength = length - EPBPositions.length;\n\t newData = new Uint8Array(newLength);\n\t var sourceIndex = 0;\n\t\n\t for (i = 0; i < newLength; sourceIndex++, i++) {\n\t if (sourceIndex === EPBPositions[0]) {\n\t // Skip this byte\n\t sourceIndex++;\n\t // Remove this position index\n\t EPBPositions.shift();\n\t }\n\t newData[i] = data[sourceIndex];\n\t }\n\t return newData;\n\t }\n\t }, {\n\t key: '_parseAACPES',\n\t value: function _parseAACPES(pes) {\n\t var track = this._aacTrack,\n\t data = pes.data,\n\t pts = pes.pts,\n\t startOffset = 0,\n\t aacOverFlow = this.aacOverFlow,\n\t aacLastPTS = this.aacLastPTS,\n\t config,\n\t frameLength,\n\t frameDuration,\n\t frameIndex,\n\t offset,\n\t headerLength,\n\t stamp,\n\t len,\n\t aacSample;\n\t if (aacOverFlow) {\n\t var tmp = new Uint8Array(aacOverFlow.byteLength + data.byteLength);\n\t tmp.set(aacOverFlow, 0);\n\t tmp.set(data, aacOverFlow.byteLength);\n\t //logger.log(`AAC: append overflowing ${aacOverFlow.byteLength} bytes to beginning of new PES`);\n\t data = tmp;\n\t }\n\t // look for ADTS header (0xFFFx)\n\t for (offset = startOffset, len = data.length; offset < len - 1; offset++) {\n\t if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n\t break;\n\t }\n\t }\n\t // if ADTS header does not start straight from the beginning of the PES payload, raise an error\n\t if (offset) {\n\t var reason, fatal;\n\t if (offset < len - 1) {\n\t reason = 'AAC PES did not start with ADTS header,offset:' + offset;\n\t fatal = false;\n\t } else {\n\t reason = 'no ADTS header found in AAC PES';\n\t fatal = true;\n\t }\n\t _logger.logger.warn('parsing error:' + reason);\n\t this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason });\n\t if (fatal) {\n\t return;\n\t }\n\t }\n\t if (!track.audiosamplerate) {\n\t config = _adts2.default.getAudioConfig(this.observer, data, offset, this.audioCodec);\n\t track.config = config.config;\n\t track.audiosamplerate = config.samplerate;\n\t track.channelCount = config.channelCount;\n\t track.codec = config.codec;\n\t track.duration = this._duration;\n\t _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);\n\t }\n\t frameIndex = 0;\n\t frameDuration = 1024 * 90000 / track.audiosamplerate;\n\t\n\t // if last AAC frame is overflowing, we should ensure timestamps are contiguous:\n\t // first sample PTS should be equal to last sample PTS + frameDuration\n\t if (aacOverFlow && aacLastPTS) {\n\t var newPTS = aacLastPTS + frameDuration;\n\t if (Math.abs(newPTS - pts) > 1) {\n\t _logger.logger.log('AAC: align PTS for overlapping frames by ' + Math.round((newPTS - pts) / 90));\n\t pts = newPTS;\n\t }\n\t }\n\t\n\t while (offset + 5 < len) {\n\t // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n\t headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;\n\t // retrieve frame size\n\t frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;\n\t frameLength -= headerLength;\n\t //stamp = pes.pts;\n\t\n\t if (frameLength > 0 && offset + headerLength + frameLength <= len) {\n\t stamp = pts + frameIndex * frameDuration;\n\t //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n\t aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };\n\t track.samples.push(aacSample);\n\t track.len += frameLength;\n\t offset += frameLength + headerLength;\n\t frameIndex++;\n\t // look for ADTS header (0xFFFx)\n\t for (; offset < len - 1; offset++) {\n\t if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n\t break;\n\t }\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\t if (offset < len) {\n\t aacOverFlow = data.subarray(offset, len);\n\t //logger.log(`AAC: overflow detected:${len-offset}`);\n\t } else {\n\t aacOverFlow = null;\n\t }\n\t this.aacOverFlow = aacOverFlow;\n\t this.aacLastPTS = stamp;\n\t }\n\t }, {\n\t key: '_parseID3PES',\n\t value: function _parseID3PES(pes) {\n\t this._id3Track.samples.push(pes);\n\t }\n\t }], [{\n\t key: 'probe',\n\t value: function probe(data) {\n\t // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47\n\t if (data.length >= 3 * 188 && data[0] === 0x47 && data[188] === 0x47 && data[2 * 188] === 0x47) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\t }]);\n\t\n\t return TSDemuxer;\n\t}();\n\t\n\texports.default = TSDemuxer;\n\t\n\t},{\"17\":17,\"21\":21,\"24\":24,\"26\":26,\"43\":43}],24:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar ErrorTypes = exports.ErrorTypes = {\n\t // Identifier for a network error (loading error / timeout ...)\n\t NETWORK_ERROR: 'networkError',\n\t // Identifier for a media Error (video/parsing/mediasource error)\n\t MEDIA_ERROR: 'mediaError',\n\t // Identifier for all other errors\n\t OTHER_ERROR: 'otherError'\n\t};\n\t\n\tvar ErrorDetails = exports.ErrorDetails = {\n\t // Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t MANIFEST_LOAD_ERROR: 'manifestLoadError',\n\t // Identifier for a manifest load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',\n\t // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}\n\t MANIFEST_PARSING_ERROR: 'manifestParsingError',\n\t // Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}\n\t MANIFEST_INCOMPATIBLE_CODECS_ERROR: 'manifestIncompatibleCodecsError',\n\t // Identifier for a level load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t LEVEL_LOAD_ERROR: 'levelLoadError',\n\t // Identifier for a level load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t LEVEL_LOAD_TIMEOUT: 'levelLoadTimeOut',\n\t // Identifier for a level switch error - data: { level : faulty level Id, event : error description}\n\t LEVEL_SWITCH_ERROR: 'levelSwitchError',\n\t // Identifier for an audio track load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t AUDIO_TRACK_LOAD_ERROR: 'audioTrackLoadError',\n\t // Identifier for an audio track load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n\t AUDIO_TRACK_LOAD_TIMEOUT: 'audioTrackLoadTimeOut',\n\t // Identifier for fragment load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n\t FRAG_LOAD_ERROR: 'fragLoadError',\n\t // Identifier for fragment loop loading error - data: { frag : fragment object}\n\t FRAG_LOOP_LOADING_ERROR: 'fragLoopLoadingError',\n\t // Identifier for fragment load timeout error - data: { frag : fragment object}\n\t FRAG_LOAD_TIMEOUT: 'fragLoadTimeOut',\n\t // Identifier for a fragment decryption error event - data: parsing error description\n\t FRAG_DECRYPT_ERROR: 'fragDecryptError',\n\t // Identifier for a fragment parsing error event - data: parsing error description\n\t FRAG_PARSING_ERROR: 'fragParsingError',\n\t // Identifier for decrypt key load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n\t KEY_LOAD_ERROR: 'keyLoadError',\n\t // Identifier for decrypt key load timeout error - data: { frag : fragment object}\n\t KEY_LOAD_TIMEOUT: 'keyLoadTimeOut',\n\t // Triggered when an exception occurs while adding a sourceBuffer to MediaSource - data : { err : exception , mimeType : mimeType }\n\t BUFFER_ADD_CODEC_ERROR: 'bufferAddCodecError',\n\t // Identifier for a buffer append error - data: append error description\n\t BUFFER_APPEND_ERROR: 'bufferAppendError',\n\t // Identifier for a buffer appending error event - data: appending error description\n\t BUFFER_APPENDING_ERROR: 'bufferAppendingError',\n\t // Identifier for a buffer stalled error event\n\t BUFFER_STALLED_ERROR: 'bufferStalledError',\n\t // Identifier for a buffer full event\n\t BUFFER_FULL_ERROR: 'bufferFullError',\n\t // Identifier for a buffer seek over hole event\n\t BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',\n\t // Identifier for an internal exception happening inside hls.js while handling an event\n\t INTERNAL_EXCEPTION: 'internalException'\n\t};\n\t\n\t},{}],25:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tvar _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; }; }(); /*\n\t *\n\t * All objects in the event handling chain should inherit from this class\n\t *\n\t */\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar EventHandler = function () {\n\t function EventHandler(hls) {\n\t _classCallCheck(this, EventHandler);\n\t\n\t this.hls = hls;\n\t this.onEvent = this.onEvent.bind(this);\n\t\n\t for (var _len = arguments.length, events = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t events[_key - 1] = arguments[_key];\n\t }\n\t\n\t this.handledEvents = events;\n\t this.useGenericHandler = true;\n\t\n\t this.registerListeners();\n\t }\n\t\n\t _createClass(EventHandler, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.unregisterListeners();\n\t }\n\t }, {\n\t key: 'isEventHandler',\n\t value: function isEventHandler() {\n\t return _typeof(this.handledEvents) === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';\n\t }\n\t }, {\n\t key: 'registerListeners',\n\t value: function registerListeners() {\n\t if (this.isEventHandler()) {\n\t this.handledEvents.forEach(function (event) {\n\t if (event === 'hlsEventGeneric') {\n\t throw new Error('Forbidden event name: ' + event);\n\t }\n\t this.hls.on(event, this.onEvent);\n\t }.bind(this));\n\t }\n\t }\n\t }, {\n\t key: 'unregisterListeners',\n\t value: function unregisterListeners() {\n\t if (this.isEventHandler()) {\n\t this.handledEvents.forEach(function (event) {\n\t this.hls.off(event, this.onEvent);\n\t }.bind(this));\n\t }\n\t }\n\t\n\t /**\n\t * arguments: event (string), data (any)\n\t */\n\t\n\t }, {\n\t key: 'onEvent',\n\t value: function onEvent(event, data) {\n\t this.onEventGeneric(event, data);\n\t }\n\t }, {\n\t key: 'onEventGeneric',\n\t value: function onEventGeneric(event, data) {\n\t var eventToFunction = function eventToFunction(event, data) {\n\t var funcName = 'on' + event.replace('hls', '');\n\t if (typeof this[funcName] !== 'function') {\n\t throw new Error('Event ' + event + ' has no generic handler in this ' + this.constructor.name + ' class (tried ' + funcName + ')');\n\t }\n\t return this[funcName].bind(this, data);\n\t };\n\t try {\n\t eventToFunction.call(this, event, data).call();\n\t } catch (err) {\n\t _logger.logger.error('internal error happened while processing ' + event + ':' + err.message);\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });\n\t }\n\t }\n\t }]);\n\t\n\t return EventHandler;\n\t}();\n\t\n\texports.default = EventHandler;\n\t\n\t},{\"24\":24,\"26\":26,\"43\":43}],26:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tmodule.exports = {\n\t // fired before MediaSource is attaching to media element - data: { media }\n\t MEDIA_ATTACHING: 'hlsMediaAttaching',\n\t // fired when MediaSource has been succesfully attached to media element - data: { }\n\t MEDIA_ATTACHED: 'hlsMediaAttached',\n\t // fired before detaching MediaSource from media element - data: { }\n\t MEDIA_DETACHING: 'hlsMediaDetaching',\n\t // fired when MediaSource has been detached from media element - data: { }\n\t MEDIA_DETACHED: 'hlsMediaDetached',\n\t // fired when we buffer is going to be resetted\n\t BUFFER_RESET: 'hlsBufferReset',\n\t // fired when we know about the codecs that we need buffers for to push into - data: {tracks : { container, codec, levelCodec, initSegment, metadata }}\n\t BUFFER_CODECS: 'hlsBufferCodecs',\n\t // fired when sourcebuffers have been created data: { tracks : tracks}\n\t BUFFER_CREATED: 'hlsBufferCreated',\n\t // fired when we append a segment to the buffer - data: { segment: segment object }\n\t BUFFER_APPENDING: 'hlsBufferAppending',\n\t // fired when we are done with appending a media segment to the buffer data : { parent : segment parent that triggered BUFFER_APPENDING }\n\t BUFFER_APPENDED: 'hlsBufferAppended',\n\t // fired when the stream is finished and we want to notify the media buffer that there will be no more data\n\t BUFFER_EOS: 'hlsBufferEos',\n\t // fired when the media buffer should be flushed - data {startOffset, endOffset}\n\t BUFFER_FLUSHING: 'hlsBufferFlushing',\n\t // fired when the media has been flushed\n\t BUFFER_FLUSHED: 'hlsBufferFlushed',\n\t // fired to signal that a manifest loading starts - data: { url : manifestURL}\n\t MANIFEST_LOADING: 'hlsManifestLoading',\n\t // fired after manifest has been loaded - data: { levels : [available quality levels] , audioTracks : [ available audio tracks], url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n\t MANIFEST_LOADED: 'hlsManifestLoaded',\n\t // fired after manifest has been parsed - data: { levels : [available quality levels] , firstLevel : index of first quality level appearing in Manifest}\n\t MANIFEST_PARSED: 'hlsManifestParsed',\n\t // fired when a level playlist loading starts - data: { url : level URL level : id of level being loaded}\n\t LEVEL_LOADING: 'hlsLevelLoading',\n\t // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n\t LEVEL_LOADED: 'hlsLevelLoaded',\n\t // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level }\n\t LEVEL_UPDATED: 'hlsLevelUpdated',\n\t // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n\t LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',\n\t // fired when a level switch is requested - data: { level : id of new level }\n\t LEVEL_SWITCH: 'hlsLevelSwitch',\n\t // fired to notify that audio track lists has been updated data: { audioTracks : audioTracks}\n\t AUDIO_TRACKS_UPDATED: 'hlsAudioTracksUpdated',\n\t // fired when an audio track switch occurs - data: { id : audio track id}\n\t AUDIO_TRACK_SWITCH: 'hlsAudioTrackSwitch',\n\t // fired when an audio track loading starts - data: { url : audio track URL id : audio track id}\n\t AUDIO_TRACK_LOADING: 'hlsAudioTrackLoading',\n\t // fired when an audio track loading finishes - data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime} }\n\t AUDIO_TRACK_LOADED: 'hlsAudioTrackLoaded',\n\t // fired when a fragment loading starts - data: { frag : fragment object}\n\t FRAG_LOADING: 'hlsFragLoading',\n\t // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded}}\n\t FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n\t // Identifier for fragment load aborting for emergency switch down - data: {frag : fragment object}\n\t FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n\t // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}\n\t FRAG_LOADED: 'hlsFragLoaded',\n\t // fired when Init Segment has been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, moov : moov MP4 box, codecs : codecs found while parsing fragment}\n\t FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n\t // fired when parsing sei text is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ sei samples pes ] }\n\t FRAG_PARSING_USERDATA: 'hlsFragParsingUserdata',\n\t // fired when parsing id3 is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ id3 samples pes ] }\n\t FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',\n\t // fired when data have been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, data1 : moof MP4 box or TS fragments, data2 : mdat MP4 box or null}\n\t FRAG_PARSING_DATA: 'hlsFragParsingData',\n\t // fired when fragment parsing is completed - data: { id : demuxer id; level : levelId, sn : sequence number, }\n\t FRAG_PARSED: 'hlsFragParsed',\n\t // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { id : demuxer id,frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length} }\n\t FRAG_BUFFERED: 'hlsFragBuffered',\n\t // fired when fragment matching with current media position is changing - data : { id : demuxer id, frag : fragment object }\n\t FRAG_CHANGED: 'hlsFragChanged',\n\t // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames}\n\t FPS_DROP: 'hlsFpsDrop',\n\t //triggered when FPS drop triggers auto level capping - data: {level, droppedlevel}\n\t FPS_DROP_LEVEL_CAPPING: 'hlsFpsDropLevelCapping',\n\t // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data}\n\t ERROR: 'hlsError',\n\t // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example\n\t DESTROYING: 'hlsDestroying',\n\t // fired when a decrypt key loading starts - data: { frag : fragment object}\n\t KEY_LOADING: 'hlsKeyLoading',\n\t // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}}\n\t KEY_LOADED: 'hlsKeyLoaded',\n\t // fired upon stream controller state transitions - data: {previousState, nextState}\n\t STREAM_STATE_TRANSITION: 'hlsStreamStateTransition'\n\t};\n\t\n\t},{}],27:[function(_dereq_,module,exports){\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * AAC helper\n\t */\n\t\n\tvar AAC = function () {\n\t function AAC() {\n\t _classCallCheck(this, AAC);\n\t }\n\t\n\t _createClass(AAC, null, [{\n\t key: \"getSilentFrame\",\n\t value: function getSilentFrame(channelCount) {\n\t if (channelCount === 1) {\n\t return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n\t } else if (channelCount === 2) {\n\t return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n\t } else if (channelCount === 3) {\n\t return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n\t } else if (channelCount === 4) {\n\t return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n\t } else if (channelCount === 5) {\n\t return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n\t } else if (channelCount === 6) {\n\t return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n\t }\n\t return null;\n\t }\n\t }]);\n\t\n\t return AAC;\n\t}();\n\t\n\texports.default = AAC;\n\t\n\t},{}],28:[function(_dereq_,module,exports){\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * Buffer Helper class, providing methods dealing buffer length retrieval\n\t*/\n\t\n\tvar BufferHelper = function () {\n\t function BufferHelper() {\n\t _classCallCheck(this, BufferHelper);\n\t }\n\t\n\t _createClass(BufferHelper, null, [{\n\t key: \"isBuffered\",\n\t value: function isBuffered(media, position) {\n\t if (media) {\n\t var buffered = media.buffered;\n\t for (var i = 0; i < buffered.length; i++) {\n\t if (position >= buffered.start(i) && position <= buffered.end(i)) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t }\n\t }, {\n\t key: \"bufferInfo\",\n\t value: function bufferInfo(media, pos, maxHoleDuration) {\n\t if (media) {\n\t var vbuffered = media.buffered,\n\t buffered = [],\n\t i;\n\t for (i = 0; i < vbuffered.length; i++) {\n\t buffered.push({ start: vbuffered.start(i), end: vbuffered.end(i) });\n\t }\n\t return this.bufferedInfo(buffered, pos, maxHoleDuration);\n\t } else {\n\t return { len: 0, start: 0, end: 0, nextStart: undefined };\n\t }\n\t }\n\t }, {\n\t key: \"bufferedInfo\",\n\t value: function bufferedInfo(buffered, pos, maxHoleDuration) {\n\t var buffered2 = [],\n\t\n\t // bufferStart and bufferEnd are buffer boundaries around current video position\n\t bufferLen,\n\t bufferStart,\n\t bufferEnd,\n\t bufferStartNext,\n\t i;\n\t // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n\t buffered.sort(function (a, b) {\n\t var diff = a.start - b.start;\n\t if (diff) {\n\t return diff;\n\t } else {\n\t return b.end - a.end;\n\t }\n\t });\n\t // there might be some small holes between buffer time range\n\t // consider that holes smaller than maxHoleDuration are irrelevant and build another\n\t // buffer time range representations that discards those holes\n\t for (i = 0; i < buffered.length; i++) {\n\t var buf2len = buffered2.length;\n\t if (buf2len) {\n\t var buf2end = buffered2[buf2len - 1].end;\n\t // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n\t if (buffered[i].start - buf2end < maxHoleDuration) {\n\t // merge overlapping time ranges\n\t // update lastRange.end only if smaller than item.end\n\t // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n\t // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n\t if (buffered[i].end > buf2end) {\n\t buffered2[buf2len - 1].end = buffered[i].end;\n\t }\n\t } else {\n\t // big hole\n\t buffered2.push(buffered[i]);\n\t }\n\t } else {\n\t // first value\n\t buffered2.push(buffered[i]);\n\t }\n\t }\n\t for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {\n\t var start = buffered2[i].start,\n\t end = buffered2[i].end;\n\t //logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n\t if (pos + maxHoleDuration >= start && pos < end) {\n\t // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n\t bufferStart = start;\n\t bufferEnd = end;\n\t bufferLen = bufferEnd - pos;\n\t } else if (pos + maxHoleDuration < start) {\n\t bufferStartNext = start;\n\t break;\n\t }\n\t }\n\t return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext };\n\t }\n\t }]);\n\t\n\t return BufferHelper;\n\t}();\n\t\n\texports.default = BufferHelper;\n\t\n\t},{}],29:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * Level Helper class, providing methods dealing with playlist sliding and drift\n\t */\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar LevelHelper = function () {\n\t function LevelHelper() {\n\t _classCallCheck(this, LevelHelper);\n\t }\n\t\n\t _createClass(LevelHelper, null, [{\n\t key: 'mergeDetails',\n\t value: function mergeDetails(oldDetails, newDetails) {\n\t var start = Math.max(oldDetails.startSN, newDetails.startSN) - newDetails.startSN,\n\t end = Math.min(oldDetails.endSN, newDetails.endSN) - newDetails.startSN,\n\t delta = newDetails.startSN - oldDetails.startSN,\n\t oldfragments = oldDetails.fragments,\n\t newfragments = newDetails.fragments,\n\t ccOffset = 0,\n\t PTSFrag;\n\t\n\t // check if old/new playlists have fragments in common\n\t if (end < start) {\n\t newDetails.PTSKnown = false;\n\t return;\n\t }\n\t // loop through overlapping SN and update startPTS , cc, and duration if any found\n\t for (var i = start; i <= end; i++) {\n\t var oldFrag = oldfragments[delta + i],\n\t newFrag = newfragments[i];\n\t if (newFrag && oldFrag) {\n\t ccOffset = oldFrag.cc - newFrag.cc;\n\t if (!isNaN(oldFrag.startPTS)) {\n\t newFrag.start = newFrag.startPTS = oldFrag.startPTS;\n\t newFrag.endPTS = oldFrag.endPTS;\n\t newFrag.duration = oldFrag.duration;\n\t PTSFrag = newFrag;\n\t }\n\t }\n\t }\n\t\n\t if (ccOffset) {\n\t _logger.logger.log('discontinuity sliding from playlist, take drift into account');\n\t for (i = 0; i < newfragments.length; i++) {\n\t newfragments[i].cc += ccOffset;\n\t }\n\t }\n\t\n\t // if at least one fragment contains PTS info, recompute PTS information for all fragments\n\t if (PTSFrag) {\n\t LevelHelper.updateFragPTSDTS(newDetails, PTSFrag.sn, PTSFrag.startPTS, PTSFrag.endPTS, PTSFrag.startDTS, PTSFrag.endDTS);\n\t } else {\n\t // ensure that delta is within oldfragments range\n\t // also adjust sliding in case delta is 0 (we could have old=[50-60] and new=old=[50-61])\n\t // in that case we also need to adjust start offset of all fragments\n\t if (delta >= 0 && delta < oldfragments.length) {\n\t // adjust start by sliding offset\n\t var sliding = oldfragments[delta].start;\n\t for (i = 0; i < newfragments.length; i++) {\n\t newfragments[i].start += sliding;\n\t }\n\t }\n\t }\n\t // if we are here, it means we have fragments overlapping between\n\t // old and new level. reliable PTS info is thus relying on old level\n\t newDetails.PTSKnown = oldDetails.PTSKnown;\n\t return;\n\t }\n\t }, {\n\t key: 'updateFragPTSDTS',\n\t value: function updateFragPTSDTS(details, sn, startPTS, endPTS, startDTS, endDTS) {\n\t var fragIdx, fragments, frag, i;\n\t // exit if sn out of range\n\t if (sn < details.startSN || sn > details.endSN) {\n\t return 0;\n\t }\n\t fragIdx = sn - details.startSN;\n\t fragments = details.fragments;\n\t frag = fragments[fragIdx];\n\t if (!isNaN(frag.startPTS)) {\n\t // delta PTS between audio and video\n\t var deltaPTS = Math.abs(frag.startPTS - startPTS);\n\t if (isNaN(frag.deltaPTS)) {\n\t frag.deltaPTS = deltaPTS;\n\t } else {\n\t frag.deltaPTS = Math.max(deltaPTS, frag.deltaPTS);\n\t }\n\t startPTS = Math.min(startPTS, frag.startPTS);\n\t endPTS = Math.max(endPTS, frag.endPTS);\n\t startDTS = Math.min(startDTS, frag.startDTS);\n\t endDTS = Math.max(endDTS, frag.endDTS);\n\t }\n\t\n\t var drift = startPTS - frag.start;\n\t\n\t frag.start = frag.startPTS = startPTS;\n\t frag.endPTS = endPTS;\n\t frag.startDTS = startDTS;\n\t frag.endDTS = endDTS;\n\t frag.duration = endPTS - startPTS;\n\t // adjust fragment PTS/duration from seqnum-1 to frag 0\n\t for (i = fragIdx; i > 0; i--) {\n\t LevelHelper.updatePTS(fragments, i, i - 1);\n\t }\n\t\n\t // adjust fragment PTS/duration from seqnum to last frag\n\t for (i = fragIdx; i < fragments.length - 1; i++) {\n\t LevelHelper.updatePTS(fragments, i, i + 1);\n\t }\n\t details.PTSKnown = true;\n\t //logger.log(` frag start/end:${startPTS.toFixed(3)}/${endPTS.toFixed(3)}`);\n\t\n\t return drift;\n\t }\n\t }, {\n\t key: 'updatePTS',\n\t value: function updatePTS(fragments, fromIdx, toIdx) {\n\t var fragFrom = fragments[fromIdx],\n\t fragTo = fragments[toIdx],\n\t fragToPTS = fragTo.startPTS;\n\t // if we know startPTS[toIdx]\n\t if (!isNaN(fragToPTS)) {\n\t // update fragment duration.\n\t // it helps to fix drifts between playlist reported duration and fragment real duration\n\t if (toIdx > fromIdx) {\n\t fragFrom.duration = fragToPTS - fragFrom.start;\n\t if (fragFrom.duration < 0) {\n\t _logger.logger.warn('negative duration computed for frag ' + fragFrom.sn + ',level ' + fragFrom.level + ', there should be some duration drift between playlist and fragment!');\n\t }\n\t } else {\n\t fragTo.duration = fragFrom.start - fragToPTS;\n\t if (fragTo.duration < 0) {\n\t _logger.logger.warn('negative duration computed for frag ' + fragTo.sn + ',level ' + fragTo.level + ', there should be some duration drift between playlist and fragment!');\n\t }\n\t }\n\t } else {\n\t // we dont know startPTS[toIdx]\n\t if (toIdx > fromIdx) {\n\t fragTo.start = fragFrom.start + fragFrom.duration;\n\t } else {\n\t fragTo.start = fragFrom.start - fragTo.duration;\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return LevelHelper;\n\t}();\n\t\n\texports.default = LevelHelper;\n\t\n\t},{\"43\":43}],30:[function(_dereq_,module,exports){\n\t/**\n\t * HLS interface\n\t */\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t//import FetchLoader from './utils/fetch-loader';\n\t\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _playlistLoader = _dereq_(34);\n\t\n\tvar _playlistLoader2 = _interopRequireDefault(_playlistLoader);\n\t\n\tvar _fragmentLoader = _dereq_(32);\n\t\n\tvar _fragmentLoader2 = _interopRequireDefault(_fragmentLoader);\n\t\n\tvar _abrController = _dereq_(3);\n\t\n\tvar _abrController2 = _interopRequireDefault(_abrController);\n\t\n\tvar _bufferController = _dereq_(6);\n\t\n\tvar _bufferController2 = _interopRequireDefault(_bufferController);\n\t\n\tvar _capLevelController = _dereq_(7);\n\t\n\tvar _capLevelController2 = _interopRequireDefault(_capLevelController);\n\t\n\tvar _audioStreamController = _dereq_(4);\n\t\n\tvar _audioStreamController2 = _interopRequireDefault(_audioStreamController);\n\t\n\tvar _streamController = _dereq_(11);\n\t\n\tvar _streamController2 = _interopRequireDefault(_streamController);\n\t\n\tvar _levelController = _dereq_(10);\n\t\n\tvar _levelController2 = _interopRequireDefault(_levelController);\n\t\n\tvar _timelineController = _dereq_(12);\n\t\n\tvar _timelineController2 = _interopRequireDefault(_timelineController);\n\t\n\tvar _fpsController = _dereq_(9);\n\t\n\tvar _fpsController2 = _interopRequireDefault(_fpsController);\n\t\n\tvar _audioTrackController = _dereq_(5);\n\t\n\tvar _audioTrackController2 = _interopRequireDefault(_audioTrackController);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _xhrLoader = _dereq_(47);\n\t\n\tvar _xhrLoader2 = _interopRequireDefault(_xhrLoader);\n\t\n\tvar _events3 = _dereq_(1);\n\t\n\tvar _events4 = _interopRequireDefault(_events3);\n\t\n\tvar _keyLoader = _dereq_(33);\n\t\n\tvar _keyLoader2 = _interopRequireDefault(_keyLoader);\n\t\n\tvar _cues = _dereq_(41);\n\t\n\tvar _cues2 = _interopRequireDefault(_cues);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar Hls = function () {\n\t _createClass(Hls, null, [{\n\t key: 'isSupported',\n\t value: function isSupported() {\n\t return window.MediaSource && typeof window.MediaSource.isTypeSupported === 'function' && window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n\t }\n\t }, {\n\t key: 'version',\n\t get: function get() {\n\t // replaced with browserify-versionify transform\n\t return '0.6.7';\n\t }\n\t }, {\n\t key: 'Events',\n\t get: function get() {\n\t return _events2.default;\n\t }\n\t }, {\n\t key: 'ErrorTypes',\n\t get: function get() {\n\t return _errors.ErrorTypes;\n\t }\n\t }, {\n\t key: 'ErrorDetails',\n\t get: function get() {\n\t return _errors.ErrorDetails;\n\t }\n\t }, {\n\t key: 'DefaultConfig',\n\t get: function get() {\n\t if (!Hls.defaultConfig) {\n\t Hls.defaultConfig = {\n\t autoStartLoad: true,\n\t startPosition: -1,\n\t defaultAudioCodec: undefined,\n\t debug: false,\n\t capLevelOnFPSDrop: false,\n\t capLevelToPlayerSize: false,\n\t maxBufferLength: 30,\n\t maxBufferSize: 60 * 1000 * 1000,\n\t maxBufferHole: 0.5,\n\t maxSeekHole: 2,\n\t seekHoleNudgeDuration: 0.01,\n\t stalledInBufferedNudgeThreshold: 10,\n\t maxFragLookUpTolerance: 0.2,\n\t liveSyncDurationCount: 3,\n\t liveMaxLatencyDurationCount: Infinity,\n\t liveSyncDuration: undefined,\n\t liveMaxLatencyDuration: undefined,\n\t maxMaxBufferLength: 600,\n\t enableWorker: true,\n\t enableSoftwareAES: true,\n\t manifestLoadingTimeOut: 10000,\n\t manifestLoadingMaxRetry: 1,\n\t manifestLoadingRetryDelay: 1000,\n\t manifestLoadingMaxRetryTimeout: 64000,\n\t startLevel: undefined,\n\t levelLoadingTimeOut: 10000,\n\t levelLoadingMaxRetry: 4,\n\t levelLoadingRetryDelay: 1000,\n\t levelLoadingMaxRetryTimeout: 64000,\n\t fragLoadingTimeOut: 20000,\n\t fragLoadingMaxRetry: 6,\n\t fragLoadingRetryDelay: 1000,\n\t fragLoadingMaxRetryTimeout: 64000,\n\t fragLoadingLoopThreshold: 3,\n\t startFragPrefetch: false,\n\t fpsDroppedMonitoringPeriod: 5000,\n\t fpsDroppedMonitoringThreshold: 0.2,\n\t appendErrorMaxRetry: 3,\n\t loader: _xhrLoader2.default,\n\t //loader: FetchLoader,\n\t fLoader: undefined,\n\t pLoader: undefined,\n\t xhrSetup: undefined,\n\t fetchSetup: undefined,\n\t abrController: _abrController2.default,\n\t bufferController: _bufferController2.default,\n\t capLevelController: _capLevelController2.default,\n\t fpsController: _fpsController2.default,\n\t streamController: _streamController2.default,\n\t audioStreamController: _audioStreamController2.default,\n\t timelineController: _timelineController2.default,\n\t cueHandler: _cues2.default,\n\t enableCEA708Captions: true,\n\t enableMP2TPassThrough: false,\n\t stretchShortVideoTrack: false,\n\t forceKeyFrameOnDiscontinuity: true,\n\t abrEwmaFastLive: 5,\n\t abrEwmaSlowLive: 9,\n\t abrEwmaFastVoD: 3,\n\t abrEwmaSlowVoD: 9,\n\t abrEwmaDefaultEstimate: 5e5, // 500 kbps\n\t abrBandWidthFactor: 0.8,\n\t abrBandWidthUpFactor: 0.7,\n\t maxStarvationDelay: 4,\n\t maxLoadingDelay: 4,\n\t minAutoBitrate: 0\n\t };\n\t }\n\t return Hls.defaultConfig;\n\t },\n\t set: function set(defaultConfig) {\n\t Hls.defaultConfig = defaultConfig;\n\t }\n\t }]);\n\t\n\t function Hls() {\n\t var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\t\n\t _classCallCheck(this, Hls);\n\t\n\t var defaultConfig = Hls.DefaultConfig;\n\t\n\t if ((config.liveSyncDurationCount || config.liveMaxLatencyDurationCount) && (config.liveSyncDuration || config.liveMaxLatencyDuration)) {\n\t throw new Error('Illegal hls.js config: don\\'t mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration');\n\t }\n\t\n\t for (var prop in defaultConfig) {\n\t if (prop in config) {\n\t continue;\n\t }\n\t config[prop] = defaultConfig[prop];\n\t }\n\t\n\t if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n\t throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n\t }\n\t\n\t if (config.liveMaxLatencyDuration !== undefined && (config.liveMaxLatencyDuration <= config.liveSyncDuration || config.liveSyncDuration === undefined)) {\n\t throw new Error('Illegal hls.js config: \"liveMaxLatencyDuration\" must be gt \"liveSyncDuration\"');\n\t }\n\t\n\t (0, _logger.enableLogs)(config.debug);\n\t this.config = config;\n\t // observer setup\n\t var observer = this.observer = new _events4.default();\n\t observer.trigger = function trigger(event) {\n\t for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t data[_key - 1] = arguments[_key];\n\t }\n\t\n\t observer.emit.apply(observer, [event, event].concat(data));\n\t };\n\t\n\t observer.off = function off(event) {\n\t for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n\t data[_key2 - 1] = arguments[_key2];\n\t }\n\t\n\t observer.removeListener.apply(observer, [event].concat(data));\n\t };\n\t this.on = observer.on.bind(observer);\n\t this.off = observer.off.bind(observer);\n\t this.trigger = observer.trigger.bind(observer);\n\t this.playlistLoader = new _playlistLoader2.default(this);\n\t this.fragmentLoader = new _fragmentLoader2.default(this);\n\t this.levelController = new _levelController2.default(this);\n\t this.abrController = new config.abrController(this);\n\t this.bufferController = new config.bufferController(this);\n\t this.capLevelController = new config.capLevelController(this);\n\t this.fpsController = new config.fpsController(this);\n\t this.streamController = new config.streamController(this);\n\t this.audioStreamController = new config.audioStreamController(this);\n\t this.timelineController = new config.timelineController(this);\n\t this.audioTrackController = new _audioTrackController2.default(this);\n\t this.keyLoader = new _keyLoader2.default(this);\n\t }\n\t\n\t _createClass(Hls, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t _logger.logger.log('destroy');\n\t this.trigger(_events2.default.DESTROYING);\n\t this.detachMedia();\n\t this.playlistLoader.destroy();\n\t this.fragmentLoader.destroy();\n\t this.levelController.destroy();\n\t this.abrController.destroy();\n\t this.bufferController.destroy();\n\t this.capLevelController.destroy();\n\t this.fpsController.destroy();\n\t this.streamController.destroy();\n\t this.audioStreamController.destroy();\n\t this.timelineController.destroy();\n\t this.audioTrackController.destroy();\n\t this.keyLoader.destroy();\n\t this.url = null;\n\t this.observer.removeAllListeners();\n\t }\n\t }, {\n\t key: 'attachMedia',\n\t value: function attachMedia(media) {\n\t _logger.logger.log('attachMedia');\n\t this.media = media;\n\t this.trigger(_events2.default.MEDIA_ATTACHING, { media: media });\n\t }\n\t }, {\n\t key: 'detachMedia',\n\t value: function detachMedia() {\n\t _logger.logger.log('detachMedia');\n\t this.trigger(_events2.default.MEDIA_DETACHING);\n\t this.media = null;\n\t }\n\t }, {\n\t key: 'loadSource',\n\t value: function loadSource(url) {\n\t _logger.logger.log('loadSource:' + url);\n\t this.url = url;\n\t // when attaching to a source URL, trigger a playlist load\n\t this.trigger(_events2.default.MANIFEST_LOADING, { url: url });\n\t }\n\t }, {\n\t key: 'startLoad',\n\t value: function startLoad() {\n\t var startPosition = arguments.length <= 0 || arguments[0] === undefined ? -1 : arguments[0];\n\t\n\t _logger.logger.log('startLoad');\n\t this.levelController.startLoad();\n\t this.streamController.startLoad(startPosition);\n\t this.audioStreamController.startLoad(startPosition);\n\t }\n\t }, {\n\t key: 'stopLoad',\n\t value: function stopLoad() {\n\t _logger.logger.log('stopLoad');\n\t this.levelController.stopLoad();\n\t this.streamController.stopLoad();\n\t this.audioStreamController.stopLoad();\n\t }\n\t }, {\n\t key: 'swapAudioCodec',\n\t value: function swapAudioCodec() {\n\t _logger.logger.log('swapAudioCodec');\n\t this.streamController.swapAudioCodec();\n\t }\n\t }, {\n\t key: 'recoverMediaError',\n\t value: function recoverMediaError() {\n\t _logger.logger.log('recoverMediaError');\n\t var media = this.media;\n\t this.detachMedia();\n\t this.attachMedia(media);\n\t }\n\t\n\t /** Return all quality levels **/\n\t\n\t }, {\n\t key: 'levels',\n\t get: function get() {\n\t return this.levelController.levels;\n\t }\n\t\n\t /** Return current playback quality level **/\n\t\n\t }, {\n\t key: 'currentLevel',\n\t get: function get() {\n\t return this.streamController.currentLevel;\n\t }\n\t\n\t /* set quality level immediately (-1 for automatic level selection) */\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set currentLevel:' + newLevel);\n\t this.loadLevel = newLevel;\n\t this.streamController.immediateLevelSwitch();\n\t }\n\t\n\t /** Return next playback quality level (quality level of next fragment) **/\n\t\n\t }, {\n\t key: 'nextLevel',\n\t get: function get() {\n\t return this.streamController.nextLevel;\n\t }\n\t\n\t /* set quality level for next fragment (-1 for automatic level selection) */\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set nextLevel:' + newLevel);\n\t this.levelController.manualLevel = newLevel;\n\t this.streamController.nextLevelSwitch();\n\t }\n\t\n\t /** Return the quality level of current/last loaded fragment **/\n\t\n\t }, {\n\t key: 'loadLevel',\n\t get: function get() {\n\t return this.levelController.level;\n\t }\n\t\n\t /* set quality level for current/next loaded fragment (-1 for automatic level selection) */\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set loadLevel:' + newLevel);\n\t this.levelController.manualLevel = newLevel;\n\t }\n\t\n\t /** Return the quality level of next loaded fragment **/\n\t\n\t }, {\n\t key: 'nextLoadLevel',\n\t get: function get() {\n\t return this.levelController.nextLoadLevel;\n\t }\n\t\n\t /** set quality level of next loaded fragment **/\n\t ,\n\t set: function set(level) {\n\t this.levelController.nextLoadLevel = level;\n\t }\n\t\n\t /** Return first level (index of first level referenced in manifest)\n\t **/\n\t\n\t }, {\n\t key: 'firstLevel',\n\t get: function get() {\n\t return this.levelController.firstLevel;\n\t }\n\t\n\t /** set first level (index of first level referenced in manifest)\n\t **/\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set firstLevel:' + newLevel);\n\t this.levelController.firstLevel = newLevel;\n\t }\n\t\n\t /** Return start level (level of first fragment that will be played back)\n\t if not overrided by user, first level appearing in manifest will be used as start level\n\t if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n\t **/\n\t\n\t }, {\n\t key: 'startLevel',\n\t get: function get() {\n\t return this.levelController.startLevel;\n\t }\n\t\n\t /** set start level (level of first fragment that will be played back)\n\t if not overrided by user, first level appearing in manifest will be used as start level\n\t if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n\t **/\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set startLevel:' + newLevel);\n\t this.levelController.startLevel = newLevel;\n\t }\n\t\n\t /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n\t\n\t }, {\n\t key: 'autoLevelCapping',\n\t get: function get() {\n\t return this.abrController.autoLevelCapping;\n\t }\n\t\n\t /** set the capping/max level value that could be used by automatic level selection algorithm **/\n\t ,\n\t set: function set(newLevel) {\n\t _logger.logger.log('set autoLevelCapping:' + newLevel);\n\t this.abrController.autoLevelCapping = newLevel;\n\t }\n\t\n\t /* check if we are in automatic level selection mode */\n\t\n\t }, {\n\t key: 'autoLevelEnabled',\n\t get: function get() {\n\t return this.levelController.manualLevel === -1;\n\t }\n\t\n\t /* return manual level */\n\t\n\t }, {\n\t key: 'manualLevel',\n\t get: function get() {\n\t return this.levelController.manualLevel;\n\t }\n\t\n\t /** get alternate audio tracks list from playlist **/\n\t\n\t }, {\n\t key: 'audioTracks',\n\t get: function get() {\n\t return this.audioTrackController.audioTracks;\n\t }\n\t\n\t /** get index of the selected audio track (index in audio track lists) **/\n\t\n\t }, {\n\t key: 'audioTrack',\n\t get: function get() {\n\t return this.audioTrackController.audioTrack;\n\t }\n\t\n\t /** select an audio track, based on its index in audio track lists**/\n\t ,\n\t set: function set(audioTrackId) {\n\t this.audioTrackController.audioTrack = audioTrackId;\n\t }\n\t }, {\n\t key: 'liveSyncPosition',\n\t get: function get() {\n\t return this.streamController.liveSyncPosition;\n\t }\n\t }]);\n\t\n\t return Hls;\n\t}();\n\t\n\texports.default = Hls;\n\t\n\t},{\"1\":1,\"10\":10,\"11\":11,\"12\":12,\"24\":24,\"26\":26,\"3\":3,\"32\":32,\"33\":33,\"34\":34,\"4\":4,\"41\":41,\"43\":43,\"47\":47,\"5\":5,\"6\":6,\"7\":7,\"9\":9}],31:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\t// This is mostly for support of the es6 module export\n\t// syntax with the babel compiler, it looks like it doesnt support\n\t// function exports like we are used to in node/commonjs\n\tmodule.exports = _dereq_(30).default;\n\t\n\t},{\"30\":30}],32:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Fragment Loader\n\t */\n\t\n\tvar FragmentLoader = function (_EventHandler) {\n\t _inherits(FragmentLoader, _EventHandler);\n\t\n\t function FragmentLoader(hls) {\n\t _classCallCheck(this, FragmentLoader);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FragmentLoader).call(this, hls, _events2.default.FRAG_LOADING));\n\t\n\t _this.loaders = {};\n\t return _this;\n\t }\n\t\n\t _createClass(FragmentLoader, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t var loaders = this.loaders;\n\t for (var loaderName in loaders) {\n\t var loader = loaders[loaderName];\n\t if (loader) {\n\t loader.destroy();\n\t }\n\t }\n\t this.loaders = {};\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onFragLoading',\n\t value: function onFragLoading(data) {\n\t var frag = data.frag,\n\t type = frag.type,\n\t loader = this.loaders[type],\n\t config = this.hls.config;\n\t\n\t frag.loaded = 0;\n\t if (loader) {\n\t _logger.logger.warn('abort previous fragment loader for type:' + type);\n\t loader.abort();\n\t }\n\t loader = this.loaders[type] = frag.loader = typeof config.fLoader !== 'undefined' ? new config.fLoader(config) : new config.loader(config);\n\t\n\t var loaderContext = void 0,\n\t loaderConfig = void 0,\n\t loaderCallbacks = void 0;\n\t loaderContext = { url: frag.url, frag: frag, responseType: 'arraybuffer', progressData: false };\n\t var start = frag.byteRangeStartOffset,\n\t end = frag.byteRangeEndOffset;\n\t if (!isNaN(start) && !isNaN(end)) {\n\t loaderContext.rangeStart = start;\n\t loaderContext.rangeEnd = end;\n\t }\n\t loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: 0, retryDelay: 0, maxRetryDelay: config.fragLoadingMaxRetryTimeout };\n\t loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this), onProgress: this.loadprogress.bind(this) };\n\t loader.load(loaderContext, loaderConfig, loaderCallbacks);\n\t }\n\t }, {\n\t key: 'loadsuccess',\n\t value: function loadsuccess(response, stats, context) {\n\t var payload = response.data,\n\t frag = context.frag;\n\t // detach fragment loader on load success\n\t frag.loader = undefined;\n\t this.loaders[frag.type] = undefined;\n\t this.hls.trigger(_events2.default.FRAG_LOADED, { payload: payload, frag: frag, stats: stats });\n\t }\n\t }, {\n\t key: 'loaderror',\n\t value: function loaderror(response, context) {\n\t var loader = context.loader;\n\t if (loader) {\n\t loader.abort();\n\t }\n\t this.loaders[context.type] = undefined;\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: context.frag, response: response });\n\t }\n\t }, {\n\t key: 'loadtimeout',\n\t value: function loadtimeout(stats, context) {\n\t var loader = context.loader;\n\t if (loader) {\n\t loader.abort();\n\t }\n\t this.loaders[context.type] = undefined;\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: context.frag });\n\t }\n\t\n\t // data will be used for progressive parsing\n\t\n\t }, {\n\t key: 'loadprogress',\n\t value: function loadprogress(stats, context, data) {\n\t // jshint ignore:line\n\t var frag = context.frag;\n\t frag.loaded = stats.loaded;\n\t this.hls.trigger(_events2.default.FRAG_LOAD_PROGRESS, { frag: frag, stats: stats });\n\t }\n\t }]);\n\t\n\t return FragmentLoader;\n\t}(_eventHandler2.default);\n\t\n\texports.default = FragmentLoader;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],33:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Decrypt key Loader\n\t */\n\t\n\tvar KeyLoader = function (_EventHandler) {\n\t _inherits(KeyLoader, _EventHandler);\n\t\n\t function KeyLoader(hls) {\n\t _classCallCheck(this, KeyLoader);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(KeyLoader).call(this, hls, _events2.default.KEY_LOADING));\n\t\n\t _this.loaders = {};\n\t _this.decryptkey = null;\n\t _this.decrypturl = null;\n\t return _this;\n\t }\n\t\n\t _createClass(KeyLoader, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t for (var loaderName in this.loaders) {\n\t var loader = this.loaders[loaderName];\n\t if (loader) {\n\t loader.destroy();\n\t }\n\t }\n\t this.loaders = {};\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onKeyLoading',\n\t value: function onKeyLoading(data) {\n\t var frag = data.frag,\n\t type = frag.type,\n\t loader = this.loaders[type],\n\t decryptdata = frag.decryptdata,\n\t uri = decryptdata.uri;\n\t // if uri is different from previous one or if decrypt key not retrieved yet\n\t if (uri !== this.decrypturl || this.decryptkey === null) {\n\t var config = this.hls.config;\n\t\n\t if (loader) {\n\t _logger.logger.warn('abort previous fragment loader for type:' + type);\n\t loader.abort();\n\t }\n\t frag.loader = this.loaders[type] = new config.loader(config);\n\t this.decrypturl = uri;\n\t this.decryptkey = null;\n\t\n\t var loaderContext = void 0,\n\t loaderConfig = void 0,\n\t loaderCallbacks = void 0;\n\t loaderContext = { url: uri, frag: frag, responseType: 'arraybuffer' };\n\t loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: config.fragLoadingMaxRetry, retryDelay: config.fragLoadingRetryDelay, maxRetryDelay: config.fragLoadingMaxRetryTimeout };\n\t loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };\n\t frag.loader.load(loaderContext, loaderConfig, loaderCallbacks);\n\t } else if (this.decryptkey) {\n\t // we already loaded this key, return it\n\t decryptdata.key = this.decryptkey;\n\t this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });\n\t }\n\t }\n\t }, {\n\t key: 'loadsuccess',\n\t value: function loadsuccess(response, stats, context) {\n\t var frag = context.frag;\n\t this.decryptkey = frag.decryptdata.key = new Uint8Array(response.data);\n\t // detach fragment loader on load success\n\t frag.loader = undefined;\n\t this.loaders[context.type] = undefined;\n\t this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });\n\t }\n\t }, {\n\t key: 'loaderror',\n\t value: function loaderror(response, context) {\n\t var frag = context.frag,\n\t loader = frag.loader;\n\t if (loader) {\n\t loader.abort();\n\t }\n\t this.loaders[context.type] = undefined;\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: frag, response: response });\n\t }\n\t }, {\n\t key: 'loadtimeout',\n\t value: function loadtimeout(stats, context) {\n\t var frag = context.frag,\n\t loader = frag.loader;\n\t if (loader) {\n\t loader.abort();\n\t }\n\t this.loaders[context.type] = undefined;\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: frag });\n\t }\n\t }]);\n\t\n\t return KeyLoader;\n\t}(_eventHandler2.default);\n\t\n\texports.default = KeyLoader;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],34:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _eventHandler = _dereq_(25);\n\t\n\tvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\tvar _url = _dereq_(46);\n\t\n\tvar _url2 = _interopRequireDefault(_url);\n\t\n\tvar _attrList = _dereq_(38);\n\t\n\tvar _attrList2 = _interopRequireDefault(_attrList);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n\t * Playlist Loader\n\t */\n\t\n\tvar PlaylistLoader = function (_EventHandler) {\n\t _inherits(PlaylistLoader, _EventHandler);\n\t\n\t function PlaylistLoader(hls) {\n\t _classCallCheck(this, PlaylistLoader);\n\t\n\t var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(PlaylistLoader).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.LEVEL_LOADING, _events2.default.AUDIO_TRACK_LOADING));\n\t\n\t _this.loaders = {};\n\t return _this;\n\t }\n\t\n\t _createClass(PlaylistLoader, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t for (var loaderName in this.loaders) {\n\t var loader = this.loaders[loaderName];\n\t if (loader) {\n\t loader.destroy();\n\t }\n\t }\n\t this.loaders = {};\n\t _eventHandler2.default.prototype.destroy.call(this);\n\t }\n\t }, {\n\t key: 'onManifestLoading',\n\t value: function onManifestLoading(data) {\n\t this.load(data.url, { type: 'manifest' });\n\t }\n\t }, {\n\t key: 'onLevelLoading',\n\t value: function onLevelLoading(data) {\n\t this.load(data.url, { type: 'level', level: data.level, id: data.id });\n\t }\n\t }, {\n\t key: 'onAudioTrackLoading',\n\t value: function onAudioTrackLoading(data) {\n\t this.load(data.url, { type: 'audioTrack', id: data.id });\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(url, context) {\n\t var loader = this.loaders[context.type];\n\t if (loader) {\n\t var loaderContext = loader.context;\n\t if (loaderContext && loaderContext.url === url) {\n\t _logger.logger.trace('playlist request ongoing');\n\t return;\n\t } else {\n\t _logger.logger.warn('abort previous loader for type:' + context.type);\n\t loader.abort();\n\t }\n\t }\n\t var config = this.hls.config,\n\t retry = void 0,\n\t timeout = void 0,\n\t retryDelay = void 0,\n\t maxRetryDelay = void 0;\n\t if (context.type === 'manifest') {\n\t retry = config.manifestLoadingMaxRetry;\n\t timeout = config.manifestLoadingTimeOut;\n\t retryDelay = config.manifestLoadingRetryDelay;\n\t maxRetryDelay = config.manifestLoadingMaxRetryTimeOut;\n\t } else {\n\t retry = config.levelLoadingMaxRetry;\n\t timeout = config.levelLoadingTimeOut;\n\t retryDelay = config.levelLoadingRetryDelay;\n\t maxRetryDelay = config.levelLoadingMaxRetryTimeOut;\n\t _logger.logger.log('loading playlist for level ' + context.level);\n\t }\n\t loader = this.loaders[context.type] = context.loader = typeof config.pLoader !== 'undefined' ? new config.pLoader(config) : new config.loader(config);\n\t context.url = url;\n\t context.responseType = '';\n\t\n\t var loaderConfig = void 0,\n\t loaderCallbacks = void 0;\n\t loaderConfig = { timeout: timeout, maxRetry: retry, retryDelay: retryDelay, maxRetryDelay: maxRetryDelay };\n\t loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };\n\t loader.load(context, loaderConfig, loaderCallbacks);\n\t }\n\t }, {\n\t key: 'resolve',\n\t value: function resolve(url, baseUrl) {\n\t return _url2.default.buildAbsoluteURL(baseUrl, url);\n\t }\n\t }, {\n\t key: 'parseMasterPlaylist',\n\t value: function parseMasterPlaylist(string, baseurl) {\n\t var levels = [],\n\t result = void 0;\n\t\n\t // https://regex101.com is your friend\n\t var re = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\n\t while ((result = re.exec(string)) != null) {\n\t var level = {};\n\t\n\t var attrs = level.attrs = new _attrList2.default(result[1]);\n\t level.url = this.resolve(result[2], baseurl);\n\t\n\t var resolution = attrs.decimalResolution('RESOLUTION');\n\t if (resolution) {\n\t level.width = resolution.width;\n\t level.height = resolution.height;\n\t }\n\t level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH');\n\t level.name = attrs.NAME;\n\t\n\t var codecs = attrs.CODECS;\n\t if (codecs) {\n\t codecs = codecs.split(',');\n\t for (var i = 0; i < codecs.length; i++) {\n\t var codec = codecs[i];\n\t if (codec.indexOf('avc1') !== -1) {\n\t level.videoCodec = this.avc1toavcoti(codec);\n\t } else {\n\t level.audioCodec = codec;\n\t }\n\t }\n\t }\n\t\n\t levels.push(level);\n\t }\n\t return levels;\n\t }\n\t }, {\n\t key: 'parseMasterPlaylistMedia',\n\t value: function parseMasterPlaylistMedia(string, baseurl, type) {\n\t var result = void 0,\n\t medias = [];\n\t\n\t // https://regex101.com is your friend\n\t var re = /#EXT-X-MEDIA:(.*)/g;\n\t while ((result = re.exec(string)) != null) {\n\t var media = {};\n\t var attrs = new _attrList2.default(result[1]);\n\t if (attrs.TYPE === type) {\n\t media.groupId = attrs['GROUP-ID'];\n\t media.name = attrs.NAME;\n\t media.type = type;\n\t media.default = attrs.DEFAULT === 'YES';\n\t media.autoselect = attrs.AUTOSELECT === 'YES';\n\t media.forced = attrs.FORCED === 'YES';\n\t if (attrs.URI) {\n\t media.url = this.resolve(attrs.URI, baseurl);\n\t }\n\t media.lang = attrs.LANGUAGE;\n\t if (!media.name) {\n\t media.name = media.lang;\n\t }\n\t medias.push(media);\n\t }\n\t }\n\t return medias;\n\t }\n\t /**\n\t * Utility method for parseLevelPlaylist to create an initialization vector for a given segment\n\t * @returns {Uint8Array}\n\t */\n\t\n\t }, {\n\t key: 'createInitializationVector',\n\t value: function createInitializationVector(segmentNumber) {\n\t var uint8View = new Uint8Array(16);\n\t\n\t for (var i = 12; i < 16; i++) {\n\t uint8View[i] = segmentNumber >> 8 * (15 - i) & 0xff;\n\t }\n\t\n\t return uint8View;\n\t }\n\t\n\t /**\n\t * Utility method for parseLevelPlaylist to get a fragment's decryption data from the currently parsed encryption key data\n\t * @param levelkey - a playlist's encryption info\n\t * @param segmentNumber - the fragment's segment number\n\t * @returns {*} - an object to be applied as a fragment's decryptdata\n\t */\n\t\n\t }, {\n\t key: 'fragmentDecryptdataFromLevelkey',\n\t value: function fragmentDecryptdataFromLevelkey(levelkey, segmentNumber) {\n\t var decryptdata = levelkey;\n\t\n\t if (levelkey && levelkey.method && levelkey.uri && !levelkey.iv) {\n\t decryptdata = this.cloneObj(levelkey);\n\t decryptdata.iv = this.createInitializationVector(segmentNumber);\n\t }\n\t\n\t return decryptdata;\n\t }\n\t }, {\n\t key: 'avc1toavcoti',\n\t value: function avc1toavcoti(codec) {\n\t var result,\n\t avcdata = codec.split('.');\n\t if (avcdata.length > 2) {\n\t result = avcdata.shift() + '.';\n\t result += parseInt(avcdata.shift()).toString(16);\n\t result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n\t } else {\n\t result = codec;\n\t }\n\t return result;\n\t }\n\t }, {\n\t key: 'cloneObj',\n\t value: function cloneObj(obj) {\n\t return JSON.parse(JSON.stringify(obj));\n\t }\n\t }, {\n\t key: 'parseLevelPlaylist',\n\t value: function parseLevelPlaylist(string, baseurl, id, type) {\n\t var currentSN = 0,\n\t fragdecryptdata,\n\t totalduration = 0,\n\t level = { type: null, version: null, url: baseurl, fragments: [], live: true, startSN: 0 },\n\t levelkey = { method: null, key: null, iv: null, uri: null },\n\t cc = 0,\n\t programDateTime = null,\n\t frag = null,\n\t result,\n\t regexp,\n\t duration = null,\n\t title = null,\n\t byteRangeEndOffset = null,\n\t byteRangeStartOffset = null,\n\t tagList = [];\n\t\n\t regexp = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\\d+))|(?:#EXT-X-(TARGETDURATION):(\\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\\d+(?:\\.\\d+)?)(?:,(.*))?)|(?:(?!#)()(\\S.+))|(?:#EXT-X-(BYTERANGE):(\\d+(?:@\\d+(?:\\.\\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\\r?\\n?/g;\n\t while ((result = regexp.exec(string)) !== null) {\n\t result.shift();\n\t result = result.filter(function (n) {\n\t return n !== undefined;\n\t });\n\t switch (result[0]) {\n\t case 'PLAYLIST-TYPE':\n\t level.type = result[1].toUpperCase();\n\t break;\n\t case 'MEDIA-SEQUENCE':\n\t currentSN = level.startSN = parseInt(result[1]);\n\t break;\n\t case 'TARGETDURATION':\n\t level.targetduration = parseFloat(result[1]);\n\t break;\n\t case 'VERSION':\n\t level.version = parseInt(result[1]);\n\t break;\n\t case 'EXTM3U':\n\t break;\n\t case 'ENDLIST':\n\t level.live = false;\n\t break;\n\t case 'DIS':\n\t cc++;\n\t tagList.push(result);\n\t break;\n\t case 'BYTERANGE':\n\t var params = result[1].split('@');\n\t if (params.length === 1) {\n\t byteRangeStartOffset = byteRangeEndOffset;\n\t } else {\n\t byteRangeStartOffset = parseInt(params[1]);\n\t }\n\t byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;\n\t break;\n\t case 'INF':\n\t duration = parseFloat(result[1]);\n\t title = result[2] ? result[2] : null;\n\t tagList.push(result);\n\t break;\n\t case '':\n\t // url\n\t if (!isNaN(duration)) {\n\t var sn = currentSN++;\n\t fragdecryptdata = this.fragmentDecryptdataFromLevelkey(levelkey, sn);\n\t var url = result[1] ? this.resolve(result[1], baseurl) : null;\n\t frag = { url: url,\n\t type: type,\n\t duration: duration,\n\t title: title,\n\t start: totalduration,\n\t sn: sn,\n\t level: id,\n\t cc: cc,\n\t decryptdata: fragdecryptdata,\n\t programDateTime: programDateTime,\n\t tagList: tagList };\n\t // only include byte range options if used/needed\n\t if (byteRangeStartOffset !== null) {\n\t frag.byteRangeStartOffset = byteRangeStartOffset;\n\t frag.byteRangeEndOffset = byteRangeEndOffset;\n\t }\n\t level.fragments.push(frag);\n\t totalduration += duration;\n\t duration = null;\n\t title = null;\n\t byteRangeStartOffset = null;\n\t programDateTime = null;\n\t tagList = [];\n\t }\n\t break;\n\t case 'KEY':\n\t // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n\t var decryptparams = result[1];\n\t var keyAttrs = new _attrList2.default(decryptparams);\n\t var decryptmethod = keyAttrs.enumeratedString('METHOD'),\n\t decrypturi = keyAttrs.URI,\n\t decryptiv = keyAttrs.hexadecimalInteger('IV');\n\t if (decryptmethod) {\n\t levelkey = { method: null, key: null, iv: null, uri: null };\n\t if (decrypturi && decryptmethod === 'AES-128') {\n\t levelkey.method = decryptmethod;\n\t // URI to get the key\n\t levelkey.uri = this.resolve(decrypturi, baseurl);\n\t levelkey.key = null;\n\t // Initialization Vector (IV)\n\t levelkey.iv = decryptiv;\n\t }\n\t }\n\t break;\n\t case 'START':\n\t var startParams = result[1];\n\t var startAttrs = new _attrList2.default(startParams);\n\t var startTimeOffset = startAttrs.decimalFloatingPoint('TIME-OFFSET');\n\t //TIME-OFFSET can be 0\n\t if (!isNaN(startTimeOffset)) {\n\t level.startTimeOffset = startTimeOffset;\n\t }\n\t break;\n\t case 'PROGRAM-DATE-TIME':\n\t programDateTime = new Date(Date.parse(result[1]));\n\t tagList.push(result);\n\t break;\n\t case '#':\n\t result.shift();\n\t tagList.push(result);\n\t break;\n\t default:\n\t _logger.logger.warn('line parsed but not handled: ' + result);\n\t break;\n\t }\n\t }\n\t //logger.log('found ' + level.fragments.length + ' fragments');\n\t if (frag && !frag.url) {\n\t level.fragments.pop();\n\t totalduration -= frag.duration;\n\t }\n\t level.totalduration = totalduration;\n\t level.averagetargetduration = totalduration / level.fragments.length;\n\t level.endSN = currentSN - 1;\n\t return level;\n\t }\n\t }, {\n\t key: 'loadsuccess',\n\t value: function loadsuccess(response, stats, context) {\n\t var string = response.data,\n\t url = response.url,\n\t type = context.type,\n\t id = context.id,\n\t level = context.level,\n\t hls = this.hls;\n\t\n\t this.loaders[type] = undefined;\n\t // responseURL not supported on some browsers (it is used to detect URL redirection)\n\t // data-uri mode also not supported (but no need to detect redirection)\n\t if (url === undefined || url.indexOf('data:') === 0) {\n\t // fallback to initial URL\n\t url = context.url;\n\t }\n\t stats.tload = performance.now();\n\t //stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n\t if (string.indexOf('#EXTM3U') === 0) {\n\t if (string.indexOf('#EXTINF:') > 0) {\n\t var isLevel = type !== 'audioTrack',\n\t levelDetails = this.parseLevelPlaylist(string, url, (isLevel ? level : id) || 0, isLevel ? 'main' : 'audio');\n\t if (type === 'manifest') {\n\t // first request, stream manifest (no master playlist), fire manifest loaded event with level details\n\t hls.trigger(_events2.default.MANIFEST_LOADED, { levels: [{ url: url, details: levelDetails }], audioTracks: [], url: url, stats: stats });\n\t }\n\t stats.tparsed = performance.now();\n\t if (isLevel) {\n\t hls.trigger(_events2.default.LEVEL_LOADED, { details: levelDetails, level: level || 0, id: id || 0, stats: stats });\n\t } else {\n\t hls.trigger(_events2.default.AUDIO_TRACK_LOADED, { details: levelDetails, id: id, stats: stats });\n\t }\n\t } else {\n\t var levels = this.parseMasterPlaylist(string, url);\n\t // multi level playlist, parse level info\n\t if (levels.length) {\n\t var audiotracks = this.parseMasterPlaylistMedia(string, url, 'AUDIO');\n\t if (audiotracks.length) {\n\t // check if we have found an audio track embedded in main playlist (audio track without URI attribute)\n\t var embeddedAudioFound = false;\n\t audiotracks.forEach(function (audioTrack) {\n\t if (!audioTrack.url) {\n\t embeddedAudioFound = true;\n\t }\n\t });\n\t // if no embedded audio track defined, but audio codec signaled in quality level, we need to signal this main audio track\n\t // this could happen with playlists with alt audio rendition in which quality levels (main) contains both audio+video. but with mixed audio track not signaled\n\t if (embeddedAudioFound === false && levels[0].audioCodec && !levels[0].attrs.AUDIO) {\n\t _logger.logger.log('audio codec signaled in quality level, but no embedded audio track signaled, create one');\n\t audiotracks.unshift({ type: 'main', name: 'main' });\n\t }\n\t }\n\t hls.trigger(_events2.default.MANIFEST_LOADED, { levels: levels, audioTracks: audiotracks, url: url, stats: stats });\n\t } else {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest' });\n\t }\n\t }\n\t } else {\n\t hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter' });\n\t }\n\t }\n\t }, {\n\t key: 'loaderror',\n\t value: function loaderror(response, context) {\n\t var details,\n\t fatal,\n\t loader = context.loader;\n\t switch (context.type) {\n\t case 'manifest':\n\t details = _errors.ErrorDetails.MANIFEST_LOAD_ERROR;\n\t fatal = true;\n\t break;\n\t case 'level':\n\t details = _errors.ErrorDetails.LEVEL_LOAD_ERROR;\n\t fatal = false;\n\t break;\n\t case 'audioTrack':\n\t details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR;\n\t fatal = false;\n\t break;\n\t }\n\t if (loader) {\n\t loader.abort();\n\t this.loaders[context.type] = undefined;\n\t }\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, response: response, context: context });\n\t }\n\t }, {\n\t key: 'loadtimeout',\n\t value: function loadtimeout(stats, context) {\n\t var details,\n\t fatal,\n\t loader = context.loader;\n\t switch (context.type) {\n\t case 'manifest':\n\t details = _errors.ErrorDetails.MANIFEST_LOAD_TIMEOUT;\n\t fatal = true;\n\t break;\n\t case 'level':\n\t details = _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT;\n\t fatal = false;\n\t break;\n\t case 'audioTrack':\n\t details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT;\n\t fatal = false;\n\t break;\n\t }\n\t if (loader) {\n\t loader.abort();\n\t this.loaders[context.type] = undefined;\n\t }\n\t this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, context: context });\n\t }\n\t }]);\n\t\n\t return PlaylistLoader;\n\t}(_eventHandler2.default);\n\t\n\texports.default = PlaylistLoader;\n\t\n\t},{\"24\":24,\"25\":25,\"26\":26,\"38\":38,\"43\":43,\"46\":46}],35:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * Generate MP4 Box\n\t*/\n\t\n\t//import Hex from '../utils/hex';\n\t\n\tvar MP4 = function () {\n\t function MP4() {\n\t _classCallCheck(this, MP4);\n\t }\n\t\n\t _createClass(MP4, null, [{\n\t key: 'init',\n\t value: function init() {\n\t MP4.types = {\n\t avc1: [], // codingname\n\t avcC: [],\n\t btrt: [],\n\t dinf: [],\n\t dref: [],\n\t esds: [],\n\t ftyp: [],\n\t hdlr: [],\n\t mdat: [],\n\t mdhd: [],\n\t mdia: [],\n\t mfhd: [],\n\t minf: [],\n\t moof: [],\n\t moov: [],\n\t mp4a: [],\n\t mvex: [],\n\t mvhd: [],\n\t sdtp: [],\n\t stbl: [],\n\t stco: [],\n\t stsc: [],\n\t stsd: [],\n\t stsz: [],\n\t stts: [],\n\t tfdt: [],\n\t tfhd: [],\n\t traf: [],\n\t trak: [],\n\t trun: [],\n\t trex: [],\n\t tkhd: [],\n\t vmhd: [],\n\t smhd: []\n\t };\n\t\n\t var i;\n\t for (i in MP4.types) {\n\t if (MP4.types.hasOwnProperty(i)) {\n\t MP4.types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n\t }\n\t }\n\t\n\t var videoHdlr = new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x00, // pre_defined\n\t 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n\t ]);\n\t\n\t var audioHdlr = new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x00, // pre_defined\n\t 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n\t ]);\n\t\n\t MP4.HDLR_TYPES = {\n\t 'video': videoHdlr,\n\t 'audio': audioHdlr\n\t };\n\t\n\t var dref = new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x01, // entry_count\n\t 0x00, 0x00, 0x00, 0x0c, // entry_size\n\t 0x75, 0x72, 0x6c, 0x20, // 'url' type\n\t 0x00, // version 0\n\t 0x00, 0x00, 0x01 // entry_flags\n\t ]);\n\t\n\t var stco = new Uint8Array([0x00, // version\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x00 // entry_count\n\t ]);\n\t\n\t MP4.STTS = MP4.STSC = MP4.STCO = stco;\n\t\n\t MP4.STSZ = new Uint8Array([0x00, // version\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x00, // sample_size\n\t 0x00, 0x00, 0x00, 0x00]);\n\t // sample_count\n\t MP4.VMHD = new Uint8Array([0x00, // version\n\t 0x00, 0x00, 0x01, // flags\n\t 0x00, 0x00, // graphicsmode\n\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n\t ]);\n\t MP4.SMHD = new Uint8Array([0x00, // version\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, // balance\n\t 0x00, 0x00 // reserved\n\t ]);\n\t\n\t MP4.STSD = new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x01]); // entry_count\n\t\n\t var majorBrand = new Uint8Array([105, 115, 111, 109]); // isom\n\t var avc1Brand = new Uint8Array([97, 118, 99, 49]); // avc1\n\t var minorVersion = new Uint8Array([0, 0, 0, 1]);\n\t\n\t MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n\t MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n\t }\n\t }, {\n\t key: 'box',\n\t value: function box(type) {\n\t var payload = Array.prototype.slice.call(arguments, 1),\n\t size = 8,\n\t i = payload.length,\n\t len = i,\n\t result;\n\t // calculate the total size we need to allocate\n\t while (i--) {\n\t size += payload[i].byteLength;\n\t }\n\t result = new Uint8Array(size);\n\t result[0] = size >> 24 & 0xff;\n\t result[1] = size >> 16 & 0xff;\n\t result[2] = size >> 8 & 0xff;\n\t result[3] = size & 0xff;\n\t result.set(type, 4);\n\t // copy the payload into the result\n\t for (i = 0, size = 8; i < len; i++) {\n\t // copy payload[i] array @ offset size\n\t result.set(payload[i], size);\n\t size += payload[i].byteLength;\n\t }\n\t return result;\n\t }\n\t }, {\n\t key: 'hdlr',\n\t value: function hdlr(type) {\n\t return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n\t }\n\t }, {\n\t key: 'mdat',\n\t value: function mdat(data) {\n\t return MP4.box(MP4.types.mdat, data);\n\t }\n\t }, {\n\t key: 'mdhd',\n\t value: function mdhd(timescale, duration) {\n\t duration *= timescale;\n\t return MP4.box(MP4.types.mdhd, new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x02, // creation_time\n\t 0x00, 0x00, 0x00, 0x03, // modification_time\n\t timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale\n\t duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n\t 0x55, 0xc4, // 'und' language (undetermined)\n\t 0x00, 0x00]));\n\t }\n\t }, {\n\t key: 'mdia',\n\t value: function mdia(track) {\n\t return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n\t }\n\t }, {\n\t key: 'mfhd',\n\t value: function mfhd(sequenceNumber) {\n\t return MP4.box(MP4.types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\n\t sequenceNumber >> 24, sequenceNumber >> 16 & 0xFF, sequenceNumber >> 8 & 0xFF, sequenceNumber & 0xFF]));\n\t }\n\t }, {\n\t key: 'minf',\n\t // sequence_number\n\t value: function minf(track) {\n\t if (track.type === 'audio') {\n\t return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n\t } else {\n\t return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n\t }\n\t }\n\t }, {\n\t key: 'moof',\n\t value: function moof(sn, baseMediaDecodeTime, track) {\n\t return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track, baseMediaDecodeTime));\n\t }\n\t /**\n\t * @param tracks... (optional) {array} the tracks associated with this movie\n\t */\n\t\n\t }, {\n\t key: 'moov',\n\t value: function moov(tracks) {\n\t var i = tracks.length,\n\t boxes = [];\n\t\n\t while (i--) {\n\t boxes[i] = MP4.trak(tracks[i]);\n\t }\n\t\n\t return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));\n\t }\n\t }, {\n\t key: 'mvex',\n\t value: function mvex(tracks) {\n\t var i = tracks.length,\n\t boxes = [];\n\t\n\t while (i--) {\n\t boxes[i] = MP4.trex(tracks[i]);\n\t }\n\t return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n\t }\n\t }, {\n\t key: 'mvhd',\n\t value: function mvhd(timescale, duration) {\n\t duration *= timescale;\n\t var bytes = new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t 0x00, 0x00, 0x00, 0x01, // creation_time\n\t 0x00, 0x00, 0x00, 0x02, // modification_time\n\t timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale\n\t duration >> 24 & 0xFF, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n\t 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n\t 0x01, 0x00, // 1.0 volume\n\t 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n\t 0xff, 0xff, 0xff, 0xff // next_track_ID\n\t ]);\n\t return MP4.box(MP4.types.mvhd, bytes);\n\t }\n\t }, {\n\t key: 'sdtp',\n\t value: function sdtp(track) {\n\t var samples = track.samples || [],\n\t bytes = new Uint8Array(4 + samples.length),\n\t flags,\n\t i;\n\t // leave the full box header (4 bytes) all zero\n\t // write the sample table\n\t for (i = 0; i < samples.length; i++) {\n\t flags = samples[i].flags;\n\t bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n\t }\n\t\n\t return MP4.box(MP4.types.sdtp, bytes);\n\t }\n\t }, {\n\t key: 'stbl',\n\t value: function stbl(track) {\n\t return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n\t }\n\t }, {\n\t key: 'avc1',\n\t value: function avc1(track) {\n\t var sps = [],\n\t pps = [],\n\t i,\n\t data,\n\t len;\n\t // assemble the SPSs\n\t\n\t for (i = 0; i < track.sps.length; i++) {\n\t data = track.sps[i];\n\t len = data.byteLength;\n\t sps.push(len >>> 8 & 0xFF);\n\t sps.push(len & 0xFF);\n\t sps = sps.concat(Array.prototype.slice.call(data)); // SPS\n\t }\n\t\n\t // assemble the PPSs\n\t for (i = 0; i < track.pps.length; i++) {\n\t data = track.pps[i];\n\t len = data.byteLength;\n\t pps.push(len >>> 8 & 0xFF);\n\t pps.push(len & 0xFF);\n\t pps = pps.concat(Array.prototype.slice.call(data));\n\t }\n\t\n\t var avcc = MP4.box(MP4.types.avcC, new Uint8Array([0x01, // version\n\t sps[3], // profile\n\t sps[4], // profile compat\n\t sps[5], // level\n\t 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes\n\t 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n\t ].concat(sps).concat([track.pps.length // numOfPictureParameterSets\n\t ]).concat(pps))),\n\t // \"PPS\"\n\t width = track.width,\n\t height = track.height;\n\t //console.log('avcc:' + Hex.hexDump(avcc));\n\t return MP4.box(MP4.types.avc1, new Uint8Array([0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x01, // data_reference_index\n\t 0x00, 0x00, // pre_defined\n\t 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n\t width >> 8 & 0xFF, width & 0xff, // width\n\t height >> 8 & 0xFF, height & 0xff, // height\n\t 0x00, 0x48, 0x00, 0x00, // horizresolution\n\t 0x00, 0x48, 0x00, 0x00, // vertresolution\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x01, // frame_count\n\t 0x12, 0x64, 0x61, 0x69, 0x6C, //dailymotion/hls.js\n\t 0x79, 0x6D, 0x6F, 0x74, 0x69, 0x6F, 0x6E, 0x2F, 0x68, 0x6C, 0x73, 0x2E, 0x6A, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\n\t 0x00, 0x18, // depth = 24\n\t 0x11, 0x11]), // pre_defined = -1\n\t avcc, MP4.box(MP4.types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n\t 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n\t 0x00, 0x2d, 0xc6, 0xc0])) // avgBitrate\n\t );\n\t }\n\t }, {\n\t key: 'esds',\n\t value: function esds(track) {\n\t var configlen = track.config.length;\n\t return new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t\n\t 0x03, // descriptor_type\n\t 0x17 + configlen, // length\n\t 0x00, 0x01, //es_id\n\t 0x00, // stream_priority\n\t\n\t 0x04, // descriptor_type\n\t 0x0f + configlen, // length\n\t 0x40, //codec : mpeg4_audio\n\t 0x15, // stream_type\n\t 0x00, 0x00, 0x00, // buffer_size\n\t 0x00, 0x00, 0x00, 0x00, // maxBitrate\n\t 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\t\n\t 0x05 // descriptor_type\n\t ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n\t }\n\t }, {\n\t key: 'mp4a',\n\t value: function mp4a(track) {\n\t var audiosamplerate = track.audiosamplerate;\n\t return MP4.box(MP4.types.mp4a, new Uint8Array([0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x01, // data_reference_index\n\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, track.channelCount, // channelcount\n\t 0x00, 0x10, // sampleSize:16bits\n\t 0x00, 0x00, 0x00, 0x00, // reserved2\n\t audiosamplerate >> 8 & 0xFF, audiosamplerate & 0xff, //\n\t 0x00, 0x00]), MP4.box(MP4.types.esds, MP4.esds(track)));\n\t }\n\t }, {\n\t key: 'stsd',\n\t value: function stsd(track) {\n\t if (track.type === 'audio') {\n\t return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n\t } else {\n\t return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n\t }\n\t }\n\t }, {\n\t key: 'tkhd',\n\t value: function tkhd(track) {\n\t var id = track.id,\n\t duration = track.duration * track.timescale,\n\t width = track.width,\n\t height = track.height;\n\t return MP4.box(MP4.types.tkhd, new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x07, // flags\n\t 0x00, 0x00, 0x00, 0x00, // creation_time\n\t 0x00, 0x00, 0x00, 0x00, // modification_time\n\t id >> 24 & 0xFF, id >> 16 & 0xFF, id >> 8 & 0xFF, id & 0xFF, // track_ID\n\t 0x00, 0x00, 0x00, 0x00, // reserved\n\t duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n\t 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n\t 0x00, 0x00, // layer\n\t 0x00, 0x00, // alternate_group\n\t 0x00, 0x00, // non-audio track volume\n\t 0x00, 0x00, // reserved\n\t 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n\t width >> 8 & 0xFF, width & 0xFF, 0x00, 0x00, // width\n\t height >> 8 & 0xFF, height & 0xFF, 0x00, 0x00 // height\n\t ]));\n\t }\n\t }, {\n\t key: 'traf',\n\t value: function traf(track, baseMediaDecodeTime) {\n\t var sampleDependencyTable = MP4.sdtp(track),\n\t id = track.id;\n\t return MP4.box(MP4.types.traf, MP4.box(MP4.types.tfhd, new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF])), // track_ID\n\t MP4.box(MP4.types.tfdt, new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t baseMediaDecodeTime >> 24, baseMediaDecodeTime >> 16 & 0XFF, baseMediaDecodeTime >> 8 & 0XFF, baseMediaDecodeTime & 0xFF])), // baseMediaDecodeTime\n\t MP4.trun(track, sampleDependencyTable.length + 16 + // tfhd\n\t 16 + // tfdt\n\t 8 + // traf header\n\t 16 + // mfhd\n\t 8 + // moof header\n\t 8), // mdat header\n\t sampleDependencyTable);\n\t }\n\t\n\t /**\n\t * Generate a track box.\n\t * @param track {object} a track definition\n\t * @return {Uint8Array} the track box\n\t */\n\t\n\t }, {\n\t key: 'trak',\n\t value: function trak(track) {\n\t track.duration = track.duration || 0xffffffff;\n\t return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n\t }\n\t }, {\n\t key: 'trex',\n\t value: function trex(track) {\n\t var id = track.id;\n\t return MP4.box(MP4.types.trex, new Uint8Array([0x00, // version 0\n\t 0x00, 0x00, 0x00, // flags\n\t id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF, // track_ID\n\t 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n\t 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n\t 0x00, 0x00, 0x00, 0x00, // default_sample_size\n\t 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n\t ]));\n\t }\n\t }, {\n\t key: 'trun',\n\t value: function trun(track, offset) {\n\t var samples = track.samples || [],\n\t len = samples.length,\n\t arraylen = 12 + 16 * len,\n\t array = new Uint8Array(arraylen),\n\t i,\n\t sample,\n\t duration,\n\t size,\n\t flags,\n\t cts;\n\t offset += 8 + arraylen;\n\t array.set([0x00, // version 0\n\t 0x00, 0x0f, 0x01, // flags\n\t len >>> 24 & 0xFF, len >>> 16 & 0xFF, len >>> 8 & 0xFF, len & 0xFF, // sample_count\n\t offset >>> 24 & 0xFF, offset >>> 16 & 0xFF, offset >>> 8 & 0xFF, offset & 0xFF // data_offset\n\t ], 0);\n\t for (i = 0; i < len; i++) {\n\t sample = samples[i];\n\t duration = sample.duration;\n\t size = sample.size;\n\t flags = sample.flags;\n\t cts = sample.cts;\n\t array.set([duration >>> 24 & 0xFF, duration >>> 16 & 0xFF, duration >>> 8 & 0xFF, duration & 0xFF, // sample_duration\n\t size >>> 24 & 0xFF, size >>> 16 & 0xFF, size >>> 8 & 0xFF, size & 0xFF, // sample_size\n\t flags.isLeading << 2 | flags.dependsOn, flags.isDependedOn << 6 | flags.hasRedundancy << 4 | flags.paddingValue << 1 | flags.isNonSync, flags.degradPrio & 0xF0 << 8, flags.degradPrio & 0x0F, // sample_flags\n\t cts >>> 24 & 0xFF, cts >>> 16 & 0xFF, cts >>> 8 & 0xFF, cts & 0xFF // sample_composition_time_offset\n\t ], 12 + 16 * i);\n\t }\n\t return MP4.box(MP4.types.trun, array);\n\t }\n\t }, {\n\t key: 'initSegment',\n\t value: function initSegment(tracks) {\n\t if (!MP4.types) {\n\t MP4.init();\n\t }\n\t var movie = MP4.moov(tracks),\n\t result;\n\t result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n\t result.set(MP4.FTYP);\n\t result.set(movie, MP4.FTYP.byteLength);\n\t return result;\n\t }\n\t }]);\n\t\n\t return MP4;\n\t}();\n\t\n\texports.default = MP4;\n\t\n\t},{}],36:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * fMP4 remuxer\n\t */\n\t\n\tvar _aac = _dereq_(27);\n\t\n\tvar _aac2 = _interopRequireDefault(_aac);\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tvar _mp4Generator = _dereq_(35);\n\t\n\tvar _mp4Generator2 = _interopRequireDefault(_mp4Generator);\n\t\n\tvar _errors = _dereq_(24);\n\t\n\t_dereq_(44);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar MP4Remuxer = function () {\n\t function MP4Remuxer(observer, id, config) {\n\t _classCallCheck(this, MP4Remuxer);\n\t\n\t this.observer = observer;\n\t this.id = id;\n\t this.config = config;\n\t this.ISGenerated = false;\n\t this.PES2MP4SCALEFACTOR = 4;\n\t this.PES_TIMESCALE = 90000;\n\t this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;\n\t }\n\t\n\t _createClass(MP4Remuxer, [{\n\t key: 'destroy',\n\t value: function destroy() {}\n\t }, {\n\t key: 'insertDiscontinuity',\n\t value: function insertDiscontinuity() {\n\t this._initPTS = this._initDTS = undefined;\n\t }\n\t }, {\n\t key: 'switchLevel',\n\t value: function switchLevel() {\n\t this.ISGenerated = false;\n\t }\n\t }, {\n\t key: 'remux',\n\t value: function remux(level, sn, audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n\t this.level = level;\n\t this.sn = sn;\n\t // generate Init Segment if needed\n\t if (!this.ISGenerated) {\n\t this.generateIS(audioTrack, videoTrack, timeOffset);\n\t }\n\t\n\t if (this.ISGenerated) {\n\t // Purposefully remuxing audio before video, so that remuxVideo can use nextAacPts, which is\n\t // calculated in remuxAudio.\n\t //logger.log('nb AAC samples:' + audioTrack.samples.length);\n\t if (audioTrack.samples.length) {\n\t var audioData = this.remuxAudio(audioTrack, timeOffset, contiguous, accurateTimeOffset);\n\t //logger.log('nb AVC samples:' + videoTrack.samples.length);\n\t if (videoTrack.samples.length) {\n\t var audioTrackLength = void 0;\n\t if (audioData) {\n\t audioTrackLength = audioData.endPTS - audioData.startPTS;\n\t }\n\t this.remuxVideo(videoTrack, timeOffset, contiguous, audioTrackLength);\n\t }\n\t } else {\n\t var videoData = void 0;\n\t //logger.log('nb AVC samples:' + videoTrack.samples.length);\n\t if (videoTrack.samples.length) {\n\t videoData = this.remuxVideo(videoTrack, timeOffset, contiguous);\n\t }\n\t if (videoData && audioTrack.codec) {\n\t this.remuxEmptyAudio(audioTrack, timeOffset, contiguous, videoData);\n\t }\n\t }\n\t }\n\t //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n\t if (id3Track.samples.length) {\n\t this.remuxID3(id3Track, timeOffset);\n\t }\n\t //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n\t if (textTrack.samples.length) {\n\t this.remuxText(textTrack, timeOffset);\n\t }\n\t //notify end of parsing\n\t this.observer.trigger(_events2.default.FRAG_PARSED, { id: this.id, level: this.level, sn: this.sn });\n\t }\n\t }, {\n\t key: 'generateIS',\n\t value: function generateIS(audioTrack, videoTrack, timeOffset) {\n\t var observer = this.observer,\n\t audioSamples = audioTrack.samples,\n\t videoSamples = videoTrack.samples,\n\t pesTimeScale = this.PES_TIMESCALE,\n\t tracks = {},\n\t data = { id: this.id, level: this.level, sn: this.sn, tracks: tracks, unique: false },\n\t computePTSDTS = this._initPTS === undefined,\n\t initPTS,\n\t initDTS;\n\t\n\t if (computePTSDTS) {\n\t initPTS = initDTS = Infinity;\n\t }\n\t if (audioTrack.config && audioSamples.length) {\n\t audioTrack.timescale = audioTrack.audiosamplerate;\n\t // MP4 duration (track duration in seconds multiplied by timescale) is coded on 32 bits\n\t // we know that each AAC sample contains 1024 frames....\n\t // in order to avoid overflowing the 32 bit counter for large duration, we use smaller timescale (timescale/gcd)\n\t // we just need to ensure that AAC sample duration will still be an integer (will be 1024/gcd)\n\t if (audioTrack.timescale * audioTrack.duration > Math.pow(2, 32)) {\n\t (function () {\n\t var greatestCommonDivisor = function greatestCommonDivisor(a, b) {\n\t if (!b) {\n\t return a;\n\t }\n\t return greatestCommonDivisor(b, a % b);\n\t };\n\t audioTrack.timescale = audioTrack.audiosamplerate / greatestCommonDivisor(audioTrack.audiosamplerate, 1024);\n\t })();\n\t }\n\t _logger.logger.log('audio mp4 timescale :' + audioTrack.timescale);\n\t tracks.audio = {\n\t container: 'audio/mp4',\n\t codec: audioTrack.codec,\n\t initSegment: _mp4Generator2.default.initSegment([audioTrack]),\n\t metadata: {\n\t channelCount: audioTrack.channelCount\n\t }\n\t };\n\t if (computePTSDTS) {\n\t // remember first PTS of this demuxing context. for audio, PTS = DTS\n\t initPTS = initDTS = audioSamples[0].pts - pesTimeScale * timeOffset;\n\t }\n\t }\n\t\n\t if (videoTrack.sps && videoTrack.pps && videoSamples.length) {\n\t videoTrack.timescale = this.MP4_TIMESCALE;\n\t tracks.video = {\n\t container: 'video/mp4',\n\t codec: videoTrack.codec,\n\t initSegment: _mp4Generator2.default.initSegment([videoTrack]),\n\t metadata: {\n\t width: videoTrack.width,\n\t height: videoTrack.height\n\t }\n\t };\n\t if (computePTSDTS) {\n\t initPTS = Math.min(initPTS, videoSamples[0].pts - pesTimeScale * timeOffset);\n\t initDTS = Math.min(initDTS, videoSamples[0].dts - pesTimeScale * timeOffset);\n\t }\n\t }\n\t\n\t if (Object.keys(tracks).length) {\n\t observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);\n\t this.ISGenerated = true;\n\t if (computePTSDTS) {\n\t this._initPTS = initPTS;\n\t this._initDTS = initDTS;\n\t }\n\t } else {\n\t observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });\n\t }\n\t }\n\t }, {\n\t key: 'remuxVideo',\n\t value: function remuxVideo(track, timeOffset, contiguous, audioTrackLength) {\n\t var offset = 8,\n\t pesTimeScale = this.PES_TIMESCALE,\n\t pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n\t mp4SampleDuration,\n\t mdat,\n\t moof,\n\t firstPTS,\n\t firstDTS,\n\t nextDTS,\n\t lastPTS,\n\t lastDTS,\n\t inputSamples = track.samples,\n\t outputSamples = [];\n\t\n\t // for (let i = 0; i < track.samples.length; i++) {\n\t // let avcSample = track.samples[i];\n\t // let units = avcSample.units.units;\n\t // let unitsString = '';\n\t // for (let j = 0; j < units.length ; j++) {\n\t // unitsString += units[j].type + ',';\n\t // if (units[j].data.length < 500) {\n\t // unitsString += Hex.hexDump(units[j].data);\n\t // }\n\t // }\n\t // logger.log(avcSample.pts + '/' + avcSample.dts + ',' + unitsString + avcSample.units.length);\n\t // }\n\t\n\t // handle broken streams with PTS < DTS, tolerance up 200ms (18000 in 90kHz timescale)\n\t var PTSDTSshift = inputSamples.reduce(function (prev, curr) {\n\t return Math.max(Math.min(prev, curr.pts - curr.dts), -18000);\n\t }, 0);\n\t if (PTSDTSshift < 0) {\n\t _logger.logger.warn('PTS < DTS detected in video samples, shifting DTS by ' + Math.round(PTSDTSshift / 90) + ' ms to overcome this issue');\n\t for (var i = 0; i < inputSamples.length; i++) {\n\t inputSamples[i].dts += PTSDTSshift;\n\t }\n\t }\n\t\n\t // PTS is coded on 33bits, and can loop from -2^32 to 2^32\n\t // PTSNormalize will make PTS/DTS value monotonic, we use last known DTS value as reference value\n\t var nextAvcDts = void 0;\n\t // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n\t if (contiguous) {\n\t // if parsed fragment is contiguous with last one, let's use last DTS value as reference\n\t nextAvcDts = this.nextAvcDts;\n\t } else {\n\t // if not contiguous, let's use target timeOffset\n\t nextAvcDts = timeOffset * pesTimeScale;\n\t }\n\t\n\t // compute first DTS and last DTS, normalize them against reference value\n\t var sample = inputSamples[0];\n\t firstDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);\n\t firstPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);\n\t\n\t // check timestamp continuity accross consecutive fragments (this is to remove inter-fragment gap/hole)\n\t var delta = Math.round((firstDTS - nextAvcDts) / 90);\n\t // if fragment are contiguous, detect hole/overlapping between fragments\n\t if (contiguous) {\n\t if (delta) {\n\t if (delta > 1) {\n\t _logger.logger.log('AVC:' + delta + ' ms hole between fragments detected,filling it');\n\t } else if (delta < -1) {\n\t _logger.logger.log('AVC:' + -delta + ' ms overlapping between fragments detected');\n\t }\n\t // remove hole/gap : set DTS to next expected DTS\n\t firstDTS = nextAvcDts;\n\t inputSamples[0].dts = firstDTS + this._initDTS;\n\t // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n\t firstPTS = Math.max(firstPTS - delta, nextAvcDts);\n\t inputSamples[0].pts = firstPTS + this._initDTS;\n\t _logger.logger.log('Video/PTS/DTS adjusted: ' + Math.round(firstPTS / 90) + '/' + Math.round(firstDTS / 90) + ',delta:' + delta + ' ms');\n\t }\n\t }\n\t nextDTS = firstDTS;\n\t\n\t // compute lastPTS/lastDTS\n\t sample = inputSamples[inputSamples.length - 1];\n\t lastDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);\n\t lastPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);\n\t lastPTS = Math.max(lastPTS, lastDTS);\n\t\n\t var vendor = navigator.vendor,\n\t userAgent = navigator.userAgent,\n\t isSafari = vendor && vendor.indexOf('Apple') > -1 && userAgent && !userAgent.match('CriOS');\n\t\n\t // on Safari let's signal the same sample duration for all samples\n\t // sample duration (as expected by trun MP4 boxes), should be the delta between sample DTS\n\t // set this constant duration as being the avg delta between consecutive DTS.\n\t if (isSafari) {\n\t mp4SampleDuration = Math.round((lastDTS - firstDTS) / (pes2mp4ScaleFactor * (inputSamples.length - 1)));\n\t }\n\t\n\t // normalize all PTS/DTS now ...\n\t for (var _i = 0; _i < inputSamples.length; _i++) {\n\t var _sample = inputSamples[_i];\n\t if (isSafari) {\n\t // sample DTS is computed using a constant decoding offset (mp4SampleDuration) between samples\n\t _sample.dts = firstDTS + _i * pes2mp4ScaleFactor * mp4SampleDuration;\n\t } else {\n\t // ensure sample monotonic DTS\n\t _sample.dts = Math.max(this._PTSNormalize(_sample.dts - this._initDTS, nextAvcDts), firstDTS);\n\t // ensure dts is a multiple of scale factor to avoid rounding issues\n\t _sample.dts = Math.round(_sample.dts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;\n\t }\n\t // we normalize PTS against nextAvcDts, we also substract initDTS (some streams don't start @ PTS O)\n\t // and we ensure that computed value is greater or equal than sample DTS\n\t _sample.pts = Math.max(this._PTSNormalize(_sample.pts - this._initDTS, nextAvcDts), _sample.dts);\n\t // ensure pts is a multiple of scale factor to avoid rounding issues\n\t _sample.pts = Math.round(_sample.pts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;\n\t }\n\t\n\t /* concatenate the video data and construct the mdat in place\n\t (need 8 more bytes to fill length and mpdat type) */\n\t mdat = new Uint8Array(track.len + 4 * track.nbNalu + 8);\n\t var view = new DataView(mdat.buffer);\n\t view.setUint32(0, mdat.byteLength);\n\t mdat.set(_mp4Generator2.default.types.mdat, 4);\n\t\n\t for (var _i2 = 0; _i2 < inputSamples.length; _i2++) {\n\t var avcSample = inputSamples[_i2],\n\t mp4SampleLength = 0,\n\t compositionTimeOffset = void 0;\n\t // convert NALU bitstream to MP4 format (prepend NALU with size field)\n\t while (avcSample.units.units.length) {\n\t var unit = avcSample.units.units.shift();\n\t view.setUint32(offset, unit.data.byteLength);\n\t offset += 4;\n\t mdat.set(unit.data, offset);\n\t offset += unit.data.byteLength;\n\t mp4SampleLength += 4 + unit.data.byteLength;\n\t }\n\t\n\t if (!isSafari) {\n\t // expected sample duration is the Decoding Timestamp diff of consecutive samples\n\t if (_i2 < inputSamples.length - 1) {\n\t mp4SampleDuration = inputSamples[_i2 + 1].dts - avcSample.dts;\n\t } else {\n\t var config = this.config,\n\t lastFrameDuration = avcSample.dts - inputSamples[_i2 > 0 ? _i2 - 1 : _i2].dts;\n\t if (config.stretchShortVideoTrack) {\n\t // In some cases, a segment's audio track duration may exceed the video track duration.\n\t // Since we've already remuxed audio, and we know how long the audio track is, we look to\n\t // see if the delta to the next segment is longer than the minimum of maxBufferHole and\n\t // maxSeekHole. If so, playback would potentially get stuck, so we artificially inflate\n\t // the duration of the last frame to minimize any potential gap between segments.\n\t var maxBufferHole = config.maxBufferHole,\n\t maxSeekHole = config.maxSeekHole,\n\t gapTolerance = Math.floor(Math.min(maxBufferHole, maxSeekHole) * pesTimeScale),\n\t deltaToFrameEnd = (audioTrackLength ? firstPTS + audioTrackLength * pesTimeScale : this.nextAacPts) - avcSample.pts;\n\t if (deltaToFrameEnd > gapTolerance) {\n\t // We subtract lastFrameDuration from deltaToFrameEnd to try to prevent any video\n\t // frame overlap. maxBufferHole/maxSeekHole should be >> lastFrameDuration anyway.\n\t mp4SampleDuration = deltaToFrameEnd - lastFrameDuration;\n\t if (mp4SampleDuration < 0) {\n\t mp4SampleDuration = lastFrameDuration;\n\t }\n\t _logger.logger.log('It is approximately ' + deltaToFrameEnd / 90 + ' ms to the next segment; using duration ' + mp4SampleDuration / 90 + ' ms for the last video frame.');\n\t } else {\n\t mp4SampleDuration = lastFrameDuration;\n\t }\n\t } else {\n\t mp4SampleDuration = lastFrameDuration;\n\t }\n\t }\n\t mp4SampleDuration /= pes2mp4ScaleFactor;\n\t compositionTimeOffset = Math.round((avcSample.pts - avcSample.dts) / pes2mp4ScaleFactor);\n\t } else {\n\t compositionTimeOffset = Math.max(0, mp4SampleDuration * Math.round((avcSample.pts - avcSample.dts) / (pes2mp4ScaleFactor * mp4SampleDuration)));\n\t }\n\t\n\t //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n\t outputSamples.push({\n\t size: mp4SampleLength,\n\t // constant duration\n\t duration: mp4SampleDuration,\n\t cts: compositionTimeOffset,\n\t flags: {\n\t isLeading: 0,\n\t isDependedOn: 0,\n\t hasRedundancy: 0,\n\t degradPrio: 0,\n\t dependsOn: avcSample.key ? 2 : 1,\n\t isNonSync: avcSample.key ? 0 : 1\n\t }\n\t });\n\t }\n\t // next AVC sample DTS should be equal to last sample DTS + last sample duration (in PES timescale)\n\t this.nextAvcDts = lastDTS + mp4SampleDuration * pes2mp4ScaleFactor;\n\t var dropped = track.dropped;\n\t track.len = 0;\n\t track.nbNalu = 0;\n\t track.dropped = 0;\n\t if (outputSamples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n\t var flags = outputSamples[0].flags;\n\t // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n\t // https://code.google.com/p/chromium/issues/detail?id=229412\n\t flags.dependsOn = 2;\n\t flags.isNonSync = 0;\n\t }\n\t track.samples = outputSamples;\n\t moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n\t track.samples = [];\n\t\n\t var data = {\n\t id: this.id,\n\t level: this.level,\n\t sn: this.sn,\n\t data1: moof,\n\t data2: mdat,\n\t startPTS: firstPTS / pesTimeScale,\n\t endPTS: (lastPTS + pes2mp4ScaleFactor * mp4SampleDuration) / pesTimeScale,\n\t startDTS: firstDTS / pesTimeScale,\n\t endDTS: this.nextAvcDts / pesTimeScale,\n\t type: 'video',\n\t nb: outputSamples.length,\n\t dropped: dropped\n\t };\n\t this.observer.trigger(_events2.default.FRAG_PARSING_DATA, data);\n\t return data;\n\t }\n\t }, {\n\t key: 'remuxAudio',\n\t value: function remuxAudio(track, timeOffset, contiguous, accurateTimeOffset) {\n\t var pesTimeScale = this.PES_TIMESCALE,\n\t mp4timeScale = track.timescale,\n\t pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,\n\t expectedSampleDuration = track.timescale * 1024 / track.audiosamplerate;\n\t var view,\n\t offset = 8,\n\t aacSample,\n\t mp4Sample,\n\t unit,\n\t mdat,\n\t moof,\n\t firstPTS,\n\t firstDTS,\n\t lastDTS,\n\t pts,\n\t dts,\n\t ptsnorm,\n\t dtsnorm,\n\t samples = [],\n\t samples0 = [],\n\t fillFrame,\n\t newStamp;\n\t\n\t track.samples.sort(function (a, b) {\n\t return a.pts - b.pts;\n\t });\n\t samples0 = track.samples;\n\t\n\t // for audio samples, also consider consecutive fragments as being contiguous (even if a level switch occurs),\n\t // for sake of clarity:\n\t // consecutive fragments are frags with less than 100ms gaps between new time offset and next expected PTS\n\t // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n\t // this helps ensuring audio continuity\n\t // and this also avoids audio glitches/cut when switching quality, or reporting wrong duration on first audio frame\n\t\n\t contiguous |= samples0.length && this.nextAacPts && Math.abs(timeOffset - this.nextAacPts / pesTimeScale) < 0.1;\n\t\n\t var nextAacPts = contiguous ? this.nextAacPts : timeOffset * pesTimeScale;\n\t\n\t // If the audio track is missing samples, the frames seem to get \"left-shifted\" within the\n\t // resulting mp4 segment, causing sync issues and leaving gaps at the end of the audio segment.\n\t // In an effort to prevent this from happening, we inject frames here where there are gaps.\n\t // When possible, we inject a silent frame; when that's not possible, we duplicate the last\n\t // frame.\n\t var pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor;\n\t var nextPtsNorm = nextAacPts;\n\t\n\t // only inject/drop audio frames in case time offset is accurate\n\t if (accurateTimeOffset) {\n\t for (var i = 0; i < samples0.length;) {\n\t // First, let's see how far off this frame is from where we expect it to be\n\t var sample = samples0[i],\n\t ptsNorm = this._PTSNormalize(sample.pts - this._initDTS, nextAacPts),\n\t delta = ptsNorm - nextPtsNorm;\n\t\n\t // If we're overlapping by more than a duration, drop this sample\n\t if (delta <= -pesFrameDuration) {\n\t _logger.logger.warn('Dropping 1 audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(Math.abs(delta / 90)) + ' ms overlap.');\n\t samples0.splice(i, 1);\n\t track.len -= sample.unit.length;\n\t // Don't touch nextPtsNorm or i\n\t }\n\t // Otherwise, if we're more than a frame away from where we should be, insert missing frames\n\t else if (delta >= pesFrameDuration) {\n\t var missing = Math.round(delta / pesFrameDuration);\n\t _logger.logger.warn('Injecting ' + missing + ' audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(delta / 90) + ' ms gap.');\n\t for (var j = 0; j < missing; j++) {\n\t newStamp = nextPtsNorm + this._initDTS;\n\t newStamp = Math.max(newStamp, this._initDTS);\n\t fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n\t if (!fillFrame) {\n\t _logger.logger.log('Unable to get silent frame for given audio codec; duplicating last frame instead.');\n\t fillFrame = sample.unit.slice(0);\n\t }\n\t samples0.splice(i, 0, { unit: fillFrame, pts: newStamp, dts: newStamp });\n\t track.len += fillFrame.length;\n\t nextPtsNorm += pesFrameDuration;\n\t i += 1;\n\t }\n\t\n\t // Adjust sample to next expected pts\n\t sample.pts = sample.dts = nextPtsNorm + this._initDTS;\n\t nextPtsNorm += pesFrameDuration;\n\t i += 1;\n\t }\n\t // Otherwise, we're within half a frame duration, so just adjust pts\n\t else {\n\t if (Math.abs(delta) > 0.1 * pesFrameDuration) {\n\t //logger.log(`Invalid frame delta ${Math.round(ptsNorm - nextPtsNorm + pesFrameDuration)} at PTS ${Math.round(ptsNorm / 90)} (should be ${Math.round(pesFrameDuration)}).`);\n\t }\n\t nextPtsNorm += pesFrameDuration;\n\t if (i === 0) {\n\t sample.pts = sample.dts = this._initDTS + nextAacPts;\n\t } else {\n\t sample.pts = sample.dts = samples0[i - 1].pts + pesFrameDuration;\n\t }\n\t i += 1;\n\t }\n\t }\n\t }\n\t\n\t while (samples0.length) {\n\t aacSample = samples0.shift();\n\t unit = aacSample.unit;\n\t pts = aacSample.pts - this._initDTS;\n\t dts = aacSample.dts - this._initDTS;\n\t //logger.log(`Audio/PTS:${Math.round(pts/90)}`);\n\t // if not first sample\n\t if (lastDTS !== undefined) {\n\t ptsnorm = this._PTSNormalize(pts, lastDTS);\n\t dtsnorm = this._PTSNormalize(dts, lastDTS);\n\t mp4Sample.duration = Math.round((dtsnorm - lastDTS) / pes2mp4ScaleFactor);\n\t } else {\n\t ptsnorm = this._PTSNormalize(pts, nextAacPts);\n\t dtsnorm = this._PTSNormalize(dts, nextAacPts);\n\t var _delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale),\n\t numMissingFrames = 0;\n\t // if fragment are contiguous, detect hole/overlapping between fragments\n\t // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n\t if (contiguous) {\n\t // log delta\n\t if (_delta) {\n\t if (_delta > 0) {\n\t numMissingFrames = Math.round((ptsnorm - nextAacPts) / pesFrameDuration);\n\t _logger.logger.log(_delta + ' ms hole between AAC samples detected,filling it');\n\t if (numMissingFrames > 0) {\n\t fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n\t if (!fillFrame) {\n\t fillFrame = unit.slice(0);\n\t }\n\t track.len += numMissingFrames * fillFrame.length;\n\t }\n\t // if we have frame overlap, overlapping for more than half a frame duraion\n\t } else if (_delta < -12) {\n\t // drop overlapping audio frames... browser will deal with it\n\t _logger.logger.log(-_delta + ' ms overlapping between AAC samples detected, drop frame');\n\t track.len -= unit.byteLength;\n\t continue;\n\t }\n\t // set PTS/DTS to expected PTS/DTS\n\t ptsnorm = dtsnorm = nextAacPts;\n\t }\n\t }\n\t // remember first PTS of our aacSamples, ensure value is positive\n\t firstPTS = Math.max(0, ptsnorm);\n\t firstDTS = Math.max(0, dtsnorm);\n\t if (track.len > 0) {\n\t /* concatenate the audio data and construct the mdat in place\n\t (need 8 more bytes to fill length and mdat type) */\n\t mdat = new Uint8Array(track.len + 8);\n\t view = new DataView(mdat.buffer);\n\t view.setUint32(0, mdat.byteLength);\n\t mdat.set(_mp4Generator2.default.types.mdat, 4);\n\t } else {\n\t // no audio samples\n\t return;\n\t }\n\t for (var _i3 = 0; _i3 < numMissingFrames; _i3++) {\n\t newStamp = ptsnorm - (numMissingFrames - _i3) * pesFrameDuration;\n\t fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n\t if (!fillFrame) {\n\t _logger.logger.log('Unable to get silent frame for given audio codec; duplicating this frame instead.');\n\t fillFrame = unit.slice(0);\n\t }\n\t mdat.set(fillFrame, offset);\n\t offset += fillFrame.byteLength;\n\t mp4Sample = {\n\t size: fillFrame.byteLength,\n\t cts: 0,\n\t duration: 1024,\n\t flags: {\n\t isLeading: 0,\n\t isDependedOn: 0,\n\t hasRedundancy: 0,\n\t degradPrio: 0,\n\t dependsOn: 1\n\t }\n\t };\n\t samples.push(mp4Sample);\n\t }\n\t }\n\t mdat.set(unit, offset);\n\t offset += unit.byteLength;\n\t //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');\n\t mp4Sample = {\n\t size: unit.byteLength,\n\t cts: 0,\n\t duration: 0,\n\t flags: {\n\t isLeading: 0,\n\t isDependedOn: 0,\n\t hasRedundancy: 0,\n\t degradPrio: 0,\n\t dependsOn: 1\n\t }\n\t };\n\t samples.push(mp4Sample);\n\t lastDTS = dtsnorm;\n\t }\n\t var lastSampleDuration = 0;\n\t var nbSamples = samples.length;\n\t //set last sample duration as being identical to previous sample\n\t if (nbSamples >= 2) {\n\t lastSampleDuration = samples[nbSamples - 2].duration;\n\t mp4Sample.duration = lastSampleDuration;\n\t }\n\t if (nbSamples) {\n\t // next aac sample PTS should be equal to last sample PTS + duration\n\t this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;\n\t //logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n\t track.len = 0;\n\t track.samples = samples;\n\t moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n\t track.samples = [];\n\t var audioData = {\n\t id: this.id,\n\t level: this.level,\n\t sn: this.sn,\n\t data1: moof,\n\t data2: mdat,\n\t startPTS: firstPTS / pesTimeScale,\n\t endPTS: this.nextAacPts / pesTimeScale,\n\t startDTS: firstDTS / pesTimeScale,\n\t endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n\t type: 'audio',\n\t nb: nbSamples\n\t };\n\t this.observer.trigger(_events2.default.FRAG_PARSING_DATA, audioData);\n\t return audioData;\n\t }\n\t return null;\n\t }\n\t }, {\n\t key: 'remuxEmptyAudio',\n\t value: function remuxEmptyAudio(track, timeOffset, contiguous, videoData) {\n\t var pesTimeScale = this.PES_TIMESCALE,\n\t mp4timeScale = track.timescale ? track.timescale : track.audiosamplerate,\n\t pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,\n\t\n\t\n\t // sync with video's timestamp\n\t startDTS = videoData.startDTS * pesTimeScale + this._initDTS,\n\t endDTS = videoData.endDTS * pesTimeScale + this._initDTS,\n\t\n\t\n\t // one sample's duration value\n\t sampleDuration = 1024,\n\t frameDuration = pes2mp4ScaleFactor * sampleDuration,\n\t\n\t\n\t // samples count of this segment's duration\n\t nbSamples = Math.ceil((endDTS - startDTS) / frameDuration),\n\t\n\t\n\t // silent frame\n\t silentFrame = _aac2.default.getSilentFrame(track.channelCount);\n\t\n\t // Can't remux if we can't generate a silent frame...\n\t if (!silentFrame) {\n\t _logger.logger.trace('Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!');\n\t return;\n\t }\n\t\n\t var samples = [];\n\t for (var i = 0; i < nbSamples; i++) {\n\t var stamp = startDTS + i * frameDuration;\n\t samples.push({ unit: silentFrame.slice(0), pts: stamp, dts: stamp });\n\t track.len += silentFrame.length;\n\t }\n\t track.samples = samples;\n\t\n\t this.remuxAudio(track, timeOffset, contiguous);\n\t }\n\t }, {\n\t key: 'remuxID3',\n\t value: function remuxID3(track, timeOffset) {\n\t var length = track.samples.length,\n\t sample;\n\t // consume samples\n\t if (length) {\n\t for (var index = 0; index < length; index++) {\n\t sample = track.samples[index];\n\t // setting id3 pts, dts to relative time\n\t // using this._initPTS and this._initDTS to calculate relative time\n\t sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;\n\t sample.dts = (sample.dts - this._initDTS) / this.PES_TIMESCALE;\n\t }\n\t this.observer.trigger(_events2.default.FRAG_PARSING_METADATA, {\n\t id: this.id,\n\t level: this.level,\n\t sn: this.sn,\n\t samples: track.samples\n\t });\n\t }\n\t\n\t track.samples = [];\n\t timeOffset = timeOffset;\n\t }\n\t }, {\n\t key: 'remuxText',\n\t value: function remuxText(track, timeOffset) {\n\t track.samples.sort(function (a, b) {\n\t return a.pts - b.pts;\n\t });\n\t\n\t var length = track.samples.length,\n\t sample;\n\t // consume samples\n\t if (length) {\n\t for (var index = 0; index < length; index++) {\n\t sample = track.samples[index];\n\t // setting text pts, dts to relative time\n\t // using this._initPTS and this._initDTS to calculate relative time\n\t sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;\n\t }\n\t this.observer.trigger(_events2.default.FRAG_PARSING_USERDATA, {\n\t id: this.id,\n\t level: this.level,\n\t sn: this.sn,\n\t samples: track.samples\n\t });\n\t }\n\t\n\t track.samples = [];\n\t timeOffset = timeOffset;\n\t }\n\t }, {\n\t key: '_PTSNormalize',\n\t value: function _PTSNormalize(value, reference) {\n\t var offset;\n\t if (reference === undefined) {\n\t return value;\n\t }\n\t if (reference < value) {\n\t // - 2^33\n\t offset = -8589934592;\n\t } else {\n\t // + 2^33\n\t offset = 8589934592;\n\t }\n\t /* PTS is 33bit (from 0 to 2^33 -1)\n\t if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n\t PTS looping occured. fill the gap */\n\t while (Math.abs(value - reference) > 4294967296) {\n\t value += offset;\n\t }\n\t return value;\n\t }\n\t }, {\n\t key: 'passthrough',\n\t get: function get() {\n\t return false;\n\t }\n\t }]);\n\t\n\t return MP4Remuxer;\n\t}();\n\t\n\texports.default = MP4Remuxer;\n\t\n\t},{\"24\":24,\"26\":26,\"27\":27,\"35\":35,\"43\":43,\"44\":44}],37:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * passthrough remuxer\n\t */\n\t\n\t\n\tvar _events = _dereq_(26);\n\t\n\tvar _events2 = _interopRequireDefault(_events);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar PassThroughRemuxer = function () {\n\t function PassThroughRemuxer(observer, id) {\n\t _classCallCheck(this, PassThroughRemuxer);\n\t\n\t this.observer = observer;\n\t this.id = id;\n\t this.ISGenerated = false;\n\t }\n\t\n\t _createClass(PassThroughRemuxer, [{\n\t key: 'destroy',\n\t value: function destroy() {}\n\t }, {\n\t key: 'insertDiscontinuity',\n\t value: function insertDiscontinuity() {}\n\t }, {\n\t key: 'switchLevel',\n\t value: function switchLevel() {\n\t this.ISGenerated = false;\n\t }\n\t }, {\n\t key: 'remux',\n\t value: function remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, rawData) {\n\t var observer = this.observer;\n\t // generate Init Segment if needed\n\t if (!this.ISGenerated) {\n\t var tracks = {},\n\t data = { id: this.id, tracks: tracks, unique: true },\n\t track = videoTrack,\n\t codec = track.codec;\n\t\n\t if (codec) {\n\t data.tracks.video = {\n\t container: track.container,\n\t codec: codec,\n\t metadata: {\n\t width: track.width,\n\t height: track.height\n\t }\n\t };\n\t }\n\t\n\t track = audioTrack;\n\t codec = track.codec;\n\t if (codec) {\n\t data.tracks.audio = {\n\t container: track.container,\n\t codec: codec,\n\t metadata: {\n\t channelCount: track.channelCount\n\t }\n\t };\n\t }\n\t this.ISGenerated = true;\n\t observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);\n\t }\n\t observer.trigger(_events2.default.FRAG_PARSING_DATA, {\n\t id: this.id,\n\t data1: rawData,\n\t startPTS: timeOffset,\n\t startDTS: timeOffset,\n\t type: 'audiovideo',\n\t nb: 1,\n\t dropped: 0\n\t });\n\t }\n\t }, {\n\t key: 'passthrough',\n\t get: function get() {\n\t return true;\n\t }\n\t }]);\n\t\n\t return PassThroughRemuxer;\n\t}();\n\t\n\texports.default = PassThroughRemuxer;\n\t\n\t},{\"26\":26}],38:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js\n\t\n\tvar AttrList = function () {\n\t function AttrList(attrs) {\n\t _classCallCheck(this, AttrList);\n\t\n\t if (typeof attrs === 'string') {\n\t attrs = AttrList.parseAttrList(attrs);\n\t }\n\t for (var attr in attrs) {\n\t if (attrs.hasOwnProperty(attr)) {\n\t this[attr] = attrs[attr];\n\t }\n\t }\n\t }\n\t\n\t _createClass(AttrList, [{\n\t key: 'decimalInteger',\n\t value: function decimalInteger(attrName) {\n\t var intValue = parseInt(this[attrName], 10);\n\t if (intValue > Number.MAX_SAFE_INTEGER) {\n\t return Infinity;\n\t }\n\t return intValue;\n\t }\n\t }, {\n\t key: 'hexadecimalInteger',\n\t value: function hexadecimalInteger(attrName) {\n\t if (this[attrName]) {\n\t var stringValue = (this[attrName] || '0x').slice(2);\n\t stringValue = (stringValue.length & 1 ? '0' : '') + stringValue;\n\t\n\t var value = new Uint8Array(stringValue.length / 2);\n\t for (var i = 0; i < stringValue.length / 2; i++) {\n\t value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);\n\t }\n\t return value;\n\t } else {\n\t return null;\n\t }\n\t }\n\t }, {\n\t key: 'hexadecimalIntegerAsNumber',\n\t value: function hexadecimalIntegerAsNumber(attrName) {\n\t var intValue = parseInt(this[attrName], 16);\n\t if (intValue > Number.MAX_SAFE_INTEGER) {\n\t return Infinity;\n\t }\n\t return intValue;\n\t }\n\t }, {\n\t key: 'decimalFloatingPoint',\n\t value: function decimalFloatingPoint(attrName) {\n\t return parseFloat(this[attrName]);\n\t }\n\t }, {\n\t key: 'enumeratedString',\n\t value: function enumeratedString(attrName) {\n\t return this[attrName];\n\t }\n\t }, {\n\t key: 'decimalResolution',\n\t value: function decimalResolution(attrName) {\n\t var res = /^(\\d+)x(\\d+)$/.exec(this[attrName]);\n\t if (res === null) {\n\t return undefined;\n\t }\n\t return {\n\t width: parseInt(res[1], 10),\n\t height: parseInt(res[2], 10)\n\t };\n\t }\n\t }], [{\n\t key: 'parseAttrList',\n\t value: function parseAttrList(input) {\n\t var re = /\\s*(.+?)\\s*=((?:\\\".*?\\\")|.*?)(?:,|$)/g;\n\t var match,\n\t attrs = {};\n\t while ((match = re.exec(input)) !== null) {\n\t var value = match[2],\n\t quote = '\"';\n\t\n\t if (value.indexOf(quote) === 0 && value.lastIndexOf(quote) === value.length - 1) {\n\t value = value.slice(1, -1);\n\t }\n\t attrs[match[1]] = value;\n\t }\n\t return attrs;\n\t }\n\t }]);\n\t\n\t return AttrList;\n\t}();\n\t\n\texports.default = AttrList;\n\t\n\t},{}],39:[function(_dereq_,module,exports){\n\t\"use strict\";\n\t\n\tvar BinarySearch = {\n\t /**\n\t * Searches for an item in an array which matches a certain condition.\n\t * This requires the condition to only match one item in the array,\n\t * and for the array to be ordered.\n\t *\n\t * @param {Array} list The array to search.\n\t * @param {Function} comparisonFunction\n\t * Called and provided a candidate item as the first argument.\n\t * Should return:\n\t * > -1 if the item should be located at a lower index than the provided item.\n\t * > 1 if the item should be located at a higher index than the provided item.\n\t * > 0 if the item is the item you're looking for.\n\t *\n\t * @return {*} The object if it is found or null otherwise.\n\t */\n\t search: function search(list, comparisonFunction) {\n\t var minIndex = 0;\n\t var maxIndex = list.length - 1;\n\t var currentIndex = null;\n\t var currentElement = null;\n\t\n\t while (minIndex <= maxIndex) {\n\t currentIndex = (minIndex + maxIndex) / 2 | 0;\n\t currentElement = list[currentIndex];\n\t\n\t var comparisonResult = comparisonFunction(currentElement);\n\t if (comparisonResult > 0) {\n\t minIndex = currentIndex + 1;\n\t } else if (comparisonResult < 0) {\n\t maxIndex = currentIndex - 1;\n\t } else {\n\t return currentElement;\n\t }\n\t }\n\t\n\t return null;\n\t }\n\t};\n\t\n\tmodule.exports = BinarySearch;\n\t\n\t},{}],40:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t *\n\t * This code was ported from the dash.js project at:\n\t * https://github.com/Dash-Industry-Forum/dash.js/blob/development/externals/cea608-parser.js\n\t * https://github.com/Dash-Industry-Forum/dash.js/commit/8269b26a761e0853bb21d78780ed945144ecdd4d#diff-71bc295a2d6b6b7093a1d3290d53a4b2\n\t *\n\t * The original copyright appears below:\n\t *\n\t * The copyright in this software is being made available under the BSD License,\n\t * included below. This software may be subject to other third party and contributor\n\t * rights, including patent rights, and no such rights are granted under this license.\n\t *\n\t * Copyright (c) 2015-2016, DASH Industry Forum.\n\t * All rights reserved.\n\t *\n\t * Redistribution and use in source and binary forms, with or without modification,\n\t * are permitted provided that the following conditions are met:\n\t * 1. Redistributions of source code must retain the above copyright notice, this\n\t * list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above copyright notice,\n\t * this list of conditions and the following disclaimer in the documentation and/or\n\t * other materials provided with the distribution.\n\t * 2. Neither the name of Dash Industry Forum nor the names of its\n\t * contributors may be used to endorse or promote products derived from this software\n\t * without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n\t * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\t * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n\t * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n\t * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n\t * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n\t * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n\t * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n\t * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\t * POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t/**\n\t * Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\n\t */\n\t\n\tvar specialCea608CharsCodes = {\n\t 0x2a: 0xe1, // lowercase a, acute accent\n\t 0x5c: 0xe9, // lowercase e, acute accent\n\t 0x5e: 0xed, // lowercase i, acute accent\n\t 0x5f: 0xf3, // lowercase o, acute accent\n\t 0x60: 0xfa, // lowercase u, acute accent\n\t 0x7b: 0xe7, // lowercase c with cedilla\n\t 0x7c: 0xf7, // division symbol\n\t 0x7d: 0xd1, // uppercase N tilde\n\t 0x7e: 0xf1, // lowercase n tilde\n\t 0x7f: 0x2588, // Full block\n\t // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n\t // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n\t // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n\t 0x80: 0xae, // Registered symbol (R)\n\t 0x81: 0xb0, // degree sign\n\t 0x82: 0xbd, // 1/2 symbol\n\t 0x83: 0xbf, // Inverted (open) question mark\n\t 0x84: 0x2122, // Trademark symbol (TM)\n\t 0x85: 0xa2, // Cents symbol\n\t 0x86: 0xa3, // Pounds sterling\n\t 0x87: 0x266a, // Music 8'th note\n\t 0x88: 0xe0, // lowercase a, grave accent\n\t 0x89: 0x20, // transparent space (regular)\n\t 0x8a: 0xe8, // lowercase e, grave accent\n\t 0x8b: 0xe2, // lowercase a, circumflex accent\n\t 0x8c: 0xea, // lowercase e, circumflex accent\n\t 0x8d: 0xee, // lowercase i, circumflex accent\n\t 0x8e: 0xf4, // lowercase o, circumflex accent\n\t 0x8f: 0xfb, // lowercase u, circumflex accent\n\t // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n\t // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n\t 0x90: 0xc1, // capital letter A with acute\n\t 0x91: 0xc9, // capital letter E with acute\n\t 0x92: 0xd3, // capital letter O with acute\n\t 0x93: 0xda, // capital letter U with acute\n\t 0x94: 0xdc, // capital letter U with diaresis\n\t 0x95: 0xfc, // lowercase letter U with diaeresis\n\t 0x96: 0x2018, // opening single quote\n\t 0x97: 0xa1, // inverted exclamation mark\n\t 0x98: 0x2a, // asterisk\n\t 0x99: 0x2019, // closing single quote\n\t 0x9a: 0x2501, // box drawings heavy horizontal\n\t 0x9b: 0xa9, // copyright sign\n\t 0x9c: 0x2120, // Service mark\n\t 0x9d: 0x2022, // (round) bullet\n\t 0x9e: 0x201c, // Left double quotation mark\n\t 0x9f: 0x201d, // Right double quotation mark\n\t 0xa0: 0xc0, // uppercase A, grave accent\n\t 0xa1: 0xc2, // uppercase A, circumflex\n\t 0xa2: 0xc7, // uppercase C with cedilla\n\t 0xa3: 0xc8, // uppercase E, grave accent\n\t 0xa4: 0xca, // uppercase E, circumflex\n\t 0xa5: 0xcb, // capital letter E with diaresis\n\t 0xa6: 0xeb, // lowercase letter e with diaresis\n\t 0xa7: 0xce, // uppercase I, circumflex\n\t 0xa8: 0xcf, // uppercase I, with diaresis\n\t 0xa9: 0xef, // lowercase i, with diaresis\n\t 0xaa: 0xd4, // uppercase O, circumflex\n\t 0xab: 0xd9, // uppercase U, grave accent\n\t 0xac: 0xf9, // lowercase u, grave accent\n\t 0xad: 0xdb, // uppercase U, circumflex\n\t 0xae: 0xab, // left-pointing double angle quotation mark\n\t 0xaf: 0xbb, // right-pointing double angle quotation mark\n\t // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n\t // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n\t 0xb0: 0xc3, // Uppercase A, tilde\n\t 0xb1: 0xe3, // Lowercase a, tilde\n\t 0xb2: 0xcd, // Uppercase I, acute accent\n\t 0xb3: 0xcc, // Uppercase I, grave accent\n\t 0xb4: 0xec, // Lowercase i, grave accent\n\t 0xb5: 0xd2, // Uppercase O, grave accent\n\t 0xb6: 0xf2, // Lowercase o, grave accent\n\t 0xb7: 0xd5, // Uppercase O, tilde\n\t 0xb8: 0xf5, // Lowercase o, tilde\n\t 0xb9: 0x7b, // Open curly brace\n\t 0xba: 0x7d, // Closing curly brace\n\t 0xbb: 0x5c, // Backslash\n\t 0xbc: 0x5e, // Caret\n\t 0xbd: 0x5f, // Underscore\n\t 0xbe: 0x7c, // Pipe (vertical line)\n\t 0xbf: 0x223c, // Tilde operator\n\t 0xc0: 0xc4, // Uppercase A, umlaut\n\t 0xc1: 0xe4, // Lowercase A, umlaut\n\t 0xc2: 0xd6, // Uppercase O, umlaut\n\t 0xc3: 0xf6, // Lowercase o, umlaut\n\t 0xc4: 0xdf, // Esszett (sharp S)\n\t 0xc5: 0xa5, // Yen symbol\n\t 0xc6: 0xa4, // Generic currency sign\n\t 0xc7: 0x2503, // Box drawings heavy vertical\n\t 0xc8: 0xc5, // Uppercase A, ring\n\t 0xc9: 0xe5, // Lowercase A, ring\n\t 0xca: 0xd8, // Uppercase O, stroke\n\t 0xcb: 0xf8, // Lowercase o, strok\n\t 0xcc: 0x250f, // Box drawings heavy down and right\n\t 0xcd: 0x2513, // Box drawings heavy down and left\n\t 0xce: 0x2517, // Box drawings heavy up and right\n\t 0xcf: 0x251b // Box drawings heavy up and left\n\t};\n\t\n\t/**\n\t * Utils\n\t */\n\tvar getCharForByte = function getCharForByte(byte) {\n\t var charCode = byte;\n\t if (specialCea608CharsCodes.hasOwnProperty(byte)) {\n\t charCode = specialCea608CharsCodes[byte];\n\t }\n\t return String.fromCharCode(charCode);\n\t};\n\t\n\tvar NR_ROWS = 15,\n\t NR_COLS = 32;\n\t// Tables to look up row from PAC data\n\tvar rowsLowCh1 = { 0x11: 1, 0x12: 3, 0x15: 5, 0x16: 7, 0x17: 9, 0x10: 11, 0x13: 12, 0x14: 14 };\n\tvar rowsHighCh1 = { 0x11: 2, 0x12: 4, 0x15: 6, 0x16: 8, 0x17: 10, 0x13: 13, 0x14: 15 };\n\tvar rowsLowCh2 = { 0x19: 1, 0x1A: 3, 0x1D: 5, 0x1E: 7, 0x1F: 9, 0x18: 11, 0x1B: 12, 0x1C: 14 };\n\tvar rowsHighCh2 = { 0x19: 2, 0x1A: 4, 0x1D: 6, 0x1E: 8, 0x1F: 10, 0x1B: 13, 0x1C: 15 };\n\t\n\tvar backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];\n\t\n\t/**\n\t * Simple logger class to be able to write with time-stamps and filter on level.\n\t */\n\tvar logger = {\n\t verboseFilter: { 'DATA': 3, 'DEBUG': 3, 'INFO': 2, 'WARNING': 2, 'TEXT': 1, 'ERROR': 0 },\n\t time: null,\n\t verboseLevel: 0, // Only write errors\n\t setTime: function setTime(newTime) {\n\t this.time = newTime;\n\t },\n\t log: function log(severity, msg) {\n\t var minLevel = this.verboseFilter[severity];\n\t if (this.verboseLevel >= minLevel) {\n\t console.log(this.time + ' [' + severity + '] ' + msg);\n\t }\n\t }\n\t};\n\t\n\tvar numArrayToHexArray = function numArrayToHexArray(numArray) {\n\t var hexArray = [];\n\t for (var j = 0; j < numArray.length; j++) {\n\t hexArray.push(numArray[j].toString(16));\n\t }\n\t return hexArray;\n\t};\n\t\n\tvar PenState = function () {\n\t function PenState(foreground, underline, italics, background, flash) {\n\t _classCallCheck(this, PenState);\n\t\n\t this.foreground = foreground || 'white';\n\t this.underline = underline || false;\n\t this.italics = italics || false;\n\t this.background = background || 'black';\n\t this.flash = flash || false;\n\t }\n\t\n\t _createClass(PenState, [{\n\t key: 'reset',\n\t value: function reset() {\n\t this.foreground = 'white';\n\t this.underline = false;\n\t this.italics = false;\n\t this.background = 'black';\n\t this.flash = false;\n\t }\n\t }, {\n\t key: 'setStyles',\n\t value: function setStyles(styles) {\n\t var attribs = ['foreground', 'underline', 'italics', 'background', 'flash'];\n\t for (var i = 0; i < attribs.length; i++) {\n\t var style = attribs[i];\n\t if (styles.hasOwnProperty(style)) {\n\t this[style] = styles[style];\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'isDefault',\n\t value: function isDefault() {\n\t return this.foreground === 'white' && !this.underline && !this.italics && this.background === 'black' && !this.flash;\n\t }\n\t }, {\n\t key: 'equals',\n\t value: function equals(other) {\n\t return this.foreground === other.foreground && this.underline === other.underline && this.italics === other.italics && this.background === other.background && this.flash === other.flash;\n\t }\n\t }, {\n\t key: 'copy',\n\t value: function copy(newPenState) {\n\t this.foreground = newPenState.foreground;\n\t this.underline = newPenState.underline;\n\t this.italics = newPenState.italics;\n\t this.background = newPenState.background;\n\t this.flash = newPenState.flash;\n\t }\n\t }, {\n\t key: 'toString',\n\t value: function toString() {\n\t return 'color=' + this.foreground + ', underline=' + this.underline + ', italics=' + this.italics + ', background=' + this.background + ', flash=' + this.flash;\n\t }\n\t }]);\n\t\n\t return PenState;\n\t}();\n\t\n\t/**\n\t * Unicode character with styling and background.\n\t * @constructor\n\t */\n\t\n\t\n\tvar StyledUnicodeChar = function () {\n\t function StyledUnicodeChar(uchar, foreground, underline, italics, background, flash) {\n\t _classCallCheck(this, StyledUnicodeChar);\n\t\n\t this.uchar = uchar || ' '; // unicode character\n\t this.penState = new PenState(foreground, underline, italics, background, flash);\n\t }\n\t\n\t _createClass(StyledUnicodeChar, [{\n\t key: 'reset',\n\t value: function reset() {\n\t this.uchar = ' ';\n\t this.penState.reset();\n\t }\n\t }, {\n\t key: 'setChar',\n\t value: function setChar(uchar, newPenState) {\n\t this.uchar = uchar;\n\t this.penState.copy(newPenState);\n\t }\n\t }, {\n\t key: 'setPenState',\n\t value: function setPenState(newPenState) {\n\t this.penState.copy(newPenState);\n\t }\n\t }, {\n\t key: 'equals',\n\t value: function equals(other) {\n\t return this.uchar === other.uchar && this.penState.equals(other.penState);\n\t }\n\t }, {\n\t key: 'copy',\n\t value: function copy(newChar) {\n\t this.uchar = newChar.uchar;\n\t this.penState.copy(newChar.penState);\n\t }\n\t }, {\n\t key: 'isEmpty',\n\t value: function isEmpty() {\n\t return this.uchar === ' ' && this.penState.isDefault();\n\t }\n\t }]);\n\t\n\t return StyledUnicodeChar;\n\t}();\n\t\n\t/**\n\t * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n\t * @constructor\n\t */\n\t\n\t\n\tvar Row = function () {\n\t function Row() {\n\t _classCallCheck(this, Row);\n\t\n\t this.chars = [];\n\t for (var i = 0; i < NR_COLS; i++) {\n\t this.chars.push(new StyledUnicodeChar());\n\t }\n\t this.pos = 0;\n\t this.currPenState = new PenState();\n\t }\n\t\n\t _createClass(Row, [{\n\t key: 'equals',\n\t value: function equals(other) {\n\t var equal = true;\n\t for (var i = 0; i < NR_COLS; i++) {\n\t if (!this.chars[i].equals(other.chars[i])) {\n\t equal = false;\n\t break;\n\t }\n\t }\n\t return equal;\n\t }\n\t }, {\n\t key: 'copy',\n\t value: function copy(other) {\n\t for (var i = 0; i < NR_COLS; i++) {\n\t this.chars[i].copy(other.chars[i]);\n\t }\n\t }\n\t }, {\n\t key: 'isEmpty',\n\t value: function isEmpty() {\n\t var empty = true;\n\t for (var i = 0; i < NR_COLS; i++) {\n\t if (!this.chars[i].isEmpty()) {\n\t empty = false;\n\t break;\n\t }\n\t }\n\t return empty;\n\t }\n\t\n\t /**\n\t * Set the cursor to a valid column.\n\t */\n\t\n\t }, {\n\t key: 'setCursor',\n\t value: function setCursor(absPos) {\n\t if (this.pos !== absPos) {\n\t this.pos = absPos;\n\t }\n\t if (this.pos < 0) {\n\t logger.log('ERROR', 'Negative cursor position ' + this.pos);\n\t this.pos = 0;\n\t } else if (this.pos > NR_COLS) {\n\t logger.log('ERROR', 'Too large cursor position ' + this.pos);\n\t this.pos = NR_COLS;\n\t }\n\t }\n\t\n\t /**\n\t * Move the cursor relative to current position.\n\t */\n\t\n\t }, {\n\t key: 'moveCursor',\n\t value: function moveCursor(relPos) {\n\t var newPos = this.pos + relPos;\n\t if (relPos > 1) {\n\t for (var i = this.pos + 1; i < newPos + 1; i++) {\n\t this.chars[i].setPenState(this.currPenState);\n\t }\n\t }\n\t this.setCursor(newPos);\n\t }\n\t\n\t /**\n\t * Backspace, move one step back and clear character.\n\t */\n\t\n\t }, {\n\t key: 'backSpace',\n\t value: function backSpace() {\n\t this.moveCursor(-1);\n\t this.chars[this.pos].setChar(' ', this.currPenState);\n\t }\n\t }, {\n\t key: 'insertChar',\n\t value: function insertChar(byte) {\n\t if (byte >= 0x90) {\n\t //Extended char\n\t this.backSpace();\n\t }\n\t var char = getCharForByte(byte);\n\t if (this.pos >= NR_COLS) {\n\t logger.log('ERROR', 'Cannot insert ' + byte.toString(16) + ' (' + char + ') at position ' + this.pos + '. Skipping it!');\n\t return;\n\t }\n\t this.chars[this.pos].setChar(char, this.currPenState);\n\t this.moveCursor(1);\n\t }\n\t }, {\n\t key: 'clearFromPos',\n\t value: function clearFromPos(startPos) {\n\t var i;\n\t for (i = startPos; i < NR_COLS; i++) {\n\t this.chars[i].reset();\n\t }\n\t }\n\t }, {\n\t key: 'clear',\n\t value: function clear() {\n\t this.clearFromPos(0);\n\t this.pos = 0;\n\t this.currPenState.reset();\n\t }\n\t }, {\n\t key: 'clearToEndOfRow',\n\t value: function clearToEndOfRow() {\n\t this.clearFromPos(this.pos);\n\t }\n\t }, {\n\t key: 'getTextString',\n\t value: function getTextString() {\n\t var chars = [];\n\t var empty = true;\n\t for (var i = 0; i < NR_COLS; i++) {\n\t var char = this.chars[i].uchar;\n\t if (char !== ' ') {\n\t empty = false;\n\t }\n\t chars.push(char);\n\t }\n\t if (empty) {\n\t return '';\n\t } else {\n\t return chars.join('');\n\t }\n\t }\n\t }, {\n\t key: 'setPenStyles',\n\t value: function setPenStyles(styles) {\n\t this.currPenState.setStyles(styles);\n\t var currChar = this.chars[this.pos];\n\t currChar.setPenState(this.currPenState);\n\t }\n\t }]);\n\t\n\t return Row;\n\t}();\n\t\n\t/**\n\t * Keep a CEA-608 screen of 32x15 styled characters\n\t * @constructor\n\t*/\n\t\n\t\n\tvar CaptionScreen = function () {\n\t function CaptionScreen() {\n\t _classCallCheck(this, CaptionScreen);\n\t\n\t this.rows = [];\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t this.rows.push(new Row()); // Note that we use zero-based numbering (0-14)\n\t }\n\t this.currRow = NR_ROWS - 1;\n\t this.nrRollUpRows = null;\n\t this.reset();\n\t }\n\t\n\t _createClass(CaptionScreen, [{\n\t key: 'reset',\n\t value: function reset() {\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t this.rows[i].clear();\n\t }\n\t this.currRow = NR_ROWS - 1;\n\t }\n\t }, {\n\t key: 'equals',\n\t value: function equals(other) {\n\t var equal = true;\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t if (!this.rows[i].equals(other.rows[i])) {\n\t equal = false;\n\t break;\n\t }\n\t }\n\t return equal;\n\t }\n\t }, {\n\t key: 'copy',\n\t value: function copy(other) {\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t this.rows[i].copy(other.rows[i]);\n\t }\n\t }\n\t }, {\n\t key: 'isEmpty',\n\t value: function isEmpty() {\n\t var empty = true;\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t if (!this.rows[i].isEmpty()) {\n\t empty = false;\n\t break;\n\t }\n\t }\n\t return empty;\n\t }\n\t }, {\n\t key: 'backSpace',\n\t value: function backSpace() {\n\t var row = this.rows[this.currRow];\n\t row.backSpace();\n\t }\n\t }, {\n\t key: 'clearToEndOfRow',\n\t value: function clearToEndOfRow() {\n\t var row = this.rows[this.currRow];\n\t row.clearToEndOfRow();\n\t }\n\t\n\t /**\n\t * Insert a character (without styling) in the current row.\n\t */\n\t\n\t }, {\n\t key: 'insertChar',\n\t value: function insertChar(char) {\n\t var row = this.rows[this.currRow];\n\t row.insertChar(char);\n\t }\n\t }, {\n\t key: 'setPen',\n\t value: function setPen(styles) {\n\t var row = this.rows[this.currRow];\n\t row.setPenStyles(styles);\n\t }\n\t }, {\n\t key: 'moveCursor',\n\t value: function moveCursor(relPos) {\n\t var row = this.rows[this.currRow];\n\t row.moveCursor(relPos);\n\t }\n\t }, {\n\t key: 'setCursor',\n\t value: function setCursor(absPos) {\n\t logger.log('INFO', 'setCursor: ' + absPos);\n\t var row = this.rows[this.currRow];\n\t row.setCursor(absPos);\n\t }\n\t }, {\n\t key: 'setPAC',\n\t value: function setPAC(pacData) {\n\t logger.log('INFO', 'pacData = ' + JSON.stringify(pacData));\n\t var newRow = pacData.row - 1;\n\t if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n\t newRow = this.nrRollUpRows - 1;\n\t }\n\t this.currRow = newRow;\n\t var row = this.rows[this.currRow];\n\t if (pacData.indent !== null) {\n\t var indent = pacData.indent;\n\t var prevPos = Math.max(indent - 1, 0);\n\t row.setCursor(pacData.indent);\n\t pacData.color = row.chars[prevPos].penState.foreground;\n\t }\n\t var styles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };\n\t this.setPen(styles);\n\t }\n\t\n\t /**\n\t * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n\t */\n\t\n\t }, {\n\t key: 'setBkgData',\n\t value: function setBkgData(bkgData) {\n\t\n\t logger.log('INFO', 'bkgData = ' + JSON.stringify(bkgData));\n\t this.backSpace();\n\t this.setPen(bkgData);\n\t this.insertChar(0x20); //Space\n\t }\n\t }, {\n\t key: 'setRollUpRows',\n\t value: function setRollUpRows(nrRows) {\n\t this.nrRollUpRows = nrRows;\n\t }\n\t }, {\n\t key: 'rollUp',\n\t value: function rollUp() {\n\t if (this.nrRollUpRows === null) {\n\t logger.log('DEBUG', 'roll_up but nrRollUpRows not set yet');\n\t return; //Not properly setup\n\t }\n\t logger.log('TEXT', this.getDisplayText());\n\t var topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n\t var topRow = this.rows.splice(topRowIndex, 1)[0];\n\t topRow.clear();\n\t this.rows.splice(this.currRow, 0, topRow);\n\t logger.log('INFO', 'Rolling up');\n\t //logger.log('TEXT', this.get_display_text())\n\t }\n\t\n\t /**\n\t * Get all non-empty rows with as unicode text.\n\t */\n\t\n\t }, {\n\t key: 'getDisplayText',\n\t value: function getDisplayText(asOneRow) {\n\t asOneRow = asOneRow || false;\n\t var displayText = [];\n\t var text = '';\n\t var rowNr = -1;\n\t for (var i = 0; i < NR_ROWS; i++) {\n\t var rowText = this.rows[i].getTextString();\n\t if (rowText) {\n\t rowNr = i + 1;\n\t if (asOneRow) {\n\t displayText.push('Row ' + rowNr + ': \\'' + rowText + '\\'');\n\t } else {\n\t displayText.push(rowText.trim());\n\t }\n\t }\n\t }\n\t if (displayText.length > 0) {\n\t if (asOneRow) {\n\t text = '[' + displayText.join(' | ') + ']';\n\t } else {\n\t text = displayText.join('\\n');\n\t }\n\t }\n\t return text;\n\t }\n\t }, {\n\t key: 'getTextAndFormat',\n\t value: function getTextAndFormat() {\n\t return this.rows;\n\t }\n\t }]);\n\t\n\t return CaptionScreen;\n\t}();\n\t\n\t//var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];\n\t\n\tvar Cea608Channel = function () {\n\t function Cea608Channel(channelNumber, outputFilter) {\n\t _classCallCheck(this, Cea608Channel);\n\t\n\t this.chNr = channelNumber;\n\t this.outputFilter = outputFilter;\n\t this.mode = null;\n\t this.verbose = 0;\n\t this.displayedMemory = new CaptionScreen();\n\t this.nonDisplayedMemory = new CaptionScreen();\n\t this.lastOutputScreen = new CaptionScreen();\n\t this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n\t this.writeScreen = this.displayedMemory;\n\t this.mode = null;\n\t this.cueStartTime = null; // Keeps track of where a cue started.\n\t }\n\t\n\t _createClass(Cea608Channel, [{\n\t key: 'reset',\n\t value: function reset() {\n\t this.mode = null;\n\t this.displayedMemory.reset();\n\t this.nonDisplayedMemory.reset();\n\t this.lastOutputScreen.reset();\n\t this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n\t this.writeScreen = this.displayedMemory;\n\t this.mode = null;\n\t this.cueStartTime = null;\n\t this.lastCueEndTime = null;\n\t }\n\t }, {\n\t key: 'getHandler',\n\t value: function getHandler() {\n\t return this.outputFilter;\n\t }\n\t }, {\n\t key: 'setHandler',\n\t value: function setHandler(newHandler) {\n\t this.outputFilter = newHandler;\n\t }\n\t }, {\n\t key: 'setPAC',\n\t value: function setPAC(pacData) {\n\t this.writeScreen.setPAC(pacData);\n\t }\n\t }, {\n\t key: 'setBkgData',\n\t value: function setBkgData(bkgData) {\n\t this.writeScreen.setBkgData(bkgData);\n\t }\n\t }, {\n\t key: 'setMode',\n\t value: function setMode(newMode) {\n\t if (newMode === this.mode) {\n\t return;\n\t }\n\t this.mode = newMode;\n\t logger.log('INFO', 'MODE=' + newMode);\n\t if (this.mode === 'MODE_POP-ON') {\n\t this.writeScreen = this.nonDisplayedMemory;\n\t } else {\n\t this.writeScreen = this.displayedMemory;\n\t this.writeScreen.reset();\n\t }\n\t if (this.mode !== 'MODE_ROLL-UP') {\n\t this.displayedMemory.nrRollUpRows = null;\n\t this.nonDisplayedMemory.nrRollUpRows = null;\n\t }\n\t this.mode = newMode;\n\t }\n\t }, {\n\t key: 'insertChars',\n\t value: function insertChars(chars) {\n\t for (var i = 0; i < chars.length; i++) {\n\t this.writeScreen.insertChar(chars[i]);\n\t }\n\t var screen = this.writeScreen === this.displayedMemory ? 'DISP' : 'NON_DISP';\n\t logger.log('INFO', screen + ': ' + this.writeScreen.getDisplayText(true));\n\t if (this.mode === 'MODE_PAINT-ON' || this.mode === 'MODE_ROLL-UP') {\n\t logger.log('TEXT', 'DISPLAYED: ' + this.displayedMemory.getDisplayText(true));\n\t this.outputDataUpdate();\n\t }\n\t }\n\t }, {\n\t key: 'ccRCL',\n\t value: function ccRCL() {\n\t // Resume Caption Loading (switch mode to Pop On)\n\t logger.log('INFO', 'RCL - Resume Caption Loading');\n\t this.setMode('MODE_POP-ON');\n\t }\n\t }, {\n\t key: 'ccBS',\n\t value: function ccBS() {\n\t // BackSpace\n\t logger.log('INFO', 'BS - BackSpace');\n\t if (this.mode === 'MODE_TEXT') {\n\t return;\n\t }\n\t this.writeScreen.backSpace();\n\t if (this.writeScreen === this.displayedMemory) {\n\t this.outputDataUpdate();\n\t }\n\t }\n\t }, {\n\t key: 'ccAOF',\n\t value: function ccAOF() {\n\t // Reserved (formerly Alarm Off)\n\t return;\n\t }\n\t }, {\n\t key: 'ccAON',\n\t value: function ccAON() {\n\t // Reserved (formerly Alarm On)\n\t return;\n\t }\n\t }, {\n\t key: 'ccDER',\n\t value: function ccDER() {\n\t // Delete to End of Row\n\t logger.log('INFO', 'DER- Delete to End of Row');\n\t this.writeScreen.clearToEndOfRow();\n\t this.outputDataUpdate();\n\t }\n\t }, {\n\t key: 'ccRU',\n\t value: function ccRU(nrRows) {\n\t //Roll-Up Captions-2,3,or 4 Rows\n\t logger.log('INFO', 'RU(' + nrRows + ') - Roll Up');\n\t this.writeScreen = this.displayedMemory;\n\t this.setMode('MODE_ROLL-UP');\n\t this.writeScreen.setRollUpRows(nrRows);\n\t }\n\t }, {\n\t key: 'ccFON',\n\t value: function ccFON() {\n\t //Flash On\n\t logger.log('INFO', 'FON - Flash On');\n\t this.writeScreen.setPen({ flash: true });\n\t }\n\t }, {\n\t key: 'ccRDC',\n\t value: function ccRDC() {\n\t // Resume Direct Captioning (switch mode to PaintOn)\n\t logger.log('INFO', 'RDC - Resume Direct Captioning');\n\t this.setMode('MODE_PAINT-ON');\n\t }\n\t }, {\n\t key: 'ccTR',\n\t value: function ccTR() {\n\t // Text Restart in text mode (not supported, however)\n\t logger.log('INFO', 'TR');\n\t this.setMode('MODE_TEXT');\n\t }\n\t }, {\n\t key: 'ccRTD',\n\t value: function ccRTD() {\n\t // Resume Text Display in Text mode (not supported, however)\n\t logger.log('INFO', 'RTD');\n\t this.setMode('MODE_TEXT');\n\t }\n\t }, {\n\t key: 'ccEDM',\n\t value: function ccEDM() {\n\t // Erase Displayed Memory\n\t logger.log('INFO', 'EDM - Erase Displayed Memory');\n\t this.displayedMemory.reset();\n\t this.outputDataUpdate();\n\t }\n\t }, {\n\t key: 'ccCR',\n\t value: function ccCR() {\n\t // Carriage Return\n\t logger.log('CR - Carriage Return');\n\t this.writeScreen.rollUp();\n\t this.outputDataUpdate();\n\t }\n\t }, {\n\t key: 'ccENM',\n\t value: function ccENM() {\n\t //Erase Non-Displayed Memory\n\t logger.log('INFO', 'ENM - Erase Non-displayed Memory');\n\t this.nonDisplayedMemory.reset();\n\t }\n\t }, {\n\t key: 'ccEOC',\n\t value: function ccEOC() {\n\t //End of Caption (Flip Memories)\n\t logger.log('INFO', 'EOC - End Of Caption');\n\t if (this.mode === 'MODE_POP-ON') {\n\t var tmp = this.displayedMemory;\n\t this.displayedMemory = this.nonDisplayedMemory;\n\t this.nonDisplayedMemory = tmp;\n\t this.writeScreen = this.nonDisplayedMemory;\n\t logger.log('TEXT', 'DISP: ' + this.displayedMemory.getDisplayText());\n\t }\n\t this.outputDataUpdate();\n\t }\n\t }, {\n\t key: 'ccTO',\n\t value: function ccTO(nrCols) {\n\t // Tab Offset 1,2, or 3 columns\n\t logger.log('INFO', 'TO(' + nrCols + ') - Tab Offset');\n\t this.writeScreen.moveCursor(nrCols);\n\t }\n\t }, {\n\t key: 'ccMIDROW',\n\t value: function ccMIDROW(secondByte) {\n\t // Parse MIDROW command\n\t var styles = { flash: false };\n\t styles.underline = secondByte % 2 === 1;\n\t styles.italics = secondByte >= 0x2e;\n\t if (!styles.italics) {\n\t var colorIndex = Math.floor(secondByte / 2) - 0x10;\n\t var colors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta'];\n\t styles.foreground = colors[colorIndex];\n\t } else {\n\t styles.foreground = 'white';\n\t }\n\t logger.log('INFO', 'MIDROW: ' + JSON.stringify(styles));\n\t this.writeScreen.setPen(styles);\n\t }\n\t }, {\n\t key: 'outputDataUpdate',\n\t value: function outputDataUpdate() {\n\t var t = logger.time;\n\t if (t === null) {\n\t return;\n\t }\n\t if (this.outputFilter) {\n\t if (this.outputFilter.updateData) {\n\t this.outputFilter.updateData(t, this.displayedMemory);\n\t }\n\t if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) {\n\t // Start of a new cue\n\t this.cueStartTime = t;\n\t } else {\n\t if (!this.displayedMemory.equals(this.lastOutputScreen)) {\n\t if (this.outputFilter.newCue) {\n\t this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);\n\t }\n\t this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n\t }\n\t }\n\t this.lastOutputScreen.copy(this.displayedMemory);\n\t }\n\t }\n\t }, {\n\t key: 'cueSplitAtTime',\n\t value: function cueSplitAtTime(t) {\n\t if (this.outputFilter) {\n\t if (!this.displayedMemory.isEmpty()) {\n\t if (this.outputFilter.newCue) {\n\t this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);\n\t }\n\t this.cueStartTime = t;\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Cea608Channel;\n\t}();\n\t\n\tvar Cea608Parser = function () {\n\t function Cea608Parser(field, out1, out2) {\n\t _classCallCheck(this, Cea608Parser);\n\t\n\t this.field = field || 1;\n\t this.outputs = [out1, out2];\n\t this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n\t this.currChNr = -1; // Will be 1 or 2\n\t this.lastCmdA = null; // First byte of last command\n\t this.lastCmdB = null; // Second byte of last command\n\t this.bufferedData = [];\n\t this.startTime = null;\n\t this.lastTime = null;\n\t this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };\n\t }\n\t\n\t _createClass(Cea608Parser, [{\n\t key: 'getHandler',\n\t value: function getHandler(index) {\n\t return this.channels[index].getHandler();\n\t }\n\t }, {\n\t key: 'setHandler',\n\t value: function setHandler(index, newHandler) {\n\t this.channels[index].setHandler(newHandler);\n\t }\n\t\n\t /**\n\t * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n\t */\n\t\n\t }, {\n\t key: 'addData',\n\t value: function addData(t, byteList) {\n\t var cmdFound,\n\t a,\n\t b,\n\t charsFound = false;\n\t\n\t this.lastTime = t;\n\t logger.setTime(t);\n\t\n\t for (var i = 0; i < byteList.length; i += 2) {\n\t a = byteList[i] & 0x7f;\n\t b = byteList[i + 1] & 0x7f;\n\t if (a === 0 && b === 0) {\n\t this.dataCounters.padding += 2;\n\t continue;\n\t } else {\n\t logger.log('DATA', '[' + numArrayToHexArray([byteList[i], byteList[i + 1]]) + '] -> (' + numArrayToHexArray([a, b]) + ')');\n\t }\n\t cmdFound = this.parseCmd(a, b);\n\t if (!cmdFound) {\n\t cmdFound = this.parseMidrow(a, b);\n\t }\n\t if (!cmdFound) {\n\t cmdFound = this.parsePAC(a, b);\n\t }\n\t if (!cmdFound) {\n\t cmdFound = this.parseBackgroundAttributes(a, b);\n\t }\n\t if (!cmdFound) {\n\t charsFound = this.parseChars(a, b);\n\t if (charsFound) {\n\t if (this.currChNr && this.currChNr >= 0) {\n\t var channel = this.channels[this.currChNr - 1];\n\t channel.insertChars(charsFound);\n\t } else {\n\t logger.log('WARNING', 'No channel found yet. TEXT-MODE?');\n\t }\n\t }\n\t }\n\t if (cmdFound) {\n\t this.dataCounters.cmd += 2;\n\t } else if (charsFound) {\n\t this.dataCounters.char += 2;\n\t } else {\n\t this.dataCounters.other += 2;\n\t logger.log('WARNING', 'Couldn\\'t parse cleaned data ' + numArrayToHexArray([a, b]) + ' orig: ' + numArrayToHexArray([byteList[i], byteList[i + 1]]));\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * Parse Command.\n\t * @returns {Boolean} Tells if a command was found\n\t */\n\t\n\t }, {\n\t key: 'parseCmd',\n\t value: function parseCmd(a, b) {\n\t var chNr = null;\n\t\n\t var cond1 = (a === 0x14 || a === 0x1C) && 0x20 <= b && b <= 0x2F;\n\t var cond2 = (a === 0x17 || a === 0x1F) && 0x21 <= b && b <= 0x23;\n\t if (!(cond1 || cond2)) {\n\t return false;\n\t }\n\t\n\t if (a === this.lastCmdA && b === this.lastCmdB) {\n\t this.lastCmdA = null;\n\t this.lastCmdB = null; // Repeated commands are dropped (once)\n\t logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');\n\t return true;\n\t }\n\t\n\t if (a === 0x14 || a === 0x17) {\n\t chNr = 1;\n\t } else {\n\t chNr = 2; // (a === 0x1C || a=== 0x1f)\n\t }\n\t\n\t var channel = this.channels[chNr - 1];\n\t\n\t if (a === 0x14 || a === 0x1C) {\n\t if (b === 0x20) {\n\t channel.ccRCL();\n\t } else if (b === 0x21) {\n\t channel.ccBS();\n\t } else if (b === 0x22) {\n\t channel.ccAOF();\n\t } else if (b === 0x23) {\n\t channel.ccAON();\n\t } else if (b === 0x24) {\n\t channel.ccDER();\n\t } else if (b === 0x25) {\n\t channel.ccRU(2);\n\t } else if (b === 0x26) {\n\t channel.ccRU(3);\n\t } else if (b === 0x27) {\n\t channel.ccRU(4);\n\t } else if (b === 0x28) {\n\t channel.ccFON();\n\t } else if (b === 0x29) {\n\t channel.ccRDC();\n\t } else if (b === 0x2A) {\n\t channel.ccTR();\n\t } else if (b === 0x2B) {\n\t channel.ccRTD();\n\t } else if (b === 0x2C) {\n\t channel.ccEDM();\n\t } else if (b === 0x2D) {\n\t channel.ccCR();\n\t } else if (b === 0x2E) {\n\t channel.ccENM();\n\t } else if (b === 0x2F) {\n\t channel.ccEOC();\n\t }\n\t } else {\n\t //a == 0x17 || a == 0x1F\n\t channel.ccTO(b - 0x20);\n\t }\n\t this.lastCmdA = a;\n\t this.lastCmdB = b;\n\t this.currChNr = chNr;\n\t return true;\n\t }\n\t\n\t /**\n\t * Parse midrow styling command\n\t * @returns {Boolean}\n\t */\n\t\n\t }, {\n\t key: 'parseMidrow',\n\t value: function parseMidrow(a, b) {\n\t var chNr = null;\n\t\n\t if ((a === 0x11 || a === 0x19) && 0x20 <= b && b <= 0x2f) {\n\t if (a === 0x11) {\n\t chNr = 1;\n\t } else {\n\t chNr = 2;\n\t }\n\t if (chNr !== this.currChNr) {\n\t logger.log('ERROR', 'Mismatch channel in midrow parsing');\n\t return false;\n\t }\n\t var channel = this.channels[chNr - 1];\n\t channel.ccMIDROW(b);\n\t logger.log('DEBUG', 'MIDROW (' + numArrayToHexArray([a, b]) + ')');\n\t return true;\n\t }\n\t return false;\n\t }\n\t /**\n\t * Parse Preable Access Codes (Table 53).\n\t * @returns {Boolean} Tells if PAC found\n\t */\n\t\n\t }, {\n\t key: 'parsePAC',\n\t value: function parsePAC(a, b) {\n\t\n\t var chNr = null;\n\t var row = null;\n\t\n\t var case1 = (0x11 <= a && a <= 0x17 || 0x19 <= a && a <= 0x1F) && 0x40 <= b && b <= 0x7F;\n\t var case2 = (a === 0x10 || a === 0x18) && 0x40 <= b && b <= 0x5F;\n\t if (!(case1 || case2)) {\n\t return false;\n\t }\n\t\n\t if (a === this.lastCmdA && b === this.lastCmdB) {\n\t this.lastCmdA = null;\n\t this.lastCmdB = null;\n\t return true; // Repeated commands are dropped (once)\n\t }\n\t\n\t chNr = a <= 0x17 ? 1 : 2;\n\t\n\t if (0x40 <= b && b <= 0x5F) {\n\t row = chNr === 1 ? rowsLowCh1[a] : rowsLowCh2[a];\n\t } else {\n\t // 0x60 <= b <= 0x7F\n\t row = chNr === 1 ? rowsHighCh1[a] : rowsHighCh2[a];\n\t }\n\t var pacData = this.interpretPAC(row, b);\n\t var channel = this.channels[chNr - 1];\n\t channel.setPAC(pacData);\n\t this.lastCmdA = a;\n\t this.lastCmdB = b;\n\t this.currChNr = chNr;\n\t return true;\n\t }\n\t\n\t /**\n\t * Interpret the second byte of the pac, and return the information.\n\t * @returns {Object} pacData with style parameters.\n\t */\n\t\n\t }, {\n\t key: 'interpretPAC',\n\t value: function interpretPAC(row, byte) {\n\t var pacIndex = byte;\n\t var pacData = { color: null, italics: false, indent: null, underline: false, row: row };\n\t\n\t if (byte > 0x5F) {\n\t pacIndex = byte - 0x60;\n\t } else {\n\t pacIndex = byte - 0x40;\n\t }\n\t pacData.underline = (pacIndex & 1) === 1;\n\t if (pacIndex <= 0xd) {\n\t pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];\n\t } else if (pacIndex <= 0xf) {\n\t pacData.italics = true;\n\t pacData.color = 'white';\n\t } else {\n\t pacData.indent = Math.floor((pacIndex - 0x10) / 2) * 4;\n\t }\n\t return pacData; // Note that row has zero offset. The spec uses 1.\n\t }\n\t\n\t /**\n\t * Parse characters.\n\t * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n\t */\n\t\n\t }, {\n\t key: 'parseChars',\n\t value: function parseChars(a, b) {\n\t\n\t var channelNr = null,\n\t charCodes = null,\n\t charCode1 = null;\n\t\n\t if (a >= 0x19) {\n\t channelNr = 2;\n\t charCode1 = a - 8;\n\t } else {\n\t channelNr = 1;\n\t charCode1 = a;\n\t }\n\t if (0x11 <= charCode1 && charCode1 <= 0x13) {\n\t // Special character\n\t var oneCode = b;\n\t if (charCode1 === 0x11) {\n\t oneCode = b + 0x50;\n\t } else if (charCode1 === 0x12) {\n\t oneCode = b + 0x70;\n\t } else {\n\t oneCode = b + 0x90;\n\t }\n\t logger.log('INFO', 'Special char \\'' + getCharForByte(oneCode) + '\\' in channel ' + channelNr);\n\t charCodes = [oneCode];\n\t } else if (0x20 <= a && a <= 0x7f) {\n\t charCodes = b === 0 ? [a] : [a, b];\n\t }\n\t if (charCodes) {\n\t var hexCodes = numArrayToHexArray(charCodes);\n\t logger.log('DEBUG', 'Char codes = ' + hexCodes.join(','));\n\t this.lastCmdA = null;\n\t this.lastCmdB = null;\n\t }\n\t return charCodes;\n\t }\n\t\n\t /**\n\t * Parse extended background attributes as well as new foreground color black.\n\t * @returns{Boolean} Tells if background attributes are found\n\t */\n\t\n\t }, {\n\t key: 'parseBackgroundAttributes',\n\t value: function parseBackgroundAttributes(a, b) {\n\t var bkgData, index, chNr, channel;\n\t\n\t var case1 = (a === 0x10 || a === 0x18) && 0x20 <= b && b <= 0x2f;\n\t var case2 = (a === 0x17 || a === 0x1f) && 0x2d <= b && b <= 0x2f;\n\t if (!(case1 || case2)) {\n\t return false;\n\t }\n\t bkgData = {};\n\t if (a === 0x10 || a === 0x18) {\n\t index = Math.floor((b - 0x20) / 2);\n\t bkgData.background = backgroundColors[index];\n\t if (b % 2 === 1) {\n\t bkgData.background = bkgData.background + '_semi';\n\t }\n\t } else if (b === 0x2d) {\n\t bkgData.background = 'transparent';\n\t } else {\n\t bkgData.foreground = 'black';\n\t if (b === 0x2f) {\n\t bkgData.underline = true;\n\t }\n\t }\n\t chNr = a < 0x18 ? 1 : 2;\n\t channel = this.channels[chNr - 1];\n\t channel.setBkgData(bkgData);\n\t this.lastCmdA = null;\n\t this.lastCmdB = null;\n\t return true;\n\t }\n\t\n\t /**\n\t * Reset state of parser and its channels.\n\t */\n\t\n\t }, {\n\t key: 'reset',\n\t value: function reset() {\n\t for (var i = 0; i < this.channels.length; i++) {\n\t if (this.channels[i]) {\n\t this.channels[i].reset();\n\t }\n\t }\n\t this.lastCmdA = null;\n\t this.lastCmdB = null;\n\t }\n\t\n\t /**\n\t * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n\t */\n\t\n\t }, {\n\t key: 'cueSplitAtTime',\n\t value: function cueSplitAtTime(t) {\n\t for (var i = 0; i < this.channels.length; i++) {\n\t if (this.channels[i]) {\n\t this.channels[i].cueSplitAtTime(t);\n\t }\n\t }\n\t }\n\t }]);\n\t\n\t return Cea608Parser;\n\t}();\n\t\n\texports.default = Cea608Parser;\n\t\n\t},{}],41:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tvar Cues = {\n\t\n\t newCue: function newCue(track, startTime, endTime, captionScreen) {\n\t var row;\n\t var cue;\n\t var indenting;\n\t var indent;\n\t var text;\n\t var VTTCue = window.VTTCue || window.TextTrackCue;\n\t\n\t for (var r = 0; r < captionScreen.rows.length; r++) {\n\t row = captionScreen.rows[r];\n\t indenting = true;\n\t indent = 0;\n\t text = '';\n\t\n\t if (!row.isEmpty()) {\n\t for (var c = 0; c < row.chars.length; c++) {\n\t if (row.chars[c].uchar.match(/\\s/) && indenting) {\n\t indent++;\n\t } else {\n\t text += row.chars[c].uchar;\n\t indenting = false;\n\t }\n\t }\n\t cue = new VTTCue(startTime, endTime, text.trim());\n\t\n\t if (indent >= 16) {\n\t indent--;\n\t } else {\n\t indent++;\n\t }\n\t\n\t // VTTCue.line get's flakey when using controls, so let's now include line 13&14\n\t // also, drop line 1 since it's to close to the top\n\t if (navigator.userAgent.match(/Firefox\\//)) {\n\t cue.line = r + 1;\n\t } else {\n\t cue.line = r > 7 ? r - 2 : r + 1;\n\t }\n\t cue.align = 'left';\n\t cue.position = 100 * (indent / 32) + (navigator.userAgent.match(/Firefox\\//) ? 50 : 0);\n\t track.addCue(cue);\n\t }\n\t }\n\t }\n\t\n\t};\n\t\n\tmodule.exports = Cues;\n\t\n\t},{}],42:[function(_dereq_,module,exports){\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*\n\t * compute an Exponential Weighted moving average\n\t * - https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n\t * - heavily inspired from shaka-player\n\t */\n\t\n\tvar EWMA = function () {\n\t\n\t // About half of the estimated value will be from the last |halfLife| samples by weight.\n\t\n\t function EWMA(halfLife) {\n\t _classCallCheck(this, EWMA);\n\t\n\t // Larger values of alpha expire historical data more slowly.\n\t this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;\n\t this.estimate_ = 0;\n\t this.totalWeight_ = 0;\n\t }\n\t\n\t _createClass(EWMA, [{\n\t key: \"sample\",\n\t value: function sample(weight, value) {\n\t var adjAlpha = Math.pow(this.alpha_, weight);\n\t this.estimate_ = value * (1 - adjAlpha) + adjAlpha * this.estimate_;\n\t this.totalWeight_ += weight;\n\t }\n\t }, {\n\t key: \"getTotalWeight\",\n\t value: function getTotalWeight() {\n\t return this.totalWeight_;\n\t }\n\t }, {\n\t key: \"getEstimate\",\n\t value: function getEstimate() {\n\t if (this.alpha_) {\n\t var zeroFactor = 1 - Math.pow(this.alpha_, this.totalWeight_);\n\t return this.estimate_ / zeroFactor;\n\t } else {\n\t return this.estimate_;\n\t }\n\t }\n\t }]);\n\t\n\t return EWMA;\n\t}();\n\t\n\texports.default = EWMA;\n\t\n\t},{}],43:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\tfunction noop() {}\n\t\n\tvar fakeLogger = {\n\t trace: noop,\n\t debug: noop,\n\t log: noop,\n\t warn: noop,\n\t info: noop,\n\t error: noop\n\t};\n\t\n\tvar exportedLogger = fakeLogger;\n\t\n\t/*globals self: false */\n\t\n\t//let lastCallTime;\n\t// function formatMsgWithTimeInfo(type, msg) {\n\t// const now = Date.now();\n\t// const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';\n\t// lastCallTime = now;\n\t// msg = (new Date(now)).toISOString() + ' | [' + type + '] > ' + msg + ' ( ' + diff + ' ms )';\n\t// return msg;\n\t// }\n\t\n\tfunction formatMsg(type, msg) {\n\t msg = '[' + type + '] > ' + msg;\n\t return msg;\n\t}\n\t\n\tfunction consolePrintFn(type) {\n\t var func = self.console[type];\n\t if (func) {\n\t return function () {\n\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\t\n\t if (args[0]) {\n\t args[0] = formatMsg(type, args[0]);\n\t }\n\t func.apply(self.console, args);\n\t };\n\t }\n\t return noop;\n\t}\n\t\n\tfunction exportLoggerFunctions(debugConfig) {\n\t for (var _len2 = arguments.length, functions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n\t functions[_key2 - 1] = arguments[_key2];\n\t }\n\t\n\t functions.forEach(function (type) {\n\t exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);\n\t });\n\t}\n\t\n\tvar enableLogs = exports.enableLogs = function enableLogs(debugConfig) {\n\t if (debugConfig === true || (typeof debugConfig === 'undefined' ? 'undefined' : _typeof(debugConfig)) === 'object') {\n\t exportLoggerFunctions(debugConfig,\n\t // Remove out from list here to hard-disable a log-level\n\t //'trace',\n\t 'debug', 'log', 'info', 'warn', 'error');\n\t // Some browsers don't allow to use bind on console object anyway\n\t // fallback to default if needed\n\t try {\n\t exportedLogger.log();\n\t } catch (e) {\n\t exportedLogger = fakeLogger;\n\t }\n\t } else {\n\t exportedLogger = fakeLogger;\n\t }\n\t};\n\t\n\tvar logger = exports.logger = exportedLogger;\n\t\n\t},{}],44:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tif (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {\n\t ArrayBuffer.prototype.slice = function (start, end) {\n\t var that = new Uint8Array(this);\n\t if (end === undefined) {\n\t end = that.length;\n\t }\n\t var result = new ArrayBuffer(end - start);\n\t var resultArray = new Uint8Array(result);\n\t for (var i = 0; i < resultArray.length; i++) {\n\t resultArray[i] = that[i + start];\n\t }\n\t return result;\n\t };\n\t}\n\t\n\t},{}],45:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }();\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/**\n\t * TimeRanges to string helper\n\t */\n\t\n\tvar TimeRanges = function () {\n\t function TimeRanges() {\n\t _classCallCheck(this, TimeRanges);\n\t }\n\t\n\t _createClass(TimeRanges, null, [{\n\t key: 'toString',\n\t value: function toString(r) {\n\t var log = '',\n\t len = r.length;\n\t for (var i = 0; i < len; i++) {\n\t log += '[' + r.start(i).toFixed(3) + ',' + r.end(i).toFixed(3) + ']';\n\t }\n\t return log;\n\t }\n\t }]);\n\t\n\t return TimeRanges;\n\t}();\n\t\n\texports.default = TimeRanges;\n\t\n\t},{}],46:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tvar URLHelper = {\n\t // build an absolute URL from a relative one using the provided baseURL\n\t // if relativeURL is an absolute URL it will be returned as is.\n\t buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL) {\n\t // remove any remaining space and CRLF\n\t relativeURL = relativeURL.trim();\n\t if (/^[a-z]+:/i.test(relativeURL)) {\n\t // complete url, not relative\n\t return relativeURL;\n\t }\n\t\n\t var relativeURLQuery = null;\n\t var relativeURLHash = null;\n\t\n\t var relativeURLHashSplit = /^([^#]*)(.*)$/.exec(relativeURL);\n\t if (relativeURLHashSplit) {\n\t relativeURLHash = relativeURLHashSplit[2];\n\t relativeURL = relativeURLHashSplit[1];\n\t }\n\t var relativeURLQuerySplit = /^([^\\?]*)(.*)$/.exec(relativeURL);\n\t if (relativeURLQuerySplit) {\n\t relativeURLQuery = relativeURLQuerySplit[2];\n\t relativeURL = relativeURLQuerySplit[1];\n\t }\n\t\n\t var baseURLHashSplit = /^([^#]*)(.*)$/.exec(baseURL);\n\t if (baseURLHashSplit) {\n\t baseURL = baseURLHashSplit[1];\n\t }\n\t var baseURLQuerySplit = /^([^\\?]*)(.*)$/.exec(baseURL);\n\t if (baseURLQuerySplit) {\n\t baseURL = baseURLQuerySplit[1];\n\t }\n\t\n\t var baseURLDomainSplit = /^(([a-z]+:)?\\/\\/[a-z0-9\\.\\-_~]+(:[0-9]+)?)?(\\/.*)$/i.exec(baseURL);\n\t if (!baseURLDomainSplit) {\n\t throw new Error('Error trying to parse base URL.');\n\t }\n\t\n\t // e.g. 'http:', 'https:', ''\n\t var baseURLProtocol = baseURLDomainSplit[2] || '';\n\t // e.g. 'http://example.com', '//example.com', ''\n\t var baseURLProtocolDomain = baseURLDomainSplit[1] || '';\n\t // e.g. '/a/b/c/playlist.m3u8'\n\t var baseURLPath = baseURLDomainSplit[4];\n\t\n\t var builtURL = null;\n\t if (/^\\/\\//.test(relativeURL)) {\n\t // relative url starts wth '//' so copy protocol (which may be '' if baseUrl didn't provide one)\n\t builtURL = baseURLProtocol + '//' + URLHelper.buildAbsolutePath('', relativeURL.substring(2));\n\t } else if (/^\\//.test(relativeURL)) {\n\t // relative url starts with '/' so start from root of domain\n\t builtURL = baseURLProtocolDomain + '/' + URLHelper.buildAbsolutePath('', relativeURL.substring(1));\n\t } else {\n\t builtURL = URLHelper.buildAbsolutePath(baseURLProtocolDomain + baseURLPath, relativeURL);\n\t }\n\t\n\t // put the query and hash parts back\n\t if (relativeURLQuery) {\n\t builtURL += relativeURLQuery;\n\t }\n\t if (relativeURLHash) {\n\t builtURL += relativeURLHash;\n\t }\n\t return builtURL;\n\t },\n\t\n\t // build an absolute path using the provided basePath\n\t // adapted from https://developer.mozilla.org/en-US/docs/Web/API/document/cookie#Using_relative_URLs_in_the_path_parameter\n\t // this does not handle the case where relativePath is \"/\" or \"//\". These cases should be handled outside this.\n\t buildAbsolutePath: function buildAbsolutePath(basePath, relativePath) {\n\t var sRelPath = relativePath;\n\t var nUpLn,\n\t sDir = '',\n\t sPath = basePath.replace(/[^\\/]*$/, sRelPath.replace(/(\\/|^)(?:\\.?\\/+)+/g, '$1'));\n\t for (var nEnd, nStart = 0; nEnd = sPath.indexOf('/../', nStart), nEnd > -1; nStart = nEnd + nUpLn) {\n\t nUpLn = /^\\/(?:\\.\\.\\/)*/.exec(sPath.slice(nEnd))[0].length;\n\t sDir = (sDir + sPath.substring(nStart, nEnd)).replace(new RegExp('(?:\\\\\\/+[^\\\\\\/]*){0,' + (nUpLn - 1) / 3 + '}$'), '/');\n\t }\n\t return sDir + sPath.substr(nStart);\n\t }\n\t};\n\t\n\tmodule.exports = URLHelper;\n\t\n\t},{}],47:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _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; }; }(); /**\n\t * XHR based logger\n\t */\n\t\n\tvar _logger = _dereq_(43);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar XhrLoader = function () {\n\t function XhrLoader(config) {\n\t _classCallCheck(this, XhrLoader);\n\t\n\t if (config && config.xhrSetup) {\n\t this.xhrSetup = config.xhrSetup;\n\t }\n\t }\n\t\n\t _createClass(XhrLoader, [{\n\t key: 'destroy',\n\t value: function destroy() {\n\t this.abort();\n\t this.loader = null;\n\t }\n\t }, {\n\t key: 'abort',\n\t value: function abort() {\n\t var loader = this.loader;\n\t if (loader && loader.readyState !== 4) {\n\t this.stats.aborted = true;\n\t loader.abort();\n\t }\n\t\n\t window.clearTimeout(this.requestTimeout);\n\t this.requestTimeout = null;\n\t window.clearTimeout(this.retryTimeout);\n\t this.retryTimeout = null;\n\t }\n\t }, {\n\t key: 'load',\n\t value: function load(context, config, callbacks) {\n\t this.context = context;\n\t this.config = config;\n\t this.callbacks = callbacks;\n\t this.stats = { trequest: performance.now(), retry: 0 };\n\t this.retryDelay = config.retryDelay;\n\t this.loadInternal();\n\t }\n\t }, {\n\t key: 'loadInternal',\n\t value: function loadInternal() {\n\t var xhr,\n\t context = this.context;\n\t\n\t if (typeof XDomainRequest !== 'undefined') {\n\t xhr = this.loader = new XDomainRequest();\n\t } else {\n\t xhr = this.loader = new XMLHttpRequest();\n\t }\n\t\n\t xhr.onreadystatechange = this.readystatechange.bind(this);\n\t xhr.onprogress = this.loadprogress.bind(this);\n\t\n\t xhr.open('GET', context.url, true);\n\t\n\t if (context.rangeEnd) {\n\t xhr.setRequestHeader('Range', 'bytes=' + context.rangeStart + '-' + (context.rangeEnd - 1));\n\t }\n\t xhr.responseType = context.responseType;\n\t var stats = this.stats;\n\t stats.tfirst = 0;\n\t stats.loaded = 0;\n\t if (this.xhrSetup) {\n\t this.xhrSetup(xhr, context.url);\n\t }\n\t // setup timeout before we perform request\n\t this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), this.config.timeout);\n\t xhr.send();\n\t }\n\t }, {\n\t key: 'readystatechange',\n\t value: function readystatechange(event) {\n\t var xhr = event.currentTarget,\n\t readyState = xhr.readyState,\n\t stats = this.stats,\n\t context = this.context,\n\t config = this.config;\n\t\n\t // don't proceed if xhr has been aborted\n\t if (stats.aborted) {\n\t return;\n\t }\n\t\n\t // in any case clear the current xhrs timeout\n\t window.clearTimeout(this.requestTimeout);\n\t\n\t // HEADERS_RECEIVED\n\t if (readyState >= 2) {\n\t if (stats.tfirst === 0) {\n\t stats.tfirst = Math.max(performance.now(), stats.trequest);\n\t // reset timeout to total timeout duration minus the time it took to receive headers\n\t this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), config.timeout - (stats.tfirst - stats.trequest));\n\t }\n\t if (readyState === 4) {\n\t var status = xhr.status;\n\t // http status between 200 to 299 are all successful\n\t if (status >= 200 && status < 300) {\n\t stats.tload = Math.max(stats.tfirst, performance.now());\n\t var data = void 0,\n\t len = void 0;\n\t if (context.responseType === 'arraybuffer') {\n\t data = xhr.response;\n\t len = data.byteLength;\n\t } else {\n\t data = xhr.responseText;\n\t len = data.length;\n\t }\n\t stats.loaded = stats.total = len;\n\t var response = { url: xhr.responseURL, data: data };\n\t this.callbacks.onSuccess(response, stats, context);\n\t } else {\n\t // if max nb of retries reached or if http status between 400 and 499 (such error cannot be recovered, retrying is useless), return error\n\t if (stats.retry >= config.maxRetry || status >= 400 && status < 499) {\n\t _logger.logger.error(status + ' while loading ' + context.url);\n\t this.callbacks.onError({ code: status, text: xhr.statusText }, context);\n\t } else {\n\t // retry\n\t _logger.logger.warn(status + ' while loading ' + context.url + ', retrying in ' + this.retryDelay + '...');\n\t // aborts and resets internal state\n\t this.destroy();\n\t // schedule retry\n\t this.retryTimeout = window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n\t // set exponential backoff\n\t this.retryDelay = Math.min(2 * this.retryDelay, config.maxRetryDelay);\n\t stats.retry++;\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }, {\n\t key: 'loadtimeout',\n\t value: function loadtimeout() {\n\t _logger.logger.warn('timeout while loading ' + this.context.url);\n\t this.callbacks.onTimeout(this.stats, this.context);\n\t }\n\t }, {\n\t key: 'loadprogress',\n\t value: function loadprogress(event) {\n\t var stats = this.stats;\n\t stats.loaded = event.loaded;\n\t if (event.lengthComputable) {\n\t stats.total = event.total;\n\t }\n\t var onProgress = this.callbacks.onProgress;\n\t if (onProgress) {\n\t // last args is to provide on progress data\n\t onProgress(stats, this.context, null);\n\t }\n\t }\n\t }]);\n\t\n\t return XhrLoader;\n\t}();\n\t\n\texports.default = XhrLoader;\n\t\n\t},{\"43\":43}]},{},[31])(31)\n\t});\n\t//# sourceMappingURL=hls.js.map\n\n\n/***/ },\n/* 91 */\n/*!****************************************************************!*\\\n !*** ./src/components/media_control/public/media-control.html ***!\n \\****************************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<div class=\\\"media-control-background\\\" data-background></div>\\n<div class=\\\"media-control-layer\\\" data-controls>\\n <% var renderBar = function(name) { %>\\n <div class=\\\"bar-container\\\" data-<%= name %>>\\n <div class=\\\"bar-background\\\" data-<%= name %>>\\n <div class=\\\"bar-fill-1\\\" data-<%= name %>></div>\\n <div class=\\\"bar-fill-2\\\" data-<%= name %>></div>\\n <div class=\\\"bar-hover\\\" data-<%= name %>></div>\\n </div>\\n <div class=\\\"bar-scrubber\\\" data-<%= name %>>\\n <div class=\\\"bar-scrubber-icon\\\" data-<%= name %>></div>\\n </div>\\n </div>\\n <% }; %>\\n <% var renderSegmentedBar = function(name, segments) {\\n segments = segments || 10; %>\\n <div class=\\\"bar-container\\\" data-<%= name %>>\\n <% for (var i = 0; i < segments; i++) { %>\\n <div class=\\\"segmented-bar-element\\\" data-<%= name %>></div>\\n <% } %>\\n </div>\\n <% }; %>\\n <% var renderDrawer = function(name, renderContent) { %>\\n <div class=\\\"drawer-container\\\" data-<%= name %>>\\n <div class=\\\"drawer-icon-container\\\" data-<%= name %>>\\n <div class=\\\"drawer-icon media-control-icon\\\" data-<%= name %>></div>\\n <span class=\\\"drawer-text\\\" data-<%= name %>></span>\\n </div>\\n <% renderContent(name); %>\\n </div>\\n <% }; %>\\n <% var renderIndicator = function(name) { %>\\n <div class=\\\"media-control-indicator\\\" data-<%= name %>></div>\\n <% }; %>\\n <% var renderButton = function(name) { %>\\n <button type=\\\"button\\\" class=\\\"media-control-button media-control-icon\\\" data-<%= name %>></button>\\n <% }; %>\\n <% var templates = {\\n bar: renderBar,\\n segmentedBar: renderSegmentedBar,\\n };\\n var render = function(settingsList) {\\n settingsList.forEach(function(setting) {\\n if(setting === \\\"seekbar\\\") {\\n renderBar(setting);\\n } else if (setting === \\\"volume\\\") {\\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\\n } else if (setting === \\\"duration\\\" || setting === \\\"position\\\") {\\n renderIndicator(setting);\\n } else {\\n renderButton(setting);\\n }\\n });\\n }; %>\\n <% if (settings.default && settings.default.length) { %>\\n <div class=\\\"media-control-center-panel\\\" data-media-control>\\n <% render(settings.default); %>\\n </div>\\n <% } %>\\n <% if (settings.left && settings.left.length) { %>\\n <div class=\\\"media-control-left-panel\\\" data-media-control>\\n <% render(settings.left); %>\\n </div>\\n <% } %>\\n <% if (settings.right && settings.right.length) { %>\\n <div class=\\\"media-control-right-panel\\\" data-media-control>\\n <% render(settings.right); %>\\n </div>\\n <% } %>\\n</div>\\n\";\n\n/***/ },\n/* 92 */\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.html ***!\n \\*************************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<param name=\\\"movie\\\" value=\\\"<%= swfPath %>?inline=1\\\">\\n<param name=\\\"quality\\\" value=\\\"autohigh\\\">\\n<param name=\\\"swliveconnect\\\" value=\\\"true\\\">\\n<param name=\\\"allowScriptAccess\\\" value=\\\"always\\\">\\n<param name=\\\"bgcolor\\\" value=\\\"#000000\\\">\\n<param name=\\\"allowFullScreen\\\" value=\\\"false\\\">\\n<param name=\\\"wmode\\\" value=\\\"<%= wmode %>\\\">\\n<param name=\\\"tabindex\\\" value=\\\"1\\\">\\n<param name=\\\"FlashVars\\\" value=\\\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\\\">\\n<embed\\n name=\\\"<%= cid %>\\\"\\n type=\\\"application/x-shockwave-flash\\\"\\n disabled=\\\"disabled\\\"\\n tabindex=\\\"-1\\\"\\n enablecontextmenu=\\\"false\\\"\\n allowScriptAccess=\\\"always\\\"\\n quality=\\\"autohigh\\\"\\n pluginspage=\\\"http://www.macromedia.com/go/getflashplayer\\\"\\n wmode=\\\"<%= wmode %>\\\"\\n swliveconnect=\\\"true\\\"\\n allowfullscreen=\\\"false\\\"\\n bgcolor=\\\"#000000\\\"\\n FlashVars=\\\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\\\"\\n src=\\\"<%= swfPath %>\\\"\\n width=\\\"100%\\\"\\n height=\\\"100%\\\">\\n</embed>\\n\";\n\n/***/ },\n/* 93 */\n/*!***********************************************!*\\\n !*** ./src/playbacks/no_op/public/error.html ***!\n \\***********************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<canvas data-no-op-canvas></canvas>\\n<p data-no-op-msg><%=message%><p>\\n\";\n\n/***/ },\n/* 94 */\n/*!****************************************************!*\\\n !*** ./src/plugins/dvr_controls/public/index.html ***!\n \\****************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<div class=\\\"live-info\\\"><%= live %></div>\\n<button type=\\\"button\\\" class=\\\"live-button\\\"><%= backToLive %></button>\\n\";\n\n/***/ },\n/* 95 */\n/*!***********************************************!*\\\n !*** ./src/plugins/poster/public/poster.html ***!\n \\***********************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<div class=\\\"play-wrapper\\\" data-poster></div>\\n\";\n\n/***/ },\n/* 96 */\n/*!*****************************************************!*\\\n !*** ./src/plugins/seek_time/public/seek_time.html ***!\n \\*****************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<span data-seek-time></span>\\n<span data-duration></span>\\n\";\n\n/***/ },\n/* 97 */\n/*!**************************************************************!*\\\n !*** ./src/plugins/spinner_three_bounce/public/spinner.html ***!\n \\**************************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\\n\";\n\n/***/ },\n/* 98 */\n/*!*****************************************************!*\\\n !*** ./src/plugins/watermark/public/watermark.html ***!\n \\*****************************************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<div data-watermark data-watermark-<%=position %>>\\n<% if(typeof imageLink !== 'undefined') { %>\\n<a target=_blank href=\\\"<%= imageLink %>\\\">\\n<% } %>\\n<img src=\\\"<%= imageUrl %>\\\">\\n<% if(typeof imageLink !== 'undefined') { %>\\n</a>\\n<% } %>\\n</div>\\n\";\n\n/***/ },\n/* 99 */\n/*!***********************************!*\\\n !*** ./~/lodash.isequal/index.js ***!\n \\***********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global, module) {/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** Used as the size to enable large array optimizations. */\n\tvar LARGE_ARRAY_SIZE = 200;\n\t\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\t\n\t/** Used to compose bitmasks for comparison styles. */\n\tvar UNORDERED_COMPARE_FLAG = 1,\n\t PARTIAL_COMPARE_FLAG = 2;\n\t\n\t/** Used as references for various `Number` constants. */\n\tvar MAX_SAFE_INTEGER = 9007199254740991;\n\t\n\t/** `Object#toString` result references. */\n\tvar argsTag = '[object Arguments]',\n\t arrayTag = '[object Array]',\n\t boolTag = '[object Boolean]',\n\t dateTag = '[object Date]',\n\t errorTag = '[object Error]',\n\t funcTag = '[object Function]',\n\t genTag = '[object GeneratorFunction]',\n\t mapTag = '[object Map]',\n\t numberTag = '[object Number]',\n\t objectTag = '[object Object]',\n\t promiseTag = '[object Promise]',\n\t regexpTag = '[object RegExp]',\n\t setTag = '[object Set]',\n\t stringTag = '[object String]',\n\t symbolTag = '[object Symbol]',\n\t weakMapTag = '[object WeakMap]';\n\t\n\tvar arrayBufferTag = '[object ArrayBuffer]',\n\t dataViewTag = '[object DataView]',\n\t float32Tag = '[object Float32Array]',\n\t float64Tag = '[object Float64Array]',\n\t int8Tag = '[object Int8Array]',\n\t int16Tag = '[object Int16Array]',\n\t int32Tag = '[object Int32Array]',\n\t uint8Tag = '[object Uint8Array]',\n\t uint8ClampedTag = '[object Uint8ClampedArray]',\n\t uint16Tag = '[object Uint16Array]',\n\t uint32Tag = '[object Uint32Array]';\n\t\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\t\n\t/** Used to detect host constructors (Safari). */\n\tvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\t\n\t/** Used to detect unsigned integer values. */\n\tvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\t\n\t/** Used to identify `toStringTag` values of typed arrays. */\n\tvar typedArrayTags = {};\n\ttypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n\ttypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n\ttypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n\ttypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n\ttypedArrayTags[uint32Tag] = true;\n\ttypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n\ttypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n\ttypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n\ttypedArrayTags[errorTag] = typedArrayTags[funcTag] =\n\ttypedArrayTags[mapTag] = typedArrayTags[numberTag] =\n\ttypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n\ttypedArrayTags[setTag] = typedArrayTags[stringTag] =\n\ttypedArrayTags[weakMapTag] = false;\n\t\n\t/** Detect free variable `global` from Node.js. */\n\tvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\t\n\t/** Detect free variable `self`. */\n\tvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\t\n\t/** Used as a reference to the global object. */\n\tvar root = freeGlobal || freeSelf || Function('return this')();\n\t\n\t/** Detect free variable `exports`. */\n\tvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\t\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\t\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\t\n\t/** Detect free variable `process` from Node.js. */\n\tvar freeProcess = moduleExports && freeGlobal.process;\n\t\n\t/** Used to access faster Node.js helpers. */\n\tvar nodeUtil = (function() {\n\t try {\n\t return freeProcess && freeProcess.binding('util');\n\t } catch (e) {}\n\t}());\n\t\n\t/* Node.js helper references. */\n\tvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\t\n\t/**\n\t * A specialized version of `_.some` for arrays without support for iteratee\n\t * shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} predicate The function invoked per iteration.\n\t * @returns {boolean} Returns `true` if any element passes the predicate check,\n\t * else `false`.\n\t */\n\tfunction arraySome(array, predicate) {\n\t var index = -1,\n\t length = array ? array.length : 0;\n\t\n\t while (++index < length) {\n\t if (predicate(array[index], index, array)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.times` without support for iteratee shorthands\n\t * or max array length checks.\n\t *\n\t * @private\n\t * @param {number} n The number of times to invoke `iteratee`.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns the array of results.\n\t */\n\tfunction baseTimes(n, iteratee) {\n\t var index = -1,\n\t result = Array(n);\n\t\n\t while (++index < n) {\n\t result[index] = iteratee(index);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.unary` without support for storing metadata.\n\t *\n\t * @private\n\t * @param {Function} func The function to cap arguments for.\n\t * @returns {Function} Returns the new capped function.\n\t */\n\tfunction baseUnary(func) {\n\t return function(value) {\n\t return func(value);\n\t };\n\t}\n\t\n\t/**\n\t * Gets the value at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction getValue(object, key) {\n\t return object == null ? undefined : object[key];\n\t}\n\t\n\t/**\n\t * Checks if `value` is a host object in IE < 9.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n\t */\n\tfunction isHostObject(value) {\n\t // Many host objects are `Object` objects that can coerce to strings\n\t // despite having improperly defined `toString` methods.\n\t var result = false;\n\t if (value != null && typeof value.toString != 'function') {\n\t try {\n\t result = !!(value + '');\n\t } catch (e) {}\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Converts `map` to its key-value pairs.\n\t *\n\t * @private\n\t * @param {Object} map The map to convert.\n\t * @returns {Array} Returns the key-value pairs.\n\t */\n\tfunction mapToArray(map) {\n\t var index = -1,\n\t result = Array(map.size);\n\t\n\t map.forEach(function(value, key) {\n\t result[++index] = [key, value];\n\t });\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a unary function that invokes `func` with its argument transformed.\n\t *\n\t * @private\n\t * @param {Function} func The function to wrap.\n\t * @param {Function} transform The argument transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overArg(func, transform) {\n\t return function(arg) {\n\t return func(transform(arg));\n\t };\n\t}\n\t\n\t/**\n\t * Converts `set` to an array of its values.\n\t *\n\t * @private\n\t * @param {Object} set The set to convert.\n\t * @returns {Array} Returns the values.\n\t */\n\tfunction setToArray(set) {\n\t var index = -1,\n\t result = Array(set.size);\n\t\n\t set.forEach(function(value) {\n\t result[++index] = value;\n\t });\n\t return result;\n\t}\n\t\n\t/** Used for built-in method references. */\n\tvar arrayProto = Array.prototype,\n\t funcProto = Function.prototype,\n\t objectProto = Object.prototype;\n\t\n\t/** Used to detect overreaching core-js shims. */\n\tvar coreJsData = root['__core-js_shared__'];\n\t\n\t/** Used to detect methods masquerading as native. */\n\tvar maskSrcKey = (function() {\n\t var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n\t return uid ? ('Symbol(src)_1.' + uid) : '';\n\t}());\n\t\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\t\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty = objectProto.hasOwnProperty;\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/** Used to detect if a method is native. */\n\tvar reIsNative = RegExp('^' +\n\t funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n\t .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n\t);\n\t\n\t/** Built-in value references. */\n\tvar Symbol = root.Symbol,\n\t Uint8Array = root.Uint8Array,\n\t propertyIsEnumerable = objectProto.propertyIsEnumerable,\n\t splice = arrayProto.splice;\n\t\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeKeys = overArg(Object.keys, Object);\n\t\n\t/* Built-in method references that are verified to be native. */\n\tvar DataView = getNative(root, 'DataView'),\n\t Map = getNative(root, 'Map'),\n\t Promise = getNative(root, 'Promise'),\n\t Set = getNative(root, 'Set'),\n\t WeakMap = getNative(root, 'WeakMap'),\n\t nativeCreate = getNative(Object, 'create');\n\t\n\t/** Used to detect maps, sets, and weakmaps. */\n\tvar dataViewCtorString = toSource(DataView),\n\t mapCtorString = toSource(Map),\n\t promiseCtorString = toSource(Promise),\n\t setCtorString = toSource(Set),\n\t weakMapCtorString = toSource(WeakMap);\n\t\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto = Symbol ? Symbol.prototype : undefined,\n\t symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\t\n\t/**\n\t * Creates a hash object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Hash(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the hash.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Hash\n\t */\n\tfunction hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the hash.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Hash\n\t * @param {Object} hash The hash to modify.\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction hashDelete(key) {\n\t return this.has(key) && delete this.__data__[key];\n\t}\n\t\n\t/**\n\t * Gets the hash value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction hashGet(key) {\n\t var data = this.__data__;\n\t if (nativeCreate) {\n\t var result = data[key];\n\t return result === HASH_UNDEFINED ? undefined : result;\n\t }\n\t return hasOwnProperty.call(data, key) ? data[key] : undefined;\n\t}\n\t\n\t/**\n\t * Checks if a hash value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Hash\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction hashHas(key) {\n\t var data = this.__data__;\n\t return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n\t}\n\t\n\t/**\n\t * Sets the hash `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the hash instance.\n\t */\n\tfunction hashSet(key, value) {\n\t var data = this.__data__;\n\t data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n\t return this;\n\t}\n\t\n\t// Add methods to `Hash`.\n\tHash.prototype.clear = hashClear;\n\tHash.prototype['delete'] = hashDelete;\n\tHash.prototype.get = hashGet;\n\tHash.prototype.has = hashHas;\n\tHash.prototype.set = hashSet;\n\t\n\t/**\n\t * Creates an list cache object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction ListCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the list cache.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf ListCache\n\t */\n\tfunction listCacheClear() {\n\t this.__data__ = [];\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the list cache.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction listCacheDelete(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t return false;\n\t }\n\t var lastIndex = data.length - 1;\n\t if (index == lastIndex) {\n\t data.pop();\n\t } else {\n\t splice.call(data, index, 1);\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * Gets the list cache value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction listCacheGet(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t return index < 0 ? undefined : data[index][1];\n\t}\n\t\n\t/**\n\t * Checks if a list cache value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf ListCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction listCacheHas(key) {\n\t return assocIndexOf(this.__data__, key) > -1;\n\t}\n\t\n\t/**\n\t * Sets the list cache `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the list cache instance.\n\t */\n\tfunction listCacheSet(key, value) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t data.push([key, value]);\n\t } else {\n\t data[index][1] = value;\n\t }\n\t return this;\n\t}\n\t\n\t// Add methods to `ListCache`.\n\tListCache.prototype.clear = listCacheClear;\n\tListCache.prototype['delete'] = listCacheDelete;\n\tListCache.prototype.get = listCacheGet;\n\tListCache.prototype.has = listCacheHas;\n\tListCache.prototype.set = listCacheSet;\n\t\n\t/**\n\t * Creates a map cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction MapCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the map.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf MapCache\n\t */\n\tfunction mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map || ListCache),\n\t 'string': new Hash\n\t };\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the map.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction mapCacheDelete(key) {\n\t return getMapData(this, key)['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the map value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction mapCacheGet(key) {\n\t return getMapData(this, key).get(key);\n\t}\n\t\n\t/**\n\t * Checks if a map value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf MapCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction mapCacheHas(key) {\n\t return getMapData(this, key).has(key);\n\t}\n\t\n\t/**\n\t * Sets the map `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the map cache instance.\n\t */\n\tfunction mapCacheSet(key, value) {\n\t getMapData(this, key).set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `MapCache`.\n\tMapCache.prototype.clear = mapCacheClear;\n\tMapCache.prototype['delete'] = mapCacheDelete;\n\tMapCache.prototype.get = mapCacheGet;\n\tMapCache.prototype.has = mapCacheHas;\n\tMapCache.prototype.set = mapCacheSet;\n\t\n\t/**\n\t *\n\t * Creates an array cache object to store unique values.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [values] The values to cache.\n\t */\n\tfunction SetCache(values) {\n\t var index = -1,\n\t length = values ? values.length : 0;\n\t\n\t this.__data__ = new MapCache;\n\t while (++index < length) {\n\t this.add(values[index]);\n\t }\n\t}\n\t\n\t/**\n\t * Adds `value` to the array cache.\n\t *\n\t * @private\n\t * @name add\n\t * @memberOf SetCache\n\t * @alias push\n\t * @param {*} value The value to cache.\n\t * @returns {Object} Returns the cache instance.\n\t */\n\tfunction setCacheAdd(value) {\n\t this.__data__.set(value, HASH_UNDEFINED);\n\t return this;\n\t}\n\t\n\t/**\n\t * Checks if `value` is in the array cache.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf SetCache\n\t * @param {*} value The value to search for.\n\t * @returns {number} Returns `true` if `value` is found, else `false`.\n\t */\n\tfunction setCacheHas(value) {\n\t return this.__data__.has(value);\n\t}\n\t\n\t// Add methods to `SetCache`.\n\tSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n\tSetCache.prototype.has = setCacheHas;\n\t\n\t/**\n\t * Creates a stack cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Stack(entries) {\n\t this.__data__ = new ListCache(entries);\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the stack.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Stack\n\t */\n\tfunction stackClear() {\n\t this.__data__ = new ListCache;\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the stack.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction stackDelete(key) {\n\t return this.__data__['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the stack value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction stackGet(key) {\n\t return this.__data__.get(key);\n\t}\n\t\n\t/**\n\t * Checks if a stack value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Stack\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction stackHas(key) {\n\t return this.__data__.has(key);\n\t}\n\t\n\t/**\n\t * Sets the stack `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the stack cache instance.\n\t */\n\tfunction stackSet(key, value) {\n\t var cache = this.__data__;\n\t if (cache instanceof ListCache) {\n\t var pairs = cache.__data__;\n\t if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n\t pairs.push([key, value]);\n\t return this;\n\t }\n\t cache = this.__data__ = new MapCache(pairs);\n\t }\n\t cache.set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `Stack`.\n\tStack.prototype.clear = stackClear;\n\tStack.prototype['delete'] = stackDelete;\n\tStack.prototype.get = stackGet;\n\tStack.prototype.has = stackHas;\n\tStack.prototype.set = stackSet;\n\t\n\t/**\n\t * Creates an array of the enumerable property names of the array-like `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @param {boolean} inherited Specify returning inherited property names.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction arrayLikeKeys(value, inherited) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t // Safari 9 makes `arguments.length` enumerable in strict mode.\n\t var result = (isArray(value) || isArguments(value))\n\t ? baseTimes(value.length, String)\n\t : [];\n\t\n\t var length = result.length,\n\t skipIndexes = !!length;\n\t\n\t for (var key in value) {\n\t if ((inherited || hasOwnProperty.call(value, key)) &&\n\t !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Gets the index at which the `key` is found in `array` of key-value pairs.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} key The key to search for.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction assocIndexOf(array, key) {\n\t var length = array.length;\n\t while (length--) {\n\t if (eq(array[length][0], key)) {\n\t return length;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `getTag`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tfunction baseGetTag(value) {\n\t return objectToString.call(value);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isEqual` which supports partial comparisons\n\t * and tracks traversed objects.\n\t *\n\t * @private\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @param {Function} [customizer] The function to customize comparisons.\n\t * @param {boolean} [bitmask] The bitmask of comparison flags.\n\t * The bitmask may be composed of the following flags:\n\t * 1 - Unordered comparison\n\t * 2 - Partial comparison\n\t * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t */\n\tfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n\t if (value === other) {\n\t return true;\n\t }\n\t if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n\t return value !== value && other !== other;\n\t }\n\t return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqual` for arrays and objects which performs\n\t * deep comparisons and tracks traversed objects enabling objects with circular\n\t * references to be compared.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} [customizer] The function to customize comparisons.\n\t * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n\t var objIsArr = isArray(object),\n\t othIsArr = isArray(other),\n\t objTag = arrayTag,\n\t othTag = arrayTag;\n\t\n\t if (!objIsArr) {\n\t objTag = getTag(object);\n\t objTag = objTag == argsTag ? objectTag : objTag;\n\t }\n\t if (!othIsArr) {\n\t othTag = getTag(other);\n\t othTag = othTag == argsTag ? objectTag : othTag;\n\t }\n\t var objIsObj = objTag == objectTag && !isHostObject(object),\n\t othIsObj = othTag == objectTag && !isHostObject(other),\n\t isSameTag = objTag == othTag;\n\t\n\t if (isSameTag && !objIsObj) {\n\t stack || (stack = new Stack);\n\t return (objIsArr || isTypedArray(object))\n\t ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n\t : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n\t }\n\t if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n\t var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n\t othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\t\n\t if (objIsWrapped || othIsWrapped) {\n\t var objUnwrapped = objIsWrapped ? object.value() : object,\n\t othUnwrapped = othIsWrapped ? other.value() : other;\n\t\n\t stack || (stack = new Stack);\n\t return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n\t }\n\t }\n\t if (!isSameTag) {\n\t return false;\n\t }\n\t stack || (stack = new Stack);\n\t return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isNative` without bad shim checks.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a native function,\n\t * else `false`.\n\t */\n\tfunction baseIsNative(value) {\n\t if (!isObject(value) || isMasked(value)) {\n\t return false;\n\t }\n\t var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n\t return pattern.test(toSource(value));\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isTypedArray` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t */\n\tfunction baseIsTypedArray(value) {\n\t return isObjectLike(value) &&\n\t isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n\t}\n\t\n\t/**\n\t * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeys(object) {\n\t if (!isPrototype(object)) {\n\t return nativeKeys(object);\n\t }\n\t var result = [];\n\t for (var key in Object(object)) {\n\t if (hasOwnProperty.call(object, key) && key != 'constructor') {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for arrays with support for\n\t * partial deep comparisons.\n\t *\n\t * @private\n\t * @param {Array} array The array to compare.\n\t * @param {Array} other The other array to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `array` and `other` objects.\n\t * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n\t */\n\tfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n\t arrLength = array.length,\n\t othLength = other.length;\n\t\n\t if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n\t return false;\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(array);\n\t if (stacked && stack.get(other)) {\n\t return stacked == other;\n\t }\n\t var index = -1,\n\t result = true,\n\t seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\t\n\t stack.set(array, other);\n\t stack.set(other, array);\n\t\n\t // Ignore non-index properties.\n\t while (++index < arrLength) {\n\t var arrValue = array[index],\n\t othValue = other[index];\n\t\n\t if (customizer) {\n\t var compared = isPartial\n\t ? customizer(othValue, arrValue, index, other, array, stack)\n\t : customizer(arrValue, othValue, index, array, other, stack);\n\t }\n\t if (compared !== undefined) {\n\t if (compared) {\n\t continue;\n\t }\n\t result = false;\n\t break;\n\t }\n\t // Recursively compare arrays (susceptible to call stack limits).\n\t if (seen) {\n\t if (!arraySome(other, function(othValue, othIndex) {\n\t if (!seen.has(othIndex) &&\n\t (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n\t return seen.add(othIndex);\n\t }\n\t })) {\n\t result = false;\n\t break;\n\t }\n\t } else if (!(\n\t arrValue === othValue ||\n\t equalFunc(arrValue, othValue, customizer, bitmask, stack)\n\t )) {\n\t result = false;\n\t break;\n\t }\n\t }\n\t stack['delete'](array);\n\t stack['delete'](other);\n\t return result;\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for comparing objects of\n\t * the same `toStringTag`.\n\t *\n\t * **Note:** This function only supports comparing values with tags of\n\t * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {string} tag The `toStringTag` of the objects to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n\t switch (tag) {\n\t case dataViewTag:\n\t if ((object.byteLength != other.byteLength) ||\n\t (object.byteOffset != other.byteOffset)) {\n\t return false;\n\t }\n\t object = object.buffer;\n\t other = other.buffer;\n\t\n\t case arrayBufferTag:\n\t if ((object.byteLength != other.byteLength) ||\n\t !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n\t return false;\n\t }\n\t return true;\n\t\n\t case boolTag:\n\t case dateTag:\n\t case numberTag:\n\t // Coerce booleans to `1` or `0` and dates to milliseconds.\n\t // Invalid dates are coerced to `NaN`.\n\t return eq(+object, +other);\n\t\n\t case errorTag:\n\t return object.name == other.name && object.message == other.message;\n\t\n\t case regexpTag:\n\t case stringTag:\n\t // Coerce regexes to strings and treat strings, primitives and objects,\n\t // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n\t // for more details.\n\t return object == (other + '');\n\t\n\t case mapTag:\n\t var convert = mapToArray;\n\t\n\t case setTag:\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n\t convert || (convert = setToArray);\n\t\n\t if (object.size != other.size && !isPartial) {\n\t return false;\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(object);\n\t if (stacked) {\n\t return stacked == other;\n\t }\n\t bitmask |= UNORDERED_COMPARE_FLAG;\n\t\n\t // Recursively compare objects (susceptible to call stack limits).\n\t stack.set(object, other);\n\t var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n\t stack['delete'](object);\n\t return result;\n\t\n\t case symbolTag:\n\t if (symbolValueOf) {\n\t return symbolValueOf.call(object) == symbolValueOf.call(other);\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for objects with support for\n\t * partial deep comparisons.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n\t objProps = keys(object),\n\t objLength = objProps.length,\n\t othProps = keys(other),\n\t othLength = othProps.length;\n\t\n\t if (objLength != othLength && !isPartial) {\n\t return false;\n\t }\n\t var index = objLength;\n\t while (index--) {\n\t var key = objProps[index];\n\t if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n\t return false;\n\t }\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(object);\n\t if (stacked && stack.get(other)) {\n\t return stacked == other;\n\t }\n\t var result = true;\n\t stack.set(object, other);\n\t stack.set(other, object);\n\t\n\t var skipCtor = isPartial;\n\t while (++index < objLength) {\n\t key = objProps[index];\n\t var objValue = object[key],\n\t othValue = other[key];\n\t\n\t if (customizer) {\n\t var compared = isPartial\n\t ? customizer(othValue, objValue, key, other, object, stack)\n\t : customizer(objValue, othValue, key, object, other, stack);\n\t }\n\t // Recursively compare objects (susceptible to call stack limits).\n\t if (!(compared === undefined\n\t ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n\t : compared\n\t )) {\n\t result = false;\n\t break;\n\t }\n\t skipCtor || (skipCtor = key == 'constructor');\n\t }\n\t if (result && !skipCtor) {\n\t var objCtor = object.constructor,\n\t othCtor = other.constructor;\n\t\n\t // Non `Object` object instances with different constructors are not equal.\n\t if (objCtor != othCtor &&\n\t ('constructor' in object && 'constructor' in other) &&\n\t !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n\t typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n\t result = false;\n\t }\n\t }\n\t stack['delete'](object);\n\t stack['delete'](other);\n\t return result;\n\t}\n\t\n\t/**\n\t * Gets the data for `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to query.\n\t * @param {string} key The reference key.\n\t * @returns {*} Returns the map data.\n\t */\n\tfunction getMapData(map, key) {\n\t var data = map.__data__;\n\t return isKeyable(key)\n\t ? data[typeof key == 'string' ? 'string' : 'hash']\n\t : data.map;\n\t}\n\t\n\t/**\n\t * Gets the native function at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the method to get.\n\t * @returns {*} Returns the function if it's native, else `undefined`.\n\t */\n\tfunction getNative(object, key) {\n\t var value = getValue(object, key);\n\t return baseIsNative(value) ? value : undefined;\n\t}\n\t\n\t/**\n\t * Gets the `toStringTag` of `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tvar getTag = baseGetTag;\n\t\n\t// Fallback for data views, maps, sets, and weak maps in IE 11,\n\t// for data views in Edge < 14, and promises in Node.js.\n\tif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n\t (Map && getTag(new Map) != mapTag) ||\n\t (Promise && getTag(Promise.resolve()) != promiseTag) ||\n\t (Set && getTag(new Set) != setTag) ||\n\t (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n\t getTag = function(value) {\n\t var result = objectToString.call(value),\n\t Ctor = result == objectTag ? value.constructor : undefined,\n\t ctorString = Ctor ? toSource(Ctor) : undefined;\n\t\n\t if (ctorString) {\n\t switch (ctorString) {\n\t case dataViewCtorString: return dataViewTag;\n\t case mapCtorString: return mapTag;\n\t case promiseCtorString: return promiseTag;\n\t case setCtorString: return setTag;\n\t case weakMapCtorString: return weakMapTag;\n\t }\n\t }\n\t return result;\n\t };\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like index.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n\t * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n\t */\n\tfunction isIndex(value, length) {\n\t length = length == null ? MAX_SAFE_INTEGER : length;\n\t return !!length &&\n\t (typeof value == 'number' || reIsUint.test(value)) &&\n\t (value > -1 && value % 1 == 0 && value < length);\n\t}\n\t\n\t/**\n\t * Checks if `value` is suitable for use as unique object key.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n\t */\n\tfunction isKeyable(value) {\n\t var type = typeof value;\n\t return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n\t ? (value !== '__proto__')\n\t : (value === null);\n\t}\n\t\n\t/**\n\t * Checks if `func` has its source masked.\n\t *\n\t * @private\n\t * @param {Function} func The function to check.\n\t * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n\t */\n\tfunction isMasked(func) {\n\t return !!maskSrcKey && (maskSrcKey in func);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a prototype object.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n\t */\n\tfunction isPrototype(value) {\n\t var Ctor = value && value.constructor,\n\t proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\t\n\t return value === proto;\n\t}\n\t\n\t/**\n\t * Converts `func` to its source code.\n\t *\n\t * @private\n\t * @param {Function} func The function to process.\n\t * @returns {string} Returns the source code.\n\t */\n\tfunction toSource(func) {\n\t if (func != null) {\n\t try {\n\t return funcToString.call(func);\n\t } catch (e) {}\n\t try {\n\t return (func + '');\n\t } catch (e) {}\n\t }\n\t return '';\n\t}\n\t\n\t/**\n\t * Performs a\n\t * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * comparison between two values to determine if they are equivalent.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.eq(object, object);\n\t * // => true\n\t *\n\t * _.eq(object, other);\n\t * // => false\n\t *\n\t * _.eq('a', 'a');\n\t * // => true\n\t *\n\t * _.eq('a', Object('a'));\n\t * // => false\n\t *\n\t * _.eq(NaN, NaN);\n\t * // => true\n\t */\n\tfunction eq(value, other) {\n\t return value === other || (value !== value && other !== other);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely an `arguments` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArguments(function() { return arguments; }());\n\t * // => true\n\t *\n\t * _.isArguments([1, 2, 3]);\n\t * // => false\n\t */\n\tfunction isArguments(value) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n\t (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as an `Array` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n\t * @example\n\t *\n\t * _.isArray([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArray(document.body.children);\n\t * // => false\n\t *\n\t * _.isArray('abc');\n\t * // => false\n\t *\n\t * _.isArray(_.noop);\n\t * // => false\n\t */\n\tvar isArray = Array.isArray;\n\t\n\t/**\n\t * Checks if `value` is array-like. A value is considered array-like if it's\n\t * not a function and has a `value.length` that's an integer greater than or\n\t * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n\t * @example\n\t *\n\t * _.isArrayLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLike(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLike('abc');\n\t * // => true\n\t *\n\t * _.isArrayLike(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLike(value) {\n\t return value != null && isLength(value.length) && !isFunction(value);\n\t}\n\t\n\t/**\n\t * This method is like `_.isArrayLike` except that it also checks if `value`\n\t * is an object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array-like object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArrayLikeObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject('abc');\n\t * // => false\n\t *\n\t * _.isArrayLikeObject(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLikeObject(value) {\n\t return isObjectLike(value) && isArrayLike(value);\n\t}\n\t\n\t/**\n\t * Performs a deep comparison between two values to determine if they are\n\t * equivalent.\n\t *\n\t * **Note:** This method supports comparing arrays, array buffers, booleans,\n\t * date objects, error objects, maps, numbers, `Object` objects, regexes,\n\t * sets, strings, symbols, and typed arrays. `Object` objects are compared\n\t * by their own, not inherited, enumerable properties. Functions and DOM\n\t * nodes are **not** supported.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.isEqual(object, other);\n\t * // => true\n\t *\n\t * object === other;\n\t * // => false\n\t */\n\tfunction isEqual(value, other) {\n\t return baseIsEqual(value, other);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a `Function` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n\t * @example\n\t *\n\t * _.isFunction(_);\n\t * // => true\n\t *\n\t * _.isFunction(/abc/);\n\t * // => false\n\t */\n\tfunction isFunction(value) {\n\t // The use of `Object#toString` avoids issues with the `typeof` operator\n\t // in Safari 8-9 which returns 'object' for typed array and other constructors.\n\t var tag = isObject(value) ? objectToString.call(value) : '';\n\t return tag == funcTag || tag == genTag;\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like length.\n\t *\n\t * **Note:** This method is loosely based on\n\t * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n\t * @example\n\t *\n\t * _.isLength(3);\n\t * // => true\n\t *\n\t * _.isLength(Number.MIN_VALUE);\n\t * // => false\n\t *\n\t * _.isLength(Infinity);\n\t * // => false\n\t *\n\t * _.isLength('3');\n\t * // => false\n\t */\n\tfunction isLength(value) {\n\t return typeof value == 'number' &&\n\t value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n\t}\n\t\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject(value) {\n\t var type = typeof value;\n\t return !!value && (type == 'object' || type == 'function');\n\t}\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a typed array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t * @example\n\t *\n\t * _.isTypedArray(new Uint8Array);\n\t * // => true\n\t *\n\t * _.isTypedArray([]);\n\t * // => false\n\t */\n\tvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\t\n\t/**\n\t * Creates an array of the own enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects. See the\n\t * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * for more details.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keys(new Foo);\n\t * // => ['a', 'b'] (iteration order is not guaranteed)\n\t *\n\t * _.keys('hi');\n\t * // => ['0', '1']\n\t */\n\tfunction keys(object) {\n\t return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n\t}\n\t\n\tmodule.exports = isEqual;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(/*! ./../webpack/buildin/module.js */ 23)(module)))\n\n/***/ },\n/* 100 */\n/*!*****************************************!*\\\n !*** ./~/lodash.isplainobject/index.js ***!\n \\*****************************************/\n/***/ function(module, exports) {\n\n\t/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** `Object#toString` result references. */\n\tvar objectTag = '[object Object]';\n\t\n\t/**\n\t * Checks if `value` is a host object in IE < 9.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n\t */\n\tfunction isHostObject(value) {\n\t // Many host objects are `Object` objects that can coerce to strings\n\t // despite having improperly defined `toString` methods.\n\t var result = false;\n\t if (value != null && typeof value.toString != 'function') {\n\t try {\n\t result = !!(value + '');\n\t } catch (e) {}\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a unary function that invokes `func` with its argument transformed.\n\t *\n\t * @private\n\t * @param {Function} func The function to wrap.\n\t * @param {Function} transform The argument transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overArg(func, transform) {\n\t return function(arg) {\n\t return func(transform(arg));\n\t };\n\t}\n\t\n\t/** Used for built-in method references. */\n\tvar funcProto = Function.prototype,\n\t objectProto = Object.prototype;\n\t\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\t\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty = objectProto.hasOwnProperty;\n\t\n\t/** Used to infer the `Object` constructor. */\n\tvar objectCtorString = funcToString.call(Object);\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/** Built-in value references. */\n\tvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is a plain object, that is, an object created by the\n\t * `Object` constructor or one with a `[[Prototype]]` of `null`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.8.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * }\n\t *\n\t * _.isPlainObject(new Foo);\n\t * // => false\n\t *\n\t * _.isPlainObject([1, 2, 3]);\n\t * // => false\n\t *\n\t * _.isPlainObject({ 'x': 0, 'y': 0 });\n\t * // => true\n\t *\n\t * _.isPlainObject(Object.create(null));\n\t * // => true\n\t */\n\tfunction isPlainObject(value) {\n\t if (!isObjectLike(value) ||\n\t objectToString.call(value) != objectTag || isHostObject(value)) {\n\t return false;\n\t }\n\t var proto = getPrototype(value);\n\t if (proto === null) {\n\t return true;\n\t }\n\t var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n\t return (typeof Ctor == 'function' &&\n\t Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n\t}\n\t\n\tmodule.exports = isPlainObject;\n\n\n/***/ },\n/* 101 */\n/*!********************************!*\\\n !*** ./~/lodash.once/index.js ***!\n \\********************************/\n/***/ function(module, exports) {\n\n\t/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** Used as the `TypeError` message for \"Functions\" methods. */\n\tvar FUNC_ERROR_TEXT = 'Expected a function';\n\t\n\t/** Used as references for various `Number` constants. */\n\tvar INFINITY = 1 / 0,\n\t MAX_INTEGER = 1.7976931348623157e+308,\n\t NAN = 0 / 0;\n\t\n\t/** `Object#toString` result references. */\n\tvar symbolTag = '[object Symbol]';\n\t\n\t/** Used to match leading and trailing whitespace. */\n\tvar reTrim = /^\\s+|\\s+$/g;\n\t\n\t/** Used to detect bad signed hexadecimal string values. */\n\tvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\t\n\t/** Used to detect binary string values. */\n\tvar reIsBinary = /^0b[01]+$/i;\n\t\n\t/** Used to detect octal string values. */\n\tvar reIsOctal = /^0o[0-7]+$/i;\n\t\n\t/** Built-in method references without a dependency on `root`. */\n\tvar freeParseInt = parseInt;\n\t\n\t/** Used for built-in method references. */\n\tvar objectProto = Object.prototype;\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/**\n\t * Creates a function that invokes `func`, with the `this` binding and arguments\n\t * of the created function, while it's called less than `n` times. Subsequent\n\t * calls to the created function return the result of the last `func` invocation.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Function\n\t * @param {number} n The number of calls at which `func` is no longer invoked.\n\t * @param {Function} func The function to restrict.\n\t * @returns {Function} Returns the new restricted function.\n\t * @example\n\t *\n\t * jQuery(element).on('click', _.before(5, addContactToList));\n\t * // => Allows adding up to 4 contacts to the list.\n\t */\n\tfunction before(n, func) {\n\t var result;\n\t if (typeof func != 'function') {\n\t throw new TypeError(FUNC_ERROR_TEXT);\n\t }\n\t n = toInteger(n);\n\t return function() {\n\t if (--n > 0) {\n\t result = func.apply(this, arguments);\n\t }\n\t if (n <= 1) {\n\t func = undefined;\n\t }\n\t return result;\n\t };\n\t}\n\t\n\t/**\n\t * Creates a function that is restricted to invoking `func` once. Repeat calls\n\t * to the function return the value of the first invocation. The `func` is\n\t * invoked with the `this` binding and arguments of the created function.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Function\n\t * @param {Function} func The function to restrict.\n\t * @returns {Function} Returns the new restricted function.\n\t * @example\n\t *\n\t * var initialize = _.once(createApplication);\n\t * initialize();\n\t * initialize();\n\t * // => `createApplication` is invoked once\n\t */\n\tfunction once(func) {\n\t return before(2, func);\n\t}\n\t\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject(value) {\n\t var type = typeof value;\n\t return !!value && (type == 'object' || type == 'function');\n\t}\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a `Symbol` primitive or object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n\t * @example\n\t *\n\t * _.isSymbol(Symbol.iterator);\n\t * // => true\n\t *\n\t * _.isSymbol('abc');\n\t * // => false\n\t */\n\tfunction isSymbol(value) {\n\t return typeof value == 'symbol' ||\n\t (isObjectLike(value) && objectToString.call(value) == symbolTag);\n\t}\n\t\n\t/**\n\t * Converts `value` to a finite number.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.12.0\n\t * @category Lang\n\t * @param {*} value The value to convert.\n\t * @returns {number} Returns the converted number.\n\t * @example\n\t *\n\t * _.toFinite(3.2);\n\t * // => 3.2\n\t *\n\t * _.toFinite(Number.MIN_VALUE);\n\t * // => 5e-324\n\t *\n\t * _.toFinite(Infinity);\n\t * // => 1.7976931348623157e+308\n\t *\n\t * _.toFinite('3.2');\n\t * // => 3.2\n\t */\n\tfunction toFinite(value) {\n\t if (!value) {\n\t return value === 0 ? value : 0;\n\t }\n\t value = toNumber(value);\n\t if (value === INFINITY || value === -INFINITY) {\n\t var sign = (value < 0 ? -1 : 1);\n\t return sign * MAX_INTEGER;\n\t }\n\t return value === value ? value : 0;\n\t}\n\t\n\t/**\n\t * Converts `value` to an integer.\n\t *\n\t * **Note:** This method is loosely based on\n\t * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to convert.\n\t * @returns {number} Returns the converted integer.\n\t * @example\n\t *\n\t * _.toInteger(3.2);\n\t * // => 3\n\t *\n\t * _.toInteger(Number.MIN_VALUE);\n\t * // => 0\n\t *\n\t * _.toInteger(Infinity);\n\t * // => 1.7976931348623157e+308\n\t *\n\t * _.toInteger('3.2');\n\t * // => 3\n\t */\n\tfunction toInteger(value) {\n\t var result = toFinite(value),\n\t remainder = result % 1;\n\t\n\t return result === result ? (remainder ? result - remainder : result) : 0;\n\t}\n\t\n\t/**\n\t * Converts `value` to a number.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to process.\n\t * @returns {number} Returns the number.\n\t * @example\n\t *\n\t * _.toNumber(3.2);\n\t * // => 3.2\n\t *\n\t * _.toNumber(Number.MIN_VALUE);\n\t * // => 5e-324\n\t *\n\t * _.toNumber(Infinity);\n\t * // => Infinity\n\t *\n\t * _.toNumber('3.2');\n\t * // => 3.2\n\t */\n\tfunction toNumber(value) {\n\t if (typeof value == 'number') {\n\t return value;\n\t }\n\t if (isSymbol(value)) {\n\t return NAN;\n\t }\n\t if (isObject(value)) {\n\t var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n\t value = isObject(other) ? (other + '') : other;\n\t }\n\t if (typeof value != 'string') {\n\t return value === 0 ? value : +value;\n\t }\n\t value = value.replace(reTrim, '');\n\t var isBinary = reIsBinary.test(value);\n\t return (isBinary || reIsOctal.test(value))\n\t ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n\t : (reIsBadHex.test(value) ? NAN : +value);\n\t}\n\t\n\tmodule.exports = once;\n\n\n/***/ },\n/* 102 */\n/*!**********************************!*\\\n !*** ./~/lodash.result/index.js ***!\n \\**********************************/\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** Used as the `TypeError` message for \"Functions\" methods. */\n\tvar FUNC_ERROR_TEXT = 'Expected a function';\n\t\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\t\n\t/** Used as references for various `Number` constants. */\n\tvar INFINITY = 1 / 0;\n\t\n\t/** `Object#toString` result references. */\n\tvar funcTag = '[object Function]',\n\t genTag = '[object GeneratorFunction]',\n\t symbolTag = '[object Symbol]';\n\t\n\t/** Used to match property names within property paths. */\n\tvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n\t reIsPlainProp = /^\\w*$/,\n\t reLeadingDot = /^\\./,\n\t rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\t\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\t\n\t/** Used to match backslashes in property paths. */\n\tvar reEscapeChar = /\\\\(\\\\)?/g;\n\t\n\t/** Used to detect host constructors (Safari). */\n\tvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\t\n\t/** Detect free variable `global` from Node.js. */\n\tvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\t\n\t/** Detect free variable `self`. */\n\tvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\t\n\t/** Used as a reference to the global object. */\n\tvar root = freeGlobal || freeSelf || Function('return this')();\n\t\n\t/**\n\t * Gets the value at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction getValue(object, key) {\n\t return object == null ? undefined : object[key];\n\t}\n\t\n\t/**\n\t * Checks if `value` is a host object in IE < 9.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n\t */\n\tfunction isHostObject(value) {\n\t // Many host objects are `Object` objects that can coerce to strings\n\t // despite having improperly defined `toString` methods.\n\t var result = false;\n\t if (value != null && typeof value.toString != 'function') {\n\t try {\n\t result = !!(value + '');\n\t } catch (e) {}\n\t }\n\t return result;\n\t}\n\t\n\t/** Used for built-in method references. */\n\tvar arrayProto = Array.prototype,\n\t funcProto = Function.prototype,\n\t objectProto = Object.prototype;\n\t\n\t/** Used to detect overreaching core-js shims. */\n\tvar coreJsData = root['__core-js_shared__'];\n\t\n\t/** Used to detect methods masquerading as native. */\n\tvar maskSrcKey = (function() {\n\t var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n\t return uid ? ('Symbol(src)_1.' + uid) : '';\n\t}());\n\t\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\t\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty = objectProto.hasOwnProperty;\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/** Used to detect if a method is native. */\n\tvar reIsNative = RegExp('^' +\n\t funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n\t .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n\t);\n\t\n\t/** Built-in value references. */\n\tvar Symbol = root.Symbol,\n\t splice = arrayProto.splice;\n\t\n\t/* Built-in method references that are verified to be native. */\n\tvar Map = getNative(root, 'Map'),\n\t nativeCreate = getNative(Object, 'create');\n\t\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto = Symbol ? Symbol.prototype : undefined,\n\t symbolToString = symbolProto ? symbolProto.toString : undefined;\n\t\n\t/**\n\t * Creates a hash object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Hash(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the hash.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Hash\n\t */\n\tfunction hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the hash.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Hash\n\t * @param {Object} hash The hash to modify.\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction hashDelete(key) {\n\t return this.has(key) && delete this.__data__[key];\n\t}\n\t\n\t/**\n\t * Gets the hash value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction hashGet(key) {\n\t var data = this.__data__;\n\t if (nativeCreate) {\n\t var result = data[key];\n\t return result === HASH_UNDEFINED ? undefined : result;\n\t }\n\t return hasOwnProperty.call(data, key) ? data[key] : undefined;\n\t}\n\t\n\t/**\n\t * Checks if a hash value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Hash\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction hashHas(key) {\n\t var data = this.__data__;\n\t return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n\t}\n\t\n\t/**\n\t * Sets the hash `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the hash instance.\n\t */\n\tfunction hashSet(key, value) {\n\t var data = this.__data__;\n\t data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n\t return this;\n\t}\n\t\n\t// Add methods to `Hash`.\n\tHash.prototype.clear = hashClear;\n\tHash.prototype['delete'] = hashDelete;\n\tHash.prototype.get = hashGet;\n\tHash.prototype.has = hashHas;\n\tHash.prototype.set = hashSet;\n\t\n\t/**\n\t * Creates an list cache object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction ListCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the list cache.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf ListCache\n\t */\n\tfunction listCacheClear() {\n\t this.__data__ = [];\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the list cache.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction listCacheDelete(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t return false;\n\t }\n\t var lastIndex = data.length - 1;\n\t if (index == lastIndex) {\n\t data.pop();\n\t } else {\n\t splice.call(data, index, 1);\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * Gets the list cache value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction listCacheGet(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t return index < 0 ? undefined : data[index][1];\n\t}\n\t\n\t/**\n\t * Checks if a list cache value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf ListCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction listCacheHas(key) {\n\t return assocIndexOf(this.__data__, key) > -1;\n\t}\n\t\n\t/**\n\t * Sets the list cache `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the list cache instance.\n\t */\n\tfunction listCacheSet(key, value) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t data.push([key, value]);\n\t } else {\n\t data[index][1] = value;\n\t }\n\t return this;\n\t}\n\t\n\t// Add methods to `ListCache`.\n\tListCache.prototype.clear = listCacheClear;\n\tListCache.prototype['delete'] = listCacheDelete;\n\tListCache.prototype.get = listCacheGet;\n\tListCache.prototype.has = listCacheHas;\n\tListCache.prototype.set = listCacheSet;\n\t\n\t/**\n\t * Creates a map cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction MapCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the map.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf MapCache\n\t */\n\tfunction mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map || ListCache),\n\t 'string': new Hash\n\t };\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the map.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction mapCacheDelete(key) {\n\t return getMapData(this, key)['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the map value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction mapCacheGet(key) {\n\t return getMapData(this, key).get(key);\n\t}\n\t\n\t/**\n\t * Checks if a map value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf MapCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction mapCacheHas(key) {\n\t return getMapData(this, key).has(key);\n\t}\n\t\n\t/**\n\t * Sets the map `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the map cache instance.\n\t */\n\tfunction mapCacheSet(key, value) {\n\t getMapData(this, key).set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `MapCache`.\n\tMapCache.prototype.clear = mapCacheClear;\n\tMapCache.prototype['delete'] = mapCacheDelete;\n\tMapCache.prototype.get = mapCacheGet;\n\tMapCache.prototype.has = mapCacheHas;\n\tMapCache.prototype.set = mapCacheSet;\n\t\n\t/**\n\t * Gets the index at which the `key` is found in `array` of key-value pairs.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} key The key to search for.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction assocIndexOf(array, key) {\n\t var length = array.length;\n\t while (length--) {\n\t if (eq(array[length][0], key)) {\n\t return length;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isNative` without bad shim checks.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a native function,\n\t * else `false`.\n\t */\n\tfunction baseIsNative(value) {\n\t if (!isObject(value) || isMasked(value)) {\n\t return false;\n\t }\n\t var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n\t return pattern.test(toSource(value));\n\t}\n\t\n\t/**\n\t * The base implementation of `_.toString` which doesn't convert nullish\n\t * values to empty strings.\n\t *\n\t * @private\n\t * @param {*} value The value to process.\n\t * @returns {string} Returns the string.\n\t */\n\tfunction baseToString(value) {\n\t // Exit early for strings to avoid a performance hit in some environments.\n\t if (typeof value == 'string') {\n\t return value;\n\t }\n\t if (isSymbol(value)) {\n\t return symbolToString ? symbolToString.call(value) : '';\n\t }\n\t var result = (value + '');\n\t return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n\t}\n\t\n\t/**\n\t * Casts `value` to a path array if it's not one.\n\t *\n\t * @private\n\t * @param {*} value The value to inspect.\n\t * @returns {Array} Returns the cast property path array.\n\t */\n\tfunction castPath(value) {\n\t return isArray(value) ? value : stringToPath(value);\n\t}\n\t\n\t/**\n\t * Gets the data for `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to query.\n\t * @param {string} key The reference key.\n\t * @returns {*} Returns the map data.\n\t */\n\tfunction getMapData(map, key) {\n\t var data = map.__data__;\n\t return isKeyable(key)\n\t ? data[typeof key == 'string' ? 'string' : 'hash']\n\t : data.map;\n\t}\n\t\n\t/**\n\t * Gets the native function at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the method to get.\n\t * @returns {*} Returns the function if it's native, else `undefined`.\n\t */\n\tfunction getNative(object, key) {\n\t var value = getValue(object, key);\n\t return baseIsNative(value) ? value : undefined;\n\t}\n\t\n\t/**\n\t * Checks if `value` is a property name and not a property path.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {Object} [object] The object to query keys on.\n\t * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n\t */\n\tfunction isKey(value, object) {\n\t if (isArray(value)) {\n\t return false;\n\t }\n\t var type = typeof value;\n\t if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n\t value == null || isSymbol(value)) {\n\t return true;\n\t }\n\t return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n\t (object != null && value in Object(object));\n\t}\n\t\n\t/**\n\t * Checks if `value` is suitable for use as unique object key.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n\t */\n\tfunction isKeyable(value) {\n\t var type = typeof value;\n\t return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n\t ? (value !== '__proto__')\n\t : (value === null);\n\t}\n\t\n\t/**\n\t * Checks if `func` has its source masked.\n\t *\n\t * @private\n\t * @param {Function} func The function to check.\n\t * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n\t */\n\tfunction isMasked(func) {\n\t return !!maskSrcKey && (maskSrcKey in func);\n\t}\n\t\n\t/**\n\t * Converts `string` to a property path array.\n\t *\n\t * @private\n\t * @param {string} string The string to convert.\n\t * @returns {Array} Returns the property path array.\n\t */\n\tvar stringToPath = memoize(function(string) {\n\t string = toString(string);\n\t\n\t var result = [];\n\t if (reLeadingDot.test(string)) {\n\t result.push('');\n\t }\n\t string.replace(rePropName, function(match, number, quote, string) {\n\t result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n\t });\n\t return result;\n\t});\n\t\n\t/**\n\t * Converts `value` to a string key if it's not a string or symbol.\n\t *\n\t * @private\n\t * @param {*} value The value to inspect.\n\t * @returns {string|symbol} Returns the key.\n\t */\n\tfunction toKey(value) {\n\t if (typeof value == 'string' || isSymbol(value)) {\n\t return value;\n\t }\n\t var result = (value + '');\n\t return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n\t}\n\t\n\t/**\n\t * Converts `func` to its source code.\n\t *\n\t * @private\n\t * @param {Function} func The function to process.\n\t * @returns {string} Returns the source code.\n\t */\n\tfunction toSource(func) {\n\t if (func != null) {\n\t try {\n\t return funcToString.call(func);\n\t } catch (e) {}\n\t try {\n\t return (func + '');\n\t } catch (e) {}\n\t }\n\t return '';\n\t}\n\t\n\t/**\n\t * Creates a function that memoizes the result of `func`. If `resolver` is\n\t * provided, it determines the cache key for storing the result based on the\n\t * arguments provided to the memoized function. By default, the first argument\n\t * provided to the memoized function is used as the map cache key. The `func`\n\t * is invoked with the `this` binding of the memoized function.\n\t *\n\t * **Note:** The cache is exposed as the `cache` property on the memoized\n\t * function. Its creation may be customized by replacing the `_.memoize.Cache`\n\t * constructor with one whose instances implement the\n\t * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n\t * method interface of `delete`, `get`, `has`, and `set`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Function\n\t * @param {Function} func The function to have its output memoized.\n\t * @param {Function} [resolver] The function to resolve the cache key.\n\t * @returns {Function} Returns the new memoized function.\n\t * @example\n\t *\n\t * var object = { 'a': 1, 'b': 2 };\n\t * var other = { 'c': 3, 'd': 4 };\n\t *\n\t * var values = _.memoize(_.values);\n\t * values(object);\n\t * // => [1, 2]\n\t *\n\t * values(other);\n\t * // => [3, 4]\n\t *\n\t * object.a = 2;\n\t * values(object);\n\t * // => [1, 2]\n\t *\n\t * // Modify the result cache.\n\t * values.cache.set(object, ['a', 'b']);\n\t * values(object);\n\t * // => ['a', 'b']\n\t *\n\t * // Replace `_.memoize.Cache`.\n\t * _.memoize.Cache = WeakMap;\n\t */\n\tfunction memoize(func, resolver) {\n\t if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n\t throw new TypeError(FUNC_ERROR_TEXT);\n\t }\n\t var memoized = function() {\n\t var args = arguments,\n\t key = resolver ? resolver.apply(this, args) : args[0],\n\t cache = memoized.cache;\n\t\n\t if (cache.has(key)) {\n\t return cache.get(key);\n\t }\n\t var result = func.apply(this, args);\n\t memoized.cache = cache.set(key, result);\n\t return result;\n\t };\n\t memoized.cache = new (memoize.Cache || MapCache);\n\t return memoized;\n\t}\n\t\n\t// Assign cache to `_.memoize`.\n\tmemoize.Cache = MapCache;\n\t\n\t/**\n\t * Performs a\n\t * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * comparison between two values to determine if they are equivalent.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.eq(object, object);\n\t * // => true\n\t *\n\t * _.eq(object, other);\n\t * // => false\n\t *\n\t * _.eq('a', 'a');\n\t * // => true\n\t *\n\t * _.eq('a', Object('a'));\n\t * // => false\n\t *\n\t * _.eq(NaN, NaN);\n\t * // => true\n\t */\n\tfunction eq(value, other) {\n\t return value === other || (value !== value && other !== other);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as an `Array` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n\t * @example\n\t *\n\t * _.isArray([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArray(document.body.children);\n\t * // => false\n\t *\n\t * _.isArray('abc');\n\t * // => false\n\t *\n\t * _.isArray(_.noop);\n\t * // => false\n\t */\n\tvar isArray = Array.isArray;\n\t\n\t/**\n\t * Checks if `value` is classified as a `Function` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n\t * @example\n\t *\n\t * _.isFunction(_);\n\t * // => true\n\t *\n\t * _.isFunction(/abc/);\n\t * // => false\n\t */\n\tfunction isFunction(value) {\n\t // The use of `Object#toString` avoids issues with the `typeof` operator\n\t // in Safari 8-9 which returns 'object' for typed array and other constructors.\n\t var tag = isObject(value) ? objectToString.call(value) : '';\n\t return tag == funcTag || tag == genTag;\n\t}\n\t\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject(value) {\n\t var type = typeof value;\n\t return !!value && (type == 'object' || type == 'function');\n\t}\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a `Symbol` primitive or object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n\t * @example\n\t *\n\t * _.isSymbol(Symbol.iterator);\n\t * // => true\n\t *\n\t * _.isSymbol('abc');\n\t * // => false\n\t */\n\tfunction isSymbol(value) {\n\t return typeof value == 'symbol' ||\n\t (isObjectLike(value) && objectToString.call(value) == symbolTag);\n\t}\n\t\n\t/**\n\t * Converts `value` to a string. An empty string is returned for `null`\n\t * and `undefined` values. The sign of `-0` is preserved.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to process.\n\t * @returns {string} Returns the string.\n\t * @example\n\t *\n\t * _.toString(null);\n\t * // => ''\n\t *\n\t * _.toString(-0);\n\t * // => '-0'\n\t *\n\t * _.toString([1, 2, 3]);\n\t * // => '1,2,3'\n\t */\n\tfunction toString(value) {\n\t return value == null ? '' : baseToString(value);\n\t}\n\t\n\t/**\n\t * This method is like `_.get` except that if the resolved value is a\n\t * function it's invoked with the `this` binding of its parent object and\n\t * its result is returned.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @param {Array|string} path The path of the property to resolve.\n\t * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n\t * @returns {*} Returns the resolved value.\n\t * @example\n\t *\n\t * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n\t *\n\t * _.result(object, 'a[0].b.c1');\n\t * // => 3\n\t *\n\t * _.result(object, 'a[0].b.c2');\n\t * // => 4\n\t *\n\t * _.result(object, 'a[0].b.c3', 'default');\n\t * // => 'default'\n\t *\n\t * _.result(object, 'a[0].b.c3', _.constant('default'));\n\t * // => 'default'\n\t */\n\tfunction result(object, path, defaultValue) {\n\t path = isKey(path, object) ? [path] : castPath(path);\n\t\n\t var index = -1,\n\t length = path.length;\n\t\n\t // Ensure the loop is entered when path is empty.\n\t if (!length) {\n\t object = undefined;\n\t length = 1;\n\t }\n\t while (++index < length) {\n\t var value = object == null ? undefined : object[toKey(path[index])];\n\t if (value === undefined) {\n\t index = length;\n\t value = defaultValue;\n\t }\n\t object = isFunction(value) ? value.call(object) : value;\n\t }\n\t return object;\n\t}\n\t\n\tmodule.exports = result;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 103 */\n/*!**********************************!*\\\n !*** ./~/lodash.uniqby/index.js ***!\n \\**********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global, module) {/**\n\t * lodash (Custom Build) <https://lodash.com/>\n\t * Build: `lodash modularize exports=\"npm\" -o ./`\n\t * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n\t * Released under MIT license <https://lodash.com/license>\n\t * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n\t * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\t */\n\t\n\t/** Used as the size to enable large array optimizations. */\n\tvar LARGE_ARRAY_SIZE = 200;\n\t\n\t/** Used as the `TypeError` message for \"Functions\" methods. */\n\tvar FUNC_ERROR_TEXT = 'Expected a function';\n\t\n\t/** Used to stand-in for `undefined` hash values. */\n\tvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\t\n\t/** Used to compose bitmasks for comparison styles. */\n\tvar UNORDERED_COMPARE_FLAG = 1,\n\t PARTIAL_COMPARE_FLAG = 2;\n\t\n\t/** Used as references for various `Number` constants. */\n\tvar INFINITY = 1 / 0,\n\t MAX_SAFE_INTEGER = 9007199254740991;\n\t\n\t/** `Object#toString` result references. */\n\tvar argsTag = '[object Arguments]',\n\t arrayTag = '[object Array]',\n\t boolTag = '[object Boolean]',\n\t dateTag = '[object Date]',\n\t errorTag = '[object Error]',\n\t funcTag = '[object Function]',\n\t genTag = '[object GeneratorFunction]',\n\t mapTag = '[object Map]',\n\t numberTag = '[object Number]',\n\t objectTag = '[object Object]',\n\t promiseTag = '[object Promise]',\n\t regexpTag = '[object RegExp]',\n\t setTag = '[object Set]',\n\t stringTag = '[object String]',\n\t symbolTag = '[object Symbol]',\n\t weakMapTag = '[object WeakMap]';\n\t\n\tvar arrayBufferTag = '[object ArrayBuffer]',\n\t dataViewTag = '[object DataView]',\n\t float32Tag = '[object Float32Array]',\n\t float64Tag = '[object Float64Array]',\n\t int8Tag = '[object Int8Array]',\n\t int16Tag = '[object Int16Array]',\n\t int32Tag = '[object Int32Array]',\n\t uint8Tag = '[object Uint8Array]',\n\t uint8ClampedTag = '[object Uint8ClampedArray]',\n\t uint16Tag = '[object Uint16Array]',\n\t uint32Tag = '[object Uint32Array]';\n\t\n\t/** Used to match property names within property paths. */\n\tvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n\t reIsPlainProp = /^\\w*$/,\n\t reLeadingDot = /^\\./,\n\t rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\t\n\t/**\n\t * Used to match `RegExp`\n\t * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n\t */\n\tvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\t\n\t/** Used to match backslashes in property paths. */\n\tvar reEscapeChar = /\\\\(\\\\)?/g;\n\t\n\t/** Used to detect host constructors (Safari). */\n\tvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\t\n\t/** Used to detect unsigned integer values. */\n\tvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\t\n\t/** Used to identify `toStringTag` values of typed arrays. */\n\tvar typedArrayTags = {};\n\ttypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n\ttypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n\ttypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n\ttypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n\ttypedArrayTags[uint32Tag] = true;\n\ttypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n\ttypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n\ttypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n\ttypedArrayTags[errorTag] = typedArrayTags[funcTag] =\n\ttypedArrayTags[mapTag] = typedArrayTags[numberTag] =\n\ttypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n\ttypedArrayTags[setTag] = typedArrayTags[stringTag] =\n\ttypedArrayTags[weakMapTag] = false;\n\t\n\t/** Detect free variable `global` from Node.js. */\n\tvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\t\n\t/** Detect free variable `self`. */\n\tvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\t\n\t/** Used as a reference to the global object. */\n\tvar root = freeGlobal || freeSelf || Function('return this')();\n\t\n\t/** Detect free variable `exports`. */\n\tvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\t\n\t/** Detect free variable `module`. */\n\tvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\t\n\t/** Detect the popular CommonJS extension `module.exports`. */\n\tvar moduleExports = freeModule && freeModule.exports === freeExports;\n\t\n\t/** Detect free variable `process` from Node.js. */\n\tvar freeProcess = moduleExports && freeGlobal.process;\n\t\n\t/** Used to access faster Node.js helpers. */\n\tvar nodeUtil = (function() {\n\t try {\n\t return freeProcess && freeProcess.binding('util');\n\t } catch (e) {}\n\t}());\n\t\n\t/* Node.js helper references. */\n\tvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\t\n\t/**\n\t * A specialized version of `_.includes` for arrays without support for\n\t * specifying an index to search from.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to inspect.\n\t * @param {*} target The value to search for.\n\t * @returns {boolean} Returns `true` if `target` is found, else `false`.\n\t */\n\tfunction arrayIncludes(array, value) {\n\t var length = array ? array.length : 0;\n\t return !!length && baseIndexOf(array, value, 0) > -1;\n\t}\n\t\n\t/**\n\t * This function is like `arrayIncludes` except that it accepts a comparator.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to inspect.\n\t * @param {*} target The value to search for.\n\t * @param {Function} comparator The comparator invoked per element.\n\t * @returns {boolean} Returns `true` if `target` is found, else `false`.\n\t */\n\tfunction arrayIncludesWith(array, value, comparator) {\n\t var index = -1,\n\t length = array ? array.length : 0;\n\t\n\t while (++index < length) {\n\t if (comparator(value, array[index])) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * A specialized version of `_.some` for arrays without support for iteratee\n\t * shorthands.\n\t *\n\t * @private\n\t * @param {Array} [array] The array to iterate over.\n\t * @param {Function} predicate The function invoked per iteration.\n\t * @returns {boolean} Returns `true` if any element passes the predicate check,\n\t * else `false`.\n\t */\n\tfunction arraySome(array, predicate) {\n\t var index = -1,\n\t length = array ? array.length : 0;\n\t\n\t while (++index < length) {\n\t if (predicate(array[index], index, array)) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.findIndex` and `_.findLastIndex` without\n\t * support for iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {Function} predicate The function invoked per iteration.\n\t * @param {number} fromIndex The index to search from.\n\t * @param {boolean} [fromRight] Specify iterating from right to left.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n\t var length = array.length,\n\t index = fromIndex + (fromRight ? 1 : -1);\n\t\n\t while ((fromRight ? index-- : ++index < length)) {\n\t if (predicate(array[index], index, array)) {\n\t return index;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} value The value to search for.\n\t * @param {number} fromIndex The index to search from.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction baseIndexOf(array, value, fromIndex) {\n\t if (value !== value) {\n\t return baseFindIndex(array, baseIsNaN, fromIndex);\n\t }\n\t var index = fromIndex - 1,\n\t length = array.length;\n\t\n\t while (++index < length) {\n\t if (array[index] === value) {\n\t return index;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isNaN` without support for number objects.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n\t */\n\tfunction baseIsNaN(value) {\n\t return value !== value;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.property` without support for deep paths.\n\t *\n\t * @private\n\t * @param {string} key The key of the property to get.\n\t * @returns {Function} Returns the new accessor function.\n\t */\n\tfunction baseProperty(key) {\n\t return function(object) {\n\t return object == null ? undefined : object[key];\n\t };\n\t}\n\t\n\t/**\n\t * The base implementation of `_.times` without support for iteratee shorthands\n\t * or max array length checks.\n\t *\n\t * @private\n\t * @param {number} n The number of times to invoke `iteratee`.\n\t * @param {Function} iteratee The function invoked per iteration.\n\t * @returns {Array} Returns the array of results.\n\t */\n\tfunction baseTimes(n, iteratee) {\n\t var index = -1,\n\t result = Array(n);\n\t\n\t while (++index < n) {\n\t result[index] = iteratee(index);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.unary` without support for storing metadata.\n\t *\n\t * @private\n\t * @param {Function} func The function to cap arguments for.\n\t * @returns {Function} Returns the new capped function.\n\t */\n\tfunction baseUnary(func) {\n\t return function(value) {\n\t return func(value);\n\t };\n\t}\n\t\n\t/**\n\t * Checks if a cache value for `key` exists.\n\t *\n\t * @private\n\t * @param {Object} cache The cache to query.\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction cacheHas(cache, key) {\n\t return cache.has(key);\n\t}\n\t\n\t/**\n\t * Gets the value at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {string} key The key of the property to get.\n\t * @returns {*} Returns the property value.\n\t */\n\tfunction getValue(object, key) {\n\t return object == null ? undefined : object[key];\n\t}\n\t\n\t/**\n\t * Checks if `value` is a host object in IE < 9.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n\t */\n\tfunction isHostObject(value) {\n\t // Many host objects are `Object` objects that can coerce to strings\n\t // despite having improperly defined `toString` methods.\n\t var result = false;\n\t if (value != null && typeof value.toString != 'function') {\n\t try {\n\t result = !!(value + '');\n\t } catch (e) {}\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Converts `map` to its key-value pairs.\n\t *\n\t * @private\n\t * @param {Object} map The map to convert.\n\t * @returns {Array} Returns the key-value pairs.\n\t */\n\tfunction mapToArray(map) {\n\t var index = -1,\n\t result = Array(map.size);\n\t\n\t map.forEach(function(value, key) {\n\t result[++index] = [key, value];\n\t });\n\t return result;\n\t}\n\t\n\t/**\n\t * Creates a unary function that invokes `func` with its argument transformed.\n\t *\n\t * @private\n\t * @param {Function} func The function to wrap.\n\t * @param {Function} transform The argument transform.\n\t * @returns {Function} Returns the new function.\n\t */\n\tfunction overArg(func, transform) {\n\t return function(arg) {\n\t return func(transform(arg));\n\t };\n\t}\n\t\n\t/**\n\t * Converts `set` to an array of its values.\n\t *\n\t * @private\n\t * @param {Object} set The set to convert.\n\t * @returns {Array} Returns the values.\n\t */\n\tfunction setToArray(set) {\n\t var index = -1,\n\t result = Array(set.size);\n\t\n\t set.forEach(function(value) {\n\t result[++index] = value;\n\t });\n\t return result;\n\t}\n\t\n\t/** Used for built-in method references. */\n\tvar arrayProto = Array.prototype,\n\t funcProto = Function.prototype,\n\t objectProto = Object.prototype;\n\t\n\t/** Used to detect overreaching core-js shims. */\n\tvar coreJsData = root['__core-js_shared__'];\n\t\n\t/** Used to detect methods masquerading as native. */\n\tvar maskSrcKey = (function() {\n\t var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n\t return uid ? ('Symbol(src)_1.' + uid) : '';\n\t}());\n\t\n\t/** Used to resolve the decompiled source of functions. */\n\tvar funcToString = funcProto.toString;\n\t\n\t/** Used to check objects for own properties. */\n\tvar hasOwnProperty = objectProto.hasOwnProperty;\n\t\n\t/**\n\t * Used to resolve the\n\t * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n\t * of values.\n\t */\n\tvar objectToString = objectProto.toString;\n\t\n\t/** Used to detect if a method is native. */\n\tvar reIsNative = RegExp('^' +\n\t funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n\t .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n\t);\n\t\n\t/** Built-in value references. */\n\tvar Symbol = root.Symbol,\n\t Uint8Array = root.Uint8Array,\n\t propertyIsEnumerable = objectProto.propertyIsEnumerable,\n\t splice = arrayProto.splice;\n\t\n\t/* Built-in method references for those with the same name as other `lodash` methods. */\n\tvar nativeKeys = overArg(Object.keys, Object);\n\t\n\t/* Built-in method references that are verified to be native. */\n\tvar DataView = getNative(root, 'DataView'),\n\t Map = getNative(root, 'Map'),\n\t Promise = getNative(root, 'Promise'),\n\t Set = getNative(root, 'Set'),\n\t WeakMap = getNative(root, 'WeakMap'),\n\t nativeCreate = getNative(Object, 'create');\n\t\n\t/** Used to detect maps, sets, and weakmaps. */\n\tvar dataViewCtorString = toSource(DataView),\n\t mapCtorString = toSource(Map),\n\t promiseCtorString = toSource(Promise),\n\t setCtorString = toSource(Set),\n\t weakMapCtorString = toSource(WeakMap);\n\t\n\t/** Used to convert symbols to primitives and strings. */\n\tvar symbolProto = Symbol ? Symbol.prototype : undefined,\n\t symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n\t symbolToString = symbolProto ? symbolProto.toString : undefined;\n\t\n\t/**\n\t * Creates a hash object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Hash(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the hash.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Hash\n\t */\n\tfunction hashClear() {\n\t this.__data__ = nativeCreate ? nativeCreate(null) : {};\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the hash.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Hash\n\t * @param {Object} hash The hash to modify.\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction hashDelete(key) {\n\t return this.has(key) && delete this.__data__[key];\n\t}\n\t\n\t/**\n\t * Gets the hash value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction hashGet(key) {\n\t var data = this.__data__;\n\t if (nativeCreate) {\n\t var result = data[key];\n\t return result === HASH_UNDEFINED ? undefined : result;\n\t }\n\t return hasOwnProperty.call(data, key) ? data[key] : undefined;\n\t}\n\t\n\t/**\n\t * Checks if a hash value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Hash\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction hashHas(key) {\n\t var data = this.__data__;\n\t return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n\t}\n\t\n\t/**\n\t * Sets the hash `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Hash\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the hash instance.\n\t */\n\tfunction hashSet(key, value) {\n\t var data = this.__data__;\n\t data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n\t return this;\n\t}\n\t\n\t// Add methods to `Hash`.\n\tHash.prototype.clear = hashClear;\n\tHash.prototype['delete'] = hashDelete;\n\tHash.prototype.get = hashGet;\n\tHash.prototype.has = hashHas;\n\tHash.prototype.set = hashSet;\n\t\n\t/**\n\t * Creates an list cache object.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction ListCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the list cache.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf ListCache\n\t */\n\tfunction listCacheClear() {\n\t this.__data__ = [];\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the list cache.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction listCacheDelete(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t return false;\n\t }\n\t var lastIndex = data.length - 1;\n\t if (index == lastIndex) {\n\t data.pop();\n\t } else {\n\t splice.call(data, index, 1);\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * Gets the list cache value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction listCacheGet(key) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t return index < 0 ? undefined : data[index][1];\n\t}\n\t\n\t/**\n\t * Checks if a list cache value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf ListCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction listCacheHas(key) {\n\t return assocIndexOf(this.__data__, key) > -1;\n\t}\n\t\n\t/**\n\t * Sets the list cache `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf ListCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the list cache instance.\n\t */\n\tfunction listCacheSet(key, value) {\n\t var data = this.__data__,\n\t index = assocIndexOf(data, key);\n\t\n\t if (index < 0) {\n\t data.push([key, value]);\n\t } else {\n\t data[index][1] = value;\n\t }\n\t return this;\n\t}\n\t\n\t// Add methods to `ListCache`.\n\tListCache.prototype.clear = listCacheClear;\n\tListCache.prototype['delete'] = listCacheDelete;\n\tListCache.prototype.get = listCacheGet;\n\tListCache.prototype.has = listCacheHas;\n\tListCache.prototype.set = listCacheSet;\n\t\n\t/**\n\t * Creates a map cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction MapCache(entries) {\n\t var index = -1,\n\t length = entries ? entries.length : 0;\n\t\n\t this.clear();\n\t while (++index < length) {\n\t var entry = entries[index];\n\t this.set(entry[0], entry[1]);\n\t }\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the map.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf MapCache\n\t */\n\tfunction mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map || ListCache),\n\t 'string': new Hash\n\t };\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the map.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction mapCacheDelete(key) {\n\t return getMapData(this, key)['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the map value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction mapCacheGet(key) {\n\t return getMapData(this, key).get(key);\n\t}\n\t\n\t/**\n\t * Checks if a map value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf MapCache\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction mapCacheHas(key) {\n\t return getMapData(this, key).has(key);\n\t}\n\t\n\t/**\n\t * Sets the map `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf MapCache\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the map cache instance.\n\t */\n\tfunction mapCacheSet(key, value) {\n\t getMapData(this, key).set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `MapCache`.\n\tMapCache.prototype.clear = mapCacheClear;\n\tMapCache.prototype['delete'] = mapCacheDelete;\n\tMapCache.prototype.get = mapCacheGet;\n\tMapCache.prototype.has = mapCacheHas;\n\tMapCache.prototype.set = mapCacheSet;\n\t\n\t/**\n\t *\n\t * Creates an array cache object to store unique values.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [values] The values to cache.\n\t */\n\tfunction SetCache(values) {\n\t var index = -1,\n\t length = values ? values.length : 0;\n\t\n\t this.__data__ = new MapCache;\n\t while (++index < length) {\n\t this.add(values[index]);\n\t }\n\t}\n\t\n\t/**\n\t * Adds `value` to the array cache.\n\t *\n\t * @private\n\t * @name add\n\t * @memberOf SetCache\n\t * @alias push\n\t * @param {*} value The value to cache.\n\t * @returns {Object} Returns the cache instance.\n\t */\n\tfunction setCacheAdd(value) {\n\t this.__data__.set(value, HASH_UNDEFINED);\n\t return this;\n\t}\n\t\n\t/**\n\t * Checks if `value` is in the array cache.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf SetCache\n\t * @param {*} value The value to search for.\n\t * @returns {number} Returns `true` if `value` is found, else `false`.\n\t */\n\tfunction setCacheHas(value) {\n\t return this.__data__.has(value);\n\t}\n\t\n\t// Add methods to `SetCache`.\n\tSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n\tSetCache.prototype.has = setCacheHas;\n\t\n\t/**\n\t * Creates a stack cache object to store key-value pairs.\n\t *\n\t * @private\n\t * @constructor\n\t * @param {Array} [entries] The key-value pairs to cache.\n\t */\n\tfunction Stack(entries) {\n\t this.__data__ = new ListCache(entries);\n\t}\n\t\n\t/**\n\t * Removes all key-value entries from the stack.\n\t *\n\t * @private\n\t * @name clear\n\t * @memberOf Stack\n\t */\n\tfunction stackClear() {\n\t this.__data__ = new ListCache;\n\t}\n\t\n\t/**\n\t * Removes `key` and its value from the stack.\n\t *\n\t * @private\n\t * @name delete\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to remove.\n\t * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n\t */\n\tfunction stackDelete(key) {\n\t return this.__data__['delete'](key);\n\t}\n\t\n\t/**\n\t * Gets the stack value for `key`.\n\t *\n\t * @private\n\t * @name get\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to get.\n\t * @returns {*} Returns the entry value.\n\t */\n\tfunction stackGet(key) {\n\t return this.__data__.get(key);\n\t}\n\t\n\t/**\n\t * Checks if a stack value for `key` exists.\n\t *\n\t * @private\n\t * @name has\n\t * @memberOf Stack\n\t * @param {string} key The key of the entry to check.\n\t * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n\t */\n\tfunction stackHas(key) {\n\t return this.__data__.has(key);\n\t}\n\t\n\t/**\n\t * Sets the stack `key` to `value`.\n\t *\n\t * @private\n\t * @name set\n\t * @memberOf Stack\n\t * @param {string} key The key of the value to set.\n\t * @param {*} value The value to set.\n\t * @returns {Object} Returns the stack cache instance.\n\t */\n\tfunction stackSet(key, value) {\n\t var cache = this.__data__;\n\t if (cache instanceof ListCache) {\n\t var pairs = cache.__data__;\n\t if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n\t pairs.push([key, value]);\n\t return this;\n\t }\n\t cache = this.__data__ = new MapCache(pairs);\n\t }\n\t cache.set(key, value);\n\t return this;\n\t}\n\t\n\t// Add methods to `Stack`.\n\tStack.prototype.clear = stackClear;\n\tStack.prototype['delete'] = stackDelete;\n\tStack.prototype.get = stackGet;\n\tStack.prototype.has = stackHas;\n\tStack.prototype.set = stackSet;\n\t\n\t/**\n\t * Creates an array of the enumerable property names of the array-like `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @param {boolean} inherited Specify returning inherited property names.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction arrayLikeKeys(value, inherited) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t // Safari 9 makes `arguments.length` enumerable in strict mode.\n\t var result = (isArray(value) || isArguments(value))\n\t ? baseTimes(value.length, String)\n\t : [];\n\t\n\t var length = result.length,\n\t skipIndexes = !!length;\n\t\n\t for (var key in value) {\n\t if ((inherited || hasOwnProperty.call(value, key)) &&\n\t !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Gets the index at which the `key` is found in `array` of key-value pairs.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {*} key The key to search for.\n\t * @returns {number} Returns the index of the matched value, else `-1`.\n\t */\n\tfunction assocIndexOf(array, key) {\n\t var length = array.length;\n\t while (length--) {\n\t if (eq(array[length][0], key)) {\n\t return length;\n\t }\n\t }\n\t return -1;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.get` without support for default values.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {Array|string} path The path of the property to get.\n\t * @returns {*} Returns the resolved value.\n\t */\n\tfunction baseGet(object, path) {\n\t path = isKey(path, object) ? [path] : castPath(path);\n\t\n\t var index = 0,\n\t length = path.length;\n\t\n\t while (object != null && index < length) {\n\t object = object[toKey(path[index++])];\n\t }\n\t return (index && index == length) ? object : undefined;\n\t}\n\t\n\t/**\n\t * The base implementation of `getTag`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tfunction baseGetTag(value) {\n\t return objectToString.call(value);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.hasIn` without support for deep paths.\n\t *\n\t * @private\n\t * @param {Object} [object] The object to query.\n\t * @param {Array|string} key The key to check.\n\t * @returns {boolean} Returns `true` if `key` exists, else `false`.\n\t */\n\tfunction baseHasIn(object, key) {\n\t return object != null && key in Object(object);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isEqual` which supports partial comparisons\n\t * and tracks traversed objects.\n\t *\n\t * @private\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @param {Function} [customizer] The function to customize comparisons.\n\t * @param {boolean} [bitmask] The bitmask of comparison flags.\n\t * The bitmask may be composed of the following flags:\n\t * 1 - Unordered comparison\n\t * 2 - Partial comparison\n\t * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t */\n\tfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n\t if (value === other) {\n\t return true;\n\t }\n\t if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n\t return value !== value && other !== other;\n\t }\n\t return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqual` for arrays and objects which performs\n\t * deep comparisons and tracks traversed objects enabling objects with circular\n\t * references to be compared.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} [customizer] The function to customize comparisons.\n\t * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n\t var objIsArr = isArray(object),\n\t othIsArr = isArray(other),\n\t objTag = arrayTag,\n\t othTag = arrayTag;\n\t\n\t if (!objIsArr) {\n\t objTag = getTag(object);\n\t objTag = objTag == argsTag ? objectTag : objTag;\n\t }\n\t if (!othIsArr) {\n\t othTag = getTag(other);\n\t othTag = othTag == argsTag ? objectTag : othTag;\n\t }\n\t var objIsObj = objTag == objectTag && !isHostObject(object),\n\t othIsObj = othTag == objectTag && !isHostObject(other),\n\t isSameTag = objTag == othTag;\n\t\n\t if (isSameTag && !objIsObj) {\n\t stack || (stack = new Stack);\n\t return (objIsArr || isTypedArray(object))\n\t ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n\t : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n\t }\n\t if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n\t var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n\t othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\t\n\t if (objIsWrapped || othIsWrapped) {\n\t var objUnwrapped = objIsWrapped ? object.value() : object,\n\t othUnwrapped = othIsWrapped ? other.value() : other;\n\t\n\t stack || (stack = new Stack);\n\t return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n\t }\n\t }\n\t if (!isSameTag) {\n\t return false;\n\t }\n\t stack || (stack = new Stack);\n\t return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isMatch` without support for iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Object} object The object to inspect.\n\t * @param {Object} source The object of property values to match.\n\t * @param {Array} matchData The property names, values, and compare flags to match.\n\t * @param {Function} [customizer] The function to customize comparisons.\n\t * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n\t */\n\tfunction baseIsMatch(object, source, matchData, customizer) {\n\t var index = matchData.length,\n\t length = index,\n\t noCustomizer = !customizer;\n\t\n\t if (object == null) {\n\t return !length;\n\t }\n\t object = Object(object);\n\t while (index--) {\n\t var data = matchData[index];\n\t if ((noCustomizer && data[2])\n\t ? data[1] !== object[data[0]]\n\t : !(data[0] in object)\n\t ) {\n\t return false;\n\t }\n\t }\n\t while (++index < length) {\n\t data = matchData[index];\n\t var key = data[0],\n\t objValue = object[key],\n\t srcValue = data[1];\n\t\n\t if (noCustomizer && data[2]) {\n\t if (objValue === undefined && !(key in object)) {\n\t return false;\n\t }\n\t } else {\n\t var stack = new Stack;\n\t if (customizer) {\n\t var result = customizer(objValue, srcValue, key, object, source, stack);\n\t }\n\t if (!(result === undefined\n\t ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n\t : result\n\t )) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isNative` without bad shim checks.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a native function,\n\t * else `false`.\n\t */\n\tfunction baseIsNative(value) {\n\t if (!isObject(value) || isMasked(value)) {\n\t return false;\n\t }\n\t var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n\t return pattern.test(toSource(value));\n\t}\n\t\n\t/**\n\t * The base implementation of `_.isTypedArray` without Node.js optimizations.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t */\n\tfunction baseIsTypedArray(value) {\n\t return isObjectLike(value) &&\n\t isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n\t}\n\t\n\t/**\n\t * The base implementation of `_.iteratee`.\n\t *\n\t * @private\n\t * @param {*} [value=_.identity] The value to convert to an iteratee.\n\t * @returns {Function} Returns the iteratee.\n\t */\n\tfunction baseIteratee(value) {\n\t // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n\t // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n\t if (typeof value == 'function') {\n\t return value;\n\t }\n\t if (value == null) {\n\t return identity;\n\t }\n\t if (typeof value == 'object') {\n\t return isArray(value)\n\t ? baseMatchesProperty(value[0], value[1])\n\t : baseMatches(value);\n\t }\n\t return property(value);\n\t}\n\t\n\t/**\n\t * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t */\n\tfunction baseKeys(object) {\n\t if (!isPrototype(object)) {\n\t return nativeKeys(object);\n\t }\n\t var result = [];\n\t for (var key in Object(object)) {\n\t if (hasOwnProperty.call(object, key) && key != 'constructor') {\n\t result.push(key);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.matches` which doesn't clone `source`.\n\t *\n\t * @private\n\t * @param {Object} source The object of property values to match.\n\t * @returns {Function} Returns the new spec function.\n\t */\n\tfunction baseMatches(source) {\n\t var matchData = getMatchData(source);\n\t if (matchData.length == 1 && matchData[0][2]) {\n\t return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n\t }\n\t return function(object) {\n\t return object === source || baseIsMatch(object, source, matchData);\n\t };\n\t}\n\t\n\t/**\n\t * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n\t *\n\t * @private\n\t * @param {string} path The path of the property to get.\n\t * @param {*} srcValue The value to match.\n\t * @returns {Function} Returns the new spec function.\n\t */\n\tfunction baseMatchesProperty(path, srcValue) {\n\t if (isKey(path) && isStrictComparable(srcValue)) {\n\t return matchesStrictComparable(toKey(path), srcValue);\n\t }\n\t return function(object) {\n\t var objValue = get(object, path);\n\t return (objValue === undefined && objValue === srcValue)\n\t ? hasIn(object, path)\n\t : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n\t };\n\t}\n\t\n\t/**\n\t * A specialized version of `baseProperty` which supports deep paths.\n\t *\n\t * @private\n\t * @param {Array|string} path The path of the property to get.\n\t * @returns {Function} Returns the new accessor function.\n\t */\n\tfunction basePropertyDeep(path) {\n\t return function(object) {\n\t return baseGet(object, path);\n\t };\n\t}\n\t\n\t/**\n\t * The base implementation of `_.toString` which doesn't convert nullish\n\t * values to empty strings.\n\t *\n\t * @private\n\t * @param {*} value The value to process.\n\t * @returns {string} Returns the string.\n\t */\n\tfunction baseToString(value) {\n\t // Exit early for strings to avoid a performance hit in some environments.\n\t if (typeof value == 'string') {\n\t return value;\n\t }\n\t if (isSymbol(value)) {\n\t return symbolToString ? symbolToString.call(value) : '';\n\t }\n\t var result = (value + '');\n\t return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n\t}\n\t\n\t/**\n\t * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n\t *\n\t * @private\n\t * @param {Array} array The array to inspect.\n\t * @param {Function} [iteratee] The iteratee invoked per element.\n\t * @param {Function} [comparator] The comparator invoked per element.\n\t * @returns {Array} Returns the new duplicate free array.\n\t */\n\tfunction baseUniq(array, iteratee, comparator) {\n\t var index = -1,\n\t includes = arrayIncludes,\n\t length = array.length,\n\t isCommon = true,\n\t result = [],\n\t seen = result;\n\t\n\t if (comparator) {\n\t isCommon = false;\n\t includes = arrayIncludesWith;\n\t }\n\t else if (length >= LARGE_ARRAY_SIZE) {\n\t var set = iteratee ? null : createSet(array);\n\t if (set) {\n\t return setToArray(set);\n\t }\n\t isCommon = false;\n\t includes = cacheHas;\n\t seen = new SetCache;\n\t }\n\t else {\n\t seen = iteratee ? [] : result;\n\t }\n\t outer:\n\t while (++index < length) {\n\t var value = array[index],\n\t computed = iteratee ? iteratee(value) : value;\n\t\n\t value = (comparator || value !== 0) ? value : 0;\n\t if (isCommon && computed === computed) {\n\t var seenIndex = seen.length;\n\t while (seenIndex--) {\n\t if (seen[seenIndex] === computed) {\n\t continue outer;\n\t }\n\t }\n\t if (iteratee) {\n\t seen.push(computed);\n\t }\n\t result.push(value);\n\t }\n\t else if (!includes(seen, computed, comparator)) {\n\t if (seen !== result) {\n\t seen.push(computed);\n\t }\n\t result.push(value);\n\t }\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Casts `value` to a path array if it's not one.\n\t *\n\t * @private\n\t * @param {*} value The value to inspect.\n\t * @returns {Array} Returns the cast property path array.\n\t */\n\tfunction castPath(value) {\n\t return isArray(value) ? value : stringToPath(value);\n\t}\n\t\n\t/**\n\t * Creates a set object of `values`.\n\t *\n\t * @private\n\t * @param {Array} values The values to add to the set.\n\t * @returns {Object} Returns the new set.\n\t */\n\tvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n\t return new Set(values);\n\t};\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for arrays with support for\n\t * partial deep comparisons.\n\t *\n\t * @private\n\t * @param {Array} array The array to compare.\n\t * @param {Array} other The other array to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `array` and `other` objects.\n\t * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n\t */\n\tfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n\t arrLength = array.length,\n\t othLength = other.length;\n\t\n\t if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n\t return false;\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(array);\n\t if (stacked && stack.get(other)) {\n\t return stacked == other;\n\t }\n\t var index = -1,\n\t result = true,\n\t seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\t\n\t stack.set(array, other);\n\t stack.set(other, array);\n\t\n\t // Ignore non-index properties.\n\t while (++index < arrLength) {\n\t var arrValue = array[index],\n\t othValue = other[index];\n\t\n\t if (customizer) {\n\t var compared = isPartial\n\t ? customizer(othValue, arrValue, index, other, array, stack)\n\t : customizer(arrValue, othValue, index, array, other, stack);\n\t }\n\t if (compared !== undefined) {\n\t if (compared) {\n\t continue;\n\t }\n\t result = false;\n\t break;\n\t }\n\t // Recursively compare arrays (susceptible to call stack limits).\n\t if (seen) {\n\t if (!arraySome(other, function(othValue, othIndex) {\n\t if (!seen.has(othIndex) &&\n\t (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n\t return seen.add(othIndex);\n\t }\n\t })) {\n\t result = false;\n\t break;\n\t }\n\t } else if (!(\n\t arrValue === othValue ||\n\t equalFunc(arrValue, othValue, customizer, bitmask, stack)\n\t )) {\n\t result = false;\n\t break;\n\t }\n\t }\n\t stack['delete'](array);\n\t stack['delete'](other);\n\t return result;\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for comparing objects of\n\t * the same `toStringTag`.\n\t *\n\t * **Note:** This function only supports comparing values with tags of\n\t * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {string} tag The `toStringTag` of the objects to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n\t switch (tag) {\n\t case dataViewTag:\n\t if ((object.byteLength != other.byteLength) ||\n\t (object.byteOffset != other.byteOffset)) {\n\t return false;\n\t }\n\t object = object.buffer;\n\t other = other.buffer;\n\t\n\t case arrayBufferTag:\n\t if ((object.byteLength != other.byteLength) ||\n\t !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n\t return false;\n\t }\n\t return true;\n\t\n\t case boolTag:\n\t case dateTag:\n\t case numberTag:\n\t // Coerce booleans to `1` or `0` and dates to milliseconds.\n\t // Invalid dates are coerced to `NaN`.\n\t return eq(+object, +other);\n\t\n\t case errorTag:\n\t return object.name == other.name && object.message == other.message;\n\t\n\t case regexpTag:\n\t case stringTag:\n\t // Coerce regexes to strings and treat strings, primitives and objects,\n\t // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n\t // for more details.\n\t return object == (other + '');\n\t\n\t case mapTag:\n\t var convert = mapToArray;\n\t\n\t case setTag:\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n\t convert || (convert = setToArray);\n\t\n\t if (object.size != other.size && !isPartial) {\n\t return false;\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(object);\n\t if (stacked) {\n\t return stacked == other;\n\t }\n\t bitmask |= UNORDERED_COMPARE_FLAG;\n\t\n\t // Recursively compare objects (susceptible to call stack limits).\n\t stack.set(object, other);\n\t var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n\t stack['delete'](object);\n\t return result;\n\t\n\t case symbolTag:\n\t if (symbolValueOf) {\n\t return symbolValueOf.call(object) == symbolValueOf.call(other);\n\t }\n\t }\n\t return false;\n\t}\n\t\n\t/**\n\t * A specialized version of `baseIsEqualDeep` for objects with support for\n\t * partial deep comparisons.\n\t *\n\t * @private\n\t * @param {Object} object The object to compare.\n\t * @param {Object} other The other object to compare.\n\t * @param {Function} equalFunc The function to determine equivalents of values.\n\t * @param {Function} customizer The function to customize comparisons.\n\t * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n\t * for more details.\n\t * @param {Object} stack Tracks traversed `object` and `other` objects.\n\t * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n\t */\n\tfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n\t var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n\t objProps = keys(object),\n\t objLength = objProps.length,\n\t othProps = keys(other),\n\t othLength = othProps.length;\n\t\n\t if (objLength != othLength && !isPartial) {\n\t return false;\n\t }\n\t var index = objLength;\n\t while (index--) {\n\t var key = objProps[index];\n\t if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n\t return false;\n\t }\n\t }\n\t // Assume cyclic values are equal.\n\t var stacked = stack.get(object);\n\t if (stacked && stack.get(other)) {\n\t return stacked == other;\n\t }\n\t var result = true;\n\t stack.set(object, other);\n\t stack.set(other, object);\n\t\n\t var skipCtor = isPartial;\n\t while (++index < objLength) {\n\t key = objProps[index];\n\t var objValue = object[key],\n\t othValue = other[key];\n\t\n\t if (customizer) {\n\t var compared = isPartial\n\t ? customizer(othValue, objValue, key, other, object, stack)\n\t : customizer(objValue, othValue, key, object, other, stack);\n\t }\n\t // Recursively compare objects (susceptible to call stack limits).\n\t if (!(compared === undefined\n\t ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n\t : compared\n\t )) {\n\t result = false;\n\t break;\n\t }\n\t skipCtor || (skipCtor = key == 'constructor');\n\t }\n\t if (result && !skipCtor) {\n\t var objCtor = object.constructor,\n\t othCtor = other.constructor;\n\t\n\t // Non `Object` object instances with different constructors are not equal.\n\t if (objCtor != othCtor &&\n\t ('constructor' in object && 'constructor' in other) &&\n\t !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n\t typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n\t result = false;\n\t }\n\t }\n\t stack['delete'](object);\n\t stack['delete'](other);\n\t return result;\n\t}\n\t\n\t/**\n\t * Gets the data for `map`.\n\t *\n\t * @private\n\t * @param {Object} map The map to query.\n\t * @param {string} key The reference key.\n\t * @returns {*} Returns the map data.\n\t */\n\tfunction getMapData(map, key) {\n\t var data = map.__data__;\n\t return isKeyable(key)\n\t ? data[typeof key == 'string' ? 'string' : 'hash']\n\t : data.map;\n\t}\n\t\n\t/**\n\t * Gets the property names, values, and compare flags of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the match data of `object`.\n\t */\n\tfunction getMatchData(object) {\n\t var result = keys(object),\n\t length = result.length;\n\t\n\t while (length--) {\n\t var key = result[length],\n\t value = object[key];\n\t\n\t result[length] = [key, value, isStrictComparable(value)];\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Gets the native function at `key` of `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {string} key The key of the method to get.\n\t * @returns {*} Returns the function if it's native, else `undefined`.\n\t */\n\tfunction getNative(object, key) {\n\t var value = getValue(object, key);\n\t return baseIsNative(value) ? value : undefined;\n\t}\n\t\n\t/**\n\t * Gets the `toStringTag` of `value`.\n\t *\n\t * @private\n\t * @param {*} value The value to query.\n\t * @returns {string} Returns the `toStringTag`.\n\t */\n\tvar getTag = baseGetTag;\n\t\n\t// Fallback for data views, maps, sets, and weak maps in IE 11,\n\t// for data views in Edge < 14, and promises in Node.js.\n\tif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n\t (Map && getTag(new Map) != mapTag) ||\n\t (Promise && getTag(Promise.resolve()) != promiseTag) ||\n\t (Set && getTag(new Set) != setTag) ||\n\t (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n\t getTag = function(value) {\n\t var result = objectToString.call(value),\n\t Ctor = result == objectTag ? value.constructor : undefined,\n\t ctorString = Ctor ? toSource(Ctor) : undefined;\n\t\n\t if (ctorString) {\n\t switch (ctorString) {\n\t case dataViewCtorString: return dataViewTag;\n\t case mapCtorString: return mapTag;\n\t case promiseCtorString: return promiseTag;\n\t case setCtorString: return setTag;\n\t case weakMapCtorString: return weakMapTag;\n\t }\n\t }\n\t return result;\n\t };\n\t}\n\t\n\t/**\n\t * Checks if `path` exists on `object`.\n\t *\n\t * @private\n\t * @param {Object} object The object to query.\n\t * @param {Array|string} path The path to check.\n\t * @param {Function} hasFunc The function to check properties.\n\t * @returns {boolean} Returns `true` if `path` exists, else `false`.\n\t */\n\tfunction hasPath(object, path, hasFunc) {\n\t path = isKey(path, object) ? [path] : castPath(path);\n\t\n\t var result,\n\t index = -1,\n\t length = path.length;\n\t\n\t while (++index < length) {\n\t var key = toKey(path[index]);\n\t if (!(result = object != null && hasFunc(object, key))) {\n\t break;\n\t }\n\t object = object[key];\n\t }\n\t if (result) {\n\t return result;\n\t }\n\t var length = object ? object.length : 0;\n\t return !!length && isLength(length) && isIndex(key, length) &&\n\t (isArray(object) || isArguments(object));\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like index.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n\t * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n\t */\n\tfunction isIndex(value, length) {\n\t length = length == null ? MAX_SAFE_INTEGER : length;\n\t return !!length &&\n\t (typeof value == 'number' || reIsUint.test(value)) &&\n\t (value > -1 && value % 1 == 0 && value < length);\n\t}\n\t\n\t/**\n\t * Checks if `value` is a property name and not a property path.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @param {Object} [object] The object to query keys on.\n\t * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n\t */\n\tfunction isKey(value, object) {\n\t if (isArray(value)) {\n\t return false;\n\t }\n\t var type = typeof value;\n\t if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n\t value == null || isSymbol(value)) {\n\t return true;\n\t }\n\t return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n\t (object != null && value in Object(object));\n\t}\n\t\n\t/**\n\t * Checks if `value` is suitable for use as unique object key.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n\t */\n\tfunction isKeyable(value) {\n\t var type = typeof value;\n\t return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n\t ? (value !== '__proto__')\n\t : (value === null);\n\t}\n\t\n\t/**\n\t * Checks if `func` has its source masked.\n\t *\n\t * @private\n\t * @param {Function} func The function to check.\n\t * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n\t */\n\tfunction isMasked(func) {\n\t return !!maskSrcKey && (maskSrcKey in func);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a prototype object.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n\t */\n\tfunction isPrototype(value) {\n\t var Ctor = value && value.constructor,\n\t proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\t\n\t return value === proto;\n\t}\n\t\n\t/**\n\t * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n\t *\n\t * @private\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` if suitable for strict\n\t * equality comparisons, else `false`.\n\t */\n\tfunction isStrictComparable(value) {\n\t return value === value && !isObject(value);\n\t}\n\t\n\t/**\n\t * A specialized version of `matchesProperty` for source values suitable\n\t * for strict equality comparisons, i.e. `===`.\n\t *\n\t * @private\n\t * @param {string} key The key of the property to get.\n\t * @param {*} srcValue The value to match.\n\t * @returns {Function} Returns the new spec function.\n\t */\n\tfunction matchesStrictComparable(key, srcValue) {\n\t return function(object) {\n\t if (object == null) {\n\t return false;\n\t }\n\t return object[key] === srcValue &&\n\t (srcValue !== undefined || (key in Object(object)));\n\t };\n\t}\n\t\n\t/**\n\t * Converts `string` to a property path array.\n\t *\n\t * @private\n\t * @param {string} string The string to convert.\n\t * @returns {Array} Returns the property path array.\n\t */\n\tvar stringToPath = memoize(function(string) {\n\t string = toString(string);\n\t\n\t var result = [];\n\t if (reLeadingDot.test(string)) {\n\t result.push('');\n\t }\n\t string.replace(rePropName, function(match, number, quote, string) {\n\t result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n\t });\n\t return result;\n\t});\n\t\n\t/**\n\t * Converts `value` to a string key if it's not a string or symbol.\n\t *\n\t * @private\n\t * @param {*} value The value to inspect.\n\t * @returns {string|symbol} Returns the key.\n\t */\n\tfunction toKey(value) {\n\t if (typeof value == 'string' || isSymbol(value)) {\n\t return value;\n\t }\n\t var result = (value + '');\n\t return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n\t}\n\t\n\t/**\n\t * Converts `func` to its source code.\n\t *\n\t * @private\n\t * @param {Function} func The function to process.\n\t * @returns {string} Returns the source code.\n\t */\n\tfunction toSource(func) {\n\t if (func != null) {\n\t try {\n\t return funcToString.call(func);\n\t } catch (e) {}\n\t try {\n\t return (func + '');\n\t } catch (e) {}\n\t }\n\t return '';\n\t}\n\t\n\t/**\n\t * This method is like `_.uniq` except that it accepts `iteratee` which is\n\t * invoked for each element in `array` to generate the criterion by which\n\t * uniqueness is computed. The iteratee is invoked with one argument: (value).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Array\n\t * @param {Array} array The array to inspect.\n\t * @param {Function} [iteratee=_.identity]\n\t * The iteratee invoked per element.\n\t * @returns {Array} Returns the new duplicate free array.\n\t * @example\n\t *\n\t * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n\t * // => [2.1, 1.2]\n\t *\n\t * // The `_.property` iteratee shorthand.\n\t * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n\t * // => [{ 'x': 1 }, { 'x': 2 }]\n\t */\n\tfunction uniqBy(array, iteratee) {\n\t return (array && array.length)\n\t ? baseUniq(array, baseIteratee(iteratee, 2))\n\t : [];\n\t}\n\t\n\t/**\n\t * Creates a function that memoizes the result of `func`. If `resolver` is\n\t * provided, it determines the cache key for storing the result based on the\n\t * arguments provided to the memoized function. By default, the first argument\n\t * provided to the memoized function is used as the map cache key. The `func`\n\t * is invoked with the `this` binding of the memoized function.\n\t *\n\t * **Note:** The cache is exposed as the `cache` property on the memoized\n\t * function. Its creation may be customized by replacing the `_.memoize.Cache`\n\t * constructor with one whose instances implement the\n\t * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n\t * method interface of `delete`, `get`, `has`, and `set`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Function\n\t * @param {Function} func The function to have its output memoized.\n\t * @param {Function} [resolver] The function to resolve the cache key.\n\t * @returns {Function} Returns the new memoized function.\n\t * @example\n\t *\n\t * var object = { 'a': 1, 'b': 2 };\n\t * var other = { 'c': 3, 'd': 4 };\n\t *\n\t * var values = _.memoize(_.values);\n\t * values(object);\n\t * // => [1, 2]\n\t *\n\t * values(other);\n\t * // => [3, 4]\n\t *\n\t * object.a = 2;\n\t * values(object);\n\t * // => [1, 2]\n\t *\n\t * // Modify the result cache.\n\t * values.cache.set(object, ['a', 'b']);\n\t * values(object);\n\t * // => ['a', 'b']\n\t *\n\t * // Replace `_.memoize.Cache`.\n\t * _.memoize.Cache = WeakMap;\n\t */\n\tfunction memoize(func, resolver) {\n\t if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n\t throw new TypeError(FUNC_ERROR_TEXT);\n\t }\n\t var memoized = function() {\n\t var args = arguments,\n\t key = resolver ? resolver.apply(this, args) : args[0],\n\t cache = memoized.cache;\n\t\n\t if (cache.has(key)) {\n\t return cache.get(key);\n\t }\n\t var result = func.apply(this, args);\n\t memoized.cache = cache.set(key, result);\n\t return result;\n\t };\n\t memoized.cache = new (memoize.Cache || MapCache);\n\t return memoized;\n\t}\n\t\n\t// Assign cache to `_.memoize`.\n\tmemoize.Cache = MapCache;\n\t\n\t/**\n\t * Performs a\n\t * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n\t * comparison between two values to determine if they are equivalent.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to compare.\n\t * @param {*} other The other value to compare.\n\t * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t * var other = { 'a': 1 };\n\t *\n\t * _.eq(object, object);\n\t * // => true\n\t *\n\t * _.eq(object, other);\n\t * // => false\n\t *\n\t * _.eq('a', 'a');\n\t * // => true\n\t *\n\t * _.eq('a', Object('a'));\n\t * // => false\n\t *\n\t * _.eq(NaN, NaN);\n\t * // => true\n\t */\n\tfunction eq(value, other) {\n\t return value === other || (value !== value && other !== other);\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely an `arguments` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArguments(function() { return arguments; }());\n\t * // => true\n\t *\n\t * _.isArguments([1, 2, 3]);\n\t * // => false\n\t */\n\tfunction isArguments(value) {\n\t // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n\t return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n\t (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as an `Array` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n\t * @example\n\t *\n\t * _.isArray([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArray(document.body.children);\n\t * // => false\n\t *\n\t * _.isArray('abc');\n\t * // => false\n\t *\n\t * _.isArray(_.noop);\n\t * // => false\n\t */\n\tvar isArray = Array.isArray;\n\t\n\t/**\n\t * Checks if `value` is array-like. A value is considered array-like if it's\n\t * not a function and has a `value.length` that's an integer greater than or\n\t * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n\t * @example\n\t *\n\t * _.isArrayLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLike(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLike('abc');\n\t * // => true\n\t *\n\t * _.isArrayLike(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLike(value) {\n\t return value != null && isLength(value.length) && !isFunction(value);\n\t}\n\t\n\t/**\n\t * This method is like `_.isArrayLike` except that it also checks if `value`\n\t * is an object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an array-like object,\n\t * else `false`.\n\t * @example\n\t *\n\t * _.isArrayLikeObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject(document.body.children);\n\t * // => true\n\t *\n\t * _.isArrayLikeObject('abc');\n\t * // => false\n\t *\n\t * _.isArrayLikeObject(_.noop);\n\t * // => false\n\t */\n\tfunction isArrayLikeObject(value) {\n\t return isObjectLike(value) && isArrayLike(value);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a `Function` object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n\t * @example\n\t *\n\t * _.isFunction(_);\n\t * // => true\n\t *\n\t * _.isFunction(/abc/);\n\t * // => false\n\t */\n\tfunction isFunction(value) {\n\t // The use of `Object#toString` avoids issues with the `typeof` operator\n\t // in Safari 8-9 which returns 'object' for typed array and other constructors.\n\t var tag = isObject(value) ? objectToString.call(value) : '';\n\t return tag == funcTag || tag == genTag;\n\t}\n\t\n\t/**\n\t * Checks if `value` is a valid array-like length.\n\t *\n\t * **Note:** This method is loosely based on\n\t * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n\t * @example\n\t *\n\t * _.isLength(3);\n\t * // => true\n\t *\n\t * _.isLength(Number.MIN_VALUE);\n\t * // => false\n\t *\n\t * _.isLength(Infinity);\n\t * // => false\n\t *\n\t * _.isLength('3');\n\t * // => false\n\t */\n\tfunction isLength(value) {\n\t return typeof value == 'number' &&\n\t value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n\t}\n\t\n\t/**\n\t * Checks if `value` is the\n\t * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n\t * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 0.1.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n\t * @example\n\t *\n\t * _.isObject({});\n\t * // => true\n\t *\n\t * _.isObject([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObject(_.noop);\n\t * // => true\n\t *\n\t * _.isObject(null);\n\t * // => false\n\t */\n\tfunction isObject(value) {\n\t var type = typeof value;\n\t return !!value && (type == 'object' || type == 'function');\n\t}\n\t\n\t/**\n\t * Checks if `value` is object-like. A value is object-like if it's not `null`\n\t * and has a `typeof` result of \"object\".\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n\t * @example\n\t *\n\t * _.isObjectLike({});\n\t * // => true\n\t *\n\t * _.isObjectLike([1, 2, 3]);\n\t * // => true\n\t *\n\t * _.isObjectLike(_.noop);\n\t * // => false\n\t *\n\t * _.isObjectLike(null);\n\t * // => false\n\t */\n\tfunction isObjectLike(value) {\n\t return !!value && typeof value == 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a `Symbol` primitive or object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n\t * @example\n\t *\n\t * _.isSymbol(Symbol.iterator);\n\t * // => true\n\t *\n\t * _.isSymbol('abc');\n\t * // => false\n\t */\n\tfunction isSymbol(value) {\n\t return typeof value == 'symbol' ||\n\t (isObjectLike(value) && objectToString.call(value) == symbolTag);\n\t}\n\t\n\t/**\n\t * Checks if `value` is classified as a typed array.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.0.0\n\t * @category Lang\n\t * @param {*} value The value to check.\n\t * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n\t * @example\n\t *\n\t * _.isTypedArray(new Uint8Array);\n\t * // => true\n\t *\n\t * _.isTypedArray([]);\n\t * // => false\n\t */\n\tvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\t\n\t/**\n\t * Converts `value` to a string. An empty string is returned for `null`\n\t * and `undefined` values. The sign of `-0` is preserved.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Lang\n\t * @param {*} value The value to process.\n\t * @returns {string} Returns the string.\n\t * @example\n\t *\n\t * _.toString(null);\n\t * // => ''\n\t *\n\t * _.toString(-0);\n\t * // => '-0'\n\t *\n\t * _.toString([1, 2, 3]);\n\t * // => '1,2,3'\n\t */\n\tfunction toString(value) {\n\t return value == null ? '' : baseToString(value);\n\t}\n\t\n\t/**\n\t * Gets the value at `path` of `object`. If the resolved value is\n\t * `undefined`, the `defaultValue` is returned in its place.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 3.7.0\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @param {Array|string} path The path of the property to get.\n\t * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n\t * @returns {*} Returns the resolved value.\n\t * @example\n\t *\n\t * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n\t *\n\t * _.get(object, 'a[0].b.c');\n\t * // => 3\n\t *\n\t * _.get(object, ['a', '0', 'b', 'c']);\n\t * // => 3\n\t *\n\t * _.get(object, 'a.b.c', 'default');\n\t * // => 'default'\n\t */\n\tfunction get(object, path, defaultValue) {\n\t var result = object == null ? undefined : baseGet(object, path);\n\t return result === undefined ? defaultValue : result;\n\t}\n\t\n\t/**\n\t * Checks if `path` is a direct or inherited property of `object`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 4.0.0\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @param {Array|string} path The path to check.\n\t * @returns {boolean} Returns `true` if `path` exists, else `false`.\n\t * @example\n\t *\n\t * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n\t *\n\t * _.hasIn(object, 'a');\n\t * // => true\n\t *\n\t * _.hasIn(object, 'a.b');\n\t * // => true\n\t *\n\t * _.hasIn(object, ['a', 'b']);\n\t * // => true\n\t *\n\t * _.hasIn(object, 'b');\n\t * // => false\n\t */\n\tfunction hasIn(object, path) {\n\t return object != null && hasPath(object, path, baseHasIn);\n\t}\n\t\n\t/**\n\t * Creates an array of the own enumerable property names of `object`.\n\t *\n\t * **Note:** Non-object values are coerced to objects. See the\n\t * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n\t * for more details.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Object\n\t * @param {Object} object The object to query.\n\t * @returns {Array} Returns the array of property names.\n\t * @example\n\t *\n\t * function Foo() {\n\t * this.a = 1;\n\t * this.b = 2;\n\t * }\n\t *\n\t * Foo.prototype.c = 3;\n\t *\n\t * _.keys(new Foo);\n\t * // => ['a', 'b'] (iteration order is not guaranteed)\n\t *\n\t * _.keys('hi');\n\t * // => ['0', '1']\n\t */\n\tfunction keys(object) {\n\t return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n\t}\n\t\n\t/**\n\t * This method returns the first argument it receives.\n\t *\n\t * @static\n\t * @since 0.1.0\n\t * @memberOf _\n\t * @category Util\n\t * @param {*} value Any value.\n\t * @returns {*} Returns `value`.\n\t * @example\n\t *\n\t * var object = { 'a': 1 };\n\t *\n\t * console.log(_.identity(object) === object);\n\t * // => true\n\t */\n\tfunction identity(value) {\n\t return value;\n\t}\n\t\n\t/**\n\t * This method returns `undefined`.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 2.3.0\n\t * @category Util\n\t * @example\n\t *\n\t * _.times(2, _.noop);\n\t * // => [undefined, undefined]\n\t */\n\tfunction noop() {\n\t // No operation performed.\n\t}\n\t\n\t/**\n\t * Creates a function that returns the value at `path` of a given object.\n\t *\n\t * @static\n\t * @memberOf _\n\t * @since 2.4.0\n\t * @category Util\n\t * @param {Array|string} path The path of the property to get.\n\t * @returns {Function} Returns the new accessor function.\n\t * @example\n\t *\n\t * var objects = [\n\t * { 'a': { 'b': 2 } },\n\t * { 'a': { 'b': 1 } }\n\t * ];\n\t *\n\t * _.map(objects, _.property('a.b'));\n\t * // => [2, 1]\n\t *\n\t * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n\t * // => [1, 2]\n\t */\n\tfunction property(path) {\n\t return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n\t}\n\t\n\tmodule.exports = uniqBy;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(/*! ./../webpack/buildin/module.js */ 23)(module)))\n\n/***/ },\n/* 104 */\n/*!*******************************!*\\\n !*** ./src/icons/03-stop.svg ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M1.712 1.24h12.6v13.52h-12.6z\\\"></path></svg>\"\n\n/***/ },\n/* 105 */\n/*!*********************************!*\\\n !*** ./src/icons/04-volume.svg ***!\n \\*********************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z\\\"></path></svg>\"\n\n/***/ },\n/* 106 */\n/*!*******************************!*\\\n !*** ./src/icons/05-mute.svg ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z\\\"></path></svg>\"\n\n/***/ },\n/* 107 */\n/*!*********************************!*\\\n !*** ./src/icons/06-expand.svg ***!\n \\*********************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z\\\"></path></svg>\"\n\n/***/ },\n/* 108 */\n/*!*********************************!*\\\n !*** ./src/icons/07-shrink.svg ***!\n \\*********************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z\\\"></path></svg>\"\n\n/***/ },\n/* 109 */\n/*!*****************************!*\\\n !*** ./src/icons/08-hd.svg ***!\n \\*****************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z\\\"></path></svg>\"\n\n/***/ },\n/* 110 */\n/*!***********************************************!*\\\n !*** ./src/components/core/public/Roboto.ttf ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__.p + \"38861cba61c66739c1452c3a71e39852.ttf\";\n\n/***/ },\n/* 111 */\n/*!***********************************************!*\\\n !*** ./src/playbacks/flash/public/Player.swf ***!\n \\***********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__.p + \"4b76590b32dab62bc95c1b7951efae78.swf\";\n\n/***/ },\n/* 112 */\n/*!****************************************************!*\\\n !*** ./src/playbacks/flashls/public/HLSPlayer.swf ***!\n \\****************************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__.p + \"809981e5b09d5336c45d72d0869ada2a.swf\";\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// clappr.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"<%=baseUrl%>/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d556a0cfcd71319135ca","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport Player from 'components/player'\nimport Utils from 'base/utils'\nimport Events from 'base/events'\nimport Playback from 'base/playback'\nimport ContainerPlugin from 'base/container_plugin'\nimport CorePlugin from 'base/core_plugin'\nimport UICorePlugin from 'base/ui_core_plugin'\nimport UIContainerPlugin from 'base/ui_container_plugin'\nimport BaseObject from 'base/base_object'\nimport UIObject from 'base/ui_object'\nimport Browser from 'components/browser'\nimport Container from 'components/container'\nimport Core from 'components/core'\nimport Loader from 'components/loader'\nimport Mediator from 'components/mediator'\nimport MediaControl from 'components/media_control'\nimport PlayerInfo from 'components/player_info'\nimport BaseFlashPlayback from 'playbacks/base_flash_playback'\nimport Flash from 'playbacks/flash'\nimport FlasHLS from 'playbacks/flashls'\nimport HLS from 'playbacks/hls'\nimport HTML5Audio from 'playbacks/html5_audio'\nimport HTML5Video from 'playbacks/html5_video'\nimport HTMLImg from 'playbacks/html_img'\nimport NoOp from 'playbacks/no_op'\nimport Poster from 'plugins/poster'\nimport Log from 'plugins/log'\nimport Styler from 'base/styler'\nimport Vendor from 'vendor'\nimport template from 'base/template'\n\nimport $ from 'clappr-zepto'\n\nconst version = VERSION\n\nexport default {\n Player,\n Mediator,\n Events,\n Browser,\n PlayerInfo,\n MediaControl,\n ContainerPlugin,\n UIContainerPlugin,\n CorePlugin,\n UICorePlugin,\n Playback,\n Container,\n Core,\n Loader,\n BaseObject,\n UIObject,\n Utils,\n BaseFlashPlayback,\n Flash,\n FlasHLS,\n HLS,\n HTML5Audio,\n HTML5Video,\n HTMLImg,\n NoOp,\n Poster,\n Log,\n Styler,\n Vendor,\n version,\n template,\n $\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport Log from 'plugins/log'\nimport {uniqueId} from './utils'\nimport execOnce from 'lodash.once'\n\nconst slice = Array.prototype.slice\n\nconst eventSplitter = /\\s+/\n\nconst eventsApi = function(obj, action, name, rest) {\n if (!name) {return true}\n\n // Handle event maps.\n if (typeof name === 'object') {\n for (const key in name) {\n obj[action].apply(obj, [key, name[key]].concat(rest))\n }\n return false\n }\n\n // Handle space separated event names.\n if (eventSplitter.test(name)) {\n const names = name.split(eventSplitter)\n for (let i = 0, l = names.length; i < l; i++) {\n obj[action].apply(obj, [names[i]].concat(rest))\n }\n return false\n }\n\n return true\n}\n\nconst triggerEvents = function(events, args, klass, name) {\n let ev, i = -1\n const l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]\n run()\n\n function run() {\n try {\n switch (args.length) {\n case 0: while (++i < l) { (ev = events[i]).callback.call(ev.ctx) } return\n case 1: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1) } return\n case 2: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2) } return\n case 3: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2, a3) } return\n default: while (++i < l) { (ev = events[i]).callback.apply(ev.ctx, args) } return\n }\n } catch (exception) {\n Log.error.apply(Log, [klass, 'error on event', name, 'trigger','-', exception])\n run()\n }\n }\n}\n\n/**\n * @class Events\n * @constructor\n * @module base\n */\nexport default class Events {\n /**\n * listen to an event indefinitely, if you want to stop you need to call `off`\n * @method on\n * @param {String} name\n * @param {Function} callback\n * @param {Object} context\n */\n on(name, callback, context) {\n if (!eventsApi(this, 'on', name, [callback, context]) || !callback) {return this}\n this._events || (this._events = {})\n const events = this._events[name] || (this._events[name] = [])\n events.push({callback: callback, context: context, ctx: context || this})\n return this\n }\n\n /**\n * listen to an event only once\n * @method once\n * @param {String} name\n * @param {Function} callback\n * @param {Object} context\n */\n once(name, callback, context) {\n if (!eventsApi(this, 'once', name, [callback, context]) || !callback) {return this}\n const self = this\n const once = execOnce(function() {\n self.off(name, once)\n callback.apply(this, arguments)\n })\n once._callback = callback\n return this.on(name, once, context)\n }\n\n /**\n * stop listening to an event\n * @method off\n * @param {String} name\n * @param {Function} callback\n * @param {Object} context\n */\n off(name, callback, context) {\n let retain, ev, events, names, i, l, j, k\n if (!this._events || !eventsApi(this, 'off', name, [callback, context])) {return this}\n if (!name && !callback && !context) {\n this._events = void 0\n return this\n }\n names = name ? [name] : Object.keys(this._events)\n // jshint maxdepth:5\n for (i = 0, l = names.length; i < l; i++) {\n name = names[i]\n events = this._events[name]\n if (events) {\n this._events[name] = retain = []\n if (callback || context) {\n for (j = 0, k = events.length; j < k; j++) {\n ev = events[j]\n if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||\n (context && context !== ev.context)) {\n retain.push(ev)\n }\n }\n }\n if (!retain.length) {delete this._events[name]}\n }\n }\n return this\n }\n\n /**\n * triggers an event given its `name`\n * @method trigger\n * @param {String} name\n */\n trigger(name) {\n const klass = this.name || this.constructor.name\n Log.debug.apply(Log, [klass].concat(Array.prototype.slice.call(arguments)))\n if (!this._events) {return this}\n const args = slice.call(arguments, 1)\n if (!eventsApi(this, 'trigger', name, args)) {return this}\n const events = this._events[name]\n const allEvents = this._events.all\n if (events) {triggerEvents(events, args, klass, name)}\n if (allEvents) {triggerEvents(allEvents, arguments, klass, name)}\n return this\n }\n\n /**\n * stop listening an event for a given object\n * @method stopListening\n * @param {Object} obj\n * @param {String} name\n * @param {Function} callback\n */\n stopListening(obj, name, callback) {\n let listeningTo = this._listeningTo\n if (!listeningTo) {return this}\n const remove = !name && !callback\n if (!callback && typeof name === 'object') {callback = this}\n if (obj) {(listeningTo = {})[obj._listenId] = obj}\n for (const id in listeningTo) {\n obj = listeningTo[id]\n obj.off(name, callback, this)\n if (remove || Object.keys(obj._events).length === 0) {delete this._listeningTo[id]}\n }\n return this\n }\n}\n\n\n/**\n * listen to an event indefinitely for a given `obj`\n * @method listenTo\n * @param {Object} obj\n * @param {String} name\n * @param {Function} callback\n * @param {Object} context\n * @example\n * ```javascript\n * this.listenTo(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)\n * ```\n */\n/**\n * listen to an event once for a given `obj`\n * @method listenToOnce\n * @param {Object} obj\n * @param {String} name\n * @param {Function} callback\n * @param {Object} context\n * @example\n * ```javascript\n * this.listenToOnce(this.core.playback, Events.PLAYBACK_PAUSE, this.callback)\n * ```\n */\nconst listenMethods = {listenTo: 'on', listenToOnce: 'once'}\n\nObject.keys(listenMethods).forEach(function(method) {\n Events.prototype[method] = function(obj, name, callback) {\n const listeningTo = this._listeningTo || (this._listeningTo = {})\n const id = obj._listenId || (obj._listenId = uniqueId('l'))\n listeningTo[id] = obj\n if (!callback && typeof name === 'object') {callback = this}\n obj[listenMethods[method]](name, callback, this)\n return this\n }\n})\n\n// PLAYER EVENTS\n/**\n * Fired when the player is ready on startup\n *\n * @event PLAYER_READY\n */\nEvents.PLAYER_READY = 'ready'\n/**\n * Fired when player resizes\n *\n * @event PLAYER_RESIZE\n * @param {Object} currentSize an object with the current size\n */\nEvents.PLAYER_RESIZE = 'resize'\n/**\n * Fired when player changes its fullscreen state\n *\n * @event PLAYER_FULLSCREEN\n * @param {Boolean} whether or not the player is on fullscreen mode\n */\nEvents.PLAYER_FULLSCREEN = 'fullscreen'\n/**\n * Fired when player starts to play\n *\n * @event PLAYER_PLAY\n */\nEvents.PLAYER_PLAY = 'play'\n/**\n * Fired when player pauses\n *\n * @event PLAYER_PAUSE\n */\nEvents.PLAYER_PAUSE = 'pause'\n/**\n * Fired when player stops\n *\n * @event PLAYER_STOP\n */\nEvents.PLAYER_STOP = 'stop'\n/**\n * Fired when player ends the video\n *\n * @event PLAYER_ENDED\n */\nEvents.PLAYER_ENDED = 'ended'\n/**\n * Fired when player seeks the video\n *\n * @event PLAYER_SEEK\n * @param {Number} time the current time in seconds\n */\nEvents.PLAYER_SEEK = 'seek'\n/**\n * Fired when player receives an error\n *\n * @event PLAYER_ERROR\n * @param {Object} error the error\n */\nEvents.PLAYER_ERROR = 'error'\n/**\n * Fired when the time is updated on player\n *\n * @event PLAYER_TIMEUPDATE\n * @param {Object} progress Data\n * progress object\n * @param {Number} [progress.current]\n * current time\n * @param {Number} [progress.total]\n * total time\n */\nEvents.PLAYER_TIMEUPDATE = 'timeupdate'\n/**\n * Fired when player updates its volume\n *\n * @event PLAYER_VOLUMEUPDATE\n * @param {Number} volume the current volume\n */\nEvents.PLAYER_VOLUMEUPDATE = 'volumeupdate'\n\n// Playback Events\n/**\n * Fired when the playback is downloading the media\n *\n * @event PLAYBACK_PROGRESS\n * @param progress {Object}\n * Data progress object\n * @param [progress.start] {Number}\n * start position of buffered content at current position\n * @param [progress.current] {Number}\n * end position of buffered content at current position\n * @param [progress.total] {Number}\n * total content to be downloaded\n * @param buffered {Array}\n * array of buffered segments ({start, end}). [Only for supported playbacks]\n */\nEvents.PLAYBACK_PROGRESS = 'playback:progress'\n/**\n * Fired when the time is updated on playback\n *\n * @event PLAYBACK_TIMEUPDATE\n * @param {Object} progress Data\n * progress object\n * @param {Number} [progress.current]\n * current time\n * @param {Number} [progress.total]\n * total time\n */\nEvents.PLAYBACK_TIMEUPDATE = 'playback:timeupdate'\n/**\n * Fired when playback is ready\n *\n * @event PLAYBACK_READY\n */\nEvents.PLAYBACK_READY = 'playback:ready'\n/**\n * Fired when the playback starts having to buffer because\n * playback can currently not be smooth.\n *\n * This corresponds to the playback `buffering` property being\n * `true`.\n *\n * @event PLAYBACK_BUFFERING\n */\nEvents.PLAYBACK_BUFFERING = 'playback:buffering'\n/**\n * Fired when the playback has enough in the buffer to be\n * able to play smoothly, after previously being unable to\n * do this.\n *\n * This corresponds to the playback `buffering` property being\n * `false`.\n *\n * @event PLAYBACK_BUFFERFULL\n */\nEvents.PLAYBACK_BUFFERFULL = 'playback:bufferfull'\n/**\n * Fired when playback changes any settings (volume, seek and etc)\n *\n * @event PLAYBACK_SETTINGSUPDATE\n */\nEvents.PLAYBACK_SETTINGSUPDATE = 'playback:settingsupdate'\n/**\n * Fired when playback loaded its metadata\n *\n * @event PLAYBACK_LOADEDMETADATA\n * @param {Object} metadata Data\n * settings object\n * @param {Number} [metadata.duration]\n * the playback duration\n * @param {Object} [metadata.data]\n * extra meta data\n */\nEvents.PLAYBACK_LOADEDMETADATA = 'playback:loadedmetadata'\n/**\n * Fired when playback updates its video quality\n *\n * @event PLAYBACK_HIGHDEFINITIONUPDATE\n * @param {Boolean} isHD\n * true when is on HD, false otherwise\n */\nEvents.PLAYBACK_HIGHDEFINITIONUPDATE = 'playback:highdefinitionupdate'\n/**\n * Fired when playback updates its bitrate\n *\n * @event PLAYBACK_BITRATE\n * @param {Object} bitrate Data\n * bitrate object\n * @param {Number} [bitrate.bandwidth]\n * bitrate bandwidth when it's available\n * @param {Number} [bitrate.width]\n * playback width (ex: 720, 640, 1080)\n * @param {Number} [bitrate.height]\n * playback height (ex: 240, 480, 720)\n * @param {Number} [bitrate.level]\n * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)\n */\nEvents.PLAYBACK_BITRATE = 'playback:bitrate'\n/**\n * Fired when the playback has its levels\n *\n * @event PLAYBACK_LEVELS_AVAILABLE\n * @param {Array} levels\n * the ordered levels, each one with the following format `{id: 1, label: '500kbps'}` ps: id should be a number >= 0\n * @param {Number} initial\n * the initial level otherwise -1 (AUTO)\n */\nEvents.PLAYBACK_LEVELS_AVAILABLE = 'playback:levels:available'\n/**\n * Fired when the playback starts to switch level\n *\n * @event PLAYBACK_LEVEL_SWITCH_START\n *\n */\nEvents.PLAYBACK_LEVEL_SWITCH_START = 'playback:levels:switch:start'\n/**\n * Fired when the playback ends the level switch\n *\n * @event PLAYBACK_LEVEL_SWITCH_END\n *\n */\nEvents.PLAYBACK_LEVEL_SWITCH_END = 'playback:levels:switch:end'\n\n/**\n * Fired when playback internal state changes\n *\n * @event PLAYBACK_PLAYBACKSTATE\n * @param {Object} state Data\n * state object\n * @param {String} [state.type]\n * the playback type\n */\nEvents.PLAYBACK_PLAYBACKSTATE = 'playback:playbackstate'\n/**\n * Fired when DVR becomes enabled/disabled.\n *\n * @event PLAYBACK_DVR\n * @param {boolean} state true if dvr enabled\n */\nEvents.PLAYBACK_DVR = 'playback:dvr'\n// TODO doc\nEvents.PLAYBACK_MEDIACONTROL_DISABLE = 'playback:mediacontrol:disable'\n// TODO doc\nEvents.PLAYBACK_MEDIACONTROL_ENABLE = 'playback:mediacontrol:enable'\n/**\n * Fired when the media for a playback ends.\n *\n * @event PLAYBACK_ENDED\n * @param {String} name the name of the playback\n */\nEvents.PLAYBACK_ENDED = 'playback:ended'\n/**\n * Fired when user requests `play()`\n *\n * @event PLAYBACK_PLAY_INTENT\n */\nEvents.PLAYBACK_PLAY_INTENT = 'playback:play:intent'\n/**\n * Fired when the media for a playback starts playing.\n * This is not necessarily when the user requests `play()`\n * The media may have to buffer first.\n * I.e. `isPlaying()` might return `true` before this event is fired,\n * because `isPlaying()` represents the intended state.\n *\n * @event PLAYBACK_PLAY\n */\nEvents.PLAYBACK_PLAY = 'playback:play'\n/**\n * Fired when the media for a playback pauses.\n *\n * @event PLAYBACK_PAUSE\n */\nEvents.PLAYBACK_PAUSE = 'playback:pause'\n/**\n * Fired when the media for a playback is stopped.\n *\n * @event PLAYBACK_STOP\n */\nEvents.PLAYBACK_STOP = 'playback:stop'\n/**\n * Fired if an error occurs in the playback.\n *\n * @event PLAYBACK_ERROR\n * @param {Object} error An object containing the error details\n * @param {String} name Playback name\n */\nEvents.PLAYBACK_ERROR = 'playback:error'\n// TODO doc\nEvents.PLAYBACK_STATS_ADD = 'playback:stats:add'\n// TODO doc\nEvents.PLAYBACK_FRAGMENT_LOADED = 'playback:fragment:loaded'\n// TODO doc\nEvents.PLAYBACK_LEVEL_SWITCH = 'playback:level:switch'\n\n/**\n * Fired when the options were changed for the core\n *\n * @event CORE_OPTIONS_CHANGE\n */\nEvents.CORE_OPTIONS_CHANGE = 'core:options:change'\n/**\n * Fired after creating containers, when the core is ready\n *\n * @event CORE_READY\n */\nEvents.CORE_READY = 'core:ready'\n/**\n * Fired when the fullscreen state change\n *\n * @param {Boolean} whether or not the player is on fullscreen mode\n * @event CORE_READY\n */\nEvents.CORE_FULLSCREEN = 'core:fullscreen'\n\n// Container Events\n/**\n * Fired when the container internal state changes\n *\n * @event CONTAINER_PLAYBACKSTATE\n * @param {Object} state Data\n * state object\n * @param {String} [state.type]\n * the playback type\n */\nEvents.CONTAINER_PLAYBACKSTATE = 'container:playbackstate'\nEvents.CONTAINER_PLAYBACKDVRSTATECHANGED = 'container:dvr'\n/**\n * Fired when the container updates its bitrate\n *\n * @event CONTAINER_BITRATE\n * @param {Object} bitrate Data\n * bitrate object\n * @param {Number} [bitrate.bandwidth]\n * bitrate bandwidth when it's available\n * @param {Number} [bitrate.width]\n * playback width (ex: 720, 640, 1080)\n * @param {Number} [bitrate.height]\n * playback height (ex: 240, 480, 720)\n * @param {Number} [bitrate.level]\n * playback level when it's available, it could be just a map for width (0 => 240, 1 => 480, 2 => 720)\n */\nEvents.CONTAINER_BITRATE = 'container:bitrate'\nEvents.CONTAINER_STATS_REPORT = 'container:stats:report'\nEvents.CONTAINER_DESTROYED = 'container:destroyed'\n/**\n * Fired when the container is ready\n *\n * @event CONTAINER_READY\n */\nEvents.CONTAINER_READY = 'container:ready'\nEvents.CONTAINER_ERROR = 'container:error'\n/**\n * Fired when the container loaded its metadata\n *\n * @event CONTAINER_LOADEDMETADATA\n * @param {Object} metadata Data\n * settings object\n * @param {Number} [metadata.duration]\n * the playback duration\n * @param {Object} [metadata.data]\n * extra meta data\n */\nEvents.CONTAINER_LOADEDMETADATA = 'container:loadedmetadata'\n/**\n * Fired when the time is updated on container\n *\n * @event CONTAINER_TIMEUPDATE\n * @param {Object} progress Data\n * progress object\n * @param {Number} [progress.current]\n * current time\n * @param {Number} [progress.total]\n * total time\n */\nEvents.CONTAINER_TIMEUPDATE = 'container:timeupdate'\n/**\n * Fired when the container is downloading the media\n *\n * @event CONTAINER_PROGRESS\n * @param {Object} progress Data\n * progress object\n * @param {Number} [progress.start]\n * initial downloaded content\n * @param {Number} [progress.current]\n * current dowloaded content\n * @param {Number} [progress.total]\n * total content to be downloaded\n */\nEvents.CONTAINER_PROGRESS = 'container:progress'\nEvents.CONTAINER_PLAY = 'container:play'\nEvents.CONTAINER_STOP = 'container:stop'\nEvents.CONTAINER_PAUSE = 'container:pause'\nEvents.CONTAINER_ENDED = 'container:ended'\nEvents.CONTAINER_CLICK = 'container:click'\nEvents.CONTAINER_DBLCLICK = 'container:dblclick'\nEvents.CONTAINER_CONTEXTMENU = 'container:contextmenu'\nEvents.CONTAINER_MOUSE_ENTER = 'container:mouseenter'\nEvents.CONTAINER_MOUSE_LEAVE = 'container:mouseleave'\n/**\n * Fired when the container seeks the video\n *\n * @event CONTAINER_SEEK\n * @param {Number} time the current time in seconds\n */\nEvents.CONTAINER_SEEK = 'container:seek'\nEvents.CONTAINER_VOLUME = 'container:volume'\nEvents.CONTAINER_FULLSCREEN = 'container:fullscreen'\n/**\n * Fired when container is buffering\n *\n * @event CONTAINER_STATE_BUFFERING\n */\nEvents.CONTAINER_STATE_BUFFERING = 'container:state:buffering'\n/**\n * Fired when the container filled the buffer\n *\n * @event CONTAINER_STATE_BUFFERFULL\n */\nEvents.CONTAINER_STATE_BUFFERFULL = 'container:state:bufferfull'\n/**\n * Fired when the container changes any settings (volume, seek and etc)\n *\n * @event CONTAINER_SETTINGSUPDATE\n */\nEvents.CONTAINER_SETTINGSUPDATE = 'container:settingsupdate'\n/**\n * Fired when container updates its video quality\n *\n * @event CONTAINER_HIGHDEFINITIONUPDATE\n * @param {Boolean} isHD\n * true when is on HD, false otherwise\n */\nEvents.CONTAINER_HIGHDEFINITIONUPDATE = 'container:highdefinitionupdate'\n\n/**\n * Fired when the media control shows\n *\n * @event CONTAINER_MEDIACONTROL_SHOW\n */\nEvents.CONTAINER_MEDIACONTROL_SHOW = 'container:mediacontrol:show'\n/**\n * Fired when the media control hides\n *\n * @event CONTAINER_MEDIACONTROL_HIDE\n */\nEvents.CONTAINER_MEDIACONTROL_HIDE = 'container:mediacontrol:hide'\n\nEvents.CONTAINER_MEDIACONTROL_DISABLE = 'container:mediacontrol:disable'\nEvents.CONTAINER_MEDIACONTROL_ENABLE = 'container:mediacontrol:enable'\nEvents.CONTAINER_STATS_ADD = 'container:stats:add'\n/**\n * Fired when the options were changed for the container\n *\n * @event CONTAINER_OPTIONS_CHANGE\n */\nEvents.CONTAINER_OPTIONS_CHANGE = 'container:options:change'\n\n// MediaControl Events\nEvents.MEDIACONTROL_RENDERED = 'mediacontrol:rendered'\n/**\n * Fired when the player enters/exit on fullscreen\n *\n * @event MEDIACONTROL_FULLSCREEN\n */\nEvents.MEDIACONTROL_FULLSCREEN = 'mediacontrol:fullscreen'\n/**\n * Fired when the media control shows\n *\n * @event MEDIACONTROL_SHOW\n */\nEvents.MEDIACONTROL_SHOW = 'mediacontrol:show'\n/**\n * Fired when the media control hides\n *\n * @event MEDIACONTROL_HIDE\n */\nEvents.MEDIACONTROL_HIDE = 'mediacontrol:hide'\n/**\n * Fired when mouse enters on the seekbar\n *\n * @event MEDIACONTROL_MOUSEMOVE_SEEKBAR\n * @param {Object} event\n * the javascript event\n */\nEvents.MEDIACONTROL_MOUSEMOVE_SEEKBAR = 'mediacontrol:mousemove:seekbar'\n/**\n * Fired when mouse leaves the seekbar\n *\n * @event MEDIACONTROL_MOUSELEAVE_SEEKBAR\n * @param {Object} event\n * the javascript event\n */\nEvents.MEDIACONTROL_MOUSELEAVE_SEEKBAR = 'mediacontrol:mouseleave:seekbar'\n/**\n * Fired when the media is being played\n *\n * @event MEDIACONTROL_PLAYING\n */\nEvents.MEDIACONTROL_PLAYING = 'mediacontrol:playing'\n/**\n * Fired when the media is not being played\n *\n * @event MEDIACONTROL_NOTPLAYING\n */\nEvents.MEDIACONTROL_NOTPLAYING = 'mediacontrol:notplaying'\n/**\n * Fired when the container was changed\n *\n * @event MEDIACONTROL_CONTAINERCHANGED\n */\nEvents.MEDIACONTROL_CONTAINERCHANGED = 'mediacontrol:containerchanged'\n\n// Core Events\nEvents.CORE_CONTAINERS_CREATED = 'core:containers:created'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/events.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n/*jshint -W079 */\n\nimport Browser from 'components/browser'\n\nfunction assign(obj, source) {\n if (source) {\n for (const prop in source) {\n const propDescriptor = Object.getOwnPropertyDescriptor(source, prop)\n propDescriptor ? Object.defineProperty(obj, prop, propDescriptor) : obj[prop] = source[prop]\n }\n }\n return obj\n}\n\nexport function extend(parent, properties) {\n class Surrogate extends parent {\n constructor(...args) {\n super(...args)\n if (properties.initialize) {\n properties.initialize.apply(this, args)\n }\n }\n }\n assign(Surrogate.prototype, properties)\n return Surrogate\n}\n\nexport function formatTime(time, paddedHours) {\n if (!isFinite(time)) {\n return '--:--'\n }\n time = time * 1000\n time = parseInt(time/1000)\n const seconds = time % 60\n time = parseInt(time/60)\n const minutes = time % 60\n time = parseInt(time/60)\n const hours = time % 24\n const days = parseInt(time/24)\n let out = ''\n if (days && days > 0) {\n out += days + ':'\n if (hours < 1) {out += '00:'}\n }\n if (hours && hours > 0 || paddedHours) {out += ('0' + hours).slice(-2) + ':'}\n out += ('0' + minutes).slice(-2) + ':'\n out += ('0' + seconds).slice(-2)\n return out.trim()\n}\n\nexport const Fullscreen = {\n isFullscreen: function() {\n return !!(\n document.webkitFullscreenElement ||\n document.webkitIsFullScreen ||\n document.mozFullScreen ||\n document.msFullscreenElement\n )\n },\n requestFullscreen: function(el) {\n if(el.requestFullscreen) {\n el.requestFullscreen()\n } else if(el.webkitRequestFullscreen) {\n el.webkitRequestFullscreen()\n } else if(el.mozRequestFullScreen) {\n el.mozRequestFullScreen()\n } else if(el.msRequestFullscreen) {\n el.msRequestFullscreen()\n } else if (el.querySelector && el.querySelector('video') && el.querySelector('video').webkitEnterFullScreen) {\n el.querySelector('video').webkitEnterFullScreen()\n }\n },\n cancelFullscreen: function() {\n if(document.exitFullscreen) {\n document.exitFullscreen()\n } else if(document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen()\n } else if(document.webkitExitFullscreen) {\n document.webkitExitFullscreen()\n } else if(document.mozCancelFullScreen) {\n document.mozCancelFullScreen()\n } else if(document.msExitFullscreen) {\n document.msExitFullscreen()\n }\n },\n fullscreenEnabled: function() {\n return !!(\n document.fullscreenEnabled ||\n document.webkitFullscreenEnabled ||\n document.mozFullScreenEnabled ||\n document.msFullscreenEnabled\n )\n }\n}\n\nexport class Config {\n\n static _defaultConfig() {\n return {\n volume: {\n value: 100,\n parse: parseInt\n }\n }\n }\n\n static _defaultValueFor(key) {\n try {\n return this._defaultConfig()[key].parse(this._defaultConfig()[key].value)\n } catch(e) {\n return undefined\n }\n }\n\n static _createKeyspace(key){\n return `clappr.${document.domain}.${key}`\n }\n\n static restore(key) {\n if (Browser.hasLocalstorage && localStorage[this._createKeyspace(key)]){\n return this._defaultConfig()[key].parse(localStorage[this._createKeyspace(key)])\n }\n return this._defaultValueFor(key)\n }\n\n static persist(key, value) {\n if (Browser.hasLocalstorage) {\n try {\n localStorage[this._createKeyspace(key)] = value\n return true\n } catch(e) {\n return false\n }\n }\n }\n}\n\nexport class QueryString {\n static get params() {\n const query = window.location.search.substring(1)\n if (query !== this.query) {\n this._urlParams = this.parse(query)\n this.query = query\n }\n return this._urlParams\n }\n\n static get hashParams() {\n const hash = window.location.hash.substring(1)\n if (hash !== this.hash) {\n this._hashParams = this.parse(hash)\n this.hash = hash\n }\n return this._hashParams\n }\n\n static parse(paramsString) {\n let match\n const pl = /\\+/g, // Regex for replacing addition symbol with a space\n search = /([^&=]+)=?([^&]*)/g,\n decode = (s) => decodeURIComponent(s.replace(pl, ' ')),\n params = {}\n while (match = search.exec(paramsString)) { // eslint-disable-line no-cond-assign\n params[decode(match[1]).toLowerCase()] = decode(match[2])\n }\n return params\n }\n}\n\nexport function seekStringToSeconds(paramName = 't') {\n let seconds = 0\n const seekString = QueryString.params[paramName] || QueryString.hashParams[paramName] || ''\n const parts = seekString.match(/[0-9]+[hms]+/g) || []\n if (parts.length > 0) {\n const factor = {'h': 3600, 'm': 60, 's': 1}\n parts.forEach(function(el) {\n if (el) {\n const suffix = el[el.length - 1]\n const time = parseInt(el.slice(0, el.length - 1), 10)\n seconds += time * (factor[suffix])\n }\n })\n } else if (seekString) {\n seconds = parseInt(seekString, 10)\n }\n return seconds\n}\n\nconst idsCounter = {}\n\nexport function uniqueId(prefix) {\n idsCounter[prefix] || (idsCounter[prefix] = 0)\n const id = ++idsCounter[prefix]\n return prefix + id\n}\n\nexport function isNumber(value) {\n return value - parseFloat(value) + 1 >= 0\n}\n\nexport function currentScriptUrl() {\n const scripts = document.getElementsByTagName('script')\n return scripts.length ? scripts[scripts.length - 1].src : ''\n}\n\nexport const requestAnimationFrame = (window.requestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n function(fn) { window.setTimeout(fn, 1000/60) }).bind(window)\n\nexport const cancelAnimationFrame = (window.cancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n window.clearTimeout).bind(window)\n\nexport function getBrowserLanguage() {\n return window.navigator && window.navigator.language\n}\n\nexport function now() {\n if (window.performance && window.performance.now) {\n return performance.now()\n }\n return Date.now()\n}\n\n// remove the item from the array if it exists in the array\nexport function removeArrayItem(arr, item) {\n const i = arr.indexOf(item)\n if (i >= 0) {\n arr.splice(i, 1)\n }\n}\n\nexport default {\n Config,\n Fullscreen,\n QueryString,\n extend,\n formatTime,\n seekStringToSeconds,\n uniqueId,\n currentScriptUrl,\n isNumber,\n requestAnimationFrame,\n cancelAnimationFrame,\n getBrowserLanguage,\n now,\n removeArrayItem\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/utils.js","import {extend} from './utils'\nimport UIObject from './ui_object'\n\n/**\n * An abstraction to represent a generic playback, it's like an interface to be implemented by subclasses.\n * @class Playback\n * @constructor\n * @extends UIObject\n * @module base\n */\nexport default class Playback extends UIObject {\n /**\n * Determine if the playback does not contain video/has video but video should be ignored.\n * @property isAudioOnly\n * @type Boolean\n */\n get isAudioOnly() {\n return false\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return false\n }\n\n /**\n * The internationalization plugin.\n * @property i18n\n * @type {Strings}\n */\n get i18n() {\n return this._i18n\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * (i.e if a live stream is playing smoothly, this will be false)\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return false\n }\n\n /**\n * @method constructor\n * @param {Object} options the options object\n * @param {Strings} i18n the internationalization component\n */\n constructor(options, i18n) {\n super(options)\n this.settings = {}\n this._i18n = i18n\n }\n\n /**\n * plays the playback.\n * @method play\n */\n play() {}\n\n /**\n * pauses the playback.\n * @method pause\n */\n pause() {}\n\n /**\n * stops the playback.\n * @method stop\n */\n stop() {}\n\n /**\n * seeks the playback to a given `time` in seconds\n * @method seek\n * @param {Number} time should be a number between 0 and the video duration\n */\n seek(time) {} // eslint-disable-line no-unused-vars\n\n /**\n * seeks the playback to a given `percentage` in percentage\n * @method seekPercentage\n * @param {Number} time should be a number between 0 and 100\n */\n seekPercentage(percentage) {} // eslint-disable-line no-unused-vars\n\n\n /**\n * The time that \"0\" now represents relative to when playback started.\n * For a stream with a sliding window this will increase as content is\n * removed from the beginning.\n * @method getStartTimeOffset\n * @return {Number} time (in seconds) that time \"0\" represents.\n */\n getStartTimeOffset() { return 0 }\n\n /**\n * gets the duration in seconds\n * @method getDuration\n * @return {Number} duration (in seconds) of the current source\n */\n getDuration() { return 0 }\n\n /**\n * checks if the playback is playing.\n * @method isPlaying\n * @return {Boolean} `true` if the current playback is playing, otherwise `false`\n */\n isPlaying() {\n return false\n }\n\n /**\n * checks if the playback is ready.\n * @property isReady\n * @type {Boolean} `true` if the current playback is ready, otherwise `false`\n */\n get isReady() {\n return false\n }\n\n /**\n * gets the playback type (`'vod', 'live', 'aod'`)\n * @method getPlaybackType\n * @return {String} you should write the playback type otherwise it'll assume `'no_op'`\n * @example\n * ```javascript\n * html5VideoPlayback.getPlaybackType() //vod\n * html5AudioPlayback.getPlaybackType() //aod\n * html5VideoPlayback.getPlaybackType() //live\n * flashHlsPlayback.getPlaybackType() //live\n * ```\n */\n getPlaybackType() {\n return Playback.NO_OP\n }\n\n /**\n * checks if the playback is in HD.\n * @method isHighDefinitionInUse\n * @return {Boolean} `true` if the playback is playing in HD, otherwise `false`\n */\n isHighDefinitionInUse() {\n return false\n }\n\n /**\n * sets the volume for the playback\n * @method volume\n * @param {Number} value a number between 0 (`muted`) to 100 (`max`)\n */\n volume(value) {} // eslint-disable-line no-unused-vars\n\n /**\n * destroys the playback, removing it from DOM\n * @method destroy\n */\n destroy() {\n this.$el.remove()\n }\n}\n\nPlayback.extend = function(properties) {\n return extend(Playback, properties)\n}\n\n/**\n * checks if the playback can play a given `source`\n * If a mimeType is provided then this will be used instead of inferring the mimetype\n * from the source extension.\n * @method canPlay\n * @static\n * @param {String} source the given source ex: `http://example.com/play.mp4`\n * @param {String} [mimeType] the given mime type, ex: `'application/vnd.apple.mpegurl'`\n * @return {Boolean} `true` if the playback is playable, otherwise `false`\n */\nPlayback.canPlay = (source, mimeType) => { // eslint-disable-line no-unused-vars\n return false\n}\n\n/**\n * a playback type for video on demand\n *\n * @property VOD\n * @static\n * @type String\n */\nPlayback.VOD = 'vod'\n/**\n * a playback type for audio on demand\n *\n * @property AOD\n * @static\n * @type String\n */\nPlayback.AOD = 'aod'\n/**\n * a playback type for live video\n *\n * @property LIVE\n * @static\n * @type String\n */\nPlayback.LIVE = 'live'\n/**\n * a default playback type\n *\n * @property NO_OP\n * @static\n * @type String\n */\nPlayback.NO_OP = 'no_op'\n/**\n * the plugin type\n *\n * @property type\n * @static\n * @type String\n */\nPlayback.type = 'playback'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/playback.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport $ from 'clappr-zepto'\nimport template from './template'\n\nconst Styler = {\n getStyleFor: function(style, options={baseUrl: ''}) {\n return $('<style class=\"clappr-style\"></style>').html(template(style.toString())(options))\n }\n}\n\nexport default Styler\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/styler.js","/* Zepto v1.1.4-80-ga9184b2 - zepto event ajax callbacks deferred touch selector ie - zeptojs.com/license */\nvar Zepto=function(){function D(t){return null==t?String(t):j[S.call(t)]||\"object\"}function L(t){return\"function\"==D(t)}function k(t){return null!=t&&t==t.window}function Z(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function $(t){return\"object\"==D(t)}function F(t){return $(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return\"number\"==typeof t.length}function q(t){return s.call(t,function(t){return null!=t})}function W(t){return t.length>0?n.fn.concat.apply([],t):t}function z(t){return t.replace(/::/g,\"/\").replace(/([A-Z]+)([A-Z][a-z])/g,\"$1_$2\").replace(/([a-z\\d])([A-Z])/g,\"$1_$2\").replace(/_/g,\"-\").toLowerCase()}function H(t){return t in c?c[t]:c[t]=new RegExp(\"(^|\\\\s)\"+t+\"(\\\\s|$)\")}function _(t,e){return\"number\"!=typeof e||l[z(t)]?e:e+\"px\"}function I(t){var e,n;return f[t]||(e=u.createElement(t),u.body.appendChild(e),n=getComputedStyle(e,\"\").getPropertyValue(\"display\"),e.parentNode.removeChild(e),\"none\"==n&&(n=\"block\"),f[t]=n),f[t]}function U(t){return\"children\"in t?a.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||\"\"}function B(n,i,r){for(e in i)r&&(F(i[e])||A(i[e]))?(F(i[e])&&!F(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),B(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function V(t,e){return null==e?n(t):n(t).filter(e)}function Y(t,e,n,i){return L(e)?e.call(t,n,i):e}function J(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function G(e,n){var i=e.className||\"\",r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function K(t){try{return t?\"true\"==t||(\"false\"==t?!1:\"null\"==t?null:+t+\"\"==t?+t:/^[\\[\\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function Q(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)Q(t.childNodes[n],e)}var t,e,n,i,N,P,r=[],o=r.concat,s=r.filter,a=r.slice,u=window.document,f={},c={},l={\"column-count\":1,columns:1,\"font-weight\":1,\"line-height\":1,opacity:1,\"z-index\":1,zoom:1},h=/^\\s*<(\\w+|!)[^>]*>/,p=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,d=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,m=/^(?:body|html)$/i,g=/([A-Z])/g,v=[\"val\",\"css\",\"html\",\"text\",\"data\",\"width\",\"height\",\"offset\"],y=[\"after\",\"prepend\",\"before\",\"append\"],w=u.createElement(\"table\"),x=u.createElement(\"tr\"),b={tr:u.createElement(\"tbody\"),tbody:w,thead:w,tfoot:w,td:x,th:x,\"*\":u.createElement(\"div\")},E=/complete|loaded|interactive/,T=/^[\\w-]*$/,j={},S=j.toString,C={},O=u.createElement(\"div\"),M={tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},A=Array.isArray||function(t){return t instanceof Array};return C.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~C.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},N=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():\"\"})},P=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},C.fragment=function(e,i,r){var o,s,f;return p.test(e)&&(o=n(u.createElement(RegExp.$1))),o||(e.replace&&(e=e.replace(d,\"<$1></$2>\")),i===t&&(i=h.test(e)&&RegExp.$1),i in b||(i=\"*\"),f=b[i],f.innerHTML=\"\"+e,o=n.each(a.call(f.childNodes),function(){f.removeChild(this)})),F(r)&&(s=n(o),n.each(r,function(t,e){v.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},C.Z=function(t,e){return new X(t,e)},C.isZ=function(t){return t instanceof C.Z},C.init=function(e,i){var r;if(!e)return C.Z();if(\"string\"==typeof e)if(e=e.trim(),\"<\"==e[0]&&h.test(e))r=C.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}else{if(L(e))return n(u).ready(e);if(C.isZ(e))return e;if(A(e))r=q(e);else if($(e))r=[e],e=null;else if(h.test(e))r=C.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=C.qsa(u,e)}}return C.Z(r,e)},n=function(t,e){return C.init(t,e)},n.extend=function(t){var e,n=a.call(arguments,1);return\"boolean\"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){B(t,n,e)}),t},C.qsa=function(t,e){var n,i=\"#\"==e[0],r=!i&&\".\"==e[0],o=i||r?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:a.call(s&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=u.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=D,n.isFunction=L,n.isWindow=k,n.isArray=A,n.isPlainObject=F,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=N,n.trim=function(t){return null==t?\"\":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var n,r,o,i=[];if(R(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&i.push(n);else for(o in t)n=e(t[o],o),null!=n&&i.push(n);return W(i)},n.each=function(t,e){var n,i;if(R(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(i in t)if(e.call(t[i],i,t[i])===!1)return t;return t},n.grep=function(t,e){return s.call(t,e)},window.JSON&&(n.parseJSON=JSON.parse),n.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"),function(t,e){j[\"[object \"+e+\"]\"]=e.toLowerCase()}),n.fn={constructor:C.Z,length:0,forEach:r.forEach,reduce:r.reduce,push:r.push,sort:r.sort,splice:r.splice,indexOf:r.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=C.isZ(e)?e.toArray():e;return o.apply(C.isZ(this)?this.toArray():this,n)},map:function(t){return n(n.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return n(a.apply(this,arguments))},ready:function(t){return E.test(u.readyState)&&u.body?t(n):u.addEventListener(\"DOMContentLoaded\",function(){t(n)},!1),this},get:function(e){return e===t?a.call(this):this[e>=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return L(t)?this.not(this.not(t)):n(s.call(this,function(e){return C.matches(e,t)}))},add:function(t,e){return n(P(this.concat(n(t,e))))},is:function(t){return this.length>0&&C.matches(this[0],t)},not:function(e){var i=[];if(L(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r=\"string\"==typeof e?this.filter(e):R(e)&&L(e.item)?a.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return $(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!$(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!$(t)?t:n(t)},find:function(t){var e,i=this;return e=t?\"object\"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(C.qsa(this[0],t)):this.map(function(){return C.qsa(this,t)}):n()},closest:function(t,e){var i=this[0],r=!1;for(\"object\"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:C.matches(i,t));)i=i!==e&&!Z(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!Z(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return V(e,t)},parent:function(t){return V(P(this.pluck(\"parentNode\")),t)},children:function(t){return V(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||a.call(this.childNodes)})},siblings:function(t){return V(this.map(function(t,e){return s.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=\"\"})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){\"none\"==this.style.display&&(this.style.display=\"\"),\"none\"==getComputedStyle(this,\"\").getPropertyValue(\"display\")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=L(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=L(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css(\"display\",\"none\")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?\"none\"==i.css(\"display\"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck(\"previousElementSibling\")).filter(t||\"*\")},next:function(t){return n(this.pluck(\"nextElementSibling\")).filter(t||\"*\")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;n(this).empty().append(Y(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?\"\":\"\"+n}):0 in this?this[0].textContent:null},attr:function(n,i){var r;return\"string\"!=typeof n||1 in arguments?this.each(function(t){if(1===this.nodeType)if($(n))for(e in n)J(this,e,n[e]);else J(this,n,Y(this,i,t,this.getAttribute(n)))}):this.length&&1===this[0].nodeType?!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:t},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(\" \").forEach(function(t){J(this,t)},this)})},prop:function(t,e){return t=M[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(e,n){var i=\"data-\"+e.replace(g,\"-$1\").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?K(r):t},val:function(t){return 0 in arguments?this.each(function(e){this.value=Y(this,t,e,this.value)}):this[0]&&(this[0].multiple?n(this[0]).find(\"option\").filter(function(){return this.selected}).pluck(\"value\"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=Y(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};\"static\"==i.css(\"position\")&&(s.position=\"relative\"),i.css(s)});if(!this.length)return null;if(!n.contains(u.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,\"\"),\"string\"==typeof t)return o.style[N(t)]||r.getPropertyValue(t);if(A(t)){var s={};return n.each(t,function(t,e){s[e]=o.style[N(e)]||r.getPropertyValue(e)}),s}}var a=\"\";if(\"string\"==D(t))i||0===i?a=z(t)+\":\"+_(t,i):this.each(function(){this.style.removeProperty(z(t))});else for(e in t)t[e]||0===t[e]?a+=z(e)+\":\"+_(e,t[e])+\";\":this.each(function(){this.style.removeProperty(z(e))});return this.each(function(){this.style.cssText+=\";\"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(G(t))},H(t)):!1},addClass:function(t){return t?this.each(function(e){if(\"className\"in this){i=[];var r=G(this),o=Y(this,t,e,r);o.split(/\\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&G(this,r+(r?\" \":\"\")+i.join(\" \"))}}):this},removeClass:function(e){return this.each(function(n){if(\"className\"in this){if(e===t)return G(this,\"\");i=G(this),Y(this,e,n,i).split(/\\s+/g).forEach(function(t){i=i.replace(H(t),\" \")}),G(this,i.trim())}})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=Y(this,e,r,G(this));s.split(/\\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n=\"scrollTop\"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n=\"scrollLeft\"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=m.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css(\"margin-top\"))||0,i.left-=parseFloat(n(t).css(\"margin-left\"))||0,r.top+=parseFloat(n(e[0]).css(\"border-top-width\"))||0,r.left+=parseFloat(n(e[0]).css(\"border-left-width\"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||u.body;t&&!m.test(t.nodeName)&&\"static\"==n(t).css(\"position\");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,[\"width\",\"height\"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?k(s)?s[\"inner\"+i]:Z(s)?s.documentElement[\"scroll\"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,Y(this,r,t,s[e]()))})}}),y.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=D(e),\"object\"==t||\"array\"==t||null==e?e:C.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,a){o=i?a:a.parentNode,a=0==e?a.nextSibling:1==e?a.firstChild:2==e?a:null;var f=n.contains(u.documentElement,o);r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,a),f&&Q(t,function(t){null==t.nodeName||\"SCRIPT\"!==t.nodeName.toUpperCase()||t.type&&\"text/javascript\"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+\"To\":\"insert\"+(e?\"Before\":\"After\")]=function(e){return n(e)[t](this),this}}),C.Z.prototype=X.prototype=n.fn,C.uniq=P,C.deserializeValue=K,n.zepto=C,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(\"\"+t).split(\".\");return{e:e[0],ns:e.slice(1).sort().join(\" \")}}function d(t){return new RegExp(\"(?:^| )\"+t.replace(\" \",\" .* ?\")+\"(?: |$)\")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\\s/).forEach(function(i){if(\"ready\"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=T(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),\"addEventListener\"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||\"\").split(/\\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],\"removeEventListener\"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function T(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=w,r&&r.apply(i,arguments)},e[n]=x}),(i.defaultPrevented!==n?i.defaultPrevented:\"returnValue\"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function j(t){var e,i={originalEvent:t};for(e in t)b.test(e)||t[e]===n||(i[e]=t[e]);return T(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return\"string\"==typeof t},s={},a={},u=\"onfocusin\"in window,f={focus:\"focusin\",blur:\"focusout\"},c={mouseenter:\"mouseover\",mouseleave:\"mouseout\"};a.click=a.mousedown=a.mouseup=a.mousemove=\"MouseEvents\",t.event={add:v,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=l(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError(\"expected function\")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var w=function(){return!0},x=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:\"isDefaultPrevented\",stopImmediatePropagation:\"isImmediatePropagationStopped\",stopPropagation:\"isPropagationStopped\"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(u===n||a===!1)&&(u=a,a=n),u===!1&&(u=x),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(j(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=x),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):T(e),e._args=n,this.each(function(){e.type in f&&\"function\"==typeof this[e.type]?this[e.type]():\"dispatchEvent\"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=j(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},\"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error\".split(\" \").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||\"Events\"),i=!0;if(e)for(var r in e)\"bubbles\"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),T(n)}}(Zepto),function(t){function h(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function p(t,e,i,r){return t.global?h(e||n,i,r):void 0}function d(e){e.global&&0===t.active++&&p(e,null,\"ajaxStart\")}function m(e){e.global&&!--t.active&&p(e,null,\"ajaxStop\")}function g(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||p(e,n,\"ajaxBeforeSend\",[t,e])===!1?!1:void p(e,n,\"ajaxSend\",[t,e])}function v(t,e,n,i){var r=n.context,o=\"success\";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),p(n,r,\"ajaxSuccess\",[e,n,t]),w(o,e,n)}function y(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),p(i,o,\"ajaxError\",[n,i,t||e]),w(e,n,i)}function w(t,e,n){var i=n.context;n.complete.call(i,e,t),p(n,i,\"ajaxComplete\",[e,n]),m(n)}function x(){}function b(t){return t&&(t=t.split(\";\",2)[0]),t&&(t==f?\"html\":t==u?\"json\":s.test(t)?\"script\":a.test(t)&&\"xml\")||\"text\"}function E(t,e){return\"\"==e?t:(t+\"&\"+e).replace(/[&?]{1,2}/,\"?\")}function T(e){e.processData&&e.data&&\"string\"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&\"GET\"!=e.type.toUpperCase()||(e.url=E(e.url,e.data),e.data=void 0)}function j(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function C(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+\"[\"+(a||\"object\"==o||\"array\"==o?n:\"\")+\"]\"),!r&&s?e.add(u.name,u.value):\"array\"==o||!i&&\"object\"==o?C(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,s=/^(?:text|application)\\/javascript/i,a=/^(?:text|application)\\/xml/i,u=\"application/json\",f=\"text/html\",c=/^\\s*$/,l=n.createElement(\"a\");l.href=window.location.href,t.active=0,t.ajaxJSONP=function(i,r){if(!(\"type\"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||\"jsonp\"+ ++e,a=n.createElement(\"script\"),u=window[s],c=function(e){t(a).triggerHandler(\"error\",e||\"abort\")},l={abort:c};return r&&r.promise(l),t(a).on(\"load error\",function(e,n){clearTimeout(h),t(a).off().remove(),\"error\"!=e.type&&f?v(f[0],l,i,r):y(null,n||\"error\",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),g(l,i)===!1?(c(\"abort\"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\\?(.+)=\\?/,\"?$1=\"+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c(\"timeout\")},i.timeout)),l)},t.ajaxSettings={type:\"GET\",beforeSend:x,success:x,error:x,complete:x,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:\"text/javascript, application/javascript, application/x-javascript\",json:u,xml:\"application/xml, text/xml\",html:f,text:\"text/plain\"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var a,u,o=t.extend({},e||{}),s=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===o[i]&&(o[i]=t.ajaxSettings[i]);d(o),o.crossDomain||(a=n.createElement(\"a\"),a.href=o.url,a.href=a.href,o.crossDomain=l.protocol+\"//\"+l.host!=a.protocol+\"//\"+a.host),o.url||(o.url=window.location.toString()),(u=o.url.indexOf(\"#\"))>-1&&(o.url=o.url.slice(0,u)),T(o);var f=o.dataType,h=/\\?.+=\\?/.test(o.url);if(h&&(f=\"jsonp\"),o.cache!==!1&&(e&&e.cache===!0||\"script\"!=f&&\"jsonp\"!=f)||(o.url=E(o.url,\"_=\"+Date.now())),\"jsonp\"==f)return h||(o.url=E(o.url,o.jsonp?o.jsonp+\"=?\":o.jsonp===!1?\"\":\"callback=?\")),t.ajaxJSONP(o,s);var N,p=o.accepts[f],m={},w=function(t,e){m[t.toLowerCase()]=[t,e]},j=/^([\\w-]+:)\\/\\//.test(o.url)?RegExp.$1:window.location.protocol,S=o.xhr(),C=S.setRequestHeader;if(s&&s.promise(S),o.crossDomain||w(\"X-Requested-With\",\"XMLHttpRequest\"),w(\"Accept\",p||\"*/*\"),(p=o.mimeType||p)&&(p.indexOf(\",\")>-1&&(p=p.split(\",\",2)[0]),S.overrideMimeType&&S.overrideMimeType(p)),(o.contentType||o.contentType!==!1&&o.data&&\"GET\"!=o.type.toUpperCase())&&w(\"Content-Type\",o.contentType||\"application/x-www-form-urlencoded\"),o.headers)for(r in o.headers)w(r,o.headers[r]);if(S.setRequestHeader=w,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=x,clearTimeout(N);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&\"file:\"==j){f=f||b(o.mimeType||S.getResponseHeader(\"content-type\")),e=S.responseText;try{\"script\"==f?(1,eval)(e):\"xml\"==f?e=S.responseXML:\"json\"==f&&(e=c.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?y(n,\"parsererror\",S,o,s):v(e,S,o,s)}else y(S.statusText||null,S.status?\"error\":\"abort\",S,o,s)}},g(S,o)===!1)return S.abort(),y(null,\"abort\",S,o,s),S;if(o.xhrFields)for(r in o.xhrFields)S[r]=o.xhrFields[r];var P=\"async\"in o?o.async:!0;S.open(o.type,o.url,P,o.username,o.password);for(r in m)C.apply(S,m[r]);return o.timeout>0&&(N=setTimeout(function(){S.onreadystatechange=x,S.abort(),y(null,\"timeout\",S,o,s)},o.timeout)),S.send(o.data?o.data:null),S},t.get=function(){return t.ajax(j.apply(null,arguments))},t.post=function(){var e=j.apply(null,arguments);return e.type=\"POST\",t.ajax(e)},t.getJSON=function(){var e=j.apply(null,arguments);return e.dataType=\"json\",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\\s/),u=j(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t(\"<div>\").html(e.replace(o,\"\")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var S=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=\"\"),this.push(S(e)+\"=\"+S(n))},C(i,e,n),i.join(\"&\").replace(/%20/g,\"+\")}}(Zepto),function(t){t.Callbacks=function(e){e=t.extend({},e);var n,i,r,o,s,a,u=[],f=!e.once&&[],c=function(t){for(n=e.memory&&t,i=!0,a=o||0,o=0,s=u.length,r=!0;u&&s>a;++a)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}r=!1,u&&(f?f.length&&c(f.shift()):n?u.length=0:l.disable())},l={add:function(){if(u){var i=u.length,a=function(n){t.each(n,function(t,n){\"function\"==typeof n?e.unique&&l.has(n)||u.push(n):n&&n.length&&\"string\"!=typeof n&&a(n)})};a(arguments),r?s=u.length:n&&(o=i,c(n))}return this},remove:function(){return u&&t.each(arguments,function(e,n){for(var i;(i=t.inArray(n,u,i))>-1;)u.splice(i,1),r&&(s>=i&&--s,a>=i&&--a)}),this},has:function(e){return!(!u||!(e?t.inArray(e,u)>-1:u.length))},empty:function(){return s=u.length=0,this},disable:function(){return u=f=n=void 0,this},disabled:function(){return!u},lock:function(){return f=void 0,n||l.disable(),this},locked:function(){return!f},fireWith:function(t,e){return!u||i&&!f||(e=e||[],e=[t,e.slice?e.slice():e],r?f.push(e):c(e)),this},fire:function(){return l.fireWith(this,arguments)},fired:function(){return!!i}};return l}}(Zepto),function(t){function n(e){var i=[[\"resolve\",\"done\",t.Callbacks({once:1,memory:1}),\"resolved\"],[\"reject\",\"fail\",t.Callbacks({once:1,memory:1}),\"rejected\"],[\"notify\",\"progress\",t.Callbacks({memory:1})]],r=\"pending\",o={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return n(function(n){t.each(i,function(i,r){var a=t.isFunction(e[i])&&e[i];s[r[1]](function(){var e=a&&a.apply(this,arguments);if(e&&t.isFunction(e.promise))e.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var i=this===o?n.promise():this,s=a?[e]:arguments;n[r[0]+\"With\"](i,s)}})}),e=null}).promise()},promise:function(e){return null!=e?t.extend(e,o):o}},s={};return t.each(i,function(t,e){var n=e[2],a=e[3];o[e[1]]=n.add,a&&n.add(function(){r=a},i[1^t][2].disable,i[2][2].lock),s[e[0]]=function(){return s[e[0]+\"With\"](this===s?o:this,arguments),this},s[e[0]+\"With\"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s}var e=Array.prototype.slice;t.when=function(i){var f,c,l,r=e.call(arguments),o=r.length,s=0,a=1!==o||i&&t.isFunction(i.promise)?o:0,u=1===a?i:n(),h=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?e.call(arguments):r,i===f?u.notifyWith(n,i):--a||u.resolveWith(n,i)}};if(o>1)for(f=new Array(o),c=new Array(o),l=new Array(o);o>s;++s)r[s]&&t.isFunction(r[s].promise)?r[s].promise().done(h(s,l,r)).fail(u.reject).progress(h(s,c,f)):--a;return a||u.resolveWith(l,r),u.promise()},t.Deferred=n}(Zepto),function(t){function u(t,e,n,i){return Math.abs(t-e)>=Math.abs(n-i)?t-e>0?\"Left\":\"Right\":n-i>0?\"Up\":\"Down\"}function f(){o=null,e.last&&(e.el.trigger(\"longTap\"),e={})}function c(){o&&clearTimeout(o),o=null}function l(){n&&clearTimeout(n),i&&clearTimeout(i),r&&clearTimeout(r),o&&clearTimeout(o),n=i=r=o=null,e={}}function h(t){return(\"touch\"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function p(t,e){return t.type==\"pointer\"+e||t.type.toLowerCase()==\"mspointer\"+e}var n,i,r,o,a,e={},s=750;t(document).ready(function(){var d,m,y,w,g=0,v=0;\"MSGesture\"in window&&(a=new MSGesture,a.target=document.body),t(document).bind(\"MSGestureEnd\",function(t){var n=t.velocityX>1?\"Right\":t.velocityX<-1?\"Left\":t.velocityY>1?\"Down\":t.velocityY<-1?\"Up\":null;n&&(e.el.trigger(\"swipe\"),e.el.trigger(\"swipe\"+n))}).on(\"touchstart MSPointerDown pointerdown\",function(i){(!(w=p(i,\"down\"))||h(i))&&(y=w?i:i.touches[0],i.touches&&1===i.touches.length&&e.x2&&(e.x2=void 0,e.y2=void 0),d=Date.now(),m=d-(e.last||d),e.el=t(\"tagName\"in y.target?y.target:y.target.parentNode),n&&clearTimeout(n),e.x1=y.pageX,e.y1=y.pageY,m>0&&250>=m&&(e.isDoubleTap=!0),e.last=d,o=setTimeout(f,s),a&&w&&a.addPointer(i.pointerId))}).on(\"touchmove MSPointerMove pointermove\",function(t){(!(w=p(t,\"move\"))||h(t))&&(y=w?t:t.touches[0],c(),e.x2=y.pageX,e.y2=y.pageY,g+=Math.abs(e.x1-e.x2),v+=Math.abs(e.y1-e.y2))}).on(\"touchend MSPointerUp pointerup\",function(o){(!(w=p(o,\"up\"))||h(o))&&(c(),e.x2&&Math.abs(e.x1-e.x2)>30||e.y2&&Math.abs(e.y1-e.y2)>30?r=setTimeout(function(){e.el.trigger(\"swipe\"),e.el.trigger(\"swipe\"+u(e.x1,e.x2,e.y1,e.y2)),e={}},0):\"last\"in e&&(30>g&&30>v?i=setTimeout(function(){var i=t.Event(\"tap\");i.cancelTouch=l,e.el.trigger(i),e.isDoubleTap?(e.el&&e.el.trigger(\"doubleTap\"),e={}):n=setTimeout(function(){n=null,e.el&&e.el.trigger(\"singleTap\"),e={}},250)},0):e={}),g=v=0)}).on(\"touchcancel MSPointerCancel pointercancel\",l),t(window).on(\"scroll\",l)}),[\"swipe\",\"swipeLeft\",\"swipeRight\",\"swipeUp\",\"swipeDown\",\"doubleTap\",\"tap\",\"singleTap\",\"longTap\"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(Zepto),function(t){function r(e){return e=t(e),!(!e.width()&&!e.height())&&\"none\"!==e.css(\"display\")}function f(t,e){t=t.replace(/=#\\]/g,'=\"#\"]');var n,i,r=s.exec(t);if(r&&r[2]in o&&(n=o[r[2]],i=r[3],t=r[1],i)){var a=Number(i);i=isNaN(a)?i.replace(/^[\"']|[\"']$/g,\"\"):a}return e(t,n,i)}var e=t.zepto,n=e.qsa,i=e.matches,o=t.expr[\":\"]={visible:function(){return r(this)?this:void 0},hidden:function(){return r(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(t){return 0===t?this:void 0},last:function(t,e){return t===e.length-1?this:void 0},eq:function(t,e,n){return t===n?this:void 0},contains:function(e,n,i){return t(this).text().indexOf(i)>-1?this:void 0},has:function(t,n,i){return e.qsa(this,i).length?this:void 0}},s=new RegExp(\"(.*):(\\\\w+)(?:\\\\(([^)]+)\\\\))?$\\\\s*\"),a=/^\\s*>/,u=\"Zepto\"+ +new Date;e.qsa=function(i,r){return f(r,function(o,s,f){try{var c;!o&&s?o=\"*\":a.test(o)&&(c=t(i).addClass(u),o=\".\"+u+\" \"+o);var l=n(i,o)}catch(h){throw console.error(\"error performing selector: %o\",r),h}finally{c&&c.removeClass(u)}return s?e.uniq(t.map(l,function(t,e){return s.call(t,e,l,f)})):l})},e.matches=function(t,e){return f(e,function(e,n,r){return!(e&&!i(t,e)||n&&n.call(t,null,r)!==t)})}}(Zepto),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(n){return null}}}}();\nmodule.exports = Zepto;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/clappr-zepto/zepto.min.js\n// module id = 5\n// module chunks = 0","/* eslint-disable no-var */\n// Simple JavaScript Templating\n// Paul Miller (http://paulmillr.com)\n// http://underscorejs.org\n// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n\n// By default, Underscore uses ERB-style template delimiters, change the\n// following template settings to use alternative delimiters.\nvar settings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n}\n\n// When customizing `templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n '\\'': '\\'',\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\t': 't',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n}\n\nvar escaper = /\\\\|'|\\r|\\n|\\t|\\u2028|\\u2029/g\n\n// List of HTML entities for escaping.\nvar htmlEntities = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n '\\'': '&#x27;'\n}\n\nvar entityRe = new RegExp('[&<>\"\\']', 'g')\n\nvar escapeExpr = function(string) {\n if (string === null) {return ''}\n return ('' + string).replace(entityRe, function(match) {\n return htmlEntities[match]\n })\n}\n\nvar counter = 0\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\nvar tmpl = function(text, data) {\n var render\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = new RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g')\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0\n var source = '__p+=\\''\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset)\n .replace(escaper, function(match) { return '\\\\' + escapes[match] })\n\n if (escape) {\n source += '\\'+\\n((__t=(' + escape + '))==null?\\'\\':escapeExpr(__t))+\\n\\''\n }\n if (interpolate) {\n source += '\\'+\\n((__t=(' + interpolate + '))==null?\\'\\':__t)+\\n\\''\n }\n if (evaluate) {\n source += '\\';\\n' + evaluate + '\\n__p+=\\''\n }\n index = offset + match.length\n return match\n })\n source += '\\';\\n'\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) {source = 'with(obj||{}){\\n' + source + '}\\n'}\n\n source = 'var __t,__p=\\'\\',__j=Array.prototype.join,' +\n 'print=function(){__p+=__j.call(arguments,\\'\\');};\\n' +\n source + 'return __p;\\n//# sourceURL=/microtemplates/source[' + counter++ + ']'\n\n try {\n /*jshint -W054 */\n // TODO: find a way to avoid eval\n render = new Function(settings.variable || 'obj', 'escapeExpr', source)\n } catch (e) {\n e.source = source\n throw e\n }\n\n if (data) {return render(data, escapeExpr)}\n var template = function(data) {\n return render.call(this, data, escapeExpr)\n }\n\n // Provide the compiled function source as a convenience for precompilation.\n template.source = 'function(' + (settings.variable || 'obj') + '){\\n' + source + '}'\n\n return template\n}\ntmpl.settings = settings\n\nmodule.exports = tmpl\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/template.js","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/css-loader/lib/css-base.js\n// module id = 7\n// module chunks = 0","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nconst Browser = {}\n\nconst hasLocalstorage = function(){\n try {\n localStorage.setItem('clappr', 'clappr')\n localStorage.removeItem('clappr')\n return true\n } catch(e) {\n return false\n }\n}\n\nconst hasFlash = function() {\n try {\n const fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash')\n return !!fo\n } catch (e) {\n return !!(navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] !== undefined &&\n navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin)\n }\n}\n\nconst getBrowserInfo = function() {\n const ua = navigator.userAgent\n let parts = ua.match(/\\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [],\n extra\n if (/trident/i.test(parts[1])) {\n extra = /\\brv[ :]+(\\d+)/g.exec(ua) || []\n return { name: 'IE', version: parseInt(extra[1] || '') }\n } else if (parts[1] === 'Chrome' ) {\n extra = ua.match(/\\bOPR\\/(\\d+)/)\n if (extra != null) {\n return { name:'Opera', version: parseInt(extra[1]) }\n }\n }\n parts = parts[2] ? [parts[1], parts[2]] : [navigator.appName, navigator.appVersion, '-?']\n\n if ((extra = ua.match(/version\\/(\\d+)/i))) {\n parts.splice(1, 1, extra[1])\n }\n return { name: parts[0], version: parseInt(parts[1]) }\n}\n\nconst browserInfo = getBrowserInfo()\n\nBrowser.isSafari = /safari/i.test(navigator.userAgent) && navigator.userAgent.indexOf('Chrome') === -1\nBrowser.isChrome = /chrome/i.test(navigator.userAgent)\nBrowser.isFirefox = /firefox/i.test(navigator.userAgent)\nBrowser.isLegacyIE = !!(window.ActiveXObject)\nBrowser.isIE = Browser.isLegacyIE || /trident.*rv:1\\d/i.test(navigator.userAgent)\nBrowser.isIE11 = /trident.*rv:11/i.test(navigator.userAgent)\nBrowser.isChromecast = Browser.isChrome && /CrKey/i.test(navigator.userAgent)\nBrowser.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Opera Mini/i.test(navigator.userAgent)\nBrowser.isiOS = /iPad|iPhone|iPod/i.test(navigator.userAgent)\nBrowser.isAndroid = /Android/i.test(navigator.userAgent)\nBrowser.isWindowsPhone = /Windows Phone/i.test(navigator.userAgent)\nBrowser.isWin8App = /MSAppHost/i.test(navigator.userAgent)\nBrowser.isWiiU = /WiiU/i.test(navigator.userAgent)\nBrowser.isPS4 = /PlayStation 4/i.test(navigator.userAgent)\nBrowser.hasLocalstorage = hasLocalstorage()\nBrowser.hasFlash = hasFlash()\n\nBrowser.name = browserInfo.name\nBrowser.version = browserInfo.version\n\nexport default Browser\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/browser.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {uniqueId} from './utils'\nimport Events from './events'\n\n/**\n * @class BaseObject\n * @constructor\n * @extends Events\n * @module base\n */\nexport default class BaseObject extends Events {\n /**\n * returns the object options\n * @property options\n * @type Object\n */\n get options() { return this._options }\n\n /**\n * @method constructor\n * @param {Object} options\n */\n constructor(options={}) {\n super(options)\n this._options = options\n this.uniqueId = uniqueId('o')\n }\n /**\n * a unique id prefixed with `'o'`, `o1, o232`\n *\n * @property uniqueId\n * @type String\n */\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/base_object.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {uniqueId} from './utils'\nimport $ from 'clappr-zepto'\nimport result from 'lodash.result'\nimport BaseObject from './base_object'\n\nconst delegateEventSplitter = /^(\\S+)\\s*(.*)$/\n\n/**\n * A base class to create ui object.\n * @class UIObject\n * @constructor\n * @extends BaseObject\n * @module base\n */\nexport default class UIObject extends BaseObject {\n /**\n * a unique id prefixed with `'c'`, `c1, c232`\n *\n * @property cid\n * @type String\n */\n /**\n * the dom element itself\n *\n * @property el\n * @type HTMLElement\n */\n /**\n * the dom element wrapped by `$`\n *\n * @property $el\n * @type HTMLElement\n */\n\n /**\n * gets the tag name for the ui component\n * @method tagName\n * @default div\n * @return {String} tag's name\n */\n get tagName() { return 'div' }\n /**\n * a literal object mapping element's events to methods\n * @property events\n * @type Object\n * @example\n *\n *```javascript\n *\n * class MyButton extends UIObject {\n * constructor(options) {\n * super(options)\n * this.myId = 0\n * }\n * get events() { return { 'click': 'myClick' } }\n * myClick(){ this.myId = 42 }\n * }\n *\n * // when you click on MyButton the method `myClick` will be called\n *```\n */\n get events() { return {} }\n /**\n * a literal object mapping attributes and values to the element\n * element's attribute name and the value the attribute value\n * @property attributes\n * @type Object\n * @example\n *\n *```javascript\n *\n * class MyButton extends UIObject {\n * constructor(options) { super(options) }\n * get attributes() { return { class: 'my-button'} }\n * }\n *\n * // MyButton.el.className will be 'my-button'\n * ```\n */\n get attributes() { return {} }\n\n /**\n * it builds an ui component by:\n * * creating an id for the component `cid`\n * * making sure the element is created `$el`\n * * delegating all `events` to the element\n * @method constructor\n * @param {Object} options the options object\n */\n constructor(options) {\n super(options)\n this.cid = uniqueId('c')\n this._ensureElement()\n this.delegateEvents()\n }\n\n /**\n * selects within the component.\n * @method $\n * @param {String} selector a selector to find within the component.\n * @return {HTMLElement} an element, if it exists.\n * @example\n * ```javascript\n * fullScreenBarUIComponent.$('.button-full') //will return only `.button-full` within the component\n * ```\n */\n $(selector) {\n return this.$el.find(selector)\n }\n\n /**\n * render the component, usually attach it to a real existent `element`\n * @method render\n * @return {UIObject} itself\n */\n render() {\n return this\n }\n\n /**\n * removes the ui component from DOM\n * @method remove\n * @return {UIObject} itself\n */\n remove() {\n this.$el.remove()\n this.stopListening()\n this.undelegateEvents()\n return this\n }\n\n /**\n * set element to `el` and `$el`\n * @method setElement\n * @param {HTMLElement} element\n * @param {Boolean} delegate whether is delegate or not\n * @return {UIObject} itself\n */\n setElement(element, delegate) {\n if (this.$el) {this.undelegateEvents()}\n this.$el = element instanceof $ ? element : $(element)\n this.el = this.$el[0]\n if (delegate !== false) {this.delegateEvents()}\n return this\n }\n\n /**\n * delegates all the original `events` on `element` to its callbacks\n * @method delegateEvents\n * @param {Object} events\n * @return {UIObject} itself\n */\n delegateEvents(events) {\n if (!(events || (events = result(this, 'events')))) {return this}\n this.undelegateEvents()\n for (const key in events) {\n let method = events[key]\n if ((method && method.constructor !== Function)) {method = this[events[key]]}\n if (!method) {continue}\n\n const match = key.match(delegateEventSplitter)\n let eventName = match[1], selector = match[2]\n //method = _.bind(method, this)\n eventName += '.delegateEvents' + this.cid\n if (selector === '') {\n this.$el.on(eventName, method.bind(this))\n } else {\n this.$el.on(eventName, selector, method.bind(this))\n }\n }\n return this\n }\n\n /**\n * undelegats all the `events`\n * @method undelegateEvents\n * @return {UIObject} itself\n */\n undelegateEvents() {\n this.$el.off('.delegateEvents' + this.cid)\n return this\n }\n\n /**\n * ensures the creation of this ui component\n * @method _ensureElement\n * @private\n */\n _ensureElement() {\n if (!this.el) {\n const attrs = $.extend({}, result(this, 'attributes'))\n if (this.id) {attrs.id = result(this, 'id')}\n if (this.className) {attrs['class'] = result(this, 'className')}\n const $el = $('<' + result(this, 'tagName') + '>').attr(attrs)\n this.setElement($el, false)\n } else {\n this.setElement(result(this, 'el'), false)\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/ui_object.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/**\n * The mediator is a singleton for handling global events.\n */\n\nimport Events from 'base/events'\n\nconst events = new Events()\n\nexport default class Mediator {\n}\n\nMediator.on = function(name, callback, context) {\n events.on(name, callback, context)\n return\n}\n\nMediator.once = function(name, callback, context) {\n events.once(name, callback, context)\n return\n}\n\nMediator.off = function(name, callback, context) {\n events.off(name, callback, context)\n return\n}\n\nMediator.trigger = function(name, ...opts) {\n events.trigger.apply(events, [name, ...opts])\n return\n}\n\nMediator.stopListening = function(obj, name, callback) {\n events.stopListening(obj, name, callback)\n return\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/mediator.js","import {extend} from './utils'\nimport BaseObject from './base_object'\n\nexport default class CorePlugin extends BaseObject {\n constructor(core) {\n super(core.options)\n this.core = core\n this.enabled = true\n this.bindEvents()\n }\n\n bindEvents() {}\n\n enable() {\n if (!this.enabled) {\n this.bindEvents()\n this.enabled = true\n }\n }\n\n disable() {\n if (this.enabled) {\n this.stopListening()\n this.enabled = false\n }\n }\n\n getExternalInterface() { return {} }\n\n destroy() {\n this.stopListening()\n }\n}\n\nCorePlugin.extend = function(properties) {\n return extend(CorePlugin, properties)\n}\n\nCorePlugin.type = 'core'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/core_plugin.js","import BaseObject from './base_object'\nimport {extend} from './utils'\n\n/**\n * The base class for a container plugin\n * @class ContainerPlugin\n * @constructor\n * @extends UIObject\n * @module base\n */\nexport default class ContainerPlugin extends BaseObject {\n constructor(container) {\n super(container.options)\n this.container = container\n this.enabled = true\n this.bindEvents()\n }\n\n enable() {\n if (!this.enabled) {\n this.bindEvents()\n this.enabled = true\n }\n }\n\n disable() {\n if (this.enabled) {\n this.stopListening()\n this.enabled = false\n }\n }\n\n bindEvents() {}\n\n destroy() {\n this.stopListening()\n }\n}\n\nContainerPlugin.extend = function(properties) {\n return extend(ContainerPlugin, properties)\n}\n\nContainerPlugin.type = 'container'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/container_plugin.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {extend} from './utils'\n\nimport UIObject from './ui_object'\n\n/**\n * The base class for an ui container plugin\n * @class UIContainerPlugin\n * @constructor\n * @extends UIObject\n * @module base\n */\nexport default class UIContainerPlugin extends UIObject {\n constructor(container) {\n super(container.options)\n this.container = container\n this.enabled = true\n this.bindEvents()\n }\n\n enable() {\n if (!this.enabled) {\n this.bindEvents()\n this.$el.show()\n this.enabled = true\n }\n }\n\n disable() {\n this.stopListening()\n this.$el.hide()\n this.enabled = false\n }\n\n bindEvents() {}\n\n destroy() {\n this.remove()\n }\n}\n\nUIContainerPlugin.extend = function(properties) {\n return extend(UIContainerPlugin, properties)\n}\n\nUIContainerPlugin.type = 'container'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/ui_container_plugin.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nclass PlayerInfo {\n constructor() {\n this.options = {}\n this.playbackPlugins = []\n this.currentSize = { width: 0, height: 0 }\n }\n}\n\nPlayerInfo._players = {}\n\nPlayerInfo.getInstance = (playerId) => {\n return PlayerInfo._players[playerId] || (PlayerInfo._players[playerId] = new PlayerInfo())\n}\n\nexport default PlayerInfo\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/player_info.js","module.exports = require('./html5_video')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html5_video/index.js","import {extend} from './utils'\nimport UIObject from './ui_object'\n\nexport default class UICorePlugin extends UIObject {\n constructor(core) {\n super(core.options)\n this.core = core\n this.enabled = true\n this.bindEvents()\n this.render()\n }\n\n bindEvents() {}\n\n getExternalInterface() { return {} }\n\n enable() {\n if (!this.enabled) {\n this.bindEvents()\n this.$el.show()\n this.enabled = true\n }\n }\n\n disable() {\n this.stopListening()\n this.$el.hide()\n this.enabled = false\n }\n\n destroy() {\n this.remove()\n }\n\n render() {\n return this\n }\n}\n\nUICorePlugin.extend = function(properties) {\n return extend(UICorePlugin, properties)\n}\n\nUICorePlugin.type = 'core'\n\n\n\n// WEBPACK FOOTER //\n// ./src/base/ui_core_plugin.js","export default require('./base_flash_playback')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/base_flash_playback/index.js","module.exports = require('./log')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/log/index.js","import Kibo from './kibo'\n\nexport default {Kibo}\n\n\n\n// WEBPACK FOOTER //\n// ./src/vendor/index.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 21\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M1.425.35L14.575 8l-13.15 7.65V.35z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/01-play.svg\n// module id = 22\n// module chunks = 0","module.exports = function(module) {\n\tif(!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tmodule.children = [];\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 23\n// module chunks = 0","module.exports = require('./container')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/container/index.js","module.exports = require('./core')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/core/index.js","module.exports = require('./loader')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/loader/index.js","module.exports = require('./media_control')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/media_control/index.js","module.exports = require('./flash')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/flash/index.js","module.exports = require('./flashls')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/flashls/index.js","module.exports = require('./hls')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/hls/index.js","module.exports = require('./html5_audio')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html5_audio/index.js","module.exports = require('./html_img')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html_img/index.js","module.exports = require('./no_op')\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/no_op/index.js","module.exports = require('./poster')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/poster/index.js","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max;\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (typeof key == 'number' && value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n if (!(isArray(source) || isTypedArray(source))) {\n var props = baseKeysIn(source);\n }\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObject(srcValue)) {\n stack || (stack = new Stack);\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(object[key], srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n });\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = object[key],\n srcValue = source[key],\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n newValue = srcValue;\n if (isArray(srcValue) || isTypedArray(srcValue)) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else {\n isCommon = false;\n newValue = baseClone(srcValue, true);\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\n isCommon = false;\n newValue = baseClone(srcValue, true);\n }\n else {\n newValue = objValue;\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = merge;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.merge/index.js\n// module id = 35\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/02-pause.svg\n// module id = 36\n// module chunks = 0","module.exports = __webpack_public_path__ + \"a8c874b93b3d848f39a71260c57e3863.cur\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/media_control/public/closed-hand.cur\n// module id = 37\n// module chunks = 0","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/**\n * Container is responsible for the video rendering and state\n */\n\nimport Events from 'base/events'\nimport UIObject from 'base/ui_object'\nimport Styler from 'base/styler'\nimport style from './public/style.scss'\nimport $ from 'clappr-zepto'\n\n/**\n * An abstraction to represent a container for a given playback\n * TODO: describe its responsabilities\n * @class Container\n * @constructor\n * @extends UIObject\n * @module base\n */\nexport default class Container extends UIObject {\n /**\n * container's name\n * @method name\n * @default Container\n * @return {String} container's name\n */\n get name() { return 'Container' }\n get attributes() { return { class: 'container', 'data-container': '' } }\n get events() {\n return {\n 'click': 'clicked',\n 'dblclick': 'dblClicked',\n 'doubleTap': 'dblClicked',\n 'contextmenu': 'onContextMenu',\n 'mouseenter': 'mouseEnter',\n 'mouseleave': 'mouseLeave'\n }\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return this.playback.ended\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * (i.e if a live stream is playing smoothly, this will be false)\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return this.playback.buffering\n }\n\n /**\n * The internationalization plugin.\n * @property i18n\n * @type {Strings}\n */\n get i18n() {\n return this._i18n\n }\n\n /**\n * it builds a container\n * @method constructor\n * @param {Object} options the options object\n * @param {Strings} i18n the internationalization component\n */\n constructor(options, i18n) {\n super(options)\n this._i18n = i18n\n this.currentTime = 0\n this.volume = 100\n this.playback = options.playback\n this.settings = $.extend({}, this.playback.settings)\n this.isReady = false\n this.mediaControlDisabled = false\n this.plugins = [this.playback]\n this.bindEvents()\n }\n\n /**\n * binds playback events to the methods of the container.\n * it listens to playback's events and triggers them as container events.\n *\n * | Playback |\n * |----------|\n * | progress |\n * | timeupdate |\n * | ready |\n * | buffering |\n * | bufferfull |\n * | settingsupdate |\n * | loadedmetadata |\n * | highdefinitionupdate |\n * | bitrate |\n * | playbackstate |\n * | dvr |\n * | mediacontrol_disable |\n * | mediacontrol_enable |\n * | ended |\n * | play |\n * | pause |\n * | error |\n *\n * ps: the events usually translate from PLABACK_x to CONTAINER_x, you can check all the events at `Event` class.\n *\n * @method bindEvents\n */\n bindEvents() {\n this.listenTo(this.playback, Events.PLAYBACK_PROGRESS, this.progress)\n this.listenTo(this.playback, Events.PLAYBACK_TIMEUPDATE, this.timeUpdated)\n this.listenTo(this.playback, Events.PLAYBACK_READY, this.ready)\n this.listenTo(this.playback, Events.PLAYBACK_BUFFERING, this.onBuffering)\n this.listenTo(this.playback, Events.PLAYBACK_BUFFERFULL, this.bufferfull)\n this.listenTo(this.playback, Events.PLAYBACK_SETTINGSUPDATE, this.settingsUpdate)\n this.listenTo(this.playback, Events.PLAYBACK_LOADEDMETADATA, this.loadedMetadata)\n this.listenTo(this.playback, Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate)\n this.listenTo(this.playback, Events.PLAYBACK_BITRATE, this.updateBitrate)\n this.listenTo(this.playback, Events.PLAYBACK_PLAYBACKSTATE, this.playbackStateChanged)\n this.listenTo(this.playback, Events.PLAYBACK_DVR, this.playbackDvrStateChanged)\n this.listenTo(this.playback, Events.PLAYBACK_MEDIACONTROL_DISABLE, this.disableMediaControl)\n this.listenTo(this.playback, Events.PLAYBACK_MEDIACONTROL_ENABLE, this.enableMediaControl)\n this.listenTo(this.playback, Events.PLAYBACK_ENDED, this.onEnded)\n this.listenTo(this.playback, Events.PLAYBACK_PLAY, this.playing)\n this.listenTo(this.playback, Events.PLAYBACK_PAUSE, this.paused)\n this.listenTo(this.playback, Events.PLAYBACK_STOP, this.stopped)\n this.listenTo(this.playback, Events.PLAYBACK_ERROR, this.error)\n }\n\n playbackStateChanged(state) {\n this.trigger(Events.CONTAINER_PLAYBACKSTATE, state)\n }\n\n playbackDvrStateChanged(dvrInUse) {\n this.settings = this.playback.settings\n this.dvrInUse = dvrInUse\n this.trigger(Events.CONTAINER_PLAYBACKDVRSTATECHANGED, dvrInUse)\n }\n\n updateBitrate(newBitrate) {\n this.trigger(Events.CONTAINER_BITRATE, newBitrate)\n }\n\n statsReport(metrics) {\n this.trigger(Events.CONTAINER_STATS_REPORT, metrics)\n }\n\n getPlaybackType() {\n return this.playback.getPlaybackType()\n }\n\n /**\n * returns `true` if DVR is enable otherwise `false`.\n * @method isDvrEnabled\n * @return {Boolean}\n */\n isDvrEnabled() {\n return !!this.playback.dvrEnabled\n }\n\n /**\n * returns `true` if DVR is in use otherwise `false`.\n * @method isDvrInUse\n * @return {Boolean}\n */\n isDvrInUse() {\n return !!this.dvrInUse\n }\n\n /**\n * destroys the container\n * @method destroy\n */\n destroy() {\n this.trigger(Events.CONTAINER_DESTROYED, this, this.name)\n this.stopListening()\n this.plugins.forEach((plugin) => plugin.destroy())\n this.$el.remove()\n }\n\n setStyle(style) {\n this.$el.css(style)\n }\n\n animate(style, duration) {\n return this.$el.animate(style, duration).promise()\n }\n\n ready() {\n this.isReady = true\n this.trigger(Events.CONTAINER_READY, this.name)\n }\n\n isPlaying() {\n return this.playback.isPlaying()\n }\n\n getStartTimeOffset() {\n return this.playback.getStartTimeOffset()\n }\n\n getCurrentTime() {\n return this.currentTime\n }\n\n getDuration() {\n return this.playback.getDuration()\n }\n\n error(errorObj) {\n if (!this.isReady) {\n this.ready()\n }\n this.trigger(Events.CONTAINER_ERROR, {error: errorObj, container: this}, this.name)\n }\n\n loadedMetadata(metadata) {\n this.trigger(Events.CONTAINER_LOADEDMETADATA, metadata)\n }\n\n timeUpdated(timeProgress) {\n this.currentTime = timeProgress.current\n this.trigger(Events.CONTAINER_TIMEUPDATE, timeProgress, this.name)\n }\n\n progress(...args) {\n this.trigger(Events.CONTAINER_PROGRESS, ...args, this.name)\n }\n\n playing() {\n this.trigger(Events.CONTAINER_PLAY, this.name)\n }\n\n paused() {\n this.trigger(Events.CONTAINER_PAUSE, this.name)\n }\n\n /**\n * plays the playback\n * @method play\n */\n play() {\n this.playback.play()\n }\n\n /**\n * stops the playback\n * @method stop\n */\n stop() {\n this.playback.stop()\n this.currentTime = 0\n }\n\n /**\n * pauses the playback\n * @method pause\n */\n pause() {\n this.playback.pause()\n }\n\n onEnded() {\n this.trigger(Events.CONTAINER_ENDED, this, this.name)\n this.currentTime = 0\n }\n\n stopped() {\n this.trigger(Events.CONTAINER_STOP)\n }\n\n clicked() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.trigger(Events.CONTAINER_CLICK, this, this.name)\n }\n }\n\n dblClicked() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.trigger(Events.CONTAINER_DBLCLICK, this, this.name)\n }\n }\n\n onContextMenu() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.trigger(Events.CONTAINER_CONTEXTMENU, this, this.name)\n }\n }\n\n seek(time) {\n this.trigger(Events.CONTAINER_SEEK, time, this.name)\n this.playback.seek(time)\n }\n\n seekPercentage(percentage) {\n const duration = this.getDuration()\n if (percentage >= 0 && percentage <= 100) {\n const time = duration * (percentage / 100)\n this.seek(time)\n }\n }\n\n setVolume(value) {\n this.volume = parseInt(value, 10)\n this.trigger(Events.CONTAINER_VOLUME, value, this.name)\n this.playback.volume(value)\n }\n\n fullscreen() {\n this.trigger(Events.CONTAINER_FULLSCREEN, this.name)\n }\n\n onBuffering() {\n this.trigger(Events.CONTAINER_STATE_BUFFERING, this.name)\n }\n\n bufferfull() {\n this.trigger(Events.CONTAINER_STATE_BUFFERFULL, this.name)\n }\n\n /**\n * adds plugin to the container\n * @method addPlugin\n * @param {Object} plugin\n */\n addPlugin(plugin) {\n this.plugins.push(plugin)\n }\n\n /**\n * checks if a plugin, given its name, exist\n * @method hasPlugin\n * @param {String} name\n * @return {Boolean}\n */\n hasPlugin(name) {\n return !!this.getPlugin(name)\n }\n\n /**\n * get the plugin given its name\n * @method getPlugin\n * @param {String} name\n */\n getPlugin(name) {\n return this.plugins.filter(plugin => plugin.name === name)[0]\n }\n\n mouseEnter() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.trigger(Events.CONTAINER_MOUSE_ENTER)\n }\n }\n\n mouseLeave() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.trigger(Events.CONTAINER_MOUSE_LEAVE)\n }\n }\n\n settingsUpdate() {\n this.settings = this.playback.settings\n this.trigger(Events.CONTAINER_SETTINGSUPDATE)\n }\n\n highDefinitionUpdate(isHD) {\n this.trigger(Events.CONTAINER_HIGHDEFINITIONUPDATE, isHD)\n }\n\n isHighDefinitionInUse() {\n return this.playback.isHighDefinitionInUse()\n }\n\n disableMediaControl() {\n if (!this.mediaControlDisabled) {\n this.mediaControlDisabled = true\n this.trigger(Events.CONTAINER_MEDIACONTROL_DISABLE)\n }\n }\n\n enableMediaControl() {\n if (this.mediaControlDisabled) {\n this.mediaControlDisabled = false\n this.trigger(Events.CONTAINER_MEDIACONTROL_ENABLE)\n }\n }\n\n updateStyle() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.$el.removeClass('chromeless')\n } else {\n this.$el.addClass('chromeless')\n }\n }\n\n /**\n * enables to configure the container after its creation\n * @method configure\n * @param {Object} options all the options to change in form of a javascript object\n */\n configure(options) {\n this._options = $.extend(this._options, options)\n this.updateStyle()\n this.trigger(Events.CONTAINER_OPTIONS_CHANGE)\n }\n\n render() {\n const s = Styler.getStyleFor(style)\n this.$el.append(s)\n this.$el.append(this.playback.render().el)\n this.updateStyle()\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/container/container.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/**\n * The ContainerFactory is responsible for manage playback bootstrap and create containers.\n */\n\nimport BaseObject from 'base/base_object'\nimport Events from 'base/events'\nimport Container from 'components/container'\nimport $ from 'clappr-zepto'\n\nimport isPlainObject from 'lodash.isplainobject'\n\nexport default class ContainerFactory extends BaseObject {\n get options() { return this._options }\n set options(options) { this._options = options }\n\n constructor(options, loader, i18n) {\n super(options)\n this._i18n = i18n\n this.loader = loader\n }\n\n createContainers() {\n return $.Deferred((promise) => {\n promise.resolve(this.options.sources.map((source) => {\n return this.createContainer(source)\n }))\n })\n }\n\n findPlaybackPlugin(source, mimeType) {\n return this.loader.playbackPlugins.filter(p => p.canPlay(source, mimeType))[0]\n }\n\n createContainer(source) {\n let resolvedSource = null,\n mimeType = this.options.mimeType\n if (isPlainObject(source)) {\n resolvedSource = source.source.toString()\n if (source.mimeType) {\n mimeType = source.mimeType\n }\n } else {\n resolvedSource = source.toString()\n }\n\n if (resolvedSource.match(/^\\/\\//)) resolvedSource = window.location.protocol + resolvedSource\n\n let options = $.extend({}, this.options, {\n src: resolvedSource,\n mimeType: mimeType\n })\n const playbackPlugin = this.findPlaybackPlugin(resolvedSource, mimeType)\n const playback = new playbackPlugin(options, this._i18n)\n\n options = $.extend({}, options, {playback: playback})\n\n const container = new Container(options, this._i18n)\n const defer = $.Deferred()\n defer.promise(container)\n this.addContainerPlugins(container)\n this.listenToOnce(container, Events.CONTAINER_READY, () => defer.resolve(container))\n return container\n }\n\n addContainerPlugins(container) {\n this.loader.containerPlugins.forEach((Plugin) => {\n container.addPlugin(new Plugin(container))\n })\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/container_factory/container_factory.js","module.exports = require('./container_factory')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/container_factory/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {isNumber,Fullscreen} from 'base/utils'\n\nimport Events from 'base/events'\nimport Styler from 'base/styler'\nimport UIObject from 'base/ui_object'\nimport Browser from 'components/browser'\nimport ContainerFactory from 'components/container_factory'\nimport MediaControl from 'components/media_control'\nimport Mediator from 'components/mediator'\nimport PlayerInfo from 'components/player_info'\n\nimport $ from 'clappr-zepto'\n\nimport coreStyle from './public/style.scss'\n\n/**\n * The Core is responsible to manage Containers, the mediator, MediaControl\n * and the player state.\n * @class Core\n * @constructor\n * @extends UIObject\n * @module components\n */\nexport default class Core extends UIObject {\n get events() {\n return {\n 'webkitfullscreenchange': 'handleFullscreenChange',\n 'mousemove': 'showMediaControl',\n 'mouseleave': 'hideMediaControl'\n }\n }\n\n get attributes() {\n return {\n 'data-player': '',\n tabindex: 9999\n }\n }\n\n /**\n * checks if the core is ready.\n * @property isReady\n * @type {Boolean} `true` if the core is ready, otherwise `false`\n */\n get isReady() {\n return !!this.ready\n }\n\n /**\n * The internationalization plugin.\n * @property i18n\n * @type {Strings}\n */\n get i18n() {\n return this.getPlugin('strings') || { t: (key) => key }\n }\n\n constructor(options) {\n super(options)\n this.playerInfo = PlayerInfo.getInstance(options.playerId)\n this.firstResize = true\n this.plugins = []\n this.containers = []\n this.setupMediaControl(null)\n //FIXME fullscreen api sucks\n this._boundFullscreenHandler = () => this.handleFullscreenChange()\n $(document).bind('fullscreenchange', this._boundFullscreenHandler)\n $(document).bind('MSFullscreenChange', this._boundFullscreenHandler)\n $(document).bind('mozfullscreenchange', this._boundFullscreenHandler)\n }\n\n createContainers(options) {\n this.defer = $.Deferred()\n this.defer.promise(this)\n this.containerFactory = new ContainerFactory(options, options.loader, this.i18n)\n this.containerFactory\n .createContainers()\n .then((containers) => this.setupContainers(containers))\n .then((containers) => this.resolveOnContainersReady(containers))\n }\n\n updateSize() {\n if (Fullscreen.isFullscreen()) {\n this.setFullscreen()\n } else {\n this.setPlayerSize()\n }\n }\n\n setFullscreen() {\n if(!Browser.isiOS) {\n this.$el.addClass('fullscreen')\n this.$el.removeAttr('style')\n this.playerInfo.previousSize = { width: this.options.width, height: this.options.height }\n this.playerInfo.currentSize = { width: $(window).width(), height: $(window).height() }\n }\n }\n\n setPlayerSize() {\n this.$el.removeClass('fullscreen')\n this.playerInfo.currentSize = this.playerInfo.previousSize\n this.playerInfo.previousSize = { width: $(window).width(), height: $(window).height() }\n this.resize(this.playerInfo.currentSize)\n }\n\n resize(options) {\n if (!isNumber(options.height) && !isNumber(options.width)) {\n this.el.style.height = `${options.height}`\n this.el.style.width = `${options.width}`\n } else {\n this.el.style.height = `${options.height}px`\n this.el.style.width = `${options.width}px`\n }\n this.playerInfo.previousSize = { width: this.options.width, height: this.options.height }\n this.options.width = options.width\n this.options.height = options.height\n this.playerInfo.currentSize = options\n this.triggerResize(this.playerInfo.currentSize)\n }\n\n enableResizeObserver() {\n const checkSizeCallback = () => {\n if (this.playerInfo.computedSize.width != this.el.clientWidth ||\n this.playerInfo.computedSize.height != this.el.clientHeight) {\n this.playerInfo.computedSize = { width: this.el.clientWidth, height: this.el.clientHeight }\n this.triggerResize(this.playerInfo.computedSize)\n }\n }\n this.resizeObserverInterval = setInterval(checkSizeCallback, 500)\n }\n\n triggerResize(newSize) {\n const thereWasChange = this.firstResize || this.oldHeight !== newSize.height || this.oldWidth !== newSize.width\n if (thereWasChange) {\n Mediator.trigger(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, newSize)\n this.oldHeight = newSize.height\n this.oldWidth = newSize.width\n this.firstResize = false\n }\n }\n\n disableResizeObserver() {\n if (this.resizeObserverInterval) clearInterval(this.resizeObserverInterval)\n }\n\n resolveOnContainersReady(containers) {\n $.when.apply($, containers).done(() => {\n this.defer.resolve(this)\n this.ready = true\n this.trigger(Events.CORE_READY)\n })\n }\n\n addPlugin(plugin) {\n this.plugins.push(plugin)\n }\n\n hasPlugin(name) {\n return !!this.getPlugin(name)\n }\n\n getPlugin(name) {\n return this.plugins.filter(plugin => plugin.name === name)[0]\n }\n\n load(sources, mimeType) {\n this.options.mimeType = mimeType\n sources = sources && sources.constructor === Array ? sources : [sources]\n this.containers.forEach((container) => container.destroy())\n this.mediaControl.container = null\n this.containerFactory.options = $.extend(this.options, {sources})\n this.containerFactory.createContainers().then((containers) => {\n this.setupContainers(containers)\n })\n }\n\n destroy() {\n this.disableResizeObserver()\n this.containers.forEach((container) => container.destroy())\n this.plugins.forEach((plugin) => plugin.destroy())\n this.$el.remove()\n this.mediaControl.destroy()\n $(document).unbind('fullscreenchange', this._boundFullscreenHandler)\n $(document).unbind('MSFullscreenChange', this._boundFullscreenHandler)\n $(document).unbind('mozfullscreenchange', this._boundFullscreenHandler)\n }\n\n handleFullscreenChange() {\n this.trigger(Events.CORE_FULLSCREEN, Fullscreen.isFullscreen())\n this.updateSize()\n this.mediaControl.show()\n }\n\n setMediaControlContainer(container) {\n this.mediaControl.setContainer(container)\n this.mediaControl.render()\n }\n\n disableMediaControl() {\n this.mediaControl.disable()\n this.$el.removeClass('nocursor')\n }\n\n enableMediaControl() {\n this.mediaControl.enable()\n }\n\n removeContainer(container) {\n this.stopListening(container)\n this.containers = this.containers.filter((c) => c !== container)\n }\n\n appendContainer(container) {\n this.listenTo(container, Events.CONTAINER_DESTROYED, this.removeContainer)\n this.containers.push(container)\n }\n\n setupContainers(containers) {\n containers.map(this.appendContainer.bind(this))\n this.trigger(Events.CORE_CONTAINERS_CREATED)\n this.renderContainers()\n this.setupMediaControl(this.getCurrentContainer())\n this.render()\n this.$el.appendTo(this.options.parentElement)\n return this.containers\n }\n\n renderContainers() {\n this.containers.map((container) => this.el.appendChild(container.render().el))\n }\n\n createContainer(source, options) {\n const container = this.containerFactory.createContainer(source, options)\n this.appendContainer(container)\n this.el.appendChild(container.render().el)\n return container\n }\n\n setupMediaControl(container) {\n if (this.mediaControl) {\n this.mediaControl.setContainer(container)\n } else {\n this.mediaControl = this.createMediaControl($.extend({container: container, focusElement: this.el}, this.options))\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_FULLSCREEN, this.toggleFullscreen)\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_SHOW, this.onMediaControlShow.bind(this, true))\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_HIDE, this.onMediaControlShow.bind(this, false))\n }\n }\n\n createMediaControl(options) {\n if(options.mediacontrol && options.mediacontrol.external) {\n return new options.mediacontrol.external(options).render()\n } else {\n return new MediaControl(options).render()\n }\n }\n\n getCurrentContainer() {\n if (!this.mediaControl || !this.mediaControl.container) {\n return this.containers[0]\n }\n return this.mediaControl.container\n }\n\n getCurrentPlayback() {\n const container = this.getCurrentContainer()\n return container && container.playback\n }\n\n getPlaybackType() {\n const container = this.getCurrentContainer()\n return container && container.getPlaybackType()\n }\n\n toggleFullscreen() {\n if (!Fullscreen.isFullscreen()) {\n Fullscreen.requestFullscreen(this.el)\n if(!Browser.isiOS) {\n this.$el.addClass('fullscreen')\n }\n } else {\n Fullscreen.cancelFullscreen()\n if(!Browser.isiOS) {\n this.$el.removeClass('fullscreen nocursor')\n }\n }\n this.mediaControl.show()\n }\n\n showMediaControl(event) {\n this.mediaControl.show(event)\n }\n\n hideMediaControl() {\n this.mediaControl.hide(this.options.hideMediaControlDelay)\n }\n\n onMediaControlShow(showing) {\n this.getCurrentContainer().trigger(showing?Events.CONTAINER_MEDIACONTROL_SHOW:Events.CONTAINER_MEDIACONTROL_HIDE)\n\n if (showing)\n this.$el.removeClass('nocursor')\n else if (Fullscreen.isFullscreen())\n this.$el.addClass('nocursor')\n }\n\n /**\n * enables to configure the container after its creation\n * @method configure\n * @param {Object} options all the options to change in form of a javascript object\n */\n configure(options) {\n this._options = $.extend(this._options, options)\n const sources = options.source || options.sources\n\n if (sources) {\n this.load(sources, options.mimeType || this.options.mimeType)\n } else {\n this.trigger(Events.CORE_OPTIONS_CHANGE)\n\n this.containers.forEach((container) => {\n container.configure(this.options)\n })\n }\n }\n\n render() {\n const style = Styler.getStyleFor(coreStyle, {baseUrl: this.options.baseUrl})\n this.$el.append(style)\n this.$el.append(this.mediaControl.render().el)\n\n this.options.width = this.options.width || this.$el.width()\n this.options.height = this.options.height || this.$el.height()\n const size = {width: this.options.width, height: this.options.height}\n this.playerInfo.previousSize = this.playerInfo.currentSize = this.playerInfo.computedSize = size\n this.updateSize()\n\n this.previousSize = { width: this.$el.width(), height: this.$el.height() }\n\n this.enableResizeObserver()\n\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/core/core.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport BaseObject from 'base/base_object'\nimport Core from 'components/core'\n\n/**\n * The Core Factory is responsible for instantiate the core and it's plugins.\n * @class CoreFactory\n * @constructor\n * @extends BaseObject\n * @module components\n */\nexport default class CoreFactory extends BaseObject {\n\n get loader() { return this.player.loader }\n\n /**\n * it builds the core factory\n * @method constructor\n * @param {Player} player the player object\n */\n constructor(player) {\n super()\n this.player = player\n this._options = player.options\n }\n\n /**\n * creates a core and its plugins\n * @method create\n * @return {Core} created core\n */\n create() {\n this.options.loader = this.loader\n this.core = new Core(this.options)\n this.addCorePlugins()\n this.core.createContainers(this.options)\n return this.core\n }\n\n /**\n * given the core plugins (`loader.corePlugins`) it builds each one\n * @method addCorePlugins\n * @return {Core} the core with all plugins\n */\n addCorePlugins() {\n this.loader.corePlugins.forEach((Plugin) => {\n const plugin = new Plugin(this.core)\n this.core.addPlugin(plugin)\n this.setupExternalInterface(plugin)\n })\n return this.core\n }\n\n setupExternalInterface(plugin) {\n const externalFunctions = plugin.getExternalInterface()\n for (const key in externalFunctions) {\n this.player[key] = externalFunctions[key].bind(plugin)\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/core_factory/core_factory.js","module.exports = require('./core_factory')\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/core_factory/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport BaseObject from 'base/base_object'\nimport PlayerInfo from 'components/player_info'\nimport uniqBy from 'lodash.uniqby'\n\n/* Playback Plugins */\nimport HTML5VideoPlayback from 'playbacks/html5_video'\nimport FlashVideoPlayback from 'playbacks/flash'\nimport HTML5AudioPlayback from 'playbacks/html5_audio'\nimport FlasHLSVideoPlayback from 'playbacks/flashls'\nimport HLSVideoPlayback from 'playbacks/hls'\nimport HTMLImgPlayback from 'playbacks/html_img'\nimport NoOp from 'playbacks/no_op'\n\n/* Container Plugins */\nimport SpinnerThreeBouncePlugin from 'plugins/spinner_three_bounce'\nimport StatsPlugin from 'plugins/stats'\nimport WaterMarkPlugin from 'plugins/watermark'\nimport PosterPlugin from 'plugins/poster'\nimport GoogleAnalyticsPlugin from 'plugins/google_analytics'\nimport ClickToPausePlugin from 'plugins/click_to_pause'\n\n/* Core Plugins */\nimport DVRControls from 'plugins/dvr_controls'\nimport Favicon from 'plugins/favicon'\nimport SeekTime from 'plugins/seek_time'\nimport SourcesPlugin from 'plugins/sources'\nimport EndVideo from 'plugins/end_video'\nimport Strings from 'plugins/strings'\n\n/**\n * It keeps a list of the default plugins (playback, container, core) and it merges external plugins with its internals.\n * @class Loader\n * @constructor\n * @extends BaseObject\n * @module components\n */\nexport default class Loader extends BaseObject {\n /**\n * builds the loader\n * @method constructor\n * @param {Object} externalPlugins the external plugins\n * @param {Number} playerId you can embed multiple instances of clappr, therefore this is the unique id of each one.\n */\n constructor(externalPlugins, playerId) {\n super()\n this.playerId = playerId\n this.playbackPlugins = [HLSVideoPlayback, HTML5VideoPlayback, HTML5AudioPlayback, FlashVideoPlayback, FlasHLSVideoPlayback, HTMLImgPlayback, NoOp]\n this.containerPlugins = [SpinnerThreeBouncePlugin, WaterMarkPlugin, PosterPlugin, StatsPlugin, GoogleAnalyticsPlugin, ClickToPausePlugin]\n this.corePlugins = [DVRControls, Favicon, SeekTime, SourcesPlugin, EndVideo, Strings]\n if (externalPlugins) {\n if (!Array.isArray(externalPlugins)) {\n this.validateExternalPluginsType(externalPlugins)\n }\n this.addExternalPlugins(externalPlugins)\n }\n }\n\n /**\n * groups by type the external plugins that were passed through `options.plugins` it they're on a flat array\n * @method addExternalPlugins\n * @private\n * @param {Object} an config object or an array of plugins\n * @return {Object} plugins the config object with the plugins separated by type\n */\n groupPluginsByType(plugins) {\n if (Array.isArray(plugins)) {\n plugins = plugins.reduce(function(memo, plugin) {\n memo[plugin.type] || (memo[plugin.type] = [])\n memo[plugin.type].push(plugin)\n return memo\n }, {})\n }\n return plugins\n }\n\n /**\n * adds all the external plugins that were passed through `options.plugins`\n * @method addExternalPlugins\n * @private\n * @param {Object} plugins the config object with all plugins\n */\n addExternalPlugins(plugins) {\n plugins = this.groupPluginsByType(plugins)\n const pluginName = function(plugin) { return plugin.prototype.name }\n if (plugins.playback) { this.playbackPlugins = uniqBy(plugins.playback.concat(this.playbackPlugins), pluginName) }\n if (plugins.container) { this.containerPlugins = uniqBy(plugins.container.concat(this.containerPlugins), pluginName) }\n if (plugins.core) { this.corePlugins = uniqBy(plugins.core.concat(this.corePlugins), pluginName) }\n PlayerInfo.getInstance(this.playerId).playbackPlugins = this.playbackPlugins\n }\n\n /**\n * validate if the external plugins that were passed through `options.plugins` are associated to the correct type\n * @method validateExternalPluginsType\n * @private\n * @param {Object} plugins the config object with all plugins\n */\n validateExternalPluginsType(plugins) {\n const plugintypes = ['playback', 'container', 'core']\n plugintypes.forEach((type) => {\n (plugins[type] || []).forEach((el) => {\n const errorMessage = 'external ' + el.type + ' plugin on ' + type + ' array'\n if (el.type !== type) { throw new ReferenceError(errorMessage) }\n })\n })\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/loader/loader.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/**\n * The MediaControl is responsible for displaying the Player controls.\n */\n\nimport {Config, Fullscreen, formatTime, extend, removeArrayItem} from 'base/utils'\nimport {Kibo} from 'vendor'\n\nimport Events from 'base/events'\nimport Styler from 'base/styler'\nimport UIObject from 'base/ui_object'\nimport Browser from 'components/browser'\nimport Mediator from 'components/mediator'\nimport template from 'base/template'\nimport Playback from 'base/playback'\n\nimport $ from 'clappr-zepto'\nimport merge from 'lodash.merge'\n\nimport mediaControlStyle from './public/media-control.scss'\nimport mediaControlHTML from './public/media-control.html'\n\nimport playIcon from 'icons/01-play.svg'\nimport pauseIcon from 'icons/02-pause.svg'\nimport stopIcon from 'icons/03-stop.svg'\nimport volumeIcon from 'icons/04-volume.svg'\nimport volumeMuteIcon from 'icons/05-mute.svg'\nimport fullscreenIcon from 'icons/06-expand.svg'\nimport exitFullscreenIcon from 'icons/07-shrink.svg'\nimport hdIcon from 'icons/08-hd.svg'\n\nexport default class MediaControl extends UIObject {\n get name() { return 'MediaControl' }\n get disabled() { return this.userDisabled || (this.container && this.container.getPlaybackType() === Playback.NO_OP)}\n\n get attributes() {\n return {\n 'class': 'media-control',\n 'data-media-control': ''\n }\n }\n\n get events() {\n return {\n 'click [data-play]': 'play',\n 'click [data-pause]': 'pause',\n 'click [data-playpause]': 'togglePlayPause',\n 'click [data-stop]': 'stop',\n 'click [data-playstop]': 'togglePlayStop',\n 'click [data-fullscreen]': 'toggleFullscreen',\n 'click .bar-container[data-seekbar]': 'seek',\n 'click .bar-container[data-volume]': 'onVolumeClick',\n 'click .drawer-icon[data-volume]': 'toggleMute',\n 'mouseenter .drawer-container[data-volume]': 'showVolumeBar',\n 'mouseleave .drawer-container[data-volume]': 'hideVolumeBar',\n 'mousedown .bar-container[data-volume]': 'startVolumeDrag',\n 'mousemove .bar-container[data-volume]': 'mousemoveOnVolumeBar',\n 'mousedown .bar-scrubber[data-seekbar]': 'startSeekDrag',\n 'mousemove .bar-container[data-seekbar]': 'mousemoveOnSeekBar',\n 'mouseleave .bar-container[data-seekbar]': 'mouseleaveOnSeekBar',\n 'mouseenter .media-control-layer[data-controls]': 'setUserKeepVisible',\n 'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible'\n }\n }\n\n get template() { return template(mediaControlHTML) }\n\n get stylesheet() { return Styler.getStyleFor(mediaControlStyle, {baseUrl: this.options.baseUrl}) }\n\n get volume() { return (this.container && this.container.isReady) ? this.container.volume : this.intendedVolume }\n get muted() { return this.volume === 0 }\n\n constructor(options) {\n super(options)\n this.persistConfig = this.options.persistConfig\n this.container = options.container\n this.currentPositionValue = null\n this.currentDurationValue = null\n const initialVolume = (this.persistConfig) ? Config.restore('volume') : 100\n this.setVolume(this.options.mute ? 0 : initialVolume)\n this.keepVisible = false\n this.fullScreenOnVideoTagSupported = null // unknown\n this.addEventListeners()\n this.settings = {\n left: ['play', 'stop', 'pause'],\n right: ['volume'],\n default: ['position', 'seekbar', 'duration']\n }\n\n if (this.container) {\n if (!$.isEmptyObject(this.container.settings)) {\n this.settings = $.extend({}, this.container.settings)\n }\n } else {\n this.settings = {}\n }\n\n this.userDisabled = false\n if ((this.container && this.container.mediaControlDisabled) || this.options.chromeless) {\n this.disable()\n }\n this.stopDragHandler = (event) => this.stopDrag(event)\n this.updateDragHandler = (event) => this.updateDrag(event)\n $(document).bind('mouseup', this.stopDragHandler)\n $(document).bind('mousemove', this.updateDragHandler)\n }\n\n addEventListeners() {\n if (this.container) {\n Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.playerResize, this)\n this.listenTo(this.container, Events.CONTAINER_PLAY, this.changeTogglePlay)\n this.listenTo(this.container, Events.CONTAINER_PAUSE, this.changeTogglePlay)\n this.listenTo(this.container, Events.CONTAINER_DBLCLICK, this.toggleFullscreen)\n this.listenTo(this.container, Events.CONTAINER_TIMEUPDATE, this.onTimeUpdate)\n this.listenTo(this.container, Events.CONTAINER_PROGRESS, this.updateProgressBar)\n this.listenTo(this.container, Events.CONTAINER_SETTINGSUPDATE, this.settingsUpdate)\n this.listenTo(this.container, Events.CONTAINER_PLAYBACKDVRSTATECHANGED, this.settingsUpdate)\n this.listenTo(this.container, Events.CONTAINER_HIGHDEFINITIONUPDATE, this.highDefinitionUpdate)\n this.listenTo(this.container, Events.CONTAINER_MEDIACONTROL_DISABLE, this.disable)\n this.listenTo(this.container, Events.CONTAINER_MEDIACONTROL_ENABLE, this.enable)\n this.listenTo(this.container, Events.CONTAINER_ENDED, this.ended)\n this.listenTo(this.container, Events.CONTAINER_VOLUME, this.onVolumeChanged)\n if (this.container.playback.el.nodeName.toLowerCase() === 'video') {\n // wait until the metadata has loaded and then check if fullscreen on video tag is supported\n this.listenToOnce(this.container, Events.CONTAINER_LOADEDMETADATA, this.onLoadedMetadataOnVideoTag)\n }\n }\n }\n\n disable() {\n this.userDisabled = true\n this.hide()\n this.$el.hide()\n }\n\n enable() {\n if (this.options.chromeless) return\n this.userDisabled = false\n this.show()\n }\n\n play() {\n this.container.play()\n }\n\n pause() {\n this.container.pause()\n }\n\n stop() {\n this.container.stop()\n }\n\n onVolumeChanged() {\n this.updateVolumeUI()\n }\n\n onLoadedMetadataOnVideoTag() {\n let video = this.container.playback.el\n // video.webkitSupportsFullscreen is deprecated but iOS appears to only use this\n // see https://github.com/clappr/clappr/issues/1127\n if (!Fullscreen.fullscreenEnabled() && video.webkitSupportsFullscreen) {\n this.fullScreenOnVideoTagSupported = true\n this.settingsUpdate()\n }\n }\n\n updateVolumeUI() {\n if (!this.rendered) {\n // this will be called after a render\n return\n }\n // update volume bar scrubber/fill on bar mode\n this.$volumeBarContainer.find('.bar-fill-2').css({})\n const containerWidth = this.$volumeBarContainer.width()\n const barWidth = this.$volumeBarBackground.width()\n const offset = (containerWidth - barWidth) / 2.0\n const pos = barWidth * this.volume / 100.0 + offset\n this.$volumeBarFill.css({ width: `${this.volume}%` })\n this.$volumeBarScrubber.css({ left: pos })\n\n // update volume bar segments on segmented bar mode\n this.$volumeBarContainer.find('.segmented-bar-element').removeClass('fill')\n const item = Math.ceil(this.volume / 10.0)\n this.$volumeBarContainer.find('.segmented-bar-element').slice(0, item).addClass('fill')\n this.$volumeIcon.html('')\n this.$volumeIcon.removeClass('muted')\n if (!this.muted) {\n this.$volumeIcon.append(volumeIcon)\n } else {\n this.$volumeIcon.append(volumeMuteIcon)\n this.$volumeIcon.addClass('muted')\n }\n this.applyButtonStyle(this.$volumeIcon)\n }\n\n changeTogglePlay() {\n this.$playPauseToggle.html('')\n this.$playStopToggle.html('')\n if (this.container && this.container.isPlaying()) {\n this.$playPauseToggle.append(pauseIcon)\n this.$playStopToggle.append(stopIcon)\n this.trigger(Events.MEDIACONTROL_PLAYING)\n } else {\n this.$playPauseToggle.append(playIcon)\n this.$playStopToggle.append(playIcon)\n this.trigger(Events.MEDIACONTROL_NOTPLAYING)\n if (Browser.isMobile) {\n this.show()\n }\n }\n this.applyButtonStyle(this.$playPauseToggle)\n this.applyButtonStyle(this.$playStopToggle)\n }\n\n mousemoveOnSeekBar(event) {\n if (this.settings.seekEnabled) {\n const offsetX = event.pageX - this.$seekBarContainer.offset().left - (this.$seekBarHover.width() / 2)\n this.$seekBarHover.css({left: offsetX})\n }\n this.trigger(Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, event)\n }\n\n mouseleaveOnSeekBar(event) {\n this.trigger(Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, event)\n }\n\n onVolumeClick(event) {\n this.setVolume(this.getVolumeFromUIEvent(event))\n }\n\n mousemoveOnVolumeBar(event) {\n if(this.draggingVolumeBar) {\n this.setVolume(this.getVolumeFromUIEvent(event))\n }\n }\n\n playerResize(size) {\n this.$fullscreenToggle.html('')\n if (Fullscreen.isFullscreen()) {\n this.$fullscreenToggle.append(exitFullscreenIcon)\n } else {\n this.$fullscreenToggle.append(fullscreenIcon)\n }\n this.applyButtonStyle(this.$fullscreenToggle)\n this.$el.removeClass('w320')\n if (size.width <= 320 || this.options.hideVolumeBar) {\n this.$el.addClass('w320')\n }\n }\n\n togglePlayPause() {\n if (this.container.isPlaying()) {\n this.container.pause()\n } else {\n this.container.play()\n }\n return false\n }\n\n togglePlayStop() {\n if (this.container.isPlaying()) {\n this.container.stop()\n } else {\n this.container.play()\n }\n }\n\n startSeekDrag(event) {\n if (!this.settings.seekEnabled) return\n this.draggingSeekBar = true\n this.$el.addClass('dragging')\n this.$seekBarLoaded.addClass('media-control-notransition')\n this.$seekBarPosition.addClass('media-control-notransition')\n this.$seekBarScrubber.addClass('media-control-notransition')\n if (event) {\n event.preventDefault()\n }\n }\n\n startVolumeDrag(event) {\n this.draggingVolumeBar = true\n this.$el.addClass('dragging')\n if (event) {\n event.preventDefault()\n }\n }\n\n stopDrag(event) {\n if (this.draggingSeekBar) {\n this.seek(event)\n }\n this.$el.removeClass('dragging')\n this.$seekBarLoaded.removeClass('media-control-notransition')\n this.$seekBarPosition.removeClass('media-control-notransition')\n this.$seekBarScrubber.removeClass('media-control-notransition dragging')\n this.draggingSeekBar = false\n this.draggingVolumeBar = false\n }\n\n updateDrag(event) {\n if (this.draggingSeekBar) {\n event.preventDefault()\n const offsetX = event.pageX - this.$seekBarContainer.offset().left\n let pos = offsetX / this.$seekBarContainer.width() * 100\n pos = Math.min(100, Math.max(pos, 0))\n this.setSeekPercentage(pos)\n } else if (this.draggingVolumeBar) {\n event.preventDefault()\n this.setVolume(this.getVolumeFromUIEvent(event))\n }\n }\n\n getVolumeFromUIEvent(event) {\n const offsetY = event.pageX - this.$volumeBarContainer.offset().left\n const volumeFromUI = (offsetY / this.$volumeBarContainer.width()) * 100\n return volumeFromUI\n }\n\n toggleMute() {\n this.setVolume(this.muted ? 100 : 0)\n }\n\n setVolume(value) {\n value = Math.min(100, Math.max(value, 0))\n // this will hold the intended volume\n // it may not actually get set to this straight away\n // if the container is not ready etc\n this.intendedVolume = value\n this.persistConfig && Config.persist('volume', value)\n const setWhenContainerReady = () => {\n if (this.container.isReady) {\n this.container.setVolume(value)\n } else {\n this.listenToOnce(this.container, Events.CONTAINER_READY, () => {\n this.container.setVolume(value)\n })\n }\n }\n\n if (!this.container) {\n this.listenToOnce(this, Events.MEDIACONTROL_CONTAINERCHANGED, () => {\n setWhenContainerReady()\n })\n } else {\n setWhenContainerReady()\n }\n }\n\n toggleFullscreen() {\n this.trigger(Events.MEDIACONTROL_FULLSCREEN, this.name)\n this.container.fullscreen()\n this.resetUserKeepVisible()\n }\n\n setContainer(container) {\n if (this.container) {\n this.stopListening(this.container)\n this.fullScreenOnVideoTagSupported = null\n }\n Mediator.off(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.playerResize, this)\n this.container = container\n // set the new container to match the volume of the last one\n this.setVolume(this.intendedVolume)\n this.changeTogglePlay()\n this.addEventListeners()\n this.settingsUpdate()\n this.container.trigger(Events.CONTAINER_PLAYBACKDVRSTATECHANGED, this.container.isDvrInUse())\n if (this.container.mediaControlDisabled) {\n this.disable()\n }\n this.trigger(Events.MEDIACONTROL_CONTAINERCHANGED)\n }\n\n showVolumeBar() {\n if (this.hideVolumeId) {\n clearTimeout(this.hideVolumeId)\n }\n this.$volumeBarContainer.removeClass('volume-bar-hide')\n }\n\n hideVolumeBar(timeout = 400) {\n if (!this.$volumeBarContainer) return\n if (this.draggingVolumeBar) {\n this.hideVolumeId = setTimeout(() => this.hideVolumeBar(), timeout)\n } else {\n if (this.hideVolumeId) {\n clearTimeout(this.hideVolumeId)\n }\n this.hideVolumeId = setTimeout(() => this.$volumeBarContainer.addClass('volume-bar-hide'), timeout)\n }\n }\n\n ended() {\n this.changeTogglePlay()\n }\n\n updateProgressBar(progress) {\n const loadedStart = progress.start / progress.total * 100\n const loadedEnd = progress.current / progress.total * 100\n this.$seekBarLoaded.css({ left: `${loadedStart}%`, width: `${loadedEnd - loadedStart}%` })\n }\n\n onTimeUpdate(timeProgress) {\n if (this.draggingSeekBar) return\n // TODO why should current time ever be negative?\n const position = (timeProgress.current < 0) ? timeProgress.total : timeProgress.current\n\n this.currentPositionValue = position\n this.currentDurationValue = timeProgress.total\n this.renderSeekBar()\n }\n\n renderSeekBar() {\n if (this.currentPositionValue === null || this.currentDurationValue === null) {\n // this will be triggered as soon as these beocome available\n return\n }\n\n // default to 100%\n this.currentSeekBarPercentage = 100\n if (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrInUse()) {\n this.currentSeekBarPercentage = (this.currentPositionValue / this.currentDurationValue) * 100\n }\n this.setSeekPercentage(this.currentSeekBarPercentage)\n\n const newPosition = formatTime(this.currentPositionValue)\n const newDuration = formatTime(this.currentDurationValue)\n if (newPosition !== this.displayedPosition) {\n this.$position.text(newPosition)\n this.displayedPosition = newPosition\n }\n if (newDuration !== this.displayedDuration) {\n this.$duration.text(newDuration)\n this.displayedDuration = newDuration\n }\n }\n\n seek(event) {\n if (!this.settings.seekEnabled) return\n const offsetX = event.pageX - this.$seekBarContainer.offset().left\n let pos = offsetX / this.$seekBarContainer.width() * 100\n pos = Math.min(100, Math.max(pos, 0))\n this.container.seekPercentage(pos)\n this.setSeekPercentage(pos)\n return false\n }\n\n setKeepVisible() {\n this.keepVisible = true\n }\n\n resetKeepVisible() {\n this.keepVisible = false\n }\n\n setUserKeepVisible() {\n this.userKeepVisible = true\n }\n\n resetUserKeepVisible() {\n this.userKeepVisible = false\n }\n\n isVisible() {\n return !this.$el.hasClass('media-control-hide')\n }\n\n show(event) {\n if (this.disabled) {\n return\n }\n const timeout = 2000\n if (!event || (event.clientX !== this.lastMouseX && event.clientY !== this.lastMouseY) || navigator.userAgent.match(/firefox/i)) {\n clearTimeout(this.hideId)\n this.$el.show()\n this.trigger(Events.MEDIACONTROL_SHOW, this.name)\n this.$el.removeClass('media-control-hide')\n this.hideId = setTimeout(() => this.hide(), timeout)\n if (event) {\n this.lastMouseX = event.clientX\n this.lastMouseY = event.clientY\n }\n }\n }\n\n hide(delay = 0) {\n if (!this.isVisible() || (Browser.isMobile && !this.container.isPlaying())) {\n return\n }\n const timeout = delay || 2000\n clearTimeout(this.hideId)\n if (!this.disabled && this.options.hideMediaControl === false) {\n return\n }\n if (!this.disabled && (delay || this.userKeepVisible || this.keepVisible || this.draggingSeekBar || this.draggingVolumeBar)) {\n this.hideId = setTimeout(() => this.hide(), timeout)\n } else {\n this.trigger(Events.MEDIACONTROL_HIDE, this.name)\n this.$el.addClass('media-control-hide')\n this.hideVolumeBar(0)\n }\n }\n\n settingsUpdate() {\n const newSettings = this.getSettings()\n if (newSettings && !this.fullScreenOnVideoTagSupported && !Fullscreen.fullscreenEnabled()) {\n // remove fullscreen from settings if it is present\n newSettings.default && removeArrayItem(newSettings.default, 'fullscreen')\n newSettings.left && removeArrayItem(newSettings.left, 'fullscreen')\n newSettings.right && removeArrayItem(newSettings.right, 'fullscreen')\n }\n const settingsChanged = JSON.stringify(this.settings) !== JSON.stringify(newSettings)\n if (settingsChanged) {\n this.settings = newSettings\n this.render()\n }\n }\n\n getSettings() {\n return merge({}, this.container.settings)\n }\n\n highDefinitionUpdate(isHD) {\n const method = isHD ? 'addClass' : 'removeClass'\n this.$hdIndicator[method]('enabled')\n }\n\n createCachedElements() {\n const $layer = this.$el.find('.media-control-layer')\n this.$duration = $layer.find('.media-control-indicator[data-duration]')\n this.$fullscreenToggle = $layer.find('button.media-control-button[data-fullscreen]')\n this.$playPauseToggle = $layer.find('button.media-control-button[data-playpause]')\n this.$playStopToggle = $layer.find('button.media-control-button[data-playstop]')\n this.$position = $layer.find('.media-control-indicator[data-position]')\n this.$seekBarContainer = $layer.find('.bar-container[data-seekbar]')\n this.$seekBarHover = $layer.find('.bar-hover[data-seekbar]')\n this.$seekBarLoaded = $layer.find('.bar-fill-1[data-seekbar]')\n this.$seekBarPosition = $layer.find('.bar-fill-2[data-seekbar]')\n this.$seekBarScrubber = $layer.find('.bar-scrubber[data-seekbar]')\n this.$volumeBarContainer = $layer.find('.bar-container[data-volume]')\n this.$volumeContainer = $layer.find('.drawer-container[data-volume]')\n this.$volumeIcon = $layer.find('.drawer-icon[data-volume]')\n this.$volumeBarBackground = this.$el.find('.bar-background[data-volume]')\n this.$volumeBarFill = this.$el.find('.bar-fill-1[data-volume]')\n this.$volumeBarScrubber = this.$el.find('.bar-scrubber[data-volume]')\n this.$hdIndicator = this.$el.find('button.media-control-button[data-hd-indicator]')\n this.resetIndicators()\n this.initializeIcons()\n }\n\n resetIndicators() {\n this.displayedPosition = this.$position.text()\n this.displayedDuration = this.$duration.text()\n }\n\n initializeIcons() {\n const $layer = this.$el.find('.media-control-layer')\n $layer.find('button.media-control-button[data-play]').append(playIcon)\n $layer.find('button.media-control-button[data-pause]').append(pauseIcon)\n $layer.find('button.media-control-button[data-stop]').append(stopIcon)\n this.$playPauseToggle.append(playIcon)\n this.$playStopToggle.append(playIcon)\n this.$volumeIcon.append(volumeIcon)\n this.$fullscreenToggle.append(fullscreenIcon)\n this.$hdIndicator.append(hdIcon)\n }\n\n setSeekPercentage(value) {\n value = Math.max(Math.min(value, 100.0), 0)\n if (this.displayedSeekBarPercentage === value) {\n // not changed since last update\n return\n }\n this.displayedSeekBarPercentage = value\n\n this.$seekBarPosition.removeClass('media-control-notransition')\n this.$seekBarScrubber.removeClass('media-control-notransition')\n this.$seekBarPosition.css({ width: `${value}%` })\n this.$seekBarScrubber.css({ left: `${value}%` })\n }\n\n seekRelative(delta) {\n if (!this.settings.seekEnabled) return\n const currentTime = this.container.getCurrentTime()\n const duration = this.container.getDuration()\n let position = Math.min(Math.max(currentTime + delta, 0), duration)\n position = Math.min(position * 100 / duration, 100)\n this.container.seekPercentage(position)\n }\n\n bindKeyEvents() {\n this.unbindKeyEvents()\n this.kibo = new Kibo(this.options.focusElement)\n this.kibo.down(['space'], () => this.togglePlayPause())\n this.kibo.down(['left'], () => this.seekRelative(-15))\n this.kibo.down(['right'], () => this.seekRelative(15))\n const keys = [1,2,3,4,5,6,7,8,9,0]\n keys.forEach((i) => { this.kibo.down(i.toString(), () => this.settings.seekEnabled && this.container.seekPercentage(i * 10)) })\n }\n\n unbindKeyEvents() {\n if (this.kibo) {\n this.kibo.off('space')\n this.kibo.off('left')\n this.kibo.off('right')\n this.kibo.off([1,2,3,4,5,6,7,8,9,0])\n }\n }\n\n parseColors() {\n if (this.options.mediacontrol) {\n this.buttonsColor = this.options.mediacontrol.buttons\n const seekbarColor = this.options.mediacontrol.seekbar\n this.$el.find('.bar-fill-2[data-seekbar]').css('background-color', seekbarColor)\n this.$el.find('.media-control-icon svg path').css('fill', this.buttonsColor)\n this.$el.find('.segmented-bar-element[data-volume]').css('boxShadow', 'inset 2px 0 0 ' + this.buttonsColor)\n }\n }\n\n applyButtonStyle(element) {\n if (this.buttonsColor && element) {\n $(element).find('svg path').css('fill', this.buttonsColor)\n }\n }\n\n destroy() {\n this.remove()\n $(document).unbind('mouseup', this.stopDragHandler)\n $(document).unbind('mousemove', this.updateDragHandler)\n this.unbindKeyEvents()\n }\n\n render() {\n const timeout = 1000\n this.$el.html(this.template({ settings: this.settings }))\n this.$el.append(this.stylesheet)\n this.createCachedElements()\n this.$playPauseToggle.addClass('paused')\n this.$playStopToggle.addClass('stopped')\n\n this.changeTogglePlay()\n this.hideId = setTimeout(() => this.hide(), timeout)\n if (this.disabled) {\n this.hide()\n }\n\n if(Browser.isSafari && Browser.isMobile) {\n this.$volumeContainer.css('display','none')\n }\n\n this.$seekBarPosition.addClass('media-control-notransition')\n this.$seekBarScrubber.addClass('media-control-notransition')\n\n let previousSeekPercentage = 0\n if (this.displayedSeekBarPercentage) {\n previousSeekPercentage = this.displayedSeekBarPercentage\n }\n this.displayedSeekBarPercentage = null\n this.setSeekPercentage(previousSeekPercentage)\n\n process.nextTick(() => {\n if (!this.settings.seekEnabled) {\n this.$seekBarContainer.addClass('seek-disabled')\n }\n if (!this.options.disableKeyboardShortcuts) {\n this.bindKeyEvents()\n }\n this.playerResize({width: this.options.width, height: this.options.height})\n this.hideVolumeBar(0)\n })\n\n this.parseColors()\n this.highDefinitionUpdate()\n\n this.rendered = true\n this.updateVolumeUI()\n this.trigger(Events.MEDIACONTROL_RENDERED)\n return this\n }\n}\n\nMediaControl.extend = function(properties) {\n return extend(MediaControl, properties)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/media_control/media_control.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {uniqueId, currentScriptUrl} from 'base/utils'\n\nimport BaseObject from 'base/base_object'\nimport Events from 'base/events'\nimport Browser from 'components/browser'\nimport CoreFactory from 'components/core_factory'\nimport Loader from 'components/loader'\nimport PlayerInfo from 'components/player_info'\nimport $ from 'clappr-zepto'\n\nconst baseUrl = currentScriptUrl().replace(/\\/[^\\/]+$/, '')\n\n/**\n * @class Player\n * @constructor\n * @extends BaseObject\n * @module components\n * @example\n * ### Using the Player\n *\n * Add the following script on your HTML:\n * ```html\n * <head>\n * <script type=\"text/javascript\" src=\"http://cdn.clappr.io/latest/clappr.min.js\"></script>\n * </head>\n * ```\n * Now, create the player:\n * ```html\n * <body>\n * <div id=\"player\"></div>\n * <script>\n * var player = new Clappr.Player({source: \"http://your.video/here.mp4\", parentId: \"#player\"});\n * </script>\n * </body>\n * ```\n */\nexport default class Player extends BaseObject {\n\n set loader(loader) { this._loader = loader }\n get loader() {\n if (!this._loader) {\n this._loader = new Loader(this.options.plugins || {}, this.options.playerId)\n }\n return this._loader\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return this.core.mediaControl.container.ended\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * (i.e if a live stream is playing smoothly, this will be false)\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return this.core.mediaControl.container.buffering\n }\n\n /*\n * determine if the player is ready.\n * @property isReady\n * @type {Boolean} `true` if the player is ready. ie PLAYER_READY event has fired\n */\n get isReady() {\n return !!this._ready\n }\n\n /**\n * An events map that allows the user to add custom callbacks in player's options.\n * @property eventsMapping\n * @type {Object}\n */\n get eventsMapping() {\n return {\n onReady: Events.PLAYER_READY,\n onResize: Events.PLAYER_RESIZE,\n onPlay: Events.PLAYER_PLAY,\n onPause: Events.PLAYER_PAUSE,\n onStop: Events.PLAYER_STOP,\n onEnded: Events.PLAYER_ENDED,\n onSeek: Events.PLAYER_SEEK,\n onError: Events.PLAYER_ERROR,\n onTimeUpdate: Events.PLAYER_TIMEUPDATE,\n onVolumeUpdate: Events.PLAYER_VOLUMEUPDATE\n }\n }\n\n /**\n * ## Player's constructor\n *\n * You might pass the options object to build the player.\n * ```javascript\n * var options = {source: \"http://example.com/video.mp4\", param1: \"val1\"};\n * var player = new Clappr.Player(options);\n * ```\n *\n * @method constructor\n * @param {Object} options Data\n * options to build a player instance\n * @param {Number} [options.width]\n * player's width **default**: `640`\n * @param {Number} [options.height]\n * player's height **default**: `360`\n * @param {String} [options.parentId]\n * the id of the element on the page that the player should be inserted into\n * @param {Object} [options.parent]\n * a reference to a dom element that the player should be inserted into\n * @param {String} [options.source]\n * The media source URL, or {source: <<source URL>>, mimeType: <<source mime type>>}\n * @param {Object} [options.sources]\n * An array of media source URL's, or an array of {source: <<source URL>>, mimeType: <<source mime type>>}\n * @param {Boolean} [options.autoPlay]\n * automatically play after page load **default**: `false`\n * @param {Boolean} [options.loop]\n * automatically replay after it ends **default**: `false`\n * @param {Boolean} [options.chromeless]\n * player acts in chromeless mode **default**: `false`\n * @param {Boolean} [options.allowUserInteraction]\n * whether or not the player should handle click events when in chromeless mode **default**: `false` on desktops browsers, `true` on mobile.\n * @param {Boolean} [options.disableKeyboardShortcuts]\n * disable keyboard shortcuts. **default**: `false`. `true` if `allowUserInteraction` is `false`.\n * @param {Boolean} [options.muted]\n * start the video muted **default**: `false`\n * @param {String} [options.mimeType]\n * add `mimeType: \"application/vnd.apple.mpegurl\"` if you need to use a url without extension.\n * @param {String} [options.actualLiveTime]\n * show duration and seek time relative to actual time.\n * @param {String} [options.actualLiveServerTime]\n * specify server time as a string, format: \"2015/11/26 06:01:03\". This option is meant to be used with actualLiveTime.\n * @param {Boolean} [options.persistConfig]\n * persist player's settings (volume) through the same domain **default**: `true`\n * @param {String} [options.preload]\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @param {Number} [options.maxBufferLength]\n * the default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.\n * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.\n * To change this behavior use `maxBufferLength` where **value is in seconds**.\n * @param {String} [options.gaAccount]\n * enable Google Analytics events dispatch **(play/pause/stop/buffering/etc)** by adding your `gaAccount`\n * @param {String} [options.gaTrackerName]\n * besides `gaAccount` you can optionally, pass your favorite trackerName as `gaTrackerName`\n * @param {Object} [options.mediacontrol]\n * customize control bar colors, example: `mediacontrol: {seekbar: \"#E113D3\", buttons: \"#66B2FF\"}`\n * @param {Boolean} [options.hideMediaControl]\n * control media control auto hide **default**: `true`\n * @param {Boolean} [options.hideVolumeBar]\n * when embedded with width less than 320, volume bar will hide. You can force this behavior for all sizes by adding `true` **default**: `false`\n * @param {String} [options.watermark]\n * put `watermark: 'http://url/img.png'` on your embed parameters to automatically add watermark on your video.\n * You can customize corner position by defining position parameter. Positions can be `bottom-left`, `bottom-right`, `top-left` and `top-right`.\n * @param {String} [options.watermarkLink]\n * `watermarkLink: 'http://example.net/'` - define URL to open when the watermark is clicked. If not provided watermark will not be clickable.\n * @param {Boolean} [options.disableVideoTagContextMenu]\n * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n * @param {Boolean} [options.autoSeekFromUrl]\n * Automatically seek to the seconds provided in the url (e.g example.com?t=100) **default**: `true`\n * @param {Boolean} [options.exitFullscreenOnEnd]\n * Automatically exit full screen when the media finishes. **default**: `true`\n * @param {String} [options.poster]\n * define a poster by adding its address `poster: 'http://url/img.png'`. It will appear after video embed, disappear on play and go back when user stops the video.\n * @param {String} [options.playbackNotSupportedMessage]\n * define a custom message to be displayed when a playback is not supported.\n * @param {Object} [options.events]\n * Specify listeners which will be registered with their corresponding player events.\n * E.g. onReady -> \"PLAYER_READY\", onTimeUpdate -> \"PLAYER_TIMEUPDATE\"\n */\n constructor(options) {\n super(options)\n const defaultOptions = {playerId: uniqueId(''), persistConfig: true, width: 640, height: 360, baseUrl: baseUrl, allowUserInteraction: Browser.isMobile}\n this._options = $.extend(defaultOptions, options)\n this.options.sources = this._normalizeSources(options)\n if (!this.options.chromeless) {\n // \"allowUserInteraction\" cannot be false if not in chromeless mode.\n this.options.allowUserInteraction = true\n }\n if (!this.options.allowUserInteraction) {\n // if user iteraction is not allowed ensure keyboard shortcuts are disabled\n this.options.disableKeyboardShortcuts = true\n }\n this._registerOptionEventListeners()\n this._coreFactory = new CoreFactory(this)\n this.playerInfo = PlayerInfo.getInstance(this.options.playerId)\n this.playerInfo.currentSize = {width: options.width, height: options.height}\n this.playerInfo.options = this.options\n if (this.options.parentId) {\n this.setParentId(this.options.parentId)\n }\n else if (this.options.parent) {\n this.attachTo(this.options.parent)\n }\n }\n\n /**\n * Specify a `parentId` to the player.\n * @method setParentId\n * @param {String} parentId the element parent id.\n * @return {Player} itself\n */\n setParentId(parentId) {\n const el = document.querySelector(parentId)\n if (el) {\n this.attachTo(el)\n }\n return this\n }\n\n /**\n * You can use this method to attach the player to a given element. You don't need to do this when you specify it during the player instantiation passing the `parentId` param.\n * @method attachTo\n * @param {Object} element a given element.\n * @return {Player} itself\n */\n attachTo(element) {\n this.options.parentElement = element\n this.core = this._coreFactory.create()\n this._addEventListeners()\n return this\n }\n\n _addEventListeners() {\n if (!this.core.isReady) {\n this.listenToOnce(this.core, Events.CORE_READY, this._onReady)\n } else {\n this._onReady()\n }\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this._containerChanged)\n this.listenTo(this.core, Events.CORE_FULLSCREEN, this._onFullscreenChange)\n return this\n }\n\n _addContainerEventListeners() {\n const container = this.core.mediaControl.container\n if (container) {\n this.listenTo(container, Events.CONTAINER_PLAY, this._onPlay)\n this.listenTo(container, Events.CONTAINER_PAUSE, this._onPause)\n this.listenTo(container, Events.CONTAINER_STOP, this._onStop)\n this.listenTo(container, Events.CONTAINER_ENDED, this._onEnded)\n this.listenTo(container, Events.CONTAINER_SEEK, this._onSeek)\n this.listenTo(container, Events.CONTAINER_ERROR, this._onError)\n this.listenTo(container, Events.CONTAINER_TIMEUPDATE, this._onTimeUpdate)\n this.listenTo(container, Events.CONTAINER_VOLUME, this._onVolumeUpdate)\n }\n return this\n }\n\n _registerOptionEventListeners() {\n const userEvents = this.options.events || {}\n Object.keys(userEvents).forEach((userEvent) => {\n const eventType = this.eventsMapping[userEvent]\n if (eventType) {\n let eventFunction = userEvents[userEvent]\n eventFunction = typeof eventFunction === 'function' && eventFunction\n eventFunction && this.on(eventType, eventFunction)\n }\n })\n return this\n }\n\n _containerChanged() {\n this.stopListening()\n this._addEventListeners()\n }\n\n _onReady() {\n this._ready = true\n this._addContainerEventListeners()\n this.trigger(Events.PLAYER_READY)\n }\n\n _onFullscreenChange(fullscreen) {\n this.trigger(Events.PLAYER_FULLSCREEN, fullscreen)\n }\n\n _onVolumeUpdate(volume) {\n this.trigger(Events.PLAYER_VOLUMEUPDATE, volume)\n }\n\n _onPlay() {\n this.trigger(Events.PLAYER_PLAY)\n }\n\n _onPause() {\n this.trigger(Events.PLAYER_PAUSE)\n }\n\n _onStop() {\n this.trigger(Events.PLAYER_STOP, this.getCurrentTime())\n }\n\n _onEnded() {\n this.trigger(Events.PLAYER_ENDED)\n }\n\n _onSeek(time) {\n this.trigger(Events.PLAYER_SEEK, time)\n }\n\n _onTimeUpdate(timeProgress) {\n this.trigger(Events.PLAYER_TIMEUPDATE, timeProgress)\n }\n\n _onError(error) {\n this.trigger(Events.PLAYER_ERROR, error)\n }\n\n _normalizeSources(options) {\n const sources = options.sources || (options.source !== undefined? [options.source] : [])\n return sources.length === 0 ? [{source:'', mimeType:''}] : sources\n }\n\n /**\n * resizes the current player canvas.\n * @method resize\n * @param {Object} size should be a literal object with `height` and `width`.\n * @return {Player} itself\n * @example\n * ```javascript\n * player.resize({height: 360, width: 640})\n * ```\n */\n resize(size) {\n this.core.resize(size)\n return this\n }\n\n /**\n * loads a new source.\n * @method load\n * @param {Array|String} sources source or sources of video.\n * An array item can be a string or {source: <<source URL>>, mimeType: <<source mime type>>}\n * @param {String} mimeType a mime type, example: `'application/vnd.apple.mpegurl'`\n * @param {Boolean} [autoPlay=false] whether playing should be started immediately\n * @return {Player} itself\n */\n load(sources, mimeType, autoPlay) {\n if (autoPlay !== undefined) {\n this.configure({autoPlay: !!autoPlay})\n }\n this.core.load(sources, mimeType)\n return this\n }\n\n /**\n * destroys the current player and removes it from the DOM.\n * @method destroy\n * @return {Player} itself\n */\n destroy() {\n this.core.destroy()\n return this\n }\n\n /**\n * plays the current video (`source`).\n * @method play\n * @return {Player} itself\n */\n play() {\n this.core.mediaControl.container.play()\n return this\n }\n\n /**\n * pauses the current video (`source`).\n * @method pause\n * @return {Player} itself\n */\n pause() {\n this.core.mediaControl.container.pause()\n return this\n }\n\n /**\n * stops the current video (`source`).\n * @method stop\n * @return {Player} itself\n */\n stop() {\n this.core.mediaControl.container.stop()\n return this\n }\n\n\n /**\n * seeks the current video (`source`). For example, `player.seek(120)` will seek to second 120 (2minutes) of the current video.\n * @method seek\n * @param {Number} time should be a number between 0 and the video duration.\n * @return {Player} itself\n */\n seek(time) {\n this.core.mediaControl.container.seek(time)\n return this\n }\n\n /**\n * seeks the current video (`source`). For example, `player.seek(50)` will seek to the middle of the current video.\n * @method seekPercentage\n * @param {Number} time should be a number between 0 and 100.\n * @return {Player} itself\n */\n seekPercentage(percentage) {\n this.core.mediaControl.container.seekPercentage(percentage)\n return this\n }\n\n /**\n * Set the volume for the current video (`source`).\n * @method setVolume\n * @param {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.\n * @return {Player} itself\n */\n setVolume(volume) {\n if (this.core && this.core.mediaControl) {\n this.core.mediaControl.setVolume(volume)\n }\n return this\n }\n\n /**\n * Get the volume for the current video\n * @method getVolume\n * @return {Number} volume should be a number between 0 and 100, 0 being mute and 100 the max volume.\n */\n getVolume() {\n return this.core && this.core.mediaControl ? this.core.mediaControl.volume : 0\n }\n\n /**\n * mutes the current video (`source`).\n * @method mute\n * @return {Player} itself\n */\n mute() {\n this._mutedVolume = this.getVolume()\n this.setVolume(0)\n return this\n }\n\n /**\n * unmutes the current video (`source`).\n * @method unmute\n * @return {Player} itself\n */\n unmute() {\n this.setVolume(typeof this._mutedVolume === 'number' ? this._mutedVolume : 100)\n this._mutedVolume = null\n return this\n }\n\n /**\n * checks if the player is playing.\n * @method isPlaying\n * @return {Boolean} `true` if the current source is playing, otherwise `false`\n */\n isPlaying() {\n return this.core.mediaControl.container.isPlaying()\n }\n\n /**\n * returns `true` if DVR is enable otherwise `false`.\n * @method isDvrEnabled\n * @return {Boolean}\n */\n isDvrEnabled() {\n return this.core.mediaControl.container.isDvrEnabled()\n }\n\n /**\n * returns `true` if DVR is in use otherwise `false`.\n * @method isDvrInUse\n * @return {Boolean}\n */\n isDvrInUse() {\n return this.core.mediaControl.container.isDvrInUse()\n }\n\n /**\n * enables to configure a player after its creation\n * @method configure\n * @param {Object} options all the options to change in form of a javascript object\n * @return {Player} itself\n */\n configure(options) {\n this.core.configure(options)\n return this\n }\n\n /**\n * get a plugin by its name.\n * @method getPlugin\n * @param {String} name of the plugin.\n * @return {Object} the plugin instance\n * @example\n * ```javascript\n * var poster = player.getPlugin('poster');\n * poster.hidePlayButton();\n * ```\n */\n getPlugin(name) {\n const plugins = this.core.plugins.concat(this.core.mediaControl.container.plugins)\n return plugins.filter(plugin => plugin.name === name)[0]\n }\n\n /**\n * the current time in seconds.\n * @method getCurrentTime\n * @return {Number} current time (in seconds) of the current source\n */\n getCurrentTime() {\n return this.core.mediaControl.container.getCurrentTime()\n }\n\n /**\n * The time that \"0\" now represents relative to when playback started.\n * For a stream with a sliding window this will increase as content is\n * removed from the beginning.\n * @method getStartTimeOffset\n * @return {Number} time (in seconds) that time \"0\" represents.\n */\n getStartTimeOffset() {\n return this.core.mediaControl.container.getStartTimeOffset()\n }\n\n /**\n * the duration time in seconds.\n * @method getDuration\n * @return {Number} duration time (in seconds) of the current source\n */\n getDuration() {\n return this.core.mediaControl.container.getDuration()\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/player.js","// Copyright 2015 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport Playback from 'base/playback'\nimport Styler from 'base/styler'\nimport template from 'base/template'\nimport Browser from 'components/browser'\n\nimport flashHTML from './public/flash.html'\nimport flashStyle from './public/flash.scss'\n\nconst IE_CLASSID = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'\n\nexport default class BaseFlashPlayback extends Playback {\n get tagName() { return 'object' }\n get swfPath() { return '' }\n get wmode() { return 'transparent' }\n get template() { return template(flashHTML) }\n get attributes() {\n let type = 'application/x-shockwave-flash'\n\n if (Browser.isLegacyIE) {\n type = ''\n }\n\n return {\n class: 'clappr-flash-playback',\n type: type,\n width: '100%',\n height: '100%',\n 'data-flash-playback': this.name\n }\n }\n\n setElement(element) {\n this.$el = element\n this.el = element[0]\n }\n\n _setupFirefox() {\n const $el = this.$('embed')\n $el.attr('data-flash-playback', this.name)\n $el.addClass(this.attributes.class)\n this.setElement($el)\n }\n\n render() {\n this.$el.html(this.template({\n cid: this.cid,\n swfPath: this.swfPath,\n baseUrl: this.baseUrl,\n playbackId: this.uniqueId,\n wmode: this.wmode,\n callbackName: `window.Clappr.flashlsCallbacks.${this.cid}`})\n )\n\n if (Browser.isIE) {\n this.$('embed').remove()\n\n if (Browser.isLegacyIE) {\n this.$el.attr('classid', IE_CLASSID)\n }\n }\n\n if (Browser.isFirefox) {\n this._setupFirefox()\n }\n\n this.el.id = this.cid\n this.$el.append(Styler.getStyleFor(flashStyle))\n\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/base_flash_playback/base_flash_playback.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {seekStringToSeconds} from 'base/utils'\n\nimport BaseFlashPlayback from 'playbacks/base_flash_playback'\nimport Browser from 'components/browser'\nimport Mediator from 'components/mediator'\nimport template from 'base/template'\nimport $ from 'clappr-zepto'\nimport Events from 'base/events'\nimport Playback from 'base/playback'\nimport flashSwf from './public/Player.swf'\n\nconst MAX_ATTEMPTS = 60\n\nexport default class Flash extends BaseFlashPlayback {\n get name() { return 'flash' }\n get swfPath() { return template(flashSwf)({baseUrl: this._baseUrl}) }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return this._currentState === 'ENDED'\n }\n\n /**\n * Determine if the playback is buffering.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return !!this._bufferingState && this._currentState !== 'ENDED'\n }\n\n constructor(...args) {\n super(...args)\n this._src = this.options.src\n this._baseUrl = this.options.baseUrl\n this._autoPlay = this.options.autoPlay\n this.settings = {default: ['seekbar']}\n this.settings.left = ['playpause', 'position', 'duration']\n this.settings.right = ['fullscreen', 'volume']\n this.settings.seekEnabled = true\n this._isReadyState = false\n this._addListeners()\n }\n\n\n _bootstrap() {\n if (this.el.playerPlay) {\n this.el.width = '100%'\n this.el.height = '100%'\n if (this._currentState === 'PLAYING') {\n this._firstPlay()\n } else {\n this._currentState = 'IDLE'\n this._autoPlay && this.play()\n }\n $('<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%\" />').insertAfter(this.$el)\n if (this.getDuration() > 0) {\n this._metadataLoaded()\n } else {\n Mediator.once(this.uniqueId + ':timeupdate', this._metadataLoaded, this)\n }\n } else {\n this._attempts = this._attempts || 0\n if (++this._attempts <= MAX_ATTEMPTS) {\n setTimeout(() => this._bootstrap(), 50)\n } else {\n this.trigger(Events.PLAYBACK_ERROR, {message: 'Max number of attempts reached'}, this.name)\n }\n }\n }\n\n _metadataLoaded() {\n this._isReadyState = true\n this.trigger(Events.PLAYBACK_READY, this.name)\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE, this.name)\n }\n\n getPlaybackType() {\n return Playback.VOD\n }\n\n isHighDefinitionInUse() {\n return false\n }\n\n _updateTime() {\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: this.el.getPosition(), total: this.el.getDuration()}, this.name)\n }\n\n _addListeners() {\n Mediator.on(this.uniqueId + ':progress', this._progress, this)\n Mediator.on(this.uniqueId + ':timeupdate', this._updateTime, this)\n Mediator.on(this.uniqueId + ':statechanged', this._checkState, this)\n Mediator.on(this.uniqueId + ':flashready', this._bootstrap, this)\n }\n\n stopListening() {\n super.stopListening()\n Mediator.off(this.uniqueId + ':progress')\n Mediator.off(this.uniqueId + ':timeupdate')\n Mediator.off(this.uniqueId + ':statechanged')\n Mediator.off(this.uniqueId + ':flashready')\n }\n\n _checkState() {\n if (this._isIdle || this._currentState === 'PAUSED') {\n return\n } else if (this._currentState !== 'PLAYING_BUFFERING' && this.el.getState() === 'PLAYING_BUFFERING') {\n this._bufferingState = true\n this.trigger(Events.PLAYBACK_BUFFERING, this.name)\n this._currentState = 'PLAYING_BUFFERING'\n } else if (this.el.getState() === 'PLAYING') {\n this._bufferingState = false\n this.trigger(Events.PLAYBACK_BUFFERFULL, this.name)\n this._currentState = 'PLAYING'\n } else if (this.el.getState() === 'IDLE') {\n this._currentState = 'IDLE'\n } else if (this.el.getState() === 'ENDED') {\n this.trigger(Events.PLAYBACK_ENDED, this.name)\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: 0, total: this.el.getDuration()}, this.name)\n this._currentState = 'ENDED'\n this._isIdle = true\n }\n }\n\n _progress() {\n if (this._currentState !== 'IDLE' && this._currentState !== 'ENDED') {\n this.trigger(Events.PLAYBACK_PROGRESS,{\n start: 0,\n current: this.el.getBytesLoaded(),\n total: this.el.getBytesTotal()\n })\n }\n }\n\n _firstPlay() {\n if (this.el.playerPlay) {\n this._isIdle = false\n this.el.playerPlay(this._src)\n this.listenToOnce(this, Events.PLAYBACK_BUFFERFULL, () => this._checkInitialSeek())\n this._currentState = 'PLAYING'\n } else {\n this.listenToOnce(this, Events.PLAYBACK_READY, this._firstPlay)\n }\n }\n\n _checkInitialSeek() {\n let seekTime = seekStringToSeconds(window.location.href)\n if (seekTime !== 0) {\n this.seekSeconds(seekTime)\n }\n }\n\n play() {\n this.trigger(Events.PLAYBACK_PLAY_INTENT)\n if (this._currentState === 'PAUSED' || this._currentState === 'PLAYING_BUFFERING') {\n this._currentState = 'PLAYING'\n this.el.playerResume()\n this.trigger(Events.PLAYBACK_PLAY, this.name)\n } else if (this._currentState !== 'PLAYING') {\n this._firstPlay()\n this.trigger(Events.PLAYBACK_PLAY, this.name)\n }\n }\n\n volume(value) {\n if (this.isReady) {\n this.el.playerVolume(value)\n } else {\n this.listenToOnce(this, Events.PLAYBACK_BUFFERFULL, () => this.volume(value))\n }\n }\n\n pause() {\n this._currentState = 'PAUSED'\n this.el.playerPause()\n this.trigger(Events.PLAYBACK_PAUSE, this.name)\n }\n\n stop() {\n this.el.playerStop()\n this.trigger(Events.PLAYBACK_STOP)\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: 0, total: 0}, this.name)\n }\n\n isPlaying() {\n return !!(this.isReady && this._currentState.indexOf('PLAYING') > -1)\n }\n\n get isReady(){\n return this._isReadyState\n }\n\n getDuration() {\n return this.el.getDuration()\n }\n\n seekPercentage(percentage) {\n if (this.el.getDuration() > 0) {\n let seekSeconds = this.el.getDuration() * (percentage / 100)\n this.seek(seekSeconds)\n } else {\n this.listenToOnce(this, Events.PLAYBACK_BUFFERFULL, () => this.seekPercentage(percentage))\n }\n }\n\n seek(time) {\n if (this.isReady && this.el.playerSeek) {\n this.el.playerSeek(time)\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: time, total: this.el.getDuration()}, this.name)\n if (this._currentState === 'PAUSED') {\n this.el.playerPause()\n }\n } else {\n this.listenToOnce(this, Events.PLAYBACK_BUFFERFULL, () => this.seek(time))\n }\n }\n\n destroy() {\n clearInterval(this.bootstrapId)\n super.stopListening()\n this.$el.remove()\n }\n}\n\nFlash.canPlay = function(resource) {\n if (!Browser.hasFlash || !resource || resource.constructor !== String) {\n return false\n } else {\n const resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return resourceParts.length > 1 && !Browser.isMobile && resourceParts[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)\n\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/flash/flash.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport BaseFlashPlayback from 'playbacks/base_flash_playback'\nimport Events from 'base/events'\nimport template from 'base/template'\nimport Playback from 'base/playback'\nimport Mediator from 'components/mediator'\nimport Browser from 'components/browser'\nimport HLSEvents from './flashls_events'\nimport hlsSwf from './public/HLSPlayer.swf'\nimport $ from 'clappr-zepto'\n\n\nconst MAX_ATTEMPTS = 60\nconst AUTO = -1\n\nexport default class FlasHLS extends BaseFlashPlayback {\n get name() { return 'flashls' }\n get swfPath() { return template(hlsSwf)({baseUrl: this._baseUrl}) }\n\n get levels() { return this._levels || [] }\n get currentLevel() {\n if (this._currentLevel === null || this._currentLevel === undefined) {\n return AUTO\n } else {\n return this._currentLevel //0 is a valid level ID\n }\n }\n set currentLevel(id) {\n this._currentLevel = id\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n this.el.playerSetCurrentLevel(id)\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return this._hasEnded\n }\n\n /**\n * Determine if the playback is buffering.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return !!this._bufferingState && !this._hasEnded\n }\n\n constructor(...args) {\n super(...args)\n this._src = this.options.src\n this._baseUrl = this.options.baseUrl\n this._initHlsParameters(this.options)\n // TODO can this be private?\n this.highDefinition = false\n this._autoPlay = this.options.autoPlay\n this._loop = this.options.loop\n this._defaultSettings = {\n left: ['playstop'],\n default: ['seekbar'],\n right: ['fullscreen', 'volume', 'hd-indicator'],\n seekEnabled: false\n }\n this.settings = $.extend({}, this._defaultSettings)\n this._playbackType = Playback.LIVE\n this._hasEnded = false\n this._addListeners()\n }\n\n _initHlsParameters(options) {\n this._autoStartLoad = (options.autoStartLoad === undefined) ? true : options.autoStartLoad\n this._capLevelToStage = (options.capLevelToStage === undefined) ? false : options.capLevelToStage\n this._maxLevelCappingMode = (options.maxLevelCappingMode === undefined) ? 'downscale' : options.maxLevelCappingMode\n this._minBufferLength = (options.minBufferLength === undefined) ? -1 : options.minBufferLength\n this._minBufferLengthCapping = (options.minBufferLengthCapping === undefined) ? -1 : options.minBufferLengthCapping\n this._maxBufferLength = (options.maxBufferLength === undefined) ? 120 : options.maxBufferLength\n this._maxBackBufferLength = (options.maxBackBufferLength === undefined) ? 30 : options.maxBackBufferLength\n this._lowBufferLength = (options.lowBufferLength === undefined) ? 3 : options.lowBufferLength\n this._mediaTimePeriod = (options.mediaTimePeriod === undefined) ? 100 : options.mediaTimePeriod\n this._fpsDroppedMonitoringPeriod = (options.fpsDroppedMonitoringPeriod === undefined) ? 5000 : options.fpsDroppedMonitoringPeriod\n this._fpsDroppedMonitoringThreshold = (options.fpsDroppedMonitoringThreshold === undefined) ? 0.2 : options.fpsDroppedMonitoringThreshold\n this._capLevelonFPSDrop = (options.capLevelonFPSDrop === undefined) ? false : options.capLevelonFPSDrop\n this._smoothAutoSwitchonFPSDrop = (options.smoothAutoSwitchonFPSDrop === undefined) ? this.capLevelonFPSDrop : options.smoothAutoSwitchonFPSDrop\n this._switchDownOnLevelError = (options.switchDownOnLevelError === undefined) ? true : options.switchDownOnLevelError\n this._seekMode = (options.seekMode === undefined) ? 'ACCURATE' : options.seekMode\n this._keyLoadMaxRetry = (options.keyLoadMaxRetry === undefined) ? 3 : options.keyLoadMaxRetry\n this._keyLoadMaxRetryTimeout = (options.keyLoadMaxRetryTimeout === undefined) ? 64000 : options.keyLoadMaxRetryTimeout\n this._fragmentLoadMaxRetry = (options.fragmentLoadMaxRetry === undefined) ? 3 : options.fragmentLoadMaxRetry\n this._fragmentLoadMaxRetryTimeout = (options.fragmentLoadMaxRetryTimeout === undefined) ? 4000 : options.fragmentLoadMaxRetryTimeout\n this._fragmentLoadSkipAfterMaxRetry = (options.fragmentLoadSkipAfterMaxRetry === undefined) ? true : options.fragmentLoadSkipAfterMaxRetry\n this._maxSkippedFragments = (options.maxSkippedFragments === undefined) ? 5 : options.maxSkippedFragments\n this._flushLiveURLCache = (options.flushLiveURLCache === undefined) ? false : options.flushLiveURLCache\n this._initialLiveManifestSize = (options.initialLiveManifestSize === undefined) ? 1 : options.initialLiveManifestSize\n this._manifestLoadMaxRetry = (options.manifestLoadMaxRetry === undefined) ? 3 : options.manifestLoadMaxRetry\n this._manifestLoadMaxRetryTimeout = (options.manifestLoadMaxRetryTimeout === undefined) ? 64000 : options.manifestLoadMaxRetryTimeout\n this._manifestRedundantLoadmaxRetry = (options.manifestRedundantLoadmaxRetry === undefined) ? 3 : options.manifestRedundantLoadmaxRetry\n this._startFromBitrate = (options.startFromBitrate === undefined) ? -1 : options.startFromBitrate\n this._startFromLevel = (options.startFromLevel === undefined) ? -1 : options.startFromLevel\n this._autoStartMaxDuration = (options.autoStartMaxDuration === undefined) ? -1 : options.autoStartMaxDuration\n this._seekFromLevel = (options.seekFromLevel === undefined) ? -1 : options.seekFromLevel\n this._useHardwareVideoDecoder = (options.useHardwareVideoDecoder === undefined) ? false : options.useHardwareVideoDecoder\n this._hlsLogEnabled = (options.hlsLogEnabled === undefined) ? true : options.hlsLogEnabled\n this._logDebug = (options.logDebug === undefined) ? false : options.logDebug\n this._logDebug2 = (options.logDebug2 === undefined) ? false : options.logDebug2\n this._logWarn = (options.logWarn === undefined) ? true : options.logWarn\n this._logError = (options.logError === undefined) ? true : options.logError\n this._hlsMinimumDvrSize = (options.hlsMinimumDvrSize === undefined) ? 60 : options.hlsMinimumDvrSize\n }\n\n _addListeners() {\n Mediator.on(this.cid + ':flashready', () => this._bootstrap())\n Mediator.on(this.cid + ':timeupdate', (timeMetrics) => this._updateTime(timeMetrics))\n Mediator.on(this.cid + ':playbackstate', (state) => this._setPlaybackState(state))\n Mediator.on(this.cid + ':levelchanged', (level) => this._levelChanged(level))\n Mediator.on(this.cid + ':error', (code, url, message) => this._flashPlaybackError(code, url, message))\n Mediator.on(this.cid + ':fragmentloaded',(loadmetrics) => this._onFragmentLoaded(loadmetrics))\n Mediator.on(this.cid + ':levelendlist', (level) => this._onLevelEndlist(level))\n }\n\n stopListening() {\n super.stopListening()\n Mediator.off(this.cid + ':flashready')\n Mediator.off(this.cid + ':timeupdate')\n Mediator.off(this.cid + ':playbackstate')\n Mediator.off(this.cid + ':levelchanged')\n Mediator.off(this.cid + ':playbackerror')\n Mediator.off(this.cid + ':fragmentloaded')\n Mediator.off(this.cid + ':manifestloaded')\n Mediator.off(this.cid + ':levelendlist')\n }\n\n _bootstrap() {\n if (this.el.playerLoad) {\n this.el.width = '100%'\n this.el.height = '100%'\n this._isReadyState = true\n this._srcLoaded = false\n this._currentState = 'IDLE'\n this._setFlashSettings()\n this._updatePlaybackType()\n if (this._autoPlay || this._shouldPlayOnManifestLoaded) {\n this.play()\n }\n this.trigger(Events.PLAYBACK_READY, this.name)\n } else {\n this._bootstrapAttempts = this._bootstrapAttempts || 0\n if (++this._bootstrapAttempts <= MAX_ATTEMPTS) {\n setTimeout(() => this._bootstrap(), 50)\n } else {\n this.trigger(Events.PLAYBACK_ERROR, {message: 'Max number of attempts reached'}, this.name)\n }\n }\n }\n\n _setFlashSettings() {\n this.el.playerSetAutoStartLoad(this._autoStartLoad)\n this.el.playerSetCapLevelToStage(this._capLevelToStage)\n this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)\n this.el.playerSetMinBufferLength(this._minBufferLength)\n this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)\n this.el.playerSetMaxBufferLength(this._maxBufferLength)\n this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)\n this.el.playerSetLowBufferLength(this._lowBufferLength)\n this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)\n this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)\n this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)\n this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)\n this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)\n this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)\n this.el.playerSetSeekMode(this._seekMode)\n this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)\n this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)\n this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)\n this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)\n this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)\n this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)\n this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)\n this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)\n this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)\n this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)\n this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)\n this.el.playerSetStartFromBitrate(this._startFromBitrate)\n this.el.playerSetStartFromLevel(this._startFromLevel)\n this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)\n this.el.playerSetSeekFromLevel(this._seekFromLevel)\n this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)\n this.el.playerSetLogInfo(this._hlsLogEnabled)\n this.el.playerSetLogDebug(this._logDebug)\n this.el.playerSetLogDebug2(this._logDebug2)\n this.el.playerSetLogWarn(this._logWarn)\n this.el.playerSetLogError(this._logError)\n }\n\n setAutoStartLoad(autoStartLoad) {\n this._autoStartLoad = autoStartLoad\n this.el.playerSetAutoStartLoad(this._autoStartLoad)\n }\n\n setCapLevelToStage(capLevelToStage) {\n this._capLevelToStage = capLevelToStage\n this.el.playerSetCapLevelToStage(this._capLevelToStage)\n }\n\n setMaxLevelCappingMode(maxLevelCappingMode) {\n this._maxLevelCappingMode = maxLevelCappingMode\n this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)\n }\n\n setSetMinBufferLength(minBufferLength) {\n this._minBufferLength = minBufferLength\n this.el.playerSetMinBufferLength(this._minBufferLength)\n }\n\n setMinBufferLengthCapping(minBufferLengthCapping) {\n this._minBufferLengthCapping = minBufferLengthCapping\n this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)\n }\n\n setMaxBufferLength(maxBufferLength) {\n this._maxBufferLength = maxBufferLength\n this.el.playerSetMaxBufferLength(this._maxBufferLength)\n }\n\n setMaxBackBufferLength(maxBackBufferLength) {\n this._maxBackBufferLength = maxBackBufferLength\n this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)\n }\n\n setLowBufferLength(lowBufferLength) {\n this._lowBufferLength = lowBufferLength\n this.el.playerSetLowBufferLength(this._lowBufferLength)\n }\n\n setMediaTimePeriod(mediaTimePeriod) {\n this._mediaTimePeriod = mediaTimePeriod\n this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)\n }\n\n setFpsDroppedMonitoringPeriod(fpsDroppedMonitoringPeriod) {\n this._fpsDroppedMonitoringPeriod = fpsDroppedMonitoringPeriod\n this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)\n }\n\n setFpsDroppedMonitoringThreshold(fpsDroppedMonitoringThreshold) {\n this._fpsDroppedMonitoringThreshold = fpsDroppedMonitoringThreshold\n this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)\n }\n\n setCapLevelonFPSDrop(capLevelonFPSDrop) {\n this._capLevelonFPSDrop = capLevelonFPSDrop\n this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)\n }\n\n setSmoothAutoSwitchonFPSDrop(smoothAutoSwitchonFPSDrop) {\n this._smoothAutoSwitchonFPSDrop = smoothAutoSwitchonFPSDrop\n this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)\n }\n\n setSwitchDownOnLevelError(switchDownOnLevelError) {\n this._switchDownOnLevelError = switchDownOnLevelError\n this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)\n }\n\n setSeekMode(seekMode) {\n this._seekMode = seekMode\n this.el.playerSetSeekMode(this._seekMode)\n }\n\n setKeyLoadMaxRetry(keyLoadMaxRetry) {\n this._keyLoadMaxRetry = keyLoadMaxRetry\n this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)\n }\n\n setKeyLoadMaxRetryTimeout(keyLoadMaxRetryTimeout) {\n this._keyLoadMaxRetryTimeout = keyLoadMaxRetryTimeout\n this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)\n }\n\n setFragmentLoadMaxRetry(fragmentLoadMaxRetry) {\n this._fragmentLoadMaxRetry = fragmentLoadMaxRetry\n this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)\n }\n\n setFragmentLoadMaxRetryTimeout(fragmentLoadMaxRetryTimeout) {\n this._fragmentLoadMaxRetryTimeout = fragmentLoadMaxRetryTimeout\n this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)\n }\n\n setFragmentLoadSkipAfterMaxRetry(fragmentLoadSkipAfterMaxRetry) {\n this._fragmentLoadSkipAfterMaxRetry = fragmentLoadSkipAfterMaxRetry\n this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)\n }\n\n setMaxSkippedFragments(maxSkippedFragments) {\n this._maxSkippedFragments = maxSkippedFragments\n this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)\n }\n\n setFlushLiveURLCache(flushLiveURLCache) {\n this._flushLiveURLCache = flushLiveURLCache\n this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)\n }\n\n setInitialLiveManifestSize(initialLiveManifestSize) {\n this._initialLiveManifestSize = initialLiveManifestSize\n this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)\n }\n\n setManifestLoadMaxRetry(manifestLoadMaxRetry) {\n this._manifestLoadMaxRetry = manifestLoadMaxRetry\n this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)\n }\n\n setManifestLoadMaxRetryTimeout(manifestLoadMaxRetryTimeout) {\n this._manifestLoadMaxRetryTimeout = manifestLoadMaxRetryTimeout\n this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)\n }\n\n setManifestRedundantLoadmaxRetry(manifestRedundantLoadmaxRetry) {\n this._manifestRedundantLoadmaxRetry = manifestRedundantLoadmaxRetry\n this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)\n }\n\n setStartFromBitrate(startFromBitrate) {\n this._startFromBitrate = startFromBitrate\n this.el.playerSetStartFromBitrate(this._startFromBitrate)\n }\n\n setStartFromLevel(startFromLevel) {\n this._startFromLevel = startFromLevel\n this.el.playerSetStartFromLevel(this._startFromLevel)\n }\n\n setAutoStartMaxDuration(autoStartMaxDuration) {\n this._autoStartMaxDuration = autoStartMaxDuration\n this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)\n }\n\n setSeekFromLevel(seekFromLevel) {\n this._seekFromLevel = seekFromLevel\n this.el.playerSetSeekFromLevel(this._seekFromLevel)\n }\n\n setUseHardwareVideoDecoder(useHardwareVideoDecoder) {\n this._useHardwareVideoDecoder = useHardwareVideoDecoder\n this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)\n }\n\n setSetLogInfo(hlsLogEnabled) {\n this._hlsLogEnabled = hlsLogEnabled\n this.el.playerSetLogInfo(this._hlsLogEnabled)\n }\n\n setLogDebug(logDebug) {\n this._logDebug = logDebug\n this.el.playerSetLogDebug(this._logDebug)\n }\n\n setLogDebug2(logDebug2) {\n this._logDebug2 = logDebug2\n this.el.playerSetLogDebug2(this._logDebug2)\n }\n\n setLogWarn(logWarn) {\n this._logWarn = logWarn\n this.el.playerSetLogWarn(this._logWarn)\n }\n\n setLogError(logError) {\n this._logError = logError\n this.el.playerSetLogError(this._logError)\n }\n\n _levelChanged(level) {\n const currentLevel = this.el.getLevels()[level]\n if (currentLevel) {\n this.highDefinition = (currentLevel.height >= 720 || (currentLevel.bitrate / 1000) >= 2000)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n\n if (!this._levels || this._levels.length === 0) this._fillLevels()\n\n this.trigger(Events.PLAYBACK_BITRATE, {\n height: currentLevel.height,\n width: currentLevel.width,\n bandwidth: currentLevel.bitrate,\n bitrate: currentLevel.bitrate,\n level: level\n })\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n _updateTime(timeMetrics) {\n if (this._currentState === 'IDLE') {\n return\n }\n\n const duration = this._normalizeDuration(timeMetrics.duration)\n let position = Math.min(Math.max(timeMetrics.position, 0), duration)\n const previousDVRStatus = this._dvrEnabled\n const livePlayback = (this._playbackType === Playback.LIVE)\n this._dvrEnabled = (livePlayback && duration > this._hlsMinimumDvrSize)\n\n if (duration === 100 || livePlayback === undefined) {\n return\n }\n\n if (this._dvrEnabled !== previousDVRStatus) {\n this._updateSettings()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE, this.name)\n }\n\n if (livePlayback && (!this._dvrEnabled || !this._dvrInUse)) {\n position = duration\n }\n\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: position, total: duration}, this.name)\n }\n\n play() {\n this.trigger(Events.PLAYBACK_PLAY_INTENT)\n if(this._currentState === 'PAUSED') {\n this.el.playerResume()\n } else if (!this._srcLoaded && this._currentState !== 'PLAYING') {\n this._firstPlay()\n } else {\n this.el.playerPlay()\n }\n }\n\n getPlaybackType() {\n return this._playbackType? this._playbackType: null\n }\n\n getCurrentLevelIndex() {\n return this._currentLevel\n }\n\n getCurrentLevel() {\n return this.levels[this.currentLevel]\n }\n\n getCurrentBitrate() {\n return this.levels[this.currentLevel].bitrate\n }\n\n setCurrentLevel(level) {\n this.currentLevel = level\n }\n\n isHighDefinitionInUse() {\n return this.highDefinition\n }\n\n getLevels() {\n return this.levels\n }\n\n _setPlaybackState(state) {\n if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING'].indexOf(state) >= 0) {\n this._bufferingState = true\n this.trigger(Events.PLAYBACK_BUFFERING, this.name)\n this._updateCurrentState(state)\n } else if (['PLAYING', 'PAUSED'].indexOf(state) >= 0) {\n if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING', 'IDLE'].indexOf(this._currentState) >= 0) {\n this._bufferingState = false\n this.trigger(Events.PLAYBACK_BUFFERFULL, this.name)\n }\n this._updateCurrentState(state)\n } else if (state === 'IDLE') {\n this._srcLoaded = false\n if (this._loop && ['PLAYING_BUFFERING', 'PLAYING'].indexOf(this._currentState) >= 0) {\n this.play()\n this.seek(0)\n } else {\n this._updateCurrentState(state)\n this._hasEnded = true\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: 0, total: this.getDuration()}, this.name)\n this.trigger(Events.PLAYBACK_ENDED, this.name)\n }\n }\n }\n\n _updateCurrentState(state) {\n this._currentState = state\n if (state !== 'IDLE') {\n this._hasEnded = false\n }\n this._updatePlaybackType()\n if (state === 'PLAYING') {\n this.trigger(Events.PLAYBACK_PLAY, this.name)\n } else if (state === 'PAUSED') {\n this.trigger(Events.PLAYBACK_PAUSE, this.name)\n }\n }\n\n _updatePlaybackType() {\n this._playbackType = this.el.getType()\n if (this._playbackType) {\n this._playbackType = this._playbackType.toLowerCase()\n if (this._playbackType === Playback.VOD) {\n this._startReportingProgress()\n } else {\n this._stopReportingProgress()\n }\n }\n this.trigger(Events.PLAYBACK_PLAYBACKSTATE, {type: this._playbackType})\n }\n\n _startReportingProgress() {\n if (!this._reportingProgress) {\n this._reportingProgress = true\n }\n }\n\n _stopReportingProgress() {\n this._reportingProgress = false\n }\n\n _onFragmentLoaded(loadmetrics) {\n this.trigger(Events.PLAYBACK_FRAGMENT_LOADED, loadmetrics)\n if (this._reportingProgress && this.el.getPosition) {\n const buffered = this.el.getPosition() + this.el.getbufferLength()\n this.trigger(Events.PLAYBACK_PROGRESS, {\n start: this.el.getPosition(),\n current: buffered,\n total: this.el.getDuration()\n })\n }\n }\n\n _onLevelEndlist() {\n this._updatePlaybackType()\n }\n\n _firstPlay() {\n this._shouldPlayOnManifestLoaded = true\n if (this.el.playerLoad) {\n Mediator.once(this.cid + ':manifestloaded', (duration, loadmetrics) => this._manifestLoaded(duration, loadmetrics))\n this._setFlashSettings() //ensure flushLiveURLCache will work (#327)\n this.el.playerLoad(this._src)\n this._srcLoaded = true\n }\n }\n\n volume(value) {\n if (this.isReady) {\n this.el.playerVolume(value)\n } else {\n this.listenToOnce(this, Events.PLAYBACK_BUFFERFULL, () => this.volume(value))\n }\n }\n\n pause() {\n if (this._playbackType !== Playback.LIVE || this._dvrEnabled) {\n this.el.playerPause()\n if (this._playbackType === Playback.LIVE && this._dvrEnabled) {\n this._updateDvr(true)\n }\n }\n }\n\n stop() {\n this._srcLoaded = false\n this.el.playerStop()\n this.trigger(Events.PLAYBACK_STOP)\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: 0, total: 0}, this.name)\n }\n\n isPlaying() {\n if (this._currentState) {\n return !!(this._currentState.match(/playing/i))\n }\n return false\n }\n\n get isReady() {\n return this._isReadyState\n }\n\n getDuration() {\n return this._normalizeDuration(this.el.getDuration())\n }\n\n _normalizeDuration(duration) {\n if (this._playbackType === Playback.LIVE) {\n // estimate 10 seconds of buffer time for live streams for seek positions\n duration = Math.max(0, duration - 10)\n }\n return duration\n }\n\n seekPercentage(percentage) {\n const duration = this.el.getDuration()\n let time = 0\n if (percentage > 0) {\n time = duration * percentage / 100\n }\n this.seek(time)\n }\n\n seek(time) {\n const duration = this.getDuration()\n if (this._playbackType === Playback.LIVE) {\n // seek operations to a time within 3 seconds from live stream will position playhead back to live\n const dvrInUse = duration - time > 3\n this._updateDvr(dvrInUse)\n }\n this.el.playerSeek(time)\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: time, total: duration}, this.name)\n }\n\n _updateDvr(dvrInUse) {\n const previousDvrInUse = !!this._dvrInUse\n this._dvrInUse = dvrInUse\n if (this._dvrInUse !== previousDvrInUse) {\n this._updateSettings()\n this.trigger(Events.PLAYBACK_DVR, this._dvrInUse)\n this.trigger(Events.PLAYBACK_STATS_ADD, {'dvr': this._dvrInUse})\n }\n }\n\n _flashPlaybackError(code, url, message) {\n this.trigger(Events.PLAYBACK_ERROR, {code: code, url: url, message: message})\n this.trigger(Events.PLAYBACK_STOP)\n }\n\n _manifestLoaded(duration, loadmetrics) {\n if (this._shouldPlayOnManifestLoaded) {\n this._shouldPlayOnManifestLoaded = false\n // this method initialises the player (and starts playback)\n // this needs to happen before PLAYBACK_LOADEDMETADATA is fired\n // as the user may call seek() in a LOADEDMETADATA listener.\n /// when playerPlay() is called the player seeks to 0\n this.el.playerPlay()\n }\n\n this._fillLevels()\n this.trigger(Events.PLAYBACK_LOADEDMETADATA, {duration: duration, data: loadmetrics})\n }\n\n _fillLevels() {\n const levels = this.el.getLevels()\n const levelsLength = levels.length\n this._levels = []\n\n for (let index = 0 ; index < levelsLength ; index++) {\n this._levels.push({id: index, label: `${levels[index].height}p`, level: levels[index]})\n }\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this._levels)\n }\n\n destroy() {\n this.stopListening()\n this.$el.remove()\n }\n\n _updateSettings() {\n this.settings = $.extend({}, this._defaultSettings)\n if (this._playbackType === Playback.VOD || this._dvrInUse) {\n this.settings.left = ['playpause', 'position', 'duration']\n this.settings.seekEnabled = true\n } else if (this._dvrEnabled) {\n this.settings.left = ['playpause']\n this.settings.seekEnabled = true\n } else {\n this.settings.seekEnabled = false\n }\n }\n\n get dvrEnabled() {\n return !!this._dvrEnabled\n }\n\n _createCallbacks() {\n if (!window.Clappr) {\n window.Clappr = {}\n }\n if (!window.Clappr.flashlsCallbacks) {\n window.Clappr.flashlsCallbacks = {}\n }\n this.flashlsEvents = new HLSEvents(this.cid)\n window.Clappr.flashlsCallbacks[this.cid] = (eventName, args) => {\n this.flashlsEvents[eventName].apply(this.flashlsEvents, args)\n }\n }\n\n render() {\n super.render()\n this._createCallbacks()\n return this\n }\n}\n\nFlasHLS.canPlay = function(resource, mimeType) {\n const resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return Browser.hasFlash &&\n ((resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8') ||\n mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl')\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/flashls/flashls.js","import Mediator from '../../components/mediator'\n\nexport default class HLSEvents {\n constructor(instanceId) {\n this.instanceId = instanceId\n }\n ready() {\n Mediator.trigger(`${this.instanceId}:flashready`)\n }\n videoSize(width, height) {\n Mediator.trigger(`${this.instanceId}:videosizechanged`, width, height)\n }\n complete() {\n Mediator.trigger(`${this.instanceId}:complete`)\n }\n error(code, url, message) {\n Mediator.trigger(`${this.instanceId}:error`, code, url, message)\n }\n manifest(duration, loadmetrics) {\n Mediator.trigger(`${this.instanceId}:manifestloaded`, duration, loadmetrics)\n }\n audioLevelLoaded(loadmetrics) {\n Mediator.trigger(`${this.instanceId}:audiolevelloaded`, loadmetrics)\n }\n levelLoaded(loadmetrics) {\n Mediator.trigger(`${this.instanceId}:levelloaded`, loadmetrics)\n }\n levelEndlist(level) {\n Mediator.trigger(`${this.instanceId}:levelendlist`, level)\n }\n fragmentLoaded(loadmetrics) {\n Mediator.trigger(`${this.instanceId}:fragmentloaded`, loadmetrics)\n }\n fragmentPlaying(playmetrics) {\n Mediator.trigger(`${this.instanceId}:fragmentplaying`, playmetrics)\n }\n position(timemetrics) {\n Mediator.trigger(`${this.instanceId}:timeupdate`, timemetrics)\n }\n state(newState) {\n Mediator.trigger(`${this.instanceId}:playbackstate`, newState)\n }\n seekState(newState) {\n Mediator.trigger(`${this.instanceId}:seekstate`, newState)\n }\n switch(newLevel) {\n Mediator.trigger(`${this.instanceId}:levelchanged`, newLevel)\n }\n audioTracksListChange(trackList) {\n Mediator.trigger(`${this.instanceId}:audiotracklistchanged`, trackList)\n }\n audioTrackChange(trackId) {\n Mediator.trigger(`${this.instanceId}:audiotrackchanged`, trackId)\n }\n}\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/flashls/flashls_events.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport HTML5VideoPlayback from 'playbacks/html5_video'\nimport HLSJS from 'hls.js'\nimport isEqual from 'lodash.isequal'\nimport Events from 'base/events'\nimport Playback from 'base/playback'\nimport Browser from 'components/browser'\nimport {now} from 'base/utils'\nimport Log from 'plugins/log'\n\nconst AUTO = -1\n\nexport default class HLS extends HTML5VideoPlayback {\n get name() { return 'hls' }\n\n get levels() { return this._levels || [] }\n get currentLevel() {\n if (this._currentLevel === null || this._currentLevel === undefined) {\n return AUTO\n } else {\n return this._currentLevel //0 is a valid level ID\n }\n }\n set currentLevel(id) {\n this._currentLevel = id\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n this._hls.currentLevel = this._currentLevel\n }\n\n get _startTime() {\n if (this._playbackType === Playback.LIVE && this._playlistType !== 'EVENT') {\n return this._extrapolatedStartTime\n }\n return this._playableRegionStartTime\n }\n\n get _now() {\n return now()\n }\n\n // the time in the video element which should represent the start of the sliding window\n // extrapolated to increase in real time (instead of jumping as the early segments are removed)\n get _extrapolatedStartTime() {\n if (!this._localStartTimeCorrelation) {\n return this._playableRegionStartTime\n }\n let corr = this._localStartTimeCorrelation\n let timePassed = this._now - corr.local\n let extrapolatedWindowStartTime = (corr.remote + timePassed) / 1000\n // cap at the end of the extrapolated window duration\n return Math.min(extrapolatedWindowStartTime, this._playableRegionStartTime + this._extrapolatedWindowDuration)\n }\n\n // the time in the video element which should represent the end of the content\n // extrapolated to increase in real time (instead of jumping as segments are added)\n get _extrapolatedEndTime() {\n let actualEndTime = this._playableRegionStartTime + this._playableRegionDuration\n if (!this._localEndTimeCorrelation) {\n return actualEndTime\n }\n let corr = this._localEndTimeCorrelation\n let timePassed = this._now - corr.local\n let extrapolatedEndTime = (corr.remote + timePassed) / 1000\n return Math.max(actualEndTime - this._extrapolatedWindowDuration, Math.min(extrapolatedEndTime, actualEndTime))\n }\n\n get _duration() {\n return this._extrapolatedEndTime - this._startTime\n }\n\n // Returns the duration (seconds) of the window that the extrapolated start time is allowed\n // to move in before being capped.\n // The extrapolated start time should never reach the cap at the end of the window as the\n // window should slide as chunks are removed from the start.\n // This also applies to the extrapolated end time in the same way.\n //\n // If chunks aren't being removed for some reason that the start time will reach and remain fixed at\n // playableRegionStartTime + extrapolatedWindowDuration\n //\n // <-- window duration -->\n // I.e playableRegionStartTime |-----------------------|\n // | --> . . .\n // . --> | --> . .\n // . . --> | --> .\n // . . . --> |\n // . . . .\n // extrapolatedStartTime\n get _extrapolatedWindowDuration() {\n if (this._segmentTargetDuration === null) {\n return 0\n }\n return this._extrapolatedWindowNumSegments * this._segmentTargetDuration\n }\n\n constructor(...args) {\n super(...args)\n // backwards compatibility (TODO: remove on 0.3.0)\n this.options.playback || (this.options.playback = this.options)\n this._minDvrSize = typeof(this.options.hlsMinimumDvrSize) === 'undefined' ? 60 : this.options.hlsMinimumDvrSize\n // The size of the start time extrapolation window measured as a multiple of segments.\n // Should be 2 or higher, or 0 to disable. Should only need to be increased above 2 if more than one segment is\n // removed from the start of the playlist at a time. E.g if the playlist is cached for 10 seconds and new chunks are\n // added/removed every 5.\n this._extrapolatedWindowNumSegments = !this.options.playback || typeof(this.options.playback.extrapolatedWindowNumSegments) === 'undefined' ? 2 : this.options.playback.extrapolatedWindowNumSegments\n\n this._playbackType = Playback.VOD\n this._lastTimeUpdate = null\n this._lastDuration = null\n // for hls streams which have dvr with a sliding window,\n // the content at the start of the playlist is removed as new\n // content is appended at the end.\n // this means the actual playable start time will increase as the\n // start content is deleted\n // For streams with dvr where the entire recording is kept from the\n // beginning this should stay as 0\n this._playableRegionStartTime = 0\n // {local, remote} remote is the time in the video element that should represent 0\n // local is the system time when the 'remote' measurment took place\n this._localStartTimeCorrelation = null\n // {local, remote} remote is the time in the video element that should represents the end\n // local is the system time when the 'remote' measurment took place\n this._localEndTimeCorrelation = null\n // if content is removed from the beginning then this empty area should\n // be ignored. \"playableRegionDuration\" excludes the empty area\n this._playableRegionDuration = 0\n // true when the actual duration is longer than hlsjs's live sync point\n // when this is false playableRegionDuration will be the actual duration\n // when this is true playableRegionDuration will exclude the time after the sync point\n this._durationExcludesAfterLiveSyncPoint = false\n // #EXT-X-TARGETDURATION\n this._segmentTargetDuration = null\n // #EXT-X-PLAYLIST-TYPE\n this._playlistType = null\n this._recoverAttemptsRemaining = this.options.hlsRecoverAttempts || 16\n this._startTimeUpdateTimer()\n }\n\n _setupHls() {\n this._hls = new HLSJS(this.options.playback.hlsjsConfig || {})\n this._hls.on(HLSJS.Events.MEDIA_ATTACHED, () => this._hls.loadSource(this.options.src))\n this._hls.on(HLSJS.Events.LEVEL_LOADED, (evt, data) => this._updatePlaybackType(evt, data))\n this._hls.on(HLSJS.Events.LEVEL_UPDATED, (evt, data) => this._onLevelUpdated(evt, data))\n this._hls.on(HLSJS.Events.LEVEL_SWITCH, (evt,data) => this._onLevelSwitch(evt, data))\n this._hls.on(HLSJS.Events.FRAG_LOADED, (evt, data) => this._onFragmentLoaded(evt, data))\n this._hls.on(HLSJS.Events.ERROR, (evt, data) => this._onHLSJSError(evt, data))\n this._hls.attachMedia(this.el)\n }\n\n _recover(evt, data) {\n if (!this._recoveredDecodingError) {\n this._recoveredDecodingError = true\n this._hls.recoverMediaError()\n } else if (!this._recoveredAudioCodecError) {\n this._recoveredAudioCodecError = true\n this._hls.swapAudioCodec()\n this._hls.recoverMediaError()\n } else {\n Log.error('hlsjs: failed to recover')\n this.trigger(Events.PLAYBACK_ERROR, `hlsjs: could not recover from error, evt ${evt}, data ${data} `, this.name)\n }\n }\n\n // override\n _setupSrc(srcUrl) { // eslint-disable-line no-unused-vars\n // this playback manages the src on the video element itself\n }\n\n _startTimeUpdateTimer() {\n this._timeUpdateTimer = setInterval(() => {\n this._onDurationChange()\n this._onTimeUpdate()\n }, 100)\n }\n\n _stopTimeUpdateTimer() {\n clearInterval(this._timeUpdateTimer)\n }\n\n // the duration on the video element itself should not be used\n // as this does not necesarily represent the duration of the stream\n // https://github.com/clappr/clappr/issues/668#issuecomment-157036678\n getDuration() {\n return this._duration\n }\n\n getCurrentTime() {\n // e.g. can be < 0 if user pauses near the start\n // eventually they will then be kicked to the end by hlsjs if they run out of buffer\n // before the official start time\n return Math.max(0, this.el.currentTime - this._startTime)\n }\n\n // the time that \"0\" now represents relative to when playback started\n // for a stream with a sliding window this will increase as content is\n // removed from the beginning\n getStartTimeOffset() {\n return this._startTime\n }\n\n seekPercentage(percentage) {\n let seekTo = this._duration\n if (percentage > 0) {\n seekTo = this._duration * (percentage / 100)\n }\n this.seek(seekTo)\n }\n\n seek(time) {\n if (time < 0) {\n Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.')\n time = this.getDuration()\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this.getDuration()-3)\n time += this._startTime\n super.seek(time)\n }\n\n seekToLivePoint() {\n this.seek(this.getDuration())\n }\n\n _updateDvr(status) {\n this.trigger(Events.PLAYBACK_DVR, status)\n this.trigger(Events.PLAYBACK_STATS_ADD, {'dvr': status})\n }\n\n _updateSettings() {\n if (this._playbackType === Playback.VOD) {\n this.settings.left = ['playpause', 'position', 'duration']\n } else if (this.dvrEnabled) {\n this.settings.left = ['playpause']\n } else {\n this.settings.left = ['playstop']\n }\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n _onHLSJSError(evt, data) {\n // only report/handle errors if they are fatal\n // hlsjs should automatically handle non fatal errors\n if (data.fatal) {\n if (this._recoverAttemptsRemaining > 0) {\n this._recoverAttemptsRemaining -= 1\n switch (data.type) {\n case HLSJS.ErrorTypes.NETWORK_ERROR:\n Log.warn(`hlsjs: trying to recover from network error, evt ${evt}, data ${data} `)\n this._hls.startLoad()\n break\n case HLSJS.ErrorTypes.MEDIA_ERROR:\n Log.warn(`hlsjs: trying to recover from media error, evt ${evt}, data ${data} `)\n this._recover(evt, data)\n break\n default:\n Log.error(`hlsjs: trying to recover from error, evt ${evt}, data ${data} `)\n this.trigger(Events.PLAYBACK_ERROR, `hlsjs: could not recover from error, evt ${evt}, data ${data} `, this.name)\n break\n }\n } else {\n Log.error(`hlsjs: could not recover from error after maximum number of attempts, evt ${evt}, data ${data} `)\n this.trigger(Events.PLAYBACK_ERROR, {evt, data}, this.name)\n }\n }\n else {\n Log.warn(`hlsjs: non-fatal error occurred, evt ${evt}, data ${data} `)\n }\n }\n\n _onTimeUpdate() {\n let update = {current: this.getCurrentTime(), total: this.getDuration()}\n if (isEqual(update, this._lastTimeUpdate)) {\n return\n }\n this._lastTimeUpdate = update\n this.trigger(Events.PLAYBACK_TIMEUPDATE, update, this.name)\n }\n\n _onDurationChange() {\n let duration = this.getDuration()\n if (this._lastDuration === duration) {\n return\n }\n this._lastDuration = duration\n super._onDurationChange()\n }\n\n _onProgress() {\n if (!this.el.buffered.length) {\n return\n }\n let buffered = []\n let bufferedPos = 0\n for (let i = 0; i < this.el.buffered.length; i++) {\n buffered = [...buffered, {\n // for a stream with sliding window dvr something that is buffered my slide off the start of the timeline\n start: Math.max(0, this.el.buffered.start(i) - this._playableRegionStartTime),\n end: Math.max(0, this.el.buffered.end(i) - this._playableRegionStartTime)\n }]\n if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {\n bufferedPos = i\n }\n }\n const progress = {\n start: buffered[bufferedPos].start,\n current: buffered[bufferedPos].end,\n total: this.getDuration()\n }\n this.trigger(Events.PLAYBACK_PROGRESS, progress, buffered)\n }\n\n play() {\n if (!this._hls) {\n this._setupHls()\n }\n super.play()\n }\n\n pause() {\n if (!this._hls) {\n return\n }\n super.pause()\n if (this.dvrEnabled) {\n this._updateDvr(true)\n }\n }\n\n stop() {\n if (this._hls) {\n super.stop()\n this._hls.destroy()\n delete this._hls\n }\n }\n\n destroy() {\n this._stopTimeUpdateTimer()\n if (this._hls) {\n this._hls.destroy()\n delete this._hls\n }\n super.destroy()\n }\n\n _updatePlaybackType(evt, data) {\n this._playbackType = data.details.live ? Playback.LIVE : Playback.VOD\n this._fillLevels()\n this._onLevelUpdated(evt, data)\n }\n\n _fillLevels() {\n this._levels = this._hls.levels.map((level, index) => {\n return {id: index, level: level, label: `${level.bitrate/1000}Kbps`}\n })\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this._levels)\n }\n\n _onLevelUpdated(evt, data) {\n this._segmentTargetDuration = data.details.targetduration\n this._playlistType = data.details.type || null\n\n let startTimeChanged = false\n let durationChanged = false\n let fragments = data.details.fragments\n let previousPlayableRegionStartTime = this._playableRegionStartTime\n let previousPlayableRegionDuration = this._playableRegionDuration\n\n if (fragments.length === 0) {\n return\n }\n\n if (this._playableRegionStartTime !== fragments[0].start) {\n startTimeChanged = true\n this._playableRegionStartTime = fragments[0].start\n }\n\n if (startTimeChanged) {\n if (!this._localStartTimeCorrelation) {\n // set the correlation to map to middle of the extrapolation window\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: (fragments[0].start + (this._extrapolatedWindowDuration/2)) * 1000\n }\n }\n else {\n // check if the correlation still works\n let corr = this._localStartTimeCorrelation\n let timePassed = this._now - corr.local\n // this should point to a time within the extrapolation window\n let startTime = (corr.remote + timePassed) / 1000\n if (startTime < fragments[0].start) {\n // our start time is now earlier than the first chunk\n // (maybe the chunk was removed early)\n // reset correlation so that it sits at the beginning of the first available chunk\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: fragments[0].start * 1000\n }\n }\n else if (startTime > previousPlayableRegionStartTime + this._extrapolatedWindowDuration) {\n // start time was past the end of the old extrapolation window (so would have been capped)\n // see if now that time would be inside the window, and if it would be set the correlation\n // so that it resumes from the time it was at at the end of the old window\n // update the correlation so that the time starts counting again from the value it's on now\n this._localStartTimeCorrelation = {\n local: this._now,\n remote: Math.max(fragments[0].start, previousPlayableRegionStartTime + this._extrapolatedWindowDuration) * 1000\n }\n }\n }\n }\n\n let newDuration = data.details.totalduration\n // if it's a live stream then shorten the duration to remove access\n // to the area after hlsjs's live sync point\n // seeks to areas after this point sometimes have issues\n if (this._playbackType === Playback.LIVE) {\n let fragmentTargetDuration = data.details.targetduration\n let hlsjsConfig = this.options.playback || {}\n let liveSyncDurationCount = hlsjsConfig.liveSyncDurationCount || HLSJS.DefaultConfig.liveSyncDurationCount\n let hiddenAreaDuration = fragmentTargetDuration * liveSyncDurationCount\n if (hiddenAreaDuration <= newDuration) {\n newDuration -= hiddenAreaDuration\n this._durationExcludesAfterLiveSyncPoint = true\n }\n else {\n this._durationExcludesAfterLiveSyncPoint = false\n }\n }\n\n if (newDuration !== this._playableRegionDuration) {\n durationChanged = true\n this._playableRegionDuration = newDuration\n }\n\n // Note the end time is not the playableRegionDuration\n // The end time will always increase even if content is removed from the beginning\n let endTime = fragments[0].start + newDuration\n let previousEndTime = previousPlayableRegionStartTime + previousPlayableRegionDuration\n let endTimeChanged = endTime !== previousEndTime\n if (endTimeChanged) {\n if (!this._localEndTimeCorrelation) {\n // set the correlation to map to the end\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: endTime * 1000\n }\n }\n else {\n // check if the correlation still works\n let corr = this._localEndTimeCorrelation\n let timePassed = this._now - corr.local\n // this should point to a time within the extrapolation window from the end\n let extrapolatedEndTime = (corr.remote + timePassed) / 1000\n if (extrapolatedEndTime > endTime) {\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: endTime * 1000\n }\n }\n else if (extrapolatedEndTime < endTime - this._extrapolatedWindowDuration) {\n // our extrapolated end time is now earlier than the extrapolation window from the actual end time\n // (maybe a chunk became available early)\n // reset correlation so that it sits at the beginning of the extrapolation window from the end time\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: (endTime - this._extrapolatedWindowDuration) * 1000\n }\n }\n else if (extrapolatedEndTime > previousEndTime) {\n // end time was past the old end time (so would have been capped)\n // set the correlation so that it resumes from the time it was at at the end of the old window\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: previousEndTime * 1000\n }\n }\n }\n }\n\n // now that the values have been updated call any methods that use on them so they get the updated values\n // immediately\n durationChanged && this._onDurationChange()\n startTimeChanged && this._onProgress()\n }\n\n _onFragmentLoaded(evt, data) {\n this.trigger(Events.PLAYBACK_FRAGMENT_LOADED, data)\n }\n\n _onLevelSwitch(evt, data) {\n if (!this.levels.length) {\n this._fillLevels()\n }\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH, data)\n let currentLevel = this._hls.levels[data.level]\n if (currentLevel) {\n // TODO should highDefinition be private and maybe have a read only accessor if it's used somewhere\n this.highDefinition = (currentLevel.height >= 720 || (currentLevel.bitrate / 1000) >= 2000)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n height: currentLevel.height,\n width: currentLevel.width,\n bandwidth: currentLevel.bitrate,\n bitrate: currentLevel.bitrate,\n level: data.level\n })\n }\n }\n\n get dvrEnabled() {\n // enabled when:\n // - the duration does not include content after hlsjs's live sync point\n // - the playable region duration is longer than the configured duration to enable dvr after\n // - the playback type is LIVE.\n return (this._durationExcludesAfterLiveSyncPoint && this._duration >= this._minDvrSize && this.getPlaybackType() === Playback.LIVE)\n }\n\n getPlaybackType() {\n return this._playbackType\n }\n\n isSeekEnabled() {\n return (this._playbackType === Playback.VOD || this.dvrEnabled)\n }\n}\n\nHLS.canPlay = function(resource, mimeType) {\n const resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n const isHls = ((resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8') ||\n mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl')\n\n return !!(HLSJS.isSupported() && isHls && !Browser.isSafari)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/hls/hls.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport Events from 'base/events'\nimport Playback from 'base/playback'\nimport HTML5Video from 'playbacks/html5_video'\n\n// TODO: remove this playback and change HTML5Video to HTML5Playback (breaking change, only after 0.3.0)\nexport default class HTML5Audio extends HTML5Video {\n get name() { return 'html5_audio' }\n get tagName() { return 'audio' }\n \n get isAudioOnly() {\n return true\n }\n\n updateSettings() {\n this.settings.left = ['playpause', 'position', 'duration']\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n getPlaybackType() {\n return Playback.AOD\n }\n}\n\nHTML5Audio.canPlay = function(resourceUrl, mimeType) {\n const mimetypes = {\n 'wav': ['audio/wav'],\n 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n 'oga': ['audio/ogg']\n }\n return HTML5Video._canPlay('audio', mimetypes, resourceUrl, mimeType)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html5_audio/html5_audio.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {seekStringToSeconds} from 'base/utils'\n\nimport Playback from 'base/playback'\nimport Styler from 'base/styler'\nimport Browser from 'components/browser'\nimport Events from 'base/events'\nimport tagStyle from './public/style.scss'\nimport $ from 'clappr-zepto'\n\nconst MIMETYPES = {\n 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(\n (codec) => { return 'video/mp4; codecs=\"' + codec + ', mp4a.40.2\"'}),\n 'ogg': ['video/ogg; codecs=\"theora, vorbis\"', 'video/ogg; codecs=\"dirac\"', 'video/ogg; codecs=\"theora, speex\"'],\n '3gpp': ['video/3gpp; codecs=\"mp4v.20.8, samr\"'],\n 'webm': ['video/webm; codecs=\"vp8, vorbis\"'],\n 'mkv': ['video/x-matroska; codecs=\"theora, vorbis\"'],\n 'm3u8': ['application/x-mpegurl']\n}\nMIMETYPES['ogv'] = MIMETYPES['ogg']\nMIMETYPES['3gp'] = MIMETYPES['3gpp']\n\nconst AUDIO_MIMETYPES = {\n 'wav': ['audio/wav'],\n 'mp3': ['audio/mp3', 'audio/mpeg;codecs=\"mp3\"'],\n 'aac': ['audio/mp4;codecs=\"mp4a.40.5\"'],\n 'oga': ['audio/ogg']\n}\n\nconst KNOWN_AUDIO_MIMETYPES = Object.keys(AUDIO_MIMETYPES).reduce((acc, k) => [...acc, ...AUDIO_MIMETYPES[k]], [])\n\n// TODO: rename this Playback to HTML5Playback (breaking change, only after 0.3.0)\nexport default class HTML5Video extends Playback {\n get name() { return 'html5_video' }\n get tagName() { return this.isAudioOnly ? 'audio' : 'video' }\n\n get isAudioOnly() {\n const resourceUrl = this.options.src\n let mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, AUDIO_MIMETYPES, this.options.mimeType)\n return this.options.playback && this.options.playback.audioOnly || this.options.audioOnly || KNOWN_AUDIO_MIMETYPES.indexOf(mimeTypes[0]) >= 0\n }\n\n get attributes() {\n return {\n 'data-html5-video': ''\n }\n }\n\n get events() {\n return {\n 'canplay': '_onCanPlay',\n 'canplaythrough': '_handleBufferingEvents',\n 'durationchange': '_onDurationChange',\n 'ended': '_onEnded',\n 'error': '_onError',\n 'loadeddata': '_onLoadedData',\n 'loadedmetadata': '_onLoadedMetadata',\n 'pause': '_onPause',\n 'playing': '_onPlaying',\n 'progress': '_onProgress',\n 'seeked': '_handleBufferingEvents',\n 'seeking': '_handleBufferingEvents',\n 'stalled': '_handleBufferingEvents',\n 'timeupdate': '_onTimeUpdate',\n 'waiting': '_onWaiting'\n }\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n get ended() {\n return this.el.ended\n }\n\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * This is related to the PLAYBACK_BUFFERING and PLAYBACK_BUFFERFULL events\n * @property buffering\n * @type Boolean\n */\n get buffering() {\n return !!this._bufferingState\n }\n\n constructor(...args) {\n super(...args)\n this._loadStarted = false\n this._playheadMoving = false\n this._playheadMovingTimer = null\n this._stopped = false\n this._setupSrc(this.options.src)\n // backwards compatibility (TODO: remove on 0.3.0)\n this.options.playback || (this.options.playback = this.options || {})\n this.options.playback.disableContextMenu = this.options.playback.disableContextMenu || this.options.disableVideoTagContextMenu\n\n const playbackConfig = this.options.playback\n const preload = playbackConfig.preload || (Browser.isSafari ? 'auto' : this.options.preload)\n\n $.extend(this.el, {\n loop: this.options.loop,\n poster: this.options.poster,\n preload: preload || 'metadata',\n controls: (playbackConfig.controls || this.options.useVideoTagDefaultControls) && 'controls',\n crossOrigin: playbackConfig.crossOrigin,\n 'x-webkit-playsinline': playbackConfig.playInline\n })\n\n // TODO should settings be private?\n this.settings = {default: ['seekbar']}\n this.settings.left = ['playpause', 'position', 'duration']\n this.settings.right = ['fullscreen', 'volume', 'hd-indicator']\n\n // https://github.com/clappr/clappr/issues/1076\n this.options.autoPlay && process.nextTick(() => this.play())\n }\n\n /**\n * Sets the source url on the <video> element, and also the 'src' property.\n * @method setupSrc\n * @private\n * @param {String} srcUrl The source URL.\n */\n _setupSrc(srcUrl) {\n if (this.el.src === srcUrl) {\n return\n }\n this._src = srcUrl\n this.el.src = srcUrl\n }\n\n _onLoadedMetadata(e) {\n this._handleBufferingEvents()\n this.trigger(Events.PLAYBACK_LOADEDMETADATA, {duration: e.target.duration, data: e})\n this._updateSettings()\n const autoSeekFromUrl = typeof(this._options.autoSeekFromUrl) === 'undefined' || this._options.autoSeekFromUrl\n if (this.getPlaybackType() !== Playback.LIVE && autoSeekFromUrl) {\n this._checkInitialSeek()\n }\n }\n\n _onDurationChange() {\n this._updateSettings()\n this._onTimeUpdate()\n // onProgress uses the duration\n this._onProgress()\n }\n\n _updateSettings() {\n // we can't figure out if hls resource is VoD or not until it is being loaded or duration has changed.\n // that's why we check it again and update media control accordingly.\n if (this.getPlaybackType() === Playback.VOD || this.getPlaybackType() === Playback.AOD) {\n this.settings.left = ['playpause', 'position', 'duration']\n } else {\n this.settings.left = ['playstop']\n }\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n isSeekEnabled() {\n return isFinite(this.getDuration())\n }\n\n getPlaybackType() {\n const onDemandType = this.tagName === 'audio' ? Playback.AOD : Playback.VOD\n return [0, undefined, Infinity].indexOf(this.el.duration) >= 0 ? Playback.LIVE : onDemandType\n }\n\n isHighDefinitionInUse() {\n return false\n }\n\n play() {\n this.trigger(Events.PLAYBACK_PLAY_INTENT)\n this._stopped = false\n this._setupSrc(this._src)\n this._handleBufferingEvents()\n this.el.play()\n }\n\n pause() {\n this.el.pause()\n }\n\n stop() {\n this.pause()\n this._stopped = true\n // src will be added again in play()\n this.el.removeAttribute('src')\n this._stopPlayheadMovingChecks()\n this._handleBufferingEvents()\n this.trigger(Events.PLAYBACK_STOP)\n }\n\n volume(value) {\n this.el.volume = value / 100\n }\n\n mute() {\n this.el.volume = 0\n }\n\n unmute() {\n this.el.volume = 1\n }\n\n isMuted() {\n return !!this.el.volume\n }\n\n isPlaying() {\n return !this.el.paused && !this.el.ended\n }\n\n get isReady() {\n return this._isReadyState\n }\n\n _startPlayheadMovingChecks() {\n if (this._playheadMovingTimer !== null) {\n return\n }\n this._playheadMovingTimeOnCheck = null\n this._determineIfPlayheadMoving()\n this._playheadMovingTimer = setInterval(this._determineIfPlayheadMoving.bind(this), 500)\n }\n\n _stopPlayheadMovingChecks() {\n if (this._playheadMovingTimer === null) {\n return\n }\n clearInterval(this._playheadMovingTimer)\n this._playheadMovingTimer = null\n this._playheadMoving = false\n }\n\n _determineIfPlayheadMoving() {\n const before = this._playheadMovingTimeOnCheck\n const now = this.el.currentTime\n this._playheadMoving = before !== now\n this._playheadMovingTimeOnCheck = now\n this._handleBufferingEvents()\n }\n\n // this seems to happen when the user is having to wait\n // for something to happen AFTER A USER INTERACTION\n // e.g the player might be buffering, but when `play()` is called\n // only at this point will this be called.\n // Or the user may seek somewhere but the new area requires buffering,\n // so it will fire then as well.\n // On devices where playing is blocked until requested with a user action,\n // buffering may start, but never finish until the user initiates a play,\n // but this only happens when play is actually requested\n _onWaiting() {\n this._loadStarted = true\n this._handleBufferingEvents()\n }\n\n // called after the first frame has loaded\n // note this doesn't fire on ios before the user has requested play\n // ideally the \"loadstart\" event would be used instead, but this fires\n // before a user has requested play on iOS, and also this is always fired\n // even if the preload setting is \"none\". In both these cases this causes\n // infinite buffering until the user does something which isn't great.\n _onLoadedData() {\n this._loadStarted = true\n this._handleBufferingEvents()\n }\n\n // note this doesn't fire on ios before user has requested play\n _onCanPlay() {\n this._handleBufferingEvents()\n }\n\n _onPlaying() {\n this._startPlayheadMovingChecks()\n this._handleBufferingEvents()\n this.trigger(Events.PLAYBACK_PLAY)\n }\n\n _onPause() {\n this._stopPlayheadMovingChecks()\n this._handleBufferingEvents()\n this.trigger(Events.PLAYBACK_PAUSE)\n }\n\n _onEnded() {\n this._handleBufferingEvents()\n this.trigger(Events.PLAYBACK_ENDED, this.name)\n }\n\n // The playback should be classed as buffering if the following are true:\n // - the ready state is less then HAVE_FUTURE_DATA or the playhead isn't moving and it should be\n // - the media hasn't \"ended\",\n // - the media hasn't been stopped\n // - loading has started\n _handleBufferingEvents() {\n const playheadShouldBeMoving = !this.el.ended && !this.el.paused\n const buffering = this._loadStarted && !this.el.ended && !this._stopped && ((playheadShouldBeMoving && !this._playheadMoving) || this.el.readyState < this.el.HAVE_FUTURE_DATA)\n if (this._bufferingState !== buffering) {\n this._bufferingState = buffering\n if (buffering) {\n this.trigger(Events.PLAYBACK_BUFFERING, this.name)\n }\n else {\n this.trigger(Events.PLAYBACK_BUFFERFULL, this.name)\n }\n }\n }\n\n _onError() {\n this.trigger(Events.PLAYBACK_ERROR, this.el.error, this.name)\n }\n\n destroy() {\n this.$el.remove()\n this.el.src = ''\n this._src = null\n }\n\n seek(time) {\n this.el.currentTime = time\n }\n\n seekPercentage(percentage) {\n const time = this.el.duration * (percentage / 100)\n this.seek(time)\n }\n\n _checkInitialSeek() {\n const seekTime = seekStringToSeconds(window.location.href)\n if (seekTime !== 0) {\n this.seek(seekTime)\n }\n }\n\n getCurrentTime() {\n return this.el.currentTime\n }\n\n getDuration() {\n return this.el.duration\n }\n\n _onTimeUpdate() {\n this._handleBufferingEvents()\n if (this.getPlaybackType() === Playback.LIVE) {\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: 1, total: 1}, this.name)\n } else {\n this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: this.el.currentTime, total: this.el.duration}, this.name)\n }\n }\n\n _onProgress() {\n if (!this.el.buffered.length) {\n return\n }\n let buffered = []\n let bufferedPos = 0\n for (let i = 0; i < this.el.buffered.length; i++) {\n buffered = [...buffered, {start: this.el.buffered.start(i), end: this.el.buffered.end(i)}]\n if (this.el.currentTime >= buffered[i].start && this.el.currentTime <= buffered[i].end) {\n bufferedPos = i\n }\n }\n const progress = {\n start: buffered[bufferedPos].start,\n current: buffered[bufferedPos].end,\n total: this.el.duration\n }\n this.trigger(Events.PLAYBACK_PROGRESS, progress, buffered)\n }\n\n _typeFor(src) {\n let mimeTypes = HTML5Video._mimeTypesForUrl(src, MIMETYPES, this.options.mimeType)\n if (mimeTypes.length == 0) {\n mimeTypes = HTML5Video._mimeTypesForUrl(src, AUDIO_MIMETYPES, this.options.mimeType)\n }\n const mimeType = mimeTypes[0] || ''\n return mimeType.split(';')[0]\n }\n\n _ready() {\n if (this._isReadyState) {\n return\n }\n this._isReadyState = true\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n render() {\n const style = Styler.getStyleFor(tagStyle)\n\n if (this.options.playback.disableContextMenu) {\n this.$el.on('contextmenu', () => {\n return false\n })\n }\n\n this.$el.append(style)\n this._ready()\n return this\n }\n}\n\nHTML5Video._mimeTypesForUrl = function(resourceUrl, mimeTypesByExtension, mimeType) {\n const extension = (resourceUrl.split('?')[0].match(/.*\\.(.*)$/) || [])[1]\n let mimeTypes = mimeType || (extension && mimeTypesByExtension[extension.toLowerCase()]) || []\n return (mimeTypes.constructor === Array) ? mimeTypes : [mimeTypes]\n}\n\nHTML5Video._canPlay = function(type, mimeTypesByExtension, resourceUrl, mimeType) {\n let mimeTypes = HTML5Video._mimeTypesForUrl(resourceUrl, mimeTypesByExtension, mimeType)\n const media = document.createElement(type)\n return !!(mimeTypes.filter(mediaType => !!media.canPlayType(mediaType).replace(/no/, ''))[0])\n}\n\nHTML5Video.canPlay = function(resourceUrl, mimeType) {\n return HTML5Video._canPlay('audio', AUDIO_MIMETYPES, resourceUrl, mimeType) ||\n HTML5Video._canPlay('video', MIMETYPES, resourceUrl, mimeType)\n}\n\nmodule.exports = HTML5Video\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html5_video/html5_video.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport Playback from 'base/playback'\nimport Styler from 'base/styler'\nimport imgStyle from './public/style.scss'\nimport Events from 'base/events'\n\nexport default class HTMLImg extends Playback {\n get name() { return 'html_img' }\n get tagName() { return 'img' }\n get attributes() {\n return {\n 'data-html-img': ''\n }\n }\n\n get events() {\n return {\n 'load': '_onLoad',\n 'abort': '_onError',\n 'error': '_onError'\n }\n }\n\n getPlaybackType() {\n return Playback.NO_OP\n }\n\n constructor(params) {\n super(params)\n this.el.src = params.src\n }\n\n render() {\n const style = Styler.getStyleFor(imgStyle)\n this.$el.append(style)\n this.trigger(Events.PLAYBACK_READY, this.name)\n return this\n }\n\n _onLoad() {\n this.trigger(Events.PLAYBACK_ENDED, this.name)\n }\n\n _onError(evt) {\n const m = (evt.type === 'error') ? 'load error' : 'loading aborted'\n this.trigger(Events.PLAYBACK_ERROR, {message: m}, this.name)\n }\n}\n\nHTMLImg.canPlay = function(resource) {\n return /\\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\\?.*)$/i.test(resource)\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/html_img/html_img.js","import {requestAnimationFrame, cancelAnimationFrame} from 'base/utils'\nimport Playback from 'base/playback'\nimport template from 'base/template'\nimport Styler from 'base/styler'\nimport Events from 'base/events'\nimport noOpStyle from './public/style.scss'\nimport noOpHTML from './public/error.html'\n\nexport default class NoOp extends Playback {\n get name() { return 'no_op' }\n get template() { return template(noOpHTML) }\n get attributes() {\n return {'data-no-op': ''}\n }\n\n constructor(...args) {\n super(...args)\n this._noiseFrameNum = -1\n this._started = false\n }\n\n render() {\n const style = Styler.getStyleFor(noOpStyle)\n const playbackNotSupported = this.options.playbackNotSupportedMessage || this.i18n.t('playback_not_supported')\n this.$el.html(this.template({message: playbackNotSupported}))\n this.$el.append(style)\n this.trigger(Events.PLAYBACK_READY, this.name)\n const showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp)\n if (this.options.autoPlay || !showForNoOp) {\n this.play()\n }\n return this\n }\n\n play() {\n if (!this._started) {\n this._started = true\n this.trigger(Events.PLAYBACK_PLAY)\n this._animate()\n }\n }\n\n _noise() {\n this._noiseFrameNum = (this._noiseFrameNum+1)%5\n if (this._noiseFrameNum) {\n // only update noise every 5 frames to save cpu\n return\n }\n\n const idata = this.context.createImageData(this.context.canvas.width, this.context.canvas.height)\n let buffer32\n try {\n buffer32 = new Uint32Array(idata.data.buffer)\n } catch (err) {\n buffer32 = new Uint32Array(this.context.canvas.width * this.context.canvas.height * 4)\n const data=idata.data\n for(let i = 0; i < data.length; i++){\n buffer32[i]=data[i]\n }\n }\n\n const len = buffer32.length,\n m = Math.random() * 6 + 4\n let run = 0,\n color = 0\n for (let i = 0; i < len;) {\n if (run < 0) {\n run = m * Math.random()\n const p = Math.pow(Math.random(), 0.4)\n color = (255 * p) << 24\n }\n run -= 1\n buffer32[i++] = color\n }\n this.context.putImageData(idata, 0, 0)\n }\n\n _loop() {\n if (this._stop) {\n return\n }\n this._noise()\n this._animationHandle = requestAnimationFrame(() => this._loop())\n }\n\n destroy() {\n if (this._animationHandle) {\n cancelAnimationFrame(this._animationHandle)\n this._stop = true\n }\n }\n\n _animate() {\n this.canvas = this.$el.find('canvas[data-no-op-canvas]')[0]\n this.context = this.canvas.getContext('2d')\n this._loop()\n }\n}\n\nNoOp.canPlay = (source) => { // eslint-disable-line no-unused-vars\n return true\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/playbacks/no_op/no_op.js","//Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport ContainerPlugin from 'base/container_plugin'\nimport Events from 'base/events'\nimport Playback from 'base/playback'\n\nexport default class ClickToPausePlugin extends ContainerPlugin {\n get name() { return 'click_to_pause' }\n\n constructor(container) {\n super(container)\n }\n\n bindEvents() {\n this.listenTo(this.container, Events.CONTAINER_CLICK, this.click)\n this.listenTo(this.container, Events.CONTAINER_SETTINGSUPDATE, this.settingsUpdate)\n }\n\n click() {\n if (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrEnabled()) {\n if (this.container.isPlaying()) {\n this.container.pause()\n } else {\n this.container.play()\n }\n }\n }\n\n settingsUpdate() {\n this.container.$el.removeClass('pointer-enabled')\n if (this.container.getPlaybackType() !== Playback.LIVE || this.container.isDvrEnabled()) {\n this.container.$el.addClass('pointer-enabled')\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/click_to_pause/click_to_pause.js","module.exports = require('./click_to_pause')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/click_to_pause/index.js","import UICorePlugin from 'base/ui_core_plugin'\nimport template from 'base/template'\nimport Playback from 'base/playback'\nimport Styler from 'base/styler'\nimport Events from 'base/events'\nimport dvrStyle from './public/dvr_controls.scss'\nimport dvrHTML from './public/index.html'\n\nexport default class DVRControls extends UICorePlugin {\n get template() { return template(dvrHTML) }\n get name() { return 'dvr_controls' }\n get events() {\n return {\n 'click .live-button': 'click'\n }\n }\n get attributes() {\n return {\n 'class': 'dvr-controls',\n 'data-dvr-controls': ''\n }\n }\n\n constructor(core) {\n super(core)\n this.settingsUpdate()\n }\n\n bindEvents() {\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged)\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_RENDERED, this.settingsUpdate)\n this.listenTo(this.core, Events.CORE_OPTIONS_CHANGE, this.render)\n if (this.core.getCurrentContainer()) {\n this.listenToOnce(this.core.getCurrentContainer(), Events.CONTAINER_TIMEUPDATE, this.render)\n this.listenTo(this.core.getCurrentContainer(), Events.CONTAINER_PLAYBACKDVRSTATECHANGED, this.dvrChanged)\n }\n }\n\n containerChanged() {\n this.stopListening()\n this.bindEvents()\n }\n\n dvrChanged(dvrEnabled) {\n this.settingsUpdate()\n this.core.mediaControl.$el.addClass('live')\n if (dvrEnabled) {\n this.core.mediaControl.$el.addClass('dvr')\n this.core.mediaControl.$el.find('.media-control-indicator[data-position], .media-control-indicator[data-duration]').hide()\n } else {\n this.core.mediaControl.$el.removeClass('dvr')\n }\n }\n\n click() {\n const mediaControl = this.core.mediaControl\n const container = mediaControl.container\n if (!container.isPlaying()) {\n container.play()\n }\n if (mediaControl.$el.hasClass('dvr')) {\n container.seek(container.getDuration())\n }\n }\n\n settingsUpdate() {\n this.stopListening()\n if(this.shouldRender()) {\n this.render()\n this.$el.click(() => this.click())\n }\n this.bindEvents()\n }\n\n shouldRender() {\n const useDvrControls = this.core.options.useDvrControls === undefined || !!this.core.options.useDvrControls\n return useDvrControls && this.core.getPlaybackType() === Playback.LIVE\n }\n\n render() {\n this.style = this.style || Styler.getStyleFor(dvrStyle, { baseUrl: this.core.options.baseUrl })\n this.$el.html(this.template({\n live: this.core.i18n.t('live'),\n backToLive: this.core.i18n.t('back_to_live')\n }))\n this.$el.append(this.style)\n if (this.shouldRender()) {\n this.core.mediaControl.$el.addClass('live')\n this.core.mediaControl.$('.media-control-left-panel[data-media-control]').append(this.$el)\n }\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/dvr_controls/dvr_controls.js","module.exports = require('./dvr_controls')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/dvr_controls/index.js","import Events from 'base/events'\nimport CorePlugin from 'base/core_plugin'\nimport {Fullscreen} from 'base/utils'\n\nexport default class EndVideo extends CorePlugin {\n get name() { return 'end_video' }\n bindEvents() {\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged)\n const container = this.core.getCurrentContainer()\n if (container) {\n this.listenTo(container, Events.CONTAINER_ENDED, this.ended)\n this.listenTo(container, Events.CONTAINER_STOP, this.ended)\n }\n }\n\n containerChanged() {\n this.stopListening()\n this.bindEvents()\n }\n\n ended() {\n const exitOnEnd = typeof(this.core.options.exitFullscreenOnEnd) === 'undefined' || this.core.options.exitFullscreenOnEnd\n if (exitOnEnd && Fullscreen.isFullscreen()) {\n this.core.toggleFullscreen()\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/end_video.js","import CorePlugin from 'base/core_plugin'\nimport Events from 'base/events'\nimport $ from 'clappr-zepto'\n\nimport playIcon from 'icons/01-play.svg'\nimport pauseIcon from 'icons/02-pause.svg'\n\nconst oldIcon = $('link[rel=\"shortcut icon\"]')\n\nexport default class Favicon extends CorePlugin {\n get name() { return 'favicon' }\n get oldIcon() { return oldIcon }\n\n constructor(core) {\n super(core)\n this._container = null\n this.configure()\n }\n\n configure() {\n if (this.core.options.changeFavicon) {\n if (!this.enabled) {\n this.stopListening(this.core, Events.CORE_OPTIONS_CHANGE)\n this.enable()\n }\n } else if (this.enabled) {\n this.disable()\n this.listenTo(this.core, Events.CORE_OPTIONS_CHANGE, this.configure)\n }\n }\n\n bindEvents() {\n this.listenTo(this.core, Events.CORE_OPTIONS_CHANGE, this.configure)\n this.listenTo(this.core.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.containerChanged)\n if (this.core.mediaControl.container) {\n this.containerChanged()\n }\n }\n\n containerChanged() {\n this._container && this.stopListening(this._container)\n this._container = this.core.mediaControl.container\n this.listenTo(this._container, Events.CONTAINER_PLAY, this.setPlayIcon)\n this.listenTo(this._container, Events.CONTAINER_PAUSE, this.setPauseIcon)\n this.listenTo(this._container, Events.CONTAINER_STOP, this.resetIcon)\n this.listenTo(this._container, Events.CONTAINER_ENDED, this.resetIcon)\n this.listenTo(this._container, Events.CONTAINER_ERROR, this.resetIcon)\n this.resetIcon()\n }\n\n disable() {\n super.disable()\n this.resetIcon()\n }\n\n destroy() {\n super.destroy()\n this.resetIcon()\n }\n\n createIcon(svg) {\n const canvas = $('<canvas/>')\n canvas[0].width = 16\n canvas[0].height = 16\n const ctx = canvas[0].getContext('2d')\n ctx.fillStyle = '#000'\n const d = $(svg).find('path').attr('d')\n const path = new Path2D(d)\n ctx.fill(path)\n const icon = $('<link rel=\"shortcut icon\" type=\"image/png\"/>')\n icon.attr('href', canvas[0].toDataURL('image/png'))\n return icon\n }\n\n setPlayIcon() {\n if (!this.playIcon) {\n this.playIcon = this.createIcon(playIcon)\n }\n this.changeIcon(this.playIcon)\n }\n\n setPauseIcon() {\n if (!this.pauseIcon) {\n this.pauseIcon = this.createIcon(pauseIcon)\n }\n this.changeIcon(this.pauseIcon)\n }\n\n resetIcon() {\n $('link[rel=\"shortcut icon\"]').remove()\n $('head').append(this.oldIcon)\n }\n\n changeIcon(icon) {\n if (icon) {\n $('link[rel=\"shortcut icon\"]').remove()\n $('head').append(icon)\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/favicon/favicon.js","module.exports = require('./favicon.js')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/favicon/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport ContainerPlugin from 'base/container_plugin'\nimport Events from 'base/events'\n\nexport default class GoogleAnalytics extends ContainerPlugin {\n get name() { return 'google_analytics' }\n constructor(container) {\n super(container)\n if (this.container.options.gaAccount) {\n this.account = this.container.options.gaAccount\n this.trackerName = (this.container.options.gaTrackerName) ? this.container.options.gaTrackerName + '.' : 'Clappr.'\n this.domainName = this.container.options.gaDomainName\n this.currentHDState = undefined\n this.embedScript()\n }\n }\n\n embedScript() {\n if (!window._gat) {\n const script = document.createElement('script')\n script.setAttribute('type', 'text/javascript')\n script.setAttribute('async', 'async')\n script.setAttribute('src', '//www.google-analytics.com/ga.js')\n script.onload = () => this.addEventListeners()\n document.body.appendChild(script)\n } else {\n this.addEventListeners()\n }\n }\n\n addEventListeners() {\n if (this.container) {\n this.listenTo(this.container, Events.CONTAINER_READY, this.onReady)\n this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay)\n this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_PAUSE, this.onPause)\n this.listenTo(this.container, Events.CONTAINER_ENDED, this.onEnded)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERING, this.onBuffering)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERFULL, this.onBufferFull)\n this.listenTo(this.container, Events.CONTAINER_ERROR, this.onError)\n this.listenTo(this.container, Events.CONTAINER_PLAYBACKSTATE, this.onPlaybackChanged)\n this.listenTo(this.container, Events.CONTAINER_VOLUME, (event) => this.onVolumeChanged(event))\n this.listenTo(this.container, Events.CONTAINER_SEEK, (event) => this.onSeek(event))\n this.listenTo(this.container, Events.CONTAINER_FULL_SCREEN, this.onFullscreen)\n this.listenTo(this.container, Events.CONTAINER_HIGHDEFINITIONUPDATE, this.onHD)\n this.listenTo(this.container, Events.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDVR)\n }\n _gaq.push([this.trackerName + '_setAccount', this.account])\n if (this.domainName)\n _gaq.push([this.trackerName + '_setDomainName', this.domainName])\n }\n\n onReady(){\n this.push(['Video', 'Playback', this.container.playback.name])\n }\n\n onPlay() {\n this.push(['Video', 'Play', this.container.playback.src])\n }\n\n onStop() {\n this.push(['Video', 'Stop', this.container.playback.src])\n }\n\n onEnded() {\n this.push(['Video', 'Ended', this.container.playback.src])\n }\n\n onBuffering() {\n this.push(['Video', 'Buffering', this.container.playback.src])\n }\n\n onBufferFull() {\n this.push(['Video', 'Bufferfull', this.container.playback.src])\n }\n\n onError() {\n this.push(['Video', 'Error', this.container.playback.src])\n }\n\n onHD(isHD) {\n const status = isHD ? 'ON': 'OFF'\n if (status !== this.currentHDState) {\n this.currentHDState = status\n this.push(['Video', 'HD - ' + status, this.container.playback.src])\n }\n }\n\n onPlaybackChanged(playbackState) {\n if (playbackState.type !== null) {\n this.push(['Video', 'Playback Type - ' + playbackState.type, this.container.playback.src])\n }\n }\n\n onDVR(dvrInUse) {\n const status = dvrInUse? 'ON': 'OFF'\n this.push(['Interaction', 'DVR - ' + status, this.container.playback.src])\n }\n\n onPause() {\n this.push(['Video', 'Pause', this.container.playback.src])\n }\n\n onSeek() {\n this.push(['Video', 'Seek', this.container.playback.src])\n }\n\n onVolumeChanged() {\n this.push(['Interaction', 'Volume', this.container.playback.src])\n }\n\n onFullscreen() {\n this.push(['Interaction', 'Fullscreen', this.container.playback.src])\n }\n\n\n push(array) {\n const res = [this.trackerName + '_trackEvent'].concat(array)\n _gaq.push(res)\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/google_analytics/google_analytics.js","module.exports = require('./google_analytics')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/google_analytics/index.js","\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {Kibo} from 'vendor'\n\nconst BOLD = 'font-weight: bold; font-size: 13px;'\nconst INFO = 'color: #006600;' + BOLD\nconst DEBUG = 'color: #0000ff;' + BOLD\nconst WARN = 'color: #ff8000;' + BOLD\nconst ERROR = 'color: #ff0000;' + BOLD\n\nconst LEVEL_DEBUG = 0\nconst LEVEL_INFO = 1\nconst LEVEL_WARN = 2\nconst LEVEL_ERROR = 3\nconst LEVEL_DISABLED = LEVEL_ERROR\n\nconst COLORS = [DEBUG, INFO, WARN, ERROR, ERROR]\nconst DESCRIPTIONS = ['debug', 'info', 'warn', 'error', 'disabled']\n\nexport default class Log {\n constructor(level = LEVEL_INFO, offLevel = LEVEL_DISABLED) {\n this.kibo = new Kibo()\n this.kibo.down(['ctrl shift d'], () => this.onOff())\n this.BLACKLIST = ['timeupdate', 'playback:timeupdate', 'playback:progress', 'container:hover', 'container:timeupdate', 'container:progress']\n this.level = level\n this.offLevel = offLevel\n }\n\n debug(klass) {this.log(klass, LEVEL_DEBUG, Array.prototype.slice.call(arguments, 1))}\n info(klass) {this.log(klass, LEVEL_INFO, Array.prototype.slice.call(arguments, 1))}\n warn(klass) {this.log(klass, LEVEL_WARN, Array.prototype.slice.call(arguments, 1))}\n error(klass) {this.log(klass, LEVEL_ERROR, Array.prototype.slice.call(arguments, 1))}\n\n onOff() {\n if (this.level === this.offLevel) {\n this.level = this.previousLevel\n } else {\n this.previousLevel = this.level\n this.level = this.offLevel\n }\n // handle instances where console.log is unavailable\n if (window.console && window.console.log) {\n window.console.log('%c[Clappr.Log] set log level to ' + DESCRIPTIONS[this.level], WARN)\n }\n }\n\n level(newLevel) {\n this.level = newLevel\n }\n\n log(klass, level, message) {\n if (this.BLACKLIST.indexOf(message[0]) >= 0) return\n if (level < this.level) return\n\n if (!message) {\n message = klass\n klass = null\n }\n const color = COLORS[level]\n let klassDescription = ''\n if (klass) {\n klassDescription = '[' + klass + ']'\n }\n if (window.console && window.console.log) {\n window.console.log.apply(console, ['%c[' + DESCRIPTIONS[level] + ']' + klassDescription, color].concat(message))\n }\n }\n}\n\nLog.LEVEL_DEBUG = LEVEL_DEBUG\nLog.LEVEL_INFO = LEVEL_INFO\nLog.LEVEL_WARN = LEVEL_WARN\nLog.LEVEL_ERROR = LEVEL_ERROR\n\nLog.getInstance = function() {\n if (this._instance === undefined) {\n this._instance = new this()\n this._instance.previousLevel = this._instance.level\n this._instance.level = this._instance.offLevel\n }\n return this._instance\n}\n\nLog.setLevel = function(level) { this.getInstance().level = level }\n\nLog.debug = function() { this.getInstance().debug.apply(this.getInstance(), arguments) }\nLog.info = function() { this.getInstance().info.apply(this.getInstance(), arguments) }\nLog.warn = function() { this.getInstance().warn.apply(this.getInstance(), arguments) }\nLog.error = function() { this.getInstance().error.apply(this.getInstance(), arguments) }\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/log/log.js","//Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport UIContainerPlugin from 'base/ui_container_plugin'\nimport Events from 'base/events'\nimport Styler from 'base/styler'\nimport template from 'base/template'\nimport Playback from 'base/playback'\nimport posterStyle from './public/poster.scss'\nimport posterHTML from './public/poster.html'\nimport playIcon from 'icons/01-play.svg'\n\nexport default class PosterPlugin extends UIContainerPlugin {\n get name() { return 'poster' }\n get template() { return template(posterHTML) }\n get shouldRender() {\n const showForNoOp = !!(this.options.poster && this.options.poster.showForNoOp)\n return this.container.playback.name !== 'html_img' && (this.container.playback.getPlaybackType() !== Playback.NO_OP || showForNoOp)\n }\n\n get attributes() {\n return {\n 'class': 'player-poster',\n 'data-poster': ''\n }\n }\n\n get events() {\n return {\n 'click': 'clicked'\n }\n }\n\n get showOnVideoEnd() {\n return !this.options.poster || this.options.poster.showOnVideoEnd || this.options.poster.showOnVideoEnd === undefined\n }\n\n constructor(container) {\n super(container)\n this.hasStartedPlaying = false\n this.playRequested = false\n this.render()\n process.nextTick(() => this.update())\n }\n\n bindEvents() {\n this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERING, this.update)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERFULL, this.update)\n this.listenTo(this.container, Events.CONTAINER_OPTIONS_CHANGE, this.render)\n this.showOnVideoEnd && this.listenTo(this.container, Events.CONTAINER_ENDED, this.onStop)\n }\n\n stopListening() {\n super.stopListening()\n }\n\n onPlay() {\n this.hasStartedPlaying = true\n this.update()\n }\n\n onStop() {\n this.hasStartedPlaying = false\n this.playRequested = false\n this.update()\n }\n\n showPlayButton(show) {\n if (show && (!this.options.chromeless || this.options.allowUserInteraction)) {\n this.$playButton.show()\n this.$el.addClass('clickable')\n } else {\n this.$playButton.hide()\n this.$el.removeClass('clickable')\n }\n }\n\n clicked() {\n if (!this.options.chromeless || this.options.allowUserInteraction) {\n this.playRequested = true\n this.update()\n this.container.play()\n }\n return false\n }\n\n shouldHideOnPlay() {\n // Audio broadcasts should keep the poster up; video should hide poster while playing.\n return !this.container.playback.isAudioOnly\n }\n\n update() {\n if (!this.shouldRender) {\n return\n }\n let showPlayButton = !this.playRequested && !this.hasStartedPlaying && !this.container.buffering\n this.showPlayButton(showPlayButton)\n if (!this.hasStartedPlaying) {\n this.container.disableMediaControl()\n this.$el.show()\n } else {\n this.container.enableMediaControl()\n if (this.shouldHideOnPlay()) {\n this.$el.hide()\n }\n }\n }\n\n render() {\n if (!this.shouldRender) {\n return\n }\n let style = Styler.getStyleFor(posterStyle, {baseUrl: this.options.baseUrl})\n this.$el.html(this.template())\n this.$el.append(style)\n if (this.options.poster) {\n const posterUrl = this.options.poster.url || this.options.poster\n this.$el.css({'background-image': 'url(' + posterUrl + ')'})\n }\n this.container.$el.append(this.el)\n this.$playWrapper = this.$el.find('.play-wrapper')\n this.$playWrapper.append(playIcon)\n this.$playButton = this.$playWrapper.find('svg')\n this.$playButton.addClass('poster-icon')\n this.$playButton.attr('data-poster', '')\n\n let buttonsColor = this.options.mediacontrol && this.options.mediacontrol.buttons\n if (buttonsColor) {\n this.$el.find('svg path').css('fill', buttonsColor)\n }\n\n if (this.options.mediacontrol && this.options.mediacontrol.buttons) {\n buttonsColor = this.options.mediacontrol.buttons\n this.$playButton.css('color', buttonsColor)\n }\n this.update()\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/poster/poster.js","module.exports = require('./seek_time')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/seek_time/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport {formatTime} from 'base/utils'\n\nimport UICorePlugin from 'base/ui_core_plugin'\nimport Styler from 'base/styler'\nimport template from 'base/template'\nimport Events from 'base/events'\nimport Playback from 'base/playback'\nimport seekTimeStyle from './public/seek_time.scss'\nimport seekTimeHTML from './public/seek_time.html'\n\nexport default class SeekTime extends UICorePlugin {\n get name() { return 'seek_time' }\n get template() {\n return template(seekTimeHTML)\n }\n get attributes() {\n return {\n 'class': 'seek-time',\n 'data-seek-time': ''\n }\n }\n get mediaControl() { return this.core.mediaControl }\n get mediaControlContainer() { return this.mediaControl.container }\n get isLiveStreamWithDvr() { return this.mediaControlContainer && this.mediaControlContainer.getPlaybackType() === Playback.LIVE && this.mediaControlContainer.isDvrEnabled() }\n get durationShown() { return this.isLiveStreamWithDvr && !this.useActualLiveTime }\n get useActualLiveTime() { return this.actualLiveTime && this.isLiveStreamWithDvr }\n constructor(core) {\n super(core)\n this.hoveringOverSeekBar = false\n this.hoverPosition = null\n this.duration = null\n this.actualLiveTime = !!this.mediaControl.options.actualLiveTime\n if (this.actualLiveTime) {\n if (this.mediaControl.options.actualLiveServerTime) {\n this.actualLiveServerTimeDiff = new Date().getTime() - new Date(this.mediaControl.options.actualLiveServerTime).getTime()\n } else {\n this.actualLiveServerTimeDiff = 0\n }\n }\n }\n\n bindEvents() {\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_RENDERED, this.render)\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR, this.showTime)\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR, this.hideTime)\n this.listenTo(this.mediaControl, Events.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged)\n if (this.mediaControlContainer) {\n this.listenTo(this.mediaControlContainer, Events.CONTAINER_PLAYBACKDVRSTATECHANGED, this.update)\n this.listenTo(this.mediaControlContainer, Events.CONTAINER_TIMEUPDATE, this.updateDuration)\n }\n }\n\n onContainerChanged() {\n this.stopListening()\n this.bindEvents()\n }\n\n updateDuration(timeProgress) {\n this.duration = timeProgress.total\n this.update()\n }\n\n showTime(event) {\n this.hoveringOverSeekBar = true\n this.calculateHoverPosition(event)\n this.update()\n }\n\n hideTime() {\n this.hoveringOverSeekBar = false\n this.update()\n }\n\n calculateHoverPosition(event) {\n const offset = event.pageX - this.mediaControl.$seekBarContainer.offset().left\n // proportion into the seek bar that the mouse is hovered over 0-1\n this.hoverPosition = Math.min(1, Math.max(offset/this.mediaControl.$seekBarContainer.width(), 0))\n }\n\n getSeekTime() {\n let seekTime, secondsSinceMidnight\n if (this.useActualLiveTime) {\n const d = new Date(new Date().getTime() - this.actualLiveServerTimeDiff), e = new Date(d)\n secondsSinceMidnight = (e - d.setHours(0,0,0,0)) / 1000\n seekTime = (secondsSinceMidnight - this.duration) + (this.hoverPosition * this.duration)\n if (seekTime < 0) {\n seekTime += 86400\n }\n } else {\n seekTime = this.hoverPosition * this.duration\n }\n return {seekTime, secondsSinceMidnight}\n }\n\n update() {\n if (!this.rendered) {\n // update() is always called after a render\n return\n }\n if (!this.shouldBeVisible()) {\n this.$el.hide()\n this.$el.css('left', '-100%')\n } else {\n const seekTime = this.getSeekTime()\n const currentSeekTime = formatTime(seekTime.seekTime, this.useActualLiveTime)\n // only update dom if necessary, ie time actually changed\n if (currentSeekTime !== this.displayedSeekTime) {\n this.$seekTimeEl.text(currentSeekTime)\n this.displayedSeekTime = currentSeekTime\n }\n\n if (this.durationShown) {\n this.$durationEl.show()\n const currentDuration = formatTime(this.actualLiveTime ? seekTime.secondsSinceMidnight : this.duration, this.actualLiveTime)\n if (currentDuration !== this.displayedDuration) {\n this.$durationEl.text(currentDuration)\n this.displayedDuration = currentDuration\n }\n } else {\n this.$durationEl.hide()\n }\n\n // the element must be unhidden before its width is requested, otherwise it's width will be reported as 0\n this.$el.show()\n const containerWidth = this.mediaControl.$seekBarContainer.width()\n const elWidth = this.$el.width()\n let elLeftPos = this.hoverPosition * containerWidth\n elLeftPos -= elWidth / 2\n elLeftPos = Math.max(0, Math.min(elLeftPos, containerWidth - elWidth))\n this.$el.css('left', elLeftPos)\n }\n }\n\n shouldBeVisible() {\n return this.mediaControlContainer && this.mediaControlContainer.settings.seekEnabled && this.hoveringOverSeekBar && this.hoverPosition !== null && this.duration !== null\n }\n\n render() {\n this.rendered = true\n this.displayedDuration = null\n this.displayedSeekTime = null\n const style = Styler.getStyleFor(seekTimeStyle)\n this.$el.html(this.template())\n this.$el.append(style)\n this.$el.hide()\n this.mediaControl.$el.append(this.el)\n this.$seekTimeEl = this.$el.find('[data-seek-time]')\n this.$durationEl = this.$el.find('[data-duration]')\n this.$durationEl.hide()\n this.update()\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/seek_time/seek_time.js","import CorePlugin from 'base/core_plugin'\n\nimport Events from 'base/events'\n\nexport default class SourcesPlugin extends CorePlugin {\n get name() { return 'sources' }\n\n bindEvents() {\n this.listenTo(this.core, Events.CORE_CONTAINERS_CREATED, this.onContainersCreated)\n }\n\n onContainersCreated() {\n const firstValidSource = this.core.containers.filter(container => container.playback.name !== 'no_op')[0] || this.core.containers[0]\n if (firstValidSource) {\n this.core.containers.forEach((container) => {\n if (container !== firstValidSource) {\n container.destroy()\n }\n })\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/sources.js","module.exports = require('./spinner_three_bounce')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/spinner_three_bounce/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport UIContainerPlugin from 'base/ui_container_plugin'\nimport Events from 'base/events'\nimport Styler from 'base/styler'\nimport template from 'base/template'\nimport spinnerHTML from './public/spinner.html'\nimport spinnerStyle from './public/spinner.scss'\n\nexport default class SpinnerThreeBouncePlugin extends UIContainerPlugin {\n get name() { return 'spinner' }\n get attributes() {\n return {\n 'data-spinner':'',\n 'class': 'spinner-three-bounce'\n }\n }\n\n constructor(container) {\n super(container)\n this.template = template(spinnerHTML)\n this.showTimeout = null\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERING, this.onBuffering)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERFULL, this.onBufferFull)\n this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_ENDED, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_ERROR, this.onStop)\n this.render()\n }\n\n onBuffering() {\n this.show()\n }\n\n onBufferFull() {\n this.hide()\n }\n\n onStop() {\n this.hide()\n }\n\n show() {\n if (this.showTimeout === null) {\n this.showTimeout = setTimeout(() => this.$el.show(), 300)\n }\n }\n\n hide() {\n if (this.showTimeout !== null) {\n clearTimeout(this.showTimeout)\n this.showTimeout = null\n }\n this.$el.hide()\n }\n\n render() {\n this.$el.html(this.template())\n const style = Styler.getStyleFor(spinnerStyle)\n this.container.$el.append(style)\n this.container.$el.append(this.$el)\n this.$el.hide()\n if (this.container.buffering) {\n this.onBuffering()\n }\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/spinner_three_bounce/spinner_three_bounce.js","module.exports = require('./stats')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/stats/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport ContainerPlugin from 'base/container_plugin'\nimport Events from 'base/events'\nimport $ from 'clappr-zepto'\n\nexport default class StatsPlugin extends ContainerPlugin {\n get name() { return 'stats' }\n\n constructor(container) {\n super(container)\n this.setInitialAttrs()\n this.reportInterval = this.options.reportInterval || 5000\n this.state = 'IDLE'\n }\n\n bindEvents() {\n this.listenTo(this.container.playback, Events.PLAYBACK_PLAY, this.onPlay)\n this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_ENDED, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_DESTROYED, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERING, this.onBuffering)\n this.listenTo(this.container, Events.CONTAINER_STATE_BUFFERFULL, this.onBufferFull)\n this.listenTo(this.container, Events.CONTAINER_STATS_ADD, this.onStatsAdd)\n this.listenTo(this.container, Events.CONTAINER_BITRATE, this.onStatsAdd)\n this.listenTo(this.container.playback, Events.PLAYBACK_STATS_ADD, this.onStatsAdd)\n }\n\n setInitialAttrs() {\n this.firstPlay = true\n this.startupTime = 0\n this.rebufferingTime = 0\n this.watchingTime = 0\n this.rebuffers = 0\n this.externalMetrics = {}\n }\n\n onPlay() {\n this.state = 'PLAYING'\n this.watchingTimeInit = Date.now()\n if (!this.intervalId) {\n this.intervalId = setInterval(this.report.bind(this), this.reportInterval)\n }\n }\n\n onStop() {\n clearInterval(this.intervalId)\n this.report()\n this.intervalId = undefined\n this.state = 'STOPPED'\n }\n\n onBuffering() {\n if (this.firstPlay) {\n this.startupTimeInit = Date.now()\n } else {\n this.rebufferingTimeInit = Date.now()\n }\n this.state = 'BUFFERING'\n this.rebuffers++\n }\n\n onBufferFull() {\n if (this.firstPlay && this.startupTimeInit) {\n this.firstPlay = false\n this.startupTime = Date.now() - this.startupTimeInit\n this.watchingTimeInit = Date.now()\n } else if (this.rebufferingTimeInit) {\n this.rebufferingTime += this.getRebufferingTime()\n }\n this.rebufferingTimeInit = undefined\n this.state = 'PLAYING'\n }\n\n getRebufferingTime() {\n return Date.now() - this.rebufferingTimeInit\n }\n\n getWatchingTime() {\n const totalTime = (Date.now() - this.watchingTimeInit)\n return totalTime - this.rebufferingTime\n }\n\n isRebuffering() {\n return !!this.rebufferingTimeInit\n }\n\n onStatsAdd(metric) {\n $.extend(this.externalMetrics, metric)\n }\n\n getStats() {\n const metrics = {\n startupTime: this.startupTime,\n rebuffers: this.rebuffers,\n rebufferingTime: this.isRebuffering()? this.rebufferingTime + this.getRebufferingTime(): this.rebufferingTime,\n watchingTime: this.isRebuffering()? this.getWatchingTime() - this.getRebufferingTime(): this.getWatchingTime()\n }\n $.extend(metrics, this.externalMetrics)\n return metrics\n }\n\n report() {\n this.container.statsReport(this.getStats())\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/stats/stats.js","import {getBrowserLanguage} from 'base/utils'\n\nimport CorePlugin from 'base/core_plugin'\nimport merge from 'lodash.merge'\n\n/**\n * The internationalization (i18n) plugin\n * @class Strings\n * @constructor\n * @extends CorePlugin\n * @module plugins\n */\nexport default class Strings extends CorePlugin {\n get name() {return 'strings'}\n\n constructor(core) {\n super(core)\n this._initializeMessages()\n }\n /**\n * Gets a translated string for the given key.\n * @method t\n * @param {String} key the key to all messages\n * @return {String} translated label\n */\n t(key) {\n const lang = this._language()\n const i18n = lang && this._messages[lang] || this._messages['en']\n return i18n[key] || key\n }\n\n _language() {return this.core.options.language || getBrowserLanguage()}\n\n _initializeMessages() {\n this._messages = merge({\n 'en': {\n 'live': 'live',\n 'back_to_live': 'back to live',\n 'playback_not_supported': 'Your browser does not support the playback of this video. Please try using a different browser.'\n },\n 'pt': {\n 'live': 'ao vivo',\n 'back_to_live': 'voltar para o ao vivo',\n 'playback_not_supported': 'Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.'\n },\n 'es': {\n 'live': 'vivo',\n 'back_to_live': 'volver en vivo',\n 'playback_not_supported': 'Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente.'\n },\n 'ru': {\n 'live': 'прямой эфир',\n 'back_to_live': 'к прямому эфиру',\n 'playback_not_supported': 'Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер.'\n }\n }, this.core.options.strings || {})\n\n this._messages['pt-BR'] = this._messages['pt']\n this._messages['en-US'] = this._messages['en']\n this._messages['es-419'] = this._messages['es']\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/strings.js","module.exports = require('./watermark')\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/watermark/index.js","// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport UIContainerPlugin from 'base/ui_container_plugin'\nimport Events from 'base/events'\nimport Styler from 'base/styler'\nimport template from 'base/template'\nimport watermarkStyle from './public/watermark.scss'\nimport watermarkHTML from './public/watermark.html'\n\nexport default class WaterMarkPlugin extends UIContainerPlugin {\n get name() { return 'watermark' }\n\n get template() { return template(watermarkHTML) }\n\n constructor(container) {\n super(container)\n this.configure()\n }\n\n bindEvents() {\n this.listenTo(this.container, Events.CONTAINER_PLAY, this.onPlay)\n this.listenTo(this.container, Events.CONTAINER_STOP, this.onStop)\n this.listenTo(this.container, Events.CONTAINER_OPTIONS_CHANGE, this.configure)\n }\n\n configure() {\n this.position = this.options.position || 'bottom-right'\n if (this.options.watermark) {\n this.imageUrl = this.options.watermark\n this.imageLink = this.options.watermarkLink\n this.render()\n } else {\n this.$el.remove()\n }\n }\n\n onPlay() {\n if (!this.hidden)\n this.$el.show()\n }\n\n onStop() {\n this.$el.hide()\n }\n\n render() {\n this.$el.hide()\n const templateOptions = {position: this.position, imageUrl: this.imageUrl, imageLink: this.imageLink}\n this.$el.html(this.template(templateOptions))\n const style = Styler.getStyleFor(watermarkStyle)\n this.container.$el.append(style)\n this.container.$el.append(this.$el)\n return this\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/plugins/watermark/watermark.js","/* eslint-disable */\n// Kibo is released under the MIT License. Copyright (c) 2013 marquete.\n// see https://github.com/marquete/kibo\n\nvar Kibo = function(element) {\n this.element = element || window.document;\n this.initialize();\n};\n\nKibo.KEY_NAMES_BY_CODE = {\n 8: 'backspace', 9: 'tab', 13: 'enter',\n 16: 'shift', 17: 'ctrl', 18: 'alt',\n 20: 'caps_lock',\n 27: 'esc',\n 32: 'space',\n 37: 'left', 38: 'up', 39: 'right', 40: 'down',\n 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9',\n 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j',\n 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't',\n 85: 'u', 86: 'v', 87: 'w', 88: 'x', 89: 'y', 90: 'z', 112: 'f1', 113: 'f2', 114: 'f3',\n 115: 'f4', 116: 'f5', 117: 'f6', 118: 'f7', 119: 'f8', 120: 'f9', 121: 'f10', 122: 'f11', 123: 'f12'\n};\n\nKibo.KEY_CODES_BY_NAME = {};\n(function() {\n for(var key in Kibo.KEY_NAMES_BY_CODE) {\n if(Object.prototype.hasOwnProperty.call(Kibo.KEY_NAMES_BY_CODE, key)) {\n Kibo.KEY_CODES_BY_NAME[Kibo.KEY_NAMES_BY_CODE[key]] = +key;\n }\n }\n})();\n\nKibo.MODIFIERS = ['shift', 'ctrl', 'alt'];\n\nKibo.registerEvent = (function() {\n if(document.addEventListener) {\n return function(element, eventName, func) {\n element.addEventListener(eventName, func, false);\n };\n }\n else if(document.attachEvent) {\n return function(element, eventName, func) {\n element.attachEvent('on' + eventName, func);\n };\n }\n})();\n\nKibo.unregisterEvent = (function() {\n if(document.removeEventListener) {\n return function(element, eventName, func) {\n element.removeEventListener(eventName, func, false);\n };\n }\n else if(document.detachEvent) {\n return function(element, eventName, func) {\n element.detachEvent('on' + eventName, func);\n };\n }\n})();\n\nKibo.stringContains = function(string, substring) {\n return string.indexOf(substring) !== -1;\n};\n\nKibo.neatString = function(string) {\n return string.replace(/^\\s+|\\s+$/g, '').replace(/\\s+/g, ' ');\n};\n\nKibo.capitalize = function(string) {\n return string.toLowerCase().replace(/^./, function(match) { return match.toUpperCase(); });\n};\n\nKibo.isString = function(what) {\n return Kibo.stringContains(Object.prototype.toString.call(what), 'String');\n};\n\nKibo.arrayIncludes = (function() {\n if(Array.prototype.indexOf) {\n return function(haystack, needle) {\n return haystack.indexOf(needle) !== -1;\n };\n }\n else {\n return function(haystack, needle) {\n for(var i = 0; i < haystack.length; i++) {\n if(haystack[i] === needle) {\n return true;\n }\n }\n return false;\n };\n }\n})();\n\nKibo.extractModifiers = function(keyCombination) {\n var modifiers, i\n modifiers = [];\n for(i = 0; i < Kibo.MODIFIERS.length; i++) {\n if(Kibo.stringContains(keyCombination, Kibo.MODIFIERS[i])) {\n modifiers.push(Kibo.MODIFIERS[i]);\n }\n }\n return modifiers;\n}\n\nKibo.extractKey = function(keyCombination) {\n var keys, i;\n keys = Kibo.neatString(keyCombination).split(' ');\n for(i = 0; i < keys.length; i++) {\n if(!Kibo.arrayIncludes(Kibo.MODIFIERS, keys[i])) {\n return keys[i];\n }\n }\n};\n\nKibo.modifiersAndKey = function(keyCombination) {\n var result, key;\n\n if(Kibo.stringContains(keyCombination, 'any')) {\n return Kibo.neatString(keyCombination).split(' ').slice(0, 2).join(' ');\n }\n\n result = Kibo.extractModifiers(keyCombination);\n\n key = Kibo.extractKey(keyCombination);\n if(key && !Kibo.arrayIncludes(Kibo.MODIFIERS, key)) {\n result.push(key);\n }\n\n return result.join(' ');\n}\n\nKibo.keyName = function(keyCode) {\n return Kibo.KEY_NAMES_BY_CODE[keyCode + ''];\n};\n\nKibo.keyCode = function(keyName) {\n return +Kibo.KEY_CODES_BY_NAME[keyName];\n};\n\nKibo.prototype.initialize = function() {\n var i, that = this;\n\n this.lastKeyCode = -1;\n this.lastModifiers = {};\n for(i = 0; i < Kibo.MODIFIERS.length; i++) {\n this.lastModifiers[Kibo.MODIFIERS[i]] = false;\n }\n\n this.keysDown = { any: [] };\n this.keysUp = { any: [] };\n this.downHandler = this.handler('down');\n this.upHandler = this.handler('up');\n\n Kibo.registerEvent(this.element, 'keydown', this.downHandler);\n Kibo.registerEvent(this.element, 'keyup', this.upHandler);\n Kibo.registerEvent(window, 'unload', function unloader() {\n Kibo.unregisterEvent(that.element, 'keydown', that.downHandler);\n Kibo.unregisterEvent(that.element, 'keyup', that.upHandler);\n Kibo.unregisterEvent(window, 'unload', unloader);\n });\n};\n\nKibo.prototype.handler = function(upOrDown) {\n var that = this;\n return function(e) {\n var i, registeredKeys, lastModifiersAndKey;\n\n e = e || window.event;\n\n that.lastKeyCode = e.keyCode;\n for(i = 0; i < Kibo.MODIFIERS.length; i++) {\n that.lastModifiers[Kibo.MODIFIERS[i]] = e[Kibo.MODIFIERS[i] + 'Key'];\n }\n if(Kibo.arrayIncludes(Kibo.MODIFIERS, Kibo.keyName(that.lastKeyCode))) {\n that.lastModifiers[Kibo.keyName(that.lastKeyCode)] = true;\n }\n\n registeredKeys = that['keys' + Kibo.capitalize(upOrDown)];\n\n for(i = 0; i < registeredKeys.any.length; i++) {\n if((registeredKeys.any[i](e) === false) && e.preventDefault) {\n e.preventDefault();\n }\n }\n\n lastModifiersAndKey = that.lastModifiersAndKey();\n if(registeredKeys[lastModifiersAndKey]) {\n for(i = 0; i < registeredKeys[lastModifiersAndKey].length; i++) {\n if((registeredKeys[lastModifiersAndKey][i](e) === false) && e.preventDefault) {\n e.preventDefault();\n }\n }\n }\n };\n};\n\nKibo.prototype.registerKeys = function(upOrDown, newKeys, func) {\n var i, keys, registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\n if(Kibo.isString(newKeys)) {\n newKeys = [newKeys];\n }\n\n for(i = 0; i < newKeys.length; i++) {\n keys = newKeys[i];\n keys = Kibo.modifiersAndKey(keys + '');\n\n if(registeredKeys[keys]) {\n registeredKeys[keys].push(func);\n } else {\n registeredKeys[keys] = [func];\n }\n }\n\n return this;\n};\n\n// jshint maxdepth:5\nKibo.prototype.unregisterKeys = function(upOrDown, newKeys, func) {\n var i, j, keys, registeredKeys = this['keys' + Kibo.capitalize(upOrDown)];\n\n if(Kibo.isString(newKeys)) {\n newKeys = [newKeys];\n }\n\n for(i = 0; i < newKeys.length; i++) {\n keys = newKeys[i];\n keys = Kibo.modifiersAndKey(keys + '');\n\n if(func === null) {\n delete registeredKeys[keys];\n } else {\n if(registeredKeys[keys]) {\n for(j = 0; j < registeredKeys[keys].length; j++) {\n if(String(registeredKeys[keys][j]) === String(func)) {\n registeredKeys[keys].splice(j, 1);\n break;\n }\n }\n }\n }\n }\n\n return this;\n};\n\nKibo.prototype.off = function(keys) {\n return this.unregisterKeys('down', keys, null);\n}\n\nKibo.prototype.delegate = function(upOrDown, keys, func) {\n return (func !== null || func !== undefined) ? this.registerKeys(upOrDown, keys, func) : this.unregisterKeys(upOrDown, keys, func);\n};\n\nKibo.prototype.down = function(keys, func) {\n return this.delegate('down', keys, func);\n};\n\nKibo.prototype.up = function(keys, func) {\n return this.delegate('up', keys, func);\n};\n\nKibo.prototype.lastKey = function(modifier) {\n if(!modifier) {\n return Kibo.keyName(this.lastKeyCode);\n }\n\n return this.lastModifiers[modifier];\n};\n\nKibo.prototype.lastModifiersAndKey = function() {\n var result, i;\n\n result = [];\n for(i = 0; i < Kibo.MODIFIERS.length; i++) {\n if(this.lastKey(Kibo.MODIFIERS[i])) {\n result.push(Kibo.MODIFIERS[i]);\n }\n }\n\n if(!Kibo.arrayIncludes(result, this.lastKey())) {\n result.push(this.lastKey());\n }\n\n return result.join(' ');\n};\n\nexport default Kibo\n\n\n\n// WEBPACK FOOTER //\n// ./src/vendor/kibo.js","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".container[data-container]{position:absolute;background-color:#000;height:100%;width:100%}.container[data-container] .chromeless{cursor:default}[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled{cursor:pointer}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/container/public/style.scss\n// module id = 78\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local(\\\"Roboto\\\"),local(\\\"Roboto-Regular\\\"),url(\" + require(\"./Roboto.ttf\") + \") format(\\\"truetype\\\")}[data-player]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);position:relative;margin:0;padding:0;border:0;font-style:normal;font-weight:400;text-align:center;overflow:hidden;font-size:100%;font-family:Roboto,Open Sans,Arial,sans-serif;text-shadow:0 0 0;box-sizing:border-box}[data-player] a,[data-player] abbr,[data-player] acronym,[data-player] address,[data-player] applet,[data-player] article,[data-player] aside,[data-player] audio,[data-player] b,[data-player] big,[data-player] blockquote,[data-player] canvas,[data-player] caption,[data-player] center,[data-player] cite,[data-player] code,[data-player] dd,[data-player] del,[data-player] details,[data-player] dfn,[data-player] div,[data-player] dl,[data-player] dt,[data-player] em,[data-player] embed,[data-player] fieldset,[data-player] figcaption,[data-player] figure,[data-player] footer,[data-player] form,[data-player] h1,[data-player] h2,[data-player] h3,[data-player] h4,[data-player] h5,[data-player] h6,[data-player] header,[data-player] hgroup,[data-player] i,[data-player] iframe,[data-player] img,[data-player] ins,[data-player] kbd,[data-player] label,[data-player] legend,[data-player] li,[data-player] mark,[data-player] menu,[data-player] nav,[data-player] object,[data-player] ol,[data-player] output,[data-player] p,[data-player] pre,[data-player] q,[data-player] ruby,[data-player] s,[data-player] samp,[data-player] section,[data-player] small,[data-player] span,[data-player] strike,[data-player] strong,[data-player] sub,[data-player] summary,[data-player] sup,[data-player] table,[data-player] tbody,[data-player] td,[data-player] tfoot,[data-player] th,[data-player] thead,[data-player] time,[data-player] tr,[data-player] tt,[data-player] u,[data-player] ul,[data-player] var,[data-player] video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}[data-player] table{border-collapse:collapse;border-spacing:0}[data-player] caption,[data-player] td,[data-player] th{text-align:left;font-weight:400;vertical-align:middle}[data-player] blockquote,[data-player] q{quotes:none}[data-player] blockquote:after,[data-player] blockquote:before,[data-player] q:after,[data-player] q:before{content:\\\"\\\";content:none}[data-player] a img{border:none}[data-player]:focus{outline:0}[data-player] *{max-width:none;box-sizing:inherit;float:none}[data-player] div{display:block}[data-player].fullscreen{width:100%!important;height:100%!important;top:0;left:0}[data-player].nocursor{cursor:none}.clappr-style{display:none!important}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/core/public/style.scss\n// module id = 79\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".media-control-notransition{-webkit-transition:none!important;transition:none!important}.media-control[data-media-control]{position:absolute;width:100%;height:100%;z-index:9999;pointer-events:none}.media-control[data-media-control].dragging{pointer-events:auto;cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url(\" + require(\"./closed-hand.cur\") + \"),move}.media-control[data-media-control].dragging *{cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url(\" + require(\"./closed-hand.cur\") + \"),move}.media-control[data-media-control] .media-control-background[data-background]{position:absolute;height:40%;width:100%;bottom:0;background:-webkit-linear-gradient(transparent,rgba(0,0,0,.9));background:linear-gradient(transparent,rgba(0,0,0,.9));-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.media-control[data-media-control] .media-control-icon{line-height:0;letter-spacing:0;speak:none;color:#fff;opacity:.5;vertical-align:middle;text-align:left;-webkit-transition:all .1s ease;transition:all .1s ease}.media-control[data-media-control] .media-control-icon:hover{color:#fff;opacity:.75;text-shadow:hsla(0,0%,100%,.8) 0 0 5px}.media-control[data-media-control].media-control-hide .media-control-background[data-background]{opacity:0}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls]{bottom:-50px}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls]{position:absolute;bottom:7px;width:100%;height:32px;font-size:0;vertical-align:middle;pointer-events:auto;-webkit-transition:bottom .4s ease-out;transition:bottom .4s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control]{position:absolute;top:0;left:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control]{height:100%;text-align:center;line-height:32px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control]{position:absolute;top:0;right:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button{background-color:transparent;border:0;margin:0 6px;padding:0;cursor:pointer;display:inline-block;width:32px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg{width:100%;height:22px}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus{outline:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop]{float:left;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen]{float:right;background-color:transparent;border:0;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator]{cursor:default;float:right;background-color:transparent;border:0;height:100%;display:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled{opacity:1;display:block}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover{opacity:1;text-shadow:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop]{float:left}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration],.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{display:inline-block;font-size:10px;color:#fff;cursor:default;line-height:32px;position:relative}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{margin:0 6px 0 7px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]{color:hsla(0,0%,100%,.5);margin-right:6px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before{content:\\\"|\\\";margin-right:7px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{position:absolute;top:-20px;left:0;display:inline-block;vertical-align:middle;width:100%;height:25px;cursor:pointer}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{width:100%;height:1px;position:relative;top:12px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled{cursor:default}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2px;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume]{float:right;display:inline-block;height:32px;cursor:pointer;margin:0 6px;box-sizing:border-box}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume]{float:left;bottom:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]{background-color:transparent;border:0;box-sizing:content-box;width:32px;height:32px;opacity:.5}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover{opacity:.75}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg{height:24px;position:relative;top:3px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg{margin-left:2px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume]{float:left;position:relative;overflow:hidden;top:6px;width:42px;height:18px;padding:3px 0;-webkit-transition:width .2s ease-out;transition:width .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume]{height:1px;position:relative;top:7px;margin:0 3px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:0;left:0;width:20px;height:20px;opacity:1;-webkit-transition:all .1s ease-out;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]{float:left;width:4px;padding-left:2px;height:12px;opacity:.5;box-shadow:inset 2px 0 0 #fff;-webkit-transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill{box-shadow:inset 2px 0 0 #fff;opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1){padding-left:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover{-webkit-transform:scaleY(1.5);transform:scaleY(1.5)}.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide{width:0;height:12px;top:9px;padding:0}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/media_control/public/media-control.scss\n// module id = 80\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".clappr-flash-playback[data-flash-playback]{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/base_flash_playback/public/flash.scss\n// module id = 81\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"[data-html5-video]{position:absolute;height:100%;width:100%;display:block}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/html5_video/public/style.scss\n// module id = 82\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"[data-html-img]{max-width:100%;max-height:100%}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/html_img/public/style.scss\n// module id = 83\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"[data-no-op]{position:absolute;height:100%;width:100%;text-align:center}[data-no-op] p[data-no-op-msg]{position:absolute;text-align:center;font-size:25px;left:0;right:0;color:#fff;padding:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);max-height:100%;overflow:auto}[data-no-op] canvas[data-no-op-canvas]{background-color:#777;height:100%;width:100%}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/no_op/public/style.scss\n// module id = 84\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".dvr-controls[data-dvr-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.dvr-controls[data-dvr-controls] .live-info{cursor:default;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase}.dvr-controls[data-dvr-controls] .live-info:before{content:\\\"\\\";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#ff0101}.dvr-controls[data-dvr-controls] .live-info.disabled{opacity:.3}.dvr-controls[data-dvr-controls] .live-info.disabled:before{background-color:#fff}.dvr-controls[data-dvr-controls] .live-button{cursor:pointer;outline:none;display:none;border:0;color:#fff;background-color:transparent;height:32px;padding:0;opacity:.7;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase;-webkit-transition:all .1s ease;transition:all .1s ease}.dvr-controls[data-dvr-controls] .live-button:before{content:\\\"\\\";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#fff}.dvr-controls[data-dvr-controls] .live-button:hover{opacity:1;text-shadow:hsla(0,0%,100%,.75) 0 0 5px}.dvr .dvr-controls[data-dvr-controls] .live-info{display:none}.dvr .dvr-controls[data-dvr-controls] .live-button{display:block}.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#005aff}.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#ff0101}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/dvr_controls/public/dvr_controls.scss\n// module id = 85\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".player-poster[data-poster]{display:-webkit-box;display:-moz-box;display:box;display:-moz-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;box-pack:center;-moz-justify-content:center;-ms-justify-content:center;-o-justify-content:center;justify-content:center;-ms-flex-pack:center;-webkit-box-align:center;box-align:center;-moz-align-items:center;-ms-align-items:center;-o-align-items:center;align-items:center;-ms-flex-align:center;position:absolute;height:100%;width:100%;z-index:998;top:0;left:0;background-color:#000;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.player-poster[data-poster].clickable{cursor:pointer}.player-poster[data-poster]:hover .play-wrapper[data-poster]{opacity:1}.player-poster[data-poster] .play-wrapper[data-poster]{width:100%;height:25%;margin:0 auto;opacity:.75;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.player-poster[data-poster] .play-wrapper[data-poster] svg{height:100%}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#fff}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/poster/public/poster.scss\n// module id = 86\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".seek-time[data-seek-time]{position:absolute;white-space:nowrap;height:20px;line-height:20px;font-size:0;left:-100%;bottom:55px;background-color:rgba(2,2,2,.5);z-index:9999;-webkit-transition:opacity .1s ease;transition:opacity .1s ease}.seek-time[data-seek-time].hidden[data-seek-time]{opacity:0}.seek-time[data-seek-time] [data-seek-time]{display:inline-block;color:#fff;font-size:10px;padding-left:7px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]{display:inline-block;color:hsla(0,0%,100%,.5);font-size:10px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]:before{content:\\\"|\\\";margin-right:7px}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/seek_time/public/seek_time.scss\n// module id = 87\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \".spinner-three-bounce[data-spinner]{position:absolute;margin:0 auto;width:70px;text-align:center;z-index:999;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.spinner-three-bounce[data-spinner]>div{width:18px;height:18px;background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner-three-bounce[data-spinner] [data-bounce1]{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner-three-bounce[data-spinner] [data-bounce2]{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/spinner_three_bounce/public/spinner.scss\n// module id = 88\n// module chunks = 0","exports = module.exports = require(\"./../../../../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"[data-watermark]{position:absolute;min-width:70px;max-width:200px;width:12%;text-align:center;z-index:10}[data-watermark] a{outline:none;cursor:pointer}[data-watermark] img{max-width:100%}[data-watermark-bottom-left]{bottom:10px;left:10px}[data-watermark-bottom-right]{bottom:10px;right:42px}[data-watermark-top-left]{top:10px;left:10px}[data-watermark-top-right]{top:10px;right:37px}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/watermark/public/watermark.scss\n// module id = 89\n// module chunks = 0","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Hls = f()}})(function(){var define,module,exports;return (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})({1:[function(_dereq_,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n }\n throw TypeError('Uncaught, unspecified \"error\" event.');\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n},{}],2:[function(_dereq_,module,exports){\nvar bundleFn = arguments[3];\nvar sources = arguments[4];\nvar cache = arguments[5];\n\nvar stringify = JSON.stringify;\n\nmodule.exports = function (fn, options) {\n var wkey;\n var cacheKeys = Object.keys(cache);\n\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n var exp = cache[key].exports;\n // Using babel as a transpiler to use esmodule, the export will always\n // be an object with the default export as a property of it. To ensure\n // the existing api and babel esmodule exports are both supported we\n // check for both\n if (exp === fn || exp && exp.default === fn) {\n wkey = key;\n break;\n }\n }\n\n if (!wkey) {\n wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n var wcache = {};\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n wcache[key] = key;\n }\n sources[wkey] = [\n Function(['require','module','exports'], '(' + fn + ')(self)'),\n wcache\n ];\n }\n var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n\n var scache = {}; scache[wkey] = wkey;\n sources[skey] = [\n Function(['require'], (\n // try to call default if defined to also support babel esmodule\n // exports\n 'var f = require(' + stringify(wkey) + ');' +\n '(f.default ? f.default : f)(self);'\n )),\n scache\n ];\n\n var workerSources = {};\n resolveSources(skey);\n\n function resolveSources(key) {\n workerSources[key] = true;\n\n for (var depPath in sources[key][1]) {\n var depKey = sources[key][1][depPath];\n if (!workerSources[depKey]) {\n resolveSources(depKey);\n }\n }\n }\n\n var src = '(' + bundleFn + ')({'\n + Object.keys(workerSources).map(function (key) {\n return stringify(key) + ':['\n + sources[key][0]\n + ',' + stringify(sources[key][1]) + ']'\n ;\n }).join(',')\n + '},{},[' + stringify(skey) + '])'\n ;\n\n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n\n var blob = new Blob([src], { type: 'text/javascript' });\n if (options && options.bare) { return blob; }\n var workerUrl = URL.createObjectURL(blob);\n var worker = new Worker(workerUrl);\n worker.objectURL = workerUrl;\n return worker;\n};\n\n},{}],3:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _bufferHelper = _dereq_(28);\n\nvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nvar _ewmaBandwidthEstimator = _dereq_(8);\n\nvar _ewmaBandwidthEstimator2 = _interopRequireDefault(_ewmaBandwidthEstimator);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * simple ABR Controller\n * - compute next level based on last fragment bw heuristics\n * - implement an abandon rules triggered if we have less than 2 frag buffered and if computed bw shows that we risk buffer stalling\n */\n\nvar AbrController = function (_EventHandler) {\n _inherits(AbrController, _EventHandler);\n\n function AbrController(hls) {\n _classCallCheck(this, AbrController);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AbrController).call(this, hls, _events2.default.FRAG_LOADING, _events2.default.FRAG_LOADED, _events2.default.FRAG_BUFFERED, _events2.default.ERROR));\n\n _this.lastLoadedFragLevel = 0;\n _this._autoLevelCapping = -1;\n _this._nextAutoLevel = -1;\n _this.hls = hls;\n _this.onCheck = _this.abandonRulesCheck.bind(_this);\n return _this;\n }\n\n _createClass(AbrController, [{\n key: 'destroy',\n value: function destroy() {\n this.clearTimer();\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onFragLoading',\n value: function onFragLoading(data) {\n var frag = data.frag;\n if (frag.type === 'main') {\n if (!this.timer) {\n this.timer = setInterval(this.onCheck, 100);\n }\n // lazy init of bw Estimator, rationale is that we use different params for Live/VoD\n // so we need to wait for stream manifest / playlist type to instantiate it.\n if (!this.bwEstimator) {\n var hls = this.hls,\n level = data.frag.level,\n isLive = hls.levels[level].details.live,\n config = hls.config,\n ewmaFast = void 0,\n ewmaSlow = void 0;\n\n if (isLive) {\n ewmaFast = config.abrEwmaFastLive;\n ewmaSlow = config.abrEwmaSlowLive;\n } else {\n ewmaFast = config.abrEwmaFastVoD;\n ewmaSlow = config.abrEwmaSlowVoD;\n }\n this.bwEstimator = new _ewmaBandwidthEstimator2.default(hls, ewmaSlow, ewmaFast, config.abrEwmaDefaultEstimate);\n }\n this.fragCurrent = frag;\n }\n }\n }, {\n key: 'abandonRulesCheck',\n value: function abandonRulesCheck() {\n /*\n monitor fragment retrieval time...\n we compute expected time of arrival of the complete fragment.\n we compare it to expected time of buffer starvation\n */\n var hls = this.hls,\n v = hls.media,\n frag = this.fragCurrent,\n loader = frag.loader;\n\n // if loader has been destroyed or loading has been aborted, stop timer and return\n if (!loader || loader.stats && loader.stats.aborted) {\n _logger.logger.warn('frag loader destroy or aborted, disarm abandonRules');\n this.clearTimer();\n return;\n }\n var stats = loader.stats;\n /* only monitor frag retrieval time if\n (video not paused OR first fragment being loaded(ready state === HAVE_NOTHING = 0)) AND autoswitching enabled AND not lowest level (=> means that we have several levels) */\n if (v && (!v.paused && v.playbackRate !== 0 || !v.readyState) && frag.autoLevel && frag.level) {\n var requestDelay = performance.now() - stats.trequest,\n playbackRate = Math.abs(v.playbackRate);\n // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n if (requestDelay > 500 * frag.duration / playbackRate) {\n var levels = hls.levels,\n loadRate = Math.max(1, stats.bw ? stats.bw / 8 : stats.loaded * 1000 / requestDelay),\n // byte/s; at least 1 byte/s to avoid division by zero\n // compute expected fragment length using frag duration and level bitrate. also ensure that expected len is gte than already loaded size\n expectedLen = stats.total ? stats.total : Math.max(stats.loaded, Math.round(frag.duration * levels[frag.level].bitrate / 8)),\n pos = v.currentTime,\n fragLoadedDelay = (expectedLen - stats.loaded) / loadRate,\n bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, hls.config.maxBufferHole).end - pos) / playbackRate;\n // consider emergency switch down only if we have less than 2 frag buffered AND\n // time to finish loading current fragment is bigger than buffer starvation delay\n // ie if we risk buffer starvation if bw does not increase quickly\n if (bufferStarvationDelay < 2 * frag.duration / playbackRate && fragLoadedDelay > bufferStarvationDelay) {\n var fragLevelNextLoadedDelay = void 0,\n nextLoadLevel = void 0;\n // lets iterate through lower level and try to find the biggest one that could avoid rebuffering\n // we start from current level - 1 and we step down , until we find a matching level\n for (nextLoadLevel = frag.level - 1; nextLoadLevel >= 0; nextLoadLevel--) {\n // compute time to load next fragment at lower level\n // 0.8 : consider only 80% of current bw to be conservative\n // 8 = bits per byte (bps/Bps)\n fragLevelNextLoadedDelay = frag.duration * levels[nextLoadLevel].bitrate / (8 * 0.8 * loadRate);\n if (fragLevelNextLoadedDelay < bufferStarvationDelay) {\n // we found a lower level that be rebuffering free with current estimated bw !\n break;\n }\n }\n // only emergency switch down if it takes less time to load new fragment at lowest level instead\n // of finishing loading current one ...\n if (fragLevelNextLoadedDelay < fragLoadedDelay) {\n // ensure nextLoadLevel is not negative\n nextLoadLevel = Math.max(0, nextLoadLevel);\n _logger.logger.warn('loading too slow, abort fragment loading and switch to level ' + nextLoadLevel + ':fragLoadedDelay[' + nextLoadLevel + ']<fragLoadedDelay[' + (frag.level - 1) + '];bufferStarvationDelay:' + fragLevelNextLoadedDelay.toFixed(1) + '<' + fragLoadedDelay.toFixed(1) + ':' + bufferStarvationDelay.toFixed(1));\n // force next load level in auto mode\n hls.nextLoadLevel = nextLoadLevel;\n // update bw estimate for this fragment before cancelling load (this will help reducing the bw)\n this.bwEstimator.sample(requestDelay, stats.loaded);\n //abort fragment loading\n loader.abort();\n // stop abandon rules timer\n this.clearTimer();\n hls.trigger(_events2.default.FRAG_LOAD_EMERGENCY_ABORTED, { frag: frag, stats: stats });\n }\n }\n }\n }\n }\n }, {\n key: 'onFragLoaded',\n value: function onFragLoaded(data) {\n var frag = data.frag;\n if (frag.type === 'main') {\n // stop monitoring bw once frag loaded\n this.clearTimer();\n // store level id after successful fragment load\n this.lastLoadedFragLevel = frag.level;\n // reset forced auto level value so that next level will be selected\n this._nextAutoLevel = -1;\n // if fragment has been loaded to perform a bitrate test,\n if (data.frag.bitrateTest) {\n var stats = data.stats;\n stats.tparsed = stats.tbuffered = stats.tload;\n this.onFragBuffered(data);\n }\n }\n }\n }, {\n key: 'onFragBuffered',\n value: function onFragBuffered(data) {\n var stats = data.stats,\n frag = data.frag;\n // only update stats on first frag buffering\n // if same frag is loaded multiple times, it might be in browser cache, and loaded quickly\n // and leading to wrong bw estimation\n // on bitrate test, also only update stats once (if tload = tbuffered == on FRAG_LOADED)\n if (stats.aborted !== true && frag.loadCounter === 1 && frag.type === 'main' && (!frag.bitrateTest || stats.tload === stats.tbuffered)) {\n var fragLoadingProcessingMs = stats.tbuffered - stats.trequest;\n _logger.logger.log('latency/loading/parsing/append/kbps:' + Math.round(stats.tfirst - stats.trequest) + '/' + Math.round(stats.tload - stats.tfirst) + '/' + Math.round(stats.tparsed - stats.tload) + '/' + Math.round(stats.tbuffered - stats.tparsed) + '/' + Math.round(8 * stats.loaded / (stats.tbuffered - stats.trequest)));\n this.bwEstimator.sample(fragLoadingProcessingMs, stats.loaded);\n // if fragment has been loaded to perform a bitrate test, (hls.startLevel = -1), store bitrate test delay duration\n if (frag.bitrateTest) {\n this.bitrateTestDelay = fragLoadingProcessingMs / 1000;\n } else {\n this.bitrateTestDelay = 0;\n }\n }\n }\n }, {\n key: 'onError',\n value: function onError(data) {\n // stop timer in case of frag loading error\n switch (data.details) {\n case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n this.clearTimer();\n break;\n default:\n break;\n }\n }\n }, {\n key: 'clearTimer',\n value: function clearTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n\n /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n\n }, {\n key: 'findBestLevel',\n value: function findBestLevel(currentLevel, currentFragDuration, currentBw, minAutoLevel, maxAutoLevel, maxFetchDuration, bwFactor, bwUpFactor, levels) {\n for (var i = maxAutoLevel; i >= minAutoLevel; i--) {\n var levelInfo = levels[i],\n levelDetails = levelInfo.details,\n avgDuration = levelDetails ? levelDetails.totalduration / levelDetails.fragments.length : currentFragDuration,\n adjustedbw = void 0;\n // follow algorithm captured from stagefright :\n // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp\n // Pick the highest bandwidth stream below or equal to estimated bandwidth.\n // consider only 80% of the available bandwidth, but if we are switching up,\n // be even more conservative (70%) to avoid overestimating and immediately\n // switching back.\n if (i <= currentLevel) {\n adjustedbw = bwFactor * currentBw;\n } else {\n adjustedbw = bwUpFactor * currentBw;\n }\n var bitrate = levels[i].bitrate,\n fetchDuration = bitrate * avgDuration / adjustedbw;\n\n _logger.logger.trace('level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: ' + i + '/' + Math.round(adjustedbw) + '/' + bitrate + '/' + avgDuration + '/' + maxFetchDuration + '/' + fetchDuration);\n // if adjusted bw is greater than level bitrate AND\n if (adjustedbw > bitrate && (\n // fragment fetchDuration unknown or fragment fetchDuration less than max allowed fetch duration, then this level matches\n !fetchDuration || fetchDuration < maxFetchDuration)) {\n // as we are looping from highest to lowest, this will return the best achievable quality level\n\n return i;\n }\n }\n // not enough time budget even with quality level 0 ... rebuffering might happen\n return -1;\n }\n }, {\n key: 'autoLevelCapping',\n get: function get() {\n return this._autoLevelCapping;\n }\n\n /** set the capping/max level value that could be used by automatic level selection algorithm **/\n ,\n set: function set(newLevel) {\n this._autoLevelCapping = newLevel;\n }\n }, {\n key: 'nextAutoLevel',\n get: function get() {\n var nextAutoLevel = this._nextAutoLevel,\n bwEstimator = this.bwEstimator,\n hls = this.hls,\n levels = hls.levels,\n minAutoBitrate = hls.config.minAutoBitrate;\n // in case next auto level has been forced, and bw not available or not reliable\n if (nextAutoLevel !== -1 && (!bwEstimator || !bwEstimator.canEstimate())) {\n // cap next auto level by max auto level\n return Math.min(nextAutoLevel, this.maxAutoLevel);\n }\n // compute next level using ABR logic\n var nextABRAutoLevel = this.nextABRAutoLevel;\n if (nextAutoLevel !== -1) {\n // nextAutoLevel is defined, use it to cap ABR computed quality level\n nextABRAutoLevel = Math.min(nextAutoLevel, nextABRAutoLevel);\n }\n if (minAutoBitrate !== undefined) {\n while (levels[nextABRAutoLevel].bitrate < minAutoBitrate) {\n nextABRAutoLevel++;\n }\n }\n return nextABRAutoLevel;\n },\n set: function set(nextLevel) {\n this._nextAutoLevel = nextLevel;\n }\n }, {\n key: 'minAutoLevel',\n get: function get() {\n var hls = this.hls,\n levels = hls.levels,\n minAutoBitrate = hls.config.minAutoBitrate;\n for (var i = 0; i < levels.length; i++) {\n if (levels[i].bitrate > minAutoBitrate) {\n return i;\n }\n }\n return 0;\n }\n }, {\n key: 'maxAutoLevel',\n get: function get() {\n var levels = this.hls.levels,\n autoLevelCapping = this._autoLevelCapping,\n maxAutoLevel;\n if (autoLevelCapping === -1 && levels && levels.length) {\n maxAutoLevel = levels.length - 1;\n } else {\n maxAutoLevel = autoLevelCapping;\n }\n return maxAutoLevel;\n }\n }, {\n key: 'nextABRAutoLevel',\n get: function get() {\n var hls = this.hls,\n maxAutoLevel = this.maxAutoLevel,\n levels = hls.levels,\n config = hls.config,\n minAutoLevel = this.minAutoLevel;\n var v = hls.media,\n currentLevel = this.lastLoadedFragLevel,\n currentFragDuration = this.fragCurrent ? this.fragCurrent.duration : 0,\n pos = v ? v.currentTime : 0,\n\n // playbackRate is the absolute value of the playback rate; if v.playbackRate is 0, we use 1 to load as\n // if we're playing back at the normal rate.\n playbackRate = v && v.playbackRate !== 0 ? Math.abs(v.playbackRate) : 1.0,\n avgbw = this.bwEstimator ? this.bwEstimator.getEstimate() : config.abrEwmaDefaultEstimate,\n\n // bufferStarvationDelay is the wall-clock time left until the playback buffer is exhausted.\n bufferStarvationDelay = (_bufferHelper2.default.bufferInfo(v, pos, config.maxBufferHole).end - pos) / playbackRate;\n\n // First, look to see if we can find a level matching with our avg bandwidth AND that could also guarantee no rebuffering at all\n var bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, config.abrBandWidthFactor, config.abrBandWidthUpFactor, levels);\n if (bestLevel >= 0) {\n return bestLevel;\n } else {\n _logger.logger.trace('rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering');\n // not possible to get rid of rebuffering ... let's try to find level that will guarantee less than maxStarvationDelay of rebuffering\n // if no matching level found, logic will return 0\n var maxStarvationDelay = config.maxStarvationDelay,\n bwFactor = config.abrBandWidthFactor,\n bwUpFactor = config.abrBandWidthUpFactor;\n if (bufferStarvationDelay === 0) {\n // in case buffer is empty, let's check if previous fragment was loaded to perform a bitrate test\n var bitrateTestDelay = this.bitrateTestDelay;\n if (bitrateTestDelay) {\n // if it is the case, then we need to adjust our max starvation delay using maxLoadingDelay config value\n // max video loading delay used in automatic start level selection :\n // in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level +\n // the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )\n maxStarvationDelay = config.maxLoadingDelay - bitrateTestDelay;\n _logger.logger.trace('bitrate test took ' + Math.round(1000 * bitrateTestDelay) + 'ms, set first fragment max fetchDuration to ' + Math.round(1000 * maxStarvationDelay) + ' ms');\n // don't use conservative factor on bitrate test\n bwFactor = bwUpFactor = 1;\n }\n }\n bestLevel = this.findBestLevel(currentLevel, currentFragDuration, avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay + maxStarvationDelay, bwFactor, bwUpFactor, levels);\n return Math.max(bestLevel, 0);\n }\n }\n }]);\n\n return AbrController;\n}(_eventHandler2.default);\n\nexports.default = AbrController;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"43\":43,\"8\":8}],4:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _binarySearch = _dereq_(39);\n\nvar _binarySearch2 = _interopRequireDefault(_binarySearch);\n\nvar _bufferHelper = _dereq_(28);\n\nvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\nvar _demuxer = _dereq_(20);\n\nvar _demuxer2 = _interopRequireDefault(_demuxer);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _levelHelper = _dereq_(29);\n\nvar _levelHelper2 = _interopRequireDefault(_levelHelper);\n\nvar _timeRanges = _dereq_(45);\n\nvar _timeRanges2 = _interopRequireDefault(_timeRanges);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Audio Stream Controller\n */\n\nvar State = {\n STOPPED: 'STOPPED',\n STARTING: 'STARTING',\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n KEY_LOADING: 'KEY_LOADING',\n FRAG_LOADING: 'FRAG_LOADING',\n FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n WAITING_TRACK: 'WAITING_TRACK',\n PARSING: 'PARSING',\n PARSED: 'PARSED',\n ENDED: 'ENDED',\n ERROR: 'ERROR'\n};\n\nvar AudioStreamController = function (_EventHandler) {\n _inherits(AudioStreamController, _EventHandler);\n\n function AudioStreamController(hls) {\n _classCallCheck(this, AudioStreamController);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(AudioStreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.AUDIO_TRACKS_UPDATED, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.AUDIO_TRACK_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));\n\n _this.config = hls.config;\n _this.audioCodecSwap = false;\n _this.ticks = 0;\n _this.ontick = _this.tick.bind(_this);\n return _this;\n }\n\n _createClass(AudioStreamController, [{\n key: 'destroy',\n value: function destroy() {\n this.stopLoad();\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n _eventHandler2.default.prototype.destroy.call(this);\n this.state = State.STOPPED;\n }\n }, {\n key: 'startLoad',\n value: function startLoad(startPosition) {\n if (this.tracks) {\n var media = this.media,\n lastCurrentTime = this.lastCurrentTime;\n this.stopLoad();\n if (!this.timer) {\n this.timer = setInterval(this.ontick, 100);\n }\n this.fragLoadError = 0;\n if (media && lastCurrentTime) {\n _logger.logger.log('configure startPosition @' + lastCurrentTime);\n this.state = State.IDLE;\n } else {\n this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n this.state = State.STARTING;\n }\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n this.tick();\n } else {\n this.startPosition = startPosition;\n this.state = State.STOPPED;\n }\n }\n }, {\n key: 'stopLoad',\n value: function stopLoad() {\n var frag = this.fragCurrent;\n if (frag) {\n if (frag.loader) {\n frag.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n this.state = State.STOPPED;\n }\n }, {\n key: 'tick',\n value: function tick() {\n this.ticks++;\n if (this.ticks === 1) {\n this.doTick();\n if (this.ticks > 1) {\n setTimeout(this.tick, 1);\n }\n this.ticks = 0;\n }\n }\n }, {\n key: 'doTick',\n value: function doTick() {\n var pos,\n track,\n trackDetails,\n hls = this.hls,\n config = hls.config;\n //logger.log('audioStream:' + this.state);\n switch (this.state) {\n case State.ERROR:\n //don't do anything in error state to avoid breaking further ...\n case State.PAUSED:\n //don't do anything in paused state either ...\n break;\n case State.STARTING:\n this.state = State.WAITING_TRACK;\n this.loadedmetadata = false;\n break;\n case State.IDLE:\n // if video not attached AND\n // start fragment already requested OR start frag prefetch disable\n // exit loop\n // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n if (!this.media && (this.startFragRequested || !config.startFragPrefetch)) {\n break;\n }\n // determine next candidate fragment to be loaded, based on current position and\n // end of buffer position\n // if we have not yet loaded any fragment, start loading from start position\n if (this.loadedmetadata) {\n pos = this.media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n }\n var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n var bufferInfo = _bufferHelper2.default.bufferInfo(media, pos, config.maxBufferHole),\n bufferLen = bufferInfo.len,\n bufferEnd = bufferInfo.end,\n fragPrevious = this.fragPrevious,\n maxBufLen = config.maxMaxBufferLength;\n\n // if buffer length is less than maxBufLen try to load a new fragment\n if (bufferLen < maxBufLen && this.trackId < this.tracks.length) {\n trackDetails = this.tracks[this.trackId].details;\n // if track info not retrieved yet, switch state and wait for track retrieval\n if (typeof trackDetails === 'undefined') {\n this.state = State.WAITING_TRACK;\n break;\n }\n\n // we just got done loading the final fragment, check if we need to finalize media stream\n if (!trackDetails.live && fragPrevious && fragPrevious.sn === trackDetails.endSN) {\n // if we are not seeking or if we are seeking but everything (almost) til the end is buffered, let's signal eos\n // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching\n // between different renditions. using half frag duration should help cope with these cases.\n if (!this.media.seeking || this.media.duration - bufferEnd < fragPrevious.duration / 2) {\n // Finalize the media stream\n this.hls.trigger(_events2.default.BUFFER_EOS, { type: 'audio' });\n this.state = State.ENDED;\n break;\n }\n }\n\n // find fragment index, contiguous with end of buffer position\n var fragments = trackDetails.fragments,\n fragLen = fragments.length,\n start = fragments[0].start,\n end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n frag = void 0;\n\n // if bufferEnd before start of playlist, load first fragment\n if (bufferEnd < start) {\n frag = fragments[0];\n } else {\n (function () {\n var foundFrag = void 0;\n var maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n if (bufferEnd < end) {\n if (bufferEnd > end - maxFragLookUpTolerance) {\n maxFragLookUpTolerance = 0;\n }\n foundFrag = _binarySearch2.default.search(fragments, function (candidate) {\n // offset should be within fragment boundary - config.maxFragLookUpTolerance\n // this is to cope with situations like\n // bufferEnd = 9.991\n // frag[Ø] : [0,10]\n // frag[1] : [10,20]\n // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n // frag start frag start+duration\n // |-----------------------------|\n // <---> <--->\n // ...--------><-----------------------------><---------....\n // previous frag matching fragment next frag\n // return -1 return 0 return 1\n //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {\n return 1;\n } else if (candidate.start - maxFragLookUpTolerance > bufferEnd) {\n return -1;\n }\n return 0;\n });\n } else {\n // reach end of playlist\n foundFrag = fragments[fragLen - 1];\n }\n if (foundFrag) {\n frag = foundFrag;\n start = foundFrag.start;\n //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n if (frag.sn < trackDetails.endSN) {\n frag = fragments[frag.sn + 1 - trackDetails.startSN];\n _logger.logger.log('SN just loaded, load next one: ' + frag.sn);\n } else {\n frag = null;\n }\n }\n }\n })();\n }\n if (frag) {\n //logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {\n _logger.logger.log('Loading key for ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId);\n this.state = State.KEY_LOADING;\n hls.trigger(_events2.default.KEY_LOADING, { frag: frag });\n } else {\n _logger.logger.log('Loading ' + frag.sn + ' of [' + trackDetails.startSN + ' ,' + trackDetails.endSN + '],track ' + this.trackId + ', currentTime:' + pos + ',bufferEnd:' + bufferEnd.toFixed(3));\n // ensure that we are not reloading the same fragments in loop ...\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx++;\n } else {\n this.fragLoadIdx = 0;\n }\n if (frag.loadCounter) {\n frag.loadCounter++;\n var maxThreshold = config.fragLoadingLoopThreshold;\n // if this frag has already been loaded 3 times, and if it has been reloaded recently\n if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });\n return;\n }\n } else {\n frag.loadCounter = 1;\n }\n frag.loadIdx = this.fragLoadIdx;\n this.fragCurrent = frag;\n this.startFragRequested = true;\n hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });\n this.state = State.FRAG_LOADING;\n }\n }\n }\n break;\n case State.WAITING_TRACK:\n track = this.tracks[this.trackId];\n // check if playlist is already loaded\n if (track && track.details) {\n this.state = State.IDLE;\n }\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = performance.now();\n var retryDate = this.retryDate;\n media = this.media;\n var isSeeking = media && media.seeking;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if (!retryDate || now >= retryDate || isSeeking) {\n _logger.logger.log('audioStreamController: retryDate reached, switch back to IDLE state');\n this.state = State.IDLE;\n }\n break;\n case State.STOPPED:\n case State.FRAG_LOADING:\n case State.PARSING:\n case State.PARSED:\n case State.ENDED:\n break;\n default:\n break;\n }\n }\n }, {\n key: 'onMediaAttached',\n value: function onMediaAttached(data) {\n var media = this.media = this.mediaBuffer = data.media;\n this.onvseeking = this.onMediaSeeking.bind(this);\n this.onvended = this.onMediaEnded.bind(this);\n media.addEventListener('seeking', this.onvseeking);\n media.addEventListener('ended', this.onvended);\n var config = this.config;\n if (this.tracks && config.autoStartLoad) {\n this.startLoad(config.startPosition);\n }\n }\n }, {\n key: 'onMediaDetaching',\n value: function onMediaDetaching() {\n var media = this.media;\n if (media && media.ended) {\n _logger.logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n var tracks = this.tracks;\n if (tracks) {\n // reset fragment load counter\n tracks.forEach(function (track) {\n if (track.details) {\n track.details.fragments.forEach(function (fragment) {\n fragment.loadCounter = undefined;\n });\n }\n });\n }\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvended = null;\n }\n this.media = null;\n this.loadedmetadata = false;\n this.stopLoad();\n }\n }, {\n key: 'onMediaSeeking',\n value: function onMediaSeeking() {\n if (this.state === State.ENDED) {\n // switch to IDLE state to check for potential new fragment\n this.state = State.IDLE;\n }\n if (this.media) {\n this.lastCurrentTime = this.media.currentTime;\n }\n // avoid reporting fragment loop loading error in case user is seeking several times on same position\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n }\n // tick to speed up processing\n this.tick();\n }\n }, {\n key: 'onMediaEnded',\n value: function onMediaEnded() {\n // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n this.startPosition = this.lastCurrentTime = 0;\n }\n }, {\n key: 'onAudioTracksUpdated',\n value: function onAudioTracksUpdated(data) {\n _logger.logger.log('audio tracks updated');\n this.tracks = data.audioTracks;\n }\n }, {\n key: 'onAudioTrackSwitch',\n value: function onAudioTrackSwitch(data) {\n // if any URL found on new audio track, it is an alternate audio track\n var altAudio = !!data.url;\n this.trackId = data.id;\n this.state = State.IDLE;\n\n this.fragCurrent = null;\n this.state = State.PAUSED;\n // destroy useless demuxer when switching audio to main\n if (!altAudio) {\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n } else {\n // switching to audio track, start timer if not already started\n if (!this.timer) {\n this.timer = setInterval(this.ontick, 100);\n }\n }\n // flush audio source buffer\n this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY, type: 'audio' });\n this.tick();\n }\n }, {\n key: 'onAudioTrackLoaded',\n value: function onAudioTrackLoaded(data) {\n var details = data.details,\n trackId = data.id,\n track = this.tracks[trackId],\n duration = details.totalduration;\n\n _logger.logger.log('track ' + trackId + ' loaded [' + details.startSN + ',' + details.endSN + '],duration:' + duration);\n details.PTSKnown = false;\n track.details = details;\n\n // compute start position\n if (!this.startFragRequested) {\n // compute start position if set to -1. use it straight away if value is defined\n if (this.startPosition === -1) {\n // first, check if start time offset has been set in playlist, if yes, use this value\n var startTimeOffset = details.startTimeOffset;\n if (!isNaN(startTimeOffset)) {\n _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);\n this.startPosition = startTimeOffset;\n } else {\n this.startPosition = 0;\n }\n }\n this.nextLoadPosition = this.startPosition;\n }\n // only switch batck to IDLE state if we were waiting for track to start downloading a new fragment\n if (this.state === State.WAITING_TRACK) {\n this.state = State.IDLE;\n }\n //trigger handler right now\n this.tick();\n }\n }, {\n key: 'onKeyLoaded',\n value: function onKeyLoaded() {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n }, {\n key: 'onFragLoaded',\n value: function onFragLoaded(data) {\n var fragCurrent = this.fragCurrent;\n if (this.state === State.FRAG_LOADING && fragCurrent && data.frag.type === 'audio' && data.frag.level === fragCurrent.level && data.frag.sn === fragCurrent.sn) {\n this.state = State.PARSING;\n // transmux the MPEG-TS data to ISO-BMFF segments\n this.stats = data.stats;\n var track = this.tracks[this.trackId],\n details = track.details,\n duration = details.totalduration,\n start = fragCurrent.start,\n trackId = fragCurrent.level,\n sn = fragCurrent.sn,\n audioCodec = this.config.defaultAudioCodec || track.audioCodec;\n this.pendingAppending = 0;\n if (!this.demuxer) {\n this.demuxer = new _demuxer2.default(this.hls, 'audio');\n }\n _logger.logger.log('Demuxing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],track ' + trackId);\n // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n var accurateTimeOffset = details.PTSKnown || !details.live;\n this.demuxer.push(data.payload, audioCodec, null, start, fragCurrent.cc, trackId, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);\n }\n this.fragLoadError = 0;\n }\n }, {\n key: 'onFragParsingInitSegment',\n value: function onFragParsingInitSegment(data) {\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n var tracks = data.tracks,\n track = void 0;\n\n // include levelCodec in audio and video tracks\n track = tracks.audio;\n if (track) {\n track.levelCodec = 'mp4a.40.2';\n track.id = data.id;\n this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);\n _logger.logger.log('audio track:audio,container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');\n var initSegment = track.initSegment;\n if (initSegment) {\n this.pendingAppending++;\n this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: 'audio', data: initSegment, parent: 'audio', content: 'initSegment' });\n }\n //trigger handler right now\n this.tick();\n }\n }\n }\n }, {\n key: 'onFragParsingData',\n value: function onFragParsingData(data) {\n var _this2 = this;\n\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n var track = this.tracks[this.trackId],\n frag = this.fragCurrent;\n\n _logger.logger.log('parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb);\n _levelHelper2.default.updateFragPTSDTS(track.details, frag.sn, data.startPTS, data.endPTS);\n\n [data.data1, data.data2].forEach(function (buffer) {\n if (buffer) {\n _this2.pendingAppending++;\n _this2.hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'audio', content: 'data' });\n }\n });\n this.nextLoadPosition = data.endPTS;\n //trigger handler right now\n this.tick();\n }\n }\n }, {\n key: 'onFragParsed',\n value: function onFragParsed(data) {\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'audio' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n this.stats.tparsed = performance.now();\n this.state = State.PARSED;\n this._checkAppendedParsed();\n }\n }\n }, {\n key: 'onBufferCreated',\n value: function onBufferCreated(data) {\n var audioTrack = data.tracks.audio;\n if (audioTrack) {\n this.mediaBuffer = audioTrack.buffer;\n this.loadedmetadata = true;\n }\n }\n }, {\n key: 'onBufferAppended',\n value: function onBufferAppended(data) {\n if (data.parent === 'audio') {\n switch (this.state) {\n case State.PARSING:\n case State.PARSED:\n this.pendingAppending--;\n this._checkAppendedParsed();\n break;\n default:\n break;\n }\n }\n }\n }, {\n key: '_checkAppendedParsed',\n value: function _checkAppendedParsed() {\n //trigger handler right now\n if (this.state === State.PARSED && this.pendingAppending === 0) {\n var frag = this.fragCurrent,\n stats = this.stats;\n if (frag) {\n this.fragPrevious = frag;\n stats.tbuffered = performance.now();\n this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'audio' });\n var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n _logger.logger.log('audio buffered : ' + _timeRanges2.default.toString(media.buffered));\n this.state = State.IDLE;\n }\n this.tick();\n }\n }\n }, {\n key: 'onError',\n value: function onError(data) {\n var frag = data.frag;\n // don't handle frag error not related to audio fragment\n if (frag && frag.type !== 'audio') {\n return;\n }\n switch (data.details) {\n case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n if (!data.fatal) {\n var loadError = this.fragLoadError;\n if (loadError) {\n loadError++;\n } else {\n loadError = 1;\n }\n var config = this.config;\n if (loadError <= config.fragLoadingMaxRetry) {\n this.fragLoadError = loadError;\n // reset load counter to avoid frag loop loading error\n frag.loadCounter = 0;\n // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n _logger.logger.warn('audioStreamController: frag loading failed, retry in ' + delay + ' ms');\n this.retryDate = performance.now() + delay;\n // retry loading state\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n _logger.logger.error('audioStreamController: ' + data.details + ' reaches max retry, redispatch as fatal ...');\n // redispatch same error but with fatal set to true\n data.fatal = true;\n this.hls.trigger(_events2.default.ERROR, data);\n this.state = State.ERROR;\n }\n }\n break;\n case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:\n case _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:\n case _errors.ErrorDetails.KEY_LOAD_ERROR:\n case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n if (this.state !== State.ERROR) {\n // if fatal error, stop processing, otherwise move to IDLE to retry loading\n this.state = data.fatal ? State.ERROR : State.IDLE;\n _logger.logger.warn('audioStreamController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');\n }\n break;\n default:\n break;\n }\n }\n }, {\n key: 'onBufferFlushed',\n value: function onBufferFlushed() {\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n this.tick();\n }\n }]);\n\n return AudioStreamController;\n}(_eventHandler2.default);\n\nexports.default = AudioStreamController;\n\n},{\"20\":20,\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"29\":29,\"39\":39,\"43\":43,\"45\":45}],5:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * audio track controller\n */\n\nvar AudioTrackController = function (_EventHandler) {\n _inherits(AudioTrackController, _EventHandler);\n\n function AudioTrackController(hls) {\n _classCallCheck(this, AudioTrackController);\n\n return _possibleConstructorReturn(this, Object.getPrototypeOf(AudioTrackController).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_LOADED, _events2.default.AUDIO_TRACK_LOADED));\n }\n\n _createClass(AudioTrackController, [{\n key: 'destroy',\n value: function destroy() {\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onManifestLoading',\n value: function onManifestLoading() {\n // reset audio tracks on manifest loading\n this.tracks = [];\n this.trackId = -1;\n }\n }, {\n key: 'onManifestLoaded',\n value: function onManifestLoaded(data) {\n var _this2 = this;\n\n var tracks = data.audioTracks || [];\n var defaultFound = false;\n this.tracks = tracks;\n this.hls.trigger(_events2.default.AUDIO_TRACKS_UPDATED, { audioTracks: tracks });\n // loop through available audio tracks and autoselect default if needed\n var id = 0;\n tracks.forEach(function (track) {\n if (track.default) {\n _this2.audioTrack = id;\n defaultFound = true;\n return;\n }\n id++;\n });\n if (defaultFound === false && tracks.length) {\n _logger.logger.log('no default audio track defined, use first audio track as default');\n this.audioTrack = 0;\n }\n }\n }, {\n key: 'onAudioTrackLoaded',\n value: function onAudioTrackLoaded(data) {\n if (data.id < this.tracks.length) {\n _logger.logger.log('audioTrack ' + data.id + ' loaded');\n this.tracks[data.id].details = data.details;\n // check if current playlist is a live playlist\n if (data.details.live && !this.timer) {\n // if live playlist we will have to reload it periodically\n // set reload period to playlist target duration\n this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);\n }\n if (!data.details.live && this.timer) {\n // playlist is not live and timer is armed : stopping it\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n }\n\n /** get alternate audio tracks list from playlist **/\n\n }, {\n key: 'setAudioTrackInternal',\n value: function setAudioTrackInternal(newId) {\n // check if level idx is valid\n if (newId >= 0 && newId < this.tracks.length) {\n // stopping live reloading timer if any\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n this.trackId = newId;\n _logger.logger.log('switching to audioTrack ' + newId);\n var audioTrack = this.tracks[newId],\n type = audioTrack.type,\n url = audioTrack.url;\n this.hls.trigger(_events2.default.AUDIO_TRACK_SWITCH, { id: newId, type: type, url: url });\n // check if we need to load playlist for this audio Track\n var details = audioTrack.details;\n if (url && (details === undefined || details.live === true)) {\n // track not retrieved yet, or live playlist we need to (re)load it\n _logger.logger.log('(re)loading playlist for audioTrack ' + newId);\n this.hls.trigger(_events2.default.AUDIO_TRACK_LOADING, { url: url, id: newId });\n }\n }\n }\n }, {\n key: 'audioTracks',\n get: function get() {\n return this.tracks;\n }\n\n /** get index of the selected audio track (index in audio track lists) **/\n\n }, {\n key: 'audioTrack',\n get: function get() {\n return this.trackId;\n }\n\n /** select an audio track, based on its index in audio track lists**/\n ,\n set: function set(audioTrackId) {\n if (this.trackId !== audioTrackId || this.tracks[audioTrackId].details === undefined) {\n this.setAudioTrackInternal(audioTrackId);\n }\n }\n }]);\n\n return AudioTrackController;\n}(_eventHandler2.default);\n\nexports.default = AudioTrackController;\n\n},{\"25\":25,\"26\":26,\"43\":43}],6:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _logger = _dereq_(43);\n\nvar _errors = _dereq_(24);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Buffer Controller\n */\n\nvar BufferController = function (_EventHandler) {\n _inherits(BufferController, _EventHandler);\n\n function BufferController(hls) {\n _classCallCheck(this, BufferController);\n\n // the value that we have set mediasource.duration to\n // (the actual duration may be tweaked slighly by the browser)\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(BufferController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_PARSED, _events2.default.BUFFER_RESET, _events2.default.BUFFER_APPENDING, _events2.default.BUFFER_CODECS, _events2.default.BUFFER_EOS, _events2.default.BUFFER_FLUSHING, _events2.default.LEVEL_UPDATED));\n\n _this._msDuration = null;\n // the value that we want to set mediaSource.duration to\n _this._levelDuration = null;\n\n // Source Buffer listeners\n _this.onsbue = _this.onSBUpdateEnd.bind(_this);\n _this.onsbe = _this.onSBUpdateError.bind(_this);\n _this.pendingTracks = {};\n return _this;\n }\n\n _createClass(BufferController, [{\n key: 'destroy',\n value: function destroy() {\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onManifestParsed',\n value: function onManifestParsed(data) {\n var audioExpected = data.audio,\n videoExpected = data.video,\n sourceBufferNb = 0;\n // in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller\n // sourcebuffers will be created all at once when the expected nb of tracks will be reached\n // in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller\n // it will contain the expected nb of source buffers, no need to compute it\n if (data.altAudio && (audioExpected || videoExpected)) {\n sourceBufferNb = (audioExpected ? 1 : 0) + (videoExpected ? 1 : 0);\n _logger.logger.log(sourceBufferNb + ' sourceBuffer(s) expected');\n }\n this.sourceBufferNb = sourceBufferNb;\n }\n }, {\n key: 'onMediaAttaching',\n value: function onMediaAttaching(data) {\n var media = this.media = data.media;\n if (media) {\n // setup the media source\n var ms = this.mediaSource = new MediaSource();\n //Media Source listeners\n this.onmso = this.onMediaSourceOpen.bind(this);\n this.onmse = this.onMediaSourceEnded.bind(this);\n this.onmsc = this.onMediaSourceClose.bind(this);\n ms.addEventListener('sourceopen', this.onmso);\n ms.addEventListener('sourceended', this.onmse);\n ms.addEventListener('sourceclose', this.onmsc);\n // link video and media Source\n media.src = URL.createObjectURL(ms);\n }\n }\n }, {\n key: 'onMediaDetaching',\n value: function onMediaDetaching() {\n _logger.logger.log('media source detaching');\n var ms = this.mediaSource;\n if (ms) {\n if (ms.readyState === 'open') {\n try {\n // endOfStream could trigger exception if any sourcebuffer is in updating state\n // we don't really care about checking sourcebuffer state here,\n // as we are anyway detaching the MediaSource\n // let's just avoid this exception to propagate\n ms.endOfStream();\n } catch (err) {\n _logger.logger.warn('onMediaDetaching:' + err.message + ' while calling endOfStream');\n }\n }\n ms.removeEventListener('sourceopen', this.onmso);\n ms.removeEventListener('sourceended', this.onmse);\n ms.removeEventListener('sourceclose', this.onmsc);\n\n // Detach properly the MediaSource from the HTMLMediaElement as\n // suggested in https://github.com/w3c/media-source/issues/53.\n if (this.media) {\n this.media.removeAttribute('src');\n this.media.load();\n }\n\n this.mediaSource = null;\n this.media = null;\n this.pendingTracks = {};\n this.sourceBuffer = {};\n this.flushRange = [];\n this.segments = [];\n this.appended = 0;\n }\n this.onmso = this.onmse = this.onmsc = null;\n this.hls.trigger(_events2.default.MEDIA_DETACHED);\n }\n }, {\n key: 'onMediaSourceOpen',\n value: function onMediaSourceOpen() {\n _logger.logger.log('media source opened');\n this.hls.trigger(_events2.default.MEDIA_ATTACHED, { media: this.media });\n var mediaSource = this.mediaSource;\n if (mediaSource) {\n // once received, don't listen anymore to sourceopen event\n mediaSource.removeEventListener('sourceopen', this.onmso);\n }\n this.checkPendingTracks();\n }\n }, {\n key: 'checkPendingTracks',\n value: function checkPendingTracks() {\n // if any buffer codecs pending, check if we have enough to create sourceBuffers\n var pendingTracks = this.pendingTracks,\n pendingTracksNb = Object.keys(pendingTracks).length;\n // if any pending tracks and (if nb of pending tracks gt or equal than expected nb or if unknown expected nb)\n if (pendingTracksNb && (this.sourceBufferNb <= pendingTracksNb || this.sourceBufferNb === 0)) {\n // ok, let's create them now !\n this.createSourceBuffers(pendingTracks);\n this.pendingTracks = {};\n // append any pending segments now !\n this.doAppending();\n }\n }\n }, {\n key: 'onMediaSourceClose',\n value: function onMediaSourceClose() {\n _logger.logger.log('media source closed');\n }\n }, {\n key: 'onMediaSourceEnded',\n value: function onMediaSourceEnded() {\n _logger.logger.log('media source ended');\n }\n }, {\n key: 'onSBUpdateEnd',\n value: function onSBUpdateEnd() {\n\n if (this._needsFlush) {\n this.doFlush();\n }\n\n if (this._needsEos) {\n this.checkEos();\n }\n this.appending = false;\n this.hls.trigger(_events2.default.BUFFER_APPENDED, { parent: this.parent });\n\n // don't append in flushing mode\n if (!this._needsFlush) {\n this.doAppending();\n }\n\n this.updateMediaElementDuration();\n }\n }, {\n key: 'onSBUpdateError',\n value: function onSBUpdateError(event) {\n _logger.logger.error('sourceBuffer error:' + event);\n // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n // this error might not always be fatal (it is fatal if decode error is set, in that case\n // it will be followed by a mediaElement error ...)\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false });\n // we don't need to do more than that, as accordin to the spec, updateend will be fired just after\n }\n }, {\n key: 'onBufferReset',\n value: function onBufferReset() {\n var sourceBuffer = this.sourceBuffer;\n for (var type in sourceBuffer) {\n var sb = sourceBuffer[type];\n try {\n this.mediaSource.removeSourceBuffer(sb);\n sb.removeEventListener('updateend', this.onsbue);\n sb.removeEventListener('error', this.onsbe);\n } catch (err) {}\n }\n this.sourceBuffer = {};\n this.flushRange = [];\n this.segments = [];\n this.appended = 0;\n }\n }, {\n key: 'onBufferCodecs',\n value: function onBufferCodecs(tracks) {\n // if source buffer(s) not created yet, appended buffer tracks in this.pendingTracks\n // if sourcebuffers already created, do nothing ...\n if (Object.keys(this.sourceBuffer).length === 0) {\n for (var trackName in tracks) {\n this.pendingTracks[trackName] = tracks[trackName];\n }\n var mediaSource = this.mediaSource;\n if (mediaSource && mediaSource.readyState === 'open') {\n // try to create sourcebuffers if mediasource opened\n this.checkPendingTracks();\n }\n }\n }\n }, {\n key: 'createSourceBuffers',\n value: function createSourceBuffers(tracks) {\n var sourceBuffer = this.sourceBuffer,\n mediaSource = this.mediaSource;\n\n for (var trackName in tracks) {\n if (!sourceBuffer[trackName]) {\n var track = tracks[trackName];\n // use levelCodec as first priority\n var codec = track.levelCodec || track.codec;\n var mimeType = track.container + ';codecs=' + codec;\n _logger.logger.log('creating sourceBuffer(' + mimeType + ')');\n try {\n var sb = sourceBuffer[trackName] = mediaSource.addSourceBuffer(mimeType);\n sb.addEventListener('updateend', this.onsbue);\n sb.addEventListener('error', this.onsbe);\n track.buffer = sb;\n } catch (err) {\n _logger.logger.error('error while trying to add sourceBuffer:' + err.message);\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_ADD_CODEC_ERROR, fatal: false, err: err, mimeType: mimeType });\n }\n }\n }\n this.hls.trigger(_events2.default.BUFFER_CREATED, { tracks: tracks });\n }\n }, {\n key: 'onBufferAppending',\n value: function onBufferAppending(data) {\n if (!this._needsFlush) {\n if (!this.segments) {\n this.segments = [data];\n } else {\n this.segments.push(data);\n }\n this.doAppending();\n }\n }\n }, {\n key: 'onBufferAppendFail',\n value: function onBufferAppendFail(data) {\n _logger.logger.error('sourceBuffer error:' + data.event);\n // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n // this error might not always be fatal (it is fatal if decode error is set, in that case\n // it will be followed by a mediaElement error ...)\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false, frag: this.fragCurrent });\n }\n\n // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()\n\n }, {\n key: 'onBufferEos',\n value: function onBufferEos(data) {\n var sb = this.sourceBuffer;\n var dataType = data.type;\n for (var type in sb) {\n if (!dataType || type === dataType) {\n if (!sb[type].ended) {\n sb[type].ended = true;\n _logger.logger.log(type + ' sourceBuffer now EOS');\n }\n }\n }\n this.checkEos();\n }\n\n // if all source buffers are marked as ended, signal endOfStream() to MediaSource.\n\n }, {\n key: 'checkEos',\n value: function checkEos() {\n var sb = this.sourceBuffer,\n mediaSource = this.mediaSource;\n if (!mediaSource || mediaSource.readyState !== 'open') {\n this._needsEos = false;\n return;\n }\n for (var type in sb) {\n if (!sb[type].ended) {\n return;\n }\n if (sb[type].updating) {\n this._needsEos = true;\n return;\n }\n }\n _logger.logger.log('all media data available, signal endOfStream() to MediaSource and stop loading fragment');\n //Notify the media element that it now has all of the media data\n mediaSource.endOfStream();\n this._needsEos = false;\n }\n }, {\n key: 'onBufferFlushing',\n value: function onBufferFlushing(data) {\n this.flushRange.push({ start: data.startOffset, end: data.endOffset, type: data.type });\n // attempt flush immediatly\n this.flushBufferCounter = 0;\n this.doFlush();\n }\n }, {\n key: 'onLevelUpdated',\n value: function onLevelUpdated(event) {\n var details = event.details;\n if (details.fragments.length === 0) {\n return;\n }\n this._levelDuration = details.totalduration + details.fragments[0].start;\n this.updateMediaElementDuration();\n }\n\n // https://github.com/dailymotion/hls.js/issues/355\n\n }, {\n key: 'updateMediaElementDuration',\n value: function updateMediaElementDuration() {\n if (this._levelDuration === null) {\n return;\n }\n var media = this.media,\n mediaSource = this.mediaSource,\n sourceBuffer = this.sourceBuffer;\n if (!media || !mediaSource || !sourceBuffer || media.readyState === 0 || mediaSource.readyState !== 'open') {\n return;\n }\n for (var type in sourceBuffer) {\n if (sourceBuffer[type].updating) {\n // can't set duration whilst a buffer is updating\n return;\n }\n }\n if (this._msDuration === null) {\n // initialise to the value that the media source is reporting\n this._msDuration = mediaSource.duration;\n }\n // this._levelDuration was the last value we set.\n // not using mediaSource.duration as the browser may tweak this value\n // only update mediasource duration if its value increase, this is to avoid\n // flushing already buffered portion when switching between quality level, as they\n if (this._levelDuration > this._msDuration) {\n _logger.logger.log('Updating mediasource duration to ' + this._levelDuration);\n mediaSource.duration = this._levelDuration;\n this._msDuration = this._levelDuration;\n }\n }\n }, {\n key: 'doFlush',\n value: function doFlush() {\n // loop through all buffer ranges to flush\n while (this.flushRange.length) {\n var range = this.flushRange[0];\n // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n if (this.flushBuffer(range.start, range.end, range.type)) {\n // range flushed, remove from flush array\n this.flushRange.shift();\n this.flushBufferCounter = 0;\n } else {\n this._needsFlush = true;\n // avoid looping, wait for SB update end to retrigger a flush\n return;\n }\n }\n if (this.flushRange.length === 0) {\n // everything flushed\n this._needsFlush = false;\n\n // let's recompute this.appended, which is used to avoid flush looping\n var appended = 0;\n var sourceBuffer = this.sourceBuffer;\n for (var type in sourceBuffer) {\n appended += sourceBuffer[type].buffered.length;\n }\n this.appended = appended;\n this.hls.trigger(_events2.default.BUFFER_FLUSHED);\n }\n }\n }, {\n key: 'doAppending',\n value: function doAppending() {\n var hls = this.hls,\n sourceBuffer = this.sourceBuffer,\n segments = this.segments;\n if (Object.keys(sourceBuffer).length) {\n if (this.media.error) {\n this.segments = [];\n _logger.logger.error('trying to append although a media error occured, flush segment and abort');\n return;\n }\n if (this.appending) {\n //logger.log(`sb appending in progress`);\n return;\n }\n if (segments && segments.length) {\n var segment = segments.shift();\n try {\n var type = segment.type;\n if (sourceBuffer[type]) {\n // reset sourceBuffer ended flag before appending segment\n sourceBuffer[type].ended = false;\n //logger.log(`appending ${segment.content} ${segment.type} SB, size:${segment.data.length}, ${segment.parent}`);\n this.parent = segment.parent;\n sourceBuffer[type].appendBuffer(segment.data);\n this.appendError = 0;\n this.appended++;\n this.appending = true;\n } else {\n // in case we don't have any source buffer matching with this segment type,\n // it means that Mediasource fails to create sourcebuffer\n // discard this segment, and trigger update end\n this.onSBUpdateEnd();\n }\n } catch (err) {\n // in case any error occured while appending, put back segment in segments table\n _logger.logger.error('error while trying to append buffer:' + err.message);\n segments.unshift(segment);\n var event = { type: _errors.ErrorTypes.MEDIA_ERROR };\n if (err.code !== 22) {\n if (this.appendError) {\n this.appendError++;\n } else {\n this.appendError = 1;\n }\n event.details = _errors.ErrorDetails.BUFFER_APPEND_ERROR;\n event.frag = this.fragCurrent;\n /* with UHD content, we could get loop of quota exceeded error until\n browser is able to evict some data from sourcebuffer. retrying help recovering this\n */\n if (this.appendError > hls.config.appendErrorMaxRetry) {\n _logger.logger.log('fail ' + hls.config.appendErrorMaxRetry + ' times to append segment in sourceBuffer');\n segments = [];\n event.fatal = true;\n hls.trigger(_events2.default.ERROR, event);\n return;\n } else {\n event.fatal = false;\n hls.trigger(_events2.default.ERROR, event);\n }\n } else {\n // QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n // let's stop appending any segments, and report BUFFER_FULL_ERROR error\n this.segments = [];\n event.details = _errors.ErrorDetails.BUFFER_FULL_ERROR;\n hls.trigger(_events2.default.ERROR, event);\n return;\n }\n }\n }\n }\n }\n\n /*\n flush specified buffered range,\n return true once range has been flushed.\n as sourceBuffer.remove() is asynchronous, flushBuffer will be retriggered on sourceBuffer update end\n */\n\n }, {\n key: 'flushBuffer',\n value: function flushBuffer(startOffset, endOffset, typeIn) {\n var sb,\n i,\n bufStart,\n bufEnd,\n flushStart,\n flushEnd,\n sourceBuffer = this.sourceBuffer;\n if (Object.keys(sourceBuffer).length) {\n _logger.logger.log('flushBuffer,pos/start/end: ' + this.media.currentTime + '/' + startOffset + '/' + endOffset);\n // safeguard to avoid infinite looping : don't try to flush more than the nb of appended segments\n if (this.flushBufferCounter < this.appended) {\n for (var type in sourceBuffer) {\n // check if sourcebuffer type is defined (typeIn): if yes, let's only flush this one\n // if no, let's flush all sourcebuffers\n if (typeIn && type !== typeIn) {\n continue;\n }\n sb = sourceBuffer[type];\n // we are going to flush buffer, mark source buffer as 'not ended'\n sb.ended = false;\n if (!sb.updating) {\n for (i = 0; i < sb.buffered.length; i++) {\n bufStart = sb.buffered.start(i);\n bufEnd = sb.buffered.end(i);\n // workaround firefox not able to properly flush multiple buffered range.\n if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1 && endOffset === Number.POSITIVE_INFINITY) {\n flushStart = startOffset;\n flushEnd = endOffset;\n } else {\n flushStart = Math.max(bufStart, startOffset);\n flushEnd = Math.min(bufEnd, endOffset);\n }\n /* sometimes sourcebuffer.remove() does not flush\n the exact expected time range.\n to avoid rounding issues/infinite loop,\n only flush buffer range of length greater than 500ms.\n */\n if (Math.min(flushEnd, bufEnd) - flushStart > 0.5) {\n this.flushBufferCounter++;\n _logger.logger.log('flush ' + type + ' [' + flushStart + ',' + flushEnd + '], of [' + bufStart + ',' + bufEnd + '], pos:' + this.media.currentTime);\n sb.remove(flushStart, flushEnd);\n return false;\n }\n }\n } else {\n //logger.log('abort ' + type + ' append in progress');\n // this will abort any appending in progress\n //sb.abort();\n _logger.logger.warn('cannot flush, sb updating in progress');\n return false;\n }\n }\n } else {\n _logger.logger.warn('abort flushing too many retries');\n }\n _logger.logger.log('buffer flushed');\n }\n // everything flushed !\n return true;\n }\n }]);\n\n return BufferController;\n}(_eventHandler2.default);\n\nexports.default = BufferController;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],7:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * cap stream level to media size dimension controller\n */\n\nvar CapLevelController = function (_EventHandler) {\n _inherits(CapLevelController, _EventHandler);\n\n function CapLevelController(hls) {\n _classCallCheck(this, CapLevelController);\n\n return _possibleConstructorReturn(this, Object.getPrototypeOf(CapLevelController).call(this, hls, _events2.default.FPS_DROP_LEVEL_CAPPING, _events2.default.MEDIA_ATTACHING, _events2.default.MANIFEST_PARSED));\n }\n\n _createClass(CapLevelController, [{\n key: 'destroy',\n value: function destroy() {\n if (this.hls.config.capLevelToPlayerSize) {\n this.media = this.restrictedLevels = null;\n this.autoLevelCapping = Number.POSITIVE_INFINITY;\n if (this.timer) {\n this.timer = clearInterval(this.timer);\n }\n }\n }\n }, {\n key: 'onFpsDropLevelCapping',\n value: function onFpsDropLevelCapping(data) {\n if (!this.restrictedLevels) {\n this.restrictedLevels = [];\n }\n if (!this.isLevelRestricted(data.droppedLevel)) {\n this.restrictedLevels.push(data.droppedLevel);\n }\n }\n }, {\n key: 'onMediaAttaching',\n value: function onMediaAttaching(data) {\n this.media = data.media instanceof HTMLVideoElement ? data.media : null;\n }\n }, {\n key: 'onManifestParsed',\n value: function onManifestParsed(data) {\n if (this.hls.config.capLevelToPlayerSize) {\n this.autoLevelCapping = Number.POSITIVE_INFINITY;\n this.levels = data.levels;\n this.hls.firstLevel = this.getMaxLevel(data.firstLevel);\n clearInterval(this.timer);\n this.timer = setInterval(this.detectPlayerSize.bind(this), 1000);\n this.detectPlayerSize();\n }\n }\n }, {\n key: 'detectPlayerSize',\n value: function detectPlayerSize() {\n if (this.media) {\n var levelsLength = this.levels ? this.levels.length : 0;\n if (levelsLength) {\n this.hls.autoLevelCapping = this.getMaxLevel(levelsLength - 1);\n if (this.hls.autoLevelCapping > this.autoLevelCapping) {\n // if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch\n // usually happen when the user go to the fullscreen mode.\n this.hls.streamController.nextLevelSwitch();\n }\n this.autoLevelCapping = this.hls.autoLevelCapping;\n }\n }\n }\n\n /*\n * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)\n */\n\n }, {\n key: 'getMaxLevel',\n value: function getMaxLevel(capLevelIndex) {\n var result = 0,\n i = void 0,\n level = void 0,\n mWidth = this.mediaWidth,\n mHeight = this.mediaHeight,\n lWidth = 0,\n lHeight = 0;\n\n for (i = 0; i <= capLevelIndex; i++) {\n level = this.levels[i];\n if (this.isLevelRestricted(i)) {\n break;\n }\n result = i;\n lWidth = level.width;\n lHeight = level.height;\n if (mWidth <= lWidth || mHeight <= lHeight) {\n break;\n }\n }\n return result;\n }\n }, {\n key: 'isLevelRestricted',\n value: function isLevelRestricted(level) {\n return this.restrictedLevels && this.restrictedLevels.indexOf(level) !== -1 ? true : false;\n }\n }, {\n key: 'contentScaleFactor',\n get: function get() {\n var pixelRatio = 1;\n try {\n pixelRatio = window.devicePixelRatio;\n } catch (e) {}\n return pixelRatio;\n }\n }, {\n key: 'mediaWidth',\n get: function get() {\n var width = void 0;\n if (this.media) {\n width = this.media.width || this.media.clientWidth || this.media.offsetWidth;\n width *= this.contentScaleFactor;\n }\n return width;\n }\n }, {\n key: 'mediaHeight',\n get: function get() {\n var height = void 0;\n if (this.media) {\n height = this.media.height || this.media.clientHeight || this.media.offsetHeight;\n height *= this.contentScaleFactor;\n }\n return height;\n }\n }]);\n\n return CapLevelController;\n}(_eventHandler2.default);\n\nexports.default = CapLevelController;\n\n},{\"25\":25,\"26\":26}],8:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /*\n * EWMA Bandwidth Estimator\n * - heavily inspired from shaka-player\n * Tracks bandwidth samples and estimates available bandwidth.\n * Based on the minimum of two exponentially-weighted moving averages with\n * different half-lives.\n */\n\nvar _ewma = _dereq_(42);\n\nvar _ewma2 = _interopRequireDefault(_ewma);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar EwmaBandWidthEstimator = function () {\n function EwmaBandWidthEstimator(hls, slow, fast, defaultEstimate) {\n _classCallCheck(this, EwmaBandWidthEstimator);\n\n this.hls = hls;\n this.defaultEstimate_ = defaultEstimate;\n this.minWeight_ = 0.001;\n this.minDelayMs_ = 50;\n this.slow_ = new _ewma2.default(slow);\n this.fast_ = new _ewma2.default(fast);\n }\n\n _createClass(EwmaBandWidthEstimator, [{\n key: 'sample',\n value: function sample(durationMs, numBytes) {\n durationMs = Math.max(durationMs, this.minDelayMs_);\n var bandwidth = 8000 * numBytes / durationMs,\n\n //console.log('instant bw:'+ Math.round(bandwidth));\n // we weight sample using loading duration....\n weight = durationMs / 1000;\n this.fast_.sample(weight, bandwidth);\n this.slow_.sample(weight, bandwidth);\n }\n }, {\n key: 'canEstimate',\n value: function canEstimate() {\n var fast = this.fast_;\n return fast && fast.getTotalWeight() >= this.minWeight_;\n }\n }, {\n key: 'getEstimate',\n value: function getEstimate() {\n if (this.canEstimate()) {\n //console.log('slow estimate:'+ Math.round(this.slow_.getEstimate()));\n //console.log('fast estimate:'+ Math.round(this.fast_.getEstimate()));\n // Take the minimum of these two estimates. This should have the effect of\n // adapting down quickly, but up more slowly.\n return Math.min(this.fast_.getEstimate(), this.slow_.getEstimate());\n } else {\n return this.defaultEstimate_;\n }\n }\n }, {\n key: 'destroy',\n value: function destroy() {}\n }]);\n\n return EwmaBandWidthEstimator;\n}();\n\nexports.default = EwmaBandWidthEstimator;\n\n},{\"42\":42}],9:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * FPS Controller\n */\n\nvar FPSController = function (_EventHandler) {\n _inherits(FPSController, _EventHandler);\n\n function FPSController(hls) {\n _classCallCheck(this, FPSController);\n\n return _possibleConstructorReturn(this, Object.getPrototypeOf(FPSController).call(this, hls, _events2.default.MEDIA_ATTACHING));\n }\n\n _createClass(FPSController, [{\n key: 'destroy',\n value: function destroy() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n this.isVideoPlaybackQualityAvailable = false;\n }\n }, {\n key: 'onMediaAttaching',\n value: function onMediaAttaching(data) {\n if (this.hls.config.capLevelOnFPSDrop) {\n this.video = data.media instanceof HTMLVideoElement ? data.media : null;\n if (typeof this.video.getVideoPlaybackQuality === 'function') {\n this.isVideoPlaybackQualityAvailable = true;\n }\n clearInterval(this.timer);\n this.timer = setInterval(this.checkFPSInterval.bind(this), this.hls.config.fpsDroppedMonitoringPeriod);\n }\n }\n }, {\n key: 'checkFPS',\n value: function checkFPS(video, decodedFrames, droppedFrames) {\n var currentTime = performance.now();\n if (decodedFrames) {\n if (this.lastTime) {\n var currentPeriod = currentTime - this.lastTime,\n currentDropped = droppedFrames - this.lastDroppedFrames,\n currentDecoded = decodedFrames - this.lastDecodedFrames,\n droppedFPS = 1000 * currentDropped / currentPeriod;\n this.hls.trigger(_events2.default.FPS_DROP, { currentDropped: currentDropped, currentDecoded: currentDecoded, totalDroppedFrames: droppedFrames });\n if (droppedFPS > 0) {\n //logger.log('checkFPS : droppedFPS/decodedFPS:' + droppedFPS/(1000 * currentDecoded / currentPeriod));\n if (currentDropped > this.hls.config.fpsDroppedMonitoringThreshold * currentDecoded) {\n var currentLevel = this.hls.currentLevel;\n _logger.logger.warn('drop FPS ratio greater than max allowed value for currentLevel: ' + currentLevel);\n if (currentLevel > 0 && (this.hls.autoLevelCapping === -1 || this.hls.autoLevelCapping >= currentLevel)) {\n currentLevel = currentLevel - 1;\n this.hls.trigger(_events2.default.FPS_DROP_LEVEL_CAPPING, { level: currentLevel, droppedLevel: this.hls.currentLevel });\n this.hls.autoLevelCapping = currentLevel;\n this.hls.streamController.nextLevelSwitch();\n }\n }\n }\n }\n this.lastTime = currentTime;\n this.lastDroppedFrames = droppedFrames;\n this.lastDecodedFrames = decodedFrames;\n }\n }\n }, {\n key: 'checkFPSInterval',\n value: function checkFPSInterval() {\n if (this.video) {\n if (this.isVideoPlaybackQualityAvailable) {\n var videoPlaybackQuality = this.video.getVideoPlaybackQuality();\n this.checkFPS(this.video, videoPlaybackQuality.totalVideoFrames, videoPlaybackQuality.droppedVideoFrames);\n } else {\n this.checkFPS(this.video, this.video.webkitDecodedFrameCount, this.video.webkitDroppedFrameCount);\n }\n }\n }\n }]);\n\n return FPSController;\n}(_eventHandler2.default);\n\nexports.default = FPSController;\n\n},{\"25\":25,\"26\":26,\"43\":43}],10:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _logger = _dereq_(43);\n\nvar _errors = _dereq_(24);\n\nvar _bufferHelper = _dereq_(28);\n\nvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Level Controller\n */\n\nvar LevelController = function (_EventHandler) {\n _inherits(LevelController, _EventHandler);\n\n function LevelController(hls) {\n _classCallCheck(this, LevelController);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(LevelController).call(this, hls, _events2.default.MANIFEST_LOADED, _events2.default.LEVEL_LOADED, _events2.default.ERROR));\n\n _this.ontick = _this.tick.bind(_this);\n _this._manualLevel = _this._autoLevelCapping = -1;\n return _this;\n }\n\n _createClass(LevelController, [{\n key: 'destroy',\n value: function destroy() {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n this._manualLevel = -1;\n }\n }, {\n key: 'startLoad',\n value: function startLoad() {\n this.canload = true;\n // speed up live playlist refresh if timer exists\n if (this.timer) {\n this.tick();\n }\n }\n }, {\n key: 'stopLoad',\n value: function stopLoad() {\n this.canload = false;\n }\n }, {\n key: 'onManifestLoaded',\n value: function onManifestLoaded(data) {\n var levels0 = [],\n levels = [],\n bitrateStart,\n i,\n bitrateSet = {},\n videoCodecFound = false,\n audioCodecFound = false,\n hls = this.hls;\n\n // regroup redundant level together\n data.levels.forEach(function (level) {\n if (level.videoCodec) {\n videoCodecFound = true;\n }\n if (level.audioCodec || level.attrs && level.attrs.AUDIO) {\n audioCodecFound = true;\n }\n var redundantLevelId = bitrateSet[level.bitrate];\n if (redundantLevelId === undefined) {\n bitrateSet[level.bitrate] = levels0.length;\n level.url = [level.url];\n level.urlId = 0;\n levels0.push(level);\n } else {\n levels0[redundantLevelId].url.push(level.url);\n }\n });\n\n // remove audio-only level if we also have levels with audio+video codecs signalled\n if (videoCodecFound && audioCodecFound) {\n levels0.forEach(function (level) {\n if (level.videoCodec) {\n levels.push(level);\n }\n });\n } else {\n levels = levels0;\n }\n\n // only keep level with supported audio/video codecs\n levels = levels.filter(function (level) {\n var checkSupportedAudio = function checkSupportedAudio(codec) {\n return MediaSource.isTypeSupported('audio/mp4;codecs=' + codec);\n };\n var checkSupportedVideo = function checkSupportedVideo(codec) {\n return MediaSource.isTypeSupported('video/mp4;codecs=' + codec);\n };\n var audioCodec = level.audioCodec,\n videoCodec = level.videoCodec;\n\n return (!audioCodec || checkSupportedAudio(audioCodec)) && (!videoCodec || checkSupportedVideo(videoCodec));\n });\n\n if (levels.length) {\n // start bitrate is the first bitrate of the manifest\n bitrateStart = levels[0].bitrate;\n // sort level on bitrate\n levels.sort(function (a, b) {\n return a.bitrate - b.bitrate;\n });\n this._levels = levels;\n // find index of first level in sorted levels\n for (i = 0; i < levels.length; i++) {\n if (levels[i].bitrate === bitrateStart) {\n this._firstLevel = i;\n _logger.logger.log('manifest loaded,' + levels.length + ' level(s) found, first bitrate:' + bitrateStart);\n break;\n }\n }\n hls.trigger(_events2.default.MANIFEST_PARSED, { levels: this._levels, firstLevel: this._firstLevel, stats: data.stats, audio: audioCodecFound, video: videoCodecFound, altAudio: data.audioTracks.length > 0 });\n } else {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR, fatal: true, url: hls.url, reason: 'no level with compatible codecs found in manifest' });\n }\n return;\n }\n }, {\n key: 'setLevelInternal',\n value: function setLevelInternal(newLevel) {\n var levels = this._levels;\n // check if level idx is valid\n if (newLevel >= 0 && newLevel < levels.length) {\n // stopping live reloading timer if any\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n if (this._level !== newLevel) {\n _logger.logger.log('switching to level ' + newLevel);\n this._level = newLevel;\n }\n this.hls.trigger(_events2.default.LEVEL_SWITCH, { level: newLevel });\n var level = levels[newLevel],\n levelDetails = level.details;\n // check if we need to load playlist for this level\n if (!levelDetails || levelDetails.live === true) {\n // level not retrieved yet, or live playlist we need to (re)load it\n var urlId = level.urlId;\n this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: newLevel, id: urlId });\n }\n } else {\n // invalid level id given, trigger error\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.LEVEL_SWITCH_ERROR, level: newLevel, fatal: false, reason: 'invalid level idx' });\n }\n }\n }, {\n key: 'onError',\n value: function onError(data) {\n if (data.fatal) {\n return;\n }\n\n var details = data.details,\n hls = this.hls,\n levelId = void 0,\n level = void 0,\n levelError = false;\n // try to recover not fatal errors\n switch (details) {\n case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case _errors.ErrorDetails.KEY_LOAD_ERROR:\n case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n levelId = data.frag.level;\n break;\n case _errors.ErrorDetails.LEVEL_LOAD_ERROR:\n case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n levelId = data.context.level;\n levelError = true;\n break;\n default:\n break;\n }\n /* try to switch to a redundant stream if any available.\n * if no redundant stream available, emergency switch down (if in auto mode and current level not 0)\n * otherwise, we cannot recover this network error ...\n */\n if (levelId !== undefined) {\n level = this._levels[levelId];\n if (level.urlId < level.url.length - 1) {\n level.urlId++;\n level.details = undefined;\n _logger.logger.warn('level controller,' + details + ' for level ' + levelId + ': switching to redundant stream id ' + level.urlId);\n } else {\n // we could try to recover if in auto mode and current level not lowest level (0)\n var recoverable = this._manualLevel === -1 && levelId;\n if (recoverable) {\n _logger.logger.warn('level controller,' + details + ': emergency switch-down for next fragment');\n hls.abrController.nextAutoLevel = 0;\n } else if (level && level.details && level.details.live) {\n _logger.logger.warn('level controller,' + details + ' on live stream, discard');\n if (levelError) {\n // reset this._level so that another call to set level() will retrigger a frag load\n this._level = undefined;\n }\n // other errors are handled by stream controller\n } else if (details === _errors.ErrorDetails.LEVEL_LOAD_ERROR || details === _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT) {\n var _hls = this.hls,\n media = _hls.media,\n\n // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);\n if (mediaBuffered) {\n var retryDelay = _hls.config.levelLoadingRetryDelay;\n _logger.logger.warn('level controller,' + details + ', but media buffered, retry in ' + retryDelay + 'ms');\n this.timer = setTimeout(this.ontick, retryDelay);\n } else {\n _logger.logger.error('cannot recover ' + details + ' error');\n this._level = undefined;\n // stopping live reloading timer if any\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n // redispatch same error but with fatal set to true\n data.fatal = true;\n _hls.trigger(_events2.default.ERROR, data);\n }\n }\n }\n }\n }\n }, {\n key: 'onLevelLoaded',\n value: function onLevelLoaded(data) {\n // only process level loaded events matching with expected level\n if (data.level === this._level) {\n var newDetails = data.details;\n // if current playlist is a live playlist, arm a timer to reload it\n if (newDetails.live) {\n var reloadInterval = 1000 * (newDetails.averagetargetduration ? newDetails.averagetargetduration : newDetails.targetduration),\n curLevel = this._levels[data.level],\n curDetails = curLevel.details;\n if (curDetails && newDetails.endSN === curDetails.endSN) {\n // follow HLS Spec, If the client reloads a Playlist file and finds that it has not\n // changed then it MUST wait for a period of one-half the target\n // duration before retrying.\n reloadInterval /= 2;\n _logger.logger.log('same live playlist, reload twice faster');\n }\n // decrement reloadInterval with level loading delay\n reloadInterval -= performance.now() - data.stats.trequest;\n // in any case, don't reload more than every second\n reloadInterval = Math.max(1000, Math.round(reloadInterval));\n _logger.logger.log('live playlist, reload in ' + reloadInterval + ' ms');\n this.timer = setTimeout(this.ontick, reloadInterval);\n } else {\n this.timer = null;\n }\n }\n }\n }, {\n key: 'tick',\n value: function tick() {\n var levelId = this._level;\n if (levelId !== undefined && this.canload) {\n var level = this._levels[levelId],\n urlId = level.urlId;\n this.hls.trigger(_events2.default.LEVEL_LOADING, { url: level.url[urlId], level: levelId, id: urlId });\n }\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels;\n }\n }, {\n key: 'level',\n get: function get() {\n return this._level;\n },\n set: function set(newLevel) {\n var levels = this._levels;\n if (levels && levels.length > newLevel) {\n if (this._level !== newLevel || levels[newLevel].details === undefined) {\n this.setLevelInternal(newLevel);\n }\n }\n }\n }, {\n key: 'manualLevel',\n get: function get() {\n return this._manualLevel;\n },\n set: function set(newLevel) {\n this._manualLevel = newLevel;\n if (this._startLevel === undefined) {\n this._startLevel = newLevel;\n }\n if (newLevel !== -1) {\n this.level = newLevel;\n }\n }\n }, {\n key: 'firstLevel',\n get: function get() {\n return this._firstLevel;\n },\n set: function set(newLevel) {\n this._firstLevel = newLevel;\n }\n }, {\n key: 'startLevel',\n get: function get() {\n // hls.startLevel takes precedence over config.startLevel\n // if none of these values are defined, fallback on this._firstLevel (first quality level appearing in variant manifest)\n if (this._startLevel === undefined) {\n var configStartLevel = this.hls.config.startLevel;\n if (configStartLevel !== undefined) {\n return configStartLevel;\n } else {\n return this._firstLevel;\n }\n } else {\n return this._startLevel;\n }\n },\n set: function set(newLevel) {\n this._startLevel = newLevel;\n }\n }, {\n key: 'nextLoadLevel',\n get: function get() {\n if (this._manualLevel !== -1) {\n return this._manualLevel;\n } else {\n return this.hls.abrController.nextAutoLevel;\n }\n },\n set: function set(nextLevel) {\n this.level = nextLevel;\n if (this._manualLevel === -1) {\n this.hls.abrController.nextAutoLevel = nextLevel;\n }\n }\n }]);\n\n return LevelController;\n}(_eventHandler2.default);\n\nexports.default = LevelController;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"43\":43}],11:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _binarySearch = _dereq_(39);\n\nvar _binarySearch2 = _interopRequireDefault(_binarySearch);\n\nvar _bufferHelper = _dereq_(28);\n\nvar _bufferHelper2 = _interopRequireDefault(_bufferHelper);\n\nvar _demuxer = _dereq_(20);\n\nvar _demuxer2 = _interopRequireDefault(_demuxer);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _levelHelper = _dereq_(29);\n\nvar _levelHelper2 = _interopRequireDefault(_levelHelper);\n\nvar _timeRanges = _dereq_(45);\n\nvar _timeRanges2 = _interopRequireDefault(_timeRanges);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Stream Controller\n */\n\nvar State = {\n STOPPED: 'STOPPED',\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n KEY_LOADING: 'KEY_LOADING',\n FRAG_LOADING: 'FRAG_LOADING',\n FRAG_LOADING_WAITING_RETRY: 'FRAG_LOADING_WAITING_RETRY',\n WAITING_LEVEL: 'WAITING_LEVEL',\n PARSING: 'PARSING',\n PARSED: 'PARSED',\n ENDED: 'ENDED',\n ERROR: 'ERROR'\n};\n\nvar StreamController = function (_EventHandler) {\n _inherits(StreamController, _EventHandler);\n\n function StreamController(hls) {\n _classCallCheck(this, StreamController);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(StreamController).call(this, hls, _events2.default.MEDIA_ATTACHED, _events2.default.MEDIA_DETACHING, _events2.default.MANIFEST_LOADING, _events2.default.MANIFEST_PARSED, _events2.default.LEVEL_LOADED, _events2.default.KEY_LOADED, _events2.default.FRAG_LOADED, _events2.default.FRAG_LOAD_EMERGENCY_ABORTED, _events2.default.FRAG_PARSING_INIT_SEGMENT, _events2.default.FRAG_PARSING_DATA, _events2.default.FRAG_PARSED, _events2.default.ERROR, _events2.default.AUDIO_TRACK_SWITCH, _events2.default.BUFFER_CREATED, _events2.default.BUFFER_APPENDED, _events2.default.BUFFER_FLUSHED));\n\n _this.config = hls.config;\n _this.audioCodecSwap = false;\n _this.ticks = 0;\n _this.ontick = _this.tick.bind(_this);\n return _this;\n }\n\n _createClass(StreamController, [{\n key: 'destroy',\n value: function destroy() {\n this.stopLoad();\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n _eventHandler2.default.prototype.destroy.call(this);\n this.state = State.STOPPED;\n }\n }, {\n key: 'startLoad',\n value: function startLoad(startPosition) {\n if (this.levels) {\n var media = this.media,\n lastCurrentTime = this.lastCurrentTime,\n hls = this.hls;\n this.stopLoad();\n if (!this.timer) {\n this.timer = setInterval(this.ontick, 100);\n }\n this.level = -1;\n this.fragLoadError = 0;\n if (media && lastCurrentTime > 0) {\n _logger.logger.log('configure startPosition @' + lastCurrentTime.toFixed(3));\n if (!this.lastPaused) {\n _logger.logger.log('resuming video');\n media.play();\n }\n } else {\n this.lastCurrentTime = this.startPosition ? this.startPosition : startPosition;\n }\n if (!this.startFragRequested) {\n // determine load level\n var startLevel = hls.startLevel;\n if (startLevel === -1) {\n // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n startLevel = 0;\n this.bitrateTest = true;\n }\n // set new level to playlist loader : this will trigger start level load\n // hls.nextLoadLevel remains until it is set to a new value or until a new frag is successfully loaded\n this.level = hls.nextLoadLevel = startLevel;\n this.loadedmetadata = false;\n }\n this.state = State.IDLE;\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n this.tick();\n } else {\n _logger.logger.warn('cannot start loading as manifest not parsed yet');\n this.state = State.STOPPED;\n }\n }\n }, {\n key: 'stopLoad',\n value: function stopLoad() {\n var frag = this.fragCurrent;\n if (frag) {\n if (frag.loader) {\n frag.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n this.state = State.STOPPED;\n }\n }, {\n key: 'tick',\n value: function tick() {\n this.ticks++;\n if (this.ticks === 1) {\n this.doTick();\n if (this.ticks > 1) {\n setTimeout(this.tick, 1);\n }\n this.ticks = 0;\n }\n }\n }, {\n key: 'doTick',\n value: function doTick() {\n switch (this.state) {\n case State.ERROR:\n //don't do anything in error state to avoid breaking further ...\n case State.PAUSED:\n //don't do anything in paused state either ...\n break;\n case State.IDLE:\n // when this returns false there was an error and we shall return immediatly\n // from current tick\n if (!this._doTickIdle()) {\n return;\n }\n break;\n case State.WAITING_LEVEL:\n var level = this.levels[this.level];\n // check if playlist is already loaded\n if (level && level.details) {\n this.state = State.IDLE;\n }\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = performance.now();\n var retryDate = this.retryDate;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if (!retryDate || now >= retryDate || this.media && this.media.seeking) {\n _logger.logger.log('mediaController: retryDate reached, switch back to IDLE state');\n this.state = State.IDLE;\n }\n break;\n case State.ERROR:\n case State.PAUSED:\n case State.STOPPED:\n case State.FRAG_LOADING:\n case State.PARSING:\n case State.PARSED:\n case State.ENDED:\n break;\n default:\n break;\n }\n // check buffer\n this._checkBuffer();\n // check/update current fragment\n this._checkFragmentChanged();\n }\n\n // Ironically the \"idle\" state is the on we do the most logic in it seems ....\n // NOTE: Maybe we could rather schedule a check for buffer length after half of the currently\n // played segment, or on pause/play/seek instead of naively checking every 100ms?\n\n }, {\n key: '_doTickIdle',\n value: function _doTickIdle() {\n var hls = this.hls,\n config = hls.config,\n media = this.media;\n\n // if video not attached AND\n // start fragment already requested OR start frag prefetch disable\n // exit loop\n // => if media not attached but start frag prefetch is enabled and start frag not requested yet, we will not exit loop\n if (!media && (this.startFragRequested || !config.startFragPrefetch)) {\n return true;\n }\n\n // if we have not yet loaded any fragment, start loading from start position\n var pos = void 0;\n if (this.loadedmetadata) {\n pos = media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n }\n // determine next load level\n var level = hls.nextLoadLevel;\n\n // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s\n var maxBufLen = void 0;\n if (this.levels[level].hasOwnProperty('bitrate')) {\n maxBufLen = Math.max(8 * config.maxBufferSize / this.levels[level].bitrate, config.maxBufferLength);\n } else {\n maxBufLen = config.maxBufferLength;\n }\n maxBufLen = Math.min(maxBufLen, config.maxMaxBufferLength);\n\n // determine next candidate fragment to be loaded, based on current position and end of buffer position\n // ensure up to `config.maxMaxBufferLength` of buffer upfront\n\n var bufferInfo = _bufferHelper2.default.bufferInfo(this.mediaBuffer ? this.mediaBuffer : media, pos, config.maxBufferHole),\n bufferLen = bufferInfo.len;\n // Stay idle if we are still with buffer margins\n if (bufferLen >= maxBufLen) {\n return true;\n }\n\n // if buffer length is less than maxBufLen try to load a new fragment ...\n _logger.logger.trace('buffer length of ' + bufferLen.toFixed(3) + ' is below max of ' + maxBufLen.toFixed(3) + '. checking for more payload ...');\n\n // set next load level : this will trigger a playlist load if needed\n hls.nextLoadLevel = level;\n this.level = level;\n\n var levelDetails = this.levels[level].details;\n // if level info not retrieved yet, switch state and wait for level retrieval\n // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load\n // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)\n if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) {\n this.state = State.WAITING_LEVEL;\n return true;\n }\n\n // we just got done loading the final fragment, check if we need to finalize media stream\n var fragPrevious = this.fragPrevious;\n if (!levelDetails.live && fragPrevious && fragPrevious.sn === levelDetails.endSN) {\n // if (we are not seeking AND current position is buffered) OR (if we are seeking but everything (almost) til the end is buffered), let's signal eos\n // we don't compare exactly media.duration === bufferInfo.end as there could be some subtle media duration difference when switching\n // between different renditions. using half frag duration should help cope with these cases.\n if (!media.seeking && bufferInfo.len || media.duration - bufferInfo.end <= fragPrevious.duration / 2) {\n // Finalize the media stream\n var data = {};\n if (this.altAudio) {\n data.type = 'video';\n }\n this.hls.trigger(_events2.default.BUFFER_EOS, data);\n this.state = State.ENDED;\n return true;\n }\n }\n\n // if we have the levelDetails for the selected variant, lets continue enrichen our stream (load keys/fragments or trigger EOS, etc..)\n return this._fetchPayloadOrEos({ pos: pos, bufferInfo: bufferInfo, levelDetails: levelDetails });\n }\n }, {\n key: '_fetchPayloadOrEos',\n value: function _fetchPayloadOrEos(_ref) {\n var pos = _ref.pos;\n var bufferInfo = _ref.bufferInfo;\n var levelDetails = _ref.levelDetails;\n\n var fragPrevious = this.fragPrevious,\n level = this.level,\n fragments = levelDetails.fragments,\n fragLen = fragments.length;\n\n // empty playlist\n if (fragLen === 0) {\n return false;\n }\n\n // find fragment index, contiguous with end of buffer position\n var start = fragments[0].start,\n end = fragments[fragLen - 1].start + fragments[fragLen - 1].duration,\n bufferEnd = bufferInfo.end,\n frag = void 0;\n\n // in case of live playlist we need to ensure that requested position is not located before playlist start\n if (levelDetails.live) {\n frag = this._ensureFragmentAtLivePoint({ levelDetails: levelDetails, bufferEnd: bufferEnd, start: start, end: end, fragPrevious: fragPrevious, fragments: fragments, fragLen: fragLen });\n // if it explicitely returns null don't load any fragment and exit function now\n if (frag === null) {\n return false;\n }\n } else {\n // VoD playlist: if bufferEnd before start of playlist, load first fragment\n if (bufferEnd < start) {\n frag = fragments[0];\n }\n }\n if (!frag) {\n frag = this._findFragment({ start: start, fragPrevious: fragPrevious, fragLen: fragLen, fragments: fragments, bufferEnd: bufferEnd, end: end, levelDetails: levelDetails });\n }\n if (frag) {\n return this._loadFragmentOrKey({ frag: frag, level: level, levelDetails: levelDetails, pos: pos, bufferEnd: bufferEnd });\n }\n return true;\n }\n }, {\n key: '_ensureFragmentAtLivePoint',\n value: function _ensureFragmentAtLivePoint(_ref2) {\n var levelDetails = _ref2.levelDetails;\n var bufferEnd = _ref2.bufferEnd;\n var start = _ref2.start;\n var end = _ref2.end;\n var fragPrevious = _ref2.fragPrevious;\n var fragments = _ref2.fragments;\n var fragLen = _ref2.fragLen;\n\n var config = this.hls.config,\n media = this.media;\n\n var frag = void 0;\n\n // check if requested position is within seekable boundaries :\n //logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n var maxLatency = config.liveMaxLatencyDuration !== undefined ? config.liveMaxLatencyDuration : config.liveMaxLatencyDurationCount * levelDetails.targetduration;\n\n if (bufferEnd < Math.max(start, end - maxLatency)) {\n var liveSyncPosition = this.liveSyncPosition = this.computeLivePosition(start, levelDetails);\n _logger.logger.log('buffer end: ' + bufferEnd.toFixed(3) + ' is located too far from the end of live sliding playlist, reset currentTime to : ' + liveSyncPosition.toFixed(3));\n bufferEnd = liveSyncPosition;\n if (media && media.readyState && media.duration > liveSyncPosition) {\n media.currentTime = liveSyncPosition;\n }\n }\n\n // if end of buffer greater than live edge, don't load any fragment\n // this could happen if live playlist intermittently slides in the past.\n // level 1 loaded [182580161,182580167]\n // level 1 loaded [182580162,182580169]\n // Loading 182580168 of [182580162 ,182580169],level 1 ..\n // Loading 182580169 of [182580162 ,182580169],level 1 ..\n // level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168\n // level 1 loaded [182580164,182580171]\n //\n // don't return null in case media not loaded yet (readystate === 0)\n if (levelDetails.PTSKnown && bufferEnd > end && media && media.readyState) {\n return null;\n }\n\n if (this.startFragRequested && !levelDetails.PTSKnown) {\n /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n try to load frag matching with next SN.\n even if SN are not synchronized between playlists, loading this frag will help us\n compute playlist sliding and find the right one after in case it was not the right consecutive one */\n if (fragPrevious) {\n var targetSN = fragPrevious.sn + 1;\n if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n frag = fragments[targetSN - levelDetails.startSN];\n _logger.logger.log('live playlist, switching playlist, load frag with next SN: ' + frag.sn);\n }\n }\n if (!frag) {\n /* we have no idea about which fragment should be loaded.\n so let's load mid fragment. it will help computing playlist sliding and find the right one\n */\n frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n _logger.logger.log('live playlist, switching playlist, unknown, load middle frag : ' + frag.sn);\n }\n }\n return frag;\n }\n }, {\n key: '_findFragment',\n value: function _findFragment(_ref3) {\n var start = _ref3.start;\n var fragPrevious = _ref3.fragPrevious;\n var fragLen = _ref3.fragLen;\n var fragments = _ref3.fragments;\n var bufferEnd = _ref3.bufferEnd;\n var end = _ref3.end;\n var levelDetails = _ref3.levelDetails;\n\n var config = this.hls.config;\n\n var frag = void 0,\n foundFrag = void 0,\n maxFragLookUpTolerance = config.maxFragLookUpTolerance;\n\n if (bufferEnd < end) {\n if (bufferEnd > end - maxFragLookUpTolerance) {\n maxFragLookUpTolerance = 0;\n }\n foundFrag = _binarySearch2.default.search(fragments, function (candidate) {\n // offset should be within fragment boundary - config.maxFragLookUpTolerance\n // this is to cope with situations like\n // bufferEnd = 9.991\n // frag[Ø] : [0,10]\n // frag[1] : [10,20]\n // bufferEnd is within frag[0] range ... although what we are expecting is to return frag[1] here\n // frag start frag start+duration\n // |-----------------------------|\n // <---> <--->\n // ...--------><-----------------------------><---------....\n // previous frag matching fragment next frag\n // return -1 return 0 return 1\n //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n if (candidate.start + candidate.duration - maxFragLookUpTolerance <= bufferEnd) {\n return 1;\n } // if maxFragLookUpTolerance will have negative value then don't return -1 for first element\n else if (candidate.start - maxFragLookUpTolerance > bufferEnd && candidate.start) {\n return -1;\n }\n return 0;\n });\n } else {\n // reach end of playlist\n foundFrag = fragments[fragLen - 1];\n }\n if (foundFrag) {\n frag = foundFrag;\n start = foundFrag.start;\n //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n if (frag.sn < levelDetails.endSN) {\n var deltaPTS = fragPrevious.deltaPTS,\n curSNIdx = frag.sn - levelDetails.startSN;\n // if there is a significant delta between audio and video, larger than max allowed hole,\n // and if previous remuxed fragment did not start with a keyframe. (fragPrevious.dropped)\n // let's try to load previous fragment again to get last keyframe\n // then we will reload again current fragment (that way we should be able to fill the buffer hole ...)\n if (deltaPTS && deltaPTS > config.maxBufferHole && fragPrevious.dropped && curSNIdx) {\n frag = fragments[curSNIdx - 1];\n _logger.logger.warn('SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this');\n // decrement previous frag load counter to avoid frag loop loading error when next fragment will get reloaded\n fragPrevious.loadCounter--;\n } else {\n frag = fragments[curSNIdx + 1];\n _logger.logger.log('SN just loaded, load next one: ' + frag.sn);\n }\n } else {\n frag = null;\n }\n }\n }\n return frag;\n }\n }, {\n key: '_loadFragmentOrKey',\n value: function _loadFragmentOrKey(_ref4) {\n var frag = _ref4.frag;\n var level = _ref4.level;\n var levelDetails = _ref4.levelDetails;\n var pos = _ref4.pos;\n var bufferEnd = _ref4.bufferEnd;\n\n var hls = this.hls,\n config = hls.config;\n\n //logger.log('loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n if (frag.decryptdata.uri != null && frag.decryptdata.key == null) {\n _logger.logger.log('Loading key for ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level);\n this.state = State.KEY_LOADING;\n hls.trigger(_events2.default.KEY_LOADING, { frag: frag });\n } else {\n _logger.logger.log('Loading ' + frag.sn + ' of [' + levelDetails.startSN + ' ,' + levelDetails.endSN + '],level ' + level + ', currentTime:' + pos.toFixed(3) + ',bufferEnd:' + bufferEnd.toFixed(3));\n // ensure that we are not reloading the same fragments in loop ...\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx++;\n } else {\n this.fragLoadIdx = 0;\n }\n if (frag.loadCounter) {\n frag.loadCounter++;\n var maxThreshold = config.fragLoadingLoopThreshold;\n // if this frag has already been loaded 3 times, and if it has been reloaded recently\n if (frag.loadCounter > maxThreshold && Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold) {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag });\n return false;\n }\n } else {\n frag.loadCounter = 1;\n }\n frag.loadIdx = this.fragLoadIdx;\n this.fragCurrent = frag;\n this.startFragRequested = true;\n frag.autoLevel = hls.autoLevelEnabled;\n frag.bitrateTest = this.bitrateTest;\n hls.trigger(_events2.default.FRAG_LOADING, { frag: frag });\n this.state = State.FRAG_LOADING;\n return true;\n }\n }\n }, {\n key: 'getBufferRange',\n value: function getBufferRange(position) {\n var i,\n range,\n bufferRange = this.bufferRange;\n if (bufferRange) {\n for (i = bufferRange.length - 1; i >= 0; i--) {\n range = bufferRange[i];\n if (position >= range.start && position <= range.end) {\n return range;\n }\n }\n }\n return null;\n }\n }, {\n key: 'followingBufferRange',\n value: function followingBufferRange(range) {\n if (range) {\n // try to get range of next fragment (500ms after this range)\n return this.getBufferRange(range.end + 0.5);\n }\n return null;\n }\n }, {\n key: '_checkFragmentChanged',\n value: function _checkFragmentChanged() {\n var rangeCurrent,\n currentTime,\n video = this.media;\n if (video && video.readyState && video.seeking === false) {\n currentTime = video.currentTime;\n /* if video element is in seeked state, currentTime can only increase.\n (assuming that playback rate is positive ...)\n As sometimes currentTime jumps back to zero after a\n media decode error, check this, to avoid seeking back to\n wrong position after a media decode error\n */\n if (currentTime > video.playbackRate * this.lastCurrentTime) {\n this.lastCurrentTime = currentTime;\n }\n if (_bufferHelper2.default.isBuffered(video, currentTime)) {\n rangeCurrent = this.getBufferRange(currentTime);\n } else if (_bufferHelper2.default.isBuffered(video, currentTime + 0.1)) {\n /* ensure that FRAG_CHANGED event is triggered at startup,\n when first video frame is displayed and playback is paused.\n add a tolerance of 100ms, in case current position is not buffered,\n check if current pos+100ms is buffered and use that buffer range\n for FRAG_CHANGED event reporting */\n rangeCurrent = this.getBufferRange(currentTime + 0.1);\n }\n if (rangeCurrent) {\n var fragPlaying = rangeCurrent.frag;\n if (fragPlaying !== this.fragPlaying) {\n this.fragPlaying = fragPlaying;\n this.hls.trigger(_events2.default.FRAG_CHANGED, { frag: fragPlaying });\n }\n }\n }\n }\n\n /*\n on immediate level switch :\n - pause playback if playing\n - cancel any pending load request\n - and trigger a buffer flush\n */\n\n }, {\n key: 'immediateLevelSwitch',\n value: function immediateLevelSwitch() {\n _logger.logger.log('immediateLevelSwitch');\n if (!this.immediateSwitch) {\n this.immediateSwitch = true;\n var media = this.media,\n previouslyPaused = void 0;\n if (media) {\n previouslyPaused = media.paused;\n media.pause();\n } else {\n // don't restart playback after instant level switch in case media not attached\n previouslyPaused = true;\n }\n this.previouslyPaused = previouslyPaused;\n }\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n this.state = State.PAUSED;\n // flush everything\n this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });\n }\n\n /*\n on immediate level switch end, after new fragment has been buffered :\n - nudge video decoder by slightly adjusting video currentTime (if currentTime buffered)\n - resume the playback if needed\n */\n\n }, {\n key: 'immediateLevelSwitchEnd',\n value: function immediateLevelSwitchEnd() {\n var media = this.media;\n if (media && media.buffered.length) {\n this.immediateSwitch = false;\n if (_bufferHelper2.default.isBuffered(media, media.currentTime)) {\n // only nudge if currentTime is buffered\n media.currentTime -= 0.0001;\n }\n if (!this.previouslyPaused) {\n media.play();\n }\n }\n }\n }, {\n key: 'nextLevelSwitch',\n value: function nextLevelSwitch() {\n /* try to switch ASAP without breaking video playback :\n in order to ensure smooth but quick level switching,\n we need to find the next flushable buffer range\n we should take into account new segment fetch time\n */\n var media = this.media;\n // ensure that media is defined and that metadata are available (to retrieve currentTime)\n if (media && media.readyState) {\n var fetchdelay = void 0,\n currentRange = void 0,\n nextRange = void 0;\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n currentRange = this.getBufferRange(media.currentTime);\n if (currentRange && currentRange.start > 1) {\n // flush buffer preceding current fragment (flush until current fragment start offset)\n // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n this.state = State.PAUSED;\n this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: currentRange.start - 1 });\n }\n if (!media.paused) {\n // add a safety delay of 1s\n var nextLevelId = this.hls.nextLoadLevel,\n nextLevel = this.levels[nextLevelId],\n fragLastKbps = this.fragLastKbps;\n if (fragLastKbps && this.fragCurrent) {\n fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n } else {\n fetchdelay = 0;\n }\n } else {\n fetchdelay = 0;\n }\n //logger.log('fetchdelay:'+fetchdelay);\n // find buffer range that will be reached once new fragment will be fetched\n nextRange = this.getBufferRange(media.currentTime + fetchdelay);\n if (nextRange) {\n // we can flush buffer range following this one without stalling playback\n nextRange = this.followingBufferRange(nextRange);\n if (nextRange) {\n // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n // flush position is the start position of this new buffer\n this.state = State.PAUSED;\n this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: nextRange.start, endOffset: Number.POSITIVE_INFINITY });\n }\n }\n }\n }\n }, {\n key: 'onMediaAttached',\n value: function onMediaAttached(data) {\n var media = this.media = this.mediaBuffer = data.media;\n this.onvseeking = this.onMediaSeeking.bind(this);\n this.onvseeked = this.onMediaSeeked.bind(this);\n this.onvended = this.onMediaEnded.bind(this);\n media.addEventListener('seeking', this.onvseeking);\n media.addEventListener('seeked', this.onvseeked);\n media.addEventListener('ended', this.onvended);\n var config = this.config;\n if (this.levels && config.autoStartLoad) {\n this.hls.startLoad(config.startPosition);\n }\n }\n }, {\n key: 'onMediaDetaching',\n value: function onMediaDetaching() {\n var media = this.media;\n if (media && media.ended) {\n _logger.logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n var levels = this.levels;\n if (levels) {\n // reset fragment load counter\n levels.forEach(function (level) {\n if (level.details) {\n level.details.fragments.forEach(function (fragment) {\n fragment.loadCounter = undefined;\n });\n }\n });\n }\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('seeked', this.onvseeked);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvended = null;\n }\n this.media = null;\n this.loadedmetadata = false;\n this.stopLoad();\n }\n }, {\n key: 'onMediaSeeking',\n value: function onMediaSeeking() {\n var media = this.media,\n currentTime = media ? media.currentTime : undefined,\n config = this.config;\n _logger.logger.log('media seeking to ' + currentTime.toFixed(3));\n if (this.state === State.FRAG_LOADING) {\n var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, this.config.maxBufferHole),\n fragCurrent = this.fragCurrent;\n // check if we are seeking to a unbuffered area AND if frag loading is in progress\n if (bufferInfo.len === 0 && fragCurrent) {\n var tolerance = config.maxFragLookUpTolerance,\n fragStartOffset = fragCurrent.start - tolerance,\n fragEndOffset = fragCurrent.start + fragCurrent.duration + tolerance;\n // check if we seek position will be out of currently loaded frag range : if out cancel frag load, if in, don't do anything\n if (currentTime < fragStartOffset || currentTime > fragEndOffset) {\n if (fragCurrent.loader) {\n _logger.logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n this.fragPrevious = null;\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n } else {\n _logger.logger.log('seeking outside of buffer but within currently loaded fragment range');\n }\n }\n } else if (this.state === State.ENDED) {\n // switch to IDLE state to check for potential new fragment\n this.state = State.IDLE;\n }\n if (media) {\n this.lastCurrentTime = currentTime;\n }\n // avoid reporting fragment loop loading error in case user is seeking several times on same position\n if (this.state !== State.FRAG_LOADING && this.fragLoadIdx !== undefined) {\n this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;\n }\n // tick to speed up processing\n this.tick();\n }\n }, {\n key: 'onMediaSeeked',\n value: function onMediaSeeked() {\n _logger.logger.log('media seeked to ' + this.media.currentTime.toFixed(3));\n // tick to speed up FRAGMENT_PLAYING triggering\n this.tick();\n }\n }, {\n key: 'onMediaEnded',\n value: function onMediaEnded() {\n _logger.logger.log('media ended');\n // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n this.startPosition = this.lastCurrentTime = 0;\n }\n }, {\n key: 'onManifestLoading',\n value: function onManifestLoading() {\n // reset buffer on manifest loading\n _logger.logger.log('trigger BUFFER_RESET');\n this.hls.trigger(_events2.default.BUFFER_RESET);\n this.bufferRange = [];\n this.stalled = false;\n this.startPosition = this.lastCurrentTime = 0;\n }\n }, {\n key: 'onManifestParsed',\n value: function onManifestParsed(data) {\n var aac = false,\n heaac = false,\n codec;\n data.levels.forEach(function (level) {\n // detect if we have different kind of audio codecs used amongst playlists\n codec = level.audioCodec;\n if (codec) {\n if (codec.indexOf('mp4a.40.2') !== -1) {\n aac = true;\n }\n if (codec.indexOf('mp4a.40.5') !== -1) {\n heaac = true;\n }\n }\n });\n this.audioCodecSwitch = aac && heaac;\n if (this.audioCodecSwitch) {\n _logger.logger.log('both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC');\n }\n this.levels = data.levels;\n this.startLevelLoaded = false;\n this.startFragRequested = false;\n var config = this.config;\n if (config.autoStartLoad) {\n this.hls.startLoad(config.startPosition);\n }\n }\n }, {\n key: 'onLevelLoaded',\n value: function onLevelLoaded(data) {\n var newDetails = data.details,\n newLevelId = data.level,\n curLevel = this.levels[newLevelId],\n duration = newDetails.totalduration,\n sliding = 0;\n\n _logger.logger.log('level ' + newLevelId + ' loaded [' + newDetails.startSN + ',' + newDetails.endSN + '],duration:' + duration);\n this.levelLastLoaded = newLevelId;\n\n if (newDetails.live) {\n var curDetails = curLevel.details;\n if (curDetails && newDetails.fragments.length > 0) {\n // we already have details for that level, merge them\n _levelHelper2.default.mergeDetails(curDetails, newDetails);\n sliding = newDetails.fragments[0].start;\n this.liveSyncPosition = this.computeLivePosition(sliding, curDetails);\n if (newDetails.PTSKnown) {\n _logger.logger.log('live playlist sliding:' + sliding.toFixed(3));\n } else {\n _logger.logger.log('live playlist - outdated PTS, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n _logger.logger.log('live playlist - first load, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n }\n // override level info\n curLevel.details = newDetails;\n this.hls.trigger(_events2.default.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n\n if (this.startFragRequested === false) {\n // compute start position if set to -1. use it straight away if value is defined\n if (this.startPosition === -1 || this.lastCurrentTime === -1) {\n // first, check if start time offset has been set in playlist, if yes, use this value\n var startTimeOffset = newDetails.startTimeOffset;\n if (!isNaN(startTimeOffset)) {\n if (startTimeOffset < 0) {\n _logger.logger.log('negative start time offset ' + startTimeOffset + ', count from end of last fragment');\n startTimeOffset = sliding + duration + startTimeOffset;\n }\n _logger.logger.log('start time offset found in playlist, adjust startPosition to ' + startTimeOffset);\n this.startPosition = startTimeOffset;\n } else {\n // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n if (newDetails.live) {\n this.startPosition = this.computeLivePosition(sliding, newDetails);\n _logger.logger.log('configure startPosition to ' + this.startPosition);\n } else {\n this.startPosition = 0;\n }\n }\n }\n this.nextLoadPosition = this.startPosition;\n }\n // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n if (this.state === State.WAITING_LEVEL) {\n this.state = State.IDLE;\n }\n //trigger handler right now\n this.tick();\n }\n }, {\n key: 'onKeyLoaded',\n value: function onKeyLoaded() {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n }, {\n key: 'onFragLoaded',\n value: function onFragLoaded(data) {\n var fragCurrent = this.fragCurrent,\n fragLoaded = data.frag;\n if (this.state === State.FRAG_LOADING && fragCurrent && fragLoaded.type === 'main' && fragLoaded.level === fragCurrent.level && fragLoaded.sn === fragCurrent.sn) {\n var stats = data.stats,\n currentLevel = this.levels[fragCurrent.level],\n details = currentLevel.details;\n _logger.logger.log('Loaded ' + fragCurrent.sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + fragCurrent.level);\n // reset frag bitrate test in any case after frag loaded event\n this.bitrateTest = false;\n // if this frag was loaded to perform a bitrate test AND if hls.nextLoadLevel is greater than 0\n // then this means that we should be able to load a fragment at a higher quality level\n if (fragLoaded.bitrateTest === true && this.hls.nextLoadLevel) {\n // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n this.state = State.IDLE;\n this.startFragRequested = false;\n stats.tparsed = stats.tbuffered = performance.now();\n this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: fragCurrent, id: 'main' });\n this.tick();\n } else {\n this.state = State.PARSING;\n // transmux the MPEG-TS data to ISO-BMFF segments\n this.stats = stats;\n var duration = details.totalduration,\n start = !isNaN(fragCurrent.startDTS) ? fragCurrent.startDTS : fragCurrent.start,\n level = fragCurrent.level,\n sn = fragCurrent.sn,\n audioCodec = this.config.defaultAudioCodec || currentLevel.audioCodec;\n if (this.audioCodecSwap) {\n _logger.logger.log('swapping playlist audio codec');\n if (audioCodec === undefined) {\n audioCodec = this.lastAudioCodec;\n }\n if (audioCodec) {\n if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n }\n this.pendingAppending = 0;\n _logger.logger.log('Parsing ' + sn + ' of [' + details.startSN + ' ,' + details.endSN + '],level ' + level + ', cc ' + fragCurrent.cc);\n var demuxer = this.demuxer;\n if (!demuxer) {\n demuxer = this.demuxer = new _demuxer2.default(this.hls, 'main');\n }\n // time Offset is accurate if level PTS is known, or if playlist is not sliding (not live)\n var accurateTimeOffset = details.PTSKnown || !details.live;\n demuxer.push(data.payload, audioCodec, currentLevel.videoCodec, start, fragCurrent.cc, level, sn, duration, fragCurrent.decryptdata, accurateTimeOffset);\n }\n }\n this.fragLoadError = 0;\n }\n }, {\n key: 'onFragParsingInitSegment',\n value: function onFragParsingInitSegment(data) {\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n var tracks = data.tracks,\n trackName,\n track;\n\n // if audio track is expected to come from audio stream controller, discard any coming from main\n if (tracks.audio && this.altAudio) {\n delete tracks.audio;\n }\n // include levelCodec in audio and video tracks\n track = tracks.audio;\n if (track) {\n var audioCodec = this.levels[this.level].audioCodec,\n ua = navigator.userAgent.toLowerCase();\n if (audioCodec && this.audioCodecSwap) {\n _logger.logger.log('swapping playlist audio codec');\n if (audioCodec.indexOf('mp4a.40.5') !== -1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n // in case AAC and HE-AAC audio codecs are signalled in manifest\n // force HE-AAC , as it seems that most browsers prefers that way,\n // except for mono streams OR on FF\n // these conditions might need to be reviewed ...\n if (this.audioCodecSwitch) {\n // don't force HE-AAC if mono stream\n if (track.metadata.channelCount !== 1 &&\n // don't force HE-AAC if firefox\n ua.indexOf('firefox') === -1) {\n audioCodec = 'mp4a.40.5';\n }\n }\n // HE-AAC is broken on Android, always signal audio codec as AAC even if variant manifest states otherwise\n if (ua.indexOf('android') !== -1) {\n audioCodec = 'mp4a.40.2';\n _logger.logger.log('Android: force audio codec to' + audioCodec);\n }\n track.levelCodec = audioCodec;\n track.id = data.id;\n }\n track = tracks.video;\n if (track) {\n track.levelCodec = this.levels[this.level].videoCodec;\n track.id = data.id;\n }\n\n // if remuxer specify that a unique track needs to generated,\n // let's merge all tracks together\n if (data.unique) {\n var mergedTrack = {\n codec: '',\n levelCodec: ''\n };\n for (trackName in data.tracks) {\n track = tracks[trackName];\n mergedTrack.container = track.container;\n if (mergedTrack.codec) {\n mergedTrack.codec += ',';\n mergedTrack.levelCodec += ',';\n }\n if (track.codec) {\n mergedTrack.codec += track.codec;\n }\n if (track.levelCodec) {\n mergedTrack.levelCodec += track.levelCodec;\n }\n }\n tracks = { audiovideo: mergedTrack };\n }\n this.hls.trigger(_events2.default.BUFFER_CODECS, tracks);\n // loop through tracks that are going to be provided to bufferController\n for (trackName in tracks) {\n track = tracks[trackName];\n _logger.logger.log('main track:' + trackName + ',container:' + track.container + ',codecs[level/parsed]=[' + track.levelCodec + '/' + track.codec + ']');\n var initSegment = track.initSegment;\n if (initSegment) {\n this.pendingAppending++;\n this.hls.trigger(_events2.default.BUFFER_APPENDING, { type: trackName, data: initSegment, parent: 'main', content: 'initSegment' });\n }\n }\n //trigger handler right now\n this.tick();\n }\n }\n }, {\n key: 'onFragParsingData',\n value: function onFragParsingData(data) {\n var _this2 = this;\n\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && !(data.type === 'audio' && this.altAudio) && // filter out main audio if audio track is loaded through audio stream controller\n this.state === State.PARSING) {\n var level = this.levels[this.level],\n frag = this.fragCurrent;\n\n _logger.logger.log('Parsed ' + data.type + ',PTS:[' + data.startPTS.toFixed(3) + ',' + data.endPTS.toFixed(3) + '],DTS:[' + data.startDTS.toFixed(3) + '/' + data.endDTS.toFixed(3) + '],nb:' + data.nb + ',dropped:' + (data.dropped || 0));\n\n var drift = _levelHelper2.default.updateFragPTSDTS(level.details, frag.sn, data.startPTS, data.endPTS, data.startDTS, data.endDTS),\n hls = this.hls;\n hls.trigger(_events2.default.LEVEL_PTS_UPDATED, { details: level.details, level: this.level, drift: drift });\n\n // has remuxer dropped video frames located before first keyframe ?\n if (data.type === 'video') {\n frag.dropped = data.dropped;\n }\n\n [data.data1, data.data2].forEach(function (buffer) {\n if (buffer) {\n _this2.pendingAppending++;\n hls.trigger(_events2.default.BUFFER_APPENDING, { type: data.type, data: buffer, parent: 'main', content: 'data' });\n }\n });\n\n this.nextLoadPosition = data.endPTS;\n this.bufferRange.push({ type: data.type, start: data.startPTS, end: data.endPTS, frag: frag });\n\n //trigger handler right now\n this.tick();\n }\n }\n }, {\n key: 'onFragParsed',\n value: function onFragParsed(data) {\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && data.id === 'main' && data.sn === fragCurrent.sn && data.level === fragCurrent.level && this.state === State.PARSING) {\n this.stats.tparsed = performance.now();\n this.state = State.PARSED;\n this._checkAppendedParsed();\n }\n }\n }, {\n key: 'onAudioTrackSwitch',\n value: function onAudioTrackSwitch(data) {\n // if any URL found on new audio track, it is an alternate audio track\n var altAudio = !!data.url;\n // if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered\n if (!altAudio) {\n if (this.mediaBuffer !== this.media) {\n _logger.logger.log('switching on main audio, use media.buffered to schedule main fragment loading');\n this.mediaBuffer = this.media;\n var fragCurrent = this.fragCurrent;\n // we need to refill audio buffer from main: cancel any frag loading to speed up audio switch\n if (fragCurrent.loader) {\n _logger.logger.log('switching to main audio track, cancel main fragment load');\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n this.fragPrevious = null;\n // destroy demuxer to force init segment generation (following audio switch)\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n }\n } else {\n // if we switch on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered\n if (this.videoBuffer && this.mediaBuffer !== this.videoBuffer) {\n _logger.logger.log('switching on alternate audio, use video.buffered to schedule main fragment loading');\n this.mediaBuffer = this.videoBuffer;\n }\n }\n this.altAudio = altAudio;\n }\n }, {\n key: 'onBufferCreated',\n value: function onBufferCreated(data) {\n var tracks = data.tracks,\n mediaTrack = void 0,\n name = void 0,\n alternate = false;\n for (var type in tracks) {\n var track = tracks[type];\n if (track.id === 'main') {\n name = type;\n mediaTrack = track;\n // keep video source buffer reference\n if (type === 'video') {\n this.videoBuffer = tracks[type].buffer;\n }\n } else {\n alternate = true;\n }\n }\n if (alternate && mediaTrack) {\n _logger.logger.log('alternate track found, use ' + name + '.buffered to schedule main fragment loading');\n this.mediaBuffer = mediaTrack.buffer;\n } else {\n this.mediaBuffer = this.media;\n }\n }\n }, {\n key: 'onBufferAppended',\n value: function onBufferAppended(data) {\n if (data.parent === 'main') {\n switch (this.state) {\n case State.PARSING:\n case State.PARSED:\n this.pendingAppending--;\n this._checkAppendedParsed();\n break;\n default:\n break;\n }\n }\n }\n }, {\n key: '_checkAppendedParsed',\n value: function _checkAppendedParsed() {\n //trigger handler right now\n if (this.state === State.PARSED && this.pendingAppending === 0) {\n var frag = this.fragCurrent,\n stats = this.stats;\n if (frag) {\n this.fragPrevious = frag;\n stats.tbuffered = performance.now();\n // we should get rid of this.fragLastKbps\n this.fragLastKbps = Math.round(8 * stats.total / (stats.tbuffered - stats.tfirst));\n this.hls.trigger(_events2.default.FRAG_BUFFERED, { stats: stats, frag: frag, id: 'main' });\n var media = this.mediaBuffer ? this.mediaBuffer : this.media;\n _logger.logger.log('main buffered : ' + _timeRanges2.default.toString(media.buffered));\n this.state = State.IDLE;\n }\n this.tick();\n }\n }\n }, {\n key: 'onError',\n value: function onError(data) {\n var frag = data.frag || this.fragCurrent;\n // don't handle frag error not related to main fragment\n if (frag && frag.type !== 'main') {\n return;\n }\n var media = this.media,\n\n // 0.5 : tolerance needed as some browsers stalls playback before reaching buffered end\n mediaBuffered = media && _bufferHelper2.default.isBuffered(media, media.currentTime) && _bufferHelper2.default.isBuffered(media, media.currentTime + 0.5);\n switch (data.details) {\n case _errors.ErrorDetails.FRAG_LOAD_ERROR:\n case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT:\n if (!data.fatal) {\n var loadError = this.fragLoadError;\n if (loadError) {\n loadError++;\n } else {\n loadError = 1;\n }\n var config = this.config;\n // keep retrying / don't raise fatal network error if current position is buffered\n if (loadError <= config.fragLoadingMaxRetry || mediaBuffered) {\n this.fragLoadError = loadError;\n // reset load counter to avoid frag loop loading error\n frag.loadCounter = 0;\n // exponential backoff capped to config.fragLoadingMaxRetryTimeout\n var delay = Math.min(Math.pow(2, loadError - 1) * config.fragLoadingRetryDelay, config.fragLoadingMaxRetryTimeout);\n _logger.logger.warn('mediaController: frag loading failed, retry in ' + delay + ' ms');\n this.retryDate = performance.now() + delay;\n // retry loading state\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n _logger.logger.error('mediaController: ' + data.details + ' reaches max retry, redispatch as fatal ...');\n // redispatch same error but with fatal set to true\n data.fatal = true;\n this.hls.trigger(_events2.default.ERROR, data);\n this.state = State.ERROR;\n }\n }\n break;\n case _errors.ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n if (!data.fatal) {\n // if buffer is not empty\n if (mediaBuffered) {\n // try to reduce max buffer length : rationale is that we could get\n // frag loop loading error because of buffer eviction\n this._reduceMaxBufferLength(frag.duration);\n this.state = State.IDLE;\n } else {\n // buffer empty. report as fatal if in manual mode or if lowest level.\n // level controller takes care of emergency switch down logic\n if (!frag.autoLevel || frag.level === 0) {\n // redispatch same error but with fatal set to true\n data.fatal = true;\n this.hls.trigger(_events2.default.ERROR, data);\n this.state = State.ERROR;\n }\n }\n }\n break;\n case _errors.ErrorDetails.LEVEL_LOAD_ERROR:\n case _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n case _errors.ErrorDetails.KEY_LOAD_ERROR:\n case _errors.ErrorDetails.KEY_LOAD_TIMEOUT:\n // when in ERROR state, don't switch back to IDLE state in case a non-fatal error is received\n if (this.state !== State.ERROR) {\n // if fatal error, stop processing, otherwise move to IDLE to retry loading\n this.state = data.fatal ? State.ERROR : State.IDLE;\n _logger.logger.warn('mediaController: ' + data.details + ' while loading frag,switch to ' + this.state + ' state ...');\n }\n break;\n case _errors.ErrorDetails.BUFFER_FULL_ERROR:\n // if in appending state\n if (this.state === State.PARSING || this.state === State.PARSED) {\n // reduce max buf len if current position is buffered\n if (mediaBuffered) {\n this._reduceMaxBufferLength(frag.duration);\n this.state = State.IDLE;\n } else {\n // current position is not buffered, but browser is still complaining about buffer full error\n // this happens on IE/Edge, refer to https://github.com/dailymotion/hls.js/pull/708\n // in that case flush the whole buffer to recover\n _logger.logger.warn('buffer full error also media.currentTime is not buffered, flush everything');\n this.fragCurrent = null;\n this.state = State.PAUSED;\n // flush everything\n this.hls.trigger(_events2.default.BUFFER_FLUSHING, { startOffset: 0, endOffset: Number.POSITIVE_INFINITY });\n }\n }\n break;\n default:\n break;\n }\n }\n }, {\n key: '_reduceMaxBufferLength',\n value: function _reduceMaxBufferLength(minLength) {\n var config = this.config;\n if (config.maxMaxBufferLength >= minLength) {\n // reduce max buffer length as it might be too high. we do this to avoid loop flushing ...\n config.maxMaxBufferLength /= 2;\n _logger.logger.warn('reduce max buffer length to ' + config.maxMaxBufferLength + 's and switch to IDLE state');\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * config.fragLoadingLoopThreshold;\n }\n }\n }, {\n key: '_checkBuffer',\n value: function _checkBuffer() {\n var media = this.media;\n // if ready state different from HAVE_NOTHING (numeric value 0), we are allowed to seek\n if (media && media.readyState) {\n var currentTime = media.currentTime,\n buffered = media.buffered;\n // adjust currentTime to start position on loaded metadata\n if (!this.loadedmetadata && buffered.length) {\n this.loadedmetadata = true;\n // only adjust currentTime if different from startPosition or if startPosition not buffered\n // at that stage, there should be only one buffered range, as we reach that code after first fragment has been buffered\n var startPosition = this.startPosition,\n startPositionBuffered = _bufferHelper2.default.isBuffered(media, startPosition);\n // if currentTime not matching with expected startPosition or startPosition not buffered\n if (currentTime !== startPosition || !startPositionBuffered) {\n _logger.logger.log('target start position:' + startPosition);\n // if startPosition not buffered, let's seek to buffered.start(0)\n if (!startPositionBuffered) {\n startPosition = buffered.start(0);\n _logger.logger.log('target start position not buffered, seek to buffered.start(0) ' + startPosition);\n }\n _logger.logger.log('adjust currentTime from ' + currentTime + ' to ' + startPosition);\n media.currentTime = startPosition;\n }\n } else if (this.immediateSwitch) {\n this.immediateLevelSwitchEnd();\n } else {\n var bufferInfo = _bufferHelper2.default.bufferInfo(media, currentTime, 0),\n expectedPlaying = !(media.paused || // not playing when media is paused\n media.ended || // not playing when media is ended\n media.buffered.length === 0),\n // not playing if nothing buffered\n jumpThreshold = 0.5,\n // tolerance needed as some browsers stalls playback before reaching buffered range end\n playheadMoving = currentTime > media.playbackRate * this.lastCurrentTime,\n config = this.config;\n\n if (this.stalled && playheadMoving) {\n this.stalled = false;\n _logger.logger.log('playback not stuck anymore @' + currentTime);\n }\n // check buffer upfront\n // if less than jumpThreshold second is buffered, let's check in more details\n if (expectedPlaying && bufferInfo.len <= jumpThreshold) {\n if (playheadMoving) {\n // playhead moving\n jumpThreshold = 0;\n this.seekHoleNudgeDuration = 0;\n } else {\n // playhead not moving AND media expected to play\n if (!this.stalled) {\n this.seekHoleNudgeDuration = 0;\n _logger.logger.log('playback seems stuck @' + currentTime);\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_STALLED_ERROR, fatal: false });\n this.stalled = true;\n } else {\n this.seekHoleNudgeDuration += config.seekHoleNudgeDuration;\n }\n }\n // if we are below threshold, try to jump to start of next buffer range if close\n if (bufferInfo.len <= jumpThreshold) {\n // no buffer available @ currentTime, check if next buffer is close (within a config.maxSeekHole second range)\n var nextBufferStart = bufferInfo.nextStart,\n delta = nextBufferStart - currentTime;\n if (nextBufferStart && delta < config.maxSeekHole && delta > 0) {\n // next buffer is close ! adjust currentTime to nextBufferStart\n // this will ensure effective video decoding\n _logger.logger.log('adjust currentTime from ' + media.currentTime + ' to next buffered @ ' + nextBufferStart + ' + nudge ' + this.seekHoleNudgeDuration);\n var hole = nextBufferStart + this.seekHoleNudgeDuration - media.currentTime;\n media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false, hole: hole });\n }\n }\n }\n }\n }\n }\n }, {\n key: 'onFragLoadEmergencyAborted',\n value: function onFragLoadEmergencyAborted() {\n this.state = State.IDLE;\n // if loadedmetadata is not set, it means that we are emergency switch down on first frag\n // in that case, reset startFragRequested flag\n if (!this.loadedmetadata) {\n this.startFragRequested = false;\n }\n this.tick();\n }\n }, {\n key: 'onBufferFlushed',\n value: function onBufferFlushed() {\n /* after successful buffer flushing, rebuild buffer Range array\n loop through existing buffer range and check if\n corresponding range is still buffered. only push to new array already buffered range\n use mediaBuffered instead of media (so that we will check against video.buffered ranges in case of alt audio track)\n */\n var media = this.mediaBuffer ? this.mediaBuffer : this.media,\n bufferRange = this.bufferRange,\n newRange = [],\n range = void 0,\n i = void 0;\n for (i = 0; i < bufferRange.length; i++) {\n range = bufferRange[i];\n if (_bufferHelper2.default.isBuffered(media, (range.start + range.end) / 2)) {\n newRange.push(range);\n }\n }\n this.bufferRange = newRange;\n\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n }\n }, {\n key: 'swapAudioCodec',\n value: function swapAudioCodec() {\n this.audioCodecSwap = !this.audioCodecSwap;\n }\n }, {\n key: 'computeLivePosition',\n value: function computeLivePosition(sliding, levelDetails) {\n var targetLatency = this.config.liveSyncDuration !== undefined ? this.config.liveSyncDuration : this.config.liveSyncDurationCount * levelDetails.targetduration;\n return sliding + Math.max(0, levelDetails.totalduration - targetLatency);\n }\n }, {\n key: 'state',\n set: function set(nextState) {\n if (this.state !== nextState) {\n var previousState = this.state;\n this._state = nextState;\n _logger.logger.log('engine state transition from ' + previousState + ' to ' + nextState);\n this.hls.trigger(_events2.default.STREAM_STATE_TRANSITION, { previousState: previousState, nextState: nextState });\n }\n },\n get: function get() {\n return this._state;\n }\n }, {\n key: 'currentLevel',\n get: function get() {\n var media = this.media;\n if (media) {\n var range = this.getBufferRange(media.currentTime);\n if (range) {\n return range.frag.level;\n }\n }\n return -1;\n }\n }, {\n key: 'nextBufferRange',\n get: function get() {\n var media = this.media;\n if (media) {\n // first get end range of current fragment\n return this.followingBufferRange(this.getBufferRange(media.currentTime));\n } else {\n return null;\n }\n }\n }, {\n key: 'nextLevel',\n get: function get() {\n var range = this.nextBufferRange;\n if (range) {\n return range.frag.level;\n } else {\n return -1;\n }\n }\n }, {\n key: 'liveSyncPosition',\n get: function get() {\n return this._liveSyncPosition;\n },\n set: function set(value) {\n this._liveSyncPosition = value;\n }\n }]);\n\n return StreamController;\n}(_eventHandler2.default);\n\nexports.default = StreamController;\n\n},{\"20\":20,\"24\":24,\"25\":25,\"26\":26,\"28\":28,\"29\":29,\"39\":39,\"43\":43,\"45\":45}],12:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _cea608Parser = _dereq_(40);\n\nvar _cea608Parser2 = _interopRequireDefault(_cea608Parser);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Timeline Controller\n */\n\nvar TimelineController = function (_EventHandler) {\n _inherits(TimelineController, _EventHandler);\n\n function TimelineController(hls) {\n _classCallCheck(this, TimelineController);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(TimelineController).call(this, hls, _events2.default.MEDIA_ATTACHING, _events2.default.MEDIA_DETACHING, _events2.default.FRAG_PARSING_USERDATA, _events2.default.MANIFEST_LOADING, _events2.default.FRAG_LOADED, _events2.default.LEVEL_SWITCH));\n\n _this.hls = hls;\n _this.config = hls.config;\n _this.enabled = true;\n _this.Cues = hls.config.cueHandler;\n\n if (_this.config.enableCEA708Captions) {\n var self = _this;\n\n var channel1 = {\n 'newCue': function newCue(startTime, endTime, screen) {\n if (!self.textTrack1) {\n //Enable reuse of existing text track.\n var existingTrack1 = self.getExistingTrack('1');\n if (!existingTrack1) {\n self.textTrack1 = self.createTextTrack('captions', 'English', 'en');\n self.textTrack1.textTrack1 = true;\n } else {\n self.textTrack1 = existingTrack1;\n self.clearCurrentCues(self.textTrack1);\n\n var e = new window.Event('addtrack');\n e.track = self.textTrack1;\n self.media.dispatchEvent(e);\n }\n }\n\n self.Cues.newCue(self.textTrack1, startTime, endTime, screen);\n }\n };\n\n var channel2 = {\n 'newCue': function newCue(startTime, endTime, screen) {\n if (!self.textTrack2) {\n //Enable reuse of existing text track.\n var existingTrack2 = self.getExistingTrack('2');\n if (!existingTrack2) {\n self.textTrack2 = self.createTextTrack('captions', 'Spanish', 'es');\n self.textTrack2.textTrack2 = true;\n } else {\n self.textTrack2 = existingTrack2;\n self.clearCurrentCues(self.textTrack2);\n\n var e = new window.Event('addtrack');\n e.track = self.textTrack2;\n self.media.dispatchEvent(e);\n }\n }\n\n self.Cues.newCue(self.textTrack2, startTime, endTime, screen);\n }\n };\n\n _this.cea608Parser = new _cea608Parser2.default(0, channel1, channel2);\n }\n return _this;\n }\n\n _createClass(TimelineController, [{\n key: 'clearCurrentCues',\n value: function clearCurrentCues(track) {\n if (track && track.cues) {\n while (track.cues.length > 0) {\n track.removeCue(track.cues[0]);\n }\n }\n }\n }, {\n key: 'getExistingTrack',\n value: function getExistingTrack(channelNumber) {\n var media = this.media;\n if (media) {\n for (var i = 0; i < media.textTracks.length; i++) {\n var textTrack = media.textTracks[i];\n var propName = 'textTrack' + channelNumber;\n if (textTrack[propName] === true) {\n return textTrack;\n }\n }\n }\n return null;\n }\n }, {\n key: 'createTextTrack',\n value: function createTextTrack(kind, label, lang) {\n if (this.media) {\n return this.media.addTextTrack(kind, label, lang);\n }\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onMediaAttaching',\n value: function onMediaAttaching(data) {\n this.media = data.media;\n }\n }, {\n key: 'onMediaDetaching',\n value: function onMediaDetaching() {}\n }, {\n key: 'onManifestLoading',\n value: function onManifestLoading() {\n this.lastPts = Number.NEGATIVE_INFINITY;\n }\n }, {\n key: 'onLevelSwitch',\n value: function onLevelSwitch() {\n if (this.hls.currentLevel.closedCaptions === 'NONE') {\n this.enabled = false;\n } else {\n this.enabled = true;\n }\n }\n }, {\n key: 'onFragLoaded',\n value: function onFragLoaded(data) {\n if (data.frag.type === 'main') {\n var pts = data.frag.start; //Number.POSITIVE_INFINITY;\n // if this is a frag for a previously loaded timerange, remove all captions\n // TODO: consider just removing captions for the timerange\n if (pts <= this.lastPts) {\n this.clearCurrentCues(this.textTrack1);\n this.clearCurrentCues(this.textTrack2);\n }\n this.lastPts = pts;\n }\n }\n }, {\n key: 'onFragParsingUserdata',\n value: function onFragParsingUserdata(data) {\n // push all of the CEA-708 messages into the interpreter\n // immediately. It will create the proper timestamps based on our PTS value\n if (this.enabled) {\n for (var i = 0; i < data.samples.length; i++) {\n var ccdatas = this.extractCea608Data(data.samples[i].bytes);\n this.cea608Parser.addData(data.samples[i].pts, ccdatas);\n }\n }\n }\n }, {\n key: 'extractCea608Data',\n value: function extractCea608Data(byteArray) {\n var count = byteArray[0] & 31;\n var position = 2;\n var tmpByte, ccbyte1, ccbyte2, ccValid, ccType;\n var actualCCBytes = [];\n\n for (var j = 0; j < count; j++) {\n tmpByte = byteArray[position++];\n ccbyte1 = 0x7F & byteArray[position++];\n ccbyte2 = 0x7F & byteArray[position++];\n ccValid = (4 & tmpByte) === 0 ? false : true;\n ccType = 3 & tmpByte;\n\n if (ccbyte1 === 0 && ccbyte2 === 0) {\n continue;\n }\n\n if (ccValid) {\n if (ccType === 0) // || ccType === 1\n {\n actualCCBytes.push(ccbyte1);\n actualCCBytes.push(ccbyte2);\n }\n }\n }\n return actualCCBytes;\n }\n }]);\n\n return TimelineController;\n}(_eventHandler2.default);\n\nexports.default = TimelineController;\n\n},{\"25\":25,\"26\":26,\"40\":40}],13:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\nvar AES = function () {\n\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n\n function AES(key) {\n _classCallCheck(this, AES);\n\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n this._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n this._precompute();\n\n var i,\n j,\n tmp,\n encKey,\n decKey,\n sbox = this._tables[0][4],\n decTable = this._tables[1],\n keyLen = key.length,\n rcon = 1;\n\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size=' + keyLen);\n }\n\n encKey = key.slice(0);\n decKey = [];\n this._key = [encKey, decKey];\n\n // schedule encryption keys\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i - 1];\n\n // apply sbox\n if (i % keyLen === 0 || keyLen === 8 && i % keyLen === 4) {\n tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n // shift rows and add rcon\n if (i % keyLen === 0) {\n tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n rcon = rcon << 1 ^ (rcon >> 7) * 283;\n }\n }\n\n encKey[i] = encKey[i - keyLen] ^ tmp;\n }\n\n // schedule decryption keys\n for (j = 0; i; j++, i--) {\n tmp = encKey[j & 3 ? i : i - 4];\n if (i <= 4 || j < 4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ decTable[1][sbox[tmp >> 16 & 255]] ^ decTable[2][sbox[tmp >> 8 & 255]] ^ decTable[3][sbox[tmp & 255]];\n }\n }\n }\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n\n\n _createClass(AES, [{\n key: '_precompute',\n value: function _precompute() {\n var encTable = this._tables[0],\n decTable = this._tables[1],\n sbox = encTable[4],\n sboxInv = decTable[4],\n i,\n x,\n xInv,\n d = [],\n th = [],\n x2,\n x4,\n x8,\n s,\n tEnc,\n tDec;\n\n // Compute double and third tables\n for (i = 0; i < 256; i++) {\n th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n }\n\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n s = s >> 8 ^ s & 255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x;\n\n // Compute MixColumns\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n }\n }\n\n // Compactify. Considerable speedup on Firefox.\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n }\n\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n * @param encrypted0 {number} the first word to decrypt\n * @param encrypted1 {number} the second word to decrypt\n * @param encrypted2 {number} the third word to decrypt\n * @param encrypted3 {number} the fourth word to decrypt\n * @param out {Int32Array} the array to write the decrypted words\n * into\n * @param offset {number} the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n\n }, {\n key: 'decrypt',\n value: function decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n var key = this._key[1],\n\n // state variables a,b,c,d are loaded with pre-whitened data\n a = encrypted0 ^ key[0],\n b = encrypted3 ^ key[1],\n c = encrypted2 ^ key[2],\n d = encrypted1 ^ key[3],\n a2,\n b2,\n c2,\n nInnerRounds = key.length / 4 - 2,\n // key.length === 2 ?\n i,\n kIndex = 4,\n table = this._tables[1],\n\n\n // load up the tables\n table0 = table[0],\n table1 = table[1],\n table2 = table[2],\n table3 = table[3],\n sbox = table[4];\n\n // Inner rounds. Cribbed from OpenSSL.\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a >>> 24] ^ table1[b >> 16 & 255] ^ table2[c >> 8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b >>> 24] ^ table1[c >> 16 & 255] ^ table2[d >> 8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c >>> 24] ^ table1[d >> 16 & 255] ^ table2[a >> 8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d >>> 24] ^ table1[a >> 16 & 255] ^ table2[b >> 8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a = a2;b = b2;c = c2;\n }\n\n // Last round.\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] = sbox[a >>> 24] << 24 ^ sbox[b >> 16 & 255] << 16 ^ sbox[c >> 8 & 255] << 8 ^ sbox[d & 255] ^ key[kIndex++];\n a2 = a;a = b;b = c;c = d;d = a2;\n }\n }\n }]);\n\n return AES;\n}();\n\nexports.default = AES;\n\n},{}],14:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /*\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\nvar _aes = _dereq_(13);\n\nvar _aes2 = _interopRequireDefault(_aes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar AES128Decrypter = function () {\n function AES128Decrypter(key, initVector) {\n _classCallCheck(this, AES128Decrypter);\n\n this.key = key;\n this.iv = initVector;\n }\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n\n\n _createClass(AES128Decrypter, [{\n key: 'ntoh',\n value: function ntoh(word) {\n return word << 24 | (word & 0xff00) << 8 | (word & 0xff0000) >> 8 | word >>> 24;\n }\n\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n * @param encrypted {Uint8Array} the encrypted bytes\n * @param key {Uint32Array} the bytes of the decryption key\n * @param initVector {Uint32Array} the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n\n }, {\n key: 'doDecrypt',\n value: function doDecrypt(encrypted, key, initVector) {\n var\n // word-level access to the encrypted bytes\n encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2),\n decipher = new _aes2.default(Array.prototype.slice.call(key)),\n\n\n // byte and word-level access for the decrypted output\n decrypted = new Uint8Array(encrypted.byteLength),\n decrypted32 = new Int32Array(decrypted.buffer),\n\n\n // temporary variables for working with the IV, encrypted, and\n // decrypted data\n init0,\n init1,\n init2,\n init3,\n encrypted0,\n encrypted1,\n encrypted2,\n encrypted3,\n\n\n // iteration variable\n wordIx;\n\n // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n init0 = ~ ~initVector[0];\n init1 = ~ ~initVector[1];\n init2 = ~ ~initVector[2];\n init3 = ~ ~initVector[3];\n\n // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ~ ~this.ntoh(encrypted32[wordIx]);\n encrypted1 = ~ ~this.ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ~ ~this.ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ~ ~this.ntoh(encrypted32[wordIx + 3]);\n\n // decrypt the block\n decipher.decrypt(encrypted0, encrypted1, encrypted2, encrypted3, decrypted32, wordIx);\n\n // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n decrypted32[wordIx] = this.ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = this.ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = this.ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = this.ntoh(decrypted32[wordIx + 3] ^ init3);\n\n // setup the IV for the next round\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n\n return decrypted;\n }\n }, {\n key: 'localDecrypt',\n value: function localDecrypt(encrypted, key, initVector, decrypted) {\n var bytes = this.doDecrypt(encrypted, key, initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n }\n }, {\n key: 'decrypt',\n value: function decrypt(encrypted) {\n var step = 4 * 8000,\n\n //encrypted32 = new Int32Array(encrypted.buffer),\n encrypted32 = new Int32Array(encrypted),\n decrypted = new Uint8Array(encrypted.byteLength),\n i = 0;\n\n // split up the encryption job and do the individual chunks asynchronously\n var key = this.key;\n var initVector = this.iv;\n this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([this.ntoh(encrypted32[i - 4]), this.ntoh(encrypted32[i - 3]), this.ntoh(encrypted32[i - 2]), this.ntoh(encrypted32[i - 1])]);\n this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n }\n\n return decrypted;\n }\n }]);\n\n return AES128Decrypter;\n}();\n\nexports.default = AES128Decrypter;\n\n},{\"13\":13}],15:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /*\n * AES128 decryption.\n */\n\nvar _aes128Decrypter = _dereq_(14);\n\nvar _aes128Decrypter2 = _interopRequireDefault(_aes128Decrypter);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Decrypter = function () {\n function Decrypter(hls) {\n _classCallCheck(this, Decrypter);\n\n this.hls = hls;\n try {\n var browserCrypto = window ? window.crypto : crypto;\n this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;\n this.disableWebCrypto = !this.subtle;\n } catch (e) {\n this.disableWebCrypto = true;\n }\n }\n\n _createClass(Decrypter, [{\n key: 'destroy',\n value: function destroy() {}\n }, {\n key: 'decrypt',\n value: function decrypt(data, key, iv, callback) {\n if (this.disableWebCrypto && this.hls.config.enableSoftwareAES) {\n this.decryptBySoftware(data, key, iv, callback);\n } else {\n this.decryptByWebCrypto(data, key, iv, callback);\n }\n }\n }, {\n key: 'decryptByWebCrypto',\n value: function decryptByWebCrypto(data, key, iv, callback) {\n var _this = this;\n\n _logger.logger.log('decrypting by WebCrypto API');\n\n this.subtle.importKey('raw', key, { name: 'AES-CBC', length: 128 }, false, ['decrypt']).then(function (importedKey) {\n _this.subtle.decrypt({ name: 'AES-CBC', iv: iv.buffer }, importedKey, data).then(callback).catch(function (err) {\n _this.onWebCryptoError(err, data, key, iv, callback);\n });\n }).catch(function (err) {\n _this.onWebCryptoError(err, data, key, iv, callback);\n });\n }\n }, {\n key: 'decryptBySoftware',\n value: function decryptBySoftware(data, key8, iv8, callback) {\n _logger.logger.log('decrypting by JavaScript Implementation');\n\n var view = new DataView(key8.buffer);\n var key = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\n view = new DataView(iv8.buffer);\n var iv = new Uint32Array([view.getUint32(0), view.getUint32(4), view.getUint32(8), view.getUint32(12)]);\n\n var decrypter = new _aes128Decrypter2.default(key, iv);\n callback(decrypter.decrypt(data).buffer);\n }\n }, {\n key: 'onWebCryptoError',\n value: function onWebCryptoError(err, data, key, iv, callback) {\n if (this.hls.config.enableSoftwareAES) {\n _logger.logger.log('disabling to use WebCrypto API');\n this.disableWebCrypto = true;\n this.decryptBySoftware(data, key, iv, callback);\n } else {\n _logger.logger.error('decrypting error : ' + err.message);\n this.hls.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_DECRYPT_ERROR, fatal: true, reason: err.message });\n }\n }\n }]);\n\n return Decrypter;\n}();\n\nexports.default = Decrypter;\n\n},{\"14\":14,\"24\":24,\"43\":43}],16:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * AAC demuxer\n */\n\n\nvar _adts = _dereq_(17);\n\nvar _adts2 = _interopRequireDefault(_adts);\n\nvar _logger = _dereq_(43);\n\nvar _id = _dereq_(22);\n\nvar _id2 = _interopRequireDefault(_id);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar AACDemuxer = function () {\n function AACDemuxer(observer, id, remuxerClass, config) {\n _classCallCheck(this, AACDemuxer);\n\n this.observer = observer;\n this.id = id;\n this.remuxerClass = remuxerClass;\n this.config = config;\n this.remuxer = new this.remuxerClass(observer, id, config);\n this.insertDiscontinuity();\n }\n\n _createClass(AACDemuxer, [{\n key: 'insertDiscontinuity',\n value: function insertDiscontinuity() {\n this._aacTrack = { container: 'audio/adts', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n }\n }, {\n key: 'push',\n\n\n // feed incoming data to the front of the parsing pipeline\n value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n var track,\n id3 = new _id2.default(data),\n pts = 90 * id3.timeStamp,\n config,\n frameLength,\n frameDuration,\n frameIndex,\n offset,\n headerLength,\n stamp,\n len,\n aacSample;\n\n var contiguous = false;\n if (cc !== this.lastCC) {\n _logger.logger.log(this.id + ' discontinuity detected');\n this.lastCC = cc;\n this.insertDiscontinuity();\n this.remuxer.switchLevel();\n this.remuxer.insertDiscontinuity();\n } else if (level !== this.lastLevel) {\n _logger.logger.log('audio track switch detected');\n this.lastLevel = level;\n this.remuxer.switchLevel();\n this.insertDiscontinuity();\n } else if (sn === this.lastSN + 1) {\n contiguous = true;\n }\n track = this._aacTrack;\n this.lastSN = sn;\n this.lastLevel = level;\n\n // look for ADTS header (0xFFFx)\n for (offset = id3.length, len = data.length; offset < len - 1; offset++) {\n if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n break;\n }\n }\n\n if (!track.audiosamplerate) {\n config = _adts2.default.getAudioConfig(this.observer, data, offset, audioCodec);\n track.config = config.config;\n track.audiosamplerate = config.samplerate;\n track.channelCount = config.channelCount;\n track.codec = config.codec;\n track.duration = duration;\n _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);\n }\n frameIndex = 0;\n frameDuration = 1024 * 90000 / track.audiosamplerate;\n while (offset + 5 < len) {\n // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;\n // retrieve frame size\n frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;\n frameLength -= headerLength;\n //stamp = pes.pts;\n\n if (frameLength > 0 && offset + headerLength + frameLength <= len) {\n stamp = pts + frameIndex * frameDuration;\n //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };\n track.samples.push(aacSample);\n track.len += frameLength;\n offset += frameLength + headerLength;\n frameIndex++;\n // look for ADTS header (0xFFFx)\n for (; offset < len - 1; offset++) {\n if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n break;\n }\n }\n } else {\n break;\n }\n }\n this.remuxer.remux(level, sn, this._aacTrack, { samples: [] }, { samples: [{ pts: pts, dts: pts, unit: id3.payload }] }, { samples: [] }, timeOffset, contiguous, accurateTimeOffset);\n }\n }, {\n key: 'destroy',\n value: function destroy() {}\n }], [{\n key: 'probe',\n value: function probe(data) {\n // check if data contains ID3 timestamp and ADTS sync worc\n var id3 = new _id2.default(data),\n offset,\n len;\n if (id3.hasTimeStamp) {\n // look for ADTS header (0xFFFx)\n for (offset = id3.length, len = data.length; offset < len - 1; offset++) {\n if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n //logger.log('ADTS sync word found !');\n return true;\n }\n }\n }\n return false;\n }\n }]);\n\n return AACDemuxer;\n}();\n\nexports.default = AACDemuxer;\n\n},{\"17\":17,\"22\":22,\"43\":43}],17:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * ADTS parser helper\n */\n\n\nvar _logger = _dereq_(43);\n\nvar _errors = _dereq_(24);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ADTS = function () {\n function ADTS() {\n _classCallCheck(this, ADTS);\n }\n\n _createClass(ADTS, null, [{\n key: 'getAudioConfig',\n value: function getAudioConfig(observer, data, offset, audioCodec) {\n var adtsObjectType,\n // :int\n adtsSampleingIndex,\n // :int\n adtsExtensionSampleingIndex,\n // :int\n adtsChanelConfig,\n // :int\n config,\n userAgent = navigator.userAgent.toLowerCase(),\n adtsSampleingRates = [96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350];\n // byte 2\n adtsObjectType = ((data[offset + 2] & 0xC0) >>> 6) + 1;\n adtsSampleingIndex = (data[offset + 2] & 0x3C) >>> 2;\n if (adtsSampleingIndex > adtsSampleingRates.length - 1) {\n observer.trigger(Event.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'invalid ADTS sampling index:' + adtsSampleingIndex });\n return;\n }\n adtsChanelConfig = (data[offset + 2] & 0x01) << 2;\n // byte 3\n adtsChanelConfig |= (data[offset + 3] & 0xC0) >>> 6;\n _logger.logger.log('manifest codec:' + audioCodec + ',ADTS data:type:' + adtsObjectType + ',sampleingIndex:' + adtsSampleingIndex + '[' + adtsSampleingRates[adtsSampleingIndex] + 'Hz],channelConfig:' + adtsChanelConfig);\n // firefox/Opera: freq less than 24kHz = AAC SBR (HE-AAC)\n if (/firefox|OPR/i.test(userAgent)) {\n if (adtsSampleingIndex >= 6) {\n adtsObjectType = 5;\n config = new Array(4);\n // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n // there is a factor 2 between frame sample rate and output sample rate\n // multiply frequency by 2 (see table below, equivalent to substract 3)\n adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n } else {\n adtsObjectType = 2;\n config = new Array(2);\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n }\n // Android : always use AAC\n } else if (userAgent.indexOf('android') !== -1) {\n adtsObjectType = 2;\n config = new Array(2);\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n } else {\n /* for other browsers (Chrome/Vivaldi ...)\n always force audio type to be HE-AAC SBR, as some browsers do not support audio codec switch properly (like Chrome ...)\n */\n adtsObjectType = 5;\n config = new Array(4);\n // if (manifest codec is HE-AAC or HE-AACv2) OR (manifest codec not specified AND frequency less than 24kHz)\n if (audioCodec && (audioCodec.indexOf('mp4a.40.29') !== -1 || audioCodec.indexOf('mp4a.40.5') !== -1) || !audioCodec && adtsSampleingIndex >= 6) {\n // HE-AAC uses SBR (Spectral Band Replication) , high frequencies are constructed from low frequencies\n // there is a factor 2 between frame sample rate and output sample rate\n // multiply frequency by 2 (see table below, equivalent to substract 3)\n adtsExtensionSampleingIndex = adtsSampleingIndex - 3;\n } else {\n // if (manifest codec is AAC) AND (frequency less than 24kHz AND nb channel is 1) OR (manifest codec not specified and mono audio)\n // Chrome fails to play back with low frequency AAC LC mono when initialized with HE-AAC. This is not a problem with stereo.\n if (audioCodec && audioCodec.indexOf('mp4a.40.2') !== -1 && adtsSampleingIndex >= 6 && adtsChanelConfig === 1 || !audioCodec && adtsChanelConfig === 1) {\n adtsObjectType = 2;\n config = new Array(2);\n }\n adtsExtensionSampleingIndex = adtsSampleingIndex;\n }\n }\n /* refer to http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio#Audio_Specific_Config\n ISO 14496-3 (AAC).pdf - Table 1.13 — Syntax of AudioSpecificConfig()\n Audio Profile / Audio Object Type\n 0: Null\n 1: AAC Main\n 2: AAC LC (Low Complexity)\n 3: AAC SSR (Scalable Sample Rate)\n 4: AAC LTP (Long Term Prediction)\n 5: SBR (Spectral Band Replication)\n 6: AAC Scalable\n sampling freq\n 0: 96000 Hz\n 1: 88200 Hz\n 2: 64000 Hz\n 3: 48000 Hz\n 4: 44100 Hz\n 5: 32000 Hz\n 6: 24000 Hz\n 7: 22050 Hz\n 8: 16000 Hz\n 9: 12000 Hz\n 10: 11025 Hz\n 11: 8000 Hz\n 12: 7350 Hz\n 13: Reserved\n 14: Reserved\n 15: frequency is written explictly\n Channel Configurations\n These are the channel configurations:\n 0: Defined in AOT Specifc Config\n 1: 1 channel: front-center\n 2: 2 channels: front-left, front-right\n */\n // audioObjectType = profile => profile, the MPEG-4 Audio Object Type minus 1\n config[0] = adtsObjectType << 3;\n // samplingFrequencyIndex\n config[0] |= (adtsSampleingIndex & 0x0E) >> 1;\n config[1] |= (adtsSampleingIndex & 0x01) << 7;\n // channelConfiguration\n config[1] |= adtsChanelConfig << 3;\n if (adtsObjectType === 5) {\n // adtsExtensionSampleingIndex\n config[1] |= (adtsExtensionSampleingIndex & 0x0E) >> 1;\n config[2] = (adtsExtensionSampleingIndex & 0x01) << 7;\n // adtsObjectType (force to 2, chrome is checking that object type is less than 5 ???\n // https://chromium.googlesource.com/chromium/src.git/+/master/media/formats/mp4/aac.cc\n config[2] |= 2 << 2;\n config[3] = 0;\n }\n return { config: config, samplerate: adtsSampleingRates[adtsSampleingIndex], channelCount: adtsChanelConfig, codec: 'mp4a.40.' + adtsObjectType };\n }\n }]);\n\n return ADTS;\n}();\n\nexports.default = ADTS;\n\n},{\"24\":24,\"43\":43}],18:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /* inline demuxer.\n * probe fragments and instantiate appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...)\n */\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _errors = _dereq_(24);\n\nvar _aacdemuxer = _dereq_(16);\n\nvar _aacdemuxer2 = _interopRequireDefault(_aacdemuxer);\n\nvar _tsdemuxer = _dereq_(23);\n\nvar _tsdemuxer2 = _interopRequireDefault(_tsdemuxer);\n\nvar _mp4Remuxer = _dereq_(36);\n\nvar _mp4Remuxer2 = _interopRequireDefault(_mp4Remuxer);\n\nvar _passthroughRemuxer = _dereq_(37);\n\nvar _passthroughRemuxer2 = _interopRequireDefault(_passthroughRemuxer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DemuxerInline = function () {\n function DemuxerInline(hls, id, typeSupported) {\n var config = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];\n\n _classCallCheck(this, DemuxerInline);\n\n this.hls = hls;\n this.id = id;\n this.config = this.hls.config || config;\n this.typeSupported = typeSupported;\n }\n\n _createClass(DemuxerInline, [{\n key: 'destroy',\n value: function destroy() {\n var demuxer = this.demuxer;\n if (demuxer) {\n demuxer.destroy();\n }\n }\n }, {\n key: 'push',\n value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n var demuxer = this.demuxer;\n if (!demuxer) {\n var hls = this.hls,\n id = this.id;\n // probe for content type\n if (_tsdemuxer2.default.probe(data)) {\n if (this.typeSupported.mp2t === true) {\n demuxer = new _tsdemuxer2.default(hls, id, _passthroughRemuxer2.default, this.config);\n } else {\n demuxer = new _tsdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);\n }\n } else if (_aacdemuxer2.default.probe(data)) {\n demuxer = new _aacdemuxer2.default(hls, id, _mp4Remuxer2.default, this.config);\n } else {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: true, reason: 'no demux matching with content found' });\n return;\n }\n this.demuxer = demuxer;\n }\n demuxer.push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n }\n }]);\n\n return DemuxerInline;\n}();\n\nexports.default = DemuxerInline;\n\n},{\"16\":16,\"23\":23,\"24\":24,\"26\":26,\"36\":36,\"37\":37}],19:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _demuxerInline = _dereq_(18);\n\nvar _demuxerInline2 = _interopRequireDefault(_demuxerInline);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _logger = _dereq_(43);\n\nvar _events3 = _dereq_(1);\n\nvar _events4 = _interopRequireDefault(_events3);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* demuxer web worker.\n * - listen to worker message, and trigger DemuxerInline upon reception of Fragments.\n * - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead.\n */\n\nvar DemuxerWorker = function DemuxerWorker(self) {\n // observer setup\n var observer = new _events4.default();\n observer.trigger = function trigger(event) {\n for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n\n observer.emit.apply(observer, [event, event].concat(data));\n };\n\n observer.off = function off(event) {\n for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n data[_key2 - 1] = arguments[_key2];\n }\n\n observer.removeListener.apply(observer, [event].concat(data));\n };\n\n var forwardMessage = function forwardMessage(ev, data) {\n self.postMessage({ event: ev, data: data });\n };\n\n self.addEventListener('message', function (ev) {\n var data = ev.data;\n //console.log('demuxer cmd:' + data.cmd);\n switch (data.cmd) {\n case 'init':\n var config = JSON.parse(data.config);\n self.demuxer = new _demuxerInline2.default(observer, data.id, data.typeSupported, config);\n try {\n (0, _logger.enableLogs)(config.debug);\n } catch (err) {\n console.warn('demuxerWorker: unable to enable logs');\n }\n // signal end of worker init\n forwardMessage('init', null);\n break;\n case 'demux':\n self.demuxer.push(new Uint8Array(data.data), data.audioCodec, data.videoCodec, data.timeOffset, data.cc, data.level, data.sn, data.duration, data.accurateTimeOffset);\n break;\n default:\n break;\n }\n });\n\n // forward events to main thread\n observer.on(_events2.default.FRAG_PARSING_INIT_SEGMENT, forwardMessage);\n observer.on(_events2.default.FRAG_PARSED, forwardMessage);\n observer.on(_events2.default.ERROR, forwardMessage);\n observer.on(_events2.default.FRAG_PARSING_METADATA, forwardMessage);\n observer.on(_events2.default.FRAG_PARSING_USERDATA, forwardMessage);\n\n // special case for FRAG_PARSING_DATA: pass data1/data2 as transferable object (no copy)\n observer.on(_events2.default.FRAG_PARSING_DATA, function (ev, data) {\n var data1 = data.data1.buffer,\n data2 = data.data2.buffer;\n // remove data1 and data2 reference from data to avoid copying them ...\n delete data.data1;\n delete data.data2;\n self.postMessage({ event: ev, data: data, data1: data1, data2: data2 }, [data1, data2]);\n });\n};\n\nexports.default = DemuxerWorker;\n\n},{\"1\":1,\"18\":18,\"26\":26,\"43\":43}],20:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _demuxerInline = _dereq_(18);\n\nvar _demuxerInline2 = _interopRequireDefault(_demuxerInline);\n\nvar _demuxerWorker = _dereq_(19);\n\nvar _demuxerWorker2 = _interopRequireDefault(_demuxerWorker);\n\nvar _logger = _dereq_(43);\n\nvar _decrypter = _dereq_(15);\n\nvar _decrypter2 = _interopRequireDefault(_decrypter);\n\nvar _errors = _dereq_(24);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Demuxer = function () {\n function Demuxer(hls, id) {\n _classCallCheck(this, Demuxer);\n\n this.hls = hls;\n this.id = id;\n var typeSupported = {\n mp4: MediaSource.isTypeSupported('video/mp4'),\n mp2t: hls.config.enableMP2TPassThrough && MediaSource.isTypeSupported('video/mp2t')\n };\n if (hls.config.enableWorker && typeof Worker !== 'undefined') {\n _logger.logger.log('demuxing in webworker');\n var w = void 0;\n try {\n var work = _dereq_(2);\n w = this.w = work(_demuxerWorker2.default);\n this.onwmsg = this.onWorkerMessage.bind(this);\n w.addEventListener('message', this.onwmsg);\n w.onerror = function (event) {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: true, event: 'demuxerWorker', err: { message: event.message + ' (' + event.filename + ':' + event.lineno + ')' } });\n };\n w.postMessage({ cmd: 'init', typeSupported: typeSupported, id: id, config: JSON.stringify(hls.config) });\n } catch (err) {\n _logger.logger.error('error while initializing DemuxerWorker, fallback on DemuxerInline');\n if (w) {\n // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n URL.revokeObjectURL(w.objectURL);\n }\n this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);\n }\n } else {\n this.demuxer = new _demuxerInline2.default(hls, id, typeSupported);\n }\n this.demuxInitialized = true;\n }\n\n _createClass(Demuxer, [{\n key: 'destroy',\n value: function destroy() {\n var w = this.w;\n if (w) {\n w.removeEventListener('message', this.onwmsg);\n w.terminate();\n this.w = null;\n } else {\n var demuxer = this.demuxer;\n if (demuxer) {\n demuxer.destroy();\n this.demuxer = null;\n }\n }\n var decrypter = this.decrypter;\n if (decrypter) {\n decrypter.destroy();\n this.decrypter = null;\n }\n }\n }, {\n key: 'pushDecrypted',\n value: function pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n var w = this.w;\n if (w) {\n // post fragment payload as transferable objects (no copy)\n w.postMessage({ cmd: 'demux', data: data, audioCodec: audioCodec, videoCodec: videoCodec, timeOffset: timeOffset, cc: cc, level: level, sn: sn, duration: duration, accurateTimeOffset: accurateTimeOffset }, [data]);\n } else {\n var demuxer = this.demuxer;\n if (demuxer) {\n demuxer.push(new Uint8Array(data), audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n }\n }\n }\n }, {\n key: 'push',\n value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, decryptdata, accurateTimeOffset) {\n if (data.byteLength > 0 && decryptdata != null && decryptdata.key != null && decryptdata.method === 'AES-128') {\n if (this.decrypter == null) {\n this.decrypter = new _decrypter2.default(this.hls);\n }\n\n var localthis = this;\n this.decrypter.decrypt(data, decryptdata.key, decryptdata.iv, function (decryptedData) {\n localthis.pushDecrypted(decryptedData, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n });\n } else {\n this.pushDecrypted(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset);\n }\n }\n }, {\n key: 'onWorkerMessage',\n value: function onWorkerMessage(ev) {\n var data = ev.data,\n hls = this.hls;\n //console.log('onWorkerMessage:' + data.event);\n switch (data.event) {\n case 'init':\n // revoke the Object URL that was used to create demuxer worker, so as not to leak it\n URL.revokeObjectURL(this.w.objectURL);\n break;\n // special case for FRAG_PARSING_DATA: data1 and data2 are transferable objects\n case _events2.default.FRAG_PARSING_DATA:\n data.data.data1 = new Uint8Array(data.data1);\n data.data.data2 = new Uint8Array(data.data2);\n /* falls through */\n default:\n hls.trigger(data.event, data.data);\n break;\n }\n }\n }]);\n\n return Demuxer;\n}();\n\nexports.default = Demuxer;\n\n},{\"15\":15,\"18\":18,\"19\":19,\"2\":2,\"24\":24,\"26\":26,\"43\":43}],21:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264.\n */\n\nvar _logger = _dereq_(43);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ExpGolomb = function () {\n function ExpGolomb(data) {\n _classCallCheck(this, ExpGolomb);\n\n this.data = data;\n // the number of bytes left to examine in this.data\n this.bytesAvailable = this.data.byteLength;\n // the current word being examined\n this.word = 0; // :uint\n // the number of bits left to examine in the current word\n this.bitsAvailable = 0; // :uint\n }\n\n // ():void\n\n\n _createClass(ExpGolomb, [{\n key: 'loadWord',\n value: function loadWord() {\n var position = this.data.byteLength - this.bytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, this.bytesAvailable);\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n workingBytes.set(this.data.subarray(position, position + availableBytes));\n this.word = new DataView(workingBytes.buffer).getUint32(0);\n // track the amount of this.data that has been processed\n this.bitsAvailable = availableBytes * 8;\n this.bytesAvailable -= availableBytes;\n }\n\n // (count:int):void\n\n }, {\n key: 'skipBits',\n value: function skipBits(count) {\n var skipBytes; // :int\n if (this.bitsAvailable > count) {\n this.word <<= count;\n this.bitsAvailable -= count;\n } else {\n count -= this.bitsAvailable;\n skipBytes = count >> 3;\n count -= skipBytes >> 3;\n this.bytesAvailable -= skipBytes;\n this.loadWord();\n this.word <<= count;\n this.bitsAvailable -= count;\n }\n }\n\n // (size:int):uint\n\n }, {\n key: 'readBits',\n value: function readBits(size) {\n var bits = Math.min(this.bitsAvailable, size),\n // :uint\n valu = this.word >>> 32 - bits; // :uint\n if (size > 32) {\n _logger.logger.error('Cannot read more than 32 bits at a time');\n }\n this.bitsAvailable -= bits;\n if (this.bitsAvailable > 0) {\n this.word <<= bits;\n } else if (this.bytesAvailable > 0) {\n this.loadWord();\n }\n bits = size - bits;\n if (bits > 0 && this.bitsAvailable) {\n return valu << bits | this.readBits(bits);\n } else {\n return valu;\n }\n }\n\n // ():uint\n\n }, {\n key: 'skipLZ',\n value: function skipLZ() {\n var leadingZeroCount; // :uint\n for (leadingZeroCount = 0; leadingZeroCount < this.bitsAvailable; ++leadingZeroCount) {\n if (0 !== (this.word & 0x80000000 >>> leadingZeroCount)) {\n // the first bit of working word is 1\n this.word <<= leadingZeroCount;\n this.bitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n }\n // we exhausted word and still have not found a 1\n this.loadWord();\n return leadingZeroCount + this.skipLZ();\n }\n\n // ():void\n\n }, {\n key: 'skipUEG',\n value: function skipUEG() {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():void\n\n }, {\n key: 'skipEG',\n value: function skipEG() {\n this.skipBits(1 + this.skipLZ());\n }\n\n // ():uint\n\n }, {\n key: 'readUEG',\n value: function readUEG() {\n var clz = this.skipLZ(); // :uint\n return this.readBits(clz + 1) - 1;\n }\n\n // ():int\n\n }, {\n key: 'readEG',\n value: function readEG() {\n var valu = this.readUEG(); // :int\n if (0x01 & valu) {\n // the number is odd if the low order bit is set\n return 1 + valu >>> 1; // add 1 to make it even, and divide by 2\n } else {\n return -1 * (valu >>> 1); // divide by two then make it negative\n }\n }\n\n // Some convenience functions\n // :Boolean\n\n }, {\n key: 'readBoolean',\n value: function readBoolean() {\n return 1 === this.readBits(1);\n }\n\n // ():int\n\n }, {\n key: 'readUByte',\n value: function readUByte() {\n return this.readBits(8);\n }\n\n // ():int\n\n }, {\n key: 'readUShort',\n value: function readUShort() {\n return this.readBits(16);\n }\n // ():int\n\n }, {\n key: 'readUInt',\n value: function readUInt() {\n return this.readBits(32);\n }\n\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n\n }, {\n key: 'skipScalingList',\n value: function skipScalingList(count) {\n var lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = this.readEG();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n lastScale = nextScale === 0 ? lastScale : nextScale;\n }\n }\n\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n\n }, {\n key: 'readSPS',\n value: function readSPS() {\n var frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n sarScale = 1,\n profileIdc,\n profileCompat,\n levelIdc,\n numRefFramesInPicOrderCntCycle,\n picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n i;\n this.readUByte();\n profileIdc = this.readUByte(); // profile_idc\n profileCompat = this.readBits(5); // constraint_set[0-4]_flag, u(5)\n this.skipBits(3); // reserved_zero_3bits u(3),\n levelIdc = this.readUByte(); //level_idc u(8)\n this.skipUEG(); // seq_parameter_set_id\n // some profiles have more optional data we don't need\n if (profileIdc === 100 || profileIdc === 110 || profileIdc === 122 || profileIdc === 244 || profileIdc === 44 || profileIdc === 83 || profileIdc === 86 || profileIdc === 118 || profileIdc === 128) {\n var chromaFormatIdc = this.readUEG();\n if (chromaFormatIdc === 3) {\n this.skipBits(1); // separate_colour_plane_flag\n }\n this.skipUEG(); // bit_depth_luma_minus8\n this.skipUEG(); // bit_depth_chroma_minus8\n this.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n if (this.readBoolean()) {\n // seq_scaling_matrix_present_flag\n scalingListCount = chromaFormatIdc !== 3 ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (this.readBoolean()) {\n // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n this.skipScalingList(16);\n } else {\n this.skipScalingList(64);\n }\n }\n }\n }\n }\n this.skipUEG(); // log2_max_frame_num_minus4\n var picOrderCntType = this.readUEG();\n if (picOrderCntType === 0) {\n this.readUEG(); //log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n this.skipBits(1); // delta_pic_order_always_zero_flag\n this.skipEG(); // offset_for_non_ref_pic\n this.skipEG(); // offset_for_top_to_bottom_field\n numRefFramesInPicOrderCntCycle = this.readUEG();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n this.skipEG(); // offset_for_ref_frame[ i ]\n }\n }\n this.skipUEG(); // max_num_ref_frames\n this.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n picWidthInMbsMinus1 = this.readUEG();\n picHeightInMapUnitsMinus1 = this.readUEG();\n frameMbsOnlyFlag = this.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n this.skipBits(1); // mb_adaptive_frame_field_flag\n }\n this.skipBits(1); // direct_8x8_inference_flag\n if (this.readBoolean()) {\n // frame_cropping_flag\n frameCropLeftOffset = this.readUEG();\n frameCropRightOffset = this.readUEG();\n frameCropTopOffset = this.readUEG();\n frameCropBottomOffset = this.readUEG();\n }\n if (this.readBoolean()) {\n // vui_parameters_present_flag\n if (this.readBoolean()) {\n // aspect_ratio_info_present_flag\n var sarRatio = void 0;\n var aspectRatioIdc = this.readUByte();\n switch (aspectRatioIdc) {\n case 1:\n sarRatio = [1, 1];break;\n case 2:\n sarRatio = [12, 11];break;\n case 3:\n sarRatio = [10, 11];break;\n case 4:\n sarRatio = [16, 11];break;\n case 5:\n sarRatio = [40, 33];break;\n case 6:\n sarRatio = [24, 11];break;\n case 7:\n sarRatio = [20, 11];break;\n case 8:\n sarRatio = [32, 11];break;\n case 9:\n sarRatio = [80, 33];break;\n case 10:\n sarRatio = [18, 11];break;\n case 11:\n sarRatio = [15, 11];break;\n case 12:\n sarRatio = [64, 33];break;\n case 13:\n sarRatio = [160, 99];break;\n case 14:\n sarRatio = [4, 3];break;\n case 15:\n sarRatio = [3, 2];break;\n case 16:\n sarRatio = [2, 1];break;\n case 255:\n {\n sarRatio = [this.readUByte() << 8 | this.readUByte(), this.readUByte() << 8 | this.readUByte()];\n break;\n }\n }\n if (sarRatio) {\n sarScale = sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n width: Math.ceil(((picWidthInMbsMinus1 + 1) * 16 - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\n height: (2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16 - (frameMbsOnlyFlag ? 2 : 4) * (frameCropTopOffset + frameCropBottomOffset)\n };\n }\n }, {\n key: 'readSliceType',\n value: function readSliceType() {\n // skip NALu type\n this.readUByte();\n // discard first_mb_in_slice\n this.readUEG();\n // return slice_type\n return this.readUEG();\n }\n }]);\n\n return ExpGolomb;\n}();\n\nexports.default = ExpGolomb;\n\n},{\"43\":43}],22:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * ID3 parser\n */\n\n\nvar _logger = _dereq_(43);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n//import Hex from '../utils/hex';\n\nvar ID3 = function () {\n function ID3(data) {\n _classCallCheck(this, ID3);\n\n this._hasTimeStamp = false;\n var offset = 0,\n byte1,\n byte2,\n byte3,\n byte4,\n tagSize,\n endPos,\n header,\n len;\n do {\n header = this.readUTF(data, offset, 3);\n offset += 3;\n // first check for ID3 header\n if (header === 'ID3') {\n // skip 24 bits\n offset += 3;\n // retrieve tag(s) length\n byte1 = data[offset++] & 0x7f;\n byte2 = data[offset++] & 0x7f;\n byte3 = data[offset++] & 0x7f;\n byte4 = data[offset++] & 0x7f;\n tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;\n endPos = offset + tagSize;\n //logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);\n\n // read ID3 tags\n this._parseID3Frames(data, offset, endPos);\n offset = endPos;\n } else if (header === '3DI') {\n // http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer\n offset += 7;\n _logger.logger.log('3DI footer found, end: ' + offset);\n } else {\n offset -= 3;\n len = offset;\n if (len) {\n //logger.log(`ID3 len: ${len}`);\n if (!this.hasTimeStamp) {\n _logger.logger.warn('ID3 tag found, but no timestamp');\n }\n this._length = len;\n this._payload = data.subarray(0, len);\n }\n return;\n }\n } while (true);\n }\n\n _createClass(ID3, [{\n key: 'readUTF',\n value: function readUTF(data, start, len) {\n\n var result = '',\n offset = start,\n end = start + len;\n do {\n result += String.fromCharCode(data[offset++]);\n } while (offset < end);\n return result;\n }\n }, {\n key: '_parseID3Frames',\n value: function _parseID3Frames(data, offset, endPos) {\n var tagId, tagLen, tagStart, tagFlags, timestamp;\n while (offset + 8 <= endPos) {\n tagId = this.readUTF(data, offset, 4);\n offset += 4;\n\n tagLen = data[offset++] << 24 + data[offset++] << 16 + data[offset++] << 8 + data[offset++];\n\n tagFlags = data[offset++] << 8 + data[offset++];\n\n tagStart = offset;\n //logger.log(\"ID3 tag id:\" + tagId);\n switch (tagId) {\n case 'PRIV':\n //logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));\n // owner should be \"com.apple.streaming.transportStreamTimestamp\"\n if (this.readUTF(data, offset, 44) === 'com.apple.streaming.transportStreamTimestamp') {\n offset += 44;\n // smelling even better ! we found the right descriptor\n // skip null character (string end) + 3 first bytes\n offset += 4;\n\n // timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.\n var pts33Bit = data[offset++] & 0x1;\n this._hasTimeStamp = true;\n\n timestamp = ((data[offset++] << 23) + (data[offset++] << 15) + (data[offset++] << 7) + data[offset++]) / 45;\n\n if (pts33Bit) {\n timestamp += 47721858.84; // 2^32 / 90\n }\n timestamp = Math.round(timestamp);\n _logger.logger.trace('ID3 timestamp found: ' + timestamp);\n this._timeStamp = timestamp;\n }\n break;\n default:\n break;\n }\n }\n }\n }, {\n key: 'hasTimeStamp',\n get: function get() {\n return this._hasTimeStamp;\n }\n }, {\n key: 'timeStamp',\n get: function get() {\n return this._timeStamp;\n }\n }, {\n key: 'length',\n get: function get() {\n return this._length;\n }\n }, {\n key: 'payload',\n get: function get() {\n return this._payload;\n }\n }]);\n\n return ID3;\n}();\n\nexports.default = ID3;\n\n},{\"43\":43}],23:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * highly optimized TS demuxer:\n * parse PAT, PMT\n * extract PES packet from audio and video PIDs\n * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet\n * trigger the remuxer upon parsing completion\n * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.\n * it also controls the remuxing process :\n * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.\n */\n\n// import Hex from '../utils/hex';\n\n\nvar _adts = _dereq_(17);\n\nvar _adts2 = _interopRequireDefault(_adts);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _expGolomb = _dereq_(21);\n\nvar _expGolomb2 = _interopRequireDefault(_expGolomb);\n\nvar _logger = _dereq_(43);\n\nvar _errors = _dereq_(24);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TSDemuxer = function () {\n function TSDemuxer(observer, id, remuxerClass, config) {\n _classCallCheck(this, TSDemuxer);\n\n this.observer = observer;\n this.id = id;\n this.remuxerClass = remuxerClass;\n this.config = config;\n this.lastCC = 0;\n this.remuxer = new this.remuxerClass(observer, id, config);\n }\n\n _createClass(TSDemuxer, [{\n key: 'switchLevel',\n value: function switchLevel() {\n this.pmtParsed = false;\n this._pmtId = -1;\n this._avcTrack = { container: 'video/mp2t', type: 'video', id: -1, sequenceNumber: 0, samples: [], len: 0, dropped: 0 };\n this._aacTrack = { container: 'video/mp2t', type: 'audio', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n this._id3Track = { type: 'id3', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n this._txtTrack = { type: 'text', id: -1, sequenceNumber: 0, samples: [], len: 0 };\n // flush any partial content\n this.aacOverFlow = null;\n this.aacLastPTS = null;\n this.avcSample = null;\n this.remuxer.switchLevel();\n }\n }, {\n key: 'insertDiscontinuity',\n value: function insertDiscontinuity() {\n this.switchLevel();\n this.remuxer.insertDiscontinuity();\n }\n\n // feed incoming data to the front of the parsing pipeline\n\n }, {\n key: 'push',\n value: function push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration, accurateTimeOffset) {\n var start,\n len = data.length,\n stt,\n pid,\n atf,\n offset,\n pes,\n codecsOnly = this.remuxer.passthrough,\n unknownPIDs = false;\n\n this.audioCodec = audioCodec;\n this.videoCodec = videoCodec;\n this._duration = duration;\n this.contiguous = false;\n this.accurateTimeOffset = accurateTimeOffset;\n if (cc !== this.lastCC) {\n _logger.logger.log('discontinuity detected');\n this.insertDiscontinuity();\n this.lastCC = cc;\n }\n if (level !== this.lastLevel) {\n _logger.logger.log('level switch detected');\n this.switchLevel();\n this.lastLevel = level;\n } else if (sn === this.lastSN + 1) {\n this.contiguous = true;\n }\n this.lastSN = sn;\n\n var pmtParsed = this.pmtParsed,\n avcTrack = this._avcTrack,\n aacTrack = this._aacTrack,\n id3Track = this._id3Track,\n avcId = avcTrack.id,\n aacId = aacTrack.id,\n id3Id = id3Track.id,\n pmtId = this._pmtId,\n avcData = avcTrack.pesData,\n aacData = aacTrack.pesData,\n id3Data = id3Track.pesData,\n parsePAT = this._parsePAT,\n parsePMT = this._parsePMT,\n parsePES = this._parsePES,\n parseAVCPES = this._parseAVCPES.bind(this),\n parseAACPES = this._parseAACPES.bind(this),\n parseID3PES = this._parseID3PES.bind(this);\n\n // don't parse last TS packet if incomplete\n len -= len % 188;\n // loop through TS packets\n for (start = 0; start < len; start += 188) {\n if (data[start] === 0x47) {\n stt = !!(data[start + 1] & 0x40);\n // pid is a 13-bit field starting at the last bit of TS[1]\n pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];\n atf = (data[start + 3] & 0x30) >> 4;\n // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.\n if (atf > 1) {\n offset = start + 5 + data[start + 4];\n // continue if there is only adaptation field\n if (offset === start + 188) {\n continue;\n }\n } else {\n offset = start + 4;\n }\n switch (pid) {\n case avcId:\n if (stt) {\n if (avcData && (pes = parsePES(avcData))) {\n parseAVCPES(pes, false);\n if (codecsOnly) {\n // if we have video codec info AND\n // if audio PID is undefined OR if we have audio codec info,\n // we have all codec info !\n if (avcTrack.codec && (aacId === -1 || aacTrack.codec)) {\n this.remux(level, sn, data, timeOffset);\n return;\n }\n }\n }\n avcData = { data: [], size: 0 };\n }\n if (avcData) {\n avcData.data.push(data.subarray(offset, start + 188));\n avcData.size += start + 188 - offset;\n }\n break;\n case aacId:\n if (stt) {\n if (aacData && (pes = parsePES(aacData))) {\n parseAACPES(pes);\n if (codecsOnly) {\n // here we now that we have audio codec info\n // if video PID is undefined OR if we have video codec info,\n // we have all codec infos !\n if (aacTrack.codec && (avcId === -1 || avcTrack.codec)) {\n this.remux(level, sn, data, timeOffset);\n return;\n }\n }\n }\n aacData = { data: [], size: 0 };\n }\n if (aacData) {\n aacData.data.push(data.subarray(offset, start + 188));\n aacData.size += start + 188 - offset;\n }\n break;\n case id3Id:\n if (stt) {\n if (id3Data && (pes = parsePES(id3Data))) {\n parseID3PES(pes);\n }\n id3Data = { data: [], size: 0 };\n }\n if (id3Data) {\n id3Data.data.push(data.subarray(offset, start + 188));\n id3Data.size += start + 188 - offset;\n }\n break;\n case 0:\n if (stt) {\n offset += data[offset] + 1;\n }\n pmtId = this._pmtId = parsePAT(data, offset);\n break;\n case pmtId:\n if (stt) {\n offset += data[offset] + 1;\n }\n var parsedPIDs = parsePMT(data, offset);\n avcId = avcTrack.id = parsedPIDs.avc;\n aacId = aacTrack.id = parsedPIDs.aac;\n id3Id = id3Track.id = parsedPIDs.id3;\n if (unknownPIDs && !pmtParsed) {\n _logger.logger.log('reparse from beginning');\n unknownPIDs = false;\n // we set it to -188, the += 188 in the for loop will reset start to 0\n start = -188;\n }\n pmtParsed = this.pmtParsed = true;\n break;\n case 17:\n case 0x1fff:\n break;\n default:\n unknownPIDs = true;\n break;\n }\n } else {\n this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47' });\n }\n }\n // try to parse last PES packets\n if (avcData && (pes = parsePES(avcData))) {\n parseAVCPES(pes, true);\n avcTrack.pesData = null;\n } else {\n // either avcData null or PES truncated, keep it for next frag parsing\n avcTrack.pesData = avcData;\n }\n\n if (aacData && (pes = parsePES(aacData))) {\n parseAACPES(pes);\n aacTrack.pesData = null;\n } else {\n if (aacData && aacData.size) {\n _logger.logger.log('last AAC PES packet truncated,might overlap between fragments');\n }\n // either aacData null or PES truncated, keep it for next frag parsing\n aacTrack.pesData = aacData;\n }\n\n if (id3Data && (pes = parsePES(id3Data))) {\n parseID3PES(pes);\n id3Track.pesData = null;\n } else {\n // either id3Data null or PES truncated, keep it for next frag parsing\n id3Track.pesData = id3Data;\n }\n this.remux(level, sn, null, timeOffset);\n }\n }, {\n key: 'remux',\n value: function remux(level, sn, data, timeOffset) {\n var avcTrack = this._avcTrack,\n samples = avcTrack.samples;\n\n // compute total/avc sample length and nb of NAL units\n var trackData = samples.reduce(function (prevSampleData, curSample) {\n var sampleData = curSample.units.units.reduce(function (prevUnitData, curUnit) {\n return {\n len: prevUnitData.len + curUnit.data.length,\n nbNalu: prevUnitData.nbNalu + 1\n };\n }, { len: 0, nbNalu: 0 });\n curSample.length = sampleData.len;\n return {\n len: prevSampleData.len + sampleData.len,\n nbNalu: prevSampleData.nbNalu + sampleData.nbNalu\n };\n }, { len: 0, nbNalu: 0 });\n avcTrack.len = trackData.len;\n avcTrack.nbNalu = trackData.nbNalu;\n this.remuxer.remux(level, sn, this._aacTrack, this._avcTrack, this._id3Track, this._txtTrack, timeOffset, this.contiguous, this.accurateTimeOffset, data);\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n this.switchLevel();\n this._initPTS = this._initDTS = undefined;\n this._duration = 0;\n }\n }, {\n key: '_parsePAT',\n value: function _parsePAT(data, offset) {\n // skip the PSI header and parse the first PMT entry\n return (data[offset + 10] & 0x1F) << 8 | data[offset + 11];\n //logger.log('PMT PID:' + this._pmtId);\n }\n }, {\n key: '_parsePMT',\n value: function _parsePMT(data, offset) {\n var sectionLength,\n tableEnd,\n programInfoLength,\n pid,\n result = { aac: -1, avc: -1, id3: -1 };\n sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];\n tableEnd = offset + 3 + sectionLength - 4;\n // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];\n // advance the offset to the first entry in the mapping table\n offset += 12 + programInfoLength;\n while (offset < tableEnd) {\n pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];\n switch (data[offset]) {\n // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)\n case 0x0f:\n //logger.log('AAC PID:' + pid);\n if (result.aac === -1) {\n result.aac = pid;\n }\n break;\n // Packetized metadata (ID3)\n case 0x15:\n //logger.log('ID3 PID:' + pid);\n if (result.id3 === -1) {\n result.id3 = pid;\n }\n break;\n // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)\n case 0x1b:\n //logger.log('AVC PID:' + pid);\n if (result.avc === -1) {\n result.avc = pid;\n }\n break;\n case 0x24:\n _logger.logger.warn('HEVC stream type found, not supported for now');\n break;\n default:\n _logger.logger.log('unkown stream type:' + data[offset]);\n break;\n }\n // move to the next table entry\n // skip past the elementary stream descriptors, if present\n offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;\n }\n return result;\n }\n }, {\n key: '_parsePES',\n value: function _parsePES(stream) {\n var i = 0,\n frag,\n pesFlags,\n pesPrefix,\n pesLen,\n pesHdrLen,\n pesData,\n pesPts,\n pesDts,\n payloadStartOffset,\n data = stream.data;\n // safety check\n if (!stream || stream.size === 0) {\n return null;\n }\n\n // we might need up to 19 bytes to read PES header\n // if first chunk of data is less than 19 bytes, let's merge it with following ones until we get 19 bytes\n // usually only one merge is needed (and this is rare ...)\n while (data[0].length < 19 && data.length > 1) {\n var newData = new Uint8Array(data[0].length + data[1].length);\n newData.set(data[0]);\n newData.set(data[1], data[0].length);\n data[0] = newData;\n data.splice(1, 1);\n }\n //retrieve PTS/DTS from first fragment\n frag = data[0];\n pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];\n if (pesPrefix === 1) {\n pesLen = (frag[4] << 8) + frag[5];\n // if PES len is not zero and not matching with total len, stop parsing. PES might be truncated\n // minus 6 : PES header size\n if (pesLen && pesLen !== stream.size - 6) {\n return null;\n }\n pesFlags = frag[7];\n if (pesFlags & 0xC0) {\n /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n as PTS / DTS is 33 bit we cannot use bitwise operator in JS,\n as Bitwise operators treat their operands as a sequence of 32 bits */\n pesPts = (frag[9] & 0x0E) * 536870912 + // 1 << 29\n (frag[10] & 0xFF) * 4194304 + // 1 << 22\n (frag[11] & 0xFE) * 16384 + // 1 << 14\n (frag[12] & 0xFF) * 128 + // 1 << 7\n (frag[13] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (pesPts > 4294967295) {\n // decrement 2^33\n pesPts -= 8589934592;\n }\n if (pesFlags & 0x40) {\n pesDts = (frag[14] & 0x0E) * 536870912 + // 1 << 29\n (frag[15] & 0xFF) * 4194304 + // 1 << 22\n (frag[16] & 0xFE) * 16384 + // 1 << 14\n (frag[17] & 0xFF) * 128 + // 1 << 7\n (frag[18] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (pesDts > 4294967295) {\n // decrement 2^33\n pesDts -= 8589934592;\n }\n } else {\n pesDts = pesPts;\n }\n }\n pesHdrLen = frag[8];\n // 9 bytes : 6 bytes for PES header + 3 bytes for PES extension\n payloadStartOffset = pesHdrLen + 9;\n\n stream.size -= payloadStartOffset;\n //reassemble PES packet\n pesData = new Uint8Array(stream.size);\n while (data.length) {\n frag = data.shift();\n var len = frag.byteLength;\n if (payloadStartOffset) {\n if (payloadStartOffset > len) {\n // trim full frag if PES header bigger than frag\n payloadStartOffset -= len;\n continue;\n } else {\n // trim partial frag if PES header smaller than frag\n frag = frag.subarray(payloadStartOffset);\n len -= payloadStartOffset;\n payloadStartOffset = 0;\n }\n }\n pesData.set(frag, i);\n i += len;\n }\n if (pesLen) {\n // payload size : remove PES header + PES extension\n pesLen -= pesHdrLen + 3;\n }\n return { data: pesData, pts: pesPts, dts: pesDts, len: pesLen };\n } else {\n return null;\n }\n }\n }, {\n key: 'pushAccesUnit',\n value: function pushAccesUnit(avcSample, avcTrack) {\n if (avcSample.units.units.length) {\n // only push AVC sample if starting with a keyframe is not mandatory OR\n // if keyframe already found in this fragment OR\n // keyframe found in last fragment (track.sps) AND\n // samples already appended (we already found a keyframe in this fragment) OR fragment is contiguous\n if (!this.config.forceKeyFrameOnDiscontinuity || avcSample.key === true || avcTrack.sps && (avcTrack.samples.length || this.contiguous)) {\n avcTrack.samples.push(avcSample);\n } else {\n // dropped samples, track it\n avcTrack.dropped++;\n }\n }\n if (avcSample.debug.length) {\n _logger.logger.log(avcSample.pts + '/' + avcSample.dts + ':' + avcSample.debug + ',' + avcSample.units.length);\n }\n }\n }, {\n key: '_parseAVCPES',\n value: function _parseAVCPES(pes, last) {\n var _this = this;\n\n //logger.log('parse new PES');\n var track = this._avcTrack,\n units = this._parseAVCNALu(pes.data),\n debug = false,\n expGolombDecoder,\n avcSample = this.avcSample,\n push,\n i;\n //free pes.data to save up some memory\n pes.data = null;\n\n units.forEach(function (unit) {\n switch (unit.type) {\n //NDR\n case 1:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'NDR ';\n }\n break;\n //IDR\n case 5:\n push = true;\n // handle PES not starting with AUD\n if (!avcSample) {\n avcSample = _this.avcSample = _this._createAVCSample(true, pes.pts, pes.dts, '');\n }\n if (debug) {\n avcSample.debug += 'IDR ';\n }\n avcSample.key = true;\n break;\n //SEI\n case 6:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'SEI ';\n }\n expGolombDecoder = new _expGolomb2.default(_this.discardEPB(unit.data));\n\n // skip frameType\n expGolombDecoder.readUByte();\n\n var payloadType = 0;\n var payloadSize = 0;\n var endOfCaptions = false;\n var b = 0;\n\n while (!endOfCaptions && expGolombDecoder.bytesAvailable > 1) {\n payloadType = 0;\n do {\n b = expGolombDecoder.readUByte();\n payloadType += b;\n } while (b === 0xFF);\n\n // Parse payload size.\n payloadSize = 0;\n do {\n b = expGolombDecoder.readUByte();\n payloadSize += b;\n } while (b === 0xFF);\n\n // TODO: there can be more than one payload in an SEI packet...\n // TODO: need to read type and size in a while loop to get them all\n if (payloadType === 4 && expGolombDecoder.bytesAvailable !== 0) {\n\n endOfCaptions = true;\n\n var countryCode = expGolombDecoder.readUByte();\n\n if (countryCode === 181) {\n var providerCode = expGolombDecoder.readUShort();\n\n if (providerCode === 49) {\n var userStructure = expGolombDecoder.readUInt();\n\n if (userStructure === 0x47413934) {\n var userDataType = expGolombDecoder.readUByte();\n\n // Raw CEA-608 bytes wrapped in CEA-708 packet\n if (userDataType === 3) {\n var firstByte = expGolombDecoder.readUByte();\n var secondByte = expGolombDecoder.readUByte();\n\n var totalCCs = 31 & firstByte;\n var byteArray = [firstByte, secondByte];\n\n for (i = 0; i < totalCCs; i++) {\n // 3 bytes per CC\n byteArray.push(expGolombDecoder.readUByte());\n byteArray.push(expGolombDecoder.readUByte());\n byteArray.push(expGolombDecoder.readUByte());\n }\n\n _this._insertSampleInOrder(_this._txtTrack.samples, { type: 3, pts: pes.pts, bytes: byteArray });\n }\n }\n }\n }\n } else if (payloadSize < expGolombDecoder.bytesAvailable) {\n for (i = 0; i < payloadSize; i++) {\n expGolombDecoder.readUByte();\n }\n }\n }\n break;\n //SPS\n case 7:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'SPS ';\n }\n if (!track.sps) {\n expGolombDecoder = new _expGolomb2.default(unit.data);\n var config = expGolombDecoder.readSPS();\n track.width = config.width;\n track.height = config.height;\n track.sps = [unit.data];\n track.duration = _this._duration;\n var codecarray = unit.data.subarray(1, 4);\n var codecstring = 'avc1.';\n for (i = 0; i < 3; i++) {\n var h = codecarray[i].toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n codecstring += h;\n }\n track.codec = codecstring;\n }\n break;\n //PPS\n case 8:\n push = true;\n if (debug && avcSample) {\n avcSample.debug += 'PPS ';\n }\n if (!track.pps) {\n track.pps = [unit.data];\n }\n break;\n // AUD\n case 9:\n push = false;\n if (avcSample) {\n _this.pushAccesUnit(avcSample, track);\n }\n avcSample = _this.avcSample = _this._createAVCSample(false, pes.pts, pes.dts, debug ? 'AUD ' : '');\n break;\n // Filler Data\n case 12:\n push = false;\n break;\n default:\n push = false;\n if (avcSample) {\n avcSample.debug += 'unknown NAL ' + unit.type + ' ';\n }\n break;\n }\n if (avcSample && push) {\n var _units = avcSample.units;\n _units.units.push(unit);\n }\n });\n // if last PES packet, push samples\n if (last && avcSample) {\n this.pushAccesUnit(avcSample, track);\n this.avcSample = null;\n }\n }\n }, {\n key: '_createAVCSample',\n value: function _createAVCSample(key, pts, dts, debug) {\n return { key: key, pts: pts, dts: dts, units: { units: [], length: 0 }, debug: debug };\n }\n }, {\n key: '_insertSampleInOrder',\n value: function _insertSampleInOrder(arr, data) {\n var len = arr.length;\n if (len > 0) {\n if (data.pts >= arr[len - 1].pts) {\n arr.push(data);\n } else {\n for (var pos = len - 1; pos >= 0; pos--) {\n if (data.pts < arr[pos].pts) {\n arr.splice(pos, 0, data);\n break;\n }\n }\n }\n } else {\n arr.push(data);\n }\n }\n }, {\n key: '_getLastNalUnit',\n value: function _getLastNalUnit() {\n var avcSample = this.avcSample,\n lastUnit = void 0;\n // try to fallback to previous sample if current one is empty\n if (!avcSample || avcSample.units.units.length === 0) {\n var track = this._avcTrack,\n samples = track.samples;\n avcSample = samples[samples.length - 1];\n }\n if (avcSample) {\n var units = avcSample.units.units;\n lastUnit = units[units.length - 1];\n }\n return lastUnit;\n }\n }, {\n key: '_parseAVCNALu',\n value: function _parseAVCNALu(array) {\n var i = 0,\n len = array.byteLength,\n value,\n overflow,\n track = this._avcTrack,\n state = track.naluState || 0,\n lastState = state;\n var units = [],\n unit,\n unitType,\n lastUnitStart = -1,\n lastUnitType;\n //logger.log('PES:' + Hex.hexDump(array));\n while (i < len) {\n value = array[i++];\n // finding 3 or 4-byte start codes (00 00 01 OR 00 00 00 01)\n switch (state) {\n case 0:\n if (value === 0) {\n state = 1;\n }\n break;\n case 1:\n if (value === 0) {\n state = 2;\n } else {\n state = 0;\n }\n break;\n case 2:\n case 3:\n if (value === 0) {\n state = 3;\n } else if (value === 1) {\n if (lastUnitStart >= 0) {\n unit = { data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType };\n //logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n units.push(unit);\n } else {\n // lastUnitStart is undefined => this is the first start code found in this PES packet\n // first check if start code delimiter is overlapping between 2 PES packets,\n // ie it started in last packet (lastState not zero)\n // and ended at the beginning of this PES packet (i <= 4 - lastState)\n var lastUnit = this._getLastNalUnit();\n if (lastUnit) {\n if (lastState && i <= 4 - lastState) {\n // start delimiter overlapping between PES packets\n // strip start delimiter bytes from the end of last NAL unit\n // check if lastUnit had a state different from zero\n if (lastUnit.state) {\n // strip last bytes\n lastUnit.data = lastUnit.data.subarray(0, lastUnit.data.byteLength - lastState);\n }\n }\n // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.\n overflow = i - state - 1;\n if (overflow > 0) {\n //logger.log('first NALU found with overflow:' + overflow);\n var tmp = new Uint8Array(lastUnit.data.byteLength + overflow);\n tmp.set(lastUnit.data, 0);\n tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);\n lastUnit.data = tmp;\n }\n }\n }\n // check if we can read unit type\n if (i < len) {\n unitType = array[i] & 0x1f;\n //logger.log('find NALU @ offset:' + i + ',type:' + unitType);\n lastUnitStart = i;\n lastUnitType = unitType;\n state = 0;\n } else {\n // not enough byte to read unit type. let's read it on next PES parsing\n state = -1;\n }\n } else {\n state = 0;\n }\n break;\n case -1:\n // special use case where we found 3 or 4-byte start codes exactly at the end of previous PES packet\n lastUnitStart = 0;\n // NALu type is value read from offset 0\n lastUnitType = value & 0x1f;\n state = 0;\n break;\n default:\n break;\n }\n }\n if (lastUnitStart >= 0 && state >= 0) {\n unit = { data: array.subarray(lastUnitStart, len), type: lastUnitType, state: state };\n units.push(unit);\n //logger.log('pushing NALU, type/size/state:' + unit.type + '/' + unit.data.byteLength + '/' + state);\n }\n // no NALu found\n if (units.length === 0) {\n // append pes.data to previous NAL unit\n var _lastUnit = this._getLastNalUnit();\n if (_lastUnit) {\n var _tmp = new Uint8Array(_lastUnit.data.byteLength + array.byteLength);\n _tmp.set(_lastUnit.data, 0);\n _tmp.set(array, _lastUnit.data.byteLength);\n _lastUnit.data = _tmp;\n }\n }\n track.naluState = state;\n return units;\n }\n\n /**\n * remove Emulation Prevention bytes from a RBSP\n */\n\n }, {\n key: 'discardEPB',\n value: function discardEPB(data) {\n var length = data.byteLength,\n EPBPositions = [],\n i = 1,\n newLength,\n newData;\n\n // Find all `Emulation Prevention Bytes`\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n EPBPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n }\n\n // If no Emulation Prevention Bytes were found just return the original\n // array\n if (EPBPositions.length === 0) {\n return data;\n }\n\n // Create a new array to hold the NAL unit data\n newLength = length - EPBPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === EPBPositions[0]) {\n // Skip this byte\n sourceIndex++;\n // Remove this position index\n EPBPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n return newData;\n }\n }, {\n key: '_parseAACPES',\n value: function _parseAACPES(pes) {\n var track = this._aacTrack,\n data = pes.data,\n pts = pes.pts,\n startOffset = 0,\n aacOverFlow = this.aacOverFlow,\n aacLastPTS = this.aacLastPTS,\n config,\n frameLength,\n frameDuration,\n frameIndex,\n offset,\n headerLength,\n stamp,\n len,\n aacSample;\n if (aacOverFlow) {\n var tmp = new Uint8Array(aacOverFlow.byteLength + data.byteLength);\n tmp.set(aacOverFlow, 0);\n tmp.set(data, aacOverFlow.byteLength);\n //logger.log(`AAC: append overflowing ${aacOverFlow.byteLength} bytes to beginning of new PES`);\n data = tmp;\n }\n // look for ADTS header (0xFFFx)\n for (offset = startOffset, len = data.length; offset < len - 1; offset++) {\n if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n break;\n }\n }\n // if ADTS header does not start straight from the beginning of the PES payload, raise an error\n if (offset) {\n var reason, fatal;\n if (offset < len - 1) {\n reason = 'AAC PES did not start with ADTS header,offset:' + offset;\n fatal = false;\n } else {\n reason = 'no ADTS header found in AAC PES';\n fatal = true;\n }\n _logger.logger.warn('parsing error:' + reason);\n this.observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason });\n if (fatal) {\n return;\n }\n }\n if (!track.audiosamplerate) {\n config = _adts2.default.getAudioConfig(this.observer, data, offset, this.audioCodec);\n track.config = config.config;\n track.audiosamplerate = config.samplerate;\n track.channelCount = config.channelCount;\n track.codec = config.codec;\n track.duration = this._duration;\n _logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);\n }\n frameIndex = 0;\n frameDuration = 1024 * 90000 / track.audiosamplerate;\n\n // if last AAC frame is overflowing, we should ensure timestamps are contiguous:\n // first sample PTS should be equal to last sample PTS + frameDuration\n if (aacOverFlow && aacLastPTS) {\n var newPTS = aacLastPTS + frameDuration;\n if (Math.abs(newPTS - pts) > 1) {\n _logger.logger.log('AAC: align PTS for overlapping frames by ' + Math.round((newPTS - pts) / 90));\n pts = newPTS;\n }\n }\n\n while (offset + 5 < len) {\n // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n headerLength = !!(data[offset + 1] & 0x01) ? 7 : 9;\n // retrieve frame size\n frameLength = (data[offset + 3] & 0x03) << 11 | data[offset + 4] << 3 | (data[offset + 5] & 0xE0) >>> 5;\n frameLength -= headerLength;\n //stamp = pes.pts;\n\n if (frameLength > 0 && offset + headerLength + frameLength <= len) {\n stamp = pts + frameIndex * frameDuration;\n //logger.log(`AAC frame, offset/length/total/pts:${offset+headerLength}/${frameLength}/${data.byteLength}/${(stamp/90).toFixed(0)}`);\n aacSample = { unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp };\n track.samples.push(aacSample);\n track.len += frameLength;\n offset += frameLength + headerLength;\n frameIndex++;\n // look for ADTS header (0xFFFx)\n for (; offset < len - 1; offset++) {\n if (data[offset] === 0xff && (data[offset + 1] & 0xf0) === 0xf0) {\n break;\n }\n }\n } else {\n break;\n }\n }\n if (offset < len) {\n aacOverFlow = data.subarray(offset, len);\n //logger.log(`AAC: overflow detected:${len-offset}`);\n } else {\n aacOverFlow = null;\n }\n this.aacOverFlow = aacOverFlow;\n this.aacLastPTS = stamp;\n }\n }, {\n key: '_parseID3PES',\n value: function _parseID3PES(pes) {\n this._id3Track.samples.push(pes);\n }\n }], [{\n key: 'probe',\n value: function probe(data) {\n // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47\n if (data.length >= 3 * 188 && data[0] === 0x47 && data[188] === 0x47 && data[2 * 188] === 0x47) {\n return true;\n } else {\n return false;\n }\n }\n }]);\n\n return TSDemuxer;\n}();\n\nexports.default = TSDemuxer;\n\n},{\"17\":17,\"21\":21,\"24\":24,\"26\":26,\"43\":43}],24:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar ErrorTypes = exports.ErrorTypes = {\n // Identifier for a network error (loading error / timeout ...)\n NETWORK_ERROR: 'networkError',\n // Identifier for a media Error (video/parsing/mediasource error)\n MEDIA_ERROR: 'mediaError',\n // Identifier for all other errors\n OTHER_ERROR: 'otherError'\n};\n\nvar ErrorDetails = exports.ErrorDetails = {\n // Identifier for a manifest load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n MANIFEST_LOAD_ERROR: 'manifestLoadError',\n // Identifier for a manifest load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',\n // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}\n MANIFEST_PARSING_ERROR: 'manifestParsingError',\n // Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}\n MANIFEST_INCOMPATIBLE_CODECS_ERROR: 'manifestIncompatibleCodecsError',\n // Identifier for a level load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n LEVEL_LOAD_ERROR: 'levelLoadError',\n // Identifier for a level load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n LEVEL_LOAD_TIMEOUT: 'levelLoadTimeOut',\n // Identifier for a level switch error - data: { level : faulty level Id, event : error description}\n LEVEL_SWITCH_ERROR: 'levelSwitchError',\n // Identifier for an audio track load error - data: { url : faulty URL, response : { code: error code, text: error text }}\n AUDIO_TRACK_LOAD_ERROR: 'audioTrackLoadError',\n // Identifier for an audio track load timeout - data: { url : faulty URL, response : { code: error code, text: error text }}\n AUDIO_TRACK_LOAD_TIMEOUT: 'audioTrackLoadTimeOut',\n // Identifier for fragment load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n FRAG_LOAD_ERROR: 'fragLoadError',\n // Identifier for fragment loop loading error - data: { frag : fragment object}\n FRAG_LOOP_LOADING_ERROR: 'fragLoopLoadingError',\n // Identifier for fragment load timeout error - data: { frag : fragment object}\n FRAG_LOAD_TIMEOUT: 'fragLoadTimeOut',\n // Identifier for a fragment decryption error event - data: parsing error description\n FRAG_DECRYPT_ERROR: 'fragDecryptError',\n // Identifier for a fragment parsing error event - data: parsing error description\n FRAG_PARSING_ERROR: 'fragParsingError',\n // Identifier for decrypt key load error - data: { frag : fragment object, response : { code: error code, text: error text }}\n KEY_LOAD_ERROR: 'keyLoadError',\n // Identifier for decrypt key load timeout error - data: { frag : fragment object}\n KEY_LOAD_TIMEOUT: 'keyLoadTimeOut',\n // Triggered when an exception occurs while adding a sourceBuffer to MediaSource - data : { err : exception , mimeType : mimeType }\n BUFFER_ADD_CODEC_ERROR: 'bufferAddCodecError',\n // Identifier for a buffer append error - data: append error description\n BUFFER_APPEND_ERROR: 'bufferAppendError',\n // Identifier for a buffer appending error event - data: appending error description\n BUFFER_APPENDING_ERROR: 'bufferAppendingError',\n // Identifier for a buffer stalled error event\n BUFFER_STALLED_ERROR: 'bufferStalledError',\n // Identifier for a buffer full event\n BUFFER_FULL_ERROR: 'bufferFullError',\n // Identifier for a buffer seek over hole event\n BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',\n // Identifier for an internal exception happening inside hls.js while handling an event\n INTERNAL_EXCEPTION: 'internalException'\n};\n\n},{}],25:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar _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; }; }(); /*\n *\n * All objects in the event handling chain should inherit from this class\n *\n */\n\nvar _logger = _dereq_(43);\n\nvar _errors = _dereq_(24);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar EventHandler = function () {\n function EventHandler(hls) {\n _classCallCheck(this, EventHandler);\n\n this.hls = hls;\n this.onEvent = this.onEvent.bind(this);\n\n for (var _len = arguments.length, events = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n events[_key - 1] = arguments[_key];\n }\n\n this.handledEvents = events;\n this.useGenericHandler = true;\n\n this.registerListeners();\n }\n\n _createClass(EventHandler, [{\n key: 'destroy',\n value: function destroy() {\n this.unregisterListeners();\n }\n }, {\n key: 'isEventHandler',\n value: function isEventHandler() {\n return _typeof(this.handledEvents) === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';\n }\n }, {\n key: 'registerListeners',\n value: function registerListeners() {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function (event) {\n if (event === 'hlsEventGeneric') {\n throw new Error('Forbidden event name: ' + event);\n }\n this.hls.on(event, this.onEvent);\n }.bind(this));\n }\n }\n }, {\n key: 'unregisterListeners',\n value: function unregisterListeners() {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function (event) {\n this.hls.off(event, this.onEvent);\n }.bind(this));\n }\n }\n\n /**\n * arguments: event (string), data (any)\n */\n\n }, {\n key: 'onEvent',\n value: function onEvent(event, data) {\n this.onEventGeneric(event, data);\n }\n }, {\n key: 'onEventGeneric',\n value: function onEventGeneric(event, data) {\n var eventToFunction = function eventToFunction(event, data) {\n var funcName = 'on' + event.replace('hls', '');\n if (typeof this[funcName] !== 'function') {\n throw new Error('Event ' + event + ' has no generic handler in this ' + this.constructor.name + ' class (tried ' + funcName + ')');\n }\n return this[funcName].bind(this, data);\n };\n try {\n eventToFunction.call(this, event, data).call();\n } catch (err) {\n _logger.logger.error('internal error happened while processing ' + event + ':' + err.message);\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });\n }\n }\n }]);\n\n return EventHandler;\n}();\n\nexports.default = EventHandler;\n\n},{\"24\":24,\"26\":26,\"43\":43}],26:[function(_dereq_,module,exports){\n'use strict';\n\nmodule.exports = {\n // fired before MediaSource is attaching to media element - data: { media }\n MEDIA_ATTACHING: 'hlsMediaAttaching',\n // fired when MediaSource has been succesfully attached to media element - data: { }\n MEDIA_ATTACHED: 'hlsMediaAttached',\n // fired before detaching MediaSource from media element - data: { }\n MEDIA_DETACHING: 'hlsMediaDetaching',\n // fired when MediaSource has been detached from media element - data: { }\n MEDIA_DETACHED: 'hlsMediaDetached',\n // fired when we buffer is going to be resetted\n BUFFER_RESET: 'hlsBufferReset',\n // fired when we know about the codecs that we need buffers for to push into - data: {tracks : { container, codec, levelCodec, initSegment, metadata }}\n BUFFER_CODECS: 'hlsBufferCodecs',\n // fired when sourcebuffers have been created data: { tracks : tracks}\n BUFFER_CREATED: 'hlsBufferCreated',\n // fired when we append a segment to the buffer - data: { segment: segment object }\n BUFFER_APPENDING: 'hlsBufferAppending',\n // fired when we are done with appending a media segment to the buffer data : { parent : segment parent that triggered BUFFER_APPENDING }\n BUFFER_APPENDED: 'hlsBufferAppended',\n // fired when the stream is finished and we want to notify the media buffer that there will be no more data\n BUFFER_EOS: 'hlsBufferEos',\n // fired when the media buffer should be flushed - data {startOffset, endOffset}\n BUFFER_FLUSHING: 'hlsBufferFlushing',\n // fired when the media has been flushed\n BUFFER_FLUSHED: 'hlsBufferFlushed',\n // fired to signal that a manifest loading starts - data: { url : manifestURL}\n MANIFEST_LOADING: 'hlsManifestLoading',\n // fired after manifest has been loaded - data: { levels : [available quality levels] , audioTracks : [ available audio tracks], url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n MANIFEST_LOADED: 'hlsManifestLoaded',\n // fired after manifest has been parsed - data: { levels : [available quality levels] , firstLevel : index of first quality level appearing in Manifest}\n MANIFEST_PARSED: 'hlsManifestParsed',\n // fired when a level playlist loading starts - data: { url : level URL level : id of level being loaded}\n LEVEL_LOADING: 'hlsLevelLoading',\n // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n LEVEL_LOADED: 'hlsLevelLoaded',\n // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level }\n LEVEL_UPDATED: 'hlsLevelUpdated',\n // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',\n // fired when a level switch is requested - data: { level : id of new level }\n LEVEL_SWITCH: 'hlsLevelSwitch',\n // fired to notify that audio track lists has been updated data: { audioTracks : audioTracks}\n AUDIO_TRACKS_UPDATED: 'hlsAudioTracksUpdated',\n // fired when an audio track switch occurs - data: { id : audio track id}\n AUDIO_TRACK_SWITCH: 'hlsAudioTrackSwitch',\n // fired when an audio track loading starts - data: { url : audio track URL id : audio track id}\n AUDIO_TRACK_LOADING: 'hlsAudioTrackLoading',\n // fired when an audio track loading finishes - data: { details : levelDetails object, id : audio track id, stats : { trequest, tfirst, tload, mtime} }\n AUDIO_TRACK_LOADED: 'hlsAudioTrackLoaded',\n // fired when a fragment loading starts - data: { frag : fragment object}\n FRAG_LOADING: 'hlsFragLoading',\n // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded}}\n FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n // Identifier for fragment load aborting for emergency switch down - data: {frag : fragment object}\n FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}\n FRAG_LOADED: 'hlsFragLoaded',\n // fired when Init Segment has been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, moov : moov MP4 box, codecs : codecs found while parsing fragment}\n FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n // fired when parsing sei text is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ sei samples pes ] }\n FRAG_PARSING_USERDATA: 'hlsFragParsingUserdata',\n // fired when parsing id3 is completed - data: { id : demuxer id, , level : levelId, sn : sequence number, samples : [ id3 samples pes ] }\n FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',\n // fired when data have been extracted from fragment - data: { id : demuxer id, level : levelId, sn : sequence number, data1 : moof MP4 box or TS fragments, data2 : mdat MP4 box or null}\n FRAG_PARSING_DATA: 'hlsFragParsingData',\n // fired when fragment parsing is completed - data: { id : demuxer id; level : levelId, sn : sequence number, }\n FRAG_PARSED: 'hlsFragParsed',\n // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { id : demuxer id,frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length} }\n FRAG_BUFFERED: 'hlsFragBuffered',\n // fired when fragment matching with current media position is changing - data : { id : demuxer id, frag : fragment object }\n FRAG_CHANGED: 'hlsFragChanged',\n // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames}\n FPS_DROP: 'hlsFpsDrop',\n //triggered when FPS drop triggers auto level capping - data: {level, droppedlevel}\n FPS_DROP_LEVEL_CAPPING: 'hlsFpsDropLevelCapping',\n // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data}\n ERROR: 'hlsError',\n // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example\n DESTROYING: 'hlsDestroying',\n // fired when a decrypt key loading starts - data: { frag : fragment object}\n KEY_LOADING: 'hlsKeyLoading',\n // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}}\n KEY_LOADED: 'hlsKeyLoaded',\n // fired upon stream controller state transitions - data: {previousState, nextState}\n STREAM_STATE_TRANSITION: 'hlsStreamStateTransition'\n};\n\n},{}],27:[function(_dereq_,module,exports){\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * AAC helper\n */\n\nvar AAC = function () {\n function AAC() {\n _classCallCheck(this, AAC);\n }\n\n _createClass(AAC, null, [{\n key: \"getSilentFrame\",\n value: function getSilentFrame(channelCount) {\n if (channelCount === 1) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n } else if (channelCount === 2) {\n return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n } else if (channelCount === 3) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n } else if (channelCount === 4) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n } else if (channelCount === 5) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n } else if (channelCount === 6) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n }\n return null;\n }\n }]);\n\n return AAC;\n}();\n\nexports.default = AAC;\n\n},{}],28:[function(_dereq_,module,exports){\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Buffer Helper class, providing methods dealing buffer length retrieval\n*/\n\nvar BufferHelper = function () {\n function BufferHelper() {\n _classCallCheck(this, BufferHelper);\n }\n\n _createClass(BufferHelper, null, [{\n key: \"isBuffered\",\n value: function isBuffered(media, position) {\n if (media) {\n var buffered = media.buffered;\n for (var i = 0; i < buffered.length; i++) {\n if (position >= buffered.start(i) && position <= buffered.end(i)) {\n return true;\n }\n }\n }\n return false;\n }\n }, {\n key: \"bufferInfo\",\n value: function bufferInfo(media, pos, maxHoleDuration) {\n if (media) {\n var vbuffered = media.buffered,\n buffered = [],\n i;\n for (i = 0; i < vbuffered.length; i++) {\n buffered.push({ start: vbuffered.start(i), end: vbuffered.end(i) });\n }\n return this.bufferedInfo(buffered, pos, maxHoleDuration);\n } else {\n return { len: 0, start: 0, end: 0, nextStart: undefined };\n }\n }\n }, {\n key: \"bufferedInfo\",\n value: function bufferedInfo(buffered, pos, maxHoleDuration) {\n var buffered2 = [],\n\n // bufferStart and bufferEnd are buffer boundaries around current video position\n bufferLen,\n bufferStart,\n bufferEnd,\n bufferStartNext,\n i;\n // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n buffered.sort(function (a, b) {\n var diff = a.start - b.start;\n if (diff) {\n return diff;\n } else {\n return b.end - a.end;\n }\n });\n // there might be some small holes between buffer time range\n // consider that holes smaller than maxHoleDuration are irrelevant and build another\n // buffer time range representations that discards those holes\n for (i = 0; i < buffered.length; i++) {\n var buf2len = buffered2.length;\n if (buf2len) {\n var buf2end = buffered2[buf2len - 1].end;\n // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n if (buffered[i].start - buf2end < maxHoleDuration) {\n // merge overlapping time ranges\n // update lastRange.end only if smaller than item.end\n // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n if (buffered[i].end > buf2end) {\n buffered2[buf2len - 1].end = buffered[i].end;\n }\n } else {\n // big hole\n buffered2.push(buffered[i]);\n }\n } else {\n // first value\n buffered2.push(buffered[i]);\n }\n }\n for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {\n var start = buffered2[i].start,\n end = buffered2[i].end;\n //logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n if (pos + maxHoleDuration >= start && pos < end) {\n // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n bufferStart = start;\n bufferEnd = end;\n bufferLen = bufferEnd - pos;\n } else if (pos + maxHoleDuration < start) {\n bufferStartNext = start;\n break;\n }\n }\n return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext };\n }\n }]);\n\n return BufferHelper;\n}();\n\nexports.default = BufferHelper;\n\n},{}],29:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * Level Helper class, providing methods dealing with playlist sliding and drift\n */\n\nvar _logger = _dereq_(43);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar LevelHelper = function () {\n function LevelHelper() {\n _classCallCheck(this, LevelHelper);\n }\n\n _createClass(LevelHelper, null, [{\n key: 'mergeDetails',\n value: function mergeDetails(oldDetails, newDetails) {\n var start = Math.max(oldDetails.startSN, newDetails.startSN) - newDetails.startSN,\n end = Math.min(oldDetails.endSN, newDetails.endSN) - newDetails.startSN,\n delta = newDetails.startSN - oldDetails.startSN,\n oldfragments = oldDetails.fragments,\n newfragments = newDetails.fragments,\n ccOffset = 0,\n PTSFrag;\n\n // check if old/new playlists have fragments in common\n if (end < start) {\n newDetails.PTSKnown = false;\n return;\n }\n // loop through overlapping SN and update startPTS , cc, and duration if any found\n for (var i = start; i <= end; i++) {\n var oldFrag = oldfragments[delta + i],\n newFrag = newfragments[i];\n if (newFrag && oldFrag) {\n ccOffset = oldFrag.cc - newFrag.cc;\n if (!isNaN(oldFrag.startPTS)) {\n newFrag.start = newFrag.startPTS = oldFrag.startPTS;\n newFrag.endPTS = oldFrag.endPTS;\n newFrag.duration = oldFrag.duration;\n PTSFrag = newFrag;\n }\n }\n }\n\n if (ccOffset) {\n _logger.logger.log('discontinuity sliding from playlist, take drift into account');\n for (i = 0; i < newfragments.length; i++) {\n newfragments[i].cc += ccOffset;\n }\n }\n\n // if at least one fragment contains PTS info, recompute PTS information for all fragments\n if (PTSFrag) {\n LevelHelper.updateFragPTSDTS(newDetails, PTSFrag.sn, PTSFrag.startPTS, PTSFrag.endPTS, PTSFrag.startDTS, PTSFrag.endDTS);\n } else {\n // ensure that delta is within oldfragments range\n // also adjust sliding in case delta is 0 (we could have old=[50-60] and new=old=[50-61])\n // in that case we also need to adjust start offset of all fragments\n if (delta >= 0 && delta < oldfragments.length) {\n // adjust start by sliding offset\n var sliding = oldfragments[delta].start;\n for (i = 0; i < newfragments.length; i++) {\n newfragments[i].start += sliding;\n }\n }\n }\n // if we are here, it means we have fragments overlapping between\n // old and new level. reliable PTS info is thus relying on old level\n newDetails.PTSKnown = oldDetails.PTSKnown;\n return;\n }\n }, {\n key: 'updateFragPTSDTS',\n value: function updateFragPTSDTS(details, sn, startPTS, endPTS, startDTS, endDTS) {\n var fragIdx, fragments, frag, i;\n // exit if sn out of range\n if (sn < details.startSN || sn > details.endSN) {\n return 0;\n }\n fragIdx = sn - details.startSN;\n fragments = details.fragments;\n frag = fragments[fragIdx];\n if (!isNaN(frag.startPTS)) {\n // delta PTS between audio and video\n var deltaPTS = Math.abs(frag.startPTS - startPTS);\n if (isNaN(frag.deltaPTS)) {\n frag.deltaPTS = deltaPTS;\n } else {\n frag.deltaPTS = Math.max(deltaPTS, frag.deltaPTS);\n }\n startPTS = Math.min(startPTS, frag.startPTS);\n endPTS = Math.max(endPTS, frag.endPTS);\n startDTS = Math.min(startDTS, frag.startDTS);\n endDTS = Math.max(endDTS, frag.endDTS);\n }\n\n var drift = startPTS - frag.start;\n\n frag.start = frag.startPTS = startPTS;\n frag.endPTS = endPTS;\n frag.startDTS = startDTS;\n frag.endDTS = endDTS;\n frag.duration = endPTS - startPTS;\n // adjust fragment PTS/duration from seqnum-1 to frag 0\n for (i = fragIdx; i > 0; i--) {\n LevelHelper.updatePTS(fragments, i, i - 1);\n }\n\n // adjust fragment PTS/duration from seqnum to last frag\n for (i = fragIdx; i < fragments.length - 1; i++) {\n LevelHelper.updatePTS(fragments, i, i + 1);\n }\n details.PTSKnown = true;\n //logger.log(` frag start/end:${startPTS.toFixed(3)}/${endPTS.toFixed(3)}`);\n\n return drift;\n }\n }, {\n key: 'updatePTS',\n value: function updatePTS(fragments, fromIdx, toIdx) {\n var fragFrom = fragments[fromIdx],\n fragTo = fragments[toIdx],\n fragToPTS = fragTo.startPTS;\n // if we know startPTS[toIdx]\n if (!isNaN(fragToPTS)) {\n // update fragment duration.\n // it helps to fix drifts between playlist reported duration and fragment real duration\n if (toIdx > fromIdx) {\n fragFrom.duration = fragToPTS - fragFrom.start;\n if (fragFrom.duration < 0) {\n _logger.logger.warn('negative duration computed for frag ' + fragFrom.sn + ',level ' + fragFrom.level + ', there should be some duration drift between playlist and fragment!');\n }\n } else {\n fragTo.duration = fragFrom.start - fragToPTS;\n if (fragTo.duration < 0) {\n _logger.logger.warn('negative duration computed for frag ' + fragTo.sn + ',level ' + fragTo.level + ', there should be some duration drift between playlist and fragment!');\n }\n }\n } else {\n // we dont know startPTS[toIdx]\n if (toIdx > fromIdx) {\n fragTo.start = fragFrom.start + fragFrom.duration;\n } else {\n fragTo.start = fragFrom.start - fragTo.duration;\n }\n }\n }\n }]);\n\n return LevelHelper;\n}();\n\nexports.default = LevelHelper;\n\n},{\"43\":43}],30:[function(_dereq_,module,exports){\n/**\n * HLS interface\n */\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n//import FetchLoader from './utils/fetch-loader';\n\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _errors = _dereq_(24);\n\nvar _playlistLoader = _dereq_(34);\n\nvar _playlistLoader2 = _interopRequireDefault(_playlistLoader);\n\nvar _fragmentLoader = _dereq_(32);\n\nvar _fragmentLoader2 = _interopRequireDefault(_fragmentLoader);\n\nvar _abrController = _dereq_(3);\n\nvar _abrController2 = _interopRequireDefault(_abrController);\n\nvar _bufferController = _dereq_(6);\n\nvar _bufferController2 = _interopRequireDefault(_bufferController);\n\nvar _capLevelController = _dereq_(7);\n\nvar _capLevelController2 = _interopRequireDefault(_capLevelController);\n\nvar _audioStreamController = _dereq_(4);\n\nvar _audioStreamController2 = _interopRequireDefault(_audioStreamController);\n\nvar _streamController = _dereq_(11);\n\nvar _streamController2 = _interopRequireDefault(_streamController);\n\nvar _levelController = _dereq_(10);\n\nvar _levelController2 = _interopRequireDefault(_levelController);\n\nvar _timelineController = _dereq_(12);\n\nvar _timelineController2 = _interopRequireDefault(_timelineController);\n\nvar _fpsController = _dereq_(9);\n\nvar _fpsController2 = _interopRequireDefault(_fpsController);\n\nvar _audioTrackController = _dereq_(5);\n\nvar _audioTrackController2 = _interopRequireDefault(_audioTrackController);\n\nvar _logger = _dereq_(43);\n\nvar _xhrLoader = _dereq_(47);\n\nvar _xhrLoader2 = _interopRequireDefault(_xhrLoader);\n\nvar _events3 = _dereq_(1);\n\nvar _events4 = _interopRequireDefault(_events3);\n\nvar _keyLoader = _dereq_(33);\n\nvar _keyLoader2 = _interopRequireDefault(_keyLoader);\n\nvar _cues = _dereq_(41);\n\nvar _cues2 = _interopRequireDefault(_cues);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Hls = function () {\n _createClass(Hls, null, [{\n key: 'isSupported',\n value: function isSupported() {\n return window.MediaSource && typeof window.MediaSource.isTypeSupported === 'function' && window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n }\n }, {\n key: 'version',\n get: function get() {\n // replaced with browserify-versionify transform\n return '0.6.7';\n }\n }, {\n key: 'Events',\n get: function get() {\n return _events2.default;\n }\n }, {\n key: 'ErrorTypes',\n get: function get() {\n return _errors.ErrorTypes;\n }\n }, {\n key: 'ErrorDetails',\n get: function get() {\n return _errors.ErrorDetails;\n }\n }, {\n key: 'DefaultConfig',\n get: function get() {\n if (!Hls.defaultConfig) {\n Hls.defaultConfig = {\n autoStartLoad: true,\n startPosition: -1,\n defaultAudioCodec: undefined,\n debug: false,\n capLevelOnFPSDrop: false,\n capLevelToPlayerSize: false,\n maxBufferLength: 30,\n maxBufferSize: 60 * 1000 * 1000,\n maxBufferHole: 0.5,\n maxSeekHole: 2,\n seekHoleNudgeDuration: 0.01,\n stalledInBufferedNudgeThreshold: 10,\n maxFragLookUpTolerance: 0.2,\n liveSyncDurationCount: 3,\n liveMaxLatencyDurationCount: Infinity,\n liveSyncDuration: undefined,\n liveMaxLatencyDuration: undefined,\n maxMaxBufferLength: 600,\n enableWorker: true,\n enableSoftwareAES: true,\n manifestLoadingTimeOut: 10000,\n manifestLoadingMaxRetry: 1,\n manifestLoadingRetryDelay: 1000,\n manifestLoadingMaxRetryTimeout: 64000,\n startLevel: undefined,\n levelLoadingTimeOut: 10000,\n levelLoadingMaxRetry: 4,\n levelLoadingRetryDelay: 1000,\n levelLoadingMaxRetryTimeout: 64000,\n fragLoadingTimeOut: 20000,\n fragLoadingMaxRetry: 6,\n fragLoadingRetryDelay: 1000,\n fragLoadingMaxRetryTimeout: 64000,\n fragLoadingLoopThreshold: 3,\n startFragPrefetch: false,\n fpsDroppedMonitoringPeriod: 5000,\n fpsDroppedMonitoringThreshold: 0.2,\n appendErrorMaxRetry: 3,\n loader: _xhrLoader2.default,\n //loader: FetchLoader,\n fLoader: undefined,\n pLoader: undefined,\n xhrSetup: undefined,\n fetchSetup: undefined,\n abrController: _abrController2.default,\n bufferController: _bufferController2.default,\n capLevelController: _capLevelController2.default,\n fpsController: _fpsController2.default,\n streamController: _streamController2.default,\n audioStreamController: _audioStreamController2.default,\n timelineController: _timelineController2.default,\n cueHandler: _cues2.default,\n enableCEA708Captions: true,\n enableMP2TPassThrough: false,\n stretchShortVideoTrack: false,\n forceKeyFrameOnDiscontinuity: true,\n abrEwmaFastLive: 5,\n abrEwmaSlowLive: 9,\n abrEwmaFastVoD: 3,\n abrEwmaSlowVoD: 9,\n abrEwmaDefaultEstimate: 5e5, // 500 kbps\n abrBandWidthFactor: 0.8,\n abrBandWidthUpFactor: 0.7,\n maxStarvationDelay: 4,\n maxLoadingDelay: 4,\n minAutoBitrate: 0\n };\n }\n return Hls.defaultConfig;\n },\n set: function set(defaultConfig) {\n Hls.defaultConfig = defaultConfig;\n }\n }]);\n\n function Hls() {\n var config = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n _classCallCheck(this, Hls);\n\n var defaultConfig = Hls.DefaultConfig;\n\n if ((config.liveSyncDurationCount || config.liveMaxLatencyDurationCount) && (config.liveSyncDuration || config.liveMaxLatencyDuration)) {\n throw new Error('Illegal hls.js config: don\\'t mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration');\n }\n\n for (var prop in defaultConfig) {\n if (prop in config) {\n continue;\n }\n config[prop] = defaultConfig[prop];\n }\n\n if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n }\n\n if (config.liveMaxLatencyDuration !== undefined && (config.liveMaxLatencyDuration <= config.liveSyncDuration || config.liveSyncDuration === undefined)) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDuration\" must be gt \"liveSyncDuration\"');\n }\n\n (0, _logger.enableLogs)(config.debug);\n this.config = config;\n // observer setup\n var observer = this.observer = new _events4.default();\n observer.trigger = function trigger(event) {\n for (var _len = arguments.length, data = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n\n observer.emit.apply(observer, [event, event].concat(data));\n };\n\n observer.off = function off(event) {\n for (var _len2 = arguments.length, data = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n data[_key2 - 1] = arguments[_key2];\n }\n\n observer.removeListener.apply(observer, [event].concat(data));\n };\n this.on = observer.on.bind(observer);\n this.off = observer.off.bind(observer);\n this.trigger = observer.trigger.bind(observer);\n this.playlistLoader = new _playlistLoader2.default(this);\n this.fragmentLoader = new _fragmentLoader2.default(this);\n this.levelController = new _levelController2.default(this);\n this.abrController = new config.abrController(this);\n this.bufferController = new config.bufferController(this);\n this.capLevelController = new config.capLevelController(this);\n this.fpsController = new config.fpsController(this);\n this.streamController = new config.streamController(this);\n this.audioStreamController = new config.audioStreamController(this);\n this.timelineController = new config.timelineController(this);\n this.audioTrackController = new _audioTrackController2.default(this);\n this.keyLoader = new _keyLoader2.default(this);\n }\n\n _createClass(Hls, [{\n key: 'destroy',\n value: function destroy() {\n _logger.logger.log('destroy');\n this.trigger(_events2.default.DESTROYING);\n this.detachMedia();\n this.playlistLoader.destroy();\n this.fragmentLoader.destroy();\n this.levelController.destroy();\n this.abrController.destroy();\n this.bufferController.destroy();\n this.capLevelController.destroy();\n this.fpsController.destroy();\n this.streamController.destroy();\n this.audioStreamController.destroy();\n this.timelineController.destroy();\n this.audioTrackController.destroy();\n this.keyLoader.destroy();\n this.url = null;\n this.observer.removeAllListeners();\n }\n }, {\n key: 'attachMedia',\n value: function attachMedia(media) {\n _logger.logger.log('attachMedia');\n this.media = media;\n this.trigger(_events2.default.MEDIA_ATTACHING, { media: media });\n }\n }, {\n key: 'detachMedia',\n value: function detachMedia() {\n _logger.logger.log('detachMedia');\n this.trigger(_events2.default.MEDIA_DETACHING);\n this.media = null;\n }\n }, {\n key: 'loadSource',\n value: function loadSource(url) {\n _logger.logger.log('loadSource:' + url);\n this.url = url;\n // when attaching to a source URL, trigger a playlist load\n this.trigger(_events2.default.MANIFEST_LOADING, { url: url });\n }\n }, {\n key: 'startLoad',\n value: function startLoad() {\n var startPosition = arguments.length <= 0 || arguments[0] === undefined ? -1 : arguments[0];\n\n _logger.logger.log('startLoad');\n this.levelController.startLoad();\n this.streamController.startLoad(startPosition);\n this.audioStreamController.startLoad(startPosition);\n }\n }, {\n key: 'stopLoad',\n value: function stopLoad() {\n _logger.logger.log('stopLoad');\n this.levelController.stopLoad();\n this.streamController.stopLoad();\n this.audioStreamController.stopLoad();\n }\n }, {\n key: 'swapAudioCodec',\n value: function swapAudioCodec() {\n _logger.logger.log('swapAudioCodec');\n this.streamController.swapAudioCodec();\n }\n }, {\n key: 'recoverMediaError',\n value: function recoverMediaError() {\n _logger.logger.log('recoverMediaError');\n var media = this.media;\n this.detachMedia();\n this.attachMedia(media);\n }\n\n /** Return all quality levels **/\n\n }, {\n key: 'levels',\n get: function get() {\n return this.levelController.levels;\n }\n\n /** Return current playback quality level **/\n\n }, {\n key: 'currentLevel',\n get: function get() {\n return this.streamController.currentLevel;\n }\n\n /* set quality level immediately (-1 for automatic level selection) */\n ,\n set: function set(newLevel) {\n _logger.logger.log('set currentLevel:' + newLevel);\n this.loadLevel = newLevel;\n this.streamController.immediateLevelSwitch();\n }\n\n /** Return next playback quality level (quality level of next fragment) **/\n\n }, {\n key: 'nextLevel',\n get: function get() {\n return this.streamController.nextLevel;\n }\n\n /* set quality level for next fragment (-1 for automatic level selection) */\n ,\n set: function set(newLevel) {\n _logger.logger.log('set nextLevel:' + newLevel);\n this.levelController.manualLevel = newLevel;\n this.streamController.nextLevelSwitch();\n }\n\n /** Return the quality level of current/last loaded fragment **/\n\n }, {\n key: 'loadLevel',\n get: function get() {\n return this.levelController.level;\n }\n\n /* set quality level for current/next loaded fragment (-1 for automatic level selection) */\n ,\n set: function set(newLevel) {\n _logger.logger.log('set loadLevel:' + newLevel);\n this.levelController.manualLevel = newLevel;\n }\n\n /** Return the quality level of next loaded fragment **/\n\n }, {\n key: 'nextLoadLevel',\n get: function get() {\n return this.levelController.nextLoadLevel;\n }\n\n /** set quality level of next loaded fragment **/\n ,\n set: function set(level) {\n this.levelController.nextLoadLevel = level;\n }\n\n /** Return first level (index of first level referenced in manifest)\n **/\n\n }, {\n key: 'firstLevel',\n get: function get() {\n return this.levelController.firstLevel;\n }\n\n /** set first level (index of first level referenced in manifest)\n **/\n ,\n set: function set(newLevel) {\n _logger.logger.log('set firstLevel:' + newLevel);\n this.levelController.firstLevel = newLevel;\n }\n\n /** Return start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n\n }, {\n key: 'startLevel',\n get: function get() {\n return this.levelController.startLevel;\n }\n\n /** set start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n ,\n set: function set(newLevel) {\n _logger.logger.log('set startLevel:' + newLevel);\n this.levelController.startLevel = newLevel;\n }\n\n /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n\n }, {\n key: 'autoLevelCapping',\n get: function get() {\n return this.abrController.autoLevelCapping;\n }\n\n /** set the capping/max level value that could be used by automatic level selection algorithm **/\n ,\n set: function set(newLevel) {\n _logger.logger.log('set autoLevelCapping:' + newLevel);\n this.abrController.autoLevelCapping = newLevel;\n }\n\n /* check if we are in automatic level selection mode */\n\n }, {\n key: 'autoLevelEnabled',\n get: function get() {\n return this.levelController.manualLevel === -1;\n }\n\n /* return manual level */\n\n }, {\n key: 'manualLevel',\n get: function get() {\n return this.levelController.manualLevel;\n }\n\n /** get alternate audio tracks list from playlist **/\n\n }, {\n key: 'audioTracks',\n get: function get() {\n return this.audioTrackController.audioTracks;\n }\n\n /** get index of the selected audio track (index in audio track lists) **/\n\n }, {\n key: 'audioTrack',\n get: function get() {\n return this.audioTrackController.audioTrack;\n }\n\n /** select an audio track, based on its index in audio track lists**/\n ,\n set: function set(audioTrackId) {\n this.audioTrackController.audioTrack = audioTrackId;\n }\n }, {\n key: 'liveSyncPosition',\n get: function get() {\n return this.streamController.liveSyncPosition;\n }\n }]);\n\n return Hls;\n}();\n\nexports.default = Hls;\n\n},{\"1\":1,\"10\":10,\"11\":11,\"12\":12,\"24\":24,\"26\":26,\"3\":3,\"32\":32,\"33\":33,\"34\":34,\"4\":4,\"41\":41,\"43\":43,\"47\":47,\"5\":5,\"6\":6,\"7\":7,\"9\":9}],31:[function(_dereq_,module,exports){\n'use strict';\n\n// This is mostly for support of the es6 module export\n// syntax with the babel compiler, it looks like it doesnt support\n// function exports like we are used to in node/commonjs\nmodule.exports = _dereq_(30).default;\n\n},{\"30\":30}],32:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Fragment Loader\n */\n\nvar FragmentLoader = function (_EventHandler) {\n _inherits(FragmentLoader, _EventHandler);\n\n function FragmentLoader(hls) {\n _classCallCheck(this, FragmentLoader);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(FragmentLoader).call(this, hls, _events2.default.FRAG_LOADING));\n\n _this.loaders = {};\n return _this;\n }\n\n _createClass(FragmentLoader, [{\n key: 'destroy',\n value: function destroy() {\n var loaders = this.loaders;\n for (var loaderName in loaders) {\n var loader = loaders[loaderName];\n if (loader) {\n loader.destroy();\n }\n }\n this.loaders = {};\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onFragLoading',\n value: function onFragLoading(data) {\n var frag = data.frag,\n type = frag.type,\n loader = this.loaders[type],\n config = this.hls.config;\n\n frag.loaded = 0;\n if (loader) {\n _logger.logger.warn('abort previous fragment loader for type:' + type);\n loader.abort();\n }\n loader = this.loaders[type] = frag.loader = typeof config.fLoader !== 'undefined' ? new config.fLoader(config) : new config.loader(config);\n\n var loaderContext = void 0,\n loaderConfig = void 0,\n loaderCallbacks = void 0;\n loaderContext = { url: frag.url, frag: frag, responseType: 'arraybuffer', progressData: false };\n var start = frag.byteRangeStartOffset,\n end = frag.byteRangeEndOffset;\n if (!isNaN(start) && !isNaN(end)) {\n loaderContext.rangeStart = start;\n loaderContext.rangeEnd = end;\n }\n loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: 0, retryDelay: 0, maxRetryDelay: config.fragLoadingMaxRetryTimeout };\n loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this), onProgress: this.loadprogress.bind(this) };\n loader.load(loaderContext, loaderConfig, loaderCallbacks);\n }\n }, {\n key: 'loadsuccess',\n value: function loadsuccess(response, stats, context) {\n var payload = response.data,\n frag = context.frag;\n // detach fragment loader on load success\n frag.loader = undefined;\n this.loaders[frag.type] = undefined;\n this.hls.trigger(_events2.default.FRAG_LOADED, { payload: payload, frag: frag, stats: stats });\n }\n }, {\n key: 'loaderror',\n value: function loaderror(response, context) {\n var loader = context.loader;\n if (loader) {\n loader.abort();\n }\n this.loaders[context.type] = undefined;\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: context.frag, response: response });\n }\n }, {\n key: 'loadtimeout',\n value: function loadtimeout(stats, context) {\n var loader = context.loader;\n if (loader) {\n loader.abort();\n }\n this.loaders[context.type] = undefined;\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: context.frag });\n }\n\n // data will be used for progressive parsing\n\n }, {\n key: 'loadprogress',\n value: function loadprogress(stats, context, data) {\n // jshint ignore:line\n var frag = context.frag;\n frag.loaded = stats.loaded;\n this.hls.trigger(_events2.default.FRAG_LOAD_PROGRESS, { frag: frag, stats: stats });\n }\n }]);\n\n return FragmentLoader;\n}(_eventHandler2.default);\n\nexports.default = FragmentLoader;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],33:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _errors = _dereq_(24);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Decrypt key Loader\n */\n\nvar KeyLoader = function (_EventHandler) {\n _inherits(KeyLoader, _EventHandler);\n\n function KeyLoader(hls) {\n _classCallCheck(this, KeyLoader);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(KeyLoader).call(this, hls, _events2.default.KEY_LOADING));\n\n _this.loaders = {};\n _this.decryptkey = null;\n _this.decrypturl = null;\n return _this;\n }\n\n _createClass(KeyLoader, [{\n key: 'destroy',\n value: function destroy() {\n for (var loaderName in this.loaders) {\n var loader = this.loaders[loaderName];\n if (loader) {\n loader.destroy();\n }\n }\n this.loaders = {};\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onKeyLoading',\n value: function onKeyLoading(data) {\n var frag = data.frag,\n type = frag.type,\n loader = this.loaders[type],\n decryptdata = frag.decryptdata,\n uri = decryptdata.uri;\n // if uri is different from previous one or if decrypt key not retrieved yet\n if (uri !== this.decrypturl || this.decryptkey === null) {\n var config = this.hls.config;\n\n if (loader) {\n _logger.logger.warn('abort previous fragment loader for type:' + type);\n loader.abort();\n }\n frag.loader = this.loaders[type] = new config.loader(config);\n this.decrypturl = uri;\n this.decryptkey = null;\n\n var loaderContext = void 0,\n loaderConfig = void 0,\n loaderCallbacks = void 0;\n loaderContext = { url: uri, frag: frag, responseType: 'arraybuffer' };\n loaderConfig = { timeout: config.fragLoadingTimeOut, maxRetry: config.fragLoadingMaxRetry, retryDelay: config.fragLoadingRetryDelay, maxRetryDelay: config.fragLoadingMaxRetryTimeout };\n loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };\n frag.loader.load(loaderContext, loaderConfig, loaderCallbacks);\n } else if (this.decryptkey) {\n // we already loaded this key, return it\n decryptdata.key = this.decryptkey;\n this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });\n }\n }\n }, {\n key: 'loadsuccess',\n value: function loadsuccess(response, stats, context) {\n var frag = context.frag;\n this.decryptkey = frag.decryptdata.key = new Uint8Array(response.data);\n // detach fragment loader on load success\n frag.loader = undefined;\n this.loaders[context.type] = undefined;\n this.hls.trigger(_events2.default.KEY_LOADED, { frag: frag });\n }\n }, {\n key: 'loaderror',\n value: function loaderror(response, context) {\n var frag = context.frag,\n loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n this.loaders[context.type] = undefined;\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: frag, response: response });\n }\n }, {\n key: 'loadtimeout',\n value: function loadtimeout(stats, context) {\n var frag = context.frag,\n loader = frag.loader;\n if (loader) {\n loader.abort();\n }\n this.loaders[context.type] = undefined;\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: frag });\n }\n }]);\n\n return KeyLoader;\n}(_eventHandler2.default);\n\nexports.default = KeyLoader;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"43\":43}],34:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _eventHandler = _dereq_(25);\n\nvar _eventHandler2 = _interopRequireDefault(_eventHandler);\n\nvar _errors = _dereq_(24);\n\nvar _url = _dereq_(46);\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _attrList = _dereq_(38);\n\nvar _attrList2 = _interopRequireDefault(_attrList);\n\nvar _logger = _dereq_(43);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\n * Playlist Loader\n */\n\nvar PlaylistLoader = function (_EventHandler) {\n _inherits(PlaylistLoader, _EventHandler);\n\n function PlaylistLoader(hls) {\n _classCallCheck(this, PlaylistLoader);\n\n var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(PlaylistLoader).call(this, hls, _events2.default.MANIFEST_LOADING, _events2.default.LEVEL_LOADING, _events2.default.AUDIO_TRACK_LOADING));\n\n _this.loaders = {};\n return _this;\n }\n\n _createClass(PlaylistLoader, [{\n key: 'destroy',\n value: function destroy() {\n for (var loaderName in this.loaders) {\n var loader = this.loaders[loaderName];\n if (loader) {\n loader.destroy();\n }\n }\n this.loaders = {};\n _eventHandler2.default.prototype.destroy.call(this);\n }\n }, {\n key: 'onManifestLoading',\n value: function onManifestLoading(data) {\n this.load(data.url, { type: 'manifest' });\n }\n }, {\n key: 'onLevelLoading',\n value: function onLevelLoading(data) {\n this.load(data.url, { type: 'level', level: data.level, id: data.id });\n }\n }, {\n key: 'onAudioTrackLoading',\n value: function onAudioTrackLoading(data) {\n this.load(data.url, { type: 'audioTrack', id: data.id });\n }\n }, {\n key: 'load',\n value: function load(url, context) {\n var loader = this.loaders[context.type];\n if (loader) {\n var loaderContext = loader.context;\n if (loaderContext && loaderContext.url === url) {\n _logger.logger.trace('playlist request ongoing');\n return;\n } else {\n _logger.logger.warn('abort previous loader for type:' + context.type);\n loader.abort();\n }\n }\n var config = this.hls.config,\n retry = void 0,\n timeout = void 0,\n retryDelay = void 0,\n maxRetryDelay = void 0;\n if (context.type === 'manifest') {\n retry = config.manifestLoadingMaxRetry;\n timeout = config.manifestLoadingTimeOut;\n retryDelay = config.manifestLoadingRetryDelay;\n maxRetryDelay = config.manifestLoadingMaxRetryTimeOut;\n } else {\n retry = config.levelLoadingMaxRetry;\n timeout = config.levelLoadingTimeOut;\n retryDelay = config.levelLoadingRetryDelay;\n maxRetryDelay = config.levelLoadingMaxRetryTimeOut;\n _logger.logger.log('loading playlist for level ' + context.level);\n }\n loader = this.loaders[context.type] = context.loader = typeof config.pLoader !== 'undefined' ? new config.pLoader(config) : new config.loader(config);\n context.url = url;\n context.responseType = '';\n\n var loaderConfig = void 0,\n loaderCallbacks = void 0;\n loaderConfig = { timeout: timeout, maxRetry: retry, retryDelay: retryDelay, maxRetryDelay: maxRetryDelay };\n loaderCallbacks = { onSuccess: this.loadsuccess.bind(this), onError: this.loaderror.bind(this), onTimeout: this.loadtimeout.bind(this) };\n loader.load(context, loaderConfig, loaderCallbacks);\n }\n }, {\n key: 'resolve',\n value: function resolve(url, baseUrl) {\n return _url2.default.buildAbsoluteURL(baseUrl, url);\n }\n }, {\n key: 'parseMasterPlaylist',\n value: function parseMasterPlaylist(string, baseurl) {\n var levels = [],\n result = void 0;\n\n // https://regex101.com is your friend\n var re = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\n while ((result = re.exec(string)) != null) {\n var level = {};\n\n var attrs = level.attrs = new _attrList2.default(result[1]);\n level.url = this.resolve(result[2], baseurl);\n\n var resolution = attrs.decimalResolution('RESOLUTION');\n if (resolution) {\n level.width = resolution.width;\n level.height = resolution.height;\n }\n level.bitrate = attrs.decimalInteger('AVERAGE-BANDWIDTH') || attrs.decimalInteger('BANDWIDTH');\n level.name = attrs.NAME;\n\n var codecs = attrs.CODECS;\n if (codecs) {\n codecs = codecs.split(',');\n for (var i = 0; i < codecs.length; i++) {\n var codec = codecs[i];\n if (codec.indexOf('avc1') !== -1) {\n level.videoCodec = this.avc1toavcoti(codec);\n } else {\n level.audioCodec = codec;\n }\n }\n }\n\n levels.push(level);\n }\n return levels;\n }\n }, {\n key: 'parseMasterPlaylistMedia',\n value: function parseMasterPlaylistMedia(string, baseurl, type) {\n var result = void 0,\n medias = [];\n\n // https://regex101.com is your friend\n var re = /#EXT-X-MEDIA:(.*)/g;\n while ((result = re.exec(string)) != null) {\n var media = {};\n var attrs = new _attrList2.default(result[1]);\n if (attrs.TYPE === type) {\n media.groupId = attrs['GROUP-ID'];\n media.name = attrs.NAME;\n media.type = type;\n media.default = attrs.DEFAULT === 'YES';\n media.autoselect = attrs.AUTOSELECT === 'YES';\n media.forced = attrs.FORCED === 'YES';\n if (attrs.URI) {\n media.url = this.resolve(attrs.URI, baseurl);\n }\n media.lang = attrs.LANGUAGE;\n if (!media.name) {\n media.name = media.lang;\n }\n medias.push(media);\n }\n }\n return medias;\n }\n /**\n * Utility method for parseLevelPlaylist to create an initialization vector for a given segment\n * @returns {Uint8Array}\n */\n\n }, {\n key: 'createInitializationVector',\n value: function createInitializationVector(segmentNumber) {\n var uint8View = new Uint8Array(16);\n\n for (var i = 12; i < 16; i++) {\n uint8View[i] = segmentNumber >> 8 * (15 - i) & 0xff;\n }\n\n return uint8View;\n }\n\n /**\n * Utility method for parseLevelPlaylist to get a fragment's decryption data from the currently parsed encryption key data\n * @param levelkey - a playlist's encryption info\n * @param segmentNumber - the fragment's segment number\n * @returns {*} - an object to be applied as a fragment's decryptdata\n */\n\n }, {\n key: 'fragmentDecryptdataFromLevelkey',\n value: function fragmentDecryptdataFromLevelkey(levelkey, segmentNumber) {\n var decryptdata = levelkey;\n\n if (levelkey && levelkey.method && levelkey.uri && !levelkey.iv) {\n decryptdata = this.cloneObj(levelkey);\n decryptdata.iv = this.createInitializationVector(segmentNumber);\n }\n\n return decryptdata;\n }\n }, {\n key: 'avc1toavcoti',\n value: function avc1toavcoti(codec) {\n var result,\n avcdata = codec.split('.');\n if (avcdata.length > 2) {\n result = avcdata.shift() + '.';\n result += parseInt(avcdata.shift()).toString(16);\n result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n } else {\n result = codec;\n }\n return result;\n }\n }, {\n key: 'cloneObj',\n value: function cloneObj(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n }, {\n key: 'parseLevelPlaylist',\n value: function parseLevelPlaylist(string, baseurl, id, type) {\n var currentSN = 0,\n fragdecryptdata,\n totalduration = 0,\n level = { type: null, version: null, url: baseurl, fragments: [], live: true, startSN: 0 },\n levelkey = { method: null, key: null, iv: null, uri: null },\n cc = 0,\n programDateTime = null,\n frag = null,\n result,\n regexp,\n duration = null,\n title = null,\n byteRangeEndOffset = null,\n byteRangeStartOffset = null,\n tagList = [];\n\n regexp = /(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE):(\\d+))|(?:#EXT-X-(TARGETDURATION):(\\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT(INF):(\\d+(?:\\.\\d+)?)(?:,(.*))?)|(?:(?!#)()(\\S.+))|(?:#EXT-X-(BYTERANGE):(\\d+(?:@\\d+(?:\\.\\d+)?)?)|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.+))|(?:#EXT-X-(VERSION):(\\d+))|(?:(#)(.*):(.*))|(?:(#)(.*)))(?:.*)\\r?\\n?/g;\n while ((result = regexp.exec(string)) !== null) {\n result.shift();\n result = result.filter(function (n) {\n return n !== undefined;\n });\n switch (result[0]) {\n case 'PLAYLIST-TYPE':\n level.type = result[1].toUpperCase();\n break;\n case 'MEDIA-SEQUENCE':\n currentSN = level.startSN = parseInt(result[1]);\n break;\n case 'TARGETDURATION':\n level.targetduration = parseFloat(result[1]);\n break;\n case 'VERSION':\n level.version = parseInt(result[1]);\n break;\n case 'EXTM3U':\n break;\n case 'ENDLIST':\n level.live = false;\n break;\n case 'DIS':\n cc++;\n tagList.push(result);\n break;\n case 'BYTERANGE':\n var params = result[1].split('@');\n if (params.length === 1) {\n byteRangeStartOffset = byteRangeEndOffset;\n } else {\n byteRangeStartOffset = parseInt(params[1]);\n }\n byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;\n break;\n case 'INF':\n duration = parseFloat(result[1]);\n title = result[2] ? result[2] : null;\n tagList.push(result);\n break;\n case '':\n // url\n if (!isNaN(duration)) {\n var sn = currentSN++;\n fragdecryptdata = this.fragmentDecryptdataFromLevelkey(levelkey, sn);\n var url = result[1] ? this.resolve(result[1], baseurl) : null;\n frag = { url: url,\n type: type,\n duration: duration,\n title: title,\n start: totalduration,\n sn: sn,\n level: id,\n cc: cc,\n decryptdata: fragdecryptdata,\n programDateTime: programDateTime,\n tagList: tagList };\n // only include byte range options if used/needed\n if (byteRangeStartOffset !== null) {\n frag.byteRangeStartOffset = byteRangeStartOffset;\n frag.byteRangeEndOffset = byteRangeEndOffset;\n }\n level.fragments.push(frag);\n totalduration += duration;\n duration = null;\n title = null;\n byteRangeStartOffset = null;\n programDateTime = null;\n tagList = [];\n }\n break;\n case 'KEY':\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n var decryptparams = result[1];\n var keyAttrs = new _attrList2.default(decryptparams);\n var decryptmethod = keyAttrs.enumeratedString('METHOD'),\n decrypturi = keyAttrs.URI,\n decryptiv = keyAttrs.hexadecimalInteger('IV');\n if (decryptmethod) {\n levelkey = { method: null, key: null, iv: null, uri: null };\n if (decrypturi && decryptmethod === 'AES-128') {\n levelkey.method = decryptmethod;\n // URI to get the key\n levelkey.uri = this.resolve(decrypturi, baseurl);\n levelkey.key = null;\n // Initialization Vector (IV)\n levelkey.iv = decryptiv;\n }\n }\n break;\n case 'START':\n var startParams = result[1];\n var startAttrs = new _attrList2.default(startParams);\n var startTimeOffset = startAttrs.decimalFloatingPoint('TIME-OFFSET');\n //TIME-OFFSET can be 0\n if (!isNaN(startTimeOffset)) {\n level.startTimeOffset = startTimeOffset;\n }\n break;\n case 'PROGRAM-DATE-TIME':\n programDateTime = new Date(Date.parse(result[1]));\n tagList.push(result);\n break;\n case '#':\n result.shift();\n tagList.push(result);\n break;\n default:\n _logger.logger.warn('line parsed but not handled: ' + result);\n break;\n }\n }\n //logger.log('found ' + level.fragments.length + ' fragments');\n if (frag && !frag.url) {\n level.fragments.pop();\n totalduration -= frag.duration;\n }\n level.totalduration = totalduration;\n level.averagetargetduration = totalduration / level.fragments.length;\n level.endSN = currentSN - 1;\n return level;\n }\n }, {\n key: 'loadsuccess',\n value: function loadsuccess(response, stats, context) {\n var string = response.data,\n url = response.url,\n type = context.type,\n id = context.id,\n level = context.level,\n hls = this.hls;\n\n this.loaders[type] = undefined;\n // responseURL not supported on some browsers (it is used to detect URL redirection)\n // data-uri mode also not supported (but no need to detect redirection)\n if (url === undefined || url.indexOf('data:') === 0) {\n // fallback to initial URL\n url = context.url;\n }\n stats.tload = performance.now();\n //stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n if (string.indexOf('#EXTM3U') === 0) {\n if (string.indexOf('#EXTINF:') > 0) {\n var isLevel = type !== 'audioTrack',\n levelDetails = this.parseLevelPlaylist(string, url, (isLevel ? level : id) || 0, isLevel ? 'main' : 'audio');\n if (type === 'manifest') {\n // first request, stream manifest (no master playlist), fire manifest loaded event with level details\n hls.trigger(_events2.default.MANIFEST_LOADED, { levels: [{ url: url, details: levelDetails }], audioTracks: [], url: url, stats: stats });\n }\n stats.tparsed = performance.now();\n if (isLevel) {\n hls.trigger(_events2.default.LEVEL_LOADED, { details: levelDetails, level: level || 0, id: id || 0, stats: stats });\n } else {\n hls.trigger(_events2.default.AUDIO_TRACK_LOADED, { details: levelDetails, id: id, stats: stats });\n }\n } else {\n var levels = this.parseMasterPlaylist(string, url);\n // multi level playlist, parse level info\n if (levels.length) {\n var audiotracks = this.parseMasterPlaylistMedia(string, url, 'AUDIO');\n if (audiotracks.length) {\n // check if we have found an audio track embedded in main playlist (audio track without URI attribute)\n var embeddedAudioFound = false;\n audiotracks.forEach(function (audioTrack) {\n if (!audioTrack.url) {\n embeddedAudioFound = true;\n }\n });\n // if no embedded audio track defined, but audio codec signaled in quality level, we need to signal this main audio track\n // this could happen with playlists with alt audio rendition in which quality levels (main) contains both audio+video. but with mixed audio track not signaled\n if (embeddedAudioFound === false && levels[0].audioCodec && !levels[0].attrs.AUDIO) {\n _logger.logger.log('audio codec signaled in quality level, but no embedded audio track signaled, create one');\n audiotracks.unshift({ type: 'main', name: 'main' });\n }\n }\n hls.trigger(_events2.default.MANIFEST_LOADED, { levels: levels, audioTracks: audiotracks, url: url, stats: stats });\n } else {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest' });\n }\n }\n } else {\n hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: _errors.ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter' });\n }\n }\n }, {\n key: 'loaderror',\n value: function loaderror(response, context) {\n var details,\n fatal,\n loader = context.loader;\n switch (context.type) {\n case 'manifest':\n details = _errors.ErrorDetails.MANIFEST_LOAD_ERROR;\n fatal = true;\n break;\n case 'level':\n details = _errors.ErrorDetails.LEVEL_LOAD_ERROR;\n fatal = false;\n break;\n case 'audioTrack':\n details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_ERROR;\n fatal = false;\n break;\n }\n if (loader) {\n loader.abort();\n this.loaders[context.type] = undefined;\n }\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, response: response, context: context });\n }\n }, {\n key: 'loadtimeout',\n value: function loadtimeout(stats, context) {\n var details,\n fatal,\n loader = context.loader;\n switch (context.type) {\n case 'manifest':\n details = _errors.ErrorDetails.MANIFEST_LOAD_TIMEOUT;\n fatal = true;\n break;\n case 'level':\n details = _errors.ErrorDetails.LEVEL_LOAD_TIMEOUT;\n fatal = false;\n break;\n case 'audioTrack':\n details = _errors.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT;\n fatal = false;\n break;\n }\n if (loader) {\n loader.abort();\n this.loaders[context.type] = undefined;\n }\n this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: loader.url, loader: loader, context: context });\n }\n }]);\n\n return PlaylistLoader;\n}(_eventHandler2.default);\n\nexports.default = PlaylistLoader;\n\n},{\"24\":24,\"25\":25,\"26\":26,\"38\":38,\"43\":43,\"46\":46}],35:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Generate MP4 Box\n*/\n\n//import Hex from '../utils/hex';\n\nvar MP4 = function () {\n function MP4() {\n _classCallCheck(this, MP4);\n }\n\n _createClass(MP4, null, [{\n key: 'init',\n value: function init() {\n MP4.types = {\n avc1: [], // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n mvex: [],\n mvhd: [],\n sdtp: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: [],\n smhd: []\n };\n\n var i;\n for (i in MP4.types) {\n if (MP4.types.hasOwnProperty(i)) {\n MP4.types[i] = [i.charCodeAt(0), i.charCodeAt(1), i.charCodeAt(2), i.charCodeAt(3)];\n }\n }\n\n var videoHdlr = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65, 0x6f, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n\n var audioHdlr = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n\n MP4.HDLR_TYPES = {\n 'video': videoHdlr,\n 'audio': audioHdlr\n };\n\n var dref = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n\n var stco = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n\n MP4.STTS = MP4.STSC = MP4.STCO = stco;\n\n MP4.STSZ = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00]);\n // sample_count\n MP4.VMHD = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // opcolor\n ]);\n MP4.SMHD = new Uint8Array([0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance\n 0x00, 0x00 // reserved\n ]);\n\n MP4.STSD = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01]); // entry_count\n\n var majorBrand = new Uint8Array([105, 115, 111, 109]); // isom\n var avc1Brand = new Uint8Array([97, 118, 99, 49]); // avc1\n var minorVersion = new Uint8Array([0, 0, 0, 1]);\n\n MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n }\n }, {\n key: 'box',\n value: function box(type) {\n var payload = Array.prototype.slice.call(arguments, 1),\n size = 8,\n i = payload.length,\n len = i,\n result;\n // calculate the total size we need to allocate\n while (i--) {\n size += payload[i].byteLength;\n }\n result = new Uint8Array(size);\n result[0] = size >> 24 & 0xff;\n result[1] = size >> 16 & 0xff;\n result[2] = size >> 8 & 0xff;\n result[3] = size & 0xff;\n result.set(type, 4);\n // copy the payload into the result\n for (i = 0, size = 8; i < len; i++) {\n // copy payload[i] array @ offset size\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n }\n }, {\n key: 'hdlr',\n value: function hdlr(type) {\n return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n }\n }, {\n key: 'mdat',\n value: function mdat(data) {\n return MP4.box(MP4.types.mdat, data);\n }\n }, {\n key: 'mdhd',\n value: function mdhd(timescale, duration) {\n duration *= timescale;\n return MP4.box(MP4.types.mdhd, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x03, // modification_time\n timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale\n duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00]));\n }\n }, {\n key: 'mdia',\n value: function mdia(track) {\n return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n }\n }, {\n key: 'mfhd',\n value: function mfhd(sequenceNumber) {\n return MP4.box(MP4.types.mfhd, new Uint8Array([0x00, 0x00, 0x00, 0x00, // flags\n sequenceNumber >> 24, sequenceNumber >> 16 & 0xFF, sequenceNumber >> 8 & 0xFF, sequenceNumber & 0xFF]));\n }\n }, {\n key: 'minf',\n // sequence_number\n value: function minf(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n } else {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n }\n }\n }, {\n key: 'moof',\n value: function moof(sn, baseMediaDecodeTime, track) {\n return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track, baseMediaDecodeTime));\n }\n /**\n * @param tracks... (optional) {array} the tracks associated with this movie\n */\n\n }, {\n key: 'moov',\n value: function moov(tracks) {\n var i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trak(tracks[i]);\n }\n\n return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));\n }\n }, {\n key: 'mvex',\n value: function mvex(tracks) {\n var i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trex(tracks[i]);\n }\n return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n }\n }, {\n key: 'mvhd',\n value: function mvhd(timescale, duration) {\n duration *= timescale;\n var bytes = new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // creation_time\n 0x00, 0x00, 0x00, 0x02, // modification_time\n timescale >> 24 & 0xFF, timescale >> 16 & 0xFF, timescale >> 8 & 0xFF, timescale & 0xFF, // timescale\n duration >> 24 & 0xFF, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return MP4.box(MP4.types.mvhd, bytes);\n }\n }, {\n key: 'sdtp',\n value: function sdtp(track) {\n var samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i;\n // leave the full box header (4 bytes) all zero\n // write the sample table\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = flags.dependsOn << 4 | flags.isDependedOn << 2 | flags.hasRedundancy;\n }\n\n return MP4.box(MP4.types.sdtp, bytes);\n }\n }, {\n key: 'stbl',\n value: function stbl(track) {\n return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n }\n }, {\n key: 'avc1',\n value: function avc1(track) {\n var sps = [],\n pps = [],\n i,\n data,\n len;\n // assemble the SPSs\n\n for (i = 0; i < track.sps.length; i++) {\n data = track.sps[i];\n len = data.byteLength;\n sps.push(len >>> 8 & 0xFF);\n sps.push(len & 0xFF);\n sps = sps.concat(Array.prototype.slice.call(data)); // SPS\n }\n\n // assemble the PPSs\n for (i = 0; i < track.pps.length; i++) {\n data = track.pps[i];\n len = data.byteLength;\n pps.push(len >>> 8 & 0xFF);\n pps.push(len & 0xFF);\n pps = pps.concat(Array.prototype.slice.call(data));\n }\n\n var avcc = MP4.box(MP4.types.avcC, new Uint8Array([0x01, // version\n sps[3], // profile\n sps[4], // profile compat\n sps[5], // level\n 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes\n 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n ].concat(sps).concat([track.pps.length // numOfPictureParameterSets\n ]).concat(pps))),\n // \"PPS\"\n width = track.width,\n height = track.height;\n //console.log('avcc:' + Hex.hexDump(avcc));\n return MP4.box(MP4.types.avc1, new Uint8Array([0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // pre_defined\n width >> 8 & 0xFF, width & 0xff, // width\n height >> 8 & 0xFF, height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x12, 0x64, 0x61, 0x69, 0x6C, //dailymotion/hls.js\n 0x79, 0x6D, 0x6F, 0x74, 0x69, 0x6F, 0x6E, 0x2F, 0x68, 0x6C, 0x73, 0x2E, 0x6A, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11]), // pre_defined = -1\n avcc, MP4.box(MP4.types.btrt, new Uint8Array([0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0])) // avgBitrate\n );\n }\n }, {\n key: 'esds',\n value: function esds(track) {\n var configlen = track.config.length;\n return new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n\n 0x03, // descriptor_type\n 0x17 + configlen, // length\n 0x00, 0x01, //es_id\n 0x00, // stream_priority\n\n 0x04, // descriptor_type\n 0x0f + configlen, // length\n 0x40, //codec : mpeg4_audio\n 0x15, // stream_type\n 0x00, 0x00, 0x00, // buffer_size\n 0x00, 0x00, 0x00, 0x00, // maxBitrate\n 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\n 0x05 // descriptor_type\n ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n }\n }, {\n key: 'mp4a',\n value: function mp4a(track) {\n var audiosamplerate = track.audiosamplerate;\n return MP4.box(MP4.types.mp4a, new Uint8Array([0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, track.channelCount, // channelcount\n 0x00, 0x10, // sampleSize:16bits\n 0x00, 0x00, 0x00, 0x00, // reserved2\n audiosamplerate >> 8 & 0xFF, audiosamplerate & 0xff, //\n 0x00, 0x00]), MP4.box(MP4.types.esds, MP4.esds(track)));\n }\n }, {\n key: 'stsd',\n value: function stsd(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n } else {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n }\n }\n }, {\n key: 'tkhd',\n value: function tkhd(track) {\n var id = track.id,\n duration = track.duration * track.timescale,\n width = track.width,\n height = track.height;\n return MP4.box(MP4.types.tkhd, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n id >> 24 & 0xFF, id >> 16 & 0xFF, id >> 8 & 0xFF, id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n duration >> 24, duration >> 16 & 0xFF, duration >> 8 & 0xFF, duration & 0xFF, // duration\n 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n 0x00, 0x00, // non-audio track volume\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n width >> 8 & 0xFF, width & 0xFF, 0x00, 0x00, // width\n height >> 8 & 0xFF, height & 0xFF, 0x00, 0x00 // height\n ]));\n }\n }, {\n key: 'traf',\n value: function traf(track, baseMediaDecodeTime) {\n var sampleDependencyTable = MP4.sdtp(track),\n id = track.id;\n return MP4.box(MP4.types.traf, MP4.box(MP4.types.tfhd, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF])), // track_ID\n MP4.box(MP4.types.tfdt, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n baseMediaDecodeTime >> 24, baseMediaDecodeTime >> 16 & 0XFF, baseMediaDecodeTime >> 8 & 0XFF, baseMediaDecodeTime & 0xFF])), // baseMediaDecodeTime\n MP4.trun(track, sampleDependencyTable.length + 16 + // tfhd\n 16 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8), // mdat header\n sampleDependencyTable);\n }\n\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n\n }, {\n key: 'trak',\n value: function trak(track) {\n track.duration = track.duration || 0xffffffff;\n return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n }\n }, {\n key: 'trex',\n value: function trex(track) {\n var id = track.id;\n return MP4.box(MP4.types.trex, new Uint8Array([0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n id >> 24, id >> 16 & 0XFF, id >> 8 & 0XFF, id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]));\n }\n }, {\n key: 'trun',\n value: function trun(track, offset) {\n var samples = track.samples || [],\n len = samples.length,\n arraylen = 12 + 16 * len,\n array = new Uint8Array(arraylen),\n i,\n sample,\n duration,\n size,\n flags,\n cts;\n offset += 8 + arraylen;\n array.set([0x00, // version 0\n 0x00, 0x0f, 0x01, // flags\n len >>> 24 & 0xFF, len >>> 16 & 0xFF, len >>> 8 & 0xFF, len & 0xFF, // sample_count\n offset >>> 24 & 0xFF, offset >>> 16 & 0xFF, offset >>> 8 & 0xFF, offset & 0xFF // data_offset\n ], 0);\n for (i = 0; i < len; i++) {\n sample = samples[i];\n duration = sample.duration;\n size = sample.size;\n flags = sample.flags;\n cts = sample.cts;\n array.set([duration >>> 24 & 0xFF, duration >>> 16 & 0xFF, duration >>> 8 & 0xFF, duration & 0xFF, // sample_duration\n size >>> 24 & 0xFF, size >>> 16 & 0xFF, size >>> 8 & 0xFF, size & 0xFF, // sample_size\n flags.isLeading << 2 | flags.dependsOn, flags.isDependedOn << 6 | flags.hasRedundancy << 4 | flags.paddingValue << 1 | flags.isNonSync, flags.degradPrio & 0xF0 << 8, flags.degradPrio & 0x0F, // sample_flags\n cts >>> 24 & 0xFF, cts >>> 16 & 0xFF, cts >>> 8 & 0xFF, cts & 0xFF // sample_composition_time_offset\n ], 12 + 16 * i);\n }\n return MP4.box(MP4.types.trun, array);\n }\n }, {\n key: 'initSegment',\n value: function initSegment(tracks) {\n if (!MP4.types) {\n MP4.init();\n }\n var movie = MP4.moov(tracks),\n result;\n result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n result.set(MP4.FTYP);\n result.set(movie, MP4.FTYP.byteLength);\n return result;\n }\n }]);\n\n return MP4;\n}();\n\nexports.default = MP4;\n\n},{}],36:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * fMP4 remuxer\n */\n\nvar _aac = _dereq_(27);\n\nvar _aac2 = _interopRequireDefault(_aac);\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _logger = _dereq_(43);\n\nvar _mp4Generator = _dereq_(35);\n\nvar _mp4Generator2 = _interopRequireDefault(_mp4Generator);\n\nvar _errors = _dereq_(24);\n\n_dereq_(44);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar MP4Remuxer = function () {\n function MP4Remuxer(observer, id, config) {\n _classCallCheck(this, MP4Remuxer);\n\n this.observer = observer;\n this.id = id;\n this.config = config;\n this.ISGenerated = false;\n this.PES2MP4SCALEFACTOR = 4;\n this.PES_TIMESCALE = 90000;\n this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;\n }\n\n _createClass(MP4Remuxer, [{\n key: 'destroy',\n value: function destroy() {}\n }, {\n key: 'insertDiscontinuity',\n value: function insertDiscontinuity() {\n this._initPTS = this._initDTS = undefined;\n }\n }, {\n key: 'switchLevel',\n value: function switchLevel() {\n this.ISGenerated = false;\n }\n }, {\n key: 'remux',\n value: function remux(level, sn, audioTrack, videoTrack, id3Track, textTrack, timeOffset, contiguous, accurateTimeOffset) {\n this.level = level;\n this.sn = sn;\n // generate Init Segment if needed\n if (!this.ISGenerated) {\n this.generateIS(audioTrack, videoTrack, timeOffset);\n }\n\n if (this.ISGenerated) {\n // Purposefully remuxing audio before video, so that remuxVideo can use nextAacPts, which is\n // calculated in remuxAudio.\n //logger.log('nb AAC samples:' + audioTrack.samples.length);\n if (audioTrack.samples.length) {\n var audioData = this.remuxAudio(audioTrack, timeOffset, contiguous, accurateTimeOffset);\n //logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (videoTrack.samples.length) {\n var audioTrackLength = void 0;\n if (audioData) {\n audioTrackLength = audioData.endPTS - audioData.startPTS;\n }\n this.remuxVideo(videoTrack, timeOffset, contiguous, audioTrackLength);\n }\n } else {\n var videoData = void 0;\n //logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (videoTrack.samples.length) {\n videoData = this.remuxVideo(videoTrack, timeOffset, contiguous);\n }\n if (videoData && audioTrack.codec) {\n this.remuxEmptyAudio(audioTrack, timeOffset, contiguous, videoData);\n }\n }\n }\n //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (id3Track.samples.length) {\n this.remuxID3(id3Track, timeOffset);\n }\n //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (textTrack.samples.length) {\n this.remuxText(textTrack, timeOffset);\n }\n //notify end of parsing\n this.observer.trigger(_events2.default.FRAG_PARSED, { id: this.id, level: this.level, sn: this.sn });\n }\n }, {\n key: 'generateIS',\n value: function generateIS(audioTrack, videoTrack, timeOffset) {\n var observer = this.observer,\n audioSamples = audioTrack.samples,\n videoSamples = videoTrack.samples,\n pesTimeScale = this.PES_TIMESCALE,\n tracks = {},\n data = { id: this.id, level: this.level, sn: this.sn, tracks: tracks, unique: false },\n computePTSDTS = this._initPTS === undefined,\n initPTS,\n initDTS;\n\n if (computePTSDTS) {\n initPTS = initDTS = Infinity;\n }\n if (audioTrack.config && audioSamples.length) {\n audioTrack.timescale = audioTrack.audiosamplerate;\n // MP4 duration (track duration in seconds multiplied by timescale) is coded on 32 bits\n // we know that each AAC sample contains 1024 frames....\n // in order to avoid overflowing the 32 bit counter for large duration, we use smaller timescale (timescale/gcd)\n // we just need to ensure that AAC sample duration will still be an integer (will be 1024/gcd)\n if (audioTrack.timescale * audioTrack.duration > Math.pow(2, 32)) {\n (function () {\n var greatestCommonDivisor = function greatestCommonDivisor(a, b) {\n if (!b) {\n return a;\n }\n return greatestCommonDivisor(b, a % b);\n };\n audioTrack.timescale = audioTrack.audiosamplerate / greatestCommonDivisor(audioTrack.audiosamplerate, 1024);\n })();\n }\n _logger.logger.log('audio mp4 timescale :' + audioTrack.timescale);\n tracks.audio = {\n container: 'audio/mp4',\n codec: audioTrack.codec,\n initSegment: _mp4Generator2.default.initSegment([audioTrack]),\n metadata: {\n channelCount: audioTrack.channelCount\n }\n };\n if (computePTSDTS) {\n // remember first PTS of this demuxing context. for audio, PTS = DTS\n initPTS = initDTS = audioSamples[0].pts - pesTimeScale * timeOffset;\n }\n }\n\n if (videoTrack.sps && videoTrack.pps && videoSamples.length) {\n videoTrack.timescale = this.MP4_TIMESCALE;\n tracks.video = {\n container: 'video/mp4',\n codec: videoTrack.codec,\n initSegment: _mp4Generator2.default.initSegment([videoTrack]),\n metadata: {\n width: videoTrack.width,\n height: videoTrack.height\n }\n };\n if (computePTSDTS) {\n initPTS = Math.min(initPTS, videoSamples[0].pts - pesTimeScale * timeOffset);\n initDTS = Math.min(initDTS, videoSamples[0].dts - pesTimeScale * timeOffset);\n }\n }\n\n if (Object.keys(tracks).length) {\n observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);\n this.ISGenerated = true;\n if (computePTSDTS) {\n this._initPTS = initPTS;\n this._initDTS = initDTS;\n }\n } else {\n observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, id: this.id, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });\n }\n }\n }, {\n key: 'remuxVideo',\n value: function remuxVideo(track, timeOffset, contiguous, audioTrackLength) {\n var offset = 8,\n pesTimeScale = this.PES_TIMESCALE,\n pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n mp4SampleDuration,\n mdat,\n moof,\n firstPTS,\n firstDTS,\n nextDTS,\n lastPTS,\n lastDTS,\n inputSamples = track.samples,\n outputSamples = [];\n\n // for (let i = 0; i < track.samples.length; i++) {\n // let avcSample = track.samples[i];\n // let units = avcSample.units.units;\n // let unitsString = '';\n // for (let j = 0; j < units.length ; j++) {\n // unitsString += units[j].type + ',';\n // if (units[j].data.length < 500) {\n // unitsString += Hex.hexDump(units[j].data);\n // }\n // }\n // logger.log(avcSample.pts + '/' + avcSample.dts + ',' + unitsString + avcSample.units.length);\n // }\n\n // handle broken streams with PTS < DTS, tolerance up 200ms (18000 in 90kHz timescale)\n var PTSDTSshift = inputSamples.reduce(function (prev, curr) {\n return Math.max(Math.min(prev, curr.pts - curr.dts), -18000);\n }, 0);\n if (PTSDTSshift < 0) {\n _logger.logger.warn('PTS < DTS detected in video samples, shifting DTS by ' + Math.round(PTSDTSshift / 90) + ' ms to overcome this issue');\n for (var i = 0; i < inputSamples.length; i++) {\n inputSamples[i].dts += PTSDTSshift;\n }\n }\n\n // PTS is coded on 33bits, and can loop from -2^32 to 2^32\n // PTSNormalize will make PTS/DTS value monotonic, we use last known DTS value as reference value\n var nextAvcDts = void 0;\n // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n if (contiguous) {\n // if parsed fragment is contiguous with last one, let's use last DTS value as reference\n nextAvcDts = this.nextAvcDts;\n } else {\n // if not contiguous, let's use target timeOffset\n nextAvcDts = timeOffset * pesTimeScale;\n }\n\n // compute first DTS and last DTS, normalize them against reference value\n var sample = inputSamples[0];\n firstDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);\n firstPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);\n\n // check timestamp continuity accross consecutive fragments (this is to remove inter-fragment gap/hole)\n var delta = Math.round((firstDTS - nextAvcDts) / 90);\n // if fragment are contiguous, detect hole/overlapping between fragments\n if (contiguous) {\n if (delta) {\n if (delta > 1) {\n _logger.logger.log('AVC:' + delta + ' ms hole between fragments detected,filling it');\n } else if (delta < -1) {\n _logger.logger.log('AVC:' + -delta + ' ms overlapping between fragments detected');\n }\n // remove hole/gap : set DTS to next expected DTS\n firstDTS = nextAvcDts;\n inputSamples[0].dts = firstDTS + this._initDTS;\n // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n firstPTS = Math.max(firstPTS - delta, nextAvcDts);\n inputSamples[0].pts = firstPTS + this._initDTS;\n _logger.logger.log('Video/PTS/DTS adjusted: ' + Math.round(firstPTS / 90) + '/' + Math.round(firstDTS / 90) + ',delta:' + delta + ' ms');\n }\n }\n nextDTS = firstDTS;\n\n // compute lastPTS/lastDTS\n sample = inputSamples[inputSamples.length - 1];\n lastDTS = Math.max(this._PTSNormalize(sample.dts - this._initDTS, nextAvcDts), 0);\n lastPTS = Math.max(this._PTSNormalize(sample.pts - this._initDTS, nextAvcDts), 0);\n lastPTS = Math.max(lastPTS, lastDTS);\n\n var vendor = navigator.vendor,\n userAgent = navigator.userAgent,\n isSafari = vendor && vendor.indexOf('Apple') > -1 && userAgent && !userAgent.match('CriOS');\n\n // on Safari let's signal the same sample duration for all samples\n // sample duration (as expected by trun MP4 boxes), should be the delta between sample DTS\n // set this constant duration as being the avg delta between consecutive DTS.\n if (isSafari) {\n mp4SampleDuration = Math.round((lastDTS - firstDTS) / (pes2mp4ScaleFactor * (inputSamples.length - 1)));\n }\n\n // normalize all PTS/DTS now ...\n for (var _i = 0; _i < inputSamples.length; _i++) {\n var _sample = inputSamples[_i];\n if (isSafari) {\n // sample DTS is computed using a constant decoding offset (mp4SampleDuration) between samples\n _sample.dts = firstDTS + _i * pes2mp4ScaleFactor * mp4SampleDuration;\n } else {\n // ensure sample monotonic DTS\n _sample.dts = Math.max(this._PTSNormalize(_sample.dts - this._initDTS, nextAvcDts), firstDTS);\n // ensure dts is a multiple of scale factor to avoid rounding issues\n _sample.dts = Math.round(_sample.dts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;\n }\n // we normalize PTS against nextAvcDts, we also substract initDTS (some streams don't start @ PTS O)\n // and we ensure that computed value is greater or equal than sample DTS\n _sample.pts = Math.max(this._PTSNormalize(_sample.pts - this._initDTS, nextAvcDts), _sample.dts);\n // ensure pts is a multiple of scale factor to avoid rounding issues\n _sample.pts = Math.round(_sample.pts / pes2mp4ScaleFactor) * pes2mp4ScaleFactor;\n }\n\n /* concatenate the video data and construct the mdat in place\n (need 8 more bytes to fill length and mpdat type) */\n mdat = new Uint8Array(track.len + 4 * track.nbNalu + 8);\n var view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(_mp4Generator2.default.types.mdat, 4);\n\n for (var _i2 = 0; _i2 < inputSamples.length; _i2++) {\n var avcSample = inputSamples[_i2],\n mp4SampleLength = 0,\n compositionTimeOffset = void 0;\n // convert NALU bitstream to MP4 format (prepend NALU with size field)\n while (avcSample.units.units.length) {\n var unit = avcSample.units.units.shift();\n view.setUint32(offset, unit.data.byteLength);\n offset += 4;\n mdat.set(unit.data, offset);\n offset += unit.data.byteLength;\n mp4SampleLength += 4 + unit.data.byteLength;\n }\n\n if (!isSafari) {\n // expected sample duration is the Decoding Timestamp diff of consecutive samples\n if (_i2 < inputSamples.length - 1) {\n mp4SampleDuration = inputSamples[_i2 + 1].dts - avcSample.dts;\n } else {\n var config = this.config,\n lastFrameDuration = avcSample.dts - inputSamples[_i2 > 0 ? _i2 - 1 : _i2].dts;\n if (config.stretchShortVideoTrack) {\n // In some cases, a segment's audio track duration may exceed the video track duration.\n // Since we've already remuxed audio, and we know how long the audio track is, we look to\n // see if the delta to the next segment is longer than the minimum of maxBufferHole and\n // maxSeekHole. If so, playback would potentially get stuck, so we artificially inflate\n // the duration of the last frame to minimize any potential gap between segments.\n var maxBufferHole = config.maxBufferHole,\n maxSeekHole = config.maxSeekHole,\n gapTolerance = Math.floor(Math.min(maxBufferHole, maxSeekHole) * pesTimeScale),\n deltaToFrameEnd = (audioTrackLength ? firstPTS + audioTrackLength * pesTimeScale : this.nextAacPts) - avcSample.pts;\n if (deltaToFrameEnd > gapTolerance) {\n // We subtract lastFrameDuration from deltaToFrameEnd to try to prevent any video\n // frame overlap. maxBufferHole/maxSeekHole should be >> lastFrameDuration anyway.\n mp4SampleDuration = deltaToFrameEnd - lastFrameDuration;\n if (mp4SampleDuration < 0) {\n mp4SampleDuration = lastFrameDuration;\n }\n _logger.logger.log('It is approximately ' + deltaToFrameEnd / 90 + ' ms to the next segment; using duration ' + mp4SampleDuration / 90 + ' ms for the last video frame.');\n } else {\n mp4SampleDuration = lastFrameDuration;\n }\n } else {\n mp4SampleDuration = lastFrameDuration;\n }\n }\n mp4SampleDuration /= pes2mp4ScaleFactor;\n compositionTimeOffset = Math.round((avcSample.pts - avcSample.dts) / pes2mp4ScaleFactor);\n } else {\n compositionTimeOffset = Math.max(0, mp4SampleDuration * Math.round((avcSample.pts - avcSample.dts) / (pes2mp4ScaleFactor * mp4SampleDuration)));\n }\n\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n outputSamples.push({\n size: mp4SampleLength,\n // constant duration\n duration: mp4SampleDuration,\n cts: compositionTimeOffset,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: avcSample.key ? 2 : 1,\n isNonSync: avcSample.key ? 0 : 1\n }\n });\n }\n // next AVC sample DTS should be equal to last sample DTS + last sample duration (in PES timescale)\n this.nextAvcDts = lastDTS + mp4SampleDuration * pes2mp4ScaleFactor;\n var dropped = track.dropped;\n track.len = 0;\n track.nbNalu = 0;\n track.dropped = 0;\n if (outputSamples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n var flags = outputSamples[0].flags;\n // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n // https://code.google.com/p/chromium/issues/detail?id=229412\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n track.samples = outputSamples;\n moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n\n var data = {\n id: this.id,\n level: this.level,\n sn: this.sn,\n data1: moof,\n data2: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: (lastPTS + pes2mp4ScaleFactor * mp4SampleDuration) / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: this.nextAvcDts / pesTimeScale,\n type: 'video',\n nb: outputSamples.length,\n dropped: dropped\n };\n this.observer.trigger(_events2.default.FRAG_PARSING_DATA, data);\n return data;\n }\n }, {\n key: 'remuxAudio',\n value: function remuxAudio(track, timeOffset, contiguous, accurateTimeOffset) {\n var pesTimeScale = this.PES_TIMESCALE,\n mp4timeScale = track.timescale,\n pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,\n expectedSampleDuration = track.timescale * 1024 / track.audiosamplerate;\n var view,\n offset = 8,\n aacSample,\n mp4Sample,\n unit,\n mdat,\n moof,\n firstPTS,\n firstDTS,\n lastDTS,\n pts,\n dts,\n ptsnorm,\n dtsnorm,\n samples = [],\n samples0 = [],\n fillFrame,\n newStamp;\n\n track.samples.sort(function (a, b) {\n return a.pts - b.pts;\n });\n samples0 = track.samples;\n\n // for audio samples, also consider consecutive fragments as being contiguous (even if a level switch occurs),\n // for sake of clarity:\n // consecutive fragments are frags with less than 100ms gaps between new time offset and next expected PTS\n // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n // this helps ensuring audio continuity\n // and this also avoids audio glitches/cut when switching quality, or reporting wrong duration on first audio frame\n\n contiguous |= samples0.length && this.nextAacPts && Math.abs(timeOffset - this.nextAacPts / pesTimeScale) < 0.1;\n\n var nextAacPts = contiguous ? this.nextAacPts : timeOffset * pesTimeScale;\n\n // If the audio track is missing samples, the frames seem to get \"left-shifted\" within the\n // resulting mp4 segment, causing sync issues and leaving gaps at the end of the audio segment.\n // In an effort to prevent this from happening, we inject frames here where there are gaps.\n // When possible, we inject a silent frame; when that's not possible, we duplicate the last\n // frame.\n var pesFrameDuration = expectedSampleDuration * pes2mp4ScaleFactor;\n var nextPtsNorm = nextAacPts;\n\n // only inject/drop audio frames in case time offset is accurate\n if (accurateTimeOffset) {\n for (var i = 0; i < samples0.length;) {\n // First, let's see how far off this frame is from where we expect it to be\n var sample = samples0[i],\n ptsNorm = this._PTSNormalize(sample.pts - this._initDTS, nextAacPts),\n delta = ptsNorm - nextPtsNorm;\n\n // If we're overlapping by more than a duration, drop this sample\n if (delta <= -pesFrameDuration) {\n _logger.logger.warn('Dropping 1 audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(Math.abs(delta / 90)) + ' ms overlap.');\n samples0.splice(i, 1);\n track.len -= sample.unit.length;\n // Don't touch nextPtsNorm or i\n }\n // Otherwise, if we're more than a frame away from where we should be, insert missing frames\n else if (delta >= pesFrameDuration) {\n var missing = Math.round(delta / pesFrameDuration);\n _logger.logger.warn('Injecting ' + missing + ' audio frame @ ' + Math.round(nextPtsNorm / 90) / 1000 + 's due to ' + Math.round(delta / 90) + ' ms gap.');\n for (var j = 0; j < missing; j++) {\n newStamp = nextPtsNorm + this._initDTS;\n newStamp = Math.max(newStamp, this._initDTS);\n fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n if (!fillFrame) {\n _logger.logger.log('Unable to get silent frame for given audio codec; duplicating last frame instead.');\n fillFrame = sample.unit.slice(0);\n }\n samples0.splice(i, 0, { unit: fillFrame, pts: newStamp, dts: newStamp });\n track.len += fillFrame.length;\n nextPtsNorm += pesFrameDuration;\n i += 1;\n }\n\n // Adjust sample to next expected pts\n sample.pts = sample.dts = nextPtsNorm + this._initDTS;\n nextPtsNorm += pesFrameDuration;\n i += 1;\n }\n // Otherwise, we're within half a frame duration, so just adjust pts\n else {\n if (Math.abs(delta) > 0.1 * pesFrameDuration) {\n //logger.log(`Invalid frame delta ${Math.round(ptsNorm - nextPtsNorm + pesFrameDuration)} at PTS ${Math.round(ptsNorm / 90)} (should be ${Math.round(pesFrameDuration)}).`);\n }\n nextPtsNorm += pesFrameDuration;\n if (i === 0) {\n sample.pts = sample.dts = this._initDTS + nextAacPts;\n } else {\n sample.pts = sample.dts = samples0[i - 1].pts + pesFrameDuration;\n }\n i += 1;\n }\n }\n }\n\n while (samples0.length) {\n aacSample = samples0.shift();\n unit = aacSample.unit;\n pts = aacSample.pts - this._initDTS;\n dts = aacSample.dts - this._initDTS;\n //logger.log(`Audio/PTS:${Math.round(pts/90)}`);\n // if not first sample\n if (lastDTS !== undefined) {\n ptsnorm = this._PTSNormalize(pts, lastDTS);\n dtsnorm = this._PTSNormalize(dts, lastDTS);\n mp4Sample.duration = Math.round((dtsnorm - lastDTS) / pes2mp4ScaleFactor);\n } else {\n ptsnorm = this._PTSNormalize(pts, nextAacPts);\n dtsnorm = this._PTSNormalize(dts, nextAacPts);\n var _delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale),\n numMissingFrames = 0;\n // if fragment are contiguous, detect hole/overlapping between fragments\n // contiguous fragments are consecutive fragments from same quality level (same level, new SN = old SN + 1)\n if (contiguous) {\n // log delta\n if (_delta) {\n if (_delta > 0) {\n numMissingFrames = Math.round((ptsnorm - nextAacPts) / pesFrameDuration);\n _logger.logger.log(_delta + ' ms hole between AAC samples detected,filling it');\n if (numMissingFrames > 0) {\n fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n if (!fillFrame) {\n fillFrame = unit.slice(0);\n }\n track.len += numMissingFrames * fillFrame.length;\n }\n // if we have frame overlap, overlapping for more than half a frame duraion\n } else if (_delta < -12) {\n // drop overlapping audio frames... browser will deal with it\n _logger.logger.log(-_delta + ' ms overlapping between AAC samples detected, drop frame');\n track.len -= unit.byteLength;\n continue;\n }\n // set PTS/DTS to expected PTS/DTS\n ptsnorm = dtsnorm = nextAacPts;\n }\n }\n // remember first PTS of our aacSamples, ensure value is positive\n firstPTS = Math.max(0, ptsnorm);\n firstDTS = Math.max(0, dtsnorm);\n if (track.len > 0) {\n /* concatenate the audio data and construct the mdat in place\n (need 8 more bytes to fill length and mdat type) */\n mdat = new Uint8Array(track.len + 8);\n view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(_mp4Generator2.default.types.mdat, 4);\n } else {\n // no audio samples\n return;\n }\n for (var _i3 = 0; _i3 < numMissingFrames; _i3++) {\n newStamp = ptsnorm - (numMissingFrames - _i3) * pesFrameDuration;\n fillFrame = _aac2.default.getSilentFrame(track.channelCount);\n if (!fillFrame) {\n _logger.logger.log('Unable to get silent frame for given audio codec; duplicating this frame instead.');\n fillFrame = unit.slice(0);\n }\n mdat.set(fillFrame, offset);\n offset += fillFrame.byteLength;\n mp4Sample = {\n size: fillFrame.byteLength,\n cts: 0,\n duration: 1024,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1\n }\n };\n samples.push(mp4Sample);\n }\n }\n mdat.set(unit, offset);\n offset += unit.byteLength;\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: unit.byteLength,\n cts: 0,\n duration: 0,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1\n }\n };\n samples.push(mp4Sample);\n lastDTS = dtsnorm;\n }\n var lastSampleDuration = 0;\n var nbSamples = samples.length;\n //set last sample duration as being identical to previous sample\n if (nbSamples >= 2) {\n lastSampleDuration = samples[nbSamples - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n if (nbSamples) {\n // next aac sample PTS should be equal to last sample PTS + duration\n this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;\n //logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n track.len = 0;\n track.samples = samples;\n moof = _mp4Generator2.default.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n var audioData = {\n id: this.id,\n level: this.level,\n sn: this.sn,\n data1: moof,\n data2: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: this.nextAacPts / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n type: 'audio',\n nb: nbSamples\n };\n this.observer.trigger(_events2.default.FRAG_PARSING_DATA, audioData);\n return audioData;\n }\n return null;\n }\n }, {\n key: 'remuxEmptyAudio',\n value: function remuxEmptyAudio(track, timeOffset, contiguous, videoData) {\n var pesTimeScale = this.PES_TIMESCALE,\n mp4timeScale = track.timescale ? track.timescale : track.audiosamplerate,\n pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,\n\n\n // sync with video's timestamp\n startDTS = videoData.startDTS * pesTimeScale + this._initDTS,\n endDTS = videoData.endDTS * pesTimeScale + this._initDTS,\n\n\n // one sample's duration value\n sampleDuration = 1024,\n frameDuration = pes2mp4ScaleFactor * sampleDuration,\n\n\n // samples count of this segment's duration\n nbSamples = Math.ceil((endDTS - startDTS) / frameDuration),\n\n\n // silent frame\n silentFrame = _aac2.default.getSilentFrame(track.channelCount);\n\n // Can't remux if we can't generate a silent frame...\n if (!silentFrame) {\n _logger.logger.trace('Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!');\n return;\n }\n\n var samples = [];\n for (var i = 0; i < nbSamples; i++) {\n var stamp = startDTS + i * frameDuration;\n samples.push({ unit: silentFrame.slice(0), pts: stamp, dts: stamp });\n track.len += silentFrame.length;\n }\n track.samples = samples;\n\n this.remuxAudio(track, timeOffset, contiguous);\n }\n }, {\n key: 'remuxID3',\n value: function remuxID3(track, timeOffset) {\n var length = track.samples.length,\n sample;\n // consume samples\n if (length) {\n for (var index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting id3 pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;\n sample.dts = (sample.dts - this._initDTS) / this.PES_TIMESCALE;\n }\n this.observer.trigger(_events2.default.FRAG_PARSING_METADATA, {\n id: this.id,\n level: this.level,\n sn: this.sn,\n samples: track.samples\n });\n }\n\n track.samples = [];\n timeOffset = timeOffset;\n }\n }, {\n key: 'remuxText',\n value: function remuxText(track, timeOffset) {\n track.samples.sort(function (a, b) {\n return a.pts - b.pts;\n });\n\n var length = track.samples.length,\n sample;\n // consume samples\n if (length) {\n for (var index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting text pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = (sample.pts - this._initPTS) / this.PES_TIMESCALE;\n }\n this.observer.trigger(_events2.default.FRAG_PARSING_USERDATA, {\n id: this.id,\n level: this.level,\n sn: this.sn,\n samples: track.samples\n });\n }\n\n track.samples = [];\n timeOffset = timeOffset;\n }\n }, {\n key: '_PTSNormalize',\n value: function _PTSNormalize(value, reference) {\n var offset;\n if (reference === undefined) {\n return value;\n }\n if (reference < value) {\n // - 2^33\n offset = -8589934592;\n } else {\n // + 2^33\n offset = 8589934592;\n }\n /* PTS is 33bit (from 0 to 2^33 -1)\n if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n PTS looping occured. fill the gap */\n while (Math.abs(value - reference) > 4294967296) {\n value += offset;\n }\n return value;\n }\n }, {\n key: 'passthrough',\n get: function get() {\n return false;\n }\n }]);\n\n return MP4Remuxer;\n}();\n\nexports.default = MP4Remuxer;\n\n},{\"24\":24,\"26\":26,\"27\":27,\"35\":35,\"43\":43,\"44\":44}],37:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * passthrough remuxer\n */\n\n\nvar _events = _dereq_(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar PassThroughRemuxer = function () {\n function PassThroughRemuxer(observer, id) {\n _classCallCheck(this, PassThroughRemuxer);\n\n this.observer = observer;\n this.id = id;\n this.ISGenerated = false;\n }\n\n _createClass(PassThroughRemuxer, [{\n key: 'destroy',\n value: function destroy() {}\n }, {\n key: 'insertDiscontinuity',\n value: function insertDiscontinuity() {}\n }, {\n key: 'switchLevel',\n value: function switchLevel() {\n this.ISGenerated = false;\n }\n }, {\n key: 'remux',\n value: function remux(audioTrack, videoTrack, id3Track, textTrack, timeOffset, rawData) {\n var observer = this.observer;\n // generate Init Segment if needed\n if (!this.ISGenerated) {\n var tracks = {},\n data = { id: this.id, tracks: tracks, unique: true },\n track = videoTrack,\n codec = track.codec;\n\n if (codec) {\n data.tracks.video = {\n container: track.container,\n codec: codec,\n metadata: {\n width: track.width,\n height: track.height\n }\n };\n }\n\n track = audioTrack;\n codec = track.codec;\n if (codec) {\n data.tracks.audio = {\n container: track.container,\n codec: codec,\n metadata: {\n channelCount: track.channelCount\n }\n };\n }\n this.ISGenerated = true;\n observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);\n }\n observer.trigger(_events2.default.FRAG_PARSING_DATA, {\n id: this.id,\n data1: rawData,\n startPTS: timeOffset,\n startDTS: timeOffset,\n type: 'audiovideo',\n nb: 1,\n dropped: 0\n });\n }\n }, {\n key: 'passthrough',\n get: function get() {\n return true;\n }\n }]);\n\n return PassThroughRemuxer;\n}();\n\nexports.default = PassThroughRemuxer;\n\n},{\"26\":26}],38:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js\n\nvar AttrList = function () {\n function AttrList(attrs) {\n _classCallCheck(this, AttrList);\n\n if (typeof attrs === 'string') {\n attrs = AttrList.parseAttrList(attrs);\n }\n for (var attr in attrs) {\n if (attrs.hasOwnProperty(attr)) {\n this[attr] = attrs[attr];\n }\n }\n }\n\n _createClass(AttrList, [{\n key: 'decimalInteger',\n value: function decimalInteger(attrName) {\n var intValue = parseInt(this[attrName], 10);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n return intValue;\n }\n }, {\n key: 'hexadecimalInteger',\n value: function hexadecimalInteger(attrName) {\n if (this[attrName]) {\n var stringValue = (this[attrName] || '0x').slice(2);\n stringValue = (stringValue.length & 1 ? '0' : '') + stringValue;\n\n var value = new Uint8Array(stringValue.length / 2);\n for (var i = 0; i < stringValue.length / 2; i++) {\n value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);\n }\n return value;\n } else {\n return null;\n }\n }\n }, {\n key: 'hexadecimalIntegerAsNumber',\n value: function hexadecimalIntegerAsNumber(attrName) {\n var intValue = parseInt(this[attrName], 16);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n return intValue;\n }\n }, {\n key: 'decimalFloatingPoint',\n value: function decimalFloatingPoint(attrName) {\n return parseFloat(this[attrName]);\n }\n }, {\n key: 'enumeratedString',\n value: function enumeratedString(attrName) {\n return this[attrName];\n }\n }, {\n key: 'decimalResolution',\n value: function decimalResolution(attrName) {\n var res = /^(\\d+)x(\\d+)$/.exec(this[attrName]);\n if (res === null) {\n return undefined;\n }\n return {\n width: parseInt(res[1], 10),\n height: parseInt(res[2], 10)\n };\n }\n }], [{\n key: 'parseAttrList',\n value: function parseAttrList(input) {\n var re = /\\s*(.+?)\\s*=((?:\\\".*?\\\")|.*?)(?:,|$)/g;\n var match,\n attrs = {};\n while ((match = re.exec(input)) !== null) {\n var value = match[2],\n quote = '\"';\n\n if (value.indexOf(quote) === 0 && value.lastIndexOf(quote) === value.length - 1) {\n value = value.slice(1, -1);\n }\n attrs[match[1]] = value;\n }\n return attrs;\n }\n }]);\n\n return AttrList;\n}();\n\nexports.default = AttrList;\n\n},{}],39:[function(_dereq_,module,exports){\n\"use strict\";\n\nvar BinarySearch = {\n /**\n * Searches for an item in an array which matches a certain condition.\n * This requires the condition to only match one item in the array,\n * and for the array to be ordered.\n *\n * @param {Array} list The array to search.\n * @param {Function} comparisonFunction\n * Called and provided a candidate item as the first argument.\n * Should return:\n * > -1 if the item should be located at a lower index than the provided item.\n * > 1 if the item should be located at a higher index than the provided item.\n * > 0 if the item is the item you're looking for.\n *\n * @return {*} The object if it is found or null otherwise.\n */\n search: function search(list, comparisonFunction) {\n var minIndex = 0;\n var maxIndex = list.length - 1;\n var currentIndex = null;\n var currentElement = null;\n\n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = list[currentIndex];\n\n var comparisonResult = comparisonFunction(currentElement);\n if (comparisonResult > 0) {\n minIndex = currentIndex + 1;\n } else if (comparisonResult < 0) {\n maxIndex = currentIndex - 1;\n } else {\n return currentElement;\n }\n }\n\n return null;\n }\n};\n\nmodule.exports = BinarySearch;\n\n},{}],40:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n *\n * This code was ported from the dash.js project at:\n * https://github.com/Dash-Industry-Forum/dash.js/blob/development/externals/cea608-parser.js\n * https://github.com/Dash-Industry-Forum/dash.js/commit/8269b26a761e0853bb21d78780ed945144ecdd4d#diff-71bc295a2d6b6b7093a1d3290d53a4b2\n *\n * The original copyright appears below:\n *\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2015-2016, DASH Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * 2. Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Exceptions from regular ASCII. CodePoints are mapped to UTF-16 codes\n */\n\nvar specialCea608CharsCodes = {\n 0x2a: 0xe1, // lowercase a, acute accent\n 0x5c: 0xe9, // lowercase e, acute accent\n 0x5e: 0xed, // lowercase i, acute accent\n 0x5f: 0xf3, // lowercase o, acute accent\n 0x60: 0xfa, // lowercase u, acute accent\n 0x7b: 0xe7, // lowercase c with cedilla\n 0x7c: 0xf7, // division symbol\n 0x7d: 0xd1, // uppercase N tilde\n 0x7e: 0xf1, // lowercase n tilde\n 0x7f: 0x2588, // Full block\n // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n 0x80: 0xae, // Registered symbol (R)\n 0x81: 0xb0, // degree sign\n 0x82: 0xbd, // 1/2 symbol\n 0x83: 0xbf, // Inverted (open) question mark\n 0x84: 0x2122, // Trademark symbol (TM)\n 0x85: 0xa2, // Cents symbol\n 0x86: 0xa3, // Pounds sterling\n 0x87: 0x266a, // Music 8'th note\n 0x88: 0xe0, // lowercase a, grave accent\n 0x89: 0x20, // transparent space (regular)\n 0x8a: 0xe8, // lowercase e, grave accent\n 0x8b: 0xe2, // lowercase a, circumflex accent\n 0x8c: 0xea, // lowercase e, circumflex accent\n 0x8d: 0xee, // lowercase i, circumflex accent\n 0x8e: 0xf4, // lowercase o, circumflex accent\n 0x8f: 0xfb, // lowercase u, circumflex accent\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n 0x90: 0xc1, // capital letter A with acute\n 0x91: 0xc9, // capital letter E with acute\n 0x92: 0xd3, // capital letter O with acute\n 0x93: 0xda, // capital letter U with acute\n 0x94: 0xdc, // capital letter U with diaresis\n 0x95: 0xfc, // lowercase letter U with diaeresis\n 0x96: 0x2018, // opening single quote\n 0x97: 0xa1, // inverted exclamation mark\n 0x98: 0x2a, // asterisk\n 0x99: 0x2019, // closing single quote\n 0x9a: 0x2501, // box drawings heavy horizontal\n 0x9b: 0xa9, // copyright sign\n 0x9c: 0x2120, // Service mark\n 0x9d: 0x2022, // (round) bullet\n 0x9e: 0x201c, // Left double quotation mark\n 0x9f: 0x201d, // Right double quotation mark\n 0xa0: 0xc0, // uppercase A, grave accent\n 0xa1: 0xc2, // uppercase A, circumflex\n 0xa2: 0xc7, // uppercase C with cedilla\n 0xa3: 0xc8, // uppercase E, grave accent\n 0xa4: 0xca, // uppercase E, circumflex\n 0xa5: 0xcb, // capital letter E with diaresis\n 0xa6: 0xeb, // lowercase letter e with diaresis\n 0xa7: 0xce, // uppercase I, circumflex\n 0xa8: 0xcf, // uppercase I, with diaresis\n 0xa9: 0xef, // lowercase i, with diaresis\n 0xaa: 0xd4, // uppercase O, circumflex\n 0xab: 0xd9, // uppercase U, grave accent\n 0xac: 0xf9, // lowercase u, grave accent\n 0xad: 0xdb, // uppercase U, circumflex\n 0xae: 0xab, // left-pointing double angle quotation mark\n 0xaf: 0xbb, // right-pointing double angle quotation mark\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n 0xb0: 0xc3, // Uppercase A, tilde\n 0xb1: 0xe3, // Lowercase a, tilde\n 0xb2: 0xcd, // Uppercase I, acute accent\n 0xb3: 0xcc, // Uppercase I, grave accent\n 0xb4: 0xec, // Lowercase i, grave accent\n 0xb5: 0xd2, // Uppercase O, grave accent\n 0xb6: 0xf2, // Lowercase o, grave accent\n 0xb7: 0xd5, // Uppercase O, tilde\n 0xb8: 0xf5, // Lowercase o, tilde\n 0xb9: 0x7b, // Open curly brace\n 0xba: 0x7d, // Closing curly brace\n 0xbb: 0x5c, // Backslash\n 0xbc: 0x5e, // Caret\n 0xbd: 0x5f, // Underscore\n 0xbe: 0x7c, // Pipe (vertical line)\n 0xbf: 0x223c, // Tilde operator\n 0xc0: 0xc4, // Uppercase A, umlaut\n 0xc1: 0xe4, // Lowercase A, umlaut\n 0xc2: 0xd6, // Uppercase O, umlaut\n 0xc3: 0xf6, // Lowercase o, umlaut\n 0xc4: 0xdf, // Esszett (sharp S)\n 0xc5: 0xa5, // Yen symbol\n 0xc6: 0xa4, // Generic currency sign\n 0xc7: 0x2503, // Box drawings heavy vertical\n 0xc8: 0xc5, // Uppercase A, ring\n 0xc9: 0xe5, // Lowercase A, ring\n 0xca: 0xd8, // Uppercase O, stroke\n 0xcb: 0xf8, // Lowercase o, strok\n 0xcc: 0x250f, // Box drawings heavy down and right\n 0xcd: 0x2513, // Box drawings heavy down and left\n 0xce: 0x2517, // Box drawings heavy up and right\n 0xcf: 0x251b // Box drawings heavy up and left\n};\n\n/**\n * Utils\n */\nvar getCharForByte = function getCharForByte(byte) {\n var charCode = byte;\n if (specialCea608CharsCodes.hasOwnProperty(byte)) {\n charCode = specialCea608CharsCodes[byte];\n }\n return String.fromCharCode(charCode);\n};\n\nvar NR_ROWS = 15,\n NR_COLS = 32;\n// Tables to look up row from PAC data\nvar rowsLowCh1 = { 0x11: 1, 0x12: 3, 0x15: 5, 0x16: 7, 0x17: 9, 0x10: 11, 0x13: 12, 0x14: 14 };\nvar rowsHighCh1 = { 0x11: 2, 0x12: 4, 0x15: 6, 0x16: 8, 0x17: 10, 0x13: 13, 0x14: 15 };\nvar rowsLowCh2 = { 0x19: 1, 0x1A: 3, 0x1D: 5, 0x1E: 7, 0x1F: 9, 0x18: 11, 0x1B: 12, 0x1C: 14 };\nvar rowsHighCh2 = { 0x19: 2, 0x1A: 4, 0x1D: 6, 0x1E: 8, 0x1F: 10, 0x1B: 13, 0x1C: 15 };\n\nvar backgroundColors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'black', 'transparent'];\n\n/**\n * Simple logger class to be able to write with time-stamps and filter on level.\n */\nvar logger = {\n verboseFilter: { 'DATA': 3, 'DEBUG': 3, 'INFO': 2, 'WARNING': 2, 'TEXT': 1, 'ERROR': 0 },\n time: null,\n verboseLevel: 0, // Only write errors\n setTime: function setTime(newTime) {\n this.time = newTime;\n },\n log: function log(severity, msg) {\n var minLevel = this.verboseFilter[severity];\n if (this.verboseLevel >= minLevel) {\n console.log(this.time + ' [' + severity + '] ' + msg);\n }\n }\n};\n\nvar numArrayToHexArray = function numArrayToHexArray(numArray) {\n var hexArray = [];\n for (var j = 0; j < numArray.length; j++) {\n hexArray.push(numArray[j].toString(16));\n }\n return hexArray;\n};\n\nvar PenState = function () {\n function PenState(foreground, underline, italics, background, flash) {\n _classCallCheck(this, PenState);\n\n this.foreground = foreground || 'white';\n this.underline = underline || false;\n this.italics = italics || false;\n this.background = background || 'black';\n this.flash = flash || false;\n }\n\n _createClass(PenState, [{\n key: 'reset',\n value: function reset() {\n this.foreground = 'white';\n this.underline = false;\n this.italics = false;\n this.background = 'black';\n this.flash = false;\n }\n }, {\n key: 'setStyles',\n value: function setStyles(styles) {\n var attribs = ['foreground', 'underline', 'italics', 'background', 'flash'];\n for (var i = 0; i < attribs.length; i++) {\n var style = attribs[i];\n if (styles.hasOwnProperty(style)) {\n this[style] = styles[style];\n }\n }\n }\n }, {\n key: 'isDefault',\n value: function isDefault() {\n return this.foreground === 'white' && !this.underline && !this.italics && this.background === 'black' && !this.flash;\n }\n }, {\n key: 'equals',\n value: function equals(other) {\n return this.foreground === other.foreground && this.underline === other.underline && this.italics === other.italics && this.background === other.background && this.flash === other.flash;\n }\n }, {\n key: 'copy',\n value: function copy(newPenState) {\n this.foreground = newPenState.foreground;\n this.underline = newPenState.underline;\n this.italics = newPenState.italics;\n this.background = newPenState.background;\n this.flash = newPenState.flash;\n }\n }, {\n key: 'toString',\n value: function toString() {\n return 'color=' + this.foreground + ', underline=' + this.underline + ', italics=' + this.italics + ', background=' + this.background + ', flash=' + this.flash;\n }\n }]);\n\n return PenState;\n}();\n\n/**\n * Unicode character with styling and background.\n * @constructor\n */\n\n\nvar StyledUnicodeChar = function () {\n function StyledUnicodeChar(uchar, foreground, underline, italics, background, flash) {\n _classCallCheck(this, StyledUnicodeChar);\n\n this.uchar = uchar || ' '; // unicode character\n this.penState = new PenState(foreground, underline, italics, background, flash);\n }\n\n _createClass(StyledUnicodeChar, [{\n key: 'reset',\n value: function reset() {\n this.uchar = ' ';\n this.penState.reset();\n }\n }, {\n key: 'setChar',\n value: function setChar(uchar, newPenState) {\n this.uchar = uchar;\n this.penState.copy(newPenState);\n }\n }, {\n key: 'setPenState',\n value: function setPenState(newPenState) {\n this.penState.copy(newPenState);\n }\n }, {\n key: 'equals',\n value: function equals(other) {\n return this.uchar === other.uchar && this.penState.equals(other.penState);\n }\n }, {\n key: 'copy',\n value: function copy(newChar) {\n this.uchar = newChar.uchar;\n this.penState.copy(newChar.penState);\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n return this.uchar === ' ' && this.penState.isDefault();\n }\n }]);\n\n return StyledUnicodeChar;\n}();\n\n/**\n * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n * @constructor\n */\n\n\nvar Row = function () {\n function Row() {\n _classCallCheck(this, Row);\n\n this.chars = [];\n for (var i = 0; i < NR_COLS; i++) {\n this.chars.push(new StyledUnicodeChar());\n }\n this.pos = 0;\n this.currPenState = new PenState();\n }\n\n _createClass(Row, [{\n key: 'equals',\n value: function equals(other) {\n var equal = true;\n for (var i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].equals(other.chars[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n }\n }, {\n key: 'copy',\n value: function copy(other) {\n for (var i = 0; i < NR_COLS; i++) {\n this.chars[i].copy(other.chars[i]);\n }\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n var empty = true;\n for (var i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n }\n\n /**\n * Set the cursor to a valid column.\n */\n\n }, {\n key: 'setCursor',\n value: function setCursor(absPos) {\n if (this.pos !== absPos) {\n this.pos = absPos;\n }\n if (this.pos < 0) {\n logger.log('ERROR', 'Negative cursor position ' + this.pos);\n this.pos = 0;\n } else if (this.pos > NR_COLS) {\n logger.log('ERROR', 'Too large cursor position ' + this.pos);\n this.pos = NR_COLS;\n }\n }\n\n /**\n * Move the cursor relative to current position.\n */\n\n }, {\n key: 'moveCursor',\n value: function moveCursor(relPos) {\n var newPos = this.pos + relPos;\n if (relPos > 1) {\n for (var i = this.pos + 1; i < newPos + 1; i++) {\n this.chars[i].setPenState(this.currPenState);\n }\n }\n this.setCursor(newPos);\n }\n\n /**\n * Backspace, move one step back and clear character.\n */\n\n }, {\n key: 'backSpace',\n value: function backSpace() {\n this.moveCursor(-1);\n this.chars[this.pos].setChar(' ', this.currPenState);\n }\n }, {\n key: 'insertChar',\n value: function insertChar(byte) {\n if (byte >= 0x90) {\n //Extended char\n this.backSpace();\n }\n var char = getCharForByte(byte);\n if (this.pos >= NR_COLS) {\n logger.log('ERROR', 'Cannot insert ' + byte.toString(16) + ' (' + char + ') at position ' + this.pos + '. Skipping it!');\n return;\n }\n this.chars[this.pos].setChar(char, this.currPenState);\n this.moveCursor(1);\n }\n }, {\n key: 'clearFromPos',\n value: function clearFromPos(startPos) {\n var i;\n for (i = startPos; i < NR_COLS; i++) {\n this.chars[i].reset();\n }\n }\n }, {\n key: 'clear',\n value: function clear() {\n this.clearFromPos(0);\n this.pos = 0;\n this.currPenState.reset();\n }\n }, {\n key: 'clearToEndOfRow',\n value: function clearToEndOfRow() {\n this.clearFromPos(this.pos);\n }\n }, {\n key: 'getTextString',\n value: function getTextString() {\n var chars = [];\n var empty = true;\n for (var i = 0; i < NR_COLS; i++) {\n var char = this.chars[i].uchar;\n if (char !== ' ') {\n empty = false;\n }\n chars.push(char);\n }\n if (empty) {\n return '';\n } else {\n return chars.join('');\n }\n }\n }, {\n key: 'setPenStyles',\n value: function setPenStyles(styles) {\n this.currPenState.setStyles(styles);\n var currChar = this.chars[this.pos];\n currChar.setPenState(this.currPenState);\n }\n }]);\n\n return Row;\n}();\n\n/**\n * Keep a CEA-608 screen of 32x15 styled characters\n * @constructor\n*/\n\n\nvar CaptionScreen = function () {\n function CaptionScreen() {\n _classCallCheck(this, CaptionScreen);\n\n this.rows = [];\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows.push(new Row()); // Note that we use zero-based numbering (0-14)\n }\n this.currRow = NR_ROWS - 1;\n this.nrRollUpRows = null;\n this.reset();\n }\n\n _createClass(CaptionScreen, [{\n key: 'reset',\n value: function reset() {\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows[i].clear();\n }\n this.currRow = NR_ROWS - 1;\n }\n }, {\n key: 'equals',\n value: function equals(other) {\n var equal = true;\n for (var i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].equals(other.rows[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n }\n }, {\n key: 'copy',\n value: function copy(other) {\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows[i].copy(other.rows[i]);\n }\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n var empty = true;\n for (var i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n }\n }, {\n key: 'backSpace',\n value: function backSpace() {\n var row = this.rows[this.currRow];\n row.backSpace();\n }\n }, {\n key: 'clearToEndOfRow',\n value: function clearToEndOfRow() {\n var row = this.rows[this.currRow];\n row.clearToEndOfRow();\n }\n\n /**\n * Insert a character (without styling) in the current row.\n */\n\n }, {\n key: 'insertChar',\n value: function insertChar(char) {\n var row = this.rows[this.currRow];\n row.insertChar(char);\n }\n }, {\n key: 'setPen',\n value: function setPen(styles) {\n var row = this.rows[this.currRow];\n row.setPenStyles(styles);\n }\n }, {\n key: 'moveCursor',\n value: function moveCursor(relPos) {\n var row = this.rows[this.currRow];\n row.moveCursor(relPos);\n }\n }, {\n key: 'setCursor',\n value: function setCursor(absPos) {\n logger.log('INFO', 'setCursor: ' + absPos);\n var row = this.rows[this.currRow];\n row.setCursor(absPos);\n }\n }, {\n key: 'setPAC',\n value: function setPAC(pacData) {\n logger.log('INFO', 'pacData = ' + JSON.stringify(pacData));\n var newRow = pacData.row - 1;\n if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n newRow = this.nrRollUpRows - 1;\n }\n this.currRow = newRow;\n var row = this.rows[this.currRow];\n if (pacData.indent !== null) {\n var indent = pacData.indent;\n var prevPos = Math.max(indent - 1, 0);\n row.setCursor(pacData.indent);\n pacData.color = row.chars[prevPos].penState.foreground;\n }\n var styles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };\n this.setPen(styles);\n }\n\n /**\n * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n */\n\n }, {\n key: 'setBkgData',\n value: function setBkgData(bkgData) {\n\n logger.log('INFO', 'bkgData = ' + JSON.stringify(bkgData));\n this.backSpace();\n this.setPen(bkgData);\n this.insertChar(0x20); //Space\n }\n }, {\n key: 'setRollUpRows',\n value: function setRollUpRows(nrRows) {\n this.nrRollUpRows = nrRows;\n }\n }, {\n key: 'rollUp',\n value: function rollUp() {\n if (this.nrRollUpRows === null) {\n logger.log('DEBUG', 'roll_up but nrRollUpRows not set yet');\n return; //Not properly setup\n }\n logger.log('TEXT', this.getDisplayText());\n var topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n var topRow = this.rows.splice(topRowIndex, 1)[0];\n topRow.clear();\n this.rows.splice(this.currRow, 0, topRow);\n logger.log('INFO', 'Rolling up');\n //logger.log('TEXT', this.get_display_text())\n }\n\n /**\n * Get all non-empty rows with as unicode text.\n */\n\n }, {\n key: 'getDisplayText',\n value: function getDisplayText(asOneRow) {\n asOneRow = asOneRow || false;\n var displayText = [];\n var text = '';\n var rowNr = -1;\n for (var i = 0; i < NR_ROWS; i++) {\n var rowText = this.rows[i].getTextString();\n if (rowText) {\n rowNr = i + 1;\n if (asOneRow) {\n displayText.push('Row ' + rowNr + ': \\'' + rowText + '\\'');\n } else {\n displayText.push(rowText.trim());\n }\n }\n }\n if (displayText.length > 0) {\n if (asOneRow) {\n text = '[' + displayText.join(' | ') + ']';\n } else {\n text = displayText.join('\\n');\n }\n }\n return text;\n }\n }, {\n key: 'getTextAndFormat',\n value: function getTextAndFormat() {\n return this.rows;\n }\n }]);\n\n return CaptionScreen;\n}();\n\n//var modes = ['MODE_ROLL-UP', 'MODE_POP-ON', 'MODE_PAINT-ON', 'MODE_TEXT'];\n\nvar Cea608Channel = function () {\n function Cea608Channel(channelNumber, outputFilter) {\n _classCallCheck(this, Cea608Channel);\n\n this.chNr = channelNumber;\n this.outputFilter = outputFilter;\n this.mode = null;\n this.verbose = 0;\n this.displayedMemory = new CaptionScreen();\n this.nonDisplayedMemory = new CaptionScreen();\n this.lastOutputScreen = new CaptionScreen();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null; // Keeps track of where a cue started.\n }\n\n _createClass(Cea608Channel, [{\n key: 'reset',\n value: function reset() {\n this.mode = null;\n this.displayedMemory.reset();\n this.nonDisplayedMemory.reset();\n this.lastOutputScreen.reset();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null;\n this.lastCueEndTime = null;\n }\n }, {\n key: 'getHandler',\n value: function getHandler() {\n return this.outputFilter;\n }\n }, {\n key: 'setHandler',\n value: function setHandler(newHandler) {\n this.outputFilter = newHandler;\n }\n }, {\n key: 'setPAC',\n value: function setPAC(pacData) {\n this.writeScreen.setPAC(pacData);\n }\n }, {\n key: 'setBkgData',\n value: function setBkgData(bkgData) {\n this.writeScreen.setBkgData(bkgData);\n }\n }, {\n key: 'setMode',\n value: function setMode(newMode) {\n if (newMode === this.mode) {\n return;\n }\n this.mode = newMode;\n logger.log('INFO', 'MODE=' + newMode);\n if (this.mode === 'MODE_POP-ON') {\n this.writeScreen = this.nonDisplayedMemory;\n } else {\n this.writeScreen = this.displayedMemory;\n this.writeScreen.reset();\n }\n if (this.mode !== 'MODE_ROLL-UP') {\n this.displayedMemory.nrRollUpRows = null;\n this.nonDisplayedMemory.nrRollUpRows = null;\n }\n this.mode = newMode;\n }\n }, {\n key: 'insertChars',\n value: function insertChars(chars) {\n for (var i = 0; i < chars.length; i++) {\n this.writeScreen.insertChar(chars[i]);\n }\n var screen = this.writeScreen === this.displayedMemory ? 'DISP' : 'NON_DISP';\n logger.log('INFO', screen + ': ' + this.writeScreen.getDisplayText(true));\n if (this.mode === 'MODE_PAINT-ON' || this.mode === 'MODE_ROLL-UP') {\n logger.log('TEXT', 'DISPLAYED: ' + this.displayedMemory.getDisplayText(true));\n this.outputDataUpdate();\n }\n }\n }, {\n key: 'ccRCL',\n value: function ccRCL() {\n // Resume Caption Loading (switch mode to Pop On)\n logger.log('INFO', 'RCL - Resume Caption Loading');\n this.setMode('MODE_POP-ON');\n }\n }, {\n key: 'ccBS',\n value: function ccBS() {\n // BackSpace\n logger.log('INFO', 'BS - BackSpace');\n if (this.mode === 'MODE_TEXT') {\n return;\n }\n this.writeScreen.backSpace();\n if (this.writeScreen === this.displayedMemory) {\n this.outputDataUpdate();\n }\n }\n }, {\n key: 'ccAOF',\n value: function ccAOF() {\n // Reserved (formerly Alarm Off)\n return;\n }\n }, {\n key: 'ccAON',\n value: function ccAON() {\n // Reserved (formerly Alarm On)\n return;\n }\n }, {\n key: 'ccDER',\n value: function ccDER() {\n // Delete to End of Row\n logger.log('INFO', 'DER- Delete to End of Row');\n this.writeScreen.clearToEndOfRow();\n this.outputDataUpdate();\n }\n }, {\n key: 'ccRU',\n value: function ccRU(nrRows) {\n //Roll-Up Captions-2,3,or 4 Rows\n logger.log('INFO', 'RU(' + nrRows + ') - Roll Up');\n this.writeScreen = this.displayedMemory;\n this.setMode('MODE_ROLL-UP');\n this.writeScreen.setRollUpRows(nrRows);\n }\n }, {\n key: 'ccFON',\n value: function ccFON() {\n //Flash On\n logger.log('INFO', 'FON - Flash On');\n this.writeScreen.setPen({ flash: true });\n }\n }, {\n key: 'ccRDC',\n value: function ccRDC() {\n // Resume Direct Captioning (switch mode to PaintOn)\n logger.log('INFO', 'RDC - Resume Direct Captioning');\n this.setMode('MODE_PAINT-ON');\n }\n }, {\n key: 'ccTR',\n value: function ccTR() {\n // Text Restart in text mode (not supported, however)\n logger.log('INFO', 'TR');\n this.setMode('MODE_TEXT');\n }\n }, {\n key: 'ccRTD',\n value: function ccRTD() {\n // Resume Text Display in Text mode (not supported, however)\n logger.log('INFO', 'RTD');\n this.setMode('MODE_TEXT');\n }\n }, {\n key: 'ccEDM',\n value: function ccEDM() {\n // Erase Displayed Memory\n logger.log('INFO', 'EDM - Erase Displayed Memory');\n this.displayedMemory.reset();\n this.outputDataUpdate();\n }\n }, {\n key: 'ccCR',\n value: function ccCR() {\n // Carriage Return\n logger.log('CR - Carriage Return');\n this.writeScreen.rollUp();\n this.outputDataUpdate();\n }\n }, {\n key: 'ccENM',\n value: function ccENM() {\n //Erase Non-Displayed Memory\n logger.log('INFO', 'ENM - Erase Non-displayed Memory');\n this.nonDisplayedMemory.reset();\n }\n }, {\n key: 'ccEOC',\n value: function ccEOC() {\n //End of Caption (Flip Memories)\n logger.log('INFO', 'EOC - End Of Caption');\n if (this.mode === 'MODE_POP-ON') {\n var tmp = this.displayedMemory;\n this.displayedMemory = this.nonDisplayedMemory;\n this.nonDisplayedMemory = tmp;\n this.writeScreen = this.nonDisplayedMemory;\n logger.log('TEXT', 'DISP: ' + this.displayedMemory.getDisplayText());\n }\n this.outputDataUpdate();\n }\n }, {\n key: 'ccTO',\n value: function ccTO(nrCols) {\n // Tab Offset 1,2, or 3 columns\n logger.log('INFO', 'TO(' + nrCols + ') - Tab Offset');\n this.writeScreen.moveCursor(nrCols);\n }\n }, {\n key: 'ccMIDROW',\n value: function ccMIDROW(secondByte) {\n // Parse MIDROW command\n var styles = { flash: false };\n styles.underline = secondByte % 2 === 1;\n styles.italics = secondByte >= 0x2e;\n if (!styles.italics) {\n var colorIndex = Math.floor(secondByte / 2) - 0x10;\n var colors = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta'];\n styles.foreground = colors[colorIndex];\n } else {\n styles.foreground = 'white';\n }\n logger.log('INFO', 'MIDROW: ' + JSON.stringify(styles));\n this.writeScreen.setPen(styles);\n }\n }, {\n key: 'outputDataUpdate',\n value: function outputDataUpdate() {\n var t = logger.time;\n if (t === null) {\n return;\n }\n if (this.outputFilter) {\n if (this.outputFilter.updateData) {\n this.outputFilter.updateData(t, this.displayedMemory);\n }\n if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) {\n // Start of a new cue\n this.cueStartTime = t;\n } else {\n if (!this.displayedMemory.equals(this.lastOutputScreen)) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);\n }\n this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n }\n }\n this.lastOutputScreen.copy(this.displayedMemory);\n }\n }\n }, {\n key: 'cueSplitAtTime',\n value: function cueSplitAtTime(t) {\n if (this.outputFilter) {\n if (!this.displayedMemory.isEmpty()) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);\n }\n this.cueStartTime = t;\n }\n }\n }\n }]);\n\n return Cea608Channel;\n}();\n\nvar Cea608Parser = function () {\n function Cea608Parser(field, out1, out2) {\n _classCallCheck(this, Cea608Parser);\n\n this.field = field || 1;\n this.outputs = [out1, out2];\n this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n this.currChNr = -1; // Will be 1 or 2\n this.lastCmdA = null; // First byte of last command\n this.lastCmdB = null; // Second byte of last command\n this.bufferedData = [];\n this.startTime = null;\n this.lastTime = null;\n this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };\n }\n\n _createClass(Cea608Parser, [{\n key: 'getHandler',\n value: function getHandler(index) {\n return this.channels[index].getHandler();\n }\n }, {\n key: 'setHandler',\n value: function setHandler(index, newHandler) {\n this.channels[index].setHandler(newHandler);\n }\n\n /**\n * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n */\n\n }, {\n key: 'addData',\n value: function addData(t, byteList) {\n var cmdFound,\n a,\n b,\n charsFound = false;\n\n this.lastTime = t;\n logger.setTime(t);\n\n for (var i = 0; i < byteList.length; i += 2) {\n a = byteList[i] & 0x7f;\n b = byteList[i + 1] & 0x7f;\n if (a === 0 && b === 0) {\n this.dataCounters.padding += 2;\n continue;\n } else {\n logger.log('DATA', '[' + numArrayToHexArray([byteList[i], byteList[i + 1]]) + '] -> (' + numArrayToHexArray([a, b]) + ')');\n }\n cmdFound = this.parseCmd(a, b);\n if (!cmdFound) {\n cmdFound = this.parseMidrow(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parsePAC(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parseBackgroundAttributes(a, b);\n }\n if (!cmdFound) {\n charsFound = this.parseChars(a, b);\n if (charsFound) {\n if (this.currChNr && this.currChNr >= 0) {\n var channel = this.channels[this.currChNr - 1];\n channel.insertChars(charsFound);\n } else {\n logger.log('WARNING', 'No channel found yet. TEXT-MODE?');\n }\n }\n }\n if (cmdFound) {\n this.dataCounters.cmd += 2;\n } else if (charsFound) {\n this.dataCounters.char += 2;\n } else {\n this.dataCounters.other += 2;\n logger.log('WARNING', 'Couldn\\'t parse cleaned data ' + numArrayToHexArray([a, b]) + ' orig: ' + numArrayToHexArray([byteList[i], byteList[i + 1]]));\n }\n }\n }\n\n /**\n * Parse Command.\n * @returns {Boolean} Tells if a command was found\n */\n\n }, {\n key: 'parseCmd',\n value: function parseCmd(a, b) {\n var chNr = null;\n\n var cond1 = (a === 0x14 || a === 0x1C) && 0x20 <= b && b <= 0x2F;\n var cond2 = (a === 0x17 || a === 0x1F) && 0x21 <= b && b <= 0x23;\n if (!(cond1 || cond2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null; // Repeated commands are dropped (once)\n logger.log('DEBUG', 'Repeated command (' + numArrayToHexArray([a, b]) + ') is dropped');\n return true;\n }\n\n if (a === 0x14 || a === 0x17) {\n chNr = 1;\n } else {\n chNr = 2; // (a === 0x1C || a=== 0x1f)\n }\n\n var channel = this.channels[chNr - 1];\n\n if (a === 0x14 || a === 0x1C) {\n if (b === 0x20) {\n channel.ccRCL();\n } else if (b === 0x21) {\n channel.ccBS();\n } else if (b === 0x22) {\n channel.ccAOF();\n } else if (b === 0x23) {\n channel.ccAON();\n } else if (b === 0x24) {\n channel.ccDER();\n } else if (b === 0x25) {\n channel.ccRU(2);\n } else if (b === 0x26) {\n channel.ccRU(3);\n } else if (b === 0x27) {\n channel.ccRU(4);\n } else if (b === 0x28) {\n channel.ccFON();\n } else if (b === 0x29) {\n channel.ccRDC();\n } else if (b === 0x2A) {\n channel.ccTR();\n } else if (b === 0x2B) {\n channel.ccRTD();\n } else if (b === 0x2C) {\n channel.ccEDM();\n } else if (b === 0x2D) {\n channel.ccCR();\n } else if (b === 0x2E) {\n channel.ccENM();\n } else if (b === 0x2F) {\n channel.ccEOC();\n }\n } else {\n //a == 0x17 || a == 0x1F\n channel.ccTO(b - 0x20);\n }\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n }\n\n /**\n * Parse midrow styling command\n * @returns {Boolean}\n */\n\n }, {\n key: 'parseMidrow',\n value: function parseMidrow(a, b) {\n var chNr = null;\n\n if ((a === 0x11 || a === 0x19) && 0x20 <= b && b <= 0x2f) {\n if (a === 0x11) {\n chNr = 1;\n } else {\n chNr = 2;\n }\n if (chNr !== this.currChNr) {\n logger.log('ERROR', 'Mismatch channel in midrow parsing');\n return false;\n }\n var channel = this.channels[chNr - 1];\n channel.ccMIDROW(b);\n logger.log('DEBUG', 'MIDROW (' + numArrayToHexArray([a, b]) + ')');\n return true;\n }\n return false;\n }\n /**\n * Parse Preable Access Codes (Table 53).\n * @returns {Boolean} Tells if PAC found\n */\n\n }, {\n key: 'parsePAC',\n value: function parsePAC(a, b) {\n\n var chNr = null;\n var row = null;\n\n var case1 = (0x11 <= a && a <= 0x17 || 0x19 <= a && a <= 0x1F) && 0x40 <= b && b <= 0x7F;\n var case2 = (a === 0x10 || a === 0x18) && 0x40 <= b && b <= 0x5F;\n if (!(case1 || case2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true; // Repeated commands are dropped (once)\n }\n\n chNr = a <= 0x17 ? 1 : 2;\n\n if (0x40 <= b && b <= 0x5F) {\n row = chNr === 1 ? rowsLowCh1[a] : rowsLowCh2[a];\n } else {\n // 0x60 <= b <= 0x7F\n row = chNr === 1 ? rowsHighCh1[a] : rowsHighCh2[a];\n }\n var pacData = this.interpretPAC(row, b);\n var channel = this.channels[chNr - 1];\n channel.setPAC(pacData);\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n }\n\n /**\n * Interpret the second byte of the pac, and return the information.\n * @returns {Object} pacData with style parameters.\n */\n\n }, {\n key: 'interpretPAC',\n value: function interpretPAC(row, byte) {\n var pacIndex = byte;\n var pacData = { color: null, italics: false, indent: null, underline: false, row: row };\n\n if (byte > 0x5F) {\n pacIndex = byte - 0x60;\n } else {\n pacIndex = byte - 0x40;\n }\n pacData.underline = (pacIndex & 1) === 1;\n if (pacIndex <= 0xd) {\n pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];\n } else if (pacIndex <= 0xf) {\n pacData.italics = true;\n pacData.color = 'white';\n } else {\n pacData.indent = Math.floor((pacIndex - 0x10) / 2) * 4;\n }\n return pacData; // Note that row has zero offset. The spec uses 1.\n }\n\n /**\n * Parse characters.\n * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n */\n\n }, {\n key: 'parseChars',\n value: function parseChars(a, b) {\n\n var channelNr = null,\n charCodes = null,\n charCode1 = null;\n\n if (a >= 0x19) {\n channelNr = 2;\n charCode1 = a - 8;\n } else {\n channelNr = 1;\n charCode1 = a;\n }\n if (0x11 <= charCode1 && charCode1 <= 0x13) {\n // Special character\n var oneCode = b;\n if (charCode1 === 0x11) {\n oneCode = b + 0x50;\n } else if (charCode1 === 0x12) {\n oneCode = b + 0x70;\n } else {\n oneCode = b + 0x90;\n }\n logger.log('INFO', 'Special char \\'' + getCharForByte(oneCode) + '\\' in channel ' + channelNr);\n charCodes = [oneCode];\n } else if (0x20 <= a && a <= 0x7f) {\n charCodes = b === 0 ? [a] : [a, b];\n }\n if (charCodes) {\n var hexCodes = numArrayToHexArray(charCodes);\n logger.log('DEBUG', 'Char codes = ' + hexCodes.join(','));\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n return charCodes;\n }\n\n /**\n * Parse extended background attributes as well as new foreground color black.\n * @returns{Boolean} Tells if background attributes are found\n */\n\n }, {\n key: 'parseBackgroundAttributes',\n value: function parseBackgroundAttributes(a, b) {\n var bkgData, index, chNr, channel;\n\n var case1 = (a === 0x10 || a === 0x18) && 0x20 <= b && b <= 0x2f;\n var case2 = (a === 0x17 || a === 0x1f) && 0x2d <= b && b <= 0x2f;\n if (!(case1 || case2)) {\n return false;\n }\n bkgData = {};\n if (a === 0x10 || a === 0x18) {\n index = Math.floor((b - 0x20) / 2);\n bkgData.background = backgroundColors[index];\n if (b % 2 === 1) {\n bkgData.background = bkgData.background + '_semi';\n }\n } else if (b === 0x2d) {\n bkgData.background = 'transparent';\n } else {\n bkgData.foreground = 'black';\n if (b === 0x2f) {\n bkgData.underline = true;\n }\n }\n chNr = a < 0x18 ? 1 : 2;\n channel = this.channels[chNr - 1];\n channel.setBkgData(bkgData);\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true;\n }\n\n /**\n * Reset state of parser and its channels.\n */\n\n }, {\n key: 'reset',\n value: function reset() {\n for (var i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].reset();\n }\n }\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n\n /**\n * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n */\n\n }, {\n key: 'cueSplitAtTime',\n value: function cueSplitAtTime(t) {\n for (var i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].cueSplitAtTime(t);\n }\n }\n }\n }]);\n\n return Cea608Parser;\n}();\n\nexports.default = Cea608Parser;\n\n},{}],41:[function(_dereq_,module,exports){\n'use strict';\n\nvar Cues = {\n\n newCue: function newCue(track, startTime, endTime, captionScreen) {\n var row;\n var cue;\n var indenting;\n var indent;\n var text;\n var VTTCue = window.VTTCue || window.TextTrackCue;\n\n for (var r = 0; r < captionScreen.rows.length; r++) {\n row = captionScreen.rows[r];\n indenting = true;\n indent = 0;\n text = '';\n\n if (!row.isEmpty()) {\n for (var c = 0; c < row.chars.length; c++) {\n if (row.chars[c].uchar.match(/\\s/) && indenting) {\n indent++;\n } else {\n text += row.chars[c].uchar;\n indenting = false;\n }\n }\n cue = new VTTCue(startTime, endTime, text.trim());\n\n if (indent >= 16) {\n indent--;\n } else {\n indent++;\n }\n\n // VTTCue.line get's flakey when using controls, so let's now include line 13&14\n // also, drop line 1 since it's to close to the top\n if (navigator.userAgent.match(/Firefox\\//)) {\n cue.line = r + 1;\n } else {\n cue.line = r > 7 ? r - 2 : r + 1;\n }\n cue.align = 'left';\n cue.position = 100 * (indent / 32) + (navigator.userAgent.match(/Firefox\\//) ? 50 : 0);\n track.addCue(cue);\n }\n }\n }\n\n};\n\nmodule.exports = Cues;\n\n},{}],42:[function(_dereq_,module,exports){\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\n * compute an Exponential Weighted moving average\n * - https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average\n * - heavily inspired from shaka-player\n */\n\nvar EWMA = function () {\n\n // About half of the estimated value will be from the last |halfLife| samples by weight.\n\n function EWMA(halfLife) {\n _classCallCheck(this, EWMA);\n\n // Larger values of alpha expire historical data more slowly.\n this.alpha_ = halfLife ? Math.exp(Math.log(0.5) / halfLife) : 0;\n this.estimate_ = 0;\n this.totalWeight_ = 0;\n }\n\n _createClass(EWMA, [{\n key: \"sample\",\n value: function sample(weight, value) {\n var adjAlpha = Math.pow(this.alpha_, weight);\n this.estimate_ = value * (1 - adjAlpha) + adjAlpha * this.estimate_;\n this.totalWeight_ += weight;\n }\n }, {\n key: \"getTotalWeight\",\n value: function getTotalWeight() {\n return this.totalWeight_;\n }\n }, {\n key: \"getEstimate\",\n value: function getEstimate() {\n if (this.alpha_) {\n var zeroFactor = 1 - Math.pow(this.alpha_, this.totalWeight_);\n return this.estimate_ / zeroFactor;\n } else {\n return this.estimate_;\n }\n }\n }]);\n\n return EWMA;\n}();\n\nexports.default = EWMA;\n\n},{}],43:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nfunction noop() {}\n\nvar fakeLogger = {\n trace: noop,\n debug: noop,\n log: noop,\n warn: noop,\n info: noop,\n error: noop\n};\n\nvar exportedLogger = fakeLogger;\n\n/*globals self: false */\n\n//let lastCallTime;\n// function formatMsgWithTimeInfo(type, msg) {\n// const now = Date.now();\n// const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';\n// lastCallTime = now;\n// msg = (new Date(now)).toISOString() + ' | [' + type + '] > ' + msg + ' ( ' + diff + ' ms )';\n// return msg;\n// }\n\nfunction formatMsg(type, msg) {\n msg = '[' + type + '] > ' + msg;\n return msg;\n}\n\nfunction consolePrintFn(type) {\n var func = self.console[type];\n if (func) {\n return function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (args[0]) {\n args[0] = formatMsg(type, args[0]);\n }\n func.apply(self.console, args);\n };\n }\n return noop;\n}\n\nfunction exportLoggerFunctions(debugConfig) {\n for (var _len2 = arguments.length, functions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n functions[_key2 - 1] = arguments[_key2];\n }\n\n functions.forEach(function (type) {\n exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);\n });\n}\n\nvar enableLogs = exports.enableLogs = function enableLogs(debugConfig) {\n if (debugConfig === true || (typeof debugConfig === 'undefined' ? 'undefined' : _typeof(debugConfig)) === 'object') {\n exportLoggerFunctions(debugConfig,\n // Remove out from list here to hard-disable a log-level\n //'trace',\n 'debug', 'log', 'info', 'warn', 'error');\n // Some browsers don't allow to use bind on console object anyway\n // fallback to default if needed\n try {\n exportedLogger.log();\n } catch (e) {\n exportedLogger = fakeLogger;\n }\n } else {\n exportedLogger = fakeLogger;\n }\n};\n\nvar logger = exports.logger = exportedLogger;\n\n},{}],44:[function(_dereq_,module,exports){\n'use strict';\n\nif (typeof ArrayBuffer !== 'undefined' && !ArrayBuffer.prototype.slice) {\n ArrayBuffer.prototype.slice = function (start, end) {\n var that = new Uint8Array(this);\n if (end === undefined) {\n end = that.length;\n }\n var result = new ArrayBuffer(end - start);\n var resultArray = new Uint8Array(result);\n for (var i = 0; i < resultArray.length; i++) {\n resultArray[i] = that[i + start];\n }\n return result;\n };\n}\n\n},{}],45:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * TimeRanges to string helper\n */\n\nvar TimeRanges = function () {\n function TimeRanges() {\n _classCallCheck(this, TimeRanges);\n }\n\n _createClass(TimeRanges, null, [{\n key: 'toString',\n value: function toString(r) {\n var log = '',\n len = r.length;\n for (var i = 0; i < len; i++) {\n log += '[' + r.start(i).toFixed(3) + ',' + r.end(i).toFixed(3) + ']';\n }\n return log;\n }\n }]);\n\n return TimeRanges;\n}();\n\nexports.default = TimeRanges;\n\n},{}],46:[function(_dereq_,module,exports){\n'use strict';\n\nvar URLHelper = {\n // build an absolute URL from a relative one using the provided baseURL\n // if relativeURL is an absolute URL it will be returned as is.\n buildAbsoluteURL: function buildAbsoluteURL(baseURL, relativeURL) {\n // remove any remaining space and CRLF\n relativeURL = relativeURL.trim();\n if (/^[a-z]+:/i.test(relativeURL)) {\n // complete url, not relative\n return relativeURL;\n }\n\n var relativeURLQuery = null;\n var relativeURLHash = null;\n\n var relativeURLHashSplit = /^([^#]*)(.*)$/.exec(relativeURL);\n if (relativeURLHashSplit) {\n relativeURLHash = relativeURLHashSplit[2];\n relativeURL = relativeURLHashSplit[1];\n }\n var relativeURLQuerySplit = /^([^\\?]*)(.*)$/.exec(relativeURL);\n if (relativeURLQuerySplit) {\n relativeURLQuery = relativeURLQuerySplit[2];\n relativeURL = relativeURLQuerySplit[1];\n }\n\n var baseURLHashSplit = /^([^#]*)(.*)$/.exec(baseURL);\n if (baseURLHashSplit) {\n baseURL = baseURLHashSplit[1];\n }\n var baseURLQuerySplit = /^([^\\?]*)(.*)$/.exec(baseURL);\n if (baseURLQuerySplit) {\n baseURL = baseURLQuerySplit[1];\n }\n\n var baseURLDomainSplit = /^(([a-z]+:)?\\/\\/[a-z0-9\\.\\-_~]+(:[0-9]+)?)?(\\/.*)$/i.exec(baseURL);\n if (!baseURLDomainSplit) {\n throw new Error('Error trying to parse base URL.');\n }\n\n // e.g. 'http:', 'https:', ''\n var baseURLProtocol = baseURLDomainSplit[2] || '';\n // e.g. 'http://example.com', '//example.com', ''\n var baseURLProtocolDomain = baseURLDomainSplit[1] || '';\n // e.g. '/a/b/c/playlist.m3u8'\n var baseURLPath = baseURLDomainSplit[4];\n\n var builtURL = null;\n if (/^\\/\\//.test(relativeURL)) {\n // relative url starts wth '//' so copy protocol (which may be '' if baseUrl didn't provide one)\n builtURL = baseURLProtocol + '//' + URLHelper.buildAbsolutePath('', relativeURL.substring(2));\n } else if (/^\\//.test(relativeURL)) {\n // relative url starts with '/' so start from root of domain\n builtURL = baseURLProtocolDomain + '/' + URLHelper.buildAbsolutePath('', relativeURL.substring(1));\n } else {\n builtURL = URLHelper.buildAbsolutePath(baseURLProtocolDomain + baseURLPath, relativeURL);\n }\n\n // put the query and hash parts back\n if (relativeURLQuery) {\n builtURL += relativeURLQuery;\n }\n if (relativeURLHash) {\n builtURL += relativeURLHash;\n }\n return builtURL;\n },\n\n // build an absolute path using the provided basePath\n // adapted from https://developer.mozilla.org/en-US/docs/Web/API/document/cookie#Using_relative_URLs_in_the_path_parameter\n // this does not handle the case where relativePath is \"/\" or \"//\". These cases should be handled outside this.\n buildAbsolutePath: function buildAbsolutePath(basePath, relativePath) {\n var sRelPath = relativePath;\n var nUpLn,\n sDir = '',\n sPath = basePath.replace(/[^\\/]*$/, sRelPath.replace(/(\\/|^)(?:\\.?\\/+)+/g, '$1'));\n for (var nEnd, nStart = 0; nEnd = sPath.indexOf('/../', nStart), nEnd > -1; nStart = nEnd + nUpLn) {\n nUpLn = /^\\/(?:\\.\\.\\/)*/.exec(sPath.slice(nEnd))[0].length;\n sDir = (sDir + sPath.substring(nStart, nEnd)).replace(new RegExp('(?:\\\\\\/+[^\\\\\\/]*){0,' + (nUpLn - 1) / 3 + '}$'), '/');\n }\n return sDir + sPath.substr(nStart);\n }\n};\n\nmodule.exports = URLHelper;\n\n},{}],47:[function(_dereq_,module,exports){\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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; }; }(); /**\n * XHR based logger\n */\n\nvar _logger = _dereq_(43);\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar XhrLoader = function () {\n function XhrLoader(config) {\n _classCallCheck(this, XhrLoader);\n\n if (config && config.xhrSetup) {\n this.xhrSetup = config.xhrSetup;\n }\n }\n\n _createClass(XhrLoader, [{\n key: 'destroy',\n value: function destroy() {\n this.abort();\n this.loader = null;\n }\n }, {\n key: 'abort',\n value: function abort() {\n var loader = this.loader;\n if (loader && loader.readyState !== 4) {\n this.stats.aborted = true;\n loader.abort();\n }\n\n window.clearTimeout(this.requestTimeout);\n this.requestTimeout = null;\n window.clearTimeout(this.retryTimeout);\n this.retryTimeout = null;\n }\n }, {\n key: 'load',\n value: function load(context, config, callbacks) {\n this.context = context;\n this.config = config;\n this.callbacks = callbacks;\n this.stats = { trequest: performance.now(), retry: 0 };\n this.retryDelay = config.retryDelay;\n this.loadInternal();\n }\n }, {\n key: 'loadInternal',\n value: function loadInternal() {\n var xhr,\n context = this.context;\n\n if (typeof XDomainRequest !== 'undefined') {\n xhr = this.loader = new XDomainRequest();\n } else {\n xhr = this.loader = new XMLHttpRequest();\n }\n\n xhr.onreadystatechange = this.readystatechange.bind(this);\n xhr.onprogress = this.loadprogress.bind(this);\n\n xhr.open('GET', context.url, true);\n\n if (context.rangeEnd) {\n xhr.setRequestHeader('Range', 'bytes=' + context.rangeStart + '-' + (context.rangeEnd - 1));\n }\n xhr.responseType = context.responseType;\n var stats = this.stats;\n stats.tfirst = 0;\n stats.loaded = 0;\n if (this.xhrSetup) {\n this.xhrSetup(xhr, context.url);\n }\n // setup timeout before we perform request\n this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), this.config.timeout);\n xhr.send();\n }\n }, {\n key: 'readystatechange',\n value: function readystatechange(event) {\n var xhr = event.currentTarget,\n readyState = xhr.readyState,\n stats = this.stats,\n context = this.context,\n config = this.config;\n\n // don't proceed if xhr has been aborted\n if (stats.aborted) {\n return;\n }\n\n // in any case clear the current xhrs timeout\n window.clearTimeout(this.requestTimeout);\n\n // HEADERS_RECEIVED\n if (readyState >= 2) {\n if (stats.tfirst === 0) {\n stats.tfirst = Math.max(performance.now(), stats.trequest);\n // reset timeout to total timeout duration minus the time it took to receive headers\n this.requestTimeout = window.setTimeout(this.loadtimeout.bind(this), config.timeout - (stats.tfirst - stats.trequest));\n }\n if (readyState === 4) {\n var status = xhr.status;\n // http status between 200 to 299 are all successful\n if (status >= 200 && status < 300) {\n stats.tload = Math.max(stats.tfirst, performance.now());\n var data = void 0,\n len = void 0;\n if (context.responseType === 'arraybuffer') {\n data = xhr.response;\n len = data.byteLength;\n } else {\n data = xhr.responseText;\n len = data.length;\n }\n stats.loaded = stats.total = len;\n var response = { url: xhr.responseURL, data: data };\n this.callbacks.onSuccess(response, stats, context);\n } else {\n // if max nb of retries reached or if http status between 400 and 499 (such error cannot be recovered, retrying is useless), return error\n if (stats.retry >= config.maxRetry || status >= 400 && status < 499) {\n _logger.logger.error(status + ' while loading ' + context.url);\n this.callbacks.onError({ code: status, text: xhr.statusText }, context);\n } else {\n // retry\n _logger.logger.warn(status + ' while loading ' + context.url + ', retrying in ' + this.retryDelay + '...');\n // aborts and resets internal state\n this.destroy();\n // schedule retry\n this.retryTimeout = window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n // set exponential backoff\n this.retryDelay = Math.min(2 * this.retryDelay, config.maxRetryDelay);\n stats.retry++;\n }\n }\n }\n }\n }\n }, {\n key: 'loadtimeout',\n value: function loadtimeout() {\n _logger.logger.warn('timeout while loading ' + this.context.url);\n this.callbacks.onTimeout(this.stats, this.context);\n }\n }, {\n key: 'loadprogress',\n value: function loadprogress(event) {\n var stats = this.stats;\n stats.loaded = event.loaded;\n if (event.lengthComputable) {\n stats.total = event.total;\n }\n var onProgress = this.callbacks.onProgress;\n if (onProgress) {\n // last args is to provide on progress data\n onProgress(stats, this.context, null);\n }\n }\n }]);\n\n return XhrLoader;\n}();\n\nexports.default = XhrLoader;\n\n},{\"43\":43}]},{},[31])(31)\n});\n//# sourceMappingURL=hls.js.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/hls.js/dist/hls.js\n// module id = 90\n// module chunks = 0","module.exports = \"<div class=\\\"media-control-background\\\" data-background></div>\\n<div class=\\\"media-control-layer\\\" data-controls>\\n <% var renderBar = function(name) { %>\\n <div class=\\\"bar-container\\\" data-<%= name %>>\\n <div class=\\\"bar-background\\\" data-<%= name %>>\\n <div class=\\\"bar-fill-1\\\" data-<%= name %>></div>\\n <div class=\\\"bar-fill-2\\\" data-<%= name %>></div>\\n <div class=\\\"bar-hover\\\" data-<%= name %>></div>\\n </div>\\n <div class=\\\"bar-scrubber\\\" data-<%= name %>>\\n <div class=\\\"bar-scrubber-icon\\\" data-<%= name %>></div>\\n </div>\\n </div>\\n <% }; %>\\n <% var renderSegmentedBar = function(name, segments) {\\n segments = segments || 10; %>\\n <div class=\\\"bar-container\\\" data-<%= name %>>\\n <% for (var i = 0; i < segments; i++) { %>\\n <div class=\\\"segmented-bar-element\\\" data-<%= name %>></div>\\n <% } %>\\n </div>\\n <% }; %>\\n <% var renderDrawer = function(name, renderContent) { %>\\n <div class=\\\"drawer-container\\\" data-<%= name %>>\\n <div class=\\\"drawer-icon-container\\\" data-<%= name %>>\\n <div class=\\\"drawer-icon media-control-icon\\\" data-<%= name %>></div>\\n <span class=\\\"drawer-text\\\" data-<%= name %>></span>\\n </div>\\n <% renderContent(name); %>\\n </div>\\n <% }; %>\\n <% var renderIndicator = function(name) { %>\\n <div class=\\\"media-control-indicator\\\" data-<%= name %>></div>\\n <% }; %>\\n <% var renderButton = function(name) { %>\\n <button type=\\\"button\\\" class=\\\"media-control-button media-control-icon\\\" data-<%= name %>></button>\\n <% }; %>\\n <% var templates = {\\n bar: renderBar,\\n segmentedBar: renderSegmentedBar,\\n };\\n var render = function(settingsList) {\\n settingsList.forEach(function(setting) {\\n if(setting === \\\"seekbar\\\") {\\n renderBar(setting);\\n } else if (setting === \\\"volume\\\") {\\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\\n } else if (setting === \\\"duration\\\" || setting === \\\"position\\\") {\\n renderIndicator(setting);\\n } else {\\n renderButton(setting);\\n }\\n });\\n }; %>\\n <% if (settings.default && settings.default.length) { %>\\n <div class=\\\"media-control-center-panel\\\" data-media-control>\\n <% render(settings.default); %>\\n </div>\\n <% } %>\\n <% if (settings.left && settings.left.length) { %>\\n <div class=\\\"media-control-left-panel\\\" data-media-control>\\n <% render(settings.left); %>\\n </div>\\n <% } %>\\n <% if (settings.right && settings.right.length) { %>\\n <div class=\\\"media-control-right-panel\\\" data-media-control>\\n <% render(settings.right); %>\\n </div>\\n <% } %>\\n</div>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/media_control/public/media-control.html\n// module id = 91\n// module chunks = 0","module.exports = \"<param name=\\\"movie\\\" value=\\\"<%= swfPath %>?inline=1\\\">\\n<param name=\\\"quality\\\" value=\\\"autohigh\\\">\\n<param name=\\\"swliveconnect\\\" value=\\\"true\\\">\\n<param name=\\\"allowScriptAccess\\\" value=\\\"always\\\">\\n<param name=\\\"bgcolor\\\" value=\\\"#000000\\\">\\n<param name=\\\"allowFullScreen\\\" value=\\\"false\\\">\\n<param name=\\\"wmode\\\" value=\\\"<%= wmode %>\\\">\\n<param name=\\\"tabindex\\\" value=\\\"1\\\">\\n<param name=\\\"FlashVars\\\" value=\\\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\\\">\\n<embed\\n name=\\\"<%= cid %>\\\"\\n type=\\\"application/x-shockwave-flash\\\"\\n disabled=\\\"disabled\\\"\\n tabindex=\\\"-1\\\"\\n enablecontextmenu=\\\"false\\\"\\n allowScriptAccess=\\\"always\\\"\\n quality=\\\"autohigh\\\"\\n pluginspage=\\\"http://www.macromedia.com/go/getflashplayer\\\"\\n wmode=\\\"<%= wmode %>\\\"\\n swliveconnect=\\\"true\\\"\\n allowfullscreen=\\\"false\\\"\\n bgcolor=\\\"#000000\\\"\\n FlashVars=\\\"playbackId=<%= playbackId %>&callback=<%= callbackName %>\\\"\\n src=\\\"<%= swfPath %>\\\"\\n width=\\\"100%\\\"\\n height=\\\"100%\\\">\\n</embed>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/base_flash_playback/public/flash.html\n// module id = 92\n// module chunks = 0","module.exports = \"<canvas data-no-op-canvas></canvas>\\n<p data-no-op-msg><%=message%><p>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/no_op/public/error.html\n// module id = 93\n// module chunks = 0","module.exports = \"<div class=\\\"live-info\\\"><%= live %></div>\\n<button type=\\\"button\\\" class=\\\"live-button\\\"><%= backToLive %></button>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/dvr_controls/public/index.html\n// module id = 94\n// module chunks = 0","module.exports = \"<div class=\\\"play-wrapper\\\" data-poster></div>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/poster/public/poster.html\n// module id = 95\n// module chunks = 0","module.exports = \"<span data-seek-time></span>\\n<span data-duration></span>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/seek_time/public/seek_time.html\n// module id = 96\n// module chunks = 0","module.exports = \"<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/spinner_three_bounce/public/spinner.html\n// module id = 97\n// module chunks = 0","module.exports = \"<div data-watermark data-watermark-<%=position %>>\\n<% if(typeof imageLink !== 'undefined') { %>\\n<a target=_blank href=\\\"<%= imageLink %>\\\">\\n<% } %>\\n<img src=\\\"<%= imageUrl %>\\\">\\n<% if(typeof imageLink !== 'undefined') { %>\\n</a>\\n<% } %>\\n</div>\\n\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/plugins/watermark/public/watermark.html\n// module id = 98\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are **not** supported.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = isEqual;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.isequal/index.js\n// module id = 99\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) ||\n objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);\n}\n\nmodule.exports = isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.isplainobject/index.js\n// module id = 100\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n}\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n return before(2, func);\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = once;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.once/index.js\n// module id = 101\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\nfunction result(object, path, defaultValue) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n object = undefined;\n length = 1;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n}\n\nmodule.exports = result;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.result/index.js\n// module id = 102\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for comparison styles. */\nvar UNORDERED_COMPARE_FLAG = 1,\n PARTIAL_COMPARE_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array ? array.length : 0;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return baseFindIndex(array, baseIsNaN, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a cache value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {boolean} [bitmask] The bitmask of comparison flags.\n * The bitmask may be composed of the following flags:\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, customizer, bitmask, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = arrayTag,\n othTag = arrayTag;\n\n if (!objIsArr) {\n objTag = getTag(object);\n objTag = objTag == argsTag ? objectTag : objTag;\n }\n if (!othIsArr) {\n othTag = getTag(other);\n othTag = othTag == argsTag ? objectTag : othTag;\n }\n var objIsObj = objTag == objectTag && !isHostObject(object),\n othIsObj = othTag == objectTag && !isHostObject(other),\n isSameTag = objTag == othTag;\n\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)\n : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);\n }\n if (!(bitmask & PARTIAL_COMPARE_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, equalFunc, customizer, bitmask, stack);\n}\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);\n };\n}\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!seen.has(othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {\n return seen.add(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, customizer, bitmask, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= UNORDERED_COMPARE_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Function} customizer The function to customize comparisons.\n * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`\n * for more details.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, equalFunc, customizer, bitmask, stack) {\n var isPartial = bitmask & PARTIAL_COMPARE_FLAG,\n objProps = keys(object),\n objLength = objProps.length,\n othProps = keys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var result,\n index = -1,\n length = path.length;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result) {\n return result;\n }\n var length = object ? object.length : 0;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\n/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity]\n * The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length)\n ? baseUniq(array, baseIteratee(iteratee, 2))\n : [];\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = uniqBy;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.uniqby/index.js\n// module id = 103\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M1.712 1.24h12.6v13.52h-12.6z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/03-stop.svg\n// module id = 104\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/04-volume.svg\n// module id = 105\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" fill=\\\"#010101\\\" d=\\\"M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/05-mute.svg\n// module id = 106\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/06-expand.svg\n// module id = 107\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/07-shrink.svg\n// module id = 108\n// module chunks = 0","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 16 16\\\"><path fill=\\\"#010101\\\" d=\\\"M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z\\\"></path></svg>\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/icons/08-hd.svg\n// module id = 109\n// module chunks = 0","module.exports = __webpack_public_path__ + \"38861cba61c66739c1452c3a71e39852.ttf\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/core/public/Roboto.ttf\n// module id = 110\n// module chunks = 0","module.exports = __webpack_public_path__ + \"4b76590b32dab62bc95c1b7951efae78.swf\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/flash/public/Player.swf\n// module id = 111\n// module chunks = 0","module.exports = __webpack_public_path__ + \"809981e5b09d5336c45d72d0869ada2a.swf\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/playbacks/flashls/public/HLSPlayer.swf\n// module id = 112\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file
diff --git a/assets/css/_relive.less b/assets/css/_relive.less
index 512c3cd..09d54ad 100644
--- a/assets/css/_relive.less
+++ b/assets/css/_relive.less
@@ -28,13 +28,20 @@ body.relive {
body.relive-player {
.player-wrap {
- padding: 50px 0;
+ padding: 0;
border: 1px solid #ddd;
- border-radius: @border-radius-large;
- margin-bottom: 25px;
.video-wrap {
margin: 0 auto;
+
+ > [data-player] {
+ // force 16:9 aspect ratio
+ // https://gordonlesti.com/bootstrap-responsive-embed-aspect-ratio/
+ padding-bottom: 56.25%;
+
+ width: auto !important;
+ height: auto !important;
+ }
}
}
diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js
index 63227a3..81db426 100644
--- a/assets/js/lustiges-script.js
+++ b/assets/js/lustiges-script.js
@@ -19,21 +19,29 @@ $(function() {
features: ['playpause', 'volume', 'current']
});
- $('body.relive-player video.mejs').mediaelementplayer({
- mode: 'auto_plugin',
- plugins: ['flash'],
- flashName: 'flashmediaelement.swf',
- pluginPath: '../assets/mejs/',
- enableAutosize: true,
- success: function (mediaElement) {
- mediaElement.addEventListener('canplay', function () {
- // skip forward to scheduled beginning of the talk at ~ 0:14:30 (30 sec offset, if speaker starts on time)
- if ( mediaElement.currentTime == 0 ) {
- mediaElement.setCurrentTime(870);
+ var $relivePlayer = $('body.relive-player .video-wrap');
+ if($relivePlayer.length > 0) {
+ var player = new Clappr.Player({
+ baseUrl: 'assets/clapprio/',
+ source: $relivePlayer.data('m3u8'),
+ height: $relivePlayer.data('height'),
+ width: $relivePlayer.data('width'),
+ autoPlay: true,
+ events: {
+ onReady: function() {
+ var playback = player.getPlugin('hls');
+ playback.once(Clappr.Events.PLAYBACK_PLAY, function() {
+ if(player.getPlugin('hls').getPlaybackType() == 'vod') {
+ // skip forward to scheduled beginning of the talk at ~ 0:14:30 (30 sec offset, if speaker starts on time)
+ player.seek(14 * 60 + 30);
+ }
+ });
}
- })
- }
- });
+ }
+ });
+
+ player.attachTo($relivePlayer.get(0));
+ }
$(window).on('load', function() {
$(window).trigger('resize');