From 24f02757c9966ddc05871e6bd49226b752f183e4 Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Mon, 13 Apr 2020 19:31:07 +0200 Subject: use voc-player for relive, update clappr plugins, remove old assets, clean up dash/relive player embeds --- .../38861cba61c66739c1452c3a71e39852.ttf | Bin 0 -> 32652 bytes assets/voc-player/clappr-playback-rate-plugin.js | 2 + assets/voc-player/clappr-thumbnails-plugin.js | 280 ++++ assets/voc-player/player.js | 1431 ++++++++++++++++++++ assets/voc-player/player.js.map | 1 + 5 files changed, 1714 insertions(+) create mode 100644 assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf create mode 100644 assets/voc-player/clappr-playback-rate-plugin.js create mode 100644 assets/voc-player/clappr-thumbnails-plugin.js create mode 100644 assets/voc-player/player.js create mode 100644 assets/voc-player/player.js.map (limited to 'assets/voc-player') diff --git a/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf b/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf new file mode 100644 index 0000000..7b25f3c Binary files /dev/null and b/assets/voc-player/38861cba61c66739c1452c3a71e39852.ttf differ diff --git a/assets/voc-player/clappr-playback-rate-plugin.js b/assets/voc-player/clappr-playback-rate-plugin.js new file mode 100644 index 0000000..f002c15 --- /dev/null +++ b/assets/voc-player/clappr-playback-rate-plugin.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr")):"function"==typeof define&&define.amd?define(["clappr"],e):"object"==typeof exports?exports.PlaybackRatePlugin=e(require("clappr")):t.PlaybackRatePlugin=e(t.Clappr)}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=57)}([function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(59))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(5);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(2),o=n(38),i=n(10),a=n(17),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(0),o=n(25),i=n(1),a=n(26),c=n(30),u=n(48),f=o("wks"),l=r.Symbol,s=u?l:l&&l.withoutSetter||a;t.exports=function(t){return i(f,t)||(c&&i(l,t)?f[t]=l[t]:f[t]=s("Symbol."+t)),f[t]}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(2),o=n(3),i=n(14);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(13).f,i=n(7),a=n(11),c=n(24),u=n(42),f=n(47);t.exports=function(t,e){var n,l,s,p,y,d=t.target,v=t.global,b=t.stat;if(n=v?r:b?r[d]||c(d,{}):(r[d]||{}).prototype)for(l in e){if(p=e[l],s=t.noTargetGet?(y=o(n,l))&&y.value:n[l],!f(v?l:d+(b?".":"#")+l,t.forced)&&void 0!==s){if(typeof p==typeof s)continue;u(p,s)}(t.sham||s&&s.sham)&&i(p,"sham",!0),a(n,l,p,t)}}},function(t,e,n){var r=n(37),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(0),o=n(7),i=n(1),a=n(24),c=n(40),u=n(18),f=u.get,l=u.enforce,s=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),l(n).source=s.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(f=!0):delete t[e],f?t[e]=n:o(t,e,n)):f?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||c(this)}))},function(t,e,n){var r,o=n(10),i=n(64),a=n(29),c=n(21),u=n(65),f=n(39),l=n(19),s=l("IE_PROTO"),p=function(){},y=function(t){return"\n * \n * ```\n * Now, create the player:\n * ```html\n * \n *
\n * \n * \n * ```\n */\n// 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\nvar Player = function (_BaseObject) {\n (0, _inherits3.default)(Player, _BaseObject);\n (0, _createClass3.default)(Player, [{\n key: 'loader',\n set: function set(loader) {\n this._loader = loader;\n },\n get: function get() {\n if (!this._loader) this._loader = new _loader2.default(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\n }, {\n key: 'ended',\n get: function get() {\n return this.core.activeContainer.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\n }, {\n key: 'buffering',\n get: function get() {\n return this.core.activeContainer.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\n }, {\n key: 'isReady',\n get: function get() {\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\n }, {\n key: 'eventsMapping',\n get: function get() {\n return {\n onReady: _events2.default.PLAYER_READY,\n onResize: _events2.default.PLAYER_RESIZE,\n onPlay: _events2.default.PLAYER_PLAY,\n onPause: _events2.default.PLAYER_PAUSE,\n onStop: _events2.default.PLAYER_STOP,\n onEnded: _events2.default.PLAYER_ENDED,\n onSeek: _events2.default.PLAYER_SEEK,\n onError: _events2.default.PLAYER_ERROR,\n onTimeUpdate: _events2.default.PLAYER_TIMEUPDATE,\n onVolumeUpdate: _events2.default.PLAYER_VOLUMEUPDATE,\n onSubtitleAvailable: _events2.default.PLAYER_SUBTITLE_AVAILABLE\n };\n }\n\n /**\n * @typedef {Object} PlaybackConfig\n * @prop {boolean} disableContextMenu\n * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n * @prop {boolean} preload\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @prop {boolean} controls\n * enabled/disables displaying controls\n * @prop {boolean} crossOrigin\n * enables cross-origin capability for media-resources\n * @prop {boolean} playInline\n * enables in-line video elements\n * @prop {boolean} audioOnly\n * enforce audio-only playback (when possible)\n * @prop {Object} externalTracks\n * pass externaly loaded track to playback\n * @prop {Number} [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 * @prop {Number} [maxBackBufferLength]\n * After how much distance of the playhead data should be pruned from the buffer (influences memory consumption\n * of adaptive media-engines like Hls.js or Shaka)\n * @prop {Number} [minBufferLength]\n * After how much data in the buffer at least we attempt to consume it (influences QoS-related behavior\n * of adaptive media-engines like Hls.js or Shaka). If this is too low, and the available bandwidth is varying a lot\n * and too close to the streamed bitrate, we may continuously hit under-runs.\n * @prop {Number} [initialBandwidthEstimate]\n * define an initial bandwidth \"guess\" (or previously stored/established value) for underlying adaptive-bitreate engines\n * of adaptive playback implementations, like Hls.js or Shaka\n * @prop {Number} [maxAdaptiveBitrate]\n * Limits the streamed bitrate (for adaptive media-engines in underlying playback implementations)\n * @prop {Object} [maxAdaptiveVideoDimensions]\n * Limits the video dimensions in adaptive media-engines. Should be a literal object with `height` and `width`.\n * @prop {Boolean}[enableAutomaticABR] **default**: `true`\n * Allows to enable/disable automatic bitrate switching in adaptive media-engines\n * @prop {String} [preferredTextLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred text language, that may be enabled by the media-engine if available.\n * @prop {String} [preferredAudioLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred audio language, that may be enabled by the media-engine if available.\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: <>, mimeType: <>}\n * @param {Object} [options.sources]\n * An array of media source URL's, or an array of {source: <>, mimeType: <>}\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.mute]\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 {Boolean} [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] @deprecated\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @param {Number} [options.maxBufferLength] @deprecated\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] @deprecated\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 * @param {PlaybackConfig} [options.playback]\n * Generic `Playback` component related configuration\n * @param {Boolean} [options.disableErrorScreen]\n * disables the error screen plugin.\n * @param {Number} [options.autoPlayTimeout]\n * autoplay check timeout.\n */\n\n }]);\n\n function Player(options) {\n (0, _classCallCheck3.default)(this, Player);\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseObject.call(this, options));\n\n var playbackDefaultOptions = { recycleVideo: true };\n var defaultOptions = {\n playerId: (0, _utils.uniqueId)(''),\n persistConfig: true,\n width: 640,\n height: 360,\n baseUrl: baseUrl,\n allowUserInteraction: _browser2.default.isMobile,\n playback: playbackDefaultOptions\n };\n _this._options = _clapprZepto2.default.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(_this.options.events);\n _this._coreFactory = new _core_factory2.default(_this);\n _this.playerInfo = _player_info2.default.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) _this.setParentId(_this.options.parentId);else if (_this.options.parent) _this.attachTo(_this.options.parent);\n\n return _this;\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\n\n Player.prototype.setParentId = function setParentId(parentId) {\n var el = document.querySelector(parentId);\n if (el) 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\n\n Player.prototype.attachTo = function attachTo(element) {\n this.options.parentElement = element;\n this.core = this._coreFactory.create();\n this._addEventListeners();\n return this;\n };\n\n Player.prototype._addEventListeners = function _addEventListeners() {\n if (!this.core.isReady) this.listenToOnce(this.core, _events2.default.CORE_READY, this._onReady);else this._onReady();\n\n this.listenTo(this.core, _events2.default.CORE_ACTIVE_CONTAINER_CHANGED, this._containerChanged);\n this.listenTo(this.core, _events2.default.CORE_FULLSCREEN, this._onFullscreenChange);\n this.listenTo(this.core, _events2.default.CORE_RESIZE, this._onResize);\n return this;\n };\n\n Player.prototype._addContainerEventListeners = function _addContainerEventListeners() {\n var container = this.core.activeContainer;\n if (container) {\n this.listenTo(container, _events2.default.CONTAINER_PLAY, this._onPlay);\n this.listenTo(container, _events2.default.CONTAINER_PAUSE, this._onPause);\n this.listenTo(container, _events2.default.CONTAINER_STOP, this._onStop);\n this.listenTo(container, _events2.default.CONTAINER_ENDED, this._onEnded);\n this.listenTo(container, _events2.default.CONTAINER_SEEK, this._onSeek);\n this.listenTo(container, _events2.default.CONTAINER_ERROR, this._onError);\n this.listenTo(container, _events2.default.CONTAINER_TIMEUPDATE, this._onTimeUpdate);\n this.listenTo(container, _events2.default.CONTAINER_VOLUME, this._onVolumeUpdate);\n this.listenTo(container, _events2.default.CONTAINER_SUBTITLE_AVAILABLE, this._onSubtitleAvailable);\n }\n return this;\n };\n\n Player.prototype._registerOptionEventListeners = function _registerOptionEventListeners() {\n var _this2 = this;\n\n var newEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var hasNewEvents = (0, _keys2.default)(newEvents).length > 0;\n hasNewEvents && (0, _keys2.default)(events).forEach(function (userEvent) {\n var eventType = _this2.eventsMapping[userEvent];\n eventType && _this2.off(eventType, events[userEvent]);\n });\n\n (0, _keys2.default)(newEvents).forEach(function (userEvent) {\n var eventType = _this2.eventsMapping[userEvent];\n if (eventType) {\n var eventFunction = newEvents[userEvent];\n eventFunction = typeof eventFunction === 'function' && eventFunction;\n eventFunction && _this2.on(eventType, eventFunction);\n }\n });\n return this;\n };\n\n Player.prototype._containerChanged = function _containerChanged() {\n this.stopListening();\n this._addEventListeners();\n };\n\n Player.prototype._onReady = function _onReady() {\n this._ready = true;\n this._addContainerEventListeners();\n this.trigger(_events2.default.PLAYER_READY);\n };\n\n Player.prototype._onFullscreenChange = function _onFullscreenChange(fullscreen) {\n this.trigger(_events2.default.PLAYER_FULLSCREEN, fullscreen);\n };\n\n Player.prototype._onVolumeUpdate = function _onVolumeUpdate(volume) {\n this.trigger(_events2.default.PLAYER_VOLUMEUPDATE, volume);\n };\n\n Player.prototype._onSubtitleAvailable = function _onSubtitleAvailable() {\n this.trigger(_events2.default.PLAYER_SUBTITLE_AVAILABLE);\n };\n\n Player.prototype._onResize = function _onResize(size) {\n this.trigger(_events2.default.PLAYER_RESIZE, size);\n };\n\n Player.prototype._onPlay = function _onPlay() {\n this.trigger(_events2.default.PLAYER_PLAY);\n };\n\n Player.prototype._onPause = function _onPause() {\n this.trigger(_events2.default.PLAYER_PAUSE);\n };\n\n Player.prototype._onStop = function _onStop() {\n this.trigger(_events2.default.PLAYER_STOP, this.getCurrentTime());\n };\n\n Player.prototype._onEnded = function _onEnded() {\n this.trigger(_events2.default.PLAYER_ENDED);\n };\n\n Player.prototype._onSeek = function _onSeek(time) {\n this.trigger(_events2.default.PLAYER_SEEK, time);\n };\n\n Player.prototype._onTimeUpdate = function _onTimeUpdate(timeProgress) {\n this.trigger(_events2.default.PLAYER_TIMEUPDATE, timeProgress);\n };\n\n Player.prototype._onError = function _onError(error) {\n this.trigger(_events2.default.PLAYER_ERROR, error);\n };\n\n Player.prototype._normalizeSources = function _normalizeSources(options) {\n var 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\n\n Player.prototype.resize = function 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: <>, mimeType: <>}\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\n\n Player.prototype.load = function load(sources, mimeType, autoPlay) {\n if (autoPlay !== undefined) 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\n\n Player.prototype.destroy = function destroy() {\n this.stopListening();\n this.core.destroy();\n return this;\n };\n\n /**\n * Gives user consent to playback. Required by mobile device after a click event before Player.load().\n * @method consent\n * @return {Player} itself\n */\n\n\n Player.prototype.consent = function consent() {\n this.core.getCurrentPlayback().consent();\n return this;\n };\n\n /**\n * plays the current video (`source`).\n * @method play\n * @return {Player} itself\n */\n\n\n Player.prototype.play = function play() {\n this.core.activeContainer.play();\n return this;\n };\n\n /**\n * pauses the current video (`source`).\n * @method pause\n * @return {Player} itself\n */\n\n\n Player.prototype.pause = function pause() {\n this.core.activeContainer.pause();\n return this;\n };\n\n /**\n * stops the current video (`source`).\n * @method stop\n * @return {Player} itself\n */\n\n\n Player.prototype.stop = function stop() {\n this.core.activeContainer.stop();\n return this;\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\n\n Player.prototype.seek = function seek(time) {\n this.core.activeContainer.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\n\n Player.prototype.seekPercentage = function seekPercentage(percentage) {\n this.core.activeContainer.seekPercentage(percentage);\n return this;\n };\n\n /**\n * mutes the current video (`source`).\n * @method mute\n * @return {Player} itself\n */\n\n\n Player.prototype.mute = function 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\n\n Player.prototype.unmute = function 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\n\n Player.prototype.isPlaying = function isPlaying() {\n return this.core.activeContainer.isPlaying();\n };\n\n /**\n * returns `true` if DVR is enable otherwise `false`.\n * @method isDvrEnabled\n * @return {Boolean}\n */\n\n\n Player.prototype.isDvrEnabled = function isDvrEnabled() {\n return this.core.activeContainer.isDvrEnabled();\n };\n\n /**\n * returns `true` if DVR is in use otherwise `false`.\n * @method isDvrInUse\n * @return {Boolean}\n */\n\n\n Player.prototype.isDvrInUse = function isDvrInUse() {\n return this.core.activeContainer.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\n\n Player.prototype.configure = function configure() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this._registerOptionEventListeners(options.events, this.options.events);\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\n\n Player.prototype.getPlugin = function getPlugin(name) {\n var plugins = this.core.plugins.concat(this.core.activeContainer.plugins);\n return plugins.filter(function (plugin) {\n return plugin.name === name;\n })[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\n\n Player.prototype.getCurrentTime = function getCurrentTime() {\n return this.core.activeContainer.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\n\n Player.prototype.getStartTimeOffset = function getStartTimeOffset() {\n return this.core.activeContainer.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\n\n Player.prototype.getDuration = function getDuration() {\n return this.core.activeContainer.getDuration();\n };\n\n return Player;\n}(_base_object2.default);\n\nexports.default = Player;\n\n\n(0, _assign2.default)(Player.prototype, _error_mixin2.default);\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/components/player_info.js\":\n/*!***************************************!*\\\n !*** ./src/components/player_info.js ***!\n \\***************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 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\nvar PlayerInfo = function PlayerInfo() {\n (0, _classCallCheck3.default)(this, PlayerInfo);\n\n this.options = {};\n this.playbackPlugins = [];\n this.currentSize = { width: 0, height: 0 };\n};\n\nPlayerInfo._players = {};\n\nPlayerInfo.getInstance = function (playerId) {\n return PlayerInfo._players[playerId] || (PlayerInfo._players[playerId] = new PlayerInfo());\n};\n\nexports.default = PlayerInfo;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n\n/***/ \"./src/icons/01-play.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/01-play.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/02-pause.svg\":\n/*!********************************!*\\\n !*** ./src/icons/02-pause.svg ***!\n \\********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/03-stop.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/03-stop.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/04-volume.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/04-volume.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/05-mute.svg\":\n/*!*******************************!*\\\n !*** ./src/icons/05-mute.svg ***!\n \\*******************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/06-expand.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/06-expand.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/07-shrink.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/07-shrink.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/08-hd.svg\":\n/*!*****************************!*\\\n !*** ./src/icons/08-hd.svg ***!\n \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/09-cc.svg\":\n/*!*****************************!*\\\n !*** ./src/icons/09-cc.svg ***!\n \\*****************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/icons/10-reload.svg\":\n/*!*********************************!*\\\n !*** ./src/icons/10-reload.svg ***!\n \\*********************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\"\n\n/***/ }),\n\n/***/ \"./src/main.js\":\n/*!*********************!*\\\n !*** ./src/main.js ***!\n \\*********************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _player = __webpack_require__(/*! ./components/player */ \"./src/components/player.js\");\n\nvar _player2 = _interopRequireDefault(_player);\n\nvar _utils = __webpack_require__(/*! ./base/utils */ \"./src/base/utils.js\");\n\nvar _utils2 = _interopRequireDefault(_utils);\n\nvar _events = __webpack_require__(/*! ./base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ./base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _container_plugin = __webpack_require__(/*! ./base/container_plugin */ \"./src/base/container_plugin.js\");\n\nvar _container_plugin2 = _interopRequireDefault(_container_plugin);\n\nvar _core_plugin = __webpack_require__(/*! ./base/core_plugin */ \"./src/base/core_plugin.js\");\n\nvar _core_plugin2 = _interopRequireDefault(_core_plugin);\n\nvar _ui_core_plugin = __webpack_require__(/*! ./base/ui_core_plugin */ \"./src/base/ui_core_plugin.js\");\n\nvar _ui_core_plugin2 = _interopRequireDefault(_ui_core_plugin);\n\nvar _ui_container_plugin = __webpack_require__(/*! ./base/ui_container_plugin */ \"./src/base/ui_container_plugin.js\");\n\nvar _ui_container_plugin2 = _interopRequireDefault(_ui_container_plugin);\n\nvar _base_object = __webpack_require__(/*! ./base/base_object */ \"./src/base/base_object.js\");\n\nvar _base_object2 = _interopRequireDefault(_base_object);\n\nvar _ui_object = __webpack_require__(/*! ./base/ui_object */ \"./src/base/ui_object.js\");\n\nvar _ui_object2 = _interopRequireDefault(_ui_object);\n\nvar _browser = __webpack_require__(/*! ./components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _container = __webpack_require__(/*! ./components/container */ \"./src/components/container/index.js\");\n\nvar _container2 = _interopRequireDefault(_container);\n\nvar _core = __webpack_require__(/*! ./components/core */ \"./src/components/core/index.js\");\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _error = __webpack_require__(/*! ./components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _loader = __webpack_require__(/*! ./components/loader */ \"./src/components/loader/index.js\");\n\nvar _loader2 = _interopRequireDefault(_loader);\n\nvar _mediator = __webpack_require__(/*! ./components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _player_info = __webpack_require__(/*! ./components/player_info */ \"./src/components/player_info.js\");\n\nvar _player_info2 = _interopRequireDefault(_player_info);\n\nvar _base_flash_playback = __webpack_require__(/*! ./playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _flash = __webpack_require__(/*! ./playbacks/flash */ \"./src/playbacks/flash/index.js\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\nvar _flashls = __webpack_require__(/*! ./playbacks/flashls */ \"./src/playbacks/flashls/index.js\");\n\nvar _flashls2 = _interopRequireDefault(_flashls);\n\nvar _hls = __webpack_require__(/*! ./playbacks/hls */ \"./src/playbacks/hls/index.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nvar _html5_audio = __webpack_require__(/*! ./playbacks/html5_audio */ \"./src/playbacks/html5_audio/index.js\");\n\nvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\nvar _html5_video = __webpack_require__(/*! ./playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nvar _html_img = __webpack_require__(/*! ./playbacks/html_img */ \"./src/playbacks/html_img/index.js\");\n\nvar _html_img2 = _interopRequireDefault(_html_img);\n\nvar _no_op = __webpack_require__(/*! ./playbacks/no_op */ \"./src/playbacks/no_op/index.js\");\n\nvar _no_op2 = _interopRequireDefault(_no_op);\n\nvar _media_control = __webpack_require__(/*! ./plugins/media_control */ \"./src/plugins/media_control/index.js\");\n\nvar _media_control2 = _interopRequireDefault(_media_control);\n\nvar _click_to_pause = __webpack_require__(/*! ./plugins/click_to_pause */ \"./src/plugins/click_to_pause/index.js\");\n\nvar _click_to_pause2 = _interopRequireDefault(_click_to_pause);\n\nvar _dvr_controls = __webpack_require__(/*! ./plugins/dvr_controls */ \"./src/plugins/dvr_controls/index.js\");\n\nvar _dvr_controls2 = _interopRequireDefault(_dvr_controls);\n\nvar _favicon = __webpack_require__(/*! ./plugins/favicon */ \"./src/plugins/favicon/index.js\");\n\nvar _favicon2 = _interopRequireDefault(_favicon);\n\nvar _log = __webpack_require__(/*! ./plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _poster = __webpack_require__(/*! ./plugins/poster */ \"./src/plugins/poster/index.js\");\n\nvar _poster2 = _interopRequireDefault(_poster);\n\nvar _spinner_three_bounce = __webpack_require__(/*! ./plugins/spinner_three_bounce */ \"./src/plugins/spinner_three_bounce/index.js\");\n\nvar _spinner_three_bounce2 = _interopRequireDefault(_spinner_three_bounce);\n\nvar _watermark = __webpack_require__(/*! ./plugins/watermark */ \"./src/plugins/watermark/index.js\");\n\nvar _watermark2 = _interopRequireDefault(_watermark);\n\nvar _styler = __webpack_require__(/*! ./base/styler */ \"./src/base/styler.js\");\n\nvar _styler2 = _interopRequireDefault(_styler);\n\nvar _vendor = __webpack_require__(/*! ./vendor */ \"./src/vendor/index.js\");\n\nvar _vendor2 = _interopRequireDefault(_vendor);\n\nvar _template = __webpack_require__(/*! ./base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar version = \"0.3.12\"; // 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\nexports.default = {\n Player: _player2.default,\n Mediator: _mediator2.default,\n Events: _events2.default,\n Browser: _browser2.default,\n PlayerInfo: _player_info2.default,\n MediaControl: _media_control2.default,\n ContainerPlugin: _container_plugin2.default,\n UIContainerPlugin: _ui_container_plugin2.default,\n CorePlugin: _core_plugin2.default,\n UICorePlugin: _ui_core_plugin2.default,\n Playback: _playback2.default,\n Container: _container2.default,\n Core: _core2.default,\n PlayerError: _error2.default,\n Loader: _loader2.default,\n BaseObject: _base_object2.default,\n UIObject: _ui_object2.default,\n Utils: _utils2.default,\n BaseFlashPlayback: _base_flash_playback2.default,\n Flash: _flash2.default,\n FlasHLS: _flashls2.default,\n HLS: _hls2.default,\n HTML5Audio: _html5_audio2.default,\n HTML5Video: _html5_video2.default,\n HTMLImg: _html_img2.default,\n NoOp: _no_op2.default,\n ClickToPausePlugin: _click_to_pause2.default,\n DVRControls: _dvr_controls2.default,\n Favicon: _favicon2.default,\n Log: _log2.default,\n Poster: _poster2.default,\n SpinnerThreeBouncePlugin: _spinner_three_bounce2.default,\n WaterMarkPlugin: _watermark2.default,\n Styler: _styler2.default,\n Vendor: _vendor2.default,\n version: version,\n template: _template2.default,\n $: _clapprZepto2.default\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/base_flash_playback.js\":\n/*!******************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/base_flash_playback.js ***!\n \\******************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _flash = __webpack_require__(/*! ./public/flash.html */ \"./src/playbacks/base_flash_playback/public/flash.html\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\n__webpack_require__(/*! ./public/flash.scss */ \"./src/playbacks/base_flash_playback/public/flash.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IE_CLASSID = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'; // 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\nvar BaseFlashPlayback = function (_Playback) {\n (0, _inherits3.default)(BaseFlashPlayback, _Playback);\n\n function BaseFlashPlayback() {\n (0, _classCallCheck3.default)(this, BaseFlashPlayback);\n return (0, _possibleConstructorReturn3.default)(this, _Playback.apply(this, arguments));\n }\n\n BaseFlashPlayback.prototype.setElement = function setElement(element) {\n this.$el = element;\n this.el = element[0];\n };\n\n BaseFlashPlayback.prototype.render = function render() {\n this.$el.attr('data', this.swfPath);\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 if (_browser2.default.isIE) {\n this.$('embed').remove();\n\n if (_browser2.default.isLegacyIE) this.$el.attr('classid', IE_CLASSID);\n }\n\n this.el.id = this.cid;\n\n return this;\n };\n\n (0, _createClass3.default)(BaseFlashPlayback, [{\n key: 'tagName',\n get: function get() {\n return 'object';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return '';\n }\n }, {\n key: 'wmode',\n get: function get() {\n return 'transparent';\n }\n }, {\n key: 'template',\n get: function get() {\n return (0, _template2.default)(_flash2.default);\n }\n }, {\n key: 'attributes',\n get: function get() {\n var type = 'application/x-shockwave-flash';\n\n if (_browser2.default.isLegacyIE) type = '';\n\n return {\n class: 'clappr-flash-playback',\n type: type,\n width: '100%',\n height: '100%',\n data: this.swfPath,\n 'data-flash-playback': this.name\n };\n }\n }]);\n return BaseFlashPlayback;\n}(_playback2.default);\n\nexports.default = BaseFlashPlayback;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/index.js\":\n/*!****************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/index.js ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = __webpack_require__(/*! ./base_flash_playback */ \"./src/playbacks/base_flash_playback/base_flash_playback.js\");\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/public/flash.html\":\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.html ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\\">\\n\\n\\n\\n\\n\\n\\\">\\n\\n&callback=<%= callbackName %>\\\">\\n\\\"\\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 data=\\\"<%= swfPath %>\\\"\\n src=\\\"<%= swfPath %>\\\"\\n width=\\\"100%\\\"\\n height=\\\"100%\\\">\\n\\n\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/base_flash_playback/public/flash.scss\":\n/*!*************************************************************!*\\\n !*** ./src/playbacks/base_flash_playback/public/flash.scss ***!\n \\*************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./flash.scss */ \"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/bruno/workspace/clappr/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"singleton\":true,\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/flash.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/flash.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _base_flash_playback = __webpack_require__(/*! ../../playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _Player = __webpack_require__(/*! ./public/Player.swf */ \"./src/playbacks/flash/public/Player.swf\");\n\nvar _Player2 = _interopRequireDefault(_Player);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MAX_ATTEMPTS = 60; // 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\nvar Flash = function (_BaseFlashPlayback) {\n (0, _inherits3.default)(Flash, _BaseFlashPlayback);\n (0, _createClass3.default)(Flash, [{\n key: 'name',\n get: function get() {\n return 'flash';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return (0, _template2.default)(_Player2.default)({ baseUrl: this._baseUrl });\n }\n\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: 'ended',\n get: function get() {\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\n }, {\n key: 'buffering',\n get: function get() {\n return !!this._bufferingState && this._currentState !== 'ENDED';\n }\n }]);\n\n function Flash() {\n (0, _classCallCheck3.default)(this, Flash);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\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 return _this;\n }\n\n Flash.prototype._bootstrap = function _bootstrap() {\n var _this2 = this;\n\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 (0, _clapprZepto2.default)('
').insertAfter(this.$el);\n if (this.getDuration() > 0) this._metadataLoaded();else _mediator2.default.once(this.uniqueId + ':timeupdate', this._metadataLoaded, this);\n } else {\n this._attempts = this._attempts || 0;\n if (++this._attempts <= MAX_ATTEMPTS) setTimeout(function () {\n return _this2._bootstrap();\n }, 50);else this.trigger(_events2.default.PLAYBACK_ERROR, { message: 'Max number of attempts reached' }, this.name);\n }\n };\n\n Flash.prototype._metadataLoaded = function _metadataLoaded() {\n this._isReadyState = true;\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n };\n\n Flash.prototype.getPlaybackType = function getPlaybackType() {\n return _playback2.default.VOD;\n };\n\n Flash.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n return false;\n };\n\n Flash.prototype._updateTime = function _updateTime() {\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: this.el.getPosition(), total: this.el.getDuration() }, this.name);\n };\n\n Flash.prototype._addListeners = function _addListeners() {\n _mediator2.default.on(this.uniqueId + ':progress', this._progress, this);\n _mediator2.default.on(this.uniqueId + ':timeupdate', this._updateTime, this);\n _mediator2.default.on(this.uniqueId + ':statechanged', this._checkState, this);\n _mediator2.default.on(this.uniqueId + ':flashready', this._bootstrap, this);\n };\n\n Flash.prototype.stopListening = function stopListening() {\n _BaseFlashPlayback.prototype.stopListening.call(this);\n _mediator2.default.off(this.uniqueId + ':progress');\n _mediator2.default.off(this.uniqueId + ':timeupdate');\n _mediator2.default.off(this.uniqueId + ':statechanged');\n _mediator2.default.off(this.uniqueId + ':flashready');\n };\n\n Flash.prototype._checkState = function _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(_events2.default.PLAYBACK_BUFFERING, this.name);\n this._currentState = 'PLAYING_BUFFERING';\n } else if (this.el.getState() === 'PLAYING') {\n this._bufferingState = false;\n this.trigger(_events2.default.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(_events2.default.PLAYBACK_ENDED, this.name);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.el.getDuration() }, this.name);\n this._currentState = 'ENDED';\n this._isIdle = true;\n }\n };\n\n Flash.prototype._progress = function _progress() {\n if (this._currentState !== 'IDLE' && this._currentState !== 'ENDED') {\n this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n start: 0,\n current: this.el.getBytesLoaded(),\n total: this.el.getBytesTotal()\n });\n }\n };\n\n Flash.prototype._firstPlay = function _firstPlay() {\n var _this3 = this;\n\n if (this.el.playerPlay) {\n this._isIdle = false;\n this.el.playerPlay(this._src);\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this3._checkInitialSeek();\n });\n this._currentState = 'PLAYING';\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_READY, this._firstPlay);\n }\n };\n\n Flash.prototype._checkInitialSeek = function _checkInitialSeek() {\n var seekTime = (0, _utils.seekStringToSeconds)(window.location.href);\n if (seekTime !== 0) this.seekSeconds(seekTime);\n };\n\n Flash.prototype.play = function play() {\n this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n if (this._currentState === 'PAUSED' || this._currentState === 'PLAYING_BUFFERING') {\n this._currentState = 'PLAYING';\n this.el.playerResume();\n this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n } else if (this._currentState !== 'PLAYING') {\n this._firstPlay();\n this.trigger(_events2.default.PLAYBACK_PLAY, this.name);\n }\n };\n\n Flash.prototype.volume = function volume(value) {\n var _this4 = this;\n\n if (this.isReady) this.el.playerVolume(value);else this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this4.volume(value);\n });\n };\n\n Flash.prototype.pause = function pause() {\n this._currentState = 'PAUSED';\n this.el.playerPause();\n this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n };\n\n Flash.prototype.stop = function stop() {\n this.el.playerStop();\n this.trigger(_events2.default.PLAYBACK_STOP);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n };\n\n Flash.prototype.isPlaying = function isPlaying() {\n return !!(this.isReady && this._currentState.indexOf('PLAYING') > -1);\n };\n\n Flash.prototype.getDuration = function getDuration() {\n return this.el.getDuration();\n };\n\n Flash.prototype.seekPercentage = function seekPercentage(percentage) {\n var _this5 = this;\n\n if (this.el.getDuration() > 0) {\n var seekSeconds = this.el.getDuration() * (percentage / 100);\n this.seek(seekSeconds);\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this5.seekPercentage(percentage);\n });\n }\n };\n\n Flash.prototype.seek = function seek(time) {\n var _this6 = this;\n\n if (this.isReady && this.el.playerSeek) {\n this.el.playerSeek(time);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: this.el.getDuration() }, this.name);\n if (this._currentState === 'PAUSED') this.el.playerPause();\n } else {\n this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this6.seek(time);\n });\n }\n };\n\n Flash.prototype.destroy = function destroy() {\n clearInterval(this.bootstrapId);\n _BaseFlashPlayback.prototype.stopListening.call(this);\n this.$el.remove();\n };\n\n (0, _createClass3.default)(Flash, [{\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }]);\n return Flash;\n}(_base_flash_playback2.default);\n\nexports.default = Flash;\n\n\nFlash.canPlay = function (resource) {\n if (!_browser2.default.hasFlash || !resource || resource.constructor !== String) {\n return false;\n } else {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return resourceParts.length > 1 && !_browser2.default.isMobile && resourceParts[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/);\n }\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/index.js\":\n/*!**************************************!*\\\n !*** ./src/playbacks/flash/index.js ***!\n \\**************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _flash = __webpack_require__(/*! ./flash */ \"./src/playbacks/flash/flash.js\");\n\nvar _flash2 = _interopRequireDefault(_flash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _flash2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flash/public/Player.swf\":\n/*!***********************************************!*\\\n !*** ./src/playbacks/flash/public/Player.swf ***!\n \\***********************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/flashls.js\":\n/*!******************************************!*\\\n !*** ./src/playbacks/flashls/flashls.js ***!\n \\******************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _base_flash_playback = __webpack_require__(/*! ../../playbacks/base_flash_playback */ \"./src/playbacks/base_flash_playback/index.js\");\n\nvar _base_flash_playback2 = _interopRequireDefault(_base_flash_playback);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _flashls_events = __webpack_require__(/*! ./flashls_events */ \"./src/playbacks/flashls/flashls_events.js\");\n\nvar _flashls_events2 = _interopRequireDefault(_flashls_events);\n\nvar _HLSPlayer = __webpack_require__(/*! ./public/HLSPlayer.swf */ \"./src/playbacks/flashls/public/HLSPlayer.swf\");\n\nvar _HLSPlayer2 = _interopRequireDefault(_HLSPlayer);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 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\nvar MAX_ATTEMPTS = 60;\nvar AUTO = -1;\n\nvar FlasHLS = function (_BaseFlashPlayback) {\n (0, _inherits3.default)(FlasHLS, _BaseFlashPlayback);\n (0, _createClass3.default)(FlasHLS, [{\n key: 'name',\n get: function get() {\n return 'flashls';\n }\n }, {\n key: 'swfPath',\n get: function get() {\n return (0, _template2.default)(_HLSPlayer2.default)({ baseUrl: this._baseUrl });\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels || [];\n }\n }, {\n key: 'currentLevel',\n get: function get() {\n if (this._currentLevel === null || this._currentLevel === undefined) return AUTO;else return this._currentLevel; //0 is a valid level ID\n },\n set: function set(id) {\n this._currentLevel = id;\n this.trigger(_events2.default.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\n }, {\n key: 'ended',\n get: function get() {\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\n }, {\n key: 'buffering',\n get: function get() {\n return !!this._bufferingState && !this._hasEnded;\n }\n }]);\n\n function FlasHLS() {\n (0, _classCallCheck3.default)(this, FlasHLS);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _BaseFlashPlayback.call.apply(_BaseFlashPlayback, [this].concat(args)));\n\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 = _clapprZepto2.default.extend({}, _this._defaultSettings);\n _this._playbackType = _playback2.default.LIVE;\n _this._hasEnded = false;\n _this._addListeners();\n return _this;\n }\n\n FlasHLS.prototype._initHlsParameters = function _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 FlasHLS.prototype._addListeners = function _addListeners() {\n var _this2 = this;\n\n _mediator2.default.on(this.cid + ':flashready', function () {\n return _this2._bootstrap();\n });\n _mediator2.default.on(this.cid + ':timeupdate', function (timeMetrics) {\n return _this2._updateTime(timeMetrics);\n });\n _mediator2.default.on(this.cid + ':playbackstate', function (state) {\n return _this2._setPlaybackState(state);\n });\n _mediator2.default.on(this.cid + ':levelchanged', function (level) {\n return _this2._levelChanged(level);\n });\n _mediator2.default.on(this.cid + ':error', function (code, url, message) {\n return _this2._flashPlaybackError(code, url, message);\n });\n _mediator2.default.on(this.cid + ':fragmentloaded', function (loadmetrics) {\n return _this2._onFragmentLoaded(loadmetrics);\n });\n _mediator2.default.on(this.cid + ':levelendlist', function (level) {\n return _this2._onLevelEndlist(level);\n });\n };\n\n FlasHLS.prototype.stopListening = function stopListening() {\n _BaseFlashPlayback.prototype.stopListening.call(this);\n _mediator2.default.off(this.cid + ':flashready');\n _mediator2.default.off(this.cid + ':timeupdate');\n _mediator2.default.off(this.cid + ':playbackstate');\n _mediator2.default.off(this.cid + ':levelchanged');\n _mediator2.default.off(this.cid + ':playbackerror');\n _mediator2.default.off(this.cid + ':fragmentloaded');\n _mediator2.default.off(this.cid + ':manifestloaded');\n _mediator2.default.off(this.cid + ':levelendlist');\n };\n\n FlasHLS.prototype._bootstrap = function _bootstrap() {\n var _this3 = this;\n\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) this.play();\n\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n } else {\n this._bootstrapAttempts = this._bootstrapAttempts || 0;\n if (++this._bootstrapAttempts <= MAX_ATTEMPTS) {\n setTimeout(function () {\n return _this3._bootstrap();\n }, 50);\n } else {\n var formattedError = this.createError({\n code: 'playerLoadFail_maxNumberAttemptsReached',\n description: this.name + ' error: Max number of attempts reached',\n level: _error2.default.Levels.FATAL,\n raw: {}\n });\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n }\n }\n };\n\n FlasHLS.prototype._setFlashSettings = function _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 FlasHLS.prototype.setAutoStartLoad = function setAutoStartLoad(autoStartLoad) {\n this._autoStartLoad = autoStartLoad;\n this.el.playerSetAutoStartLoad(this._autoStartLoad);\n };\n\n FlasHLS.prototype.setCapLevelToStage = function setCapLevelToStage(capLevelToStage) {\n this._capLevelToStage = capLevelToStage;\n this.el.playerSetCapLevelToStage(this._capLevelToStage);\n };\n\n FlasHLS.prototype.setMaxLevelCappingMode = function setMaxLevelCappingMode(maxLevelCappingMode) {\n this._maxLevelCappingMode = maxLevelCappingMode;\n this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode);\n };\n\n FlasHLS.prototype.setSetMinBufferLength = function setSetMinBufferLength(minBufferLength) {\n this._minBufferLength = minBufferLength;\n this.el.playerSetMinBufferLength(this._minBufferLength);\n };\n\n FlasHLS.prototype.setMinBufferLengthCapping = function setMinBufferLengthCapping(minBufferLengthCapping) {\n this._minBufferLengthCapping = minBufferLengthCapping;\n this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping);\n };\n\n FlasHLS.prototype.setMaxBufferLength = function setMaxBufferLength(maxBufferLength) {\n this._maxBufferLength = maxBufferLength;\n this.el.playerSetMaxBufferLength(this._maxBufferLength);\n };\n\n FlasHLS.prototype.setMaxBackBufferLength = function setMaxBackBufferLength(maxBackBufferLength) {\n this._maxBackBufferLength = maxBackBufferLength;\n this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength);\n };\n\n FlasHLS.prototype.setLowBufferLength = function setLowBufferLength(lowBufferLength) {\n this._lowBufferLength = lowBufferLength;\n this.el.playerSetLowBufferLength(this._lowBufferLength);\n };\n\n FlasHLS.prototype.setMediaTimePeriod = function setMediaTimePeriod(mediaTimePeriod) {\n this._mediaTimePeriod = mediaTimePeriod;\n this.el.playerSetMediaTimePeriod(this._mediaTimePeriod);\n };\n\n FlasHLS.prototype.setFpsDroppedMonitoringPeriod = function setFpsDroppedMonitoringPeriod(fpsDroppedMonitoringPeriod) {\n this._fpsDroppedMonitoringPeriod = fpsDroppedMonitoringPeriod;\n this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod);\n };\n\n FlasHLS.prototype.setFpsDroppedMonitoringThreshold = function setFpsDroppedMonitoringThreshold(fpsDroppedMonitoringThreshold) {\n this._fpsDroppedMonitoringThreshold = fpsDroppedMonitoringThreshold;\n this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold);\n };\n\n FlasHLS.prototype.setCapLevelonFPSDrop = function setCapLevelonFPSDrop(capLevelonFPSDrop) {\n this._capLevelonFPSDrop = capLevelonFPSDrop;\n this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop);\n };\n\n FlasHLS.prototype.setSmoothAutoSwitchonFPSDrop = function setSmoothAutoSwitchonFPSDrop(smoothAutoSwitchonFPSDrop) {\n this._smoothAutoSwitchonFPSDrop = smoothAutoSwitchonFPSDrop;\n this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop);\n };\n\n FlasHLS.prototype.setSwitchDownOnLevelError = function setSwitchDownOnLevelError(switchDownOnLevelError) {\n this._switchDownOnLevelError = switchDownOnLevelError;\n this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError);\n };\n\n FlasHLS.prototype.setSeekMode = function setSeekMode(seekMode) {\n this._seekMode = seekMode;\n this.el.playerSetSeekMode(this._seekMode);\n };\n\n FlasHLS.prototype.setKeyLoadMaxRetry = function setKeyLoadMaxRetry(keyLoadMaxRetry) {\n this._keyLoadMaxRetry = keyLoadMaxRetry;\n this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry);\n };\n\n FlasHLS.prototype.setKeyLoadMaxRetryTimeout = function setKeyLoadMaxRetryTimeout(keyLoadMaxRetryTimeout) {\n this._keyLoadMaxRetryTimeout = keyLoadMaxRetryTimeout;\n this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setFragmentLoadMaxRetry = function setFragmentLoadMaxRetry(fragmentLoadMaxRetry) {\n this._fragmentLoadMaxRetry = fragmentLoadMaxRetry;\n this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry);\n };\n\n FlasHLS.prototype.setFragmentLoadMaxRetryTimeout = function setFragmentLoadMaxRetryTimeout(fragmentLoadMaxRetryTimeout) {\n this._fragmentLoadMaxRetryTimeout = fragmentLoadMaxRetryTimeout;\n this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setFragmentLoadSkipAfterMaxRetry = function setFragmentLoadSkipAfterMaxRetry(fragmentLoadSkipAfterMaxRetry) {\n this._fragmentLoadSkipAfterMaxRetry = fragmentLoadSkipAfterMaxRetry;\n this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry);\n };\n\n FlasHLS.prototype.setMaxSkippedFragments = function setMaxSkippedFragments(maxSkippedFragments) {\n this._maxSkippedFragments = maxSkippedFragments;\n this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments);\n };\n\n FlasHLS.prototype.setFlushLiveURLCache = function setFlushLiveURLCache(flushLiveURLCache) {\n this._flushLiveURLCache = flushLiveURLCache;\n this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache);\n };\n\n FlasHLS.prototype.setInitialLiveManifestSize = function setInitialLiveManifestSize(initialLiveManifestSize) {\n this._initialLiveManifestSize = initialLiveManifestSize;\n this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize);\n };\n\n FlasHLS.prototype.setManifestLoadMaxRetry = function setManifestLoadMaxRetry(manifestLoadMaxRetry) {\n this._manifestLoadMaxRetry = manifestLoadMaxRetry;\n this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry);\n };\n\n FlasHLS.prototype.setManifestLoadMaxRetryTimeout = function setManifestLoadMaxRetryTimeout(manifestLoadMaxRetryTimeout) {\n this._manifestLoadMaxRetryTimeout = manifestLoadMaxRetryTimeout;\n this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout);\n };\n\n FlasHLS.prototype.setManifestRedundantLoadmaxRetry = function setManifestRedundantLoadmaxRetry(manifestRedundantLoadmaxRetry) {\n this._manifestRedundantLoadmaxRetry = manifestRedundantLoadmaxRetry;\n this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry);\n };\n\n FlasHLS.prototype.setStartFromBitrate = function setStartFromBitrate(startFromBitrate) {\n this._startFromBitrate = startFromBitrate;\n this.el.playerSetStartFromBitrate(this._startFromBitrate);\n };\n\n FlasHLS.prototype.setStartFromLevel = function setStartFromLevel(startFromLevel) {\n this._startFromLevel = startFromLevel;\n this.el.playerSetStartFromLevel(this._startFromLevel);\n };\n\n FlasHLS.prototype.setAutoStartMaxDuration = function setAutoStartMaxDuration(autoStartMaxDuration) {\n this._autoStartMaxDuration = autoStartMaxDuration;\n this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration);\n };\n\n FlasHLS.prototype.setSeekFromLevel = function setSeekFromLevel(seekFromLevel) {\n this._seekFromLevel = seekFromLevel;\n this.el.playerSetSeekFromLevel(this._seekFromLevel);\n };\n\n FlasHLS.prototype.setUseHardwareVideoDecoder = function setUseHardwareVideoDecoder(useHardwareVideoDecoder) {\n this._useHardwareVideoDecoder = useHardwareVideoDecoder;\n this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder);\n };\n\n FlasHLS.prototype.setSetLogInfo = function setSetLogInfo(hlsLogEnabled) {\n this._hlsLogEnabled = hlsLogEnabled;\n this.el.playerSetLogInfo(this._hlsLogEnabled);\n };\n\n FlasHLS.prototype.setLogDebug = function setLogDebug(logDebug) {\n this._logDebug = logDebug;\n this.el.playerSetLogDebug(this._logDebug);\n };\n\n FlasHLS.prototype.setLogDebug2 = function setLogDebug2(logDebug2) {\n this._logDebug2 = logDebug2;\n this.el.playerSetLogDebug2(this._logDebug2);\n };\n\n FlasHLS.prototype.setLogWarn = function setLogWarn(logWarn) {\n this._logWarn = logWarn;\n this.el.playerSetLogWarn(this._logWarn);\n };\n\n FlasHLS.prototype.setLogError = function setLogError(logError) {\n this._logError = logError;\n this.el.playerSetLogError(this._logError);\n };\n\n FlasHLS.prototype._levelChanged = function _levelChanged(level) {\n var currentLevel = this.el.getLevels()[level];\n if (currentLevel) {\n this.highDefinition = currentLevel.height >= 720 || currentLevel.bitrate / 1000 >= 2000;\n this.trigger(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n\n if (!this._levels || this._levels.length === 0) this._fillLevels();\n\n this.trigger(_events2.default.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(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n }\n };\n\n FlasHLS.prototype._updateTime = function _updateTime(timeMetrics) {\n if (this._currentState === 'IDLE') return;\n\n var duration = this._normalizeDuration(timeMetrics.duration);\n var position = Math.min(Math.max(timeMetrics.position, 0), duration);\n var previousDVRStatus = this._dvrEnabled;\n var livePlayback = this._playbackType === _playback2.default.LIVE;\n this._dvrEnabled = livePlayback && duration > this._hlsMinimumDvrSize;\n\n if (duration === 100 || livePlayback === undefined) return;\n\n if (this._dvrEnabled !== previousDVRStatus) {\n this._updateSettings();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE, this.name);\n }\n\n if (livePlayback && !this._dvrEnabled) position = duration;\n\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: position, total: duration }, this.name);\n };\n\n FlasHLS.prototype.play = function play() {\n this.trigger(_events2.default.PLAYBACK_PLAY_INTENT);\n if (this._currentState === 'PAUSED') this.el.playerResume();else if (!this._srcLoaded && this._currentState !== 'PLAYING') this._firstPlay();else this.el.playerPlay();\n };\n\n FlasHLS.prototype.getPlaybackType = function getPlaybackType() {\n return this._playbackType ? this._playbackType : null;\n };\n\n FlasHLS.prototype.getCurrentTime = function getCurrentTime() {\n return this.el.getPosition();\n };\n\n FlasHLS.prototype.getCurrentLevelIndex = function getCurrentLevelIndex() {\n return this._currentLevel;\n };\n\n FlasHLS.prototype.getCurrentLevel = function getCurrentLevel() {\n return this.levels[this.currentLevel];\n };\n\n FlasHLS.prototype.getCurrentBitrate = function getCurrentBitrate() {\n return this.levels[this.currentLevel].bitrate;\n };\n\n FlasHLS.prototype.setCurrentLevel = function setCurrentLevel(level) {\n this.currentLevel = level;\n };\n\n FlasHLS.prototype.isHighDefinitionInUse = function isHighDefinitionInUse() {\n return this.highDefinition;\n };\n\n FlasHLS.prototype.getLevels = function getLevels() {\n return this.levels;\n };\n\n FlasHLS.prototype._setPlaybackState = function _setPlaybackState(state) {\n if (['PLAYING_BUFFERING', 'PAUSED_BUFFERING'].indexOf(state) >= 0) {\n this._bufferingState = true;\n this.trigger(_events2.default.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(_events2.default.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(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: this.getDuration() }, this.name);\n this.trigger(_events2.default.PLAYBACK_ENDED, this.name);\n }\n }\n };\n\n FlasHLS.prototype._updateCurrentState = function _updateCurrentState(state) {\n this._currentState = state;\n if (state !== 'IDLE') this._hasEnded = false;\n\n this._updatePlaybackType();\n if (state === 'PLAYING') this.trigger(_events2.default.PLAYBACK_PLAY, this.name);else if (state === 'PAUSED') this.trigger(_events2.default.PLAYBACK_PAUSE, this.name);\n };\n\n FlasHLS.prototype._updatePlaybackType = function _updatePlaybackType() {\n this._playbackType = this.el.getType();\n if (this._playbackType) {\n this._playbackType = this._playbackType.toLowerCase();\n if (this._playbackType === _playback2.default.VOD) this._startReportingProgress();else this._stopReportingProgress();\n }\n this.trigger(_events2.default.PLAYBACK_PLAYBACKSTATE, { type: this._playbackType });\n };\n\n FlasHLS.prototype._startReportingProgress = function _startReportingProgress() {\n if (!this._reportingProgress) this._reportingProgress = true;\n };\n\n FlasHLS.prototype._stopReportingProgress = function _stopReportingProgress() {\n this._reportingProgress = false;\n };\n\n FlasHLS.prototype._onFragmentLoaded = function _onFragmentLoaded(loadmetrics) {\n this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, loadmetrics);\n if (this._reportingProgress && this.getCurrentTime()) {\n var buffered = this.getCurrentTime() + this.el.getbufferLength();\n this.trigger(_events2.default.PLAYBACK_PROGRESS, {\n start: this.getCurrentTime(),\n current: buffered,\n total: this.el.getDuration()\n });\n }\n };\n\n FlasHLS.prototype._onLevelEndlist = function _onLevelEndlist() {\n this._updatePlaybackType();\n };\n\n FlasHLS.prototype._firstPlay = function _firstPlay() {\n var _this4 = this;\n\n this._shouldPlayOnManifestLoaded = true;\n if (this.el.playerLoad) {\n _mediator2.default.once(this.cid + ':manifestloaded', function (duration, loadmetrics) {\n return _this4._manifestLoaded(duration, loadmetrics);\n });\n this._setFlashSettings(); //ensure flushLiveURLCache will work (#327)\n this.el.playerLoad(this._src);\n this._srcLoaded = true;\n }\n };\n\n FlasHLS.prototype.volume = function volume(value) {\n var _this5 = this;\n\n if (this.isReady) this.el.playerVolume(value);else this.listenToOnce(this, _events2.default.PLAYBACK_BUFFERFULL, function () {\n return _this5.volume(value);\n });\n };\n\n FlasHLS.prototype.pause = function pause() {\n if (this._playbackType !== _playback2.default.LIVE || this._dvrEnabled) {\n this.el.playerPause();\n if (this._playbackType === _playback2.default.LIVE && this._dvrEnabled) this._updateDvr(true);\n }\n };\n\n FlasHLS.prototype.stop = function stop() {\n this._srcLoaded = false;\n this.el.playerStop();\n this.trigger(_events2.default.PLAYBACK_STOP);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: 0, total: 0 }, this.name);\n };\n\n FlasHLS.prototype.isPlaying = function isPlaying() {\n if (this._currentState) return !!this._currentState.match(/playing/i);\n\n return false;\n };\n\n FlasHLS.prototype.getDuration = function getDuration() {\n return this._normalizeDuration(this.el.getDuration());\n };\n\n FlasHLS.prototype._normalizeDuration = function _normalizeDuration(duration) {\n if (this._playbackType === _playback2.default.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 FlasHLS.prototype.seekPercentage = function seekPercentage(percentage) {\n var duration = this.el.getDuration();\n var time = 0;\n if (percentage > 0) time = duration * percentage / 100;\n\n this.seek(time);\n };\n\n FlasHLS.prototype.seek = function seek(time) {\n var duration = this.getDuration();\n if (this._playbackType === _playback2.default.LIVE) {\n // seek operations to a time within 3 seconds from live stream will position playhead back to live\n var dvrInUse = duration - time > 3;\n this._updateDvr(dvrInUse);\n }\n this.el.playerSeek(time);\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, { current: time, total: duration }, this.name);\n };\n\n FlasHLS.prototype._updateDvr = function _updateDvr(dvrInUse) {\n var previousDvrInUse = !!this._dvrInUse;\n this._dvrInUse = dvrInUse;\n if (this._dvrInUse !== previousDvrInUse) {\n this._updateSettings();\n this.trigger(_events2.default.PLAYBACK_DVR, this._dvrInUse);\n this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': this._dvrInUse });\n }\n };\n\n FlasHLS.prototype._flashPlaybackError = function _flashPlaybackError(code, url, message) {\n var error = {\n code: code,\n description: message,\n level: _error2.default.Levels.FATAL,\n raw: { code: code, url: url, message: message }\n };\n var formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.trigger(_events2.default.PLAYBACK_STOP);\n };\n\n FlasHLS.prototype._manifestLoaded = function _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(_events2.default.PLAYBACK_LOADEDMETADATA, { duration: duration, data: loadmetrics });\n };\n\n FlasHLS.prototype._fillLevels = function _fillLevels() {\n var levels = this.el.getLevels();\n var levelsLength = levels.length;\n this._levels = [];\n\n for (var index = 0; index < levelsLength; index++) {\n this._levels.push({ id: index, label: levels[index].height + 'p', level: levels[index] });\n }this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n };\n\n FlasHLS.prototype.destroy = function destroy() {\n this.stopListening();\n this.$el.remove();\n };\n\n FlasHLS.prototype._updateSettings = function _updateSettings() {\n this.settings = _clapprZepto2.default.extend({}, this._defaultSettings);\n if (this._playbackType === _playback2.default.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 FlasHLS.prototype._createCallbacks = function _createCallbacks() {\n var _this6 = this;\n\n if (!window.Clappr) window.Clappr = {};\n\n if (!window.Clappr.flashlsCallbacks) window.Clappr.flashlsCallbacks = {};\n\n this.flashlsEvents = new _flashls_events2.default(this.cid);\n window.Clappr.flashlsCallbacks[this.cid] = function (eventName, args) {\n _this6.flashlsEvents[eventName].apply(_this6.flashlsEvents, args);\n };\n };\n\n FlasHLS.prototype.render = function render() {\n _BaseFlashPlayback.prototype.render.call(this);\n this._createCallbacks();\n return this;\n };\n\n (0, _createClass3.default)(FlasHLS, [{\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }, {\n key: 'dvrEnabled',\n get: function get() {\n return !!this._dvrEnabled;\n }\n }]);\n return FlasHLS;\n}(_base_flash_playback2.default);\n\nexports.default = FlasHLS;\n\n\nFlasHLS.canPlay = function (resource, mimeType) {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return _browser2.default.hasFlash && (resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || mimeType === 'application/x-mpegURL' || mimeType === 'application/vnd.apple.mpegurl');\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/flashls_events.js\":\n/*!*************************************************!*\\\n !*** ./src/playbacks/flashls/flashls_events.js ***!\n \\*************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _mediator = __webpack_require__(/*! ../../components/mediator */ \"./src/components/mediator.js\");\n\nvar _mediator2 = _interopRequireDefault(_mediator);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HLSEvents = function () {\n function HLSEvents(instanceId) {\n (0, _classCallCheck3.default)(this, HLSEvents);\n\n this.instanceId = instanceId;\n }\n\n HLSEvents.prototype.ready = function ready() {\n _mediator2.default.trigger(this.instanceId + ':flashready');\n };\n\n HLSEvents.prototype.videoSize = function videoSize(width, height) {\n _mediator2.default.trigger(this.instanceId + ':videosizechanged', width, height);\n };\n\n HLSEvents.prototype.complete = function complete() {\n _mediator2.default.trigger(this.instanceId + ':complete');\n };\n\n HLSEvents.prototype.error = function error(code, url, message) {\n _mediator2.default.trigger(this.instanceId + ':error', code, url, message);\n };\n\n HLSEvents.prototype.manifest = function manifest(duration, loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':manifestloaded', duration, loadmetrics);\n };\n\n HLSEvents.prototype.audioLevelLoaded = function audioLevelLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':audiolevelloaded', loadmetrics);\n };\n\n HLSEvents.prototype.levelLoaded = function levelLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':levelloaded', loadmetrics);\n };\n\n HLSEvents.prototype.levelEndlist = function levelEndlist(level) {\n _mediator2.default.trigger(this.instanceId + ':levelendlist', level);\n };\n\n HLSEvents.prototype.fragmentLoaded = function fragmentLoaded(loadmetrics) {\n _mediator2.default.trigger(this.instanceId + ':fragmentloaded', loadmetrics);\n };\n\n HLSEvents.prototype.fragmentPlaying = function fragmentPlaying(playmetrics) {\n _mediator2.default.trigger(this.instanceId + ':fragmentplaying', playmetrics);\n };\n\n HLSEvents.prototype.position = function position(timemetrics) {\n _mediator2.default.trigger(this.instanceId + ':timeupdate', timemetrics);\n };\n\n HLSEvents.prototype.state = function state(newState) {\n _mediator2.default.trigger(this.instanceId + ':playbackstate', newState);\n };\n\n HLSEvents.prototype.seekState = function seekState(newState) {\n _mediator2.default.trigger(this.instanceId + ':seekstate', newState);\n };\n\n HLSEvents.prototype.switch = function _switch(newLevel) {\n _mediator2.default.trigger(this.instanceId + ':levelchanged', newLevel);\n };\n\n HLSEvents.prototype.audioTracksListChange = function audioTracksListChange(trackList) {\n _mediator2.default.trigger(this.instanceId + ':audiotracklistchanged', trackList);\n };\n\n HLSEvents.prototype.audioTrackChange = function audioTrackChange(trackId) {\n _mediator2.default.trigger(this.instanceId + ':audiotrackchanged', trackId);\n };\n\n return HLSEvents;\n}();\n\nexports.default = HLSEvents;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/index.js\":\n/*!****************************************!*\\\n !*** ./src/playbacks/flashls/index.js ***!\n \\****************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _flashls = __webpack_require__(/*! ./flashls */ \"./src/playbacks/flashls/flashls.js\");\n\nvar _flashls2 = _interopRequireDefault(_flashls);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _flashls2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/flashls/public/HLSPlayer.swf\":\n/*!****************************************************!*\\\n !*** ./src/playbacks/flashls/public/HLSPlayer.swf ***!\n \\****************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nmodule.exports = \"<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf\";\n\n/***/ }),\n\n/***/ \"./src/playbacks/hls/hls.js\":\n/*!**********************************!*\\\n !*** ./src/playbacks/hls/hls.js ***!\n \\**********************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"./node_modules/babel-runtime/helpers/toConsumableArray.js\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ \"./node_modules/babel-runtime/core-js/json/stringify.js\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"./node_modules/babel-runtime/helpers/extends.js\");\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _html5_video = __webpack_require__(/*! ../../playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nvar _hls = __webpack_require__(/*! hls.js */ \"./node_modules/hls.js/dist/hls.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _log = __webpack_require__(/*! ../../plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AUTO = -1; // 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\nvar HLS = function (_HTML5VideoPlayback) {\n (0, _inherits3.default)(HLS, _HTML5VideoPlayback);\n (0, _createClass3.default)(HLS, [{\n key: 'name',\n get: function get() {\n return 'hls';\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels || [];\n }\n }, {\n key: 'currentLevel',\n get: function get() {\n if (this._currentLevel === null || this._currentLevel === undefined) return AUTO;else return this._currentLevel; //0 is a valid level ID\n },\n set: function set(id) {\n this._currentLevel = id;\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_START);\n if (this.options.playback.hlsUseNextLevel) this._hls.nextLevel = this._currentLevel;else this._hls.currentLevel = this._currentLevel;\n }\n }, {\n key: 'isReady',\n get: function get() {\n return this._isReadyState;\n }\n }, {\n key: '_startTime',\n get: function get() {\n if (this._playbackType === _playback2.default.LIVE && this._playlistType !== 'EVENT') return this._extrapolatedStartTime;\n\n return this._playableRegionStartTime;\n }\n }, {\n key: '_now',\n get: function get() {\n return (0, _utils.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\n }, {\n key: '_extrapolatedStartTime',\n get: function get() {\n if (!this._localStartTimeCorrelation) return this._playableRegionStartTime;\n\n var corr = this._localStartTimeCorrelation;\n var timePassed = this._now - corr.local;\n var 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\n }, {\n key: '_extrapolatedEndTime',\n get: function get() {\n var actualEndTime = this._playableRegionStartTime + this._playableRegionDuration;\n if (!this._localEndTimeCorrelation) return actualEndTime;\n\n var corr = this._localEndTimeCorrelation;\n var timePassed = this._now - corr.local;\n var extrapolatedEndTime = (corr.remote + timePassed) / 1000;\n return Math.max(actualEndTime - this._extrapolatedWindowDuration, Math.min(extrapolatedEndTime, actualEndTime));\n }\n }, {\n key: '_duration',\n get: function get() {\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\n }, {\n key: '_extrapolatedWindowDuration',\n get: function get() {\n if (this._segmentTargetDuration === null) return 0;\n\n return this._extrapolatedWindowNumSegments * this._segmentTargetDuration;\n }\n }], [{\n key: 'HLSJS',\n get: function get() {\n return _hls2.default;\n }\n }]);\n\n function HLS() {\n (0, _classCallCheck3.default)(this, HLS);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // backwards compatibility (TODO: remove on 0.3.0)\n var _this = (0, _possibleConstructorReturn3.default)(this, _HTML5VideoPlayback.call.apply(_HTML5VideoPlayback, [this].concat(args)));\n\n _this.options.playback = (0, _extends3.default)({}, _this.options, _this.options.playback);\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 = _playback2.default.VOD;\n _this._lastTimeUpdate = { current: 0, total: 0 };\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 // #EXT-X-PROGRAM-DATE-TIME\n _this._programDateTime = 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 return _this;\n }\n\n HLS.prototype._setup = function _setup() {\n var _this2 = this;\n\n this._ccIsSetup = false;\n this._ccTracksUpdated = false;\n this._hls = new _hls2.default((0, _utils.assign)({}, this.options.playback.hlsjsConfig));\n this._hls.on(_hls2.default.Events.MEDIA_ATTACHED, function () {\n return _this2._hls.loadSource(_this2.options.src);\n });\n this._hls.on(_hls2.default.Events.LEVEL_LOADED, function (evt, data) {\n return _this2._updatePlaybackType(evt, data);\n });\n this._hls.on(_hls2.default.Events.LEVEL_UPDATED, function (evt, data) {\n return _this2._onLevelUpdated(evt, data);\n });\n this._hls.on(_hls2.default.Events.LEVEL_SWITCHING, function (evt, data) {\n return _this2._onLevelSwitch(evt, data);\n });\n this._hls.on(_hls2.default.Events.FRAG_LOADED, function (evt, data) {\n return _this2._onFragmentLoaded(evt, data);\n });\n this._hls.on(_hls2.default.Events.ERROR, function (evt, data) {\n return _this2._onHLSJSError(evt, data);\n });\n this._hls.on(_hls2.default.Events.SUBTITLE_TRACK_LOADED, function (evt, data) {\n return _this2._onSubtitleLoaded(evt, data);\n });\n this._hls.on(_hls2.default.Events.SUBTITLE_TRACKS_UPDATED, function () {\n return _this2._ccTracksUpdated = true;\n });\n this._hls.attachMedia(this.el);\n };\n\n HLS.prototype.render = function render() {\n this._ready();\n return _HTML5VideoPlayback.prototype.render.call(this);\n };\n\n HLS.prototype._ready = function _ready() {\n this._isReadyState = true;\n this.trigger(_events2.default.PLAYBACK_READY, this.name);\n };\n\n HLS.prototype._recover = function _recover(evt, data, error) {\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 _log2.default.error('hlsjs: failed to recover', { evt: evt, data: data });\n error.level = _error2.default.Levels.FATAL;\n var formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n }\n };\n\n // override\n\n\n HLS.prototype._setupSrc = function _setupSrc(srcUrl) {// eslint-disable-line no-unused-vars\n // this playback manages the src on the video element itself\n };\n\n HLS.prototype._startTimeUpdateTimer = function _startTimeUpdateTimer() {\n var _this3 = this;\n\n if (this._timeUpdateTimer) return;\n\n this._timeUpdateTimer = setInterval(function () {\n _this3._onDurationChange();\n _this3._onTimeUpdate();\n }, 100);\n };\n\n HLS.prototype._stopTimeUpdateTimer = function _stopTimeUpdateTimer() {\n if (!this._timeUpdateTimer) return;\n\n clearInterval(this._timeUpdateTimer);\n this._timeUpdateTimer = null;\n };\n\n HLS.prototype.getProgramDateTime = function getProgramDateTime() {\n return this._programDateTime;\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\n\n HLS.prototype.getDuration = function getDuration() {\n return this._duration;\n };\n\n HLS.prototype.getCurrentTime = function 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\n\n HLS.prototype.getStartTimeOffset = function getStartTimeOffset() {\n return this._startTime;\n };\n\n HLS.prototype.seekPercentage = function seekPercentage(percentage) {\n var seekTo = this._duration;\n if (percentage > 0) seekTo = this._duration * (percentage / 100);\n\n this.seek(seekTo);\n };\n\n HLS.prototype.seek = function seek(time) {\n if (time < 0) {\n _log2.default.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 _HTML5VideoPlayback.prototype.seek.call(this, time);\n };\n\n HLS.prototype.seekToLivePoint = function seekToLivePoint() {\n this.seek(this.getDuration());\n };\n\n HLS.prototype._updateDvr = function _updateDvr(status) {\n this.trigger(_events2.default.PLAYBACK_DVR, status);\n this.trigger(_events2.default.PLAYBACK_STATS_ADD, { 'dvr': status });\n };\n\n HLS.prototype._updateSettings = function _updateSettings() {\n 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'];\n\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n };\n\n HLS.prototype._onHLSJSError = function _onHLSJSError(evt, data) {\n var error = {\n code: data.type + '_' + data.details,\n description: this.name + ' error: type: ' + data.type + ', details: ' + data.details,\n raw: data\n };\n var formattedError = void 0;\n if (data.response) error.description += ', response: ' + (0, _stringify2.default)(data.response);\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 _hls2.default.ErrorTypes.NETWORK_ERROR:\n switch (data.details) {\n // The following network errors cannot be recovered with HLS.startLoad()\n // For more details, see https://github.com/video-dev/hls.js/blob/master/doc/design.md#error-detection-and-handling\n // For \"level load\" fatal errors, see https://github.com/video-dev/hls.js/issues/1138\n case _hls2.default.ErrorDetails.MANIFEST_LOAD_ERROR:\n case _hls2.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:\n case _hls2.default.ErrorDetails.MANIFEST_PARSING_ERROR:\n case _hls2.default.ErrorDetails.LEVEL_LOAD_ERROR:\n case _hls2.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:\n _log2.default.error('hlsjs: unrecoverable network fatal error.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n break;\n default:\n _log2.default.warn('hlsjs: trying to recover from network error.', { evt: evt, data: data });\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n this._hls.startLoad();\n break;\n }\n break;\n case _hls2.default.ErrorTypes.MEDIA_ERROR:\n _log2.default.warn('hlsjs: trying to recover from media error.', { evt: evt, data: data });\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n this._recover(evt, data, error);\n break;\n default:\n _log2.default.error('hlsjs: could not recover from error.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n break;\n }\n } else {\n _log2.default.error('hlsjs: could not recover from error after maximum number of attempts.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n }\n } else {\n // Transforms HLSJS.ErrorDetails.KEY_LOAD_ERROR non-fatal error to\n // playback fatal error if triggerFatalErrorOnResourceDenied playback\n // option is set. HLSJS.ErrorTypes.KEY_SYSTEM_ERROR are fatal errors\n // and therefore already handled.\n if (this.options.playback.triggerFatalErrorOnResourceDenied && this._keyIsDenied(data)) {\n _log2.default.error('hlsjs: could not load decrypt key.', { evt: evt, data: data });\n formattedError = this.createError(error);\n this.trigger(_events2.default.PLAYBACK_ERROR, formattedError);\n this.stop();\n return;\n }\n\n error.level = _error2.default.Levels.WARN;\n this.createError(error);\n _log2.default.warn('hlsjs: non-fatal error occurred', { evt: evt, data: data });\n }\n };\n\n HLS.prototype._keyIsDenied = function _keyIsDenied(data) {\n return data.type === _hls2.default.ErrorTypes.NETWORK_ERROR && data.details === _hls2.default.ErrorDetails.KEY_LOAD_ERROR && data.response && data.response.code >= 400;\n };\n\n HLS.prototype._onTimeUpdate = function _onTimeUpdate() {\n var update = { current: this.getCurrentTime(), total: this.getDuration(), firstFragDateTime: this.getProgramDateTime() };\n var isSame = this._lastTimeUpdate && update.current === this._lastTimeUpdate.current && update.total === this._lastTimeUpdate.total;\n if (isSame) return;\n\n this._lastTimeUpdate = update;\n this.trigger(_events2.default.PLAYBACK_TIMEUPDATE, update, this.name);\n };\n\n HLS.prototype._onDurationChange = function _onDurationChange() {\n var duration = this.getDuration();\n if (this._lastDuration === duration) return;\n\n this._lastDuration = duration;\n _HTML5VideoPlayback.prototype._onDurationChange.call(this);\n };\n\n HLS.prototype._onProgress = function _onProgress() {\n if (!this.el.buffered.length) return;\n\n var buffered = [];\n var bufferedPos = 0;\n for (var i = 0; i < this.el.buffered.length; i++) {\n buffered = [].concat((0, _toConsumableArray3.default)(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) bufferedPos = i;\n }\n var progress = {\n start: buffered[bufferedPos].start,\n current: buffered[bufferedPos].end,\n total: this.getDuration()\n };\n this.trigger(_events2.default.PLAYBACK_PROGRESS, progress, buffered);\n };\n\n HLS.prototype.play = function play() {\n if (!this._hls) this._setup();\n\n _HTML5VideoPlayback.prototype.play.call(this);\n this._startTimeUpdateTimer();\n };\n\n HLS.prototype.pause = function pause() {\n if (!this._hls) return;\n\n _HTML5VideoPlayback.prototype.pause.call(this);\n if (this.dvrEnabled) this._updateDvr(true);\n };\n\n HLS.prototype.stop = function stop() {\n this._stopTimeUpdateTimer();\n if (this._hls) {\n _HTML5VideoPlayback.prototype.stop.call(this);\n this._hls.destroy();\n delete this._hls;\n }\n };\n\n HLS.prototype.destroy = function destroy() {\n this._stopTimeUpdateTimer();\n if (this._hls) {\n this._hls.destroy();\n delete this._hls;\n }\n _HTML5VideoPlayback.prototype.destroy.call(this);\n };\n\n HLS.prototype._updatePlaybackType = function _updatePlaybackType(evt, data) {\n this._playbackType = data.details.live ? _playback2.default.LIVE : _playback2.default.VOD;\n this._onLevelUpdated(evt, data);\n\n // Live stream subtitle tracks detection hack (may not immediately available)\n if (this._ccTracksUpdated && this._playbackType === _playback2.default.LIVE && this.hasClosedCaptionsTracks) this._onSubtitleLoaded();\n };\n\n HLS.prototype._fillLevels = function _fillLevels() {\n this._levels = this._hls.levels.map(function (level, index) {\n return { id: index, level: level, label: level.bitrate / 1000 + 'Kbps' };\n });\n this.trigger(_events2.default.PLAYBACK_LEVELS_AVAILABLE, this._levels);\n };\n\n HLS.prototype._onLevelUpdated = function _onLevelUpdated(evt, data) {\n this._segmentTargetDuration = data.details.targetduration;\n this._playlistType = data.details.type || null;\n\n var startTimeChanged = false;\n var durationChanged = false;\n var fragments = data.details.fragments;\n var previousPlayableRegionStartTime = this._playableRegionStartTime;\n var previousPlayableRegionDuration = this._playableRegionDuration;\n\n if (fragments.length === 0) return;\n\n // #EXT-X-PROGRAM-DATE-TIME\n if (fragments[0].rawProgramDateTime) this._programDateTime = fragments[0].rawProgramDateTime;\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 } else {\n // check if the correlation still works\n var corr = this._localStartTimeCorrelation;\n var timePassed = this._now - corr.local;\n // this should point to a time within the extrapolation window\n var 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 } 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 var 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 === _playback2.default.LIVE) {\n var fragmentTargetDuration = data.details.targetduration;\n var hlsjsConfig = this.options.playback.hlsjsConfig || {};\n var liveSyncDurationCount = hlsjsConfig.liveSyncDurationCount || _hls2.default.DefaultConfig.liveSyncDurationCount;\n var hiddenAreaDuration = fragmentTargetDuration * liveSyncDurationCount;\n if (hiddenAreaDuration <= newDuration) {\n newDuration -= hiddenAreaDuration;\n this._durationExcludesAfterLiveSyncPoint = true;\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 var endTime = fragments[0].start + newDuration;\n var previousEndTime = previousPlayableRegionStartTime + previousPlayableRegionDuration;\n var 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 } else {\n // check if the correlation still works\n var _corr = this._localEndTimeCorrelation;\n var _timePassed = this._now - _corr.local;\n // this should point to a time within the extrapolation window from the end\n var extrapolatedEndTime = (_corr.remote + _timePassed) / 1000;\n if (extrapolatedEndTime > endTime) {\n this._localEndTimeCorrelation = {\n local: this._now,\n remote: endTime * 1000\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 } 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 HLS.prototype._onFragmentLoaded = function _onFragmentLoaded(evt, data) {\n this.trigger(_events2.default.PLAYBACK_FRAGMENT_LOADED, data);\n };\n\n HLS.prototype._onSubtitleLoaded = function _onSubtitleLoaded() {\n // This event may be triggered multiple times\n // Setup CC only once (disable CC by default)\n if (!this._ccIsSetup) {\n this.trigger(_events2.default.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this._playbackType === _playback2.default.LIVE ? -1 : this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n this._ccIsSetup = true;\n }\n };\n\n HLS.prototype._onLevelSwitch = function _onLevelSwitch(evt, data) {\n if (!this.levels.length) this._fillLevels();\n\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH_END);\n this.trigger(_events2.default.PLAYBACK_LEVEL_SWITCH, data);\n var 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(_events2.default.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n this.trigger(_events2.default.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 HLS.prototype.getPlaybackType = function getPlaybackType() {\n return this._playbackType;\n };\n\n HLS.prototype.isSeekEnabled = function isSeekEnabled() {\n return this._playbackType === _playback2.default.VOD || this.dvrEnabled;\n };\n\n (0, _createClass3.default)(HLS, [{\n key: 'dvrEnabled',\n get: function get() {\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() === _playback2.default.LIVE;\n }\n }]);\n return HLS;\n}(_html5_video2.default);\n\nexports.default = HLS;\n\n\nHLS.canPlay = function (resource, mimeType) {\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n var isHls = resourceParts.length > 1 && resourceParts[1].toLowerCase() === 'm3u8' || (0, _utils.listContainsIgnoreCase)(mimeType, ['application/vnd.apple.mpegurl', 'application/x-mpegURL']);\n\n return !!(_hls2.default.isSupported() && isHls);\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/hls/index.js\":\n/*!************************************!*\\\n !*** ./src/playbacks/hls/index.js ***!\n \\************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _hls = __webpack_require__(/*! ./hls */ \"./src/playbacks/hls/hls.js\");\n\nvar _hls2 = _interopRequireDefault(_hls);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _hls2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_audio/html5_audio.js\":\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_audio/html5_audio.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _html5_video = __webpack_require__(/*! ../../playbacks/html5_video */ \"./src/playbacks/html5_video/index.js\");\n\nvar _html5_video2 = _interopRequireDefault(_html5_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// TODO: remove this playback and change HTML5Video to HTML5Playback (breaking change, only after 0.3.0)\nvar HTML5Audio = function (_HTML5Video) {\n (0, _inherits3.default)(HTML5Audio, _HTML5Video);\n\n function HTML5Audio() {\n (0, _classCallCheck3.default)(this, HTML5Audio);\n return (0, _possibleConstructorReturn3.default)(this, _HTML5Video.apply(this, arguments));\n }\n\n HTML5Audio.prototype.updateSettings = function updateSettings() {\n this.settings.left = ['playpause', 'position', 'duration'];\n this.settings.seekEnabled = this.isSeekEnabled();\n this.trigger(_events2.default.PLAYBACK_SETTINGSUPDATE);\n };\n\n HTML5Audio.prototype.getPlaybackType = function getPlaybackType() {\n return _playback2.default.AOD;\n };\n\n (0, _createClass3.default)(HTML5Audio, [{\n key: 'name',\n get: function get() {\n return 'html5_audio';\n }\n }, {\n key: 'tagName',\n get: function get() {\n return 'audio';\n }\n }, {\n key: 'isAudioOnly',\n get: function get() {\n return true;\n }\n }]);\n return HTML5Audio;\n}(_html5_video2.default); // 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\nexports.default = HTML5Audio;\n\n\nHTML5Audio.canPlay = function (resourceUrl, mimeType) {\n var 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 _html5_video2.default._canPlay('audio', mimetypes, resourceUrl, mimeType);\n};\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_audio/index.js\":\n/*!********************************************!*\\\n !*** ./src/playbacks/html5_audio/index.js ***!\n \\********************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _html5_audio = __webpack_require__(/*! ./html5_audio */ \"./src/playbacks/html5_audio/html5_audio.js\");\n\nvar _html5_audio2 = _interopRequireDefault(_html5_audio);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _html5_audio2.default;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"./src/playbacks/html5_video/html5_video.js\":\n/*!**************************************************!*\\\n !*** ./src/playbacks/html5_video/html5_video.js ***!\n \\**************************************************/\n/*! no static exports found */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _from = __webpack_require__(/*! babel-runtime/core-js/array/from */ \"./node_modules/babel-runtime/core-js/array/from.js\");\n\nvar _from2 = _interopRequireDefault(_from);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"./node_modules/babel-runtime/helpers/classCallCheck.js\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ \"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js\");\n\nvar _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"./node_modules/babel-runtime/helpers/createClass.js\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ \"./node_modules/babel-runtime/helpers/inherits.js\");\n\nvar _inherits3 = _interopRequireDefault(_inherits2);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"./node_modules/babel-runtime/helpers/toConsumableArray.js\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _keys = __webpack_require__(/*! babel-runtime/core-js/object/keys */ \"./node_modules/babel-runtime/core-js/object/keys.js\");\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _utils = __webpack_require__(/*! ../../base/utils */ \"./src/base/utils.js\");\n\nvar _playback = __webpack_require__(/*! ../../base/playback */ \"./src/base/playback.js\");\n\nvar _playback2 = _interopRequireDefault(_playback);\n\nvar _browser = __webpack_require__(/*! ../../components/browser */ \"./src/components/browser/index.js\");\n\nvar _browser2 = _interopRequireDefault(_browser);\n\nvar _error = __webpack_require__(/*! ../../components/error */ \"./src/components/error/index.js\");\n\nvar _error2 = _interopRequireDefault(_error);\n\nvar _events = __webpack_require__(/*! ../../base/events */ \"./src/base/events.js\");\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _log = __webpack_require__(/*! ../../plugins/log */ \"./src/plugins/log/index.js\");\n\nvar _log2 = _interopRequireDefault(_log);\n\nvar _clapprZepto = __webpack_require__(/*! clappr-zepto */ \"./node_modules/clappr-zepto/zepto.js\");\n\nvar _clapprZepto2 = _interopRequireDefault(_clapprZepto);\n\nvar _template = __webpack_require__(/*! ../../base/template */ \"./src/base/template.js\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _tracks = __webpack_require__(/*! ./public/tracks.html */ \"./src/playbacks/html5_video/public/tracks.html\");\n\nvar _tracks2 = _interopRequireDefault(_tracks);\n\n__webpack_require__(/*! ./public/style.scss */ \"./src/playbacks/html5_video/public/style.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 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\nvar MIMETYPES = {\n 'mp4': ['avc1.42E01E', 'avc1.58A01E', 'avc1.4D401E', 'avc1.64001E', 'mp4v.20.8', 'mp4v.20.240', 'mp4a.40.2'].map(function (codec) {\n return 'video/mp4; codecs=\"' + codec + ', mp4a.40.2\"';\n }),\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\nvar 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\nvar KNOWN_AUDIO_MIMETYPES = (0, _keys2.default)(AUDIO_MIMETYPES).reduce(function (acc, k) {\n return [].concat((0, _toConsumableArray3.default)(acc), (0, _toConsumableArray3.default)(AUDIO_MIMETYPES[k]));\n}, []);\n\nvar UNKNOWN_ERROR = { code: 'unknown', message: 'unknown'\n\n // TODO: rename this Playback to HTML5Playback (breaking change, only after 0.3.0)\n};\nvar HTML5Video = function (_Playback) {\n (0, _inherits3.default)(HTML5Video, _Playback);\n (0, _createClass3.default)(HTML5Video, [{\n key: 'name',\n get: function get() {\n return 'html5_video';\n }\n }, {\n key: 'tagName',\n get: function get() {\n return this.isAudioOnly ? 'audio' : 'video';\n }\n }, {\n key: 'isAudioOnly',\n get: function get() {\n var resourceUrl = this.options.src;\n var 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 key: 'attributes',\n get: function get() {\n return {\n 'data-html5-video': ''\n };\n }\n }, {\n key: 'events',\n get: function get() {\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 'seeking': '_onSeeking',\n 'seeked': '_onSeeked',\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\n }, {\n key: 'ended',\n get: function get() {\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\n }, {\n key: 'buffering',\n get: function get() {\n return this._isBuffering;\n }\n }]);\n\n function HTML5Video() {\n (0, _classCallCheck3.default)(this, HTML5Video);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = (0, _possibleConstructorReturn3.default)(this, _Playback.call.apply(_Playback, [this].concat(args)));\n\n _this._destroyed = false;\n _this._loadStarted = false;\n _this._isBuffering = false;\n _this._playheadMoving = false;\n _this._playheadMovingTimer = null;\n _this._stopped = false;\n _this._ccTrackId = -1;\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 var playbackConfig = _this.options.playback;\n var preload = playbackConfig.preload || (_browser2.default.isSafari ? 'auto' : _this.options.preload);\n\n var posterUrl = void 0; // FIXME: poster plugin should always convert poster to object with expected properties ?\n if (_this.options.poster) {\n if (typeof _this.options.poster === 'string') posterUrl = _this.options.poster;else if (typeof _this.options.poster.url === 'string') posterUrl = _this.options.poster.url;\n }\n\n _clapprZepto2.default.extend(_this.el, {\n muted: _this.options.mute,\n defaultMuted: _this.options.mute,\n loop: _this.options.loop,\n poster: posterUrl,\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 playbackConfig.playInline && _this.$el.attr({ playsinline: 'playsinline' });\n playbackConfig.crossOrigin && _this.$el.attr({ crossorigin: playbackConfig.crossOrigin });\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 playbackConfig.externalTracks && _this._setupExternalTracks(playbackConfig.externalTracks);\n\n _this.options.autoPlay && _this.attemptAutoPlay();\n return _this;\n }\n\n HTML5Video.prototype.configure = function configure(options) {\n _Playback.prototype.configure.call(this, options);\n this.el.loop = !!options.loop;\n };\n\n // See Playback.attemptAutoPlay()\n\n\n HTML5Video.prototype.attemptAutoPlay = function attemptAutoPlay() {\n var _this2 = this;\n\n this.canAutoPlay(function (result, error) {\n error && _log2.default.warn(_this2.name, 'autoplay error.', { result: result, error: error });\n\n // https://github.com/clappr/clappr/issues/1076\n result && process.nextTick(function () {\n return !_this2._destroyed && _this2.play();\n });\n });\n };\n\n // See Playback.canAutoPlay()\n\n\n HTML5Video.prototype.canAutoPlay = function canAutoPlay(cb) {\n if (this.options.disableCanAutoPlay) cb(true, null);\n\n var opts = {\n timeout: this.options.autoPlayTimeout || 500,\n inline: this.options.playback.playInline || false,\n muted: this.options.mute || false // Known issue: mediacontrols may asynchronously mute video\n\n\n // Use current video element if recycling feature enabled with mobile devices\n };if (_browser2.default.isMobile && _utils.DomRecycler.options.recycleVideo) opts.element = this.el;\n\n // Desktop browser autoplay policy may require user action\n // Mobile browser autoplay require user consent and video recycling feature enabled\n // It may returns a false positive with source-less player consent\n (0, _utils.canAutoPlayMedia)(cb, opts);\n };\n\n HTML5Video.prototype._setupExternalTracks = function _setupExternalTracks(tracks) {\n this._externalTracks = tracks.map(function (track) {\n return {\n kind: track.kind || 'subtitles', // Default is 'subtitles'\n label: track.label,\n lang: track.lang,\n src: track.src\n };\n });\n };\n\n /**\n * Sets the source url on the