diff --git a/dashboard-ui/addplugin.html b/dashboard-ui/addplugin.html index bbcefe4556..4125e80758 100644 --- a/dashboard-ui/addplugin.html +++ b/dashboard-ui/addplugin.html @@ -83,7 +83,7 @@ - + diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index 0a72e4c328..7aa03d96c4 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.25", - "_release": "1.0.25", + "version": "1.0.26", + "_release": "1.0.26", "_resolution": { "type": "version", - "tag": "1.0.25", - "commit": "f2e83b0e30527b5182ceb043d170ad7188368245" + "tag": "1.0.26", + "commit": "6fe8727397b13e87e3afaeee600f600269e0ee18" }, "_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "~1.0.3", diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index efa177a53b..a9ee9c627b 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -420,6 +420,7 @@ saveUserInfoIntoCredentials(server, result.User); credentialProvider.credentials(credentials); + apiClient.serverInfo(server); afterConnected(apiClient, options); onLocalUserSignIn(server, server.LastConnectionMode, result.User); @@ -748,44 +749,38 @@ console.log('Begin getConnectServers'); - return new Promise(function (resolve, reject) { + if (!credentials.ConnectAccessToken || !credentials.ConnectUserId) { + return Promise.resolve([]); + } - if (!credentials.ConnectAccessToken || !credentials.ConnectUserId) { - resolve([]); - return; + var url = "https://connect.emby.media/service/servers?userId=" + credentials.ConnectUserId; + + return ajax({ + type: "GET", + url: url, + dataType: "json", + headers: { + "X-Application": appName + "/" + appVersion, + "X-Connect-UserToken": credentials.ConnectAccessToken } - var url = "https://connect.emby.media/service/servers?userId=" + credentials.ConnectUserId; - - ajax({ - type: "GET", - url: url, - dataType: "json", - headers: { - "X-Application": appName + "/" + appVersion, - "X-Connect-UserToken": credentials.ConnectAccessToken - } - - }).then(function (servers) { - - servers = servers.map(function (i) { - return { - ExchangeToken: i.AccessKey, - ConnectServerId: i.Id, - Id: i.SystemId, - Name: i.Name, - RemoteAddress: i.Url, - LocalAddress: i.LocalAddress, - UserLinkType: (i.UserType || '').toLowerCase() == "guest" ? "Guest" : "LinkedUser" - }; - }); - - resolve(servers); - - }, function () { - resolve([]); + }).then(function (servers) { + return servers.map(function (i) { + return { + ExchangeToken: i.AccessKey, + ConnectServerId: i.Id, + Id: i.SystemId, + Name: i.Name, + RemoteAddress: i.Url, + LocalAddress: i.LocalAddress, + UserLinkType: (i.UserType || '').toLowerCase() == "guest" ? "Guest" : "LinkedUser" + }; }); + + }, function () { + return []; + }); } @@ -858,9 +853,8 @@ var info = { Id: foundServer.Id, - LocalAddress: foundServer.Address, + LocalAddress: convertEndpointAddressToManualAddress(foundServer) || foundServer.Address, Name: foundServer.Name, - ManualAddress: convertEndpointAddressToManualAddress(foundServer), DateLastLocalConnection: new Date().getTime() }; @@ -1467,13 +1461,10 @@ self.getRegistrationInfo = function (feature, apiClient) { if (isConnectUserSupporter()) { - return new Promise(function (resolve, reject) { - - resolve({ - Name: feature, - IsRegistered: true, - IsTrial: false - }); + return Promise.resolve({ + Name: feature, + IsRegistered: true, + IsTrial: false }); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 5ff3c5d040..a66c8debd2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.18", - "_release": "1.0.18", + "version": "1.0.21", + "_release": "1.0.21", "_resolution": { "type": "version", - "tag": "1.0.18", - "commit": "a251227c4635bcac732075e494b2d8a4e7956d26" + "tag": "1.0.21", + "commit": "dd73237b9d554d45a664e820042804c6d129d280" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.0.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index aeaf71132d..56a1f5ad86 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -1,4 +1,4 @@ -define(['browser'], function (browser) { +define(['browser'], function (browser) { function canPlayH264() { var v = document.createElement('video'); @@ -67,7 +67,7 @@ function canPlayHls(src) { if (_canPlayHls == null) { - _canPlayHls = window.MediaSource != null || canPlayNativeHls(); + _canPlayHls = canPlayNativeHls() || canPlayHlsWithMSE(); } return _canPlayHls; } @@ -83,6 +83,15 @@ return false; } + function canPlayHlsWithMSE() { + if (window.MediaSource != null) { + // text tracks don’t work with this in firefox + return !browser.firefox; + } + + return false; + } + return function () { var bitrateSetting = 100000000; diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/basicimageloader.js b/dashboard-ui/bower_components/emby-webcomponents/images/basicimageloader.js new file mode 100644 index 0000000000..a981713a94 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/images/basicimageloader.js @@ -0,0 +1,25 @@ +define([], function () { + + function loadImage(elem, url) { + + if (elem.tagName !== "IMG") { + + var tmp = new Image(); + + tmp.onload = function () { + elem.style.backgroundImage = "url('" + url + "')"; + }; + tmp.src = url; + + } else { + elem.setAttribute("src", url); + } + + return Promise.resolve(elem); + } + + return { + loadImage: loadImage + }; + +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js b/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js new file mode 100644 index 0000000000..8548fe58a6 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js @@ -0,0 +1,175 @@ +define(['visibleinviewport', 'imageloader'], function (visibleinviewport, imageLoader) { + + var thresholdX = screen.availWidth; + var thresholdY = screen.availHeight; + + var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel'); + + function isVisible(elem) { + return visibleinviewport(elem, true, thresholdX, thresholdY); + } + + function fillImage(elem) { + var source = elem.getAttribute('data-src'); + if (source) { + imageLoader.loadImage(elem, source); + elem.setAttribute("data-src", ''); + } + } + + function cancelAll(tokens) { + for (var i = 0, length = tokens.length; i < length; i++) { + + tokens[i] = true; + } + } + + function unveilElements(images) { + + if (!images.length) { + return; + } + + var cancellationTokens = []; + function unveilInternal(tokenIndex) { + + var remaining = []; + var anyFound = false; + var out = false; + + // TODO: This out construct assumes left to right, top to bottom + + for (var i = 0, length = images.length; i < length; i++) { + + if (cancellationTokens[tokenIndex]) { + return; + } + var img = images[i]; + if (!out && isVisible(img)) { + anyFound = true; + fillImage(img); + } else { + + if (anyFound) { + out = true; + } + remaining.push(img); + } + } + + images = remaining; + + if (!images.length) { + document.removeEventListener('focus', unveil, true); + document.removeEventListener('scroll', unveil, true); + document.removeEventListener(wheelEvent, unveil, true); + window.removeEventListener('resize', unveil, true); + } + } + + function unveil() { + + cancelAll(cancellationTokens); + + var index = cancellationTokens.length; + cancellationTokens.length++; + + setTimeout(function () { + unveilInternal(index); + }, 1); + } + + document.addEventListener('scroll', unveil, true); + document.addEventListener('focus', unveil, true); + document.addEventListener(wheelEvent, unveil, true); + window.addEventListener('resize', unveil, true); + + unveil(); + } + + function fillImages(elems) { + + for (var i = 0, length = elems.length; i < length; i++) { + var elem = elems[0]; + var source = elem.getAttribute('data-src'); + if (source) { + ImageStore.setImageInto(elem, source); + elem.setAttribute("data-src", ''); + } + } + } + + function lazyChildren(elem) { + + unveilElements(elem.getElementsByClassName('lazy')); + } + + function lazyImage(elem, url) { + + elem.setAttribute('data-src', url); + fillImages([elem]); + } + + function getPrimaryImageAspectRatio(items) { + + var values = []; + + for (var i = 0, length = items.length; i < length; i++) { + + var ratio = items[i].PrimaryImageAspectRatio || 0; + + if (!ratio) { + continue; + } + + values[values.length] = ratio; + } + + if (!values.length) { + return null; + } + + // Use the median + values.sort(function (a, b) { return a - b; }); + + var half = Math.floor(values.length / 2); + + var result; + + if (values.length % 2) + result = values[half]; + else + result = (values[half - 1] + values[half]) / 2.0; + + // If really close to 2:3 (poster image), just return 2:3 + var aspect2x3 = 2 / 3; + if (Math.abs(aspect2x3 - result) <= .15) { + return aspect2x3; + } + + // If really close to 16:9 (episode image), just return 16:9 + var aspect16x9 = 16 / 9; + if (Math.abs(aspect16x9 - result) <= .2) { + return aspect16x9; + } + + // If really close to 1 (square image), just return 1 + if (Math.abs(1 - result) <= .15) { + return 1; + } + + // If really close to 4:3 (poster image), just return 2:3 + var aspect4x3 = 4 / 3; + if (Math.abs(aspect4x3 - result) <= .15) { + return aspect4x3; + } + + return result; + } + + return { + lazyChildren: lazyChildren, + getPrimaryImageAspectRatio: getPrimaryImageAspectRatio + }; + +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/persistentimageloader.js b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimageloader.js new file mode 100644 index 0000000000..1cbcb640b0 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/images/persistentimageloader.js @@ -0,0 +1,164 @@ +define(['cryptojs-md5'], function () { + + function setImageIntoElement(elem, url) { + + if (elem.tagName !== "IMG") { + + elem.style.backgroundImage = "url('" + url + "')"; + + } else { + elem.setAttribute("src", url); + } + } + + // Request Quota (only for File System API) + var requestedBytes = 1024 * 1024 * 1500; + var imageCacheDirectoryEntry; + var imageCacheFolder = 'images'; + + function createDir(rootDirEntry, folders, callback, errorCallback) { + // Throw out './' or '/' and move on to prevent something like '/foo/.//bar'. + if (folders[0] == '.' || folders[0] == '') { + folders = folders.slice(1); + } + rootDirEntry.getDirectory(folders[0], { create: true }, function (dirEntry) { + // Recursively add the new subfolder (if we still have another to create). + if (folders.length > 1) { + createDir(dirEntry, folders.slice(1), callback, errorCallback); + } else { + callback(dirEntry); + } + }, errorCallback); + } + + navigator.webkitPersistentStorage.requestQuota( + requestedBytes, function (grantedBytes) { + + var requestMethod = window.webkitRequestFileSystem || window.requestFileSystem; + + requestMethod(PERSISTENT, grantedBytes, function (fs) { + + fileSystem = fs; + + createDir(fileSystem.root, imageCacheFolder.split('/'), function (dirEntry) { + + imageCacheDirectoryEntry = dirEntry; + + }); + + }); + + }); + + function getCacheKey(url) { + + // Try to strip off the domain to share the cache between local and remote connections + var index = url.indexOf('://'); + + if (index != -1) { + url = url.substring(index + 3); + + index = url.indexOf('/'); + + if (index != -1) { + url = url.substring(index + 1); + } + + } + + return CryptoJS.MD5(url).toString(); + } + + function downloadToFile(url, dir, filename, callback, errorCallback) { + + console.log('Downloading ' + url); + + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.responseType = "arraybuffer"; + + xhr.onload = function (e) { + if (this.status == 200) { + writeData(dir, filename, this.getResponseHeader('Content-Type'), this.response, callback, errorCallback); + } else { + errorCallback(); + } + } + + xhr.send(); + } + + function writeData(dir, filename, fileType, data, callback, errorCallback) { + + dir.getFile(filename, { create: true }, function (fileEntry) { + + // Create a FileWriter object for our FileEntry (log.txt). + fileEntry.createWriter(function (fileWriter) { + + fileWriter.onwriteend = function (e) { + callback(fileEntry); + }; + + fileWriter.onerror = errorCallback; + + // Create a new Blob and write it to log.txt. + var blob = new Blob([data], { type: fileType }); + + fileWriter.write(blob); + + }, errorCallback); + + }, errorCallback); + } + + function getImageUrl(originalUrl) { + + return new Promise(function (resolve, reject) { + + if (originalUrl.indexOf('tag=') != -1) { + originalUrl += "&accept=webp"; + } + + var key = getCacheKey(originalUrl); + + var fileEntryCallback = function (fileEntry) { + resolve(fileEntry.toURL()); + }; + + var errorCallback = function (e) { + console.log('Imagestore error: ' + e.name); + reject(); + }; + + if (!fileSystem || !imageCacheDirectoryEntry) { + errorCallback(''); + return; + } + + var path = '/' + imageCacheFolder + "/" + key; + + fileSystem.root.getFile(path, { create: false }, fileEntryCallback, function () { + + downloadToFile(originalUrl, imageCacheDirectoryEntry, key, fileEntryCallback, errorCallback); + }); + }); + } + + var fileSystem; + + return { + loadImage: function (elem, url) { + + return getImageUrl(url).then(function (localUrl) { + + setImageIntoElement(elem, localUrl); + return elem; + + }, function () { + setImageIntoElement(elem, url); + return elem; + }); + } + }; + +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/hls.js/.bower.json b/dashboard-ui/bower_components/hls.js/.bower.json index 44c282c016..21b5cbcb99 100644 --- a/dashboard-ui/bower_components/hls.js/.bower.json +++ b/dashboard-ui/bower_components/hls.js/.bower.json @@ -1,13 +1,13 @@ { "name": "hls.js", - "version": "0.4.5", + "version": "0.4.6", "description": "Media Source Extension - HLS library, by/for Dailymotion", "homepage": "https://github.com/dailymotion/hls.js", "authors": [ "Guillaume du Pontavice " ], "main": "dist/hls.js", - "private": true, + "private": false, "ignore": [ "**/.*", "node_modules", @@ -15,14 +15,13 @@ "test", "tests" ], - "_release": "0.4.5", + "_release": "0.4.6", "_resolution": { "type": "version", - "tag": "v0.4.5", - "commit": "908ac4a44a182bdbede9c1830828983c18532ca0" + "tag": "v0.4.6", + "commit": "eb4bfb0ebadda9797d8020e7b3a2d2c699444cab" }, "_source": "git://github.com/dailymotion/hls.js.git", "_target": "~0.4.5", - "_originalSource": "dailymotion/hls.js", - "_direct": true + "_originalSource": "dailymotion/hls.js" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/hls.js/API.md b/dashboard-ui/bower_components/hls.js/API.md index dee1907066..1c20e00971 100644 --- a/dashboard-ui/bower_components/hls.js/API.md +++ b/dashboard-ui/bower_components/hls.js/API.md @@ -186,6 +186,8 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O maxBufferLength : 30, maxMaxBufferLength : 600, maxBufferSize : 60*1000*1000, + maxBufferHole : 0.3, + maxSeekHole : 2, liveSyncDurationCount : 3, liveMaxLatencyDurationCount: 10, enableWorker : true, @@ -240,6 +242,20 @@ this is the guaranteed buffer length hls.js will try to reach, regardless of max 'minimum' maximum buffer size in bytes. if buffer size upfront is bigger than this value, no fragment will be loaded. +#### ```maxBufferHole``` +(default 0.3s) + +'maximum' inter-fragment buffer hole tolerance that hls.js can cope with. +When switching between quality level, fragments might not be perfectly aligned. +This could result in small overlapping or hole in media buffer. This tolerance factor helps cope with this. + +#### ```maxSeekHole``` +(default 2s) + +in case playback is stalled, and a buffered range is available upfront, less than maxSeekHole seconds from current media position, +hls.js will jump over this buffer hole to reach the beginning of this following buffered range. +```maxSeekHole``` allows to configure this jumpable threshold. + #### ```maxMaxBufferLength``` (default 600s) @@ -499,7 +515,7 @@ full list of Events available below : - `Hls.Events.LEVEL_PTS_UPDATED` - fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment } - `Hls.Events.LEVEL_SWITCH` - fired when a level switch is requested - - data: { levelId : id of new level } + - data: { level : id of new level, it is the index of the array `Hls.levels` } - `Hls.Events.KEY_LOADING` - fired when a decryption key loading starts - data: { frag : fragment object} - `Hls.Events.KEY_LOADED` - fired when a decryption key loading is completed diff --git a/dashboard-ui/bower_components/hls.js/bower.json b/dashboard-ui/bower_components/hls.js/bower.json index b47f29f9e2..a4f8193637 100644 --- a/dashboard-ui/bower_components/hls.js/bower.json +++ b/dashboard-ui/bower_components/hls.js/bower.json @@ -1,13 +1,13 @@ { "name": "hls.js", - "version": "0.4.5", + "version": "0.4.6", "description": "Media Source Extension - HLS library, by/for Dailymotion", "homepage": "https://github.com/dailymotion/hls.js", "authors": [ "Guillaume du Pontavice " ], "main": "dist/hls.js", - "private": true, + "private": false, "ignore": [ "**/.*", "node_modules", diff --git a/dashboard-ui/bower_components/hls.js/demo/index.html b/dashboard-ui/bower_components/hls.js/demo/index.html index 404a86adc1..ed077a55aa 100644 --- a/dashboard-ui/bower_components/hls.js/demo/index.html +++ b/dashboard-ui/bower_components/hls.js/demo/index.html @@ -718,14 +718,6 @@ function timeRangesToString(r) { events.buffer.push(event); refreshCanvas(); - var decodedFrames, droppedFrames; - if(navigator.userAgent.toLowerCase().indexOf('firefox') !== -1) { - decodedFrames = v.mozDecodedFrames; - droppedFrames = v.mozParsedFrames-v.mozPresentedFrames; - } else { - decodedFrames = v.webkitDecodedFrameCount; - droppedFrames = v.webkitDroppedFrameCount; - } var log = "Duration:" + v.duration + "" + "Buffered:" @@ -733,11 +725,16 @@ function timeRangesToString(r) { + "Seekable:" + timeRangesToString(v.seekable) + "" + "Played:" - + timeRangesToString(v.played) + "" - + "Decoded Frames:" - + decodedFrames + "" - + "Dropped Frames:" - + droppedFrames + ""; + + timeRangesToString(v.played) + ""; + + + var videoPlaybackQuality = v.getVideoPlaybackQuality; + if(videoPlaybackQuality && typeof(videoPlaybackQuality) === typeof(Function)) { + log+="Dropped Frames:"+ v.getVideoPlaybackQuality().droppedVideoFrames + ""; + log+="Corrupted Frames:"+ v.getVideoPlaybackQuality().corruptedVideoFrames + ""; + } else if(v.webkitDroppedFrameCount) { + log+="Dropped Frames:"+ v.webkitDroppedFrameCount + ""; + } $("#buffered_log").html(log); $("#HlsStats").text(JSON.stringify(sortObject(stats),null,"\t")); ctx.fillStyle = "blue"; diff --git a/dashboard-ui/bower_components/hls.js/dist/hls.js b/dashboard-ui/bower_components/hls.js/dist/hls.js index be4c27a27e..e3a65f32b8 100644 --- a/dashboard-ui/bower_components/hls.js/dist/hls.js +++ b/dashboard-ui/bower_components/hls.js/dist/hls.js @@ -371,34 +371,42 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _events = require('../events'); var _events2 = _interopRequireDefault(_events); -var AbrController = (function () { +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + +var AbrController = (function (_EventHandler) { + _inherits(AbrController, _EventHandler); + function AbrController(hls) { _classCallCheck(this, AbrController); - this.hls = hls; + _get(Object.getPrototypeOf(AbrController.prototype), 'constructor', this).call(this, hls, _events2['default'].FRAG_LOAD_PROGRESS); this.lastfetchlevel = 0; this._autoLevelCapping = -1; this._nextAutoLevel = -1; - this.onflp = this.onFragmentLoadProgress.bind(this); - hls.on(_events2['default'].FRAG_LOAD_PROGRESS, this.onflp); } _createClass(AbrController, [{ key: 'destroy', value: function destroy() { - this.hls.off(_events2['default'].FRAG_LOAD_PROGRESS, this.onflp); + _eventHandler2['default'].prototype.destroy.call(this); } }, { - key: 'onFragmentLoadProgress', - value: function onFragmentLoadProgress(event, data) { + key: 'onFragLoadProgress', + value: function onFragLoadProgress(data) { var stats = data.stats; if (stats.aborted === undefined) { this.lastfetchduration = (performance.now() - stats.trequest) / 1000; @@ -466,12 +474,12 @@ var AbrController = (function () { }]); return AbrController; -})(); +})(_eventHandler2['default']); exports['default'] = AbrController; module.exports = exports['default']; -},{"../events":18}],4:[function(require,module,exports){ +},{"../event-handler":18,"../events":19}],4:[function(require,module,exports){ /* * Level Controller */ @@ -484,40 +492,40 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _events = require('../events'); var _events2 = _interopRequireDefault(_events); +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + var _utilsLogger = require('../utils/logger'); var _errors = require('../errors'); -var LevelController = (function () { +var LevelController = (function (_EventHandler) { + _inherits(LevelController, _EventHandler); + function LevelController(hls) { _classCallCheck(this, LevelController); - this.hls = hls; - this.onml = this.onManifestLoaded.bind(this); - this.onll = this.onLevelLoaded.bind(this); - this.onerr = this.onError.bind(this); + _get(Object.getPrototypeOf(LevelController.prototype), 'constructor', this).call(this, hls, _events2['default'].MANIFEST_LOADED, _events2['default'].LEVEL_LOADED, _events2['default'].ERROR); this.ontick = this.tick.bind(this); - hls.on(_events2['default'].MANIFEST_LOADED, this.onml); - hls.on(_events2['default'].LEVEL_LOADED, this.onll); - hls.on(_events2['default'].ERROR, this.onerr); this._manualLevel = this._autoLevelCapping = -1; } _createClass(LevelController, [{ key: 'destroy', value: function destroy() { - var hls = this.hls; - hls.off(_events2['default'].MANIFEST_LOADED, this.onml); - hls.off(_events2['default'].LEVEL_LOADED, this.onll); - hls.off(_events2['default'].ERROR, this.onerr); if (this.timer) { clearInterval(this.timer); } @@ -525,7 +533,7 @@ var LevelController = (function () { } }, { key: 'onManifestLoaded', - value: function onManifestLoaded(event, data) { + value: function onManifestLoaded(data) { var levels0 = [], levels = [], bitrateStart, @@ -626,7 +634,7 @@ var LevelController = (function () { } }, { key: 'onError', - value: function onError(event, data) { + value: function onError(data) { if (data.fatal) { return; } @@ -688,7 +696,7 @@ var LevelController = (function () { } }, { key: 'onLevelLoaded', - value: function onLevelLoaded(event, data) { + value: function onLevelLoaded(data) { // check if current playlist is a live playlist if (data.details.live && !this.timer) { // if live playlist we will have to reload it periodically @@ -769,12 +777,12 @@ var LevelController = (function () { }]); return LevelController; -})(); +})(_eventHandler2['default']); exports['default'] = LevelController; module.exports = exports['default']; -},{"../errors":17,"../events":18,"../utils/logger":28}],5:[function(require,module,exports){ +},{"../errors":17,"../event-handler":18,"../events":19,"../utils/logger":29}],5:[function(require,module,exports){ /* * MSE Media Controller */ @@ -787,10 +795,14 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _demuxDemuxer = require('../demux/demuxer'); var _demuxDemuxer2 = _interopRequireDefault(_demuxDemuxer); @@ -799,6 +811,10 @@ var _events = require('../events'); var _events2 = _interopRequireDefault(_events); +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + var _utilsLogger = require('../utils/logger'); var _utilsBinarySearch = require('../utils/binary-search'); @@ -825,42 +841,27 @@ var State = { BUFFER_FLUSHING: 8 }; -var MSEMediaController = (function () { +var MSEMediaController = (function (_EventHandler) { + _inherits(MSEMediaController, _EventHandler); + function MSEMediaController(hls) { _classCallCheck(this, MSEMediaController); + _get(Object.getPrototypeOf(MSEMediaController.prototype), 'constructor', this).call(this, hls, _events2['default'].MEDIA_ATTACHING, _events2['default'].MEDIA_DETACHING, _events2['default'].MANIFEST_PARSED, _events2['default'].LEVEL_LOADED, _events2['default'].KEY_LOADED, _events2['default'].FRAG_LOADED, _events2['default'].FRAG_PARSING_INIT_SEGMENT, _events2['default'].FRAG_PARSING_DATA, _events2['default'].FRAG_PARSED, _events2['default'].ERROR); this.config = hls.config; this.audioCodecSwap = false; - this.hls = hls; this.ticks = 0; // Source Buffer listeners this.onsbue = this.onSBUpdateEnd.bind(this); this.onsbe = this.onSBUpdateError.bind(this); - // internal listeners - this.onmediaatt0 = this.onMediaAttaching.bind(this); - this.onmediadet0 = this.onMediaDetaching.bind(this); - this.onmp = this.onManifestParsed.bind(this); - this.onll = this.onLevelLoaded.bind(this); - this.onfl = this.onFragLoaded.bind(this); - this.onkl = this.onKeyLoaded.bind(this); - this.onis = this.onInitSegment.bind(this); - this.onfpg = this.onFragParsing.bind(this); - this.onfp = this.onFragParsed.bind(this); - this.onerr = this.onError.bind(this); this.ontick = this.tick.bind(this); - hls.on(_events2['default'].MEDIA_ATTACHING, this.onmediaatt0); - hls.on(_events2['default'].MEDIA_DETACHING, this.onmediadet0); - hls.on(_events2['default'].MANIFEST_PARSED, this.onmp); } _createClass(MSEMediaController, [{ key: 'destroy', value: function destroy() { this.stop(); - var hls = this.hls; - hls.off(_events2['default'].MEDIA_ATTACHING, this.onmediaatt0); - hls.off(_events2['default'].MEDIA_DETACHING, this.onmediadet0); - hls.off(_events2['default'].MANIFEST_PARSED, this.onmp); + _eventHandler2['default'].prototype.destroy.call(this); this.state = State.IDLE; } }, { @@ -894,13 +895,6 @@ var MSEMediaController = (function () { this.timer = setInterval(this.ontick, 100); this.level = -1; this.fragLoadError = 0; - hls.on(_events2['default'].FRAG_LOADED, this.onfl); - hls.on(_events2['default'].FRAG_PARSING_INIT_SEGMENT, this.onis); - hls.on(_events2['default'].FRAG_PARSING_DATA, this.onfpg); - hls.on(_events2['default'].FRAG_PARSED, this.onfp); - hls.on(_events2['default'].ERROR, this.onerr); - hls.on(_events2['default'].LEVEL_LOADED, this.onll); - hls.on(_events2['default'].KEY_LOADED, this.onkl); } }, { key: 'stop', @@ -935,14 +929,6 @@ var MSEMediaController = (function () { this.demuxer.destroy(); this.demuxer = null; } - var hls = this.hls; - hls.off(_events2['default'].FRAG_LOADED, this.onfl); - hls.off(_events2['default'].FRAG_PARSED, this.onfp); - hls.off(_events2['default'].FRAG_PARSING_DATA, this.onfpg); - hls.off(_events2['default'].LEVEL_LOADED, this.onll); - hls.off(_events2['default'].KEY_LOADED, this.onkl); - hls.off(_events2['default'].FRAG_PARSING_INIT_SEGMENT, this.onis); - hls.off(_events2['default'].ERROR, this.onerr); } }, { key: 'tick', @@ -1001,7 +987,7 @@ var MSEMediaController = (function () { // we are not at playback start, get next load level from level Controller level = hls.nextLoadLevel; } - var bufferInfo = this.bufferInfo(pos, 0.3), + var bufferInfo = this.bufferInfo(pos, this.config.maxBufferHole), bufferLen = bufferInfo.len, bufferEnd = bufferInfo.end, fragPrevious = this.fragPrevious, @@ -1020,7 +1006,9 @@ var MSEMediaController = (function () { this.level = level; levelDetails = this.levels[level].details; // if level info not retrieved yet, switch state and wait for level retrieval - if (typeof levelDetails === 'undefined') { + // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load + // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist) + if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) { this.state = State.WAITING_LEVEL; break; } @@ -1176,7 +1164,7 @@ var MSEMediaController = (function () { } pos = v.currentTime; var fragLoadedDelay = (frag.expectedLen - frag.loaded) / loadRate; - var bufferStarvationDelay = this.bufferInfo(pos, 0.3).end - pos; + var bufferStarvationDelay = this.bufferInfo(pos, this.config.maxBufferHole).end - pos; var fragLevelNextLoadedDelay = frag.duration * this.levels[hls.nextLoadLevel].bitrate / (8 * loadRate); //bps/Bps /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer starvation delay ... and also bigger than duration needed to load fragment at next level ...*/ @@ -1363,6 +1351,7 @@ var MSEMediaController = (function () { bufferLen = bufferEnd - pos; } else if (pos + maxHoleDuration < start) { bufferStartNext = start; + break; } } return { len: bufferLen, start: bufferStart, end: bufferEnd, nextStart: bufferStartNext }; @@ -1605,7 +1594,7 @@ var MSEMediaController = (function () { } }, { key: 'onMediaAttaching', - value: function onMediaAttaching(event, data) { + value: function onMediaAttaching(data) { var media = this.media = data.media; // setup the media source var ms = this.mediaSource = new MediaSource(); @@ -1680,7 +1669,7 @@ var MSEMediaController = (function () { if (this.state === State.FRAG_LOADING) { // check if currently loaded fragment is inside buffer. //if outside, cancel fragment loading, otherwise do nothing - if (this.bufferInfo(this.media.currentTime, 0.3).len === 0) { + if (this.bufferInfo(this.media.currentTime, this.config.maxBufferHole).len === 0) { _utilsLogger.logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load'); var fragCurrent = this.fragCurrent; if (fragCurrent) { @@ -1732,7 +1721,7 @@ var MSEMediaController = (function () { } }, { key: 'onManifestParsed', - value: function onManifestParsed(event, data) { + value: function onManifestParsed(data) { var aac = false, heaac = false, codecs; @@ -1761,13 +1750,14 @@ var MSEMediaController = (function () { } }, { key: 'onLevelLoaded', - value: function onLevelLoaded(event, data) { + value: function onLevelLoaded(data) { var newDetails = data.details, newLevelId = data.level, curLevel = this.levels[newLevelId], duration = newDetails.totalduration; _utilsLogger.logger.log('level ' + newLevelId + ' loaded [' + newDetails.startSN + ',' + newDetails.endSN + '],duration:' + duration); + this.levelLastLoaded = newLevelId; if (newDetails.live) { var curDetails = curLevel.details; @@ -1816,7 +1806,7 @@ var MSEMediaController = (function () { } }, { key: 'onFragLoaded', - value: function onFragLoaded(event, data) { + value: function onFragLoaded(data) { var fragCurrent = this.fragCurrent; if (this.state === State.FRAG_LOADING && fragCurrent && data.frag.level === fragCurrent.level && data.frag.sn === fragCurrent.sn) { if (this.fragBitrateTest === true) { @@ -1854,8 +1844,8 @@ var MSEMediaController = (function () { this.fragLoadError = 0; } }, { - key: 'onInitSegment', - value: function onInitSegment(event, data) { + key: 'onFragParsingInitSegment', + value: function onFragParsingInitSegment(data) { if (this.state === State.PARSING) { // check if codecs have been explicitely defined in the master playlist for this level; // if yes use these ones instead of the ones parsed from the demux @@ -1913,8 +1903,8 @@ var MSEMediaController = (function () { } } }, { - key: 'onFragParsing', - value: function onFragParsing(event, data) { + key: 'onFragParsingData', + value: function onFragParsingData(data) { if (this.state === State.PARSING) { this.tparse2 = Date.now(); var level = this.levels[this.level], @@ -1931,7 +1921,7 @@ var MSEMediaController = (function () { //trigger handler right now this.tick(); } else { - _utilsLogger.logger.warn('not in PARSING state, discarding ' + event); + _utilsLogger.logger.warn('not in PARSING state, ignoring FRAG_PARSING_DATA event'); } } }, { @@ -1946,7 +1936,7 @@ var MSEMediaController = (function () { } }, { key: 'onError', - value: function onError(event, data) { + value: function onError(data) { switch (data.details) { case _errors.ErrorDetails.FRAG_LOAD_ERROR: case _errors.ErrorDetails.FRAG_LOAD_TIMEOUT: @@ -1971,7 +1961,7 @@ var MSEMediaController = (function () { _utilsLogger.logger.error('mediaController: ' + data.details + ' reaches max retry, redispatch as fatal ...'); // redispatch same error but with fatal set to true data.fatal = true; - this.hls.trigger(event, data); + this.hls.trigger(_events2['default'].ERROR, data); this.state = State.ERROR; } } @@ -2037,14 +2027,14 @@ var MSEMediaController = (function () { // playhead moving or media not playing jumpThreshold = 0; } else { - _utilsLogger.logger.trace('playback seems stuck'); + _utilsLogger.logger.log('playback seems stuck'); } // if we are below threshold, try to jump if next buffer range is close if (bufferInfo.len <= jumpThreshold) { - // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a 300 ms range) + // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a config.maxSeekHole second range) var nextBufferStart = bufferInfo.nextStart, delta = nextBufferStart - currentTime; - if (nextBufferStart && delta < 0.3 && delta > 0.005 && !media.seeking) { + if (nextBufferStart && delta < this.config.maxSeekHole && delta > 0.005 && !media.seeking) { // next buffer is close ! adjust currentTime to nextBufferStart // this will ensure effective video decoding _utilsLogger.logger.log('adjust currentTime from ' + currentTime + ' to ' + nextBufferStart); @@ -2145,12 +2135,12 @@ var MSEMediaController = (function () { }]); return MSEMediaController; -})(); +})(_eventHandler2['default']); exports['default'] = MSEMediaController; module.exports = exports['default']; -},{"../demux/demuxer":13,"../errors":17,"../events":18,"../helper/level-helper":19,"../utils/binary-search":27,"../utils/logger":28}],6:[function(require,module,exports){ +},{"../demux/demuxer":13,"../errors":17,"../event-handler":18,"../events":19,"../helper/level-helper":20,"../utils/binary-search":28,"../utils/logger":29}],6:[function(require,module,exports){ /* * * This file contains an adaptation of the AES decryption algorithm @@ -2675,7 +2665,7 @@ var Decrypter = (function () { exports['default'] = Decrypter; module.exports = exports['default']; -},{"../errors":17,"../utils/logger":28,"./aes128-decrypter":7}],9:[function(require,module,exports){ +},{"../errors":17,"../utils/logger":29,"./aes128-decrypter":7}],9:[function(require,module,exports){ /** * AAC demuxer */ @@ -2804,7 +2794,7 @@ var AACDemuxer = (function () { exports['default'] = AACDemuxer; module.exports = exports['default']; -},{"../demux/id3":15,"../utils/logger":28,"./adts":10}],10:[function(require,module,exports){ +},{"../demux/id3":15,"../utils/logger":29,"./adts":10}],10:[function(require,module,exports){ /** * ADTS parser helper */ @@ -2952,7 +2942,7 @@ var ADTS = (function () { exports['default'] = ADTS; module.exports = exports['default']; -},{"../errors":17,"../utils/logger":28}],11:[function(require,module,exports){ +},{"../errors":17,"../utils/logger":29}],11:[function(require,module,exports){ /* inline demuxer. * probe fragments and instantiate appropriate demuxer depending on content type (TSDemuxer, AACDemuxer, ...) */ @@ -3024,7 +3014,7 @@ var DemuxerInline = (function () { exports['default'] = DemuxerInline; module.exports = exports['default']; -},{"../demux/aacdemuxer":9,"../demux/tsdemuxer":16,"../errors":17,"../events":18}],12:[function(require,module,exports){ +},{"../demux/aacdemuxer":9,"../demux/tsdemuxer":16,"../errors":17,"../events":19}],12:[function(require,module,exports){ /* demuxer web worker. * - listen to worker message, and trigger DemuxerInline upon reception of Fragments. * - provides MP4 Boxes back to main thread using [transferable objects](https://developers.google.com/web/updates/2011/12/Transferable-Objects-Lightning-Fast) in order to minimize message passing overhead. @@ -3131,7 +3121,7 @@ var DemuxerWorker = function DemuxerWorker(self) { exports['default'] = DemuxerWorker; module.exports = exports['default']; -},{"../demux/demuxer-inline":11,"../events":18,"../remux/mp4-remuxer":25,"events":1}],13:[function(require,module,exports){ +},{"../demux/demuxer-inline":11,"../events":19,"../remux/mp4-remuxer":26,"events":1}],13:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { @@ -3281,7 +3271,7 @@ var Demuxer = (function () { exports['default'] = Demuxer; module.exports = exports['default']; -},{"../crypt/decrypter":8,"../demux/demuxer-inline":11,"../demux/demuxer-worker":12,"../events":18,"../remux/mp4-remuxer":25,"../utils/logger":28,"webworkify":2}],14:[function(require,module,exports){ +},{"../crypt/decrypter":8,"../demux/demuxer-inline":11,"../demux/demuxer-worker":12,"../events":19,"../remux/mp4-remuxer":26,"../utils/logger":29,"webworkify":2}],14:[function(require,module,exports){ /** * Parser for exponential Golomb codes, a variable-bitwidth number encoding scheme used by h264. */ @@ -3620,7 +3610,7 @@ var ExpGolomb = (function () { exports['default'] = ExpGolomb; module.exports = exports['default']; -},{"../utils/logger":28}],15:[function(require,module,exports){ +},{"../utils/logger":29}],15:[function(require,module,exports){ /** * ID3 parser */ @@ -3774,7 +3764,7 @@ var ID3 = (function () { exports['default'] = ID3; module.exports = exports['default']; -},{"../utils/logger":28}],16:[function(require,module,exports){ +},{"../utils/logger":29}],16:[function(require,module,exports){ /** * highly optimized TS demuxer: * parse PAT, PMT @@ -4402,7 +4392,7 @@ var TSDemuxer = (function () { exports['default'] = TSDemuxer; module.exports = exports['default']; -},{"../errors":17,"../events":18,"../utils/logger":28,"./adts":10,"./exp-golomb":14}],17:[function(require,module,exports){ +},{"../errors":17,"../events":19,"../utils/logger":29,"./adts":10,"./exp-golomb":14}],17:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { @@ -4453,12 +4443,105 @@ var ErrorDetails = { exports.ErrorDetails = ErrorDetails; },{}],18:[function(require,module,exports){ +/* +* +* All objects in the event handling chain should inherit from this class +* +*/ + +//import {logger} from './utils/logger'; + 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -exports['default'] = { + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var EventHandler = (function () { + function EventHandler(hls) { + _classCallCheck(this, EventHandler); + + this.hls = hls; + this.onEvent = this.onEvent.bind(this); + + for (var _len = arguments.length, events = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + events[_key - 1] = arguments[_key]; + } + + this.handledEvents = events; + this.useGenericHandler = true; + + this.registerListeners(); + } + + _createClass(EventHandler, [{ + key: 'destroy', + value: function destroy() { + this.unregisterListeners(); + } + }, { + key: 'isEventHandler', + value: function isEventHandler() { + return typeof this.handledEvents === 'object' && this.handledEvents.length && typeof this.onEvent === 'function'; + } + }, { + key: 'registerListeners', + value: function registerListeners() { + if (this.isEventHandler()) { + this.handledEvents.forEach((function (event) { + if (event === 'hlsEventGeneric') { + throw new Error('Forbidden event name: ' + event); + } + this.hls.on(event, this.onEvent); + }).bind(this)); + } + } + }, { + key: 'unregisterListeners', + value: function unregisterListeners() { + if (this.isEventHandler()) { + this.handledEvents.forEach((function (event) { + this.hls.off(event, this.onEvent); + }).bind(this)); + } + } + + /* + * arguments: event (string), data (any) + */ + }, { + key: 'onEvent', + value: function onEvent(event, data) { + this.onEventGeneric(event, data); + } + }, { + key: 'onEventGeneric', + value: function onEventGeneric(event, data) { + var eventToFunction = function eventToFunction(event, data) { + var funcName = 'on' + event.replace('hls', ''); + if (typeof this[funcName] !== 'function') { + throw new Error('Event ' + event + ' has no generic handler in this ' + this.constructor.name + ' class (tried ' + funcName + ')'); + } + return this[funcName].bind(this, data); + }; + eventToFunction.call(this, event, data).call(); + } + }]); + + return EventHandler; +})(); + +exports['default'] = EventHandler; +module.exports = exports['default']; + +},{}],19:[function(require,module,exports){ +'use strict'; + +module.exports = { // fired before MediaSource is attaching to media element - data: { media } MEDIA_ATTACHING: 'hlsMediaAttaching', // fired when MediaSource has been succesfully attached to media element - data: { } @@ -4480,7 +4563,7 @@ exports['default'] = { // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level } LEVEL_UPDATED: 'hlsLevelUpdated', // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment } - LEVEL_PTS_UPDATED: 'hlsPTSUpdated', + LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated', // fired when a level switch is requested - data: { level : id of new level } LEVEL_SWITCH: 'hlsLevelSwitch', // fired when a fragment loading starts - data: { frag : fragment object} @@ -4494,7 +4577,7 @@ exports['default'] = { // fired when Init Segment has been extracted from fragment - data: { moov : moov MP4 box, codecs : codecs found while parsing fragment} FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment', // fired when parsing id3 is completed - data: { samples : [ id3 samples pes ] } - FRAG_PARSING_METADATA: 'hlsFraParsingMetadata', + FRAG_PARSING_METADATA: 'hlsFragParsingMetadata', // fired when moof/mdat have been extracted from fragment - data: { moof : moof MP4 box, mdat : mdat MP4 box} FRAG_PARSING_DATA: 'hlsFragParsingData', // fired when fragment parsing is completed - data: undefined @@ -4504,7 +4587,7 @@ exports['default'] = { // fired when fragment matching with current media position is changing - data : { frag : fragment object } FRAG_CHANGED: 'hlsFragChanged', // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames} - FPS_DROP: 'hlsFPSDrop', + FPS_DROP: 'hlsFpsDrop', // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data} ERROR: 'hlsError', // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example @@ -4514,9 +4597,8 @@ exports['default'] = { // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}} KEY_LOADED: 'hlsKeyLoaded' }; -module.exports = exports['default']; -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ /** * Level Helper class, providing methods dealing with playlist sliding and drift */ @@ -4662,7 +4744,7 @@ var LevelHelper = (function () { exports['default'] = LevelHelper; module.exports = exports['default']; -},{"../utils/logger":28}],20:[function(require,module,exports){ +},{"../utils/logger":29}],21:[function(require,module,exports){ /** * HLS interface */ @@ -4750,6 +4832,8 @@ var Hls = (function () { debug: false, maxBufferLength: 30, maxBufferSize: 60 * 1000 * 1000, + maxBufferHole: 0.3, + maxSeekHole: 2, liveSyncDurationCount: 3, liveMaxLatencyDurationCount: Infinity, maxMaxBufferLength: 600, @@ -5016,7 +5100,7 @@ var Hls = (function () { exports['default'] = Hls; module.exports = exports['default']; -},{"./controller/abr-controller":3,"./controller/level-controller":4,"./controller/mse-media-controller":5,"./errors":17,"./events":18,"./loader/fragment-loader":21,"./loader/key-loader":22,"./loader/playlist-loader":23,"./utils/logger":28,"./utils/xhr-loader":30,"events":1}],21:[function(require,module,exports){ +},{"./controller/abr-controller":3,"./controller/level-controller":4,"./controller/mse-media-controller":5,"./errors":17,"./events":19,"./loader/fragment-loader":22,"./loader/key-loader":23,"./loader/playlist-loader":24,"./utils/logger":29,"./utils/xhr-loader":31,"events":1}],22:[function(require,module,exports){ /* * Fragment Loader */ @@ -5029,23 +5113,31 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _events = require('../events'); var _events2 = _interopRequireDefault(_events); +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + var _errors = require('../errors'); -var FragmentLoader = (function () { +var FragmentLoader = (function (_EventHandler) { + _inherits(FragmentLoader, _EventHandler); + function FragmentLoader(hls) { _classCallCheck(this, FragmentLoader); - this.hls = hls; - this.onfl = this.onFragLoading.bind(this); - hls.on(_events2['default'].FRAG_LOADING, this.onfl); + _get(Object.getPrototypeOf(FragmentLoader.prototype), 'constructor', this).call(this, hls, _events2['default'].FRAG_LOADING); } _createClass(FragmentLoader, [{ @@ -5055,11 +5147,11 @@ var FragmentLoader = (function () { this.loader.destroy(); this.loader = null; } - this.hls.off(_events2['default'].FRAG_LOADING, this.onfl); + _eventHandler2['default'].prototype.destroy.call(this); } }, { key: 'onFragLoading', - value: function onFragLoading(event, data) { + value: function onFragLoading(data) { var frag = data.frag; this.frag = frag; this.frag.loaded = 0; @@ -5097,12 +5189,12 @@ var FragmentLoader = (function () { }]); return FragmentLoader; -})(); +})(_eventHandler2['default']); exports['default'] = FragmentLoader; module.exports = exports['default']; -},{"../errors":17,"../events":18}],22:[function(require,module,exports){ +},{"../errors":17,"../event-handler":18,"../events":19}],23:[function(require,module,exports){ /* * Decrypt key Loader */ @@ -5115,25 +5207,33 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _events = require('../events'); var _events2 = _interopRequireDefault(_events); +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + var _errors = require('../errors'); -var KeyLoader = (function () { +var KeyLoader = (function (_EventHandler) { + _inherits(KeyLoader, _EventHandler); + function KeyLoader(hls) { _classCallCheck(this, KeyLoader); - this.hls = hls; + _get(Object.getPrototypeOf(KeyLoader.prototype), 'constructor', this).call(this, hls, _events2['default'].KEY_LOADING); this.decryptkey = null; this.decrypturl = null; - this.ondkl = this.onDecryptKeyLoading.bind(this); - hls.on(_events2['default'].KEY_LOADING, this.ondkl); } _createClass(KeyLoader, [{ @@ -5143,11 +5243,11 @@ var KeyLoader = (function () { this.loader.destroy(); this.loader = null; } - this.hls.off(_events2['default'].KEY_LOADING, this.ondkl); + _eventHandler2['default'].prototype.destroy.call(this); } }, { - key: 'onDecryptKeyLoading', - value: function onDecryptKeyLoading(event, data) { + key: 'onKeyLoading', + value: function onKeyLoading(data) { var frag = this.frag = data.frag, decryptdata = frag.decryptdata, uri = decryptdata.uri; @@ -5191,12 +5291,12 @@ var KeyLoader = (function () { }]); return KeyLoader; -})(); +})(_eventHandler2['default']); exports['default'] = KeyLoader; module.exports = exports['default']; -},{"../errors":17,"../events":18}],23:[function(require,module,exports){ +},{"../errors":17,"../event-handler":18,"../events":19}],24:[function(require,module,exports){ /** * Playlist Loader */ @@ -5209,14 +5309,22 @@ Object.defineProperty(exports, '__esModule', { var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); +var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _events = require('../events'); var _events2 = _interopRequireDefault(_events); +var _eventHandler = require('../event-handler'); + +var _eventHandler2 = _interopRequireDefault(_eventHandler); + var _errors = require('../errors'); var _utilsUrl = require('../utils/url'); @@ -5229,15 +5337,13 @@ var _utilsAttrList2 = _interopRequireDefault(_utilsAttrList); //import {logger} from '../utils/logger'; -var PlaylistLoader = (function () { +var PlaylistLoader = (function (_EventHandler) { + _inherits(PlaylistLoader, _EventHandler); + function PlaylistLoader(hls) { _classCallCheck(this, PlaylistLoader); - this.hls = hls; - this.onml = this.onManifestLoading.bind(this); - this.onll = this.onLevelLoading.bind(this); - hls.on(_events2['default'].MANIFEST_LOADING, this.onml); - hls.on(_events2['default'].LEVEL_LOADING, this.onll); + _get(Object.getPrototypeOf(PlaylistLoader.prototype), 'constructor', this).call(this, hls, _events2['default'].MANIFEST_LOADING, _events2['default'].LEVEL_LOADING); } _createClass(PlaylistLoader, [{ @@ -5248,17 +5354,16 @@ var PlaylistLoader = (function () { this.loader = null; } this.url = this.id = null; - this.hls.off(_events2['default'].MANIFEST_LOADING, this.onml); - this.hls.off(_events2['default'].LEVEL_LOADING, this.onll); + _eventHandler2['default'].prototype.destroy.call(this); } }, { key: 'onManifestLoading', - value: function onManifestLoading(event, data) { + value: function onManifestLoading(data) { this.load(data.url, null); } }, { key: 'onLevelLoading', - value: function onLevelLoading(event, data) { + value: function onLevelLoading(data) { this.load(data.url, data.level, data.id); } }, { @@ -5525,12 +5630,12 @@ var PlaylistLoader = (function () { }]); return PlaylistLoader; -})(); +})(_eventHandler2['default']); exports['default'] = PlaylistLoader; module.exports = exports['default']; -},{"../errors":17,"../events":18,"../utils/attr-list":26,"../utils/url":29}],24:[function(require,module,exports){ +},{"../errors":17,"../event-handler":18,"../events":19,"../utils/attr-list":27,"../utils/url":30}],25:[function(require,module,exports){ /** * Generate MP4 Box */ @@ -6035,7 +6140,7 @@ var MP4 = (function () { exports['default'] = MP4; module.exports = exports['default']; -},{}],25:[function(require,module,exports){ +},{}],26:[function(require,module,exports){ /** * fMP4 remuxer */ @@ -6194,6 +6299,7 @@ var MP4Remuxer = (function () { dts, ptsnorm, dtsnorm, + flags, samples = []; /* concatenate the video data and construct the mdat in place (need 8 more bytes to fill length and mpdat type) */ @@ -6217,7 +6323,7 @@ var MP4Remuxer = (function () { dts = avcSample.dts - this._initDTS; // ensure DTS is not bigger than PTS dts = Math.min(pts, dts); - //logger.log(`Video/PTS/DTS:${pts}/${dts}`); + //logger.log(`Video/PTS/DTS:${Math.round(pts/90)}/${Math.round(dts/90)}`); // if not first AVC sample of video track, normalize PTS/DTS with previous sample value // and ensure that sample duration is positive if (lastDTS !== undefined) { @@ -6267,13 +6373,14 @@ var MP4Remuxer = (function () { degradPrio: 0 } }; + flags = mp4Sample.flags; if (avcSample.key === true) { // the current sample is a key frame - mp4Sample.flags.dependsOn = 2; - mp4Sample.flags.isNonSync = 0; + flags.dependsOn = 2; + flags.isNonSync = 0; } else { - mp4Sample.flags.dependsOn = 1; - mp4Sample.flags.isNonSync = 1; + flags.dependsOn = 1; + flags.isNonSync = 1; } samples.push(mp4Sample); lastDTS = dtsnorm; @@ -6288,7 +6395,7 @@ var MP4Remuxer = (function () { track.len = 0; track.nbNalu = 0; if (samples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { - var flags = samples[0].flags; + flags = samples[0].flags; // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue // https://code.google.com/p/chromium/issues/detail?id=229412 flags.dependsOn = 2; @@ -6344,7 +6451,7 @@ var MP4Remuxer = (function () { unit = aacSample.unit; pts = aacSample.pts - this._initDTS; dts = aacSample.dts - this._initDTS; - //logger.log(`Audio/PTS:${aacSample.pts.toFixed(0)}`); + //logger.log(`Audio/PTS:${Math.round(pts/90)}`); // if not first sample if (lastDTS !== undefined) { ptsnorm = this._PTSNormalize(pts, lastDTS); @@ -6490,7 +6597,7 @@ var MP4Remuxer = (function () { exports['default'] = MP4Remuxer; module.exports = exports['default']; -},{"../errors":17,"../events":18,"../remux/mp4-generator":24,"../utils/logger":28}],26:[function(require,module,exports){ +},{"../errors":17,"../events":19,"../remux/mp4-generator":25,"../utils/logger":29}],27:[function(require,module,exports){ // adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js 'use strict'; @@ -6598,7 +6705,7 @@ var AttrList = (function () { exports['default'] = AttrList; module.exports = exports['default']; -},{}],27:[function(require,module,exports){ +},{}],28:[function(require,module,exports){ "use strict"; var BinarySearch = { @@ -6643,7 +6750,7 @@ var BinarySearch = { module.exports = BinarySearch; -},{}],28:[function(require,module,exports){ +},{}],29:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, '__esModule', { @@ -6725,7 +6832,7 @@ exports.enableLogs = enableLogs; var logger = exportedLogger; exports.logger = logger; -},{}],29:[function(require,module,exports){ +},{}],30:[function(require,module,exports){ 'use strict'; var URLHelper = { @@ -6806,7 +6913,7 @@ var URLHelper = { module.exports = URLHelper; -},{}],30:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ /** * XHR based logger */ @@ -6877,7 +6984,7 @@ var XhrLoader = (function () { key: 'loadInternal', value: function loadInternal() { var xhr = this.loader = new XMLHttpRequest(); - xhr.onreadystatechange = this.statechange.bind(this); + xhr.onloadend = this.loadend.bind(this); xhr.onprogress = this.loadprogress.bind(this); xhr.open('GET', this.url, true); @@ -6893,14 +7000,13 @@ var XhrLoader = (function () { xhr.send(); } }, { - key: 'statechange', - value: function statechange(event) { + key: 'loadend', + value: function loadend(event) { var xhr = event.currentTarget, status = xhr.status, stats = this.stats; // don't proceed if xhr has been aborted - // 4 = Response from server has been completely loaded. - if (!stats.aborted && xhr.readyState === 4) { + if (!stats.aborted) { // http status between 200 to 299 are all successful if (status >= 200 && status < 300) { window.clearTimeout(this.timeoutHandle); @@ -6949,6 +7055,6 @@ var XhrLoader = (function () { exports['default'] = XhrLoader; module.exports = exports['default']; -},{"../utils/logger":28}]},{},[20])(20) +},{"../utils/logger":29}]},{},[21])(21) }); //# sourceMappingURL=hls.js.map diff --git a/dashboard-ui/bower_components/hls.js/dist/hls.js.map b/dashboard-ui/bower_components/hls.js/dist/hls.js.map index 805e0b5e4d..c42cff54db 100644 --- a/dashboard-ui/bower_components/hls.js/dist/hls.js.map +++ b/dashboard-ui/bower_components/hls.js/dist/hls.js.map @@ -19,6 +19,7 @@ "src/demux/id3.js", "src/demux/tsdemuxer.js", "src/errors.js", + "src/event-handler.js", "src/events.js", "src/helper/level-helper.js", "src/hls.js", @@ -34,16 +35,16 @@ "src/utils/xhr-loader.js" ], "names": [], - "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;sBCnDkB,WAAW;;;;IAEvB,aAAa;AAEN,WAFP,aAAa,CAEL,GAAG,EAAE;0BAFb,aAAa;;AAGf,QAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AACf,QAAI,CAAC,cAAc,GAAG,CAAC,CAAC;AACxB,QAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;AAC5B,QAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;AACzB,QAAI,CAAC,KAAK,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpD,OAAG,CAAC,EAAE,CAAC,oBAAM,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;GAC9C;;eATG,aAAa;;WAWV,mBAAG;AACR,UAAI,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAM,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KACpD;;;WAEqB,gCAAC,KAAK,EAAE,IAAI,EAAE;AAClC,UAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AACvB,UAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE;AAC/B,YAAI,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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;A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W,CAAC,GAAG,EAAE,CAAC;OAClC;AACD,WAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;AAC5B,UAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAI,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;OAC/B;KACF;;;SAxGG,SAAS;;;qBA2GA,SAAS", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n var ret;\n if (!emitter._events || !emitter._events[type])\n ret = 0;\n else if (isFunction(emitter._events[type]))\n ret = 1;\n else\n ret = emitter._events[type].length;\n return ret;\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n", "var bundleFn = arguments[3];\nvar sources = arguments[4];\nvar cache = arguments[5];\n\nvar stringify = JSON.stringify;\n\nmodule.exports = function (fn) {\n var keys = [];\n var wkey;\n var cacheKeys = Object.keys(cache);\n \n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n if (cache[key].exports === fn) {\n wkey = key;\n break;\n }\n }\n \n if (!wkey) {\n wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n var wcache = {};\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n wcache[key] = key;\n }\n sources[wkey] = [\n Function(['require','module','exports'], '(' + fn + ')(self)'),\n wcache\n ];\n }\n var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n \n var scache = {}; scache[wkey] = wkey;\n sources[skey] = [\n Function(['require'],'require(' + stringify(wkey) + ')(self)'),\n scache\n ];\n \n var src = '(' + bundleFn + ')({'\n + Object.keys(sources).map(function (key) {\n return stringify(key) + ':['\n + sources[key][0]\n + ',' + stringify(sources[key][1]) + ']'\n ;\n }).join(',')\n + '},{},[' + stringify(skey) + '])'\n ;\n \n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n \n return new Worker(URL.createObjectURL(\n new Blob([src], { type: 'text/javascript' })\n ));\n};\n", - "/*\n * simple ABR Controller\n*/\n\nimport Event from '../events';\n\nclass AbrController {\n\n constructor(hls) {\n this.hls = hls;\n this.lastfetchlevel = 0;\n this._autoLevelCapping = -1;\n this._nextAutoLevel = -1;\n this.onflp = this.onFragmentLoadProgress.bind(this);\n hls.on(Event.FRAG_LOAD_PROGRESS, this.onflp);\n }\n\n destroy() {\n this.hls.off(Event.FRAG_LOAD_PROGRESS, this.onflp);\n }\n\n onFragmentLoadProgress(event, data) {\n var stats = data.stats;\n if (stats.aborted === undefined) {\n this.lastfetchduration = (performance.now() - stats.trequest) / 1000;\n this.lastfetchlevel = data.frag.level;\n this.lastbw = (stats.loaded * 8) / this.lastfetchduration;\n //console.log(`fetchDuration:${this.lastfetchduration},bw:${(this.lastbw/1000).toFixed(0)}/${stats.aborted}`);\n }\n }\n\n /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n get autoLevelCapping() {\n return this._autoLevelCapping;\n }\n\n /** set the capping/max level value that could be used by automatic level selection algorithm **/\n set autoLevelCapping(newLevel) {\n this._autoLevelCapping = newLevel;\n }\n\n get nextAutoLevel() {\n var lastbw = this.lastbw, hls = this.hls,adjustedbw, i, maxAutoLevel;\n if (this._autoLevelCapping === -1) {\n maxAutoLevel = hls.levels.length - 1;\n } else {\n maxAutoLevel = this._autoLevelCapping;\n }\n\n if (this._nextAutoLevel !== -1) {\n var nextLevel = Math.min(this._nextAutoLevel,maxAutoLevel);\n if (nextLevel === this.lastfetchlevel) {\n this._nextAutoLevel = -1;\n } else {\n return nextLevel;\n }\n }\n\n // follow algorithm captured from stagefright :\n // https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/httplive/LiveSession.cpp\n // Pick the highest bandwidth stream below or equal to estimated bandwidth.\n for (i = 0; i <= maxAutoLevel; i++) {\n // consider only 80% of the available bandwidth, but if we are switching up,\n // be even more conservative (70%) to avoid overestimating and immediately\n // switching back.\n if (i <= this.lastfetchlevel) {\n adjustedbw = 0.8 * lastbw;\n } else {\n adjustedbw = 0.7 * lastbw;\n }\n if (adjustedbw < hls.levels[i].bitrate) {\n return Math.max(0, i - 1);\n }\n }\n return i - 1;\n }\n\n set nextAutoLevel(nextLevel) {\n this._nextAutoLevel = nextLevel;\n }\n}\n\nexport default AbrController;\n\n", - "/*\n * Level Controller\n*/\n\nimport Event from '../events';\nimport {logger} from '../utils/logger';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass LevelController {\n\n constructor(hls) {\n this.hls = hls;\n this.onml = this.onManifestLoaded.bind(this);\n this.onll = this.onLevelLoaded.bind(this);\n this.onerr = this.onError.bind(this);\n this.ontick = this.tick.bind(this);\n hls.on(Event.MANIFEST_LOADED, this.onml);\n hls.on(Event.LEVEL_LOADED, this.onll);\n hls.on(Event.ERROR, this.onerr);\n this._manualLevel = this._autoLevelCapping = -1;\n }\n\n destroy() {\n var hls = this.hls;\n hls.off(Event.MANIFEST_LOADED, this.onml);\n hls.off(Event.LEVEL_LOADED, this.onll);\n hls.off(Event.ERROR, this.onerr);\n if (this.timer) {\n clearInterval(this.timer);\n }\n this._manualLevel = -1;\n }\n\n onManifestLoaded(event, data) {\n var levels0 = [], levels = [], bitrateStart, i, bitrateSet = {}, videoCodecFound = false, audioCodecFound = false, hls = this.hls;\n\n // regroup redundant level together\n data.levels.forEach(level => {\n if(level.videoCodec) {\n videoCodecFound = true;\n }\n if(level.audioCodec) {\n audioCodecFound = true;\n }\n var redundantLevelId = bitrateSet[level.bitrate];\n if (redundantLevelId === undefined) {\n bitrateSet[level.bitrate] = levels0.length;\n level.url = [level.url];\n level.urlId = 0;\n levels0.push(level);\n } else {\n levels0[redundantLevelId].url.push(level.url);\n }\n });\n\n // remove audio-only level if we also have levels with audio+video codecs signalled\n if(videoCodecFound && audioCodecFound) {\n levels0.forEach(level => {\n if(level.videoCodec) {\n levels.push(level);\n }\n });\n } else {\n levels = levels0;\n }\n\n // only keep level with supported audio/video codecs\n levels = levels.filter(function(level) {\n var checkSupported = function(codec) { return MediaSource.isTypeSupported(`video/mp4;codecs=${codec}`);};\n var audioCodec = level.audioCodec, videoCodec = level.videoCodec;\n\n return (!audioCodec || checkSupported(audioCodec)) &&\n (!videoCodec || checkSupported(videoCodec));\n });\n\n if(levels.length) {\n // start bitrate is the first bitrate of the manifest\n bitrateStart = levels[0].bitrate;\n // sort level on bitrate\n levels.sort(function (a, b) {\n return a.bitrate - b.bitrate;\n });\n this._levels = levels;\n // find index of first level in sorted levels\n for (i = 0; i < levels.length; i++) {\n if (levels[i].bitrate === bitrateStart) {\n this._firstLevel = i;\n logger.log(`manifest loaded,${levels.length} level(s) found, first bitrate:${bitrateStart}`);\n break;\n }\n }\n hls.trigger(Event.MANIFEST_PARSED, {levels: this._levels, firstLevel: this._firstLevel, stats: data.stats});\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: hls.url, reason: 'no compatible level found in manifest'});\n }\n return;\n }\n\n get levels() {\n return this._levels;\n }\n\n get level() {\n return this._level;\n }\n\n set level(newLevel) {\n if (this._level !== newLevel || this._levels[newLevel].details === undefined) {\n this.setLevelInternal(newLevel);\n }\n }\n\n setLevelInternal(newLevel) {\n // check if level idx is valid\n if (newLevel >= 0 && newLevel < this._levels.length) {\n // stopping live reloading timer if any\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n this._level = newLevel;\n logger.log(`switching to level ${newLevel}`);\n this.hls.trigger(Event.LEVEL_SWITCH, {level: newLevel});\n var level = this._levels[newLevel];\n // check if we need to load playlist for this level\n if (level.details === undefined || level.details.live === true) {\n // level not retrieved yet, or live playlist we need to (re)load it\n logger.log(`(re)loading playlist for level ${newLevel}`);\n var urlId = level.urlId;\n this.hls.trigger(Event.LEVEL_LOADING, {url: level.url[urlId], level: newLevel, id: urlId});\n }\n } else {\n // invalid level id given, trigger error\n this.hls.trigger(Event.ERROR, {type : ErrorTypes.OTHER_ERROR, details: ErrorDetails.LEVEL_SWITCH_ERROR, level: newLevel, fatal: false, reason: 'invalid level idx'});\n }\n }\n\n get manualLevel() {\n return this._manualLevel;\n }\n\n set manualLevel(newLevel) {\n this._manualLevel = newLevel;\n if (newLevel !== -1) {\n this.level = newLevel;\n }\n }\n\n get firstLevel() {\n return this._firstLevel;\n }\n\n set firstLevel(newLevel) {\n this._firstLevel = newLevel;\n }\n\n get startLevel() {\n if (this._startLevel === undefined) {\n return this._firstLevel;\n } else {\n return this._startLevel;\n }\n }\n\n set startLevel(newLevel) {\n this._startLevel = newLevel;\n }\n\n onError(event, data) {\n if(data.fatal) {\n return;\n }\n\n var details = data.details, hls = this.hls, levelId, level;\n // try to recover not fatal errors\n switch(details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n case ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n levelId = data.frag.level;\n break;\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n levelId = data.level;\n break;\n default:\n break;\n }\n /* try to switch to a redundant stream if any available.\n * if no redundant stream available, emergency switch down (if in auto mode and current level not 0)\n * otherwise, we cannot recover this network error ...\n * don't raise FRAG_LOAD_ERROR and FRAG_LOAD_TIMEOUT as fatal, as it is handled by mediaController\n */\n if (levelId !== undefined) {\n level = this._levels[levelId];\n if (level.urlId < (level.url.length - 1)) {\n level.urlId++;\n level.details = undefined;\n logger.warn(`level controller,${details} for level ${levelId}: switching to redundant stream id ${level.urlId}`);\n } else {\n // we could try to recover if in auto mode and current level not lowest level (0)\n let recoverable = ((this._manualLevel === -1) && levelId);\n if (recoverable) {\n logger.warn(`level controller,${details}: emergency switch-down for next fragment`);\n hls.abrController.nextAutoLevel = 0;\n } else if(level && level.details && level.details.live) {\n logger.warn(`level controller,${details} on live stream, discard`);\n // FRAG_LOAD_ERROR and FRAG_LOAD_TIMEOUT are handled by mediaController\n } else if (details !== ErrorDetails.FRAG_LOAD_ERROR && details !== ErrorDetails.FRAG_LOAD_TIMEOUT) {\n logger.error(`cannot recover ${details} error`);\n this._level = undefined;\n // stopping live reloading timer if any\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n // redispatch same error but with fatal set to true\n data.fatal = true;\n hls.trigger(event, data);\n }\n }\n }\n }\n\n onLevelLoaded(event, data) {\n // check if current playlist is a live playlist\n if (data.details.live && !this.timer) {\n // if live playlist we will have to reload it periodically\n // set reload period to playlist target duration\n this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);\n }\n if (!data.details.live && this.timer) {\n // playlist is not live and timer is armed : stopping it\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n\n tick() {\n var levelId = this._level;\n if (levelId !== undefined) {\n var level = this._levels[levelId], urlId = level.urlId;\n this.hls.trigger(Event.LEVEL_LOADING, {url: level.url[urlId], level: levelId, id: urlId});\n }\n }\n\n nextLoadLevel() {\n if (this._manualLevel !== -1) {\n return this._manualLevel;\n } else {\n return this.hls.abrController.nextAutoLevel;\n }\n }\n}\n\nexport default LevelController;\n\n", - "/*\n * MSE Media Controller\n*/\n\nimport Demuxer from '../demux/demuxer';\nimport Event from '../events';\nimport {logger} from '../utils/logger';\nimport BinarySearch from '../utils/binary-search';\nimport LevelHelper from '../helper/level-helper';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nconst State = {\n ERROR : -2,\n STARTING : -1,\n IDLE : 0,\n KEY_LOADING : 1,\n FRAG_LOADING : 2,\n FRAG_LOADING_WAITING_RETRY : 3,\n WAITING_LEVEL : 4,\n PARSING : 5,\n PARSED : 6,\n APPENDING : 7,\n BUFFER_FLUSHING : 8\n};\n\nclass MSEMediaController {\n\n constructor(hls) {\n this.config = hls.config;\n this.audioCodecSwap = false;\n this.hls = hls;\n this.ticks = 0;\n // Source Buffer listeners\n this.onsbue = this.onSBUpdateEnd.bind(this);\n this.onsbe = this.onSBUpdateError.bind(this);\n // internal listeners\n this.onmediaatt0 = this.onMediaAttaching.bind(this);\n this.onmediadet0 = this.onMediaDetaching.bind(this);\n this.onmp = this.onManifestParsed.bind(this);\n this.onll = this.onLevelLoaded.bind(this);\n this.onfl = this.onFragLoaded.bind(this);\n this.onkl = this.onKeyLoaded.bind(this);\n this.onis = this.onInitSegment.bind(this);\n this.onfpg = this.onFragParsing.bind(this);\n this.onfp = this.onFragParsed.bind(this);\n this.onerr = this.onError.bind(this);\n this.ontick = this.tick.bind(this);\n hls.on(Event.MEDIA_ATTACHING, this.onmediaatt0);\n hls.on(Event.MEDIA_DETACHING, this.onmediadet0);\n hls.on(Event.MANIFEST_PARSED, this.onmp);\n }\n\n destroy() {\n this.stop();\n var hls = this.hls;\n hls.off(Event.MEDIA_ATTACHING, this.onmediaatt0);\n hls.off(Event.MEDIA_DETACHING, this.onmediadet0);\n hls.off(Event.MANIFEST_PARSED, this.onmp);\n this.state = State.IDLE;\n }\n\n startLoad() {\n if (this.levels && this.media) {\n this.startInternal();\n if (this.lastCurrentTime) {\n logger.log(`seeking @ ${this.lastCurrentTime}`);\n if (!this.lastPaused) {\n logger.log('resuming video');\n this.media.play();\n }\n this.state = State.IDLE;\n } else {\n this.lastCurrentTime = 0;\n this.state = State.STARTING;\n }\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n this.tick();\n } else {\n logger.warn('cannot start loading as either manifest not parsed or video not attached');\n }\n }\n\n startInternal() {\n var hls = this.hls;\n this.stop();\n this.demuxer = new Demuxer(hls);\n this.timer = setInterval(this.ontick, 100);\n this.level = -1;\n this.fragLoadError = 0;\n hls.on(Event.FRAG_LOADED, this.onfl);\n hls.on(Event.FRAG_PARSING_INIT_SEGMENT, this.onis);\n hls.on(Event.FRAG_PARSING_DATA, this.onfpg);\n hls.on(Event.FRAG_PARSED, this.onfp);\n hls.on(Event.ERROR, this.onerr);\n hls.on(Event.LEVEL_LOADED, this.onll);\n hls.on(Event.KEY_LOADED, this.onkl);\n }\n\n stop() {\n this.mp4segments = [];\n this.flushRange = [];\n this.bufferRange = [];\n var frag = this.fragCurrent;\n if (frag) {\n if (frag.loader) {\n frag.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n if (this.sourceBuffer) {\n for(var type in this.sourceBuffer) {\n var sb = this.sourceBuffer[type];\n try {\n this.mediaSource.removeSourceBuffer(sb);\n sb.removeEventListener('updateend', this.onsbue);\n sb.removeEventListener('error', this.onsbe);\n } catch(err) {\n }\n }\n this.sourceBuffer = null;\n }\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n var hls = this.hls;\n hls.off(Event.FRAG_LOADED, this.onfl);\n hls.off(Event.FRAG_PARSED, this.onfp);\n hls.off(Event.FRAG_PARSING_DATA, this.onfpg);\n hls.off(Event.LEVEL_LOADED, this.onll);\n hls.off(Event.KEY_LOADED, this.onkl);\n hls.off(Event.FRAG_PARSING_INIT_SEGMENT, this.onis);\n hls.off(Event.ERROR, this.onerr);\n }\n\n tick() {\n this.ticks++;\n if (this.ticks === 1) {\n this.doTick();\n if (this.ticks > 1) {\n setTimeout(this.tick, 1);\n }\n this.ticks = 0;\n }\n }\n\n doTick() {\n var pos, level, levelDetails, hls = this.hls;\n switch(this.state) {\n case State.ERROR:\n //don't do anything in error state to avoid breaking further ...\n break;\n case State.STARTING:\n // determine load level\n this.startLevel = hls.startLevel;\n if (this.startLevel === -1) {\n // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n this.startLevel = 0;\n this.fragBitrateTest = true;\n }\n // set new level to playlist loader : this will trigger start level load\n this.level = hls.nextLoadLevel = this.startLevel;\n this.state = State.WAITING_LEVEL;\n this.loadedmetadata = false;\n break;\n case State.IDLE:\n // if video detached or unbound exit loop\n if (!this.media) {\n break;\n }\n // determine next candidate fragment to be loaded, based on current position and\n // end of buffer position\n // ensure 60s of buffer upfront\n // if we have not yet loaded any fragment, start loading from start position\n if (this.loadedmetadata) {\n pos = this.media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n }\n // determine next load level\n if (this.startFragmentRequested === false) {\n level = this.startLevel;\n } else {\n // we are not at playback start, get next load level from level Controller\n level = hls.nextLoadLevel;\n }\n var bufferInfo = this.bufferInfo(pos,0.3),\n bufferLen = bufferInfo.len,\n bufferEnd = bufferInfo.end,\n fragPrevious = this.fragPrevious,\n maxBufLen;\n // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s\n if ((this.levels[level]).hasOwnProperty('bitrate')) {\n maxBufLen = Math.max(8 * this.config.maxBufferSize / this.levels[level].bitrate, this.config.maxBufferLength);\n maxBufLen = Math.min(maxBufLen, this.config.maxMaxBufferLength);\n } else {\n maxBufLen = this.config.maxBufferLength;\n }\n // if buffer length is less than maxBufLen try to load a new fragment\n if (bufferLen < maxBufLen) {\n // set next load level : this will trigger a playlist load if needed\n hls.nextLoadLevel = level;\n this.level = level;\n levelDetails = this.levels[level].details;\n // if level info not retrieved yet, switch state and wait for level retrieval\n if (typeof levelDetails === 'undefined') {\n this.state = State.WAITING_LEVEL;\n break;\n }\n // find fragment index, contiguous with end of buffer position\n let fragments = levelDetails.fragments,\n fragLen = fragments.length,\n start = fragments[0].start,\n end = fragments[fragLen-1].start + fragments[fragLen-1].duration,\n frag;\n\n // in case of live playlist we need to ensure that requested position is not located before playlist start\n if (levelDetails.live) {\n // check if requested position is within seekable boundaries :\n //logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n if (bufferEnd < Math.max(start,end-this.config.liveMaxLatencyDurationCount*levelDetails.targetduration)) {\n this.seekAfterBuffered = start + Math.max(0, levelDetails.totalduration - this.config.liveSyncDurationCount * levelDetails.targetduration);\n logger.log(`buffer end: ${bufferEnd} is located too far from the end of live sliding playlist, media position will be reseted to: ${this.seekAfterBuffered.toFixed(3)}`);\n bufferEnd = this.seekAfterBuffered;\n }\n if (this.startFragmentRequested && !levelDetails.PTSKnown) {\n /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n try to load frag matching with next SN.\n even if SN are not synchronized between playlists, loading this frag will help us\n compute playlist sliding and find the right one after in case it was not the right consecutive one */\n if (fragPrevious) {\n var targetSN = fragPrevious.sn + 1;\n if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n frag = fragments[targetSN - levelDetails.startSN];\n logger.log(`live playlist, switching playlist, load frag with next SN: ${frag.sn}`);\n }\n }\n if (!frag) {\n /* we have no idea about which fragment should be loaded.\n so let's load mid fragment. it will help computing playlist sliding and find the right one\n */\n frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n logger.log(`live playlist, switching playlist, unknown, load middle frag : ${frag.sn}`);\n }\n }\n } else {\n // VoD playlist: if bufferEnd before start of playlist, load first fragment\n if (bufferEnd < start) {\n frag = fragments[0];\n }\n }\n if (!frag) {\n var foundFrag;\n if (bufferEnd < end) {\n foundFrag = BinarySearch.search(fragments, (candidate) => {\n //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n // offset should be within fragment boundary\n if ((candidate.start + candidate.duration) <= bufferEnd) {\n return 1;\n }\n else if (candidate.start > bufferEnd) {\n return -1;\n }\n return 0;\n });\n } else {\n // reach end of playlist\n foundFrag = fragments[fragLen-1];\n }\n if (foundFrag) {\n frag = foundFrag;\n start = foundFrag.start;\n //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n if (frag.sn < levelDetails.endSN) {\n frag = fragments[frag.sn + 1 - levelDetails.startSN];\n logger.log(`SN just loaded, load next one: ${frag.sn}`);\n } else {\n // have we reached end of VOD playlist ?\n if (!levelDetails.live) {\n var mediaSource = this.mediaSource;\n if (mediaSource && mediaSource.readyState === 'open') {\n // ensure sourceBuffer are not in updating states\n var sb = this.sourceBuffer;\n if (!((sb.audio && sb.audio.updating) || (sb.video && sb.video.updating))) {\n logger.log('all media data available, signal endOfStream() to MediaSource');\n //Notify the media element that it now has all of the media data\n mediaSource.endOfStream();\n }\n }\n }\n frag = null;\n }\n }\n }\n }\n if(frag) {\n //logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n if ((frag.decryptdata.uri != null) && (frag.decryptdata.key == null)) {\n logger.log(`Loading key for ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}`);\n this.state = State.KEY_LOADING;\n hls.trigger(Event.KEY_LOADING, {frag: frag});\n } else {\n logger.log(`Loading ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}, currentTime:${pos},bufferEnd:${bufferEnd.toFixed(3)}`);\n frag.autoLevel = hls.autoLevelEnabled;\n if (this.levels.length > 1) {\n frag.expectedLen = Math.round(frag.duration * this.levels[level].bitrate / 8);\n frag.trequest = performance.now();\n }\n // ensure that we are not reloading the same fragments in loop ...\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx++;\n } else {\n this.fragLoadIdx = 0;\n }\n if (frag.loadCounter) {\n frag.loadCounter++;\n let maxThreshold = this.config.fragLoadingLoopThreshold;\n // if this frag has already been loaded 3 times, and if it has been reloaded recently\n if (frag.loadCounter > maxThreshold && (Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold)) {\n hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag});\n return;\n }\n } else {\n frag.loadCounter = 1;\n }\n frag.loadIdx = this.fragLoadIdx;\n this.fragCurrent = frag;\n this.startFragmentRequested = true;\n hls.trigger(Event.FRAG_LOADING, {frag: frag});\n this.state = State.FRAG_LOADING;\n }\n }\n }\n break;\n case State.WAITING_LEVEL:\n level = this.levels[this.level];\n // check if playlist is already loaded\n if (level && level.details) {\n this.state = State.IDLE;\n }\n break;\n case State.FRAG_LOADING:\n /*\n monitor fragment retrieval time...\n we compute expected time of arrival of the complete fragment.\n we compare it to expected time of buffer starvation\n */\n let v = this.media,frag = this.fragCurrent;\n /* only monitor frag retrieval time if\n (video not paused OR first fragment being loaded) AND autoswitching enabled AND not lowest level AND multiple levels */\n if (v && (!v.paused || this.loadedmetadata === false) && frag.autoLevel && this.level && this.levels.length > 1) {\n var requestDelay = performance.now() - frag.trequest;\n // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n if (requestDelay > (500 * frag.duration)) {\n var loadRate = frag.loaded * 1000 / requestDelay; // byte/s\n if (frag.expectedLen < frag.loaded) {\n frag.expectedLen = frag.loaded;\n }\n pos = v.currentTime;\n var fragLoadedDelay = (frag.expectedLen - frag.loaded) / loadRate;\n var bufferStarvationDelay = this.bufferInfo(pos,0.3).end - pos;\n var fragLevelNextLoadedDelay = frag.duration * this.levels[hls.nextLoadLevel].bitrate / (8 * loadRate); //bps/Bps\n /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer starvation delay\n ... and also bigger than duration needed to load fragment at next level ...*/\n if (bufferStarvationDelay < (2 * frag.duration) && fragLoadedDelay > bufferStarvationDelay && fragLoadedDelay > fragLevelNextLoadedDelay) {\n // abort fragment loading ...\n logger.warn('loading too slow, abort fragment loading');\n logger.log(`fragLoadedDelay/bufferStarvationDelay/fragLevelNextLoadedDelay :${fragLoadedDelay.toFixed(1)}/${bufferStarvationDelay.toFixed(1)}/${fragLevelNextLoadedDelay.toFixed(1)}`);\n //abort fragment loading\n frag.loader.abort();\n hls.trigger(Event.FRAG_LOAD_EMERGENCY_ABORTED, {frag: frag});\n // switch back to IDLE state to request new fragment at lowest level\n this.state = State.IDLE;\n }\n }\n }\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = performance.now();\n var retryDate = this.retryDate;\n var media = this.media;\n var isSeeking = media && media.seeking;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if(!retryDate || (now >= retryDate) || isSeeking) {\n logger.log(`mediaController: retryDate reached, switch back to IDLE state`);\n this.state = State.IDLE;\n }\n break;\n case State.PARSING:\n // nothing to do, wait for fragment being parsed\n break;\n case State.PARSED:\n case State.APPENDING:\n if (this.sourceBuffer) {\n if (this.media.error) {\n logger.error('trying to append although a media error occured, switch to ERROR state');\n this.state = State.ERROR;\n return;\n }\n // if MP4 segment appending in progress nothing to do\n else if ((this.sourceBuffer.audio && this.sourceBuffer.audio.updating) ||\n (this.sourceBuffer.video && this.sourceBuffer.video.updating)) {\n //logger.log('sb append in progress');\n // check if any MP4 segments left to append\n } else if (this.mp4segments.length) {\n var segment = this.mp4segments.shift();\n try {\n //logger.log(`appending ${segment.type} SB, size:${segment.data.length});\n this.sourceBuffer[segment.type].appendBuffer(segment.data);\n this.appendError = 0;\n } catch(err) {\n // in case any error occured while appending, put back segment in mp4segments table\n logger.error(`error while trying to append buffer:${err.message},try appending later`);\n this.mp4segments.unshift(segment);\n // just discard QuotaExceededError for now, and wait for the natural browser buffer eviction\n //http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n if(err.code !== 22) {\n if (this.appendError) {\n this.appendError++;\n } else {\n this.appendError = 1;\n }\n var event = {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent};\n /* with UHD content, we could get loop of quota exceeded error until\n browser is able to evict some data from sourcebuffer. retrying help recovering this\n */\n if (this.appendError > this.config.appendErrorMaxRetry) {\n logger.log(`fail ${this.config.appendErrorMaxRetry} times to append segment in sourceBuffer`);\n event.fatal = true;\n hls.trigger(Event.ERROR, event);\n this.state = State.ERROR;\n return;\n } else {\n event.fatal = false;\n hls.trigger(Event.ERROR, event);\n }\n }\n }\n this.state = State.APPENDING;\n }\n } else {\n // sourceBuffer undefined, switch back to IDLE state\n this.state = State.IDLE;\n }\n break;\n case State.BUFFER_FLUSHING:\n // loop through all buffer ranges to flush\n while(this.flushRange.length) {\n var range = this.flushRange[0];\n // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n if (this.flushBuffer(range.start, range.end)) {\n // range flushed, remove from flush array\n this.flushRange.shift();\n } else {\n // flush in progress, come back later\n break;\n }\n }\n if (this.flushRange.length === 0) {\n // handle end of immediate switching if needed\n if (this.immediateSwitch) {\n this.immediateLevelSwitchEnd();\n }\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n }\n /* if not everything flushed, stay in BUFFER_FLUSHING state. we will come back here\n each time sourceBuffer updateend() callback will be triggered\n */\n break;\n default:\n break;\n }\n // check buffer\n this._checkBuffer();\n // check/update current fragment\n this._checkFragmentChanged();\n }\n\n\n bufferInfo(pos,maxHoleDuration) {\n var media = this.media,\n vbuffered = media.buffered,\n buffered = [],i;\n for (i = 0; i < vbuffered.length; i++) {\n buffered.push({start: vbuffered.start(i), end: vbuffered.end(i)});\n }\n return this.bufferedInfo(buffered,pos,maxHoleDuration);\n }\n\n bufferedInfo(buffered,pos,maxHoleDuration) {\n var buffered2 = [],\n // bufferStart and bufferEnd are buffer boundaries around current video position\n bufferLen,bufferStart, bufferEnd,bufferStartNext,i;\n // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n buffered.sort(function (a, b) {\n var diff = a.start - b.start;\n if (diff) {\n return diff;\n } else {\n return b.end - a.end;\n }\n });\n // there might be some small holes between buffer time range\n // consider that holes smaller than maxHoleDuration are irrelevant and build another\n // buffer time range representations that discards those holes\n for (i = 0; i < buffered.length; i++) {\n var buf2len = buffered2.length;\n if(buf2len) {\n var buf2end = buffered2[buf2len - 1].end;\n // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n if((buffered[i].start - buf2end) < maxHoleDuration) {\n // merge overlapping time ranges\n // update lastRange.end only if smaller than item.end\n // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n if(buffered[i].end > buf2end) {\n buffered2[buf2len - 1].end = buffered[i].end;\n }\n } else {\n // big hole\n buffered2.push(buffered[i]);\n }\n } else {\n // first value\n buffered2.push(buffered[i]);\n }\n }\n for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {\n var start = buffered2[i].start,\n end = buffered2[i].end;\n //logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n if ((pos + maxHoleDuration) >= start && pos < end) {\n // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n bufferStart = start;\n bufferEnd = end + maxHoleDuration;\n bufferLen = bufferEnd - pos;\n } else if ((pos + maxHoleDuration) < start) {\n bufferStartNext = start;\n }\n }\n return {len: bufferLen, start: bufferStart, end: bufferEnd, nextStart : bufferStartNext};\n }\n\n getBufferRange(position) {\n var i, range;\n for (i = this.bufferRange.length - 1; i >=0; i--) {\n range = this.bufferRange[i];\n if (position >= range.start && position <= range.end) {\n return range;\n }\n }\n return null;\n }\n\n get currentLevel() {\n if (this.media) {\n var range = this.getBufferRange(this.media.currentTime);\n if (range) {\n return range.frag.level;\n }\n }\n return -1;\n }\n\n get nextBufferRange() {\n if (this.media) {\n // first get end range of current fragment\n return this.followingBufferRange(this.getBufferRange(this.media.currentTime));\n } else {\n return null;\n }\n }\n\n followingBufferRange(range) {\n if (range) {\n // try to get range of next fragment (500ms after this range)\n return this.getBufferRange(range.end + 0.5);\n }\n return null;\n }\n\n get nextLevel() {\n var range = this.nextBufferRange;\n if (range) {\n return range.frag.level;\n } else {\n return -1;\n }\n }\n\n isBuffered(position) {\n var v = this.media, buffered = v.buffered;\n for (var i = 0; i < buffered.length; i++) {\n if (position >= buffered.start(i) && position <= buffered.end(i)) {\n return true;\n }\n }\n return false;\n }\n\n _checkFragmentChanged() {\n var rangeCurrent, currentTime, video = this.media;\n if (video && video.seeking === false) {\n currentTime = video.currentTime;\n /* if video element is in seeked state, currentTime can only increase.\n (assuming that playback rate is positive ...)\n As sometimes currentTime jumps back to zero after a\n media decode error, check this, to avoid seeking back to\n wrong position after a media decode error\n */\n if(currentTime > video.playbackRate*this.lastCurrentTime) {\n this.lastCurrentTime = currentTime;\n }\n if (this.isBuffered(currentTime)) {\n rangeCurrent = this.getBufferRange(currentTime);\n } else if (this.isBuffered(currentTime + 0.1)) {\n /* ensure that FRAG_CHANGED event is triggered at startup,\n when first video frame is displayed and playback is paused.\n add a tolerance of 100ms, in case current position is not buffered,\n check if current pos+100ms is buffered and use that buffer range\n for FRAG_CHANGED event reporting */\n rangeCurrent = this.getBufferRange(currentTime + 0.1);\n }\n if (rangeCurrent) {\n var fragPlaying = rangeCurrent.frag;\n if (fragPlaying !== this.fragPlaying) {\n this.fragPlaying = fragPlaying;\n this.hls.trigger(Event.FRAG_CHANGED, {frag: fragPlaying});\n }\n }\n }\n }\n\n /*\n abort any buffer append in progress, and flush all buffered data\n return true once everything has been flushed.\n sourceBuffer.abort() and sourceBuffer.remove() are asynchronous operations\n the idea is to call this function from tick() timer and call it again until all resources have been cleaned\n the timer is rearmed upon sourceBuffer updateend() event, so this should be optimal\n */\n flushBuffer(startOffset, endOffset) {\n var sb, i, bufStart, bufEnd, flushStart, flushEnd;\n //logger.log('flushBuffer,pos/start/end: ' + this.media.currentTime + '/' + startOffset + '/' + endOffset);\n // safeguard to avoid infinite looping\n if (this.flushBufferCounter++ < (2 * this.bufferRange.length) && this.sourceBuffer) {\n for (var type in this.sourceBuffer) {\n sb = this.sourceBuffer[type];\n if (!sb.updating) {\n for (i = 0; i < sb.buffered.length; i++) {\n bufStart = sb.buffered.start(i);\n bufEnd = sb.buffered.end(i);\n // workaround firefox not able to properly flush multiple buffered range.\n if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1 && endOffset === Number.POSITIVE_INFINITY) {\n flushStart = startOffset;\n flushEnd = endOffset;\n } else {\n flushStart = Math.max(bufStart, startOffset);\n flushEnd = Math.min(bufEnd, endOffset);\n }\n /* sometimes sourcebuffer.remove() does not flush\n the exact expected time range.\n to avoid rounding issues/infinite loop,\n only flush buffer range of length greater than 500ms.\n */\n if (flushEnd - flushStart > 0.5) {\n logger.log(`flush ${type} [${flushStart},${flushEnd}], of [${bufStart},${bufEnd}], pos:${this.media.currentTime}`);\n sb.remove(flushStart, flushEnd);\n return false;\n }\n }\n } else {\n //logger.log('abort ' + type + ' append in progress');\n // this will abort any appending in progress\n //sb.abort();\n return false;\n }\n }\n }\n\n /* after successful buffer flushing, rebuild buffer Range array\n loop through existing buffer range and check if\n corresponding range is still buffered. only push to new array already buffered range\n */\n var newRange = [],range;\n for (i = 0; i < this.bufferRange.length; i++) {\n range = this.bufferRange[i];\n if (this.isBuffered((range.start + range.end) / 2)) {\n newRange.push(range);\n }\n }\n this.bufferRange = newRange;\n logger.log('buffer flushed');\n // everything flushed !\n return true;\n }\n\n /*\n on immediate level switch :\n - pause playback if playing\n - cancel any pending load request\n - and trigger a buffer flush\n */\n immediateLevelSwitch() {\n logger.log('immediateLevelSwitch');\n if (!this.immediateSwitch) {\n this.immediateSwitch = true;\n this.previouslyPaused = this.media.paused;\n this.media.pause();\n }\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n // flush everything\n this.flushBufferCounter = 0;\n this.flushRange.push({start: 0, end: Number.POSITIVE_INFINITY});\n // trigger a sourceBuffer flush\n this.state = State.BUFFER_FLUSHING;\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // speed up switching, trigger timer function\n this.tick();\n }\n\n /*\n on immediate level switch end, after new fragment has been buffered :\n - nudge video decoder by slightly adjusting video currentTime\n - resume the playback if needed\n */\n immediateLevelSwitchEnd() {\n this.immediateSwitch = false;\n this.media.currentTime -= 0.0001;\n if (!this.previouslyPaused) {\n this.media.play();\n }\n }\n\n nextLevelSwitch() {\n /* try to switch ASAP without breaking video playback :\n in order to ensure smooth but quick level switching,\n we need to find the next flushable buffer range\n we should take into account new segment fetch time\n */\n var fetchdelay, currentRange, nextRange;\n currentRange = this.getBufferRange(this.media.currentTime);\n if (currentRange) {\n // flush buffer preceding current fragment (flush until current fragment start offset)\n // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n this.flushRange.push({start: 0, end: currentRange.start - 1});\n }\n if (!this.media.paused) {\n // add a safety delay of 1s\n var nextLevelId = this.hls.nextLoadLevel,nextLevel = this.levels[nextLevelId], fragLastKbps = this.fragLastKbps;\n if (fragLastKbps && this.fragCurrent) {\n fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n } else {\n fetchdelay = 0;\n }\n } else {\n fetchdelay = 0;\n }\n //logger.log('fetchdelay:'+fetchdelay);\n // find buffer range that will be reached once new fragment will be fetched\n nextRange = this.getBufferRange(this.media.currentTime + fetchdelay);\n if (nextRange) {\n // we can flush buffer range following this one without stalling playback\n nextRange = this.followingBufferRange(nextRange);\n if (nextRange) {\n // flush position is the start position of this new buffer\n this.flushRange.push({start: nextRange.start, end: Number.POSITIVE_INFINITY});\n // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n }\n }\n if (this.flushRange.length) {\n this.flushBufferCounter = 0;\n // trigger a sourceBuffer flush\n this.state = State.BUFFER_FLUSHING;\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // speed up switching, trigger timer function\n this.tick();\n }\n }\n\n onMediaAttaching(event, data) {\n var media = this.media = data.media;\n // setup the media source\n var ms = this.mediaSource = new MediaSource();\n //Media Source listeners\n this.onmso = this.onMediaSourceOpen.bind(this);\n this.onmse = this.onMediaSourceEnded.bind(this);\n this.onmsc = this.onMediaSourceClose.bind(this);\n ms.addEventListener('sourceopen', this.onmso);\n ms.addEventListener('sourceended', this.onmse);\n ms.addEventListener('sourceclose', this.onmsc);\n // link video and media Source\n media.src = URL.createObjectURL(ms);\n }\n\n onMediaDetaching() {\n var media = this.media;\n if (media && media.ended) {\n logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n var levels = this.levels;\n if (levels) {\n // reset fragment load counter\n levels.forEach(level => {\n if(level.details) {\n level.details.fragments.forEach(fragment => {\n fragment.loadCounter = undefined;\n });\n }\n });\n }\n var ms = this.mediaSource;\n if (ms) {\n if (ms.readyState === 'open') {\n try {\n // endOfStream could trigger exception if any sourcebuffer is in updating state\n // we don't really care about checking sourcebuffer state here,\n // as we are anyway detaching the MediaSource\n // let's just avoid this exception to propagate\n ms.endOfStream();\n } catch(err) {\n logger.warn(`onMediaDetaching:${err.message} while calling endOfStream`);\n }\n }\n ms.removeEventListener('sourceopen', this.onmso);\n ms.removeEventListener('sourceended', this.onmse);\n ms.removeEventListener('sourceclose', this.onmsc);\n // unlink MediaSource from video tag\n this.media.src = '';\n this.mediaSource = null;\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('seeked', this.onvseeked);\n media.removeEventListener('loadedmetadata', this.onvmetadata);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvmetadata = null;\n }\n this.media = null;\n this.loadedmetadata = false;\n this.stop();\n }\n this.onmso = this.onmse = this.onmsc = null;\n this.hls.trigger(Event.MEDIA_DETACHED);\n }\n\n onMediaSeeking() {\n if (this.state === State.FRAG_LOADING) {\n // check if currently loaded fragment is inside buffer.\n //if outside, cancel fragment loading, otherwise do nothing\n if (this.bufferInfo(this.media.currentTime,0.3).len === 0) {\n logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n var fragCurrent = this.fragCurrent;\n if (fragCurrent) {\n if (fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n }\n }\n if (this.media) {\n this.lastCurrentTime = this.media.currentTime;\n }\n // avoid reporting fragment loop loading error in case user is seeking several times on same position\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n }\n // tick to speed up processing\n this.tick();\n }\n\n onMediaSeeked() {\n // tick to speed up FRAGMENT_PLAYING triggering\n this.tick();\n }\n\n onMediaMetadata() {\n var media = this.media,\n currentTime = media.currentTime;\n // only adjust currentTime if not equal to 0\n if (!currentTime && currentTime !== this.startPosition) {\n logger.log('onMediaMetadata: adjust currentTime to startPosition');\n media.currentTime = this.startPosition;\n }\n this.loadedmetadata = true;\n this.tick();\n }\n\n onMediaEnded() {\n logger.log('media ended');\n // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n\n onManifestParsed(event, data) {\n var aac = false, heaac = false, codecs;\n data.levels.forEach(level => {\n // detect if we have different kind of audio codecs used amongst playlists\n codecs = level.codecs;\n if (codecs) {\n if (codecs.indexOf('mp4a.40.2') !== -1) {\n aac = true;\n }\n if (codecs.indexOf('mp4a.40.5') !== -1) {\n heaac = true;\n }\n }\n });\n this.audiocodecswitch = (aac && heaac);\n if (this.audiocodecswitch) {\n logger.log('both AAC/HE-AAC audio found in levels; declaring audio codec as HE-AAC');\n }\n this.levels = data.levels;\n this.startLevelLoaded = false;\n this.startFragmentRequested = false;\n if (this.media && this.config.autoStartLoad) {\n this.startLoad();\n }\n }\n\n onLevelLoaded(event,data) {\n var newDetails = data.details,\n newLevelId = data.level,\n curLevel = this.levels[newLevelId],\n duration = newDetails.totalduration;\n\n logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`);\n\n if (newDetails.live) {\n var curDetails = curLevel.details;\n if (curDetails) {\n // we already have details for that level, merge them\n LevelHelper.mergeDetails(curDetails,newDetails);\n if (newDetails.PTSKnown) {\n logger.log(`live playlist sliding:${newDetails.fragments[0].start.toFixed(3)}`);\n } else {\n logger.log('live playlist - outdated PTS, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n logger.log('live playlist - first load, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n }\n // override level info\n curLevel.details = newDetails;\n this.hls.trigger(Event.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n\n // compute start position\n if (this.startLevelLoaded === false) {\n // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n if (newDetails.live) {\n this.startPosition = Math.max(0, duration - this.config.liveSyncDurationCount * newDetails.targetduration);\n }\n this.nextLoadPosition = this.startPosition;\n this.startLevelLoaded = true;\n }\n // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n if (this.state === State.WAITING_LEVEL) {\n this.state = State.IDLE;\n }\n //trigger handler right now\n this.tick();\n }\n\n onKeyLoaded() {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n\n onFragLoaded(event, data) {\n var fragCurrent = this.fragCurrent;\n if (this.state === State.FRAG_LOADING &&\n fragCurrent &&\n data.frag.level === fragCurrent.level &&\n data.frag.sn === fragCurrent.sn) {\n if (this.fragBitrateTest === true) {\n // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n this.state = State.IDLE;\n this.fragBitrateTest = false;\n data.stats.tparsed = data.stats.tbuffered = performance.now();\n this.hls.trigger(Event.FRAG_BUFFERED, {stats: data.stats, frag: fragCurrent});\n } else {\n this.state = State.PARSING;\n // transmux the MPEG-TS data to ISO-BMFF segments\n this.stats = data.stats;\n var currentLevel = this.levels[this.level],\n details = currentLevel.details,\n duration = details.totalduration,\n start = fragCurrent.start,\n level = fragCurrent.level,\n sn = fragCurrent.sn,\n audioCodec = currentLevel.audioCodec;\n if(this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if(audioCodec === undefined) {\n audioCodec = this.lastAudioCodec;\n }\n if(audioCodec.indexOf('mp4a.40.5') !==-1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n logger.log(`Demuxing ${sn} of [${details.startSN} ,${details.endSN}],level ${level}`);\n this.demuxer.push(data.payload, audioCodec, currentLevel.videoCodec, start, fragCurrent.cc, level, sn, duration, fragCurrent.decryptdata);\n }\n }\n this.fragLoadError = 0;\n }\n\n onInitSegment(event, data) {\n if (this.state === State.PARSING) {\n // check if codecs have been explicitely defined in the master playlist for this level;\n // if yes use these ones instead of the ones parsed from the demux\n var audioCodec = this.levels[this.level].audioCodec, videoCodec = this.levels[this.level].videoCodec, sb;\n this.lastAudioCodec = data.audioCodec;\n if(audioCodec && this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if(audioCodec.indexOf('mp4a.40.5') !==-1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n logger.log(`playlist_level/init_segment codecs: video => ${videoCodec}/${data.videoCodec}; audio => ${audioCodec}/${data.audioCodec}`);\n // if playlist does not specify codecs, use codecs found while parsing fragment\n // if no codec found while parsing fragment, also set codec to undefined to avoid creating sourceBuffer\n if (audioCodec === undefined || data.audioCodec === undefined) {\n audioCodec = data.audioCodec;\n }\n\n if (videoCodec === undefined || data.videoCodec === undefined) {\n videoCodec = data.videoCodec;\n }\n // in case several audio codecs might be used, force HE-AAC for audio (some browsers don't support audio codec switch)\n //don't do it for mono streams ...\n var ua = navigator.userAgent.toLowerCase();\n if (this.audiocodecswitch &&\n data.audioChannelCount !== 1 &&\n ua.indexOf('android') === -1 &&\n ua.indexOf('firefox') === -1) {\n audioCodec = 'mp4a.40.5';\n }\n if (!this.sourceBuffer) {\n this.sourceBuffer = {};\n logger.log(`selected A/V codecs for sourceBuffers:${audioCodec},${videoCodec}`);\n // create source Buffer and link them to MediaSource\n if (audioCodec) {\n sb = this.sourceBuffer.audio = this.mediaSource.addSourceBuffer(`video/mp4;codecs=${audioCodec}`);\n sb.addEventListener('updateend', this.onsbue);\n sb.addEventListener('error', this.onsbe);\n }\n if (videoCodec) {\n sb = this.sourceBuffer.video = this.mediaSource.addSourceBuffer(`video/mp4;codecs=${videoCodec}`);\n sb.addEventListener('updateend', this.onsbue);\n sb.addEventListener('error', this.onsbe);\n }\n }\n if (audioCodec) {\n this.mp4segments.push({type: 'audio', data: data.audioMoov});\n }\n if(videoCodec) {\n this.mp4segments.push({type: 'video', data: data.videoMoov});\n }\n //trigger handler right now\n this.tick();\n }\n }\n\n onFragParsing(event, data) {\n if (this.state === State.PARSING) {\n this.tparse2 = Date.now();\n var level = this.levels[this.level],\n frag = this.fragCurrent;\n logger.log(`parsed ${data.type},PTS:[${data.startPTS.toFixed(3)},${data.endPTS.toFixed(3)}],DTS:[${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}],nb:${data.nb}`);\n var drift = LevelHelper.updateFragPTS(level.details,frag.sn,data.startPTS,data.endPTS);\n this.hls.trigger(Event.LEVEL_PTS_UPDATED, {details: level.details, level: this.level, drift: drift});\n\n this.mp4segments.push({type: data.type, data: data.moof});\n this.mp4segments.push({type: data.type, data: data.mdat});\n this.nextLoadPosition = data.endPTS;\n this.bufferRange.push({type: data.type, start: data.startPTS, end: data.endPTS, frag: frag});\n\n //trigger handler right now\n this.tick();\n } else {\n logger.warn(`not in PARSING state, discarding ${event}`);\n }\n }\n\n onFragParsed() {\n if (this.state === State.PARSING) {\n this.state = State.PARSED;\n this.stats.tparsed = performance.now();\n //trigger handler right now\n this.tick();\n }\n }\n\n onError(event, data) {\n switch(data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n if(!data.fatal) {\n var loadError = this.fragLoadError;\n if(loadError) {\n loadError++;\n } else {\n loadError=1;\n }\n if (loadError <= this.config.fragLoadingMaxRetry) {\n this.fragLoadError = loadError;\n // reset load counter to avoid frag loop loading error\n data.frag.loadCounter = 0;\n // exponential backoff capped to 64s\n var delay = Math.min(Math.pow(2,loadError-1)*this.config.fragLoadingRetryDelay,64000);\n logger.warn(`mediaController: frag loading failed, retry in ${delay} ms`);\n this.retryDate = performance.now() + delay;\n // retry loading state\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`);\n // redispatch same error but with fatal set to true\n data.fatal = true;\n this.hls.trigger(event, data);\n this.state = State.ERROR;\n }\n }\n break;\n case ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n // if fatal error, stop processing, otherwise move to IDLE to retry loading\n logger.warn(`mediaController: ${data.details} while loading frag,switch to ${data.fatal ? 'ERROR' : 'IDLE'} state ...`);\n this.state = data.fatal ? State.ERROR : State.IDLE;\n break;\n default:\n break;\n }\n }\n\n onSBUpdateEnd() {\n //trigger handler right now\n if (this.state === State.APPENDING && this.mp4segments.length === 0) {\n var frag = this.fragCurrent, stats = this.stats;\n if (frag) {\n this.fragPrevious = frag;\n stats.tbuffered = performance.now();\n this.fragLastKbps = Math.round(8 * stats.length / (stats.tbuffered - stats.tfirst));\n this.hls.trigger(Event.FRAG_BUFFERED, {stats: stats, frag: frag});\n logger.log(`media buffered : ${this.timeRangesToString(this.media.buffered)}`);\n this.state = State.IDLE;\n }\n }\n this.tick();\n }\n\n_checkBuffer() {\n var media = this.media;\n if(media) {\n // compare readyState\n var readyState = media.readyState;\n // if ready state different from HAVE_NOTHING (numeric value 0), we are allowed to seek\n if(readyState) {\n // if seek after buffered defined, let's seek if within acceptable range\n var seekAfterBuffered = this.seekAfterBuffered;\n if(seekAfterBuffered) {\n if(media.duration >= seekAfterBuffered) {\n media.currentTime = seekAfterBuffered;\n this.seekAfterBuffered = undefined;\n }\n } else {\n var currentTime = media.currentTime,\n bufferInfo = this.bufferInfo(currentTime,0),\n isPlaying = !(media.paused || media.ended || media.seeking || readyState < 3),\n jumpThreshold = 0.2;\n\n // check buffer upfront\n // if less than 200ms is buffered, and media is playing but playhead is not moving,\n // and we have a new buffer range available upfront, let's seek to that one\n if(bufferInfo.len <= jumpThreshold) {\n if(currentTime > media.playbackRate*this.lastCurrentTime || !isPlaying) {\n // playhead moving or media not playing\n jumpThreshold = 0;\n } else {\n logger.trace('playback seems stuck');\n }\n // if we are below threshold, try to jump if next buffer range is close\n if(bufferInfo.len <= jumpThreshold) {\n // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a 300 ms range)\n var nextBufferStart = bufferInfo.nextStart, delta = nextBufferStart-currentTime;\n if(nextBufferStart &&\n (delta < 0.3) &&\n (delta > 0.005) &&\n !media.seeking) {\n // next buffer is close ! adjust currentTime to nextBufferStart\n // this will ensure effective video decoding\n logger.log(`adjust currentTime from ${currentTime} to ${nextBufferStart}`);\n media.currentTime = nextBufferStart;\n }\n }\n }\n }\n }\n }\n }\n\n swapAudioCodec() {\n this.audioCodecSwap = !this.audioCodecSwap;\n }\n\n onSBUpdateError(event) {\n logger.error(`sourceBuffer error:${event}`);\n this.state = State.ERROR;\n // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n // this error might not always be fatal (it is fatal if decode error is set, in that case\n // it will be followed by a mediaElement error ...)\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false, frag: this.fragCurrent});\n }\n\n timeRangesToString(r) {\n var log = '', len = r.length;\n for (var i=0; i {\n if(level.videoCodec) {\n videoCodecFound = true;\n }\n if(level.audioCodec) {\n audioCodecFound = true;\n }\n var redundantLevelId = bitrateSet[level.bitrate];\n if (redundantLevelId === undefined) {\n bitrateSet[level.bitrate] = levels0.length;\n level.url = [level.url];\n level.urlId = 0;\n levels0.push(level);\n } else {\n levels0[redundantLevelId].url.push(level.url);\n }\n });\n\n // remove audio-only level if we also have levels with audio+video codecs signalled\n if(videoCodecFound && audioCodecFound) {\n levels0.forEach(level => {\n if(level.videoCodec) {\n levels.push(level);\n }\n });\n } else {\n levels = levels0;\n }\n\n // only keep level with supported audio/video codecs\n levels = levels.filter(function(level) {\n var checkSupported = function(codec) { return MediaSource.isTypeSupported(`video/mp4;codecs=${codec}`);};\n var audioCodec = level.audioCodec, videoCodec = level.videoCodec;\n\n return (!audioCodec || checkSupported(audioCodec)) &&\n (!videoCodec || checkSupported(videoCodec));\n });\n\n if(levels.length) {\n // start bitrate is the first bitrate of the manifest\n bitrateStart = levels[0].bitrate;\n // sort level on bitrate\n levels.sort(function (a, b) {\n return a.bitrate - b.bitrate;\n });\n this._levels = levels;\n // find index of first level in sorted levels\n for (i = 0; i < levels.length; i++) {\n if (levels[i].bitrate === bitrateStart) {\n this._firstLevel = i;\n logger.log(`manifest loaded,${levels.length} level(s) found, first bitrate:${bitrateStart}`);\n break;\n }\n }\n hls.trigger(Event.MANIFEST_PARSED, {levels: this._levels, firstLevel: this._firstLevel, stats: data.stats});\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: hls.url, reason: 'no compatible level found in manifest'});\n }\n return;\n }\n\n get levels() {\n return this._levels;\n }\n\n get level() {\n return this._level;\n }\n\n set level(newLevel) {\n if (this._level !== newLevel || this._levels[newLevel].details === undefined) {\n this.setLevelInternal(newLevel);\n }\n }\n\n setLevelInternal(newLevel) {\n // check if level idx is valid\n if (newLevel >= 0 && newLevel < this._levels.length) {\n // stopping live reloading timer if any\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n this._level = newLevel;\n logger.log(`switching to level ${newLevel}`);\n this.hls.trigger(Event.LEVEL_SWITCH, {level: newLevel});\n var level = this._levels[newLevel];\n // check if we need to load playlist for this level\n if (level.details === undefined || level.details.live === true) {\n // level not retrieved yet, or live playlist we need to (re)load it\n logger.log(`(re)loading playlist for level ${newLevel}`);\n var urlId = level.urlId;\n this.hls.trigger(Event.LEVEL_LOADING, {url: level.url[urlId], level: newLevel, id: urlId});\n }\n } else {\n // invalid level id given, trigger error\n this.hls.trigger(Event.ERROR, {type : ErrorTypes.OTHER_ERROR, details: ErrorDetails.LEVEL_SWITCH_ERROR, level: newLevel, fatal: false, reason: 'invalid level idx'});\n }\n }\n\n get manualLevel() {\n return this._manualLevel;\n }\n\n set manualLevel(newLevel) {\n this._manualLevel = newLevel;\n if (newLevel !== -1) {\n this.level = newLevel;\n }\n }\n\n get firstLevel() {\n return this._firstLevel;\n }\n\n set firstLevel(newLevel) {\n this._firstLevel = newLevel;\n }\n\n get startLevel() {\n if (this._startLevel === undefined) {\n return this._firstLevel;\n } else {\n return this._startLevel;\n }\n }\n\n set startLevel(newLevel) {\n this._startLevel = newLevel;\n }\n\n onError(data) {\n if(data.fatal) {\n return;\n }\n\n var details = data.details, hls = this.hls, levelId, level;\n // try to recover not fatal errors\n switch(details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n case ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n levelId = data.frag.level;\n break;\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n levelId = data.level;\n break;\n default:\n break;\n }\n /* try to switch to a redundant stream if any available.\n * if no redundant stream available, emergency switch down (if in auto mode and current level not 0)\n * otherwise, we cannot recover this network error ...\n * don't raise FRAG_LOAD_ERROR and FRAG_LOAD_TIMEOUT as fatal, as it is handled by mediaController\n */\n if (levelId !== undefined) {\n level = this._levels[levelId];\n if (level.urlId < (level.url.length - 1)) {\n level.urlId++;\n level.details = undefined;\n logger.warn(`level controller,${details} for level ${levelId}: switching to redundant stream id ${level.urlId}`);\n } else {\n // we could try to recover if in auto mode and current level not lowest level (0)\n let recoverable = ((this._manualLevel === -1) && levelId);\n if (recoverable) {\n logger.warn(`level controller,${details}: emergency switch-down for next fragment`);\n hls.abrController.nextAutoLevel = 0;\n } else if(level && level.details && level.details.live) {\n logger.warn(`level controller,${details} on live stream, discard`);\n // FRAG_LOAD_ERROR and FRAG_LOAD_TIMEOUT are handled by mediaController\n } else if (details !== ErrorDetails.FRAG_LOAD_ERROR && details !== ErrorDetails.FRAG_LOAD_TIMEOUT) {\n logger.error(`cannot recover ${details} error`);\n this._level = undefined;\n // stopping live reloading timer if any\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n // redispatch same error but with fatal set to true\n data.fatal = true;\n hls.trigger(event, data);\n }\n }\n }\n }\n\n onLevelLoaded(data) {\n // check if current playlist is a live playlist\n if (data.details.live && !this.timer) {\n // if live playlist we will have to reload it periodically\n // set reload period to playlist target duration\n this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);\n }\n if (!data.details.live && this.timer) {\n // playlist is not live and timer is armed : stopping it\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n\n tick() {\n var levelId = this._level;\n if (levelId !== undefined) {\n var level = this._levels[levelId], urlId = level.urlId;\n this.hls.trigger(Event.LEVEL_LOADING, {url: level.url[urlId], level: levelId, id: urlId});\n }\n }\n\n nextLoadLevel() {\n if (this._manualLevel !== -1) {\n return this._manualLevel;\n } else {\n return this.hls.abrController.nextAutoLevel;\n }\n }\n}\n\nexport default LevelController;\n\n", + "/*\n * MSE Media Controller\n*/\n\nimport Demuxer from '../demux/demuxer';\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport {logger} from '../utils/logger';\nimport BinarySearch from '../utils/binary-search';\nimport LevelHelper from '../helper/level-helper';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nconst State = {\n ERROR : -2,\n STARTING : -1,\n IDLE : 0,\n KEY_LOADING : 1,\n FRAG_LOADING : 2,\n FRAG_LOADING_WAITING_RETRY : 3,\n WAITING_LEVEL : 4,\n PARSING : 5,\n PARSED : 6,\n APPENDING : 7,\n BUFFER_FLUSHING : 8\n};\n\nclass MSEMediaController extends EventHandler {\n\n constructor(hls) {\n super(hls, Event.MEDIA_ATTACHING,\n Event.MEDIA_DETACHING,\n Event.MANIFEST_PARSED,\n Event.LEVEL_LOADED,\n Event.KEY_LOADED,\n Event.FRAG_LOADED,\n Event.FRAG_PARSING_INIT_SEGMENT,\n Event.FRAG_PARSING_DATA,\n Event.FRAG_PARSED,\n Event.ERROR);\n this.config = hls.config;\n this.audioCodecSwap = false;\n this.ticks = 0;\n // Source Buffer listeners\n this.onsbue = this.onSBUpdateEnd.bind(this);\n this.onsbe = this.onSBUpdateError.bind(this);\n this.ontick = this.tick.bind(this);\n }\n\n destroy() {\n this.stop();\n EventHandler.prototype.destroy.call(this);\n this.state = State.IDLE;\n }\n\n startLoad() {\n if (this.levels && this.media) {\n this.startInternal();\n if (this.lastCurrentTime) {\n logger.log(`seeking @ ${this.lastCurrentTime}`);\n if (!this.lastPaused) {\n logger.log('resuming video');\n this.media.play();\n }\n this.state = State.IDLE;\n } else {\n this.lastCurrentTime = 0;\n this.state = State.STARTING;\n }\n this.nextLoadPosition = this.startPosition = this.lastCurrentTime;\n this.tick();\n } else {\n logger.warn('cannot start loading as either manifest not parsed or video not attached');\n }\n }\n\n startInternal() {\n var hls = this.hls;\n this.stop();\n this.demuxer = new Demuxer(hls);\n this.timer = setInterval(this.ontick, 100);\n this.level = -1;\n this.fragLoadError = 0;\n }\n\n stop() {\n this.mp4segments = [];\n this.flushRange = [];\n this.bufferRange = [];\n var frag = this.fragCurrent;\n if (frag) {\n if (frag.loader) {\n frag.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n if (this.sourceBuffer) {\n for(var type in this.sourceBuffer) {\n var sb = this.sourceBuffer[type];\n try {\n this.mediaSource.removeSourceBuffer(sb);\n sb.removeEventListener('updateend', this.onsbue);\n sb.removeEventListener('error', this.onsbe);\n } catch(err) {\n }\n }\n this.sourceBuffer = null;\n }\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n if (this.demuxer) {\n this.demuxer.destroy();\n this.demuxer = null;\n }\n }\n\n tick() {\n this.ticks++;\n if (this.ticks === 1) {\n this.doTick();\n if (this.ticks > 1) {\n setTimeout(this.tick, 1);\n }\n this.ticks = 0;\n }\n }\n\n doTick() {\n var pos, level, levelDetails, hls = this.hls;\n switch(this.state) {\n case State.ERROR:\n //don't do anything in error state to avoid breaking further ...\n break;\n case State.STARTING:\n // determine load level\n this.startLevel = hls.startLevel;\n if (this.startLevel === -1) {\n // -1 : guess start Level by doing a bitrate test by loading first fragment of lowest quality level\n this.startLevel = 0;\n this.fragBitrateTest = true;\n }\n // set new level to playlist loader : this will trigger start level load\n this.level = hls.nextLoadLevel = this.startLevel;\n this.state = State.WAITING_LEVEL;\n this.loadedmetadata = false;\n break;\n case State.IDLE:\n // if video detached or unbound exit loop\n if (!this.media) {\n break;\n }\n // determine next candidate fragment to be loaded, based on current position and\n // end of buffer position\n // ensure 60s of buffer upfront\n // if we have not yet loaded any fragment, start loading from start position\n if (this.loadedmetadata) {\n pos = this.media.currentTime;\n } else {\n pos = this.nextLoadPosition;\n }\n // determine next load level\n if (this.startFragmentRequested === false) {\n level = this.startLevel;\n } else {\n // we are not at playback start, get next load level from level Controller\n level = hls.nextLoadLevel;\n }\n var bufferInfo = this.bufferInfo(pos,this.config.maxBufferHole),\n bufferLen = bufferInfo.len,\n bufferEnd = bufferInfo.end,\n fragPrevious = this.fragPrevious,\n maxBufLen;\n // compute max Buffer Length that we could get from this load level, based on level bitrate. don't buffer more than 60 MB and more than 30s\n if ((this.levels[level]).hasOwnProperty('bitrate')) {\n maxBufLen = Math.max(8 * this.config.maxBufferSize / this.levels[level].bitrate, this.config.maxBufferLength);\n maxBufLen = Math.min(maxBufLen, this.config.maxMaxBufferLength);\n } else {\n maxBufLen = this.config.maxBufferLength;\n }\n // if buffer length is less than maxBufLen try to load a new fragment\n if (bufferLen < maxBufLen) {\n // set next load level : this will trigger a playlist load if needed\n hls.nextLoadLevel = level;\n this.level = level;\n levelDetails = this.levels[level].details;\n // if level info not retrieved yet, switch state and wait for level retrieval\n // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load\n // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist)\n if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) {\n this.state = State.WAITING_LEVEL;\n break;\n }\n // find fragment index, contiguous with end of buffer position\n let fragments = levelDetails.fragments,\n fragLen = fragments.length,\n start = fragments[0].start,\n end = fragments[fragLen-1].start + fragments[fragLen-1].duration,\n frag;\n\n // in case of live playlist we need to ensure that requested position is not located before playlist start\n if (levelDetails.live) {\n // check if requested position is within seekable boundaries :\n //logger.log(`start/pos/bufEnd/seeking:${start.toFixed(3)}/${pos.toFixed(3)}/${bufferEnd.toFixed(3)}/${this.media.seeking}`);\n if (bufferEnd < Math.max(start,end-this.config.liveMaxLatencyDurationCount*levelDetails.targetduration)) {\n this.seekAfterBuffered = start + Math.max(0, levelDetails.totalduration - this.config.liveSyncDurationCount * levelDetails.targetduration);\n logger.log(`buffer end: ${bufferEnd} is located too far from the end of live sliding playlist, media position will be reseted to: ${this.seekAfterBuffered.toFixed(3)}`);\n bufferEnd = this.seekAfterBuffered;\n }\n if (this.startFragmentRequested && !levelDetails.PTSKnown) {\n /* we are switching level on live playlist, but we don't have any PTS info for that quality level ...\n try to load frag matching with next SN.\n even if SN are not synchronized between playlists, loading this frag will help us\n compute playlist sliding and find the right one after in case it was not the right consecutive one */\n if (fragPrevious) {\n var targetSN = fragPrevious.sn + 1;\n if (targetSN >= levelDetails.startSN && targetSN <= levelDetails.endSN) {\n frag = fragments[targetSN - levelDetails.startSN];\n logger.log(`live playlist, switching playlist, load frag with next SN: ${frag.sn}`);\n }\n }\n if (!frag) {\n /* we have no idea about which fragment should be loaded.\n so let's load mid fragment. it will help computing playlist sliding and find the right one\n */\n frag = fragments[Math.min(fragLen - 1, Math.round(fragLen / 2))];\n logger.log(`live playlist, switching playlist, unknown, load middle frag : ${frag.sn}`);\n }\n }\n } else {\n // VoD playlist: if bufferEnd before start of playlist, load first fragment\n if (bufferEnd < start) {\n frag = fragments[0];\n }\n }\n if (!frag) {\n var foundFrag;\n if (bufferEnd < end) {\n foundFrag = BinarySearch.search(fragments, (candidate) => {\n //logger.log(`level/sn/start/end/bufEnd:${level}/${candidate.sn}/${candidate.start}/${(candidate.start+candidate.duration)}/${bufferEnd}`);\n // offset should be within fragment boundary\n if ((candidate.start + candidate.duration) <= bufferEnd) {\n return 1;\n }\n else if (candidate.start > bufferEnd) {\n return -1;\n }\n return 0;\n });\n } else {\n // reach end of playlist\n foundFrag = fragments[fragLen-1];\n }\n if (foundFrag) {\n frag = foundFrag;\n start = foundFrag.start;\n //logger.log('find SN matching with pos:' + bufferEnd + ':' + frag.sn);\n if (fragPrevious && frag.level === fragPrevious.level && frag.sn === fragPrevious.sn) {\n if (frag.sn < levelDetails.endSN) {\n frag = fragments[frag.sn + 1 - levelDetails.startSN];\n logger.log(`SN just loaded, load next one: ${frag.sn}`);\n } else {\n // have we reached end of VOD playlist ?\n if (!levelDetails.live) {\n var mediaSource = this.mediaSource;\n if (mediaSource && mediaSource.readyState === 'open') {\n // ensure sourceBuffer are not in updating states\n var sb = this.sourceBuffer;\n if (!((sb.audio && sb.audio.updating) || (sb.video && sb.video.updating))) {\n logger.log('all media data available, signal endOfStream() to MediaSource');\n //Notify the media element that it now has all of the media data\n mediaSource.endOfStream();\n }\n }\n }\n frag = null;\n }\n }\n }\n }\n if(frag) {\n //logger.log(' loading frag ' + i +',pos/bufEnd:' + pos.toFixed(3) + '/' + bufferEnd.toFixed(3));\n if ((frag.decryptdata.uri != null) && (frag.decryptdata.key == null)) {\n logger.log(`Loading key for ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}`);\n this.state = State.KEY_LOADING;\n hls.trigger(Event.KEY_LOADING, {frag: frag});\n } else {\n logger.log(`Loading ${frag.sn} of [${levelDetails.startSN} ,${levelDetails.endSN}],level ${level}, currentTime:${pos},bufferEnd:${bufferEnd.toFixed(3)}`);\n frag.autoLevel = hls.autoLevelEnabled;\n if (this.levels.length > 1) {\n frag.expectedLen = Math.round(frag.duration * this.levels[level].bitrate / 8);\n frag.trequest = performance.now();\n }\n // ensure that we are not reloading the same fragments in loop ...\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx++;\n } else {\n this.fragLoadIdx = 0;\n }\n if (frag.loadCounter) {\n frag.loadCounter++;\n let maxThreshold = this.config.fragLoadingLoopThreshold;\n // if this frag has already been loaded 3 times, and if it has been reloaded recently\n if (frag.loadCounter > maxThreshold && (Math.abs(this.fragLoadIdx - frag.loadIdx) < maxThreshold)) {\n hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_LOOP_LOADING_ERROR, fatal: false, frag: frag});\n return;\n }\n } else {\n frag.loadCounter = 1;\n }\n frag.loadIdx = this.fragLoadIdx;\n this.fragCurrent = frag;\n this.startFragmentRequested = true;\n hls.trigger(Event.FRAG_LOADING, {frag: frag});\n this.state = State.FRAG_LOADING;\n }\n }\n }\n break;\n case State.WAITING_LEVEL:\n level = this.levels[this.level];\n // check if playlist is already loaded\n if (level && level.details) {\n this.state = State.IDLE;\n }\n break;\n case State.FRAG_LOADING:\n /*\n monitor fragment retrieval time...\n we compute expected time of arrival of the complete fragment.\n we compare it to expected time of buffer starvation\n */\n let v = this.media,frag = this.fragCurrent;\n /* only monitor frag retrieval time if\n (video not paused OR first fragment being loaded) AND autoswitching enabled AND not lowest level AND multiple levels */\n if (v && (!v.paused || this.loadedmetadata === false) && frag.autoLevel && this.level && this.levels.length > 1) {\n var requestDelay = performance.now() - frag.trequest;\n // monitor fragment load progress after half of expected fragment duration,to stabilize bitrate\n if (requestDelay > (500 * frag.duration)) {\n var loadRate = frag.loaded * 1000 / requestDelay; // byte/s\n if (frag.expectedLen < frag.loaded) {\n frag.expectedLen = frag.loaded;\n }\n pos = v.currentTime;\n var fragLoadedDelay = (frag.expectedLen - frag.loaded) / loadRate;\n var bufferStarvationDelay = this.bufferInfo(pos,this.config.maxBufferHole).end - pos;\n var fragLevelNextLoadedDelay = frag.duration * this.levels[hls.nextLoadLevel].bitrate / (8 * loadRate); //bps/Bps\n /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer starvation delay\n ... and also bigger than duration needed to load fragment at next level ...*/\n if (bufferStarvationDelay < (2 * frag.duration) && fragLoadedDelay > bufferStarvationDelay && fragLoadedDelay > fragLevelNextLoadedDelay) {\n // abort fragment loading ...\n logger.warn('loading too slow, abort fragment loading');\n logger.log(`fragLoadedDelay/bufferStarvationDelay/fragLevelNextLoadedDelay :${fragLoadedDelay.toFixed(1)}/${bufferStarvationDelay.toFixed(1)}/${fragLevelNextLoadedDelay.toFixed(1)}`);\n //abort fragment loading\n frag.loader.abort();\n hls.trigger(Event.FRAG_LOAD_EMERGENCY_ABORTED, {frag: frag});\n // switch back to IDLE state to request new fragment at lowest level\n this.state = State.IDLE;\n }\n }\n }\n break;\n case State.FRAG_LOADING_WAITING_RETRY:\n var now = performance.now();\n var retryDate = this.retryDate;\n var media = this.media;\n var isSeeking = media && media.seeking;\n // if current time is gt than retryDate, or if media seeking let's switch to IDLE state to retry loading\n if(!retryDate || (now >= retryDate) || isSeeking) {\n logger.log(`mediaController: retryDate reached, switch back to IDLE state`);\n this.state = State.IDLE;\n }\n break;\n case State.PARSING:\n // nothing to do, wait for fragment being parsed\n break;\n case State.PARSED:\n case State.APPENDING:\n if (this.sourceBuffer) {\n if (this.media.error) {\n logger.error('trying to append although a media error occured, switch to ERROR state');\n this.state = State.ERROR;\n return;\n }\n // if MP4 segment appending in progress nothing to do\n else if ((this.sourceBuffer.audio && this.sourceBuffer.audio.updating) ||\n (this.sourceBuffer.video && this.sourceBuffer.video.updating)) {\n //logger.log('sb append in progress');\n // check if any MP4 segments left to append\n } else if (this.mp4segments.length) {\n var segment = this.mp4segments.shift();\n try {\n //logger.log(`appending ${segment.type} SB, size:${segment.data.length});\n this.sourceBuffer[segment.type].appendBuffer(segment.data);\n this.appendError = 0;\n } catch(err) {\n // in case any error occured while appending, put back segment in mp4segments table\n logger.error(`error while trying to append buffer:${err.message},try appending later`);\n this.mp4segments.unshift(segment);\n // just discard QuotaExceededError for now, and wait for the natural browser buffer eviction\n //http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror\n if(err.code !== 22) {\n if (this.appendError) {\n this.appendError++;\n } else {\n this.appendError = 1;\n }\n var event = {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent};\n /* with UHD content, we could get loop of quota exceeded error until\n browser is able to evict some data from sourcebuffer. retrying help recovering this\n */\n if (this.appendError > this.config.appendErrorMaxRetry) {\n logger.log(`fail ${this.config.appendErrorMaxRetry} times to append segment in sourceBuffer`);\n event.fatal = true;\n hls.trigger(Event.ERROR, event);\n this.state = State.ERROR;\n return;\n } else {\n event.fatal = false;\n hls.trigger(Event.ERROR, event);\n }\n }\n }\n this.state = State.APPENDING;\n }\n } else {\n // sourceBuffer undefined, switch back to IDLE state\n this.state = State.IDLE;\n }\n break;\n case State.BUFFER_FLUSHING:\n // loop through all buffer ranges to flush\n while(this.flushRange.length) {\n var range = this.flushRange[0];\n // flushBuffer will abort any buffer append in progress and flush Audio/Video Buffer\n if (this.flushBuffer(range.start, range.end)) {\n // range flushed, remove from flush array\n this.flushRange.shift();\n } else {\n // flush in progress, come back later\n break;\n }\n }\n if (this.flushRange.length === 0) {\n // handle end of immediate switching if needed\n if (this.immediateSwitch) {\n this.immediateLevelSwitchEnd();\n }\n // move to IDLE once flush complete. this should trigger new fragment loading\n this.state = State.IDLE;\n // reset reference to frag\n this.fragPrevious = null;\n }\n /* if not everything flushed, stay in BUFFER_FLUSHING state. we will come back here\n each time sourceBuffer updateend() callback will be triggered\n */\n break;\n default:\n break;\n }\n // check buffer\n this._checkBuffer();\n // check/update current fragment\n this._checkFragmentChanged();\n }\n\n\n bufferInfo(pos,maxHoleDuration) {\n var media = this.media,\n vbuffered = media.buffered,\n buffered = [],i;\n for (i = 0; i < vbuffered.length; i++) {\n buffered.push({start: vbuffered.start(i), end: vbuffered.end(i)});\n }\n return this.bufferedInfo(buffered,pos,maxHoleDuration);\n }\n\n bufferedInfo(buffered,pos,maxHoleDuration) {\n var buffered2 = [],\n // bufferStart and bufferEnd are buffer boundaries around current video position\n bufferLen,bufferStart, bufferEnd,bufferStartNext,i;\n // sort on buffer.start/smaller end (IE does not always return sorted buffered range)\n buffered.sort(function (a, b) {\n var diff = a.start - b.start;\n if (diff) {\n return diff;\n } else {\n return b.end - a.end;\n }\n });\n // there might be some small holes between buffer time range\n // consider that holes smaller than maxHoleDuration are irrelevant and build another\n // buffer time range representations that discards those holes\n for (i = 0; i < buffered.length; i++) {\n var buf2len = buffered2.length;\n if(buf2len) {\n var buf2end = buffered2[buf2len - 1].end;\n // if small hole (value between 0 or maxHoleDuration ) or overlapping (negative)\n if((buffered[i].start - buf2end) < maxHoleDuration) {\n // merge overlapping time ranges\n // update lastRange.end only if smaller than item.end\n // e.g. [ 1, 15] with [ 2,8] => [ 1,15] (no need to modify lastRange.end)\n // whereas [ 1, 8] with [ 2,15] => [ 1,15] ( lastRange should switch from [1,8] to [1,15])\n if(buffered[i].end > buf2end) {\n buffered2[buf2len - 1].end = buffered[i].end;\n }\n } else {\n // big hole\n buffered2.push(buffered[i]);\n }\n } else {\n // first value\n buffered2.push(buffered[i]);\n }\n }\n for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {\n var start = buffered2[i].start,\n end = buffered2[i].end;\n //logger.log('buf start/end:' + buffered.start(i) + '/' + buffered.end(i));\n if ((pos + maxHoleDuration) >= start && pos < end) {\n // play position is inside this buffer TimeRange, retrieve end of buffer position and buffer length\n bufferStart = start;\n bufferEnd = end + maxHoleDuration;\n bufferLen = bufferEnd - pos;\n } else if ((pos + maxHoleDuration) < start) {\n bufferStartNext = start;\n break;\n }\n }\n return {len: bufferLen, start: bufferStart, end: bufferEnd, nextStart : bufferStartNext};\n }\n\n getBufferRange(position) {\n var i, range;\n for (i = this.bufferRange.length - 1; i >=0; i--) {\n range = this.bufferRange[i];\n if (position >= range.start && position <= range.end) {\n return range;\n }\n }\n return null;\n }\n\n get currentLevel() {\n if (this.media) {\n var range = this.getBufferRange(this.media.currentTime);\n if (range) {\n return range.frag.level;\n }\n }\n return -1;\n }\n\n get nextBufferRange() {\n if (this.media) {\n // first get end range of current fragment\n return this.followingBufferRange(this.getBufferRange(this.media.currentTime));\n } else {\n return null;\n }\n }\n\n followingBufferRange(range) {\n if (range) {\n // try to get range of next fragment (500ms after this range)\n return this.getBufferRange(range.end + 0.5);\n }\n return null;\n }\n\n get nextLevel() {\n var range = this.nextBufferRange;\n if (range) {\n return range.frag.level;\n } else {\n return -1;\n }\n }\n\n isBuffered(position) {\n var v = this.media, buffered = v.buffered;\n for (var i = 0; i < buffered.length; i++) {\n if (position >= buffered.start(i) && position <= buffered.end(i)) {\n return true;\n }\n }\n return false;\n }\n\n _checkFragmentChanged() {\n var rangeCurrent, currentTime, video = this.media;\n if (video && video.seeking === false) {\n currentTime = video.currentTime;\n /* if video element is in seeked state, currentTime can only increase.\n (assuming that playback rate is positive ...)\n As sometimes currentTime jumps back to zero after a\n media decode error, check this, to avoid seeking back to\n wrong position after a media decode error\n */\n if(currentTime > video.playbackRate*this.lastCurrentTime) {\n this.lastCurrentTime = currentTime;\n }\n if (this.isBuffered(currentTime)) {\n rangeCurrent = this.getBufferRange(currentTime);\n } else if (this.isBuffered(currentTime + 0.1)) {\n /* ensure that FRAG_CHANGED event is triggered at startup,\n when first video frame is displayed and playback is paused.\n add a tolerance of 100ms, in case current position is not buffered,\n check if current pos+100ms is buffered and use that buffer range\n for FRAG_CHANGED event reporting */\n rangeCurrent = this.getBufferRange(currentTime + 0.1);\n }\n if (rangeCurrent) {\n var fragPlaying = rangeCurrent.frag;\n if (fragPlaying !== this.fragPlaying) {\n this.fragPlaying = fragPlaying;\n this.hls.trigger(Event.FRAG_CHANGED, {frag: fragPlaying});\n }\n }\n }\n }\n\n /*\n abort any buffer append in progress, and flush all buffered data\n return true once everything has been flushed.\n sourceBuffer.abort() and sourceBuffer.remove() are asynchronous operations\n the idea is to call this function from tick() timer and call it again until all resources have been cleaned\n the timer is rearmed upon sourceBuffer updateend() event, so this should be optimal\n */\n flushBuffer(startOffset, endOffset) {\n var sb, i, bufStart, bufEnd, flushStart, flushEnd;\n //logger.log('flushBuffer,pos/start/end: ' + this.media.currentTime + '/' + startOffset + '/' + endOffset);\n // safeguard to avoid infinite looping\n if (this.flushBufferCounter++ < (2 * this.bufferRange.length) && this.sourceBuffer) {\n for (var type in this.sourceBuffer) {\n sb = this.sourceBuffer[type];\n if (!sb.updating) {\n for (i = 0; i < sb.buffered.length; i++) {\n bufStart = sb.buffered.start(i);\n bufEnd = sb.buffered.end(i);\n // workaround firefox not able to properly flush multiple buffered range.\n if (navigator.userAgent.toLowerCase().indexOf('firefox') !== -1 && endOffset === Number.POSITIVE_INFINITY) {\n flushStart = startOffset;\n flushEnd = endOffset;\n } else {\n flushStart = Math.max(bufStart, startOffset);\n flushEnd = Math.min(bufEnd, endOffset);\n }\n /* sometimes sourcebuffer.remove() does not flush\n the exact expected time range.\n to avoid rounding issues/infinite loop,\n only flush buffer range of length greater than 500ms.\n */\n if (flushEnd - flushStart > 0.5) {\n logger.log(`flush ${type} [${flushStart},${flushEnd}], of [${bufStart},${bufEnd}], pos:${this.media.currentTime}`);\n sb.remove(flushStart, flushEnd);\n return false;\n }\n }\n } else {\n //logger.log('abort ' + type + ' append in progress');\n // this will abort any appending in progress\n //sb.abort();\n return false;\n }\n }\n }\n\n /* after successful buffer flushing, rebuild buffer Range array\n loop through existing buffer range and check if\n corresponding range is still buffered. only push to new array already buffered range\n */\n var newRange = [],range;\n for (i = 0; i < this.bufferRange.length; i++) {\n range = this.bufferRange[i];\n if (this.isBuffered((range.start + range.end) / 2)) {\n newRange.push(range);\n }\n }\n this.bufferRange = newRange;\n logger.log('buffer flushed');\n // everything flushed !\n return true;\n }\n\n /*\n on immediate level switch :\n - pause playback if playing\n - cancel any pending load request\n - and trigger a buffer flush\n */\n immediateLevelSwitch() {\n logger.log('immediateLevelSwitch');\n if (!this.immediateSwitch) {\n this.immediateSwitch = true;\n this.previouslyPaused = this.media.paused;\n this.media.pause();\n }\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n // flush everything\n this.flushBufferCounter = 0;\n this.flushRange.push({start: 0, end: Number.POSITIVE_INFINITY});\n // trigger a sourceBuffer flush\n this.state = State.BUFFER_FLUSHING;\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // speed up switching, trigger timer function\n this.tick();\n }\n\n /*\n on immediate level switch end, after new fragment has been buffered :\n - nudge video decoder by slightly adjusting video currentTime\n - resume the playback if needed\n */\n immediateLevelSwitchEnd() {\n this.immediateSwitch = false;\n this.media.currentTime -= 0.0001;\n if (!this.previouslyPaused) {\n this.media.play();\n }\n }\n\n nextLevelSwitch() {\n /* try to switch ASAP without breaking video playback :\n in order to ensure smooth but quick level switching,\n we need to find the next flushable buffer range\n we should take into account new segment fetch time\n */\n var fetchdelay, currentRange, nextRange;\n currentRange = this.getBufferRange(this.media.currentTime);\n if (currentRange) {\n // flush buffer preceding current fragment (flush until current fragment start offset)\n // minus 1s to avoid video freezing, that could happen if we flush keyframe of current video ...\n this.flushRange.push({start: 0, end: currentRange.start - 1});\n }\n if (!this.media.paused) {\n // add a safety delay of 1s\n var nextLevelId = this.hls.nextLoadLevel,nextLevel = this.levels[nextLevelId], fragLastKbps = this.fragLastKbps;\n if (fragLastKbps && this.fragCurrent) {\n fetchdelay = this.fragCurrent.duration * nextLevel.bitrate / (1000 * fragLastKbps) + 1;\n } else {\n fetchdelay = 0;\n }\n } else {\n fetchdelay = 0;\n }\n //logger.log('fetchdelay:'+fetchdelay);\n // find buffer range that will be reached once new fragment will be fetched\n nextRange = this.getBufferRange(this.media.currentTime + fetchdelay);\n if (nextRange) {\n // we can flush buffer range following this one without stalling playback\n nextRange = this.followingBufferRange(nextRange);\n if (nextRange) {\n // flush position is the start position of this new buffer\n this.flushRange.push({start: nextRange.start, end: Number.POSITIVE_INFINITY});\n // if we are here, we can also cancel any loading/demuxing in progress, as they are useless\n var fragCurrent = this.fragCurrent;\n if (fragCurrent && fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n }\n }\n if (this.flushRange.length) {\n this.flushBufferCounter = 0;\n // trigger a sourceBuffer flush\n this.state = State.BUFFER_FLUSHING;\n // increase fragment load Index to avoid frag loop loading error after buffer flush\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n // speed up switching, trigger timer function\n this.tick();\n }\n }\n\n onMediaAttaching(data) {\n var media = this.media = data.media;\n // setup the media source\n var ms = this.mediaSource = new MediaSource();\n //Media Source listeners\n this.onmso = this.onMediaSourceOpen.bind(this);\n this.onmse = this.onMediaSourceEnded.bind(this);\n this.onmsc = this.onMediaSourceClose.bind(this);\n ms.addEventListener('sourceopen', this.onmso);\n ms.addEventListener('sourceended', this.onmse);\n ms.addEventListener('sourceclose', this.onmsc);\n // link video and media Source\n media.src = URL.createObjectURL(ms);\n }\n\n onMediaDetaching() {\n var media = this.media;\n if (media && media.ended) {\n logger.log('MSE detaching and video ended, reset startPosition');\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n // reset fragment loading counter on MSE detaching to avoid reporting FRAG_LOOP_LOADING_ERROR after error recovery\n var levels = this.levels;\n if (levels) {\n // reset fragment load counter\n levels.forEach(level => {\n if(level.details) {\n level.details.fragments.forEach(fragment => {\n fragment.loadCounter = undefined;\n });\n }\n });\n }\n var ms = this.mediaSource;\n if (ms) {\n if (ms.readyState === 'open') {\n try {\n // endOfStream could trigger exception if any sourcebuffer is in updating state\n // we don't really care about checking sourcebuffer state here,\n // as we are anyway detaching the MediaSource\n // let's just avoid this exception to propagate\n ms.endOfStream();\n } catch(err) {\n logger.warn(`onMediaDetaching:${err.message} while calling endOfStream`);\n }\n }\n ms.removeEventListener('sourceopen', this.onmso);\n ms.removeEventListener('sourceended', this.onmse);\n ms.removeEventListener('sourceclose', this.onmsc);\n // unlink MediaSource from video tag\n this.media.src = '';\n this.mediaSource = null;\n // remove video listeners\n if (media) {\n media.removeEventListener('seeking', this.onvseeking);\n media.removeEventListener('seeked', this.onvseeked);\n media.removeEventListener('loadedmetadata', this.onvmetadata);\n media.removeEventListener('ended', this.onvended);\n this.onvseeking = this.onvseeked = this.onvmetadata = null;\n }\n this.media = null;\n this.loadedmetadata = false;\n this.stop();\n }\n this.onmso = this.onmse = this.onmsc = null;\n this.hls.trigger(Event.MEDIA_DETACHED);\n }\n\n onMediaSeeking() {\n if (this.state === State.FRAG_LOADING) {\n // check if currently loaded fragment is inside buffer.\n //if outside, cancel fragment loading, otherwise do nothing\n if (this.bufferInfo(this.media.currentTime,this.config.maxBufferHole).len === 0) {\n logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load');\n var fragCurrent = this.fragCurrent;\n if (fragCurrent) {\n if (fragCurrent.loader) {\n fragCurrent.loader.abort();\n }\n this.fragCurrent = null;\n }\n this.fragPrevious = null;\n // switch to IDLE state to load new fragment\n this.state = State.IDLE;\n }\n }\n if (this.media) {\n this.lastCurrentTime = this.media.currentTime;\n }\n // avoid reporting fragment loop loading error in case user is seeking several times on same position\n if (this.fragLoadIdx !== undefined) {\n this.fragLoadIdx += 2 * this.config.fragLoadingLoopThreshold;\n }\n // tick to speed up processing\n this.tick();\n }\n\n onMediaSeeked() {\n // tick to speed up FRAGMENT_PLAYING triggering\n this.tick();\n }\n\n onMediaMetadata() {\n var media = this.media,\n currentTime = media.currentTime;\n // only adjust currentTime if not equal to 0\n if (!currentTime && currentTime !== this.startPosition) {\n logger.log('onMediaMetadata: adjust currentTime to startPosition');\n media.currentTime = this.startPosition;\n }\n this.loadedmetadata = true;\n this.tick();\n }\n\n onMediaEnded() {\n logger.log('media ended');\n // reset startPosition and lastCurrentTime to restart playback @ stream beginning\n this.startPosition = this.lastCurrentTime = 0;\n }\n\n\n onManifestParsed(data) {\n var aac = false, heaac = false, codecs;\n data.levels.forEach(level => {\n // detect if we have different kind of audio codecs used amongst playlists\n codecs = level.codecs;\n if (codecs) {\n if (codecs.indexOf('mp4a.40.2') !== -1) {\n aac = true;\n }\n if (codecs.indexOf('mp4a.40.5') !== -1) {\n heaac = true;\n }\n }\n });\n this.audiocodecswitch = (aac && heaac);\n if (this.audiocodecswitch) {\n logger.log('both AAC/HE-AAC audio found in levels; declaring audio codec as HE-AAC');\n }\n this.levels = data.levels;\n this.startLevelLoaded = false;\n this.startFragmentRequested = false;\n if (this.media && this.config.autoStartLoad) {\n this.startLoad();\n }\n }\n\n onLevelLoaded(data) {\n var newDetails = data.details,\n newLevelId = data.level,\n curLevel = this.levels[newLevelId],\n duration = newDetails.totalduration;\n\n logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`);\n this.levelLastLoaded = newLevelId;\n\n if (newDetails.live) {\n var curDetails = curLevel.details;\n if (curDetails) {\n // we already have details for that level, merge them\n LevelHelper.mergeDetails(curDetails,newDetails);\n if (newDetails.PTSKnown) {\n logger.log(`live playlist sliding:${newDetails.fragments[0].start.toFixed(3)}`);\n } else {\n logger.log('live playlist - outdated PTS, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n logger.log('live playlist - first load, unknown sliding');\n }\n } else {\n newDetails.PTSKnown = false;\n }\n // override level info\n curLevel.details = newDetails;\n this.hls.trigger(Event.LEVEL_UPDATED, { details: newDetails, level: newLevelId });\n\n // compute start position\n if (this.startLevelLoaded === false) {\n // if live playlist, set start position to be fragment N-this.config.liveSyncDurationCount (usually 3)\n if (newDetails.live) {\n this.startPosition = Math.max(0, duration - this.config.liveSyncDurationCount * newDetails.targetduration);\n }\n this.nextLoadPosition = this.startPosition;\n this.startLevelLoaded = true;\n }\n // only switch batck to IDLE state if we were waiting for level to start downloading a new fragment\n if (this.state === State.WAITING_LEVEL) {\n this.state = State.IDLE;\n }\n //trigger handler right now\n this.tick();\n }\n\n onKeyLoaded() {\n if (this.state === State.KEY_LOADING) {\n this.state = State.IDLE;\n this.tick();\n }\n }\n\n onFragLoaded(data) {\n var fragCurrent = this.fragCurrent;\n if (this.state === State.FRAG_LOADING &&\n fragCurrent &&\n data.frag.level === fragCurrent.level &&\n data.frag.sn === fragCurrent.sn) {\n if (this.fragBitrateTest === true) {\n // switch back to IDLE state ... we just loaded a fragment to determine adequate start bitrate and initialize autoswitch algo\n this.state = State.IDLE;\n this.fragBitrateTest = false;\n data.stats.tparsed = data.stats.tbuffered = performance.now();\n this.hls.trigger(Event.FRAG_BUFFERED, {stats: data.stats, frag: fragCurrent});\n } else {\n this.state = State.PARSING;\n // transmux the MPEG-TS data to ISO-BMFF segments\n this.stats = data.stats;\n var currentLevel = this.levels[this.level],\n details = currentLevel.details,\n duration = details.totalduration,\n start = fragCurrent.start,\n level = fragCurrent.level,\n sn = fragCurrent.sn,\n audioCodec = currentLevel.audioCodec;\n if(this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if(audioCodec === undefined) {\n audioCodec = this.lastAudioCodec;\n }\n if(audioCodec.indexOf('mp4a.40.5') !==-1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n logger.log(`Demuxing ${sn} of [${details.startSN} ,${details.endSN}],level ${level}`);\n this.demuxer.push(data.payload, audioCodec, currentLevel.videoCodec, start, fragCurrent.cc, level, sn, duration, fragCurrent.decryptdata);\n }\n }\n this.fragLoadError = 0;\n }\n\n onFragParsingInitSegment(data) {\n if (this.state === State.PARSING) {\n // check if codecs have been explicitely defined in the master playlist for this level;\n // if yes use these ones instead of the ones parsed from the demux\n var audioCodec = this.levels[this.level].audioCodec, videoCodec = this.levels[this.level].videoCodec, sb;\n this.lastAudioCodec = data.audioCodec;\n if(audioCodec && this.audioCodecSwap) {\n logger.log('swapping playlist audio codec');\n if(audioCodec.indexOf('mp4a.40.5') !==-1) {\n audioCodec = 'mp4a.40.2';\n } else {\n audioCodec = 'mp4a.40.5';\n }\n }\n logger.log(`playlist_level/init_segment codecs: video => ${videoCodec}/${data.videoCodec}; audio => ${audioCodec}/${data.audioCodec}`);\n // if playlist does not specify codecs, use codecs found while parsing fragment\n // if no codec found while parsing fragment, also set codec to undefined to avoid creating sourceBuffer\n if (audioCodec === undefined || data.audioCodec === undefined) {\n audioCodec = data.audioCodec;\n }\n\n if (videoCodec === undefined || data.videoCodec === undefined) {\n videoCodec = data.videoCodec;\n }\n // in case several audio codecs might be used, force HE-AAC for audio (some browsers don't support audio codec switch)\n //don't do it for mono streams ...\n var ua = navigator.userAgent.toLowerCase();\n if (this.audiocodecswitch &&\n data.audioChannelCount !== 1 &&\n ua.indexOf('android') === -1 &&\n ua.indexOf('firefox') === -1) {\n audioCodec = 'mp4a.40.5';\n }\n if (!this.sourceBuffer) {\n this.sourceBuffer = {};\n logger.log(`selected A/V codecs for sourceBuffers:${audioCodec},${videoCodec}`);\n // create source Buffer and link them to MediaSource\n if (audioCodec) {\n sb = this.sourceBuffer.audio = this.mediaSource.addSourceBuffer(`video/mp4;codecs=${audioCodec}`);\n sb.addEventListener('updateend', this.onsbue);\n sb.addEventListener('error', this.onsbe);\n }\n if (videoCodec) {\n sb = this.sourceBuffer.video = this.mediaSource.addSourceBuffer(`video/mp4;codecs=${videoCodec}`);\n sb.addEventListener('updateend', this.onsbue);\n sb.addEventListener('error', this.onsbe);\n }\n }\n if (audioCodec) {\n this.mp4segments.push({type: 'audio', data: data.audioMoov});\n }\n if(videoCodec) {\n this.mp4segments.push({type: 'video', data: data.videoMoov});\n }\n //trigger handler right now\n this.tick();\n }\n }\n\n onFragParsingData(data) {\n if (this.state === State.PARSING) {\n this.tparse2 = Date.now();\n var level = this.levels[this.level],\n frag = this.fragCurrent;\n logger.log(`parsed ${data.type},PTS:[${data.startPTS.toFixed(3)},${data.endPTS.toFixed(3)}],DTS:[${data.startDTS.toFixed(3)}/${data.endDTS.toFixed(3)}],nb:${data.nb}`);\n var drift = LevelHelper.updateFragPTS(level.details,frag.sn,data.startPTS,data.endPTS);\n this.hls.trigger(Event.LEVEL_PTS_UPDATED, {details: level.details, level: this.level, drift: drift});\n\n this.mp4segments.push({type: data.type, data: data.moof});\n this.mp4segments.push({type: data.type, data: data.mdat});\n this.nextLoadPosition = data.endPTS;\n this.bufferRange.push({type: data.type, start: data.startPTS, end: data.endPTS, frag: frag});\n\n //trigger handler right now\n this.tick();\n } else {\n logger.warn(`not in PARSING state, ignoring FRAG_PARSING_DATA event`);\n }\n }\n\n onFragParsed() {\n if (this.state === State.PARSING) {\n this.state = State.PARSED;\n this.stats.tparsed = performance.now();\n //trigger handler right now\n this.tick();\n }\n }\n\n onError(data) {\n switch(data.details) {\n case ErrorDetails.FRAG_LOAD_ERROR:\n case ErrorDetails.FRAG_LOAD_TIMEOUT:\n if(!data.fatal) {\n var loadError = this.fragLoadError;\n if(loadError) {\n loadError++;\n } else {\n loadError=1;\n }\n if (loadError <= this.config.fragLoadingMaxRetry) {\n this.fragLoadError = loadError;\n // reset load counter to avoid frag loop loading error\n data.frag.loadCounter = 0;\n // exponential backoff capped to 64s\n var delay = Math.min(Math.pow(2,loadError-1)*this.config.fragLoadingRetryDelay,64000);\n logger.warn(`mediaController: frag loading failed, retry in ${delay} ms`);\n this.retryDate = performance.now() + delay;\n // retry loading state\n this.state = State.FRAG_LOADING_WAITING_RETRY;\n } else {\n logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`);\n // redispatch same error but with fatal set to true\n data.fatal = true;\n this.hls.trigger(Event.ERROR, data);\n this.state = State.ERROR;\n }\n }\n break;\n case ErrorDetails.FRAG_LOOP_LOADING_ERROR:\n case ErrorDetails.LEVEL_LOAD_ERROR:\n case ErrorDetails.LEVEL_LOAD_TIMEOUT:\n case ErrorDetails.KEY_LOAD_ERROR:\n case ErrorDetails.KEY_LOAD_TIMEOUT:\n // if fatal error, stop processing, otherwise move to IDLE to retry loading\n logger.warn(`mediaController: ${data.details} while loading frag,switch to ${data.fatal ? 'ERROR' : 'IDLE'} state ...`);\n this.state = data.fatal ? State.ERROR : State.IDLE;\n break;\n default:\n break;\n }\n }\n\n onSBUpdateEnd() {\n //trigger handler right now\n if (this.state === State.APPENDING && this.mp4segments.length === 0) {\n var frag = this.fragCurrent, stats = this.stats;\n if (frag) {\n this.fragPrevious = frag;\n stats.tbuffered = performance.now();\n this.fragLastKbps = Math.round(8 * stats.length / (stats.tbuffered - stats.tfirst));\n this.hls.trigger(Event.FRAG_BUFFERED, {stats: stats, frag: frag});\n logger.log(`media buffered : ${this.timeRangesToString(this.media.buffered)}`);\n this.state = State.IDLE;\n }\n }\n this.tick();\n }\n\n_checkBuffer() {\n var media = this.media;\n if(media) {\n // compare readyState\n var readyState = media.readyState;\n // if ready state different from HAVE_NOTHING (numeric value 0), we are allowed to seek\n if(readyState) {\n // if seek after buffered defined, let's seek if within acceptable range\n var seekAfterBuffered = this.seekAfterBuffered;\n if(seekAfterBuffered) {\n if(media.duration >= seekAfterBuffered) {\n media.currentTime = seekAfterBuffered;\n this.seekAfterBuffered = undefined;\n }\n } else {\n var currentTime = media.currentTime,\n bufferInfo = this.bufferInfo(currentTime,0),\n isPlaying = !(media.paused || media.ended || media.seeking || readyState < 3),\n jumpThreshold = 0.2;\n\n // check buffer upfront\n // if less than 200ms is buffered, and media is playing but playhead is not moving,\n // and we have a new buffer range available upfront, let's seek to that one\n if(bufferInfo.len <= jumpThreshold) {\n if(currentTime > media.playbackRate*this.lastCurrentTime || !isPlaying) {\n // playhead moving or media not playing\n jumpThreshold = 0;\n } else {\n logger.log('playback seems stuck');\n }\n // if we are below threshold, try to jump if next buffer range is close\n if(bufferInfo.len <= jumpThreshold) {\n // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a config.maxSeekHole second range)\n var nextBufferStart = bufferInfo.nextStart, delta = nextBufferStart-currentTime;\n if(nextBufferStart &&\n (delta < this.config.maxSeekHole) &&\n (delta > 0.005) &&\n !media.seeking) {\n // next buffer is close ! adjust currentTime to nextBufferStart\n // this will ensure effective video decoding\n logger.log(`adjust currentTime from ${currentTime} to ${nextBufferStart}`);\n media.currentTime = nextBufferStart;\n }\n }\n }\n }\n }\n }\n }\n\n swapAudioCodec() {\n this.audioCodecSwap = !this.audioCodecSwap;\n }\n\n onSBUpdateError(event) {\n logger.error(`sourceBuffer error:${event}`);\n this.state = State.ERROR;\n // according to http://www.w3.org/TR/media-source/#sourcebuffer-append-error\n // this error might not always be fatal (it is fatal if decode error is set, in that case\n // it will be followed by a mediaElement error ...)\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPENDING_ERROR, fatal: false, frag: this.fragCurrent});\n }\n\n timeRangesToString(r) {\n var log = '', len = r.length;\n for (var i=0; i OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\nclass AES {\n\n /**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param key {Array} The key as an array of 4, 6 or 8 words.\n */\n constructor(key) {\n /**\n * The expanded S-box and inverse S-box tables. These will be computed\n * on the client so that we don't have to send them down the wire.\n *\n * There are two tables, _tables[0] is for encryption and\n * _tables[1] is for decryption.\n *\n * The first 4 sub-tables are the expanded S-box with MixColumns. The\n * last (_tables[01][4]) is the S-box itself.\n *\n * @private\n */\n this._tables = [[[],[],[],[],[]],[[],[],[],[],[]]];\n\n this._precompute();\n\n var i, j, tmp,\n encKey, decKey,\n sbox = this._tables[0][4], decTable = this._tables[1],\n keyLen = key.length, rcon = 1;\n\n if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n throw new Error('Invalid aes key size=' + keyLen);\n }\n\n encKey = key.slice(0);\n decKey = [];\n this._key = [encKey, decKey];\n\n // schedule encryption keys\n for (i = keyLen; i < 4 * keyLen + 28; i++) {\n tmp = encKey[i-1];\n\n // apply sbox\n if (i%keyLen === 0 || (keyLen === 8 && i%keyLen === 4)) {\n tmp = sbox[tmp>>>24]<<24 ^ sbox[tmp>>16&255]<<16 ^ sbox[tmp>>8&255]<<8 ^ sbox[tmp&255];\n\n // shift rows and add rcon\n if (i%keyLen === 0) {\n tmp = tmp<<8 ^ tmp>>>24 ^ rcon<<24;\n rcon = rcon<<1 ^ (rcon>>7)*283;\n }\n }\n\n encKey[i] = encKey[i-keyLen] ^ tmp;\n }\n\n // schedule decryption keys\n for (j = 0; i; j++, i--) {\n tmp = encKey[j&3 ? i : i - 4];\n if (i<=4 || j<4) {\n decKey[j] = tmp;\n } else {\n decKey[j] = decTable[0][sbox[tmp>>>24 ]] ^\n decTable[1][sbox[tmp>>16 & 255]] ^\n decTable[2][sbox[tmp>>8 & 255]] ^\n decTable[3][sbox[tmp & 255]];\n }\n }\n }\n\n /**\n * Expand the S-box tables.\n *\n * @private\n */\n _precompute() {\n var encTable = this._tables[0], decTable = this._tables[1],\n sbox = encTable[4], sboxInv = decTable[4],\n i, x, xInv, d=[], th=[], x2, x4, x8, s, tEnc, tDec;\n\n // Compute double and third tables\n for (i = 0; i < 256; i++) {\n th[( d[i] = i<<1 ^ (i>>7)*283 )^i]=i;\n }\n\n for (x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n // Compute sbox\n s = xInv ^ xInv<<1 ^ xInv<<2 ^ xInv<<3 ^ xInv<<4;\n s = s>>8 ^ s&255 ^ 99;\n sbox[x] = s;\n sboxInv[s] = x;\n\n // Compute MixColumns\n x8 = d[x4 = d[x2 = d[x]]];\n tDec = x8*0x1010101 ^ x4*0x10001 ^ x2*0x101 ^ x*0x1010100;\n tEnc = d[s]*0x101 ^ s*0x1010100;\n\n for (i = 0; i < 4; i++) {\n encTable[i][x] = tEnc = tEnc<<24 ^ tEnc>>>8;\n decTable[i][s] = tDec = tDec<<24 ^ tDec>>>8;\n }\n }\n\n // Compactify. Considerable speedup on Firefox.\n for (i = 0; i < 5; i++) {\n encTable[i] = encTable[i].slice(0);\n decTable[i] = decTable[i].slice(0);\n }\n }\n\n /**\n * Decrypt 16 bytes, specified as four 32-bit words.\n * @param encrypted0 {number} the first word to decrypt\n * @param encrypted1 {number} the second word to decrypt\n * @param encrypted2 {number} the third word to decrypt\n * @param encrypted3 {number} the fourth word to decrypt\n * @param out {Int32Array} the array to write the decrypted words\n * into\n * @param offset {number} the offset into the output array to start\n * writing results\n * @return {Array} The plaintext.\n */\n decrypt(encrypted0, encrypted1, encrypted2, encrypted3, out, offset) {\n var key = this._key[1],\n // state variables a,b,c,d are loaded with pre-whitened data\n a = encrypted0 ^ key[0],\n b = encrypted3 ^ key[1],\n c = encrypted2 ^ key[2],\n d = encrypted1 ^ key[3],\n a2, b2, c2,\n\n nInnerRounds = key.length / 4 - 2, // key.length === 2 ?\n i,\n kIndex = 4,\n table = this._tables[1],\n\n // load up the tables\n table0 = table[0],\n table1 = table[1],\n table2 = table[2],\n table3 = table[3],\n sbox = table[4];\n\n // Inner rounds. Cribbed from OpenSSL.\n for (i = 0; i < nInnerRounds; i++) {\n a2 = table0[a>>>24] ^ table1[b>>16 & 255] ^ table2[c>>8 & 255] ^ table3[d & 255] ^ key[kIndex];\n b2 = table0[b>>>24] ^ table1[c>>16 & 255] ^ table2[d>>8 & 255] ^ table3[a & 255] ^ key[kIndex + 1];\n c2 = table0[c>>>24] ^ table1[d>>16 & 255] ^ table2[a>>8 & 255] ^ table3[b & 255] ^ key[kIndex + 2];\n d = table0[d>>>24] ^ table1[a>>16 & 255] ^ table2[b>>8 & 255] ^ table3[c & 255] ^ key[kIndex + 3];\n kIndex += 4;\n a=a2; b=b2; c=c2;\n }\n\n // Last round.\n for (i = 0; i < 4; i++) {\n out[(3 & -i) + offset] =\n sbox[a>>>24 ]<<24 ^\n sbox[b>>16 & 255]<<16 ^\n sbox[c>>8 & 255]<<8 ^\n sbox[d & 255] ^\n key[kIndex++];\n a2=a; a=b; b=c; c=d; d=a2;\n }\n }\n}\n\nexport default AES;\n", "/*\n *\n * This file contains an adaptation of the AES decryption algorithm\n * from the Standford Javascript Cryptography Library. That work is\n * covered by the following copyright and permissions notice:\n *\n * Copyright 2009-2010 Emily Stark, Mike Hamburg, Dan Boneh.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN\n * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation\n * are those of the authors and should not be interpreted as representing\n * official policies, either expressed or implied, of the authors.\n */\n\nimport AES from './aes';\n\nclass AES128Decrypter {\n\n constructor(key, initVector) {\n this.key = key;\n this.iv = initVector;\n }\n\n /**\n * Convert network-order (big-endian) bytes into their little-endian\n * representation.\n */\n ntoh(word) {\n return (word << 24) |\n ((word & 0xff00) << 8) |\n ((word & 0xff0000) >> 8) |\n (word >>> 24);\n }\n\n\n /**\n * Decrypt bytes using AES-128 with CBC and PKCS#7 padding.\n * @param encrypted {Uint8Array} the encrypted bytes\n * @param key {Uint32Array} the bytes of the decryption key\n * @param initVector {Uint32Array} the initialization vector (IV) to\n * use for the first round of CBC.\n * @return {Uint8Array} the decrypted bytes\n *\n * @see http://en.wikipedia.org/wiki/Advanced_Encryption_Standard\n * @see http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29\n * @see https://tools.ietf.org/html/rfc2315\n */\n doDecrypt(encrypted, key, initVector) {\n var\n // word-level access to the encrypted bytes\n encrypted32 = new Int32Array(encrypted.buffer, encrypted.byteOffset, encrypted.byteLength >> 2),\n\n decipher = new AES(Array.prototype.slice.call(key)),\n\n // byte and word-level access for the decrypted output\n decrypted = new Uint8Array(encrypted.byteLength),\n decrypted32 = new Int32Array(decrypted.buffer),\n\n // temporary variables for working with the IV, encrypted, and\n // decrypted data\n init0, init1, init2, init3,\n encrypted0, encrypted1, encrypted2, encrypted3,\n\n // iteration variable\n wordIx;\n\n // pull out the words of the IV to ensure we don't modify the\n // passed-in reference and easier access\n init0 = ~~initVector[0];\n init1 = ~~initVector[1];\n init2 = ~~initVector[2];\n init3 = ~~initVector[3];\n\n // decrypt four word sequences, applying cipher-block chaining (CBC)\n // to each decrypted block\n for (wordIx = 0; wordIx < encrypted32.length; wordIx += 4) {\n // convert big-endian (network order) words into little-endian\n // (javascript order)\n encrypted0 = ~~this.ntoh(encrypted32[wordIx]);\n encrypted1 = ~~this.ntoh(encrypted32[wordIx + 1]);\n encrypted2 = ~~this.ntoh(encrypted32[wordIx + 2]);\n encrypted3 = ~~this.ntoh(encrypted32[wordIx + 3]);\n\n // decrypt the block\n decipher.decrypt(encrypted0,\n encrypted1,\n encrypted2,\n encrypted3,\n decrypted32,\n wordIx);\n\n // XOR with the IV, and restore network byte-order to obtain the\n // plaintext\n decrypted32[wordIx] = this.ntoh(decrypted32[wordIx] ^ init0);\n decrypted32[wordIx + 1] = this.ntoh(decrypted32[wordIx + 1] ^ init1);\n decrypted32[wordIx + 2] = this.ntoh(decrypted32[wordIx + 2] ^ init2);\n decrypted32[wordIx + 3] = this.ntoh(decrypted32[wordIx + 3] ^ init3);\n\n // setup the IV for the next round\n init0 = encrypted0;\n init1 = encrypted1;\n init2 = encrypted2;\n init3 = encrypted3;\n }\n\n return decrypted;\n }\n\n localDecrypt(encrypted, key, initVector, decrypted) {\n var bytes = this.doDecrypt(encrypted,\n key,\n initVector);\n decrypted.set(bytes, encrypted.byteOffset);\n }\n\n decrypt(encrypted) {\n var\n step = 4 * 8000,\n //encrypted32 = new Int32Array(encrypted.buffer),\n encrypted32 = new Int32Array(encrypted),\n decrypted = new Uint8Array(encrypted.byteLength),\n i = 0;\n\n // split up the encryption job and do the individual chunks asynchronously\n var key = this.key;\n var initVector = this.iv;\n this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n\n for (i = step; i < encrypted32.length; i += step) {\n initVector = new Uint32Array([\n this.ntoh(encrypted32[i - 4]),\n this.ntoh(encrypted32[i - 3]),\n this.ntoh(encrypted32[i - 2]),\n this.ntoh(encrypted32[i - 1])\n ]);\n this.localDecrypt(encrypted32.subarray(i, i + step), key, initVector, decrypted);\n }\n\n return decrypted;\n }\n}\n\nexport default AES128Decrypter;\n", "/*\n * AES128 decryption.\n */\n\nimport AES128Decrypter from './aes128-decrypter';\nimport {ErrorTypes, ErrorDetails} from '../errors';\nimport {logger} from '../utils/logger';\n\nclass Decrypter {\n\n constructor(hls) {\n this.hls = hls;\n try {\n const browserCrypto = window ? window.crypto : crypto;\n this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle;\n this.disableWebCrypto = !this.subtle;\n } catch (e) {\n this.disableWebCrypto = true;\n }\n }\n\n destroy() {\n }\n\n decrypt(data, key, iv, callback) {\n if (this.disableWebCrypto && this.hls.config.enableSoftwareAES) {\n this.decryptBySoftware(data, key, iv, callback);\n } else {\n this.decryptByWebCrypto(data, key, iv, callback);\n }\n }\n\n decryptByWebCrypto(data, key, iv, callback) {\n logger.log('decrypting by WebCrypto API');\n\n this.subtle.importKey('raw', key, { name : 'AES-CBC', length : 128 }, false, ['decrypt']).\n then((importedKey) => {\n this.subtle.decrypt({ name : 'AES-CBC', iv : iv.buffer }, importedKey, data).\n then(callback).\n catch ((err) => {\n this.onWebCryptoError(err, data, key, iv, callback);\n });\n }).\n catch ((err) => {\n this.onWebCryptoError(err, data, key, iv, callback);\n });\n }\n\n decryptBySoftware(data, key8, iv8, callback) {\n logger.log('decrypting by JavaScript Implementation');\n\n var view = new DataView(key8.buffer);\n var key = new Uint32Array([\n view.getUint32(0),\n view.getUint32(4),\n view.getUint32(8),\n view.getUint32(12)\n ]);\n\n view = new DataView(iv8.buffer);\n var iv = new Uint32Array([\n view.getUint32(0),\n view.getUint32(4),\n view.getUint32(8),\n view.getUint32(12)\n ]);\n\n var decrypter = new AES128Decrypter(key, iv);\n callback(decrypter.decrypt(data).buffer);\n }\n\n onWebCryptoError(err, data, key, iv, callback) {\n if (this.hls.config.enableSoftwareAES) {\n logger.log('disabling to use WebCrypto API');\n this.disableWebCrypto = true;\n this.decryptBySoftware(data, key, iv, callback);\n }\n else {\n logger.error(`decrypting error : ${err.message}`);\n this.hls.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details : ErrorDetails.FRAG_DECRYPT_ERROR, fatal : true, reason : err.message});\n }\n }\n\n}\n\nexport default Decrypter;\n", @@ -56,18 +57,19 @@ "/**\n * ID3 parser\n */\nimport {logger} from '../utils/logger';\n//import Hex from '../utils/hex';\n\n class ID3 {\n\n constructor(data) {\n this._hasTimeStamp = false;\n var offset = 0, byte1,byte2,byte3,byte4,tagSize,endPos,header,len;\n do {\n header = this.readUTF(data,offset,3);\n offset+=3;\n // first check for ID3 header\n if (header === 'ID3') {\n // skip 24 bits\n offset += 3;\n // retrieve tag(s) length\n byte1 = data[offset++] & 0x7f;\n byte2 = data[offset++] & 0x7f;\n byte3 = data[offset++] & 0x7f;\n byte4 = data[offset++] & 0x7f;\n tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;\n endPos = offset + tagSize;\n //logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);\n\n // read ID3 tags\n this._parseID3Frames(data, offset,endPos);\n offset = endPos;\n } else if (header === '3DI') {\n // http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer\n offset += 7;\n logger.log(`3DI footer found, end: ${offset}`);\n } else {\n offset -= 3;\n len = offset;\n if (len) {\n //logger.log(`ID3 len: ${len}`);\n if (!this.hasTimeStamp) {\n logger.warn('ID3 tag found, but no timestamp');\n }\n this._length = len;\n this._payload = data.subarray(0,len);\n }\n return;\n }\n } while (true);\n }\n\n readUTF(data,start,len) {\n\n var result = '',offset = start, end = start + len;\n do {\n result += String.fromCharCode(data[offset++]);\n } while(offset < end);\n return result;\n }\n\n _parseID3Frames(data,offset,endPos) {\n var tagId,tagLen,tagStart,tagFlags,timestamp;\n while(offset + 8 <= endPos) {\n tagId = this.readUTF(data,offset,4);\n offset +=4;\n\n tagLen = data[offset++] << 24 +\n data[offset++] << 16 +\n data[offset++] << 8 +\n data[offset++];\n\n tagFlags = data[offset++] << 8 +\n data[offset++];\n\n tagStart = offset;\n //logger.log(\"ID3 tag id:\" + tagId);\n switch(tagId) {\n case 'PRIV':\n //logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));\n // owner should be \"com.apple.streaming.transportStreamTimestamp\"\n if (this.readUTF(data,offset,44) === 'com.apple.streaming.transportStreamTimestamp') {\n offset+=44;\n // smelling even better ! we found the right descriptor\n // skip null character (string end) + 3 first bytes\n offset+= 4;\n\n // timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.\n var pts33Bit = data[offset++] & 0x1;\n this._hasTimeStamp = true;\n\n timestamp = ((data[offset++] << 23) +\n (data[offset++] << 15) +\n (data[offset++] << 7) +\n data[offset++]) /45;\n\n if (pts33Bit) {\n timestamp += 47721858.84; // 2^32 / 90\n }\n timestamp = Math.round(timestamp);\n logger.trace(`ID3 timestamp found: ${timestamp}`);\n this._timeStamp = timestamp;\n }\n break;\n default:\n break;\n }\n }\n }\n\n get hasTimeStamp() {\n return this._hasTimeStamp;\n }\n\n get timeStamp() {\n return this._timeStamp;\n }\n\n get length() {\n return this._length;\n }\n\n get payload() {\n return this._payload;\n }\n\n}\n\nexport default ID3;\n\n", "/**\n * highly optimized TS demuxer:\n * parse PAT, PMT\n * extract PES packet from audio and video PIDs\n * extract AVC/H264 NAL units and AAC/ADTS samples from PES packet\n * trigger the remuxer upon parsing completion\n * it also tries to workaround as best as it can audio codec switch (HE-AAC to AAC and vice versa), without having to restart the MediaSource.\n * it also controls the remuxing process :\n * upon discontinuity or level switch detection, it will also notifies the remuxer so that it can reset its state.\n*/\n\n import ADTS from './adts';\n import Event from '../events';\n import ExpGolomb from './exp-golomb';\n// import Hex from '../utils/hex';\n import {logger} from '../utils/logger';\n import {ErrorTypes, ErrorDetails} from '../errors';\n\n class TSDemuxer {\n\n constructor(observer,remuxerClass) {\n this.observer = observer;\n this.remuxerClass = remuxerClass;\n this.lastCC = 0;\n this.remuxer = new this.remuxerClass(observer);\n }\n\n static probe(data) {\n // a TS fragment should contain at least 3 TS packets, a PAT, a PMT, and one PID, each starting with 0x47\n if (data.length >= 3*188 && data[0] === 0x47 && data[188] === 0x47 && data[2*188] === 0x47) {\n return true;\n } else {\n return false;\n }\n }\n\n switchLevel() {\n this.pmtParsed = false;\n this._pmtId = -1;\n this._avcTrack = {type: 'video', id :-1, sequenceNumber: 0, samples : [], len : 0, nbNalu : 0};\n this._aacTrack = {type: 'audio', id :-1, sequenceNumber: 0, samples : [], len : 0};\n this._id3Track = {type: 'id3', id :-1, sequenceNumber: 0, samples : [], len : 0};\n this.remuxer.switchLevel();\n }\n\n insertDiscontinuity() {\n this.switchLevel();\n this.remuxer.insertDiscontinuity();\n }\n\n // feed incoming data to the front of the parsing pipeline\n push(data, audioCodec, videoCodec, timeOffset, cc, level, sn, duration) {\n var avcData, aacData, id3Data,\n start, len = data.length, stt, pid, atf, offset;\n this.audioCodec = audioCodec;\n this.videoCodec = videoCodec;\n this.timeOffset = timeOffset;\n this._duration = duration;\n this.contiguous = false;\n if (cc !== this.lastCC) {\n logger.log('discontinuity detected');\n this.insertDiscontinuity();\n this.lastCC = cc;\n } else if (level !== this.lastLevel) {\n logger.log('level switch detected');\n this.switchLevel();\n this.lastLevel = level;\n } else if (sn === (this.lastSN+1)) {\n this.contiguous = true;\n }\n this.lastSN = sn;\n\n if(!this.contiguous) {\n // flush any partial content\n this.aacOverFlow = null;\n }\n\n var pmtParsed = this.pmtParsed,\n avcId = this._avcTrack.id,\n aacId = this._aacTrack.id,\n id3Id = this._id3Track.id;\n // loop through TS packets\n for (start = 0; start < len; start += 188) {\n if (data[start] === 0x47) {\n stt = !!(data[start + 1] & 0x40);\n // pid is a 13-bit field starting at the last bit of TS[1]\n pid = ((data[start + 1] & 0x1f) << 8) + data[start + 2];\n atf = (data[start + 3] & 0x30) >> 4;\n // if an adaption field is present, its length is specified by the fifth byte of the TS packet header.\n if (atf > 1) {\n offset = start + 5 + data[start + 4];\n // continue if there is only adaptation field\n if (offset === (start + 188)) {\n continue;\n }\n } else {\n offset = start + 4;\n }\n if (pmtParsed) {\n if (pid === avcId) {\n if (stt) {\n if (avcData) {\n this._parseAVCPES(this._parsePES(avcData));\n }\n avcData = {data: [], size: 0};\n }\n if (avcData) {\n avcData.data.push(data.subarray(offset, start + 188));\n avcData.size += start + 188 - offset;\n }\n } else if (pid === aacId) {\n if (stt) {\n if (aacData) {\n this._parseAACPES(this._parsePES(aacData));\n }\n aacData = {data: [], size: 0};\n }\n if (aacData) {\n aacData.data.push(data.subarray(offset, start + 188));\n aacData.size += start + 188 - offset;\n }\n } else if (pid === id3Id) {\n if (stt) {\n if (id3Data) {\n this._parseID3PES(this._parsePES(id3Data));\n }\n id3Data = {data: [], size: 0};\n }\n if (id3Data) {\n id3Data.data.push(data.subarray(offset, start + 188));\n id3Data.size += start + 188 - offset;\n }\n }\n } else {\n if (stt) {\n offset += data[offset] + 1;\n }\n if (pid === 0) {\n this._parsePAT(data, offset);\n } else if (pid === this._pmtId) {\n this._parsePMT(data, offset);\n pmtParsed = this.pmtParsed = true;\n avcId = this._avcTrack.id;\n aacId = this._aacTrack.id;\n id3Id = this._id3Track.id;\n }\n }\n } else {\n this.observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'TS packet did not start with 0x47'});\n }\n }\n // parse last PES packet\n if (avcData) {\n this._parseAVCPES(this._parsePES(avcData));\n }\n if (aacData) {\n this._parseAACPES(this._parsePES(aacData));\n }\n if (id3Data) {\n this._parseID3PES(this._parsePES(id3Data));\n }\n this.remux();\n }\n\n remux() {\n this.remuxer.remux(this._aacTrack,this._avcTrack, this._id3Track, this.timeOffset, this.contiguous);\n }\n\n destroy() {\n this.switchLevel();\n this._initPTS = this._initDTS = undefined;\n this._duration = 0;\n }\n\n _parsePAT(data, offset) {\n // skip the PSI header and parse the first PMT entry\n this._pmtId = (data[offset + 10] & 0x1F) << 8 | data[offset + 11];\n //logger.log('PMT PID:' + this._pmtId);\n }\n\n _parsePMT(data, offset) {\n var sectionLength, tableEnd, programInfoLength, pid;\n sectionLength = (data[offset + 1] & 0x0f) << 8 | data[offset + 2];\n tableEnd = offset + 3 + sectionLength - 4;\n // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n programInfoLength = (data[offset + 10] & 0x0f) << 8 | data[offset + 11];\n // advance the offset to the first entry in the mapping table\n offset += 12 + programInfoLength;\n while (offset < tableEnd) {\n pid = (data[offset + 1] & 0x1F) << 8 | data[offset + 2];\n switch(data[offset]) {\n // ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio)\n case 0x0f:\n //logger.log('AAC PID:' + pid);\n this._aacTrack.id = pid;\n break;\n // Packetized metadata (ID3)\n case 0x15:\n //logger.log('ID3 PID:' + pid);\n this._id3Track.id = pid;\n break;\n // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)\n case 0x1b:\n //logger.log('AVC PID:' + pid);\n this._avcTrack.id = pid;\n break;\n default:\n logger.log('unkown stream type:' + data[offset]);\n break;\n }\n // move to the next table entry\n // skip past the elementary stream descriptors, if present\n offset += ((data[offset + 3] & 0x0F) << 8 | data[offset + 4]) + 5;\n }\n }\n\n _parsePES(stream) {\n var i = 0, frag, pesFlags, pesPrefix, pesLen, pesHdrLen, pesData, pesPts, pesDts, payloadStartOffset;\n //retrieve PTS/DTS from first fragment\n frag = stream.data[0];\n pesPrefix = (frag[0] << 16) + (frag[1] << 8) + frag[2];\n if (pesPrefix === 1) {\n pesLen = (frag[4] << 8) + frag[5];\n pesFlags = frag[7];\n if (pesFlags & 0xC0) {\n /* PES header described here : http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n as PTS / DTS is 33 bit we cannot use bitwise operator in JS,\n as Bitwise operators treat their operands as a sequence of 32 bits */\n pesPts = (frag[9] & 0x0E) * 536870912 +// 1 << 29\n (frag[10] & 0xFF) * 4194304 +// 1 << 22\n (frag[11] & 0xFE) * 16384 +// 1 << 14\n (frag[12] & 0xFF) * 128 +// 1 << 7\n (frag[13] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (pesPts > 4294967295) {\n // decrement 2^33\n pesPts -= 8589934592;\n }\n if (pesFlags & 0x40) {\n pesDts = (frag[14] & 0x0E ) * 536870912 +// 1 << 29\n (frag[15] & 0xFF ) * 4194304 +// 1 << 22\n (frag[16] & 0xFE ) * 16384 +// 1 << 14\n (frag[17] & 0xFF ) * 128 +// 1 << 7\n (frag[18] & 0xFE ) / 2;\n // check if greater than 2^32 -1\n if (pesDts > 4294967295) {\n // decrement 2^33\n pesDts -= 8589934592;\n }\n } else {\n pesDts = pesPts;\n }\n }\n pesHdrLen = frag[8];\n payloadStartOffset = pesHdrLen + 9;\n // trim PES header\n stream.data[0] = stream.data[0].subarray(payloadStartOffset);\n stream.size -= payloadStartOffset;\n //reassemble PES packet\n pesData = new Uint8Array(stream.size);\n // reassemble the packet\n while (stream.data.length) {\n frag = stream.data.shift();\n pesData.set(frag, i);\n i += frag.byteLength;\n }\n return {data: pesData, pts: pesPts, dts: pesDts, len: pesLen};\n } else {\n return null;\n }\n }\n\n _parseAVCPES(pes) {\n var track = this._avcTrack,\n samples = track.samples,\n units = this._parseAVCNALu(pes.data),\n units2 = [],\n debug = false,\n key = false,\n length = 0,\n avcSample,\n push;\n // no NALu found\n if (units.length === 0 && samples.length > 0) {\n // append pes.data to previous NAL unit\n var lastavcSample = samples[samples.length - 1];\n var lastUnit = lastavcSample.units.units[lastavcSample.units.units.length - 1];\n var tmp = new Uint8Array(lastUnit.data.byteLength + pes.data.byteLength);\n tmp.set(lastUnit.data, 0);\n tmp.set(pes.data, lastUnit.data.byteLength);\n lastUnit.data = tmp;\n lastavcSample.units.length += pes.data.byteLength;\n track.len += pes.data.byteLength;\n }\n //free pes.data to save up some memory\n pes.data = null;\n var debugString = '';\n units.forEach(unit => {\n switch(unit.type) {\n //NDR\n case 1:\n push = true;\n if(debug) {\n debugString += 'NDR ';\n }\n break;\n //IDR\n case 5:\n push = true;\n if(debug) {\n debugString += 'IDR ';\n }\n key = true;\n break;\n case 6:\n push = true;\n if(debug) {\n debugString += 'SEI ';\n }\n break;\n //SPS\n case 7:\n push = true;\n if(debug) {\n debugString += 'SPS ';\n }\n if(!track.sps) {\n var expGolombDecoder = new ExpGolomb(unit.data);\n var config = expGolombDecoder.readSPS();\n track.width = config.width;\n track.height = config.height;\n track.sps = [unit.data];\n track.timescale = this.remuxer.timescale;\n track.duration = this.remuxer.timescale * this._duration;\n var codecarray = unit.data.subarray(1, 4);\n var codecstring = 'avc1.';\n for (var i = 0; i < 3; i++) {\n var h = codecarray[i].toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n codecstring += h;\n }\n track.codec = codecstring;\n }\n break;\n //PPS\n case 8:\n push = true;\n if(debug) {\n debugString += 'PPS ';\n }\n if (!track.pps) {\n track.pps = [unit.data];\n }\n break;\n case 9:\n push = true;\n if(debug) {\n debugString += 'AUD ';\n }\n break;\n default:\n push = false;\n debugString += 'unknown NAL ' + unit.type + ' ';\n break;\n }\n if(push) {\n units2.push(unit);\n length+=unit.data.byteLength;\n }\n });\n if(debug || debugString.length) {\n logger.log(debugString);\n }\n //build sample from PES\n // Annex B to MP4 conversion to be done\n if (units2.length) {\n // only push AVC sample if keyframe already found. browsers expect a keyframe at first to start decoding\n if (key === true || track.sps ) {\n avcSample = {units: { units : units2, length : length}, pts: pes.pts, dts: pes.dts, key: key};\n samples.push(avcSample);\n track.len += length;\n track.nbNalu += units2.length;\n }\n }\n }\n\n\n _parseAVCNALu(array) {\n var i = 0, len = array.byteLength, value, overflow, state = 0;\n var units = [], unit, unitType, lastUnitStart, lastUnitType;\n //logger.log('PES:' + Hex.hexDump(array));\n while (i < len) {\n value = array[i++];\n // finding 3 or 4-byte start codes (00 00 01 OR 00 00 00 01)\n switch (state) {\n case 0:\n if (value === 0) {\n state = 1;\n }\n break;\n case 1:\n if( value === 0) {\n state = 2;\n } else {\n state = 0;\n }\n break;\n case 2:\n case 3:\n if( value === 0) {\n state = 3;\n } else if (value === 1) {\n unitType = array[i] & 0x1f;\n //logger.log('find NALU @ offset:' + i + ',type:' + unitType);\n if (lastUnitStart) {\n unit = {data: array.subarray(lastUnitStart, i - state - 1), type: lastUnitType};\n //logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n units.push(unit);\n } else {\n // If NAL units are not starting right at the beginning of the PES packet, push preceding data into previous NAL unit.\n overflow = i - state - 1;\n if (overflow) {\n var track = this._avcTrack,\n samples = track.samples;\n //logger.log('first NALU found with overflow:' + overflow);\n if (samples.length) {\n var lastavcSample = samples[samples.length - 1],\n lastUnits = lastavcSample.units.units,\n lastUnit = lastUnits[lastUnits.length - 1],\n tmp = new Uint8Array(lastUnit.data.byteLength + overflow);\n tmp.set(lastUnit.data, 0);\n tmp.set(array.subarray(0, overflow), lastUnit.data.byteLength);\n lastUnit.data = tmp;\n lastavcSample.units.length += overflow;\n track.len += overflow;\n }\n }\n }\n lastUnitStart = i;\n lastUnitType = unitType;\n if (unitType === 1 || unitType === 5) {\n // OPTI !!! if IDR/NDR unit, consider it is last NALu\n i = len;\n }\n state = 0;\n } else {\n state = 0;\n }\n break;\n default:\n break;\n }\n }\n if (lastUnitStart) {\n unit = {data: array.subarray(lastUnitStart, len), type: lastUnitType};\n units.push(unit);\n //logger.log('pushing NALU, type/size:' + unit.type + '/' + unit.data.byteLength);\n }\n return units;\n }\n\n _parseAACPES(pes) {\n var track = this._aacTrack,\n data = pes.data,\n pts = pes.pts,\n startOffset = 0,\n duration = this._duration,\n audioCodec = this.audioCodec,\n config, frameLength, frameDuration, frameIndex, offset, headerLength, stamp, len, aacSample;\n if (this.aacOverFlow) {\n var tmp = new Uint8Array(this.aacOverFlow.byteLength + data.byteLength);\n tmp.set(this.aacOverFlow, 0);\n tmp.set(data, this.aacOverFlow.byteLength);\n data = tmp;\n }\n // look for ADTS header (0xFFFx)\n for (offset = startOffset, len = data.length; offset < len - 1; offset++) {\n if ((data[offset] === 0xff) && (data[offset+1] & 0xf0) === 0xf0) {\n break;\n }\n }\n // if ADTS header does not start straight from the beginning of the PES payload, raise an error\n if (offset) {\n var reason, fatal;\n if (offset < len - 1) {\n reason = `AAC PES did not start with ADTS header,offset:${offset}`;\n fatal = false;\n } else {\n reason = 'no ADTS header found in AAC PES';\n fatal = true;\n }\n this.observer.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: fatal, reason: reason});\n if (fatal) {\n return;\n }\n }\n if (!track.audiosamplerate) {\n config = ADTS.getAudioConfig(this.observer,data, offset, audioCodec);\n track.config = config.config;\n track.audiosamplerate = config.samplerate;\n track.channelCount = config.channelCount;\n track.codec = config.codec;\n track.timescale = this.remuxer.timescale;\n track.duration = track.timescale * duration;\n logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);\n }\n frameIndex = 0;\n frameDuration = 1024 * 90000 / track.audiosamplerate;\n while ((offset + 5) < len) {\n // The protection skip bit tells us if we have 2 bytes of CRC data at the end of the ADTS header\n headerLength = (!!(data[offset + 1] & 0x01) ? 7 : 9);\n // retrieve frame size\n frameLength = ((data[offset + 3] & 0x03) << 11) |\n (data[offset + 4] << 3) |\n ((data[offset + 5] & 0xE0) >>> 5);\n frameLength -= headerLength;\n stamp = Math.round(pts + frameIndex * frameDuration);\n //stamp = pes.pts;\n\n //console.log('AAC frame, offset/length/pts:' + (offset+headerLength) + '/' + frameLength + '/' + stamp.toFixed(0));\n if ((frameLength > 0) && ((offset + headerLength + frameLength) <= len)) {\n aacSample = {unit: data.subarray(offset + headerLength, offset + headerLength + frameLength), pts: stamp, dts: stamp};\n track.samples.push(aacSample);\n track.len += frameLength;\n offset += frameLength + headerLength;\n frameIndex++;\n // look for ADTS header (0xFFFx)\n for ( ; offset < (len - 1); offset++) {\n if ((data[offset] === 0xff) && ((data[offset + 1] & 0xf0) === 0xf0)) {\n break;\n }\n }\n } else {\n break;\n }\n }\n if (offset < len) {\n this.aacOverFlow = data.subarray(offset, len);\n } else {\n this.aacOverFlow = null;\n }\n }\n\n _parseID3PES(pes) {\n this._id3Track.samples.push(pes);\n }\n}\n\nexport default TSDemuxer;\n\n", "export const ErrorTypes = {\n // Identifier for a network error (loading error / timeout ...)\n NETWORK_ERROR: 'hlsNetworkError',\n // Identifier for a media Error (video/parsing/mediasource error)\n MEDIA_ERROR: 'hlsMediaError',\n // Identifier for all other errors\n OTHER_ERROR: 'hlsOtherError'\n};\n\nexport const ErrorDetails = {\n // Identifier for a manifest load error - data: { url : faulty URL, response : XHR response}\n MANIFEST_LOAD_ERROR: 'manifestLoadError',\n // Identifier for a manifest load timeout - data: { url : faulty URL, response : XHR response}\n MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',\n // Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}\n MANIFEST_PARSING_ERROR: 'manifestParsingError',\n // Identifier for playlist load error - data: { url : faulty URL, response : XHR response}\n LEVEL_LOAD_ERROR: 'levelLoadError',\n // Identifier for playlist load timeout - data: { url : faulty URL, response : XHR response}\n LEVEL_LOAD_TIMEOUT: 'levelLoadTimeOut',\n // Identifier for a level switch error - data: { level : faulty level Id, event : error description}\n LEVEL_SWITCH_ERROR: 'levelSwitchError',\n // Identifier for fragment load error - data: { frag : fragment object, response : XHR response}\n FRAG_LOAD_ERROR: 'fragLoadError',\n // Identifier for fragment loop loading error - data: { frag : fragment object}\n FRAG_LOOP_LOADING_ERROR: 'fragLoopLoadingError',\n // Identifier for fragment load timeout error - data: { frag : fragment object}\n FRAG_LOAD_TIMEOUT: 'fragLoadTimeOut',\n // Identifier for a fragment decryption error event - data: parsing error description\n FRAG_DECRYPT_ERROR: 'fragDecryptError',\n // Identifier for a fragment parsing error event - data: parsing error description\n FRAG_PARSING_ERROR: 'fragParsingError',\n // Identifier for decrypt key load error - data: { frag : fragment object, response : XHR response}\n KEY_LOAD_ERROR: 'keyLoadError',\n // Identifier for decrypt key load timeout error - data: { frag : fragment object}\n KEY_LOAD_TIMEOUT: 'keyLoadTimeOut',\n // Identifier for a buffer append error - data: append error description\n BUFFER_APPEND_ERROR: 'bufferAppendError',\n // Identifier for a buffer appending error event - data: appending error description\n BUFFER_APPENDING_ERROR: 'bufferAppendingError'\n};\n", - "export default {\n // fired before MediaSource is attaching to media element - data: { media }\n MEDIA_ATTACHING: 'hlsMediaAttaching',\n // fired when MediaSource has been succesfully attached to media element - data: { }\n MEDIA_ATTACHED: 'hlsMediaAttached',\n // fired before detaching MediaSource from media element - data: { }\n MEDIA_DETACHING: 'hlsMediaDetaching',\n // fired when MediaSource has been detached from media element - data: { }\n MEDIA_DETACHED: 'hlsMediaDetached',\n // fired to signal that a manifest loading starts - data: { url : manifestURL}\n MANIFEST_LOADING: 'hlsManifestLoading',\n // fired after manifest has been loaded - data: { levels : [available quality levels] , url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n MANIFEST_LOADED: 'hlsManifestLoaded',\n // fired after manifest has been parsed - data: { levels : [available quality levels] , firstLevel : index of first quality level appearing in Manifest}\n MANIFEST_PARSED: 'hlsManifestParsed',\n // fired when a level playlist loading starts - data: { url : level URL level : id of level being loaded}\n LEVEL_LOADING: 'hlsLevelLoading',\n // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n LEVEL_LOADED: 'hlsLevelLoaded',\n // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level }\n LEVEL_UPDATED: 'hlsLevelUpdated',\n // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n LEVEL_PTS_UPDATED: 'hlsPTSUpdated',\n // fired when a level switch is requested - data: { level : id of new level }\n LEVEL_SWITCH: 'hlsLevelSwitch',\n // fired when a fragment loading starts - data: { frag : fragment object}\n FRAG_LOADING: 'hlsFragLoading',\n // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded}}\n FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n // Identifier for fragment load aborting for emergency switch down - data: {frag : fragment object}\n FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}\n FRAG_LOADED: 'hlsFragLoaded',\n // fired when Init Segment has been extracted from fragment - data: { moov : moov MP4 box, codecs : codecs found while parsing fragment}\n FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n // fired when parsing id3 is completed - data: { samples : [ id3 samples pes ] }\n FRAG_PARSING_METADATA: 'hlsFraParsingMetadata',\n // fired when moof/mdat have been extracted from fragment - data: { moof : moof MP4 box, mdat : mdat MP4 box}\n FRAG_PARSING_DATA: 'hlsFragParsingData',\n // fired when fragment parsing is completed - data: undefined\n FRAG_PARSED: 'hlsFragParsed',\n // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length} }\n FRAG_BUFFERED: 'hlsFragBuffered',\n // fired when fragment matching with current media position is changing - data : { frag : fragment object }\n FRAG_CHANGED: 'hlsFragChanged',\n // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames}\n FPS_DROP: 'hlsFPSDrop',\n // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data}\n ERROR: 'hlsError',\n // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example\n DESTROYING: 'hlsDestroying',\n // fired when a decrypt key loading starts - data: { frag : fragment object}\n KEY_LOADING: 'hlsKeyLoading',\n // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}}\n KEY_LOADED: 'hlsKeyLoaded',\n};\n", + "/*\n*\n* All objects in the event handling chain should inherit from this class\n*\n*/\n\n//import {logger} from './utils/logger';\n\nclass EventHandler {\n\n constructor(hls, ...events) {\n this.hls = hls;\n this.onEvent = this.onEvent.bind(this);\n this.handledEvents = events;\n this.useGenericHandler = true;\n\n this.registerListeners();\n }\n\n destroy() {\n this.unregisterListeners();\n }\n\n isEventHandler() {\n return typeof this.handledEvents === 'object' && this.handledEvents.length && typeof this.onEvent === 'function';\n }\n\n registerListeners() {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function(event) {\n if (event === 'hlsEventGeneric') {\n throw new Error('Forbidden event name: ' + event);\n }\n this.hls.on(event, this.onEvent);\n }.bind(this));\n }\n }\n\n unregisterListeners() {\n if (this.isEventHandler()) {\n this.handledEvents.forEach(function(event) {\n this.hls.off(event, this.onEvent);\n }.bind(this));\n }\n }\n\n /*\n * arguments: event (string), data (any)\n */\n onEvent(event, data) {\n this.onEventGeneric(event, data);\n }\n\n onEventGeneric(event, data) {\n var eventToFunction = function(event, data) {\n var funcName = 'on' + event.replace('hls', '');\n if (typeof this[funcName] !== 'function') {\n throw new Error(`Event ${event} has no generic handler in this ${this.constructor.name} class (tried ${funcName})`);\n }\n return this[funcName].bind(this, data);\n };\n eventToFunction.call(this, event, data).call();\n }\n}\n\nexport default EventHandler;", + "module.exports = {\n // fired before MediaSource is attaching to media element - data: { media }\n MEDIA_ATTACHING: 'hlsMediaAttaching',\n // fired when MediaSource has been succesfully attached to media element - data: { }\n MEDIA_ATTACHED: 'hlsMediaAttached',\n // fired before detaching MediaSource from media element - data: { }\n MEDIA_DETACHING: 'hlsMediaDetaching',\n // fired when MediaSource has been detached from media element - data: { }\n MEDIA_DETACHED: 'hlsMediaDetached',\n // fired to signal that a manifest loading starts - data: { url : manifestURL}\n MANIFEST_LOADING: 'hlsManifestLoading',\n // fired after manifest has been loaded - data: { levels : [available quality levels] , url : manifestURL, stats : { trequest, tfirst, tload, mtime}}\n MANIFEST_LOADED: 'hlsManifestLoaded',\n // fired after manifest has been parsed - data: { levels : [available quality levels] , firstLevel : index of first quality level appearing in Manifest}\n MANIFEST_PARSED: 'hlsManifestParsed',\n // fired when a level playlist loading starts - data: { url : level URL level : id of level being loaded}\n LEVEL_LOADING: 'hlsLevelLoading',\n // fired when a level playlist loading finishes - data: { details : levelDetails object, level : id of loaded level, stats : { trequest, tfirst, tload, mtime} }\n LEVEL_LOADED: 'hlsLevelLoaded',\n // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level }\n LEVEL_UPDATED: 'hlsLevelUpdated',\n // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment }\n LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated',\n // fired when a level switch is requested - data: { level : id of new level }\n LEVEL_SWITCH: 'hlsLevelSwitch',\n // fired when a fragment loading starts - data: { frag : fragment object}\n FRAG_LOADING: 'hlsFragLoading',\n // fired when a fragment loading is progressing - data: { frag : fragment object, { trequest, tfirst, loaded}}\n FRAG_LOAD_PROGRESS: 'hlsFragLoadProgress',\n // Identifier for fragment load aborting for emergency switch down - data: {frag : fragment object}\n FRAG_LOAD_EMERGENCY_ABORTED: 'hlsFragLoadEmergencyAborted',\n // fired when a fragment loading is completed - data: { frag : fragment object, payload : fragment payload, stats : { trequest, tfirst, tload, length}}\n FRAG_LOADED: 'hlsFragLoaded',\n // fired when Init Segment has been extracted from fragment - data: { moov : moov MP4 box, codecs : codecs found while parsing fragment}\n FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment',\n // fired when parsing id3 is completed - data: { samples : [ id3 samples pes ] }\n FRAG_PARSING_METADATA: 'hlsFragParsingMetadata',\n // fired when moof/mdat have been extracted from fragment - data: { moof : moof MP4 box, mdat : mdat MP4 box}\n FRAG_PARSING_DATA: 'hlsFragParsingData',\n // fired when fragment parsing is completed - data: undefined\n FRAG_PARSED: 'hlsFragParsed',\n // fired when fragment remuxed MP4 boxes have all been appended into SourceBuffer - data: { frag : fragment object, stats : { trequest, tfirst, tload, tparsed, tbuffered, length} }\n FRAG_BUFFERED: 'hlsFragBuffered',\n // fired when fragment matching with current media position is changing - data : { frag : fragment object }\n FRAG_CHANGED: 'hlsFragChanged',\n // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames}\n FPS_DROP: 'hlsFpsDrop',\n // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data}\n ERROR: 'hlsError',\n // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example\n DESTROYING: 'hlsDestroying',\n // fired when a decrypt key loading starts - data: { frag : fragment object}\n KEY_LOADING: 'hlsKeyLoading',\n // fired when a decrypt key loading is completed - data: { frag : fragment object, payload : key payload, stats : { trequest, tfirst, tload, length}}\n KEY_LOADED: 'hlsKeyLoaded',\n};\n", "/**\n * Level Helper class, providing methods dealing with playlist sliding and drift\n*/\n\nimport {logger} from '../utils/logger';\n\nclass LevelHelper {\n\n static mergeDetails(oldDetails,newDetails) {\n var start = Math.max(oldDetails.startSN,newDetails.startSN)-newDetails.startSN,\n end = Math.min(oldDetails.endSN,newDetails.endSN)-newDetails.startSN,\n delta = newDetails.startSN - oldDetails.startSN,\n oldfragments = oldDetails.fragments,\n newfragments = newDetails.fragments,\n ccOffset =0,\n PTSFrag;\n\n // check if old/new playlists have fragments in common\n if ( end < start) {\n newDetails.PTSKnown = false;\n return;\n }\n // loop through overlapping SN and update startPTS , cc, and duration if any found\n for(var i = start ; i <= end ; i++) {\n var oldFrag = oldfragments[delta+i],\n newFrag = newfragments[i];\n ccOffset = oldFrag.cc - newFrag.cc;\n if (!isNaN(oldFrag.startPTS)) {\n newFrag.start = newFrag.startPTS = oldFrag.startPTS;\n newFrag.endPTS = oldFrag.endPTS;\n newFrag.duration = oldFrag.duration;\n PTSFrag = newFrag;\n }\n }\n\n if(ccOffset) {\n logger.log(`discontinuity sliding from playlist, take drift into account`);\n for(i = 0 ; i < newfragments.length ; i++) {\n newfragments[i].cc += ccOffset;\n }\n }\n\n // if at least one fragment contains PTS info, recompute PTS information for all fragments\n if(PTSFrag) {\n LevelHelper.updateFragPTS(newDetails,PTSFrag.sn,PTSFrag.startPTS,PTSFrag.endPTS);\n } else {\n // adjust start by sliding offset\n var sliding = oldfragments[delta].start;\n for(i = 0 ; i < newfragments.length ; i++) {\n newfragments[i].start += sliding;\n }\n }\n // if we are here, it means we have fragments overlapping between\n // old and new level. reliable PTS info is thus relying on old level\n newDetails.PTSKnown = oldDetails.PTSKnown;\n return;\n }\n\n static updateFragPTS(details,sn,startPTS,endPTS) {\n var fragIdx, fragments, frag, i;\n // exit if sn out of range\n if (sn < details.startSN || sn > details.endSN) {\n return 0;\n }\n fragIdx = sn - details.startSN;\n fragments = details.fragments;\n frag = fragments[fragIdx];\n if(!isNaN(frag.startPTS)) {\n startPTS = Math.min(startPTS,frag.startPTS);\n endPTS = Math.max(endPTS, frag.endPTS);\n }\n\n var drift = startPTS - frag.start;\n\n frag.start = frag.startPTS = startPTS;\n frag.endPTS = endPTS;\n frag.duration = endPTS - startPTS;\n // adjust fragment PTS/duration from seqnum-1 to frag 0\n for(i = fragIdx ; i > 0 ; i--) {\n LevelHelper.updatePTS(fragments,i,i-1);\n }\n\n // adjust fragment PTS/duration from seqnum to last frag\n for(i = fragIdx ; i < fragments.length - 1 ; i++) {\n LevelHelper.updatePTS(fragments,i,i+1);\n }\n details.PTSKnown = true;\n //logger.log(` frag start/end:${startPTS.toFixed(3)}/${endPTS.toFixed(3)}`);\n\n return drift;\n }\n\n static updatePTS(fragments,fromIdx, toIdx) {\n var fragFrom = fragments[fromIdx],fragTo = fragments[toIdx], fragToPTS = fragTo.startPTS;\n // if we know startPTS[toIdx]\n if(!isNaN(fragToPTS)) {\n // update fragment duration.\n // it helps to fix drifts between playlist reported duration and fragment real duration\n if (toIdx > fromIdx) {\n fragFrom.duration = fragToPTS-fragFrom.start;\n if(fragFrom.duration < 0) {\n logger.error(`negative duration computed for frag ${fragFrom.sn},level ${fragFrom.level}, there should be some duration drift between playlist and fragment!`);\n }\n } else {\n fragTo.duration = fragFrom.start - fragToPTS;\n if(fragTo.duration < 0) {\n logger.error(`negative duration computed for frag ${fragTo.sn},level ${fragTo.level}, there should be some duration drift between playlist and fragment!`);\n }\n }\n } else {\n // we dont know startPTS[toIdx]\n if (toIdx > fromIdx) {\n fragTo.start = fragFrom.start + fragFrom.duration;\n } else {\n fragTo.start = fragFrom.start - fragTo.duration;\n }\n }\n }\n}\n\nexport default LevelHelper;\n", - "/**\n * HLS interface\n */\n'use strict';\n\nimport Event from './events';\nimport {ErrorTypes, ErrorDetails} from './errors';\nimport PlaylistLoader from './loader/playlist-loader';\nimport FragmentLoader from './loader/fragment-loader';\nimport AbrController from './controller/abr-controller';\nimport MSEMediaController from './controller/mse-media-controller';\nimport LevelController from './controller/level-controller';\n//import FPSController from './controller/fps-controller';\nimport {logger, enableLogs} from './utils/logger';\nimport XhrLoader from './utils/xhr-loader';\nimport EventEmitter from 'events';\nimport KeyLoader from './loader/key-loader';\n\nclass Hls {\n\n static isSupported() {\n return (window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"'));\n }\n\n static get Events() {\n return Event;\n }\n\n static get ErrorTypes() {\n return ErrorTypes;\n }\n\n static get ErrorDetails() {\n return ErrorDetails;\n }\n\n static get DefaultConfig() {\n if(!Hls.defaultConfig) {\n Hls.defaultConfig = {\n autoStartLoad: true,\n debug: false,\n maxBufferLength: 30,\n maxBufferSize: 60 * 1000 * 1000,\n liveSyncDurationCount:3,\n liveMaxLatencyDurationCount: Infinity,\n maxMaxBufferLength: 600,\n enableWorker: true,\n enableSoftwareAES: true,\n manifestLoadingTimeOut: 10000,\n manifestLoadingMaxRetry: 1,\n manifestLoadingRetryDelay: 1000,\n levelLoadingTimeOut: 10000,\n levelLoadingMaxRetry: 4,\n levelLoadingRetryDelay: 1000,\n fragLoadingTimeOut: 20000,\n fragLoadingMaxRetry: 6,\n fragLoadingRetryDelay: 1000,\n fragLoadingLoopThreshold: 3,\n // fpsDroppedMonitoringPeriod: 5000,\n // fpsDroppedMonitoringThreshold: 0.2,\n appendErrorMaxRetry: 3,\n loader: XhrLoader,\n fLoader: undefined,\n pLoader: undefined,\n abrController : AbrController,\n mediaController: MSEMediaController\n };\n }\n return Hls.defaultConfig;\n }\n\n static set DefaultConfig(defaultConfig) {\n Hls.defaultConfig = defaultConfig;\n }\n\n constructor(config = {}) {\n var defaultConfig = Hls.DefaultConfig;\n for (var prop in defaultConfig) {\n if (prop in config) { continue; }\n config[prop] = defaultConfig[prop];\n }\n\n if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n }\n\n enableLogs(config.debug);\n this.config = config;\n // observer setup\n var observer = this.observer = new EventEmitter();\n observer.trigger = function trigger (event, ...data) {\n observer.emit(event, event, ...data);\n };\n\n observer.off = function off (event, ...data) {\n observer.removeListener(event, ...data);\n };\n this.on = observer.on.bind(observer);\n this.off = observer.off.bind(observer);\n this.trigger = observer.trigger.bind(observer);\n this.playlistLoader = new PlaylistLoader(this);\n this.fragmentLoader = new FragmentLoader(this);\n this.levelController = new LevelController(this);\n this.abrController = new config.abrController(this);\n this.mediaController = new config.mediaController(this);\n this.keyLoader = new KeyLoader(this);\n //this.fpsController = new FPSController(this);\n }\n\n destroy() {\n logger.log('destroy');\n this.trigger(Event.DESTROYING);\n this.detachMedia();\n this.playlistLoader.destroy();\n this.fragmentLoader.destroy();\n this.levelController.destroy();\n this.mediaController.destroy();\n this.keyLoader.destroy();\n //this.fpsController.destroy();\n this.url = null;\n this.observer.removeAllListeners();\n }\n\n attachMedia(media) {\n logger.log('attachMedia');\n this.media = media;\n this.trigger(Event.MEDIA_ATTACHING, {media: media});\n }\n\n detachMedia() {\n logger.log('detachMedia');\n this.trigger(Event.MEDIA_DETACHING);\n this.media = null;\n }\n\n loadSource(url) {\n logger.log(`loadSource:${url}`);\n this.url = url;\n // when attaching to a source URL, trigger a playlist load\n this.trigger(Event.MANIFEST_LOADING, {url: url});\n }\n\n startLoad() {\n logger.log('startLoad');\n this.mediaController.startLoad();\n }\n\n swapAudioCodec() {\n logger.log('swapAudioCodec');\n this.mediaController.swapAudioCodec();\n }\n\n recoverMediaError() {\n logger.log('recoverMediaError');\n var media = this.media;\n this.detachMedia();\n this.attachMedia(media);\n }\n\n /** Return all quality levels **/\n get levels() {\n return this.levelController.levels;\n }\n\n /** Return current playback quality level **/\n get currentLevel() {\n return this.mediaController.currentLevel;\n }\n\n /* set quality level immediately (-1 for automatic level selection) */\n set currentLevel(newLevel) {\n logger.log(`set currentLevel:${newLevel}`);\n this.loadLevel = newLevel;\n this.mediaController.immediateLevelSwitch();\n }\n\n /** Return next playback quality level (quality level of next fragment) **/\n get nextLevel() {\n return this.mediaController.nextLevel;\n }\n\n /* set quality level for next fragment (-1 for automatic level selection) */\n set nextLevel(newLevel) {\n logger.log(`set nextLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n this.mediaController.nextLevelSwitch();\n }\n\n /** Return the quality level of current/last loaded fragment **/\n get loadLevel() {\n return this.levelController.level;\n }\n\n /* set quality level for current/next loaded fragment (-1 for automatic level selection) */\n set loadLevel(newLevel) {\n logger.log(`set loadLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n }\n\n /** Return the quality level of next loaded fragment **/\n get nextLoadLevel() {\n return this.levelController.nextLoadLevel();\n }\n\n /** set quality level of next loaded fragment **/\n set nextLoadLevel(level) {\n this.levelController.level = level;\n }\n\n /** Return first level (index of first level referenced in manifest)\n **/\n get firstLevel() {\n return this.levelController.firstLevel;\n }\n\n /** set first level (index of first level referenced in manifest)\n **/\n set firstLevel(newLevel) {\n logger.log(`set firstLevel:${newLevel}`);\n this.levelController.firstLevel = newLevel;\n }\n\n /** Return start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n get startLevel() {\n return this.levelController.startLevel;\n }\n\n /** set start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n set startLevel(newLevel) {\n logger.log(`set startLevel:${newLevel}`);\n this.levelController.startLevel = newLevel;\n }\n\n /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n get autoLevelCapping() {\n return this.abrController.autoLevelCapping;\n }\n\n /** set the capping/max level value that could be used by automatic level selection algorithm **/\n set autoLevelCapping(newLevel) {\n logger.log(`set autoLevelCapping:${newLevel}`);\n this.abrController.autoLevelCapping = newLevel;\n }\n\n /* check if we are in automatic level selection mode */\n get autoLevelEnabled() {\n return (this.levelController.manualLevel === -1);\n }\n\n /* return manual level */\n get manualLevel() {\n return this.levelController.manualLevel;\n }\n}\n\nexport default Hls;\n", - "/*\n * Fragment Loader\n*/\n\nimport Event from '../events';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass FragmentLoader {\n\n constructor(hls) {\n this.hls = hls;\n this.onfl = this.onFragLoading.bind(this);\n hls.on(Event.FRAG_LOADING, this.onfl);\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n this.hls.off(Event.FRAG_LOADING, this.onfl);\n }\n\n onFragLoading(event, data) {\n var frag = data.frag;\n this.frag = frag;\n this.frag.loaded = 0;\n var config = this.hls.config;\n frag.loader = this.loader = typeof(config.fLoader) !== 'undefined' ? new config.fLoader(config) : new config.loader(config);\n this.loader.load(frag.url, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, 1, 0, this.loadprogress.bind(this), frag);\n }\n\n loadsuccess(event, stats) {\n var payload = event.currentTarget.response;\n stats.length = payload.byteLength;\n // detach fragment loader on load success\n this.frag.loader = undefined;\n this.hls.trigger(Event.FRAG_LOADED, {payload: payload, frag: this.frag, stats: stats});\n }\n\n loaderror(event) {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: this.frag, response: event});\n }\n\n loadtimeout() {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: this.frag});\n }\n\n loadprogress(event, stats) {\n this.frag.loaded = stats.loaded;\n this.hls.trigger(Event.FRAG_LOAD_PROGRESS, {frag: this.frag, stats: stats});\n }\n}\n\nexport default FragmentLoader;\n", - "/*\n * Decrypt key Loader\n*/\n\nimport Event from '../events';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass KeyLoader {\n\n constructor(hls) {\n this.hls = hls;\n this.decryptkey = null;\n this.decrypturl = null;\n this.ondkl = this.onDecryptKeyLoading.bind(this);\n hls.on(Event.KEY_LOADING, this.ondkl);\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n this.hls.off(Event.KEY_LOADING, this.ondkl);\n }\n\n onDecryptKeyLoading(event, data) {\n var frag = this.frag = data.frag,\n decryptdata = frag.decryptdata,\n uri = decryptdata.uri;\n // if uri is different from previous one or if decrypt key not retrieved yet\n if (uri !== this.decrypturl || this.decryptkey === null) {\n var config = this.hls.config;\n frag.loader = this.loader = new config.loader(config);\n this.decrypturl = uri;\n this.decryptkey = null;\n frag.loader.load(uri, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, config.fragLoadingMaxRetry, config.fragLoadingRetryDelay, this.loadprogress.bind(this), frag);\n } else if (this.decryptkey) {\n // we already loaded this key, return it\n decryptdata.key = this.decryptkey;\n this.hls.trigger(Event.KEY_LOADED, {frag: frag});\n }\n }\n\n loadsuccess(event) {\n var frag = this.frag;\n this.decryptkey = frag.decryptdata.key = new Uint8Array(event.currentTarget.response);\n // detach fragment loader on load success\n frag.loader = undefined;\n this.hls.trigger(Event.KEY_LOADED, {frag: frag});\n }\n\n loaderror(event) {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: this.frag, response: event});\n }\n\n loadtimeout() {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: this.frag});\n }\n\n loadprogress() {\n\n }\n}\n\nexport default KeyLoader;\n", - "/**\n * Playlist Loader\n*/\n\nimport Event from '../events';\nimport {ErrorTypes, ErrorDetails} from '../errors';\nimport URLHelper from '../utils/url';\nimport AttrList from '../utils/attr-list';\n//import {logger} from '../utils/logger';\n\nclass PlaylistLoader {\n\n constructor(hls) {\n this.hls = hls;\n this.onml = this.onManifestLoading.bind(this);\n this.onll = this.onLevelLoading.bind(this);\n hls.on(Event.MANIFEST_LOADING, this.onml);\n hls.on(Event.LEVEL_LOADING, this.onll);\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n this.url = this.id = null;\n this.hls.off(Event.MANIFEST_LOADING, this.onml);\n this.hls.off(Event.LEVEL_LOADING, this.onll);\n }\n\n onManifestLoading(event, data) {\n this.load(data.url, null);\n }\n\n onLevelLoading(event, data) {\n this.load(data.url, data.level, data.id);\n }\n\n load(url, id1, id2) {\n var config = this.hls.config,\n retry,\n timeout,\n retryDelay;\n this.url = url;\n this.id = id1;\n this.id2 = id2;\n if(this.id === undefined) {\n retry = config.manifestLoadingMaxRetry;\n timeout = config.manifestLoadingTimeOut;\n retryDelay = config.manifestLoadingRetryDelay;\n } else {\n retry = config.levelLoadingMaxRetry;\n timeout = config.levelLoadingTimeOut;\n retryDelay = config.levelLoadingRetryDelay;\n }\n this.loader = typeof(config.pLoader) !== 'undefined' ? new config.pLoader(config) : new config.loader(config);\n this.loader.load(url, '', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), timeout, retry, retryDelay);\n }\n\n resolve(url, baseUrl) {\n return URLHelper.buildAbsoluteURL(baseUrl, url);\n }\n\n parseMasterPlaylist(string, baseurl) {\n let levels = [], result;\n\n // https://regex101.com is your friend\n const re = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\n while ((result = re.exec(string)) != null){\n const level = {};\n\n var attrs = level.attrs = new AttrList(result[1]);\n level.url = this.resolve(result[2], baseurl);\n\n var resolution = attrs.decimalResolution('RESOLUTION');\n if(resolution) {\n level.width = resolution.width;\n level.height = resolution.height;\n }\n level.bitrate = attrs.decimalInteger('BANDWIDTH');\n level.name = attrs.NAME;\n\n var codecs = attrs.CODECS;\n if(codecs) {\n codecs = codecs.split(',');\n for (let i = 0; i < codecs.length; i++) {\n const codec = codecs[i];\n if (codec.indexOf('avc1') !== -1) {\n level.videoCodec = this.avc1toavcoti(codec);\n } else {\n level.audioCodec = codec;\n }\n }\n }\n\n levels.push(level);\n }\n return levels;\n }\n\n avc1toavcoti(codec) {\n var result, avcdata = codec.split('.');\n if (avcdata.length > 2) {\n result = avcdata.shift() + '.';\n result += parseInt(avcdata.shift()).toString(16);\n result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n } else {\n result = codec;\n }\n return result;\n }\n\n cloneObj(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n\n parseLevelPlaylist(string, baseurl, id) {\n var currentSN = 0,\n totalduration = 0,\n level = {url: baseurl, fragments: [], live: true, startSN: 0},\n levelkey = {method : null, key : null, iv : null, uri : null},\n cc = 0,\n programDateTime = null,\n frag = null,\n result,\n regexp,\n byteRangeEndOffset,\n byteRangeStartOffset;\n\n regexp = /(?:#EXT-X-(MEDIA-SEQUENCE):(\\d+))|(?:#EXT-X-(TARGETDURATION):(\\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\\d\\.]+)[^\\r\\n]*([\\r\\n]+[^#|\\r\\n]+)?)|(?:#EXT-X-(BYTERANGE):([\\d]+[@[\\d]*)]*[\\r\\n]+([^#|\\r\\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g;\n while ((result = regexp.exec(string)) !== null) {\n result.shift();\n result = result.filter(function(n) { return (n !== undefined); });\n switch (result[0]) {\n case 'MEDIA-SEQUENCE':\n currentSN = level.startSN = parseInt(result[1]);\n break;\n case 'TARGETDURATION':\n level.targetduration = parseFloat(result[1]);\n break;\n case 'ENDLIST':\n level.live = false;\n break;\n case 'DIS':\n cc++;\n break;\n case 'BYTERANGE':\n var params = result[1].split('@');\n if (params.length === 1) {\n byteRangeStartOffset = byteRangeEndOffset;\n } else {\n byteRangeStartOffset = parseInt(params[1]);\n }\n byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;\n if (frag && !frag.url) {\n frag.byteRangeStartOffset = byteRangeStartOffset;\n frag.byteRangeEndOffset = byteRangeEndOffset;\n frag.url = this.resolve(result[2], baseurl);\n }\n break;\n case 'INF':\n var duration = parseFloat(result[1]);\n if (!isNaN(duration)) {\n var fragdecryptdata,\n sn = currentSN++;\n if (levelkey.method && levelkey.uri && !levelkey.iv) {\n fragdecryptdata = this.cloneObj(levelkey);\n var uint8View = new Uint8Array(16);\n for (var i = 12; i < 16; i++) {\n uint8View[i] = (sn >> 8*(15-i)) & 0xff;\n }\n fragdecryptdata.iv = uint8View;\n } else {\n fragdecryptdata = levelkey;\n }\n var url = result[2] ? this.resolve(result[2], baseurl) : null;\n frag = {url: url, duration: duration, start: totalduration, sn: sn, level: id, cc: cc, byteRangeStartOffset: byteRangeStartOffset, byteRangeEndOffset: byteRangeEndOffset, decryptdata : fragdecryptdata, programDateTime: programDateTime};\n level.fragments.push(frag);\n totalduration += duration;\n byteRangeStartOffset = null;\n programDateTime = null;\n }\n break;\n case 'KEY':\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n var decryptparams = result[1];\n var keyAttrs = new AttrList(decryptparams);\n var decryptmethod = keyAttrs.enumeratedString('METHOD'),\n decrypturi = keyAttrs.URI,\n decryptiv = keyAttrs.hexadecimalInteger('IV');\n if (decryptmethod) {\n levelkey = { method: null, key: null, iv: null, uri: null };\n if ((decrypturi) && (decryptmethod === 'AES-128')) {\n levelkey.method = decryptmethod;\n // URI to get the key\n levelkey.uri = this.resolve(decrypturi, baseurl);\n levelkey.key = null;\n // Initialization Vector (IV)\n levelkey.iv = decryptiv;\n }\n }\n break;\n case 'PROGRAM-DATE-TIME':\n programDateTime = new Date(Date.parse(result[1]));\n break;\n default:\n break;\n }\n }\n //logger.log('found ' + level.fragments.length + ' fragments');\n if(frag && !frag.url) {\n level.fragments.pop();\n totalduration-=frag.duration;\n }\n level.totalduration = totalduration;\n level.endSN = currentSN - 1;\n return level;\n }\n\n loadsuccess(event, stats) {\n var target = event.currentTarget,\n string = target.responseText,\n url = target.responseURL,\n id = this.id,\n id2 = this.id2,\n hls = this.hls,\n levels;\n // responseURL not supported on some browsers (it is used to detect URL redirection)\n if (url === undefined) {\n // fallback to initial URL\n url = this.url;\n }\n stats.tload = performance.now();\n stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n if (string.indexOf('#EXTM3U') === 0) {\n if (string.indexOf('#EXTINF:') > 0) {\n // 1 level playlist\n // if first request, fire manifest loaded event, level will be reloaded afterwards\n // (this is to have a uniform logic for 1 level/multilevel playlists)\n if (this.id === null) {\n hls.trigger(Event.MANIFEST_LOADED, {levels: [{url: url}], url: url, stats: stats});\n } else {\n var levelDetails = this.parseLevelPlaylist(string, url, id);\n stats.tparsed = performance.now();\n hls.trigger(Event.LEVEL_LOADED, {details: levelDetails, level: id, id: id2, stats: stats});\n }\n } else {\n levels = this.parseMasterPlaylist(string, url);\n // multi level playlist, parse level info\n if (levels.length) {\n hls.trigger(Event.MANIFEST_LOADED, {levels: levels, url: url, stats: stats});\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest'});\n }\n }\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter'});\n }\n }\n\n loaderror(event) {\n var details, fatal;\n if (this.id === null) {\n details = ErrorDetails.MANIFEST_LOAD_ERROR;\n fatal = true;\n } else {\n details = ErrorDetails.LEVEL_LOAD_ERROR;\n fatal = false;\n }\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, response: event.currentTarget, level: this.id, id: this.id2});\n }\n\n loadtimeout() {\n var details, fatal;\n if (this.id === null) {\n details = ErrorDetails.MANIFEST_LOAD_TIMEOUT;\n fatal = true;\n } else {\n details = ErrorDetails.LEVEL_LOAD_TIMEOUT;\n fatal = false;\n }\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, level: this.id, id: this.id2});\n }\n}\n\nexport default PlaylistLoader;\n", + "/**\n * HLS interface\n */\n'use strict';\n\nimport Event from './events';\nimport {ErrorTypes, ErrorDetails} from './errors';\nimport PlaylistLoader from './loader/playlist-loader';\nimport FragmentLoader from './loader/fragment-loader';\nimport AbrController from './controller/abr-controller';\nimport MSEMediaController from './controller/mse-media-controller';\nimport LevelController from './controller/level-controller';\n//import FPSController from './controller/fps-controller';\nimport {logger, enableLogs} from './utils/logger';\nimport XhrLoader from './utils/xhr-loader';\nimport EventEmitter from 'events';\nimport KeyLoader from './loader/key-loader';\n\nclass Hls {\n\n static isSupported() {\n return (window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"'));\n }\n\n static get Events() {\n return Event;\n }\n\n static get ErrorTypes() {\n return ErrorTypes;\n }\n\n static get ErrorDetails() {\n return ErrorDetails;\n }\n\n static get DefaultConfig() {\n if(!Hls.defaultConfig) {\n Hls.defaultConfig = {\n autoStartLoad: true,\n debug: false,\n maxBufferLength: 30,\n maxBufferSize: 60 * 1000 * 1000,\n maxBufferHole: 0.3,\n maxSeekHole: 2,\n liveSyncDurationCount:3,\n liveMaxLatencyDurationCount: Infinity,\n maxMaxBufferLength: 600,\n enableWorker: true,\n enableSoftwareAES: true,\n manifestLoadingTimeOut: 10000,\n manifestLoadingMaxRetry: 1,\n manifestLoadingRetryDelay: 1000,\n levelLoadingTimeOut: 10000,\n levelLoadingMaxRetry: 4,\n levelLoadingRetryDelay: 1000,\n fragLoadingTimeOut: 20000,\n fragLoadingMaxRetry: 6,\n fragLoadingRetryDelay: 1000,\n fragLoadingLoopThreshold: 3,\n // fpsDroppedMonitoringPeriod: 5000,\n // fpsDroppedMonitoringThreshold: 0.2,\n appendErrorMaxRetry: 3,\n loader: XhrLoader,\n fLoader: undefined,\n pLoader: undefined,\n abrController : AbrController,\n mediaController: MSEMediaController\n };\n }\n return Hls.defaultConfig;\n }\n\n static set DefaultConfig(defaultConfig) {\n Hls.defaultConfig = defaultConfig;\n }\n\n constructor(config = {}) {\n var defaultConfig = Hls.DefaultConfig;\n for (var prop in defaultConfig) {\n if (prop in config) { continue; }\n config[prop] = defaultConfig[prop];\n }\n\n if (config.liveMaxLatencyDurationCount !== undefined && config.liveMaxLatencyDurationCount <= config.liveSyncDurationCount) {\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be gt \"liveSyncDurationCount\"');\n }\n\n enableLogs(config.debug);\n this.config = config;\n // observer setup\n var observer = this.observer = new EventEmitter();\n observer.trigger = function trigger (event, ...data) {\n observer.emit(event, event, ...data);\n };\n\n observer.off = function off (event, ...data) {\n observer.removeListener(event, ...data);\n };\n this.on = observer.on.bind(observer);\n this.off = observer.off.bind(observer);\n this.trigger = observer.trigger.bind(observer);\n this.playlistLoader = new PlaylistLoader(this);\n this.fragmentLoader = new FragmentLoader(this);\n this.levelController = new LevelController(this);\n this.abrController = new config.abrController(this);\n this.mediaController = new config.mediaController(this);\n this.keyLoader = new KeyLoader(this);\n //this.fpsController = new FPSController(this);\n }\n\n destroy() {\n logger.log('destroy');\n this.trigger(Event.DESTROYING);\n this.detachMedia();\n this.playlistLoader.destroy();\n this.fragmentLoader.destroy();\n this.levelController.destroy();\n this.mediaController.destroy();\n this.keyLoader.destroy();\n //this.fpsController.destroy();\n this.url = null;\n this.observer.removeAllListeners();\n }\n\n attachMedia(media) {\n logger.log('attachMedia');\n this.media = media;\n this.trigger(Event.MEDIA_ATTACHING, {media: media});\n }\n\n detachMedia() {\n logger.log('detachMedia');\n this.trigger(Event.MEDIA_DETACHING);\n this.media = null;\n }\n\n loadSource(url) {\n logger.log(`loadSource:${url}`);\n this.url = url;\n // when attaching to a source URL, trigger a playlist load\n this.trigger(Event.MANIFEST_LOADING, {url: url});\n }\n\n startLoad() {\n logger.log('startLoad');\n this.mediaController.startLoad();\n }\n\n swapAudioCodec() {\n logger.log('swapAudioCodec');\n this.mediaController.swapAudioCodec();\n }\n\n recoverMediaError() {\n logger.log('recoverMediaError');\n var media = this.media;\n this.detachMedia();\n this.attachMedia(media);\n }\n\n /** Return all quality levels **/\n get levels() {\n return this.levelController.levels;\n }\n\n /** Return current playback quality level **/\n get currentLevel() {\n return this.mediaController.currentLevel;\n }\n\n /* set quality level immediately (-1 for automatic level selection) */\n set currentLevel(newLevel) {\n logger.log(`set currentLevel:${newLevel}`);\n this.loadLevel = newLevel;\n this.mediaController.immediateLevelSwitch();\n }\n\n /** Return next playback quality level (quality level of next fragment) **/\n get nextLevel() {\n return this.mediaController.nextLevel;\n }\n\n /* set quality level for next fragment (-1 for automatic level selection) */\n set nextLevel(newLevel) {\n logger.log(`set nextLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n this.mediaController.nextLevelSwitch();\n }\n\n /** Return the quality level of current/last loaded fragment **/\n get loadLevel() {\n return this.levelController.level;\n }\n\n /* set quality level for current/next loaded fragment (-1 for automatic level selection) */\n set loadLevel(newLevel) {\n logger.log(`set loadLevel:${newLevel}`);\n this.levelController.manualLevel = newLevel;\n }\n\n /** Return the quality level of next loaded fragment **/\n get nextLoadLevel() {\n return this.levelController.nextLoadLevel();\n }\n\n /** set quality level of next loaded fragment **/\n set nextLoadLevel(level) {\n this.levelController.level = level;\n }\n\n /** Return first level (index of first level referenced in manifest)\n **/\n get firstLevel() {\n return this.levelController.firstLevel;\n }\n\n /** set first level (index of first level referenced in manifest)\n **/\n set firstLevel(newLevel) {\n logger.log(`set firstLevel:${newLevel}`);\n this.levelController.firstLevel = newLevel;\n }\n\n /** Return start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n get startLevel() {\n return this.levelController.startLevel;\n }\n\n /** set start level (level of first fragment that will be played back)\n if not overrided by user, first level appearing in manifest will be used as start level\n if -1 : automatic start level selection, playback will start from level matching download bandwidth (determined from download of first segment)\n **/\n set startLevel(newLevel) {\n logger.log(`set startLevel:${newLevel}`);\n this.levelController.startLevel = newLevel;\n }\n\n /** Return the capping/max level value that could be used by automatic level selection algorithm **/\n get autoLevelCapping() {\n return this.abrController.autoLevelCapping;\n }\n\n /** set the capping/max level value that could be used by automatic level selection algorithm **/\n set autoLevelCapping(newLevel) {\n logger.log(`set autoLevelCapping:${newLevel}`);\n this.abrController.autoLevelCapping = newLevel;\n }\n\n /* check if we are in automatic level selection mode */\n get autoLevelEnabled() {\n return (this.levelController.manualLevel === -1);\n }\n\n /* return manual level */\n get manualLevel() {\n return this.levelController.manualLevel;\n }\n}\n\nexport default Hls;\n", + "/*\n * Fragment Loader\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass FragmentLoader extends EventHandler {\n\n constructor(hls) {\n super(hls, Event.FRAG_LOADING);\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n EventHandler.prototype.destroy.call(this);\n }\n\n onFragLoading(data) {\n var frag = data.frag;\n this.frag = frag;\n this.frag.loaded = 0;\n var config = this.hls.config;\n frag.loader = this.loader = typeof(config.fLoader) !== 'undefined' ? new config.fLoader(config) : new config.loader(config);\n this.loader.load(frag.url, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, 1, 0, this.loadprogress.bind(this), frag);\n }\n\n loadsuccess(event, stats) {\n var payload = event.currentTarget.response;\n stats.length = payload.byteLength;\n // detach fragment loader on load success\n this.frag.loader = undefined;\n this.hls.trigger(Event.FRAG_LOADED, {payload: payload, frag: this.frag, stats: stats});\n }\n\n loaderror(event) {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_ERROR, fatal: false, frag: this.frag, response: event});\n }\n\n loadtimeout() {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.FRAG_LOAD_TIMEOUT, fatal: false, frag: this.frag});\n }\n\n loadprogress(event, stats) {\n this.frag.loaded = stats.loaded;\n this.hls.trigger(Event.FRAG_LOAD_PROGRESS, {frag: this.frag, stats: stats});\n }\n}\n\nexport default FragmentLoader;\n", + "/*\n * Decrypt key Loader\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass KeyLoader extends EventHandler {\n\n constructor(hls) {\n super(hls, Event.KEY_LOADING);\n this.decryptkey = null;\n this.decrypturl = null;\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n EventHandler.prototype.destroy.call(this);\n }\n\n onKeyLoading(data) {\n var frag = this.frag = data.frag,\n decryptdata = frag.decryptdata,\n uri = decryptdata.uri;\n // if uri is different from previous one or if decrypt key not retrieved yet\n if (uri !== this.decrypturl || this.decryptkey === null) {\n var config = this.hls.config;\n frag.loader = this.loader = new config.loader(config);\n this.decrypturl = uri;\n this.decryptkey = null;\n frag.loader.load(uri, 'arraybuffer', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), config.fragLoadingTimeOut, config.fragLoadingMaxRetry, config.fragLoadingRetryDelay, this.loadprogress.bind(this), frag);\n } else if (this.decryptkey) {\n // we already loaded this key, return it\n decryptdata.key = this.decryptkey;\n this.hls.trigger(Event.KEY_LOADED, {frag: frag});\n }\n }\n\n loadsuccess(event) {\n var frag = this.frag;\n this.decryptkey = frag.decryptdata.key = new Uint8Array(event.currentTarget.response);\n // detach fragment loader on load success\n frag.loader = undefined;\n this.hls.trigger(Event.KEY_LOADED, {frag: frag});\n }\n\n loaderror(event) {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_ERROR, fatal: false, frag: this.frag, response: event});\n }\n\n loadtimeout() {\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.KEY_LOAD_TIMEOUT, fatal: false, frag: this.frag});\n }\n\n loadprogress() {\n\n }\n}\n\nexport default KeyLoader;\n", + "/**\n * Playlist Loader\n*/\n\nimport Event from '../events';\nimport EventHandler from '../event-handler';\nimport {ErrorTypes, ErrorDetails} from '../errors';\nimport URLHelper from '../utils/url';\nimport AttrList from '../utils/attr-list';\n//import {logger} from '../utils/logger';\n\nclass PlaylistLoader extends EventHandler {\n\n constructor(hls) {\n super(hls,\n Event.MANIFEST_LOADING,\n Event.LEVEL_LOADING);\n }\n\n destroy() {\n if (this.loader) {\n this.loader.destroy();\n this.loader = null;\n }\n this.url = this.id = null;\n EventHandler.prototype.destroy.call(this);\n }\n\n onManifestLoading(data) {\n this.load(data.url, null);\n }\n\n onLevelLoading(data) {\n this.load(data.url, data.level, data.id);\n }\n\n load(url, id1, id2) {\n var config = this.hls.config,\n retry,\n timeout,\n retryDelay;\n this.url = url;\n this.id = id1;\n this.id2 = id2;\n if(this.id === undefined) {\n retry = config.manifestLoadingMaxRetry;\n timeout = config.manifestLoadingTimeOut;\n retryDelay = config.manifestLoadingRetryDelay;\n } else {\n retry = config.levelLoadingMaxRetry;\n timeout = config.levelLoadingTimeOut;\n retryDelay = config.levelLoadingRetryDelay;\n }\n this.loader = typeof(config.pLoader) !== 'undefined' ? new config.pLoader(config) : new config.loader(config);\n this.loader.load(url, '', this.loadsuccess.bind(this), this.loaderror.bind(this), this.loadtimeout.bind(this), timeout, retry, retryDelay);\n }\n\n resolve(url, baseUrl) {\n return URLHelper.buildAbsoluteURL(baseUrl, url);\n }\n\n parseMasterPlaylist(string, baseurl) {\n let levels = [], result;\n\n // https://regex101.com is your friend\n const re = /#EXT-X-STREAM-INF:([^\\n\\r]*)[\\r\\n]+([^\\r\\n]+)/g;\n while ((result = re.exec(string)) != null){\n const level = {};\n\n var attrs = level.attrs = new AttrList(result[1]);\n level.url = this.resolve(result[2], baseurl);\n\n var resolution = attrs.decimalResolution('RESOLUTION');\n if(resolution) {\n level.width = resolution.width;\n level.height = resolution.height;\n }\n level.bitrate = attrs.decimalInteger('BANDWIDTH');\n level.name = attrs.NAME;\n\n var codecs = attrs.CODECS;\n if(codecs) {\n codecs = codecs.split(',');\n for (let i = 0; i < codecs.length; i++) {\n const codec = codecs[i];\n if (codec.indexOf('avc1') !== -1) {\n level.videoCodec = this.avc1toavcoti(codec);\n } else {\n level.audioCodec = codec;\n }\n }\n }\n\n levels.push(level);\n }\n return levels;\n }\n\n avc1toavcoti(codec) {\n var result, avcdata = codec.split('.');\n if (avcdata.length > 2) {\n result = avcdata.shift() + '.';\n result += parseInt(avcdata.shift()).toString(16);\n result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);\n } else {\n result = codec;\n }\n return result;\n }\n\n cloneObj(obj) {\n return JSON.parse(JSON.stringify(obj));\n }\n\n parseLevelPlaylist(string, baseurl, id) {\n var currentSN = 0,\n totalduration = 0,\n level = {url: baseurl, fragments: [], live: true, startSN: 0},\n levelkey = {method : null, key : null, iv : null, uri : null},\n cc = 0,\n programDateTime = null,\n frag = null,\n result,\n regexp,\n byteRangeEndOffset,\n byteRangeStartOffset;\n\n regexp = /(?:#EXT-X-(MEDIA-SEQUENCE):(\\d+))|(?:#EXT-X-(TARGETDURATION):(\\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\\d\\.]+)[^\\r\\n]*([\\r\\n]+[^#|\\r\\n]+)?)|(?:#EXT-X-(BYTERANGE):([\\d]+[@[\\d]*)]*[\\r\\n]+([^#|\\r\\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g;\n while ((result = regexp.exec(string)) !== null) {\n result.shift();\n result = result.filter(function(n) { return (n !== undefined); });\n switch (result[0]) {\n case 'MEDIA-SEQUENCE':\n currentSN = level.startSN = parseInt(result[1]);\n break;\n case 'TARGETDURATION':\n level.targetduration = parseFloat(result[1]);\n break;\n case 'ENDLIST':\n level.live = false;\n break;\n case 'DIS':\n cc++;\n break;\n case 'BYTERANGE':\n var params = result[1].split('@');\n if (params.length === 1) {\n byteRangeStartOffset = byteRangeEndOffset;\n } else {\n byteRangeStartOffset = parseInt(params[1]);\n }\n byteRangeEndOffset = parseInt(params[0]) + byteRangeStartOffset;\n if (frag && !frag.url) {\n frag.byteRangeStartOffset = byteRangeStartOffset;\n frag.byteRangeEndOffset = byteRangeEndOffset;\n frag.url = this.resolve(result[2], baseurl);\n }\n break;\n case 'INF':\n var duration = parseFloat(result[1]);\n if (!isNaN(duration)) {\n var fragdecryptdata,\n sn = currentSN++;\n if (levelkey.method && levelkey.uri && !levelkey.iv) {\n fragdecryptdata = this.cloneObj(levelkey);\n var uint8View = new Uint8Array(16);\n for (var i = 12; i < 16; i++) {\n uint8View[i] = (sn >> 8*(15-i)) & 0xff;\n }\n fragdecryptdata.iv = uint8View;\n } else {\n fragdecryptdata = levelkey;\n }\n var url = result[2] ? this.resolve(result[2], baseurl) : null;\n frag = {url: url, duration: duration, start: totalduration, sn: sn, level: id, cc: cc, byteRangeStartOffset: byteRangeStartOffset, byteRangeEndOffset: byteRangeEndOffset, decryptdata : fragdecryptdata, programDateTime: programDateTime};\n level.fragments.push(frag);\n totalduration += duration;\n byteRangeStartOffset = null;\n programDateTime = null;\n }\n break;\n case 'KEY':\n // https://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-3.4.4\n var decryptparams = result[1];\n var keyAttrs = new AttrList(decryptparams);\n var decryptmethod = keyAttrs.enumeratedString('METHOD'),\n decrypturi = keyAttrs.URI,\n decryptiv = keyAttrs.hexadecimalInteger('IV');\n if (decryptmethod) {\n levelkey = { method: null, key: null, iv: null, uri: null };\n if ((decrypturi) && (decryptmethod === 'AES-128')) {\n levelkey.method = decryptmethod;\n // URI to get the key\n levelkey.uri = this.resolve(decrypturi, baseurl);\n levelkey.key = null;\n // Initialization Vector (IV)\n levelkey.iv = decryptiv;\n }\n }\n break;\n case 'PROGRAM-DATE-TIME':\n programDateTime = new Date(Date.parse(result[1]));\n break;\n default:\n break;\n }\n }\n //logger.log('found ' + level.fragments.length + ' fragments');\n if(frag && !frag.url) {\n level.fragments.pop();\n totalduration-=frag.duration;\n }\n level.totalduration = totalduration;\n level.endSN = currentSN - 1;\n return level;\n }\n\n loadsuccess(event, stats) {\n var target = event.currentTarget,\n string = target.responseText,\n url = target.responseURL,\n id = this.id,\n id2 = this.id2,\n hls = this.hls,\n levels;\n // responseURL not supported on some browsers (it is used to detect URL redirection)\n if (url === undefined) {\n // fallback to initial URL\n url = this.url;\n }\n stats.tload = performance.now();\n stats.mtime = new Date(target.getResponseHeader('Last-Modified'));\n if (string.indexOf('#EXTM3U') === 0) {\n if (string.indexOf('#EXTINF:') > 0) {\n // 1 level playlist\n // if first request, fire manifest loaded event, level will be reloaded afterwards\n // (this is to have a uniform logic for 1 level/multilevel playlists)\n if (this.id === null) {\n hls.trigger(Event.MANIFEST_LOADED, {levels: [{url: url}], url: url, stats: stats});\n } else {\n var levelDetails = this.parseLevelPlaylist(string, url, id);\n stats.tparsed = performance.now();\n hls.trigger(Event.LEVEL_LOADED, {details: levelDetails, level: id, id: id2, stats: stats});\n }\n } else {\n levels = this.parseMasterPlaylist(string, url);\n // multi level playlist, parse level info\n if (levels.length) {\n hls.trigger(Event.MANIFEST_LOADED, {levels: levels, url: url, stats: stats});\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no level found in manifest'});\n }\n }\n } else {\n hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: url, reason: 'no EXTM3U delimiter'});\n }\n }\n\n loaderror(event) {\n var details, fatal;\n if (this.id === null) {\n details = ErrorDetails.MANIFEST_LOAD_ERROR;\n fatal = true;\n } else {\n details = ErrorDetails.LEVEL_LOAD_ERROR;\n fatal = false;\n }\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, response: event.currentTarget, level: this.id, id: this.id2});\n }\n\n loadtimeout() {\n var details, fatal;\n if (this.id === null) {\n details = ErrorDetails.MANIFEST_LOAD_TIMEOUT;\n fatal = true;\n } else {\n details = ErrorDetails.LEVEL_LOAD_TIMEOUT;\n fatal = false;\n }\n this.loader.abort();\n this.hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: details, fatal: fatal, url: this.url, loader: this.loader, level: this.id, id: this.id2});\n }\n}\n\nexport default PlaylistLoader;\n", "/**\n * Generate MP4 Box\n*/\n\n//import Hex from '../utils/hex';\nclass MP4 {\n static init() {\n MP4.types = {\n avc1: [], // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n mvex: [],\n mvhd: [],\n sdtp: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: [],\n smhd: []\n };\n\n var i;\n for (i in MP4.types) {\n if (MP4.types.hasOwnProperty(i)) {\n MP4.types[i] = [\n i.charCodeAt(0),\n i.charCodeAt(1),\n i.charCodeAt(2),\n i.charCodeAt(3)\n ];\n }\n }\n\n var videoHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65,\n 0x6f, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n\n var audioHdlr = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e,\n 0x64, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n\n MP4.HDLR_TYPES = {\n 'video': videoHdlr,\n 'audio': audioHdlr\n };\n\n var dref = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n\n var stco = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n\n MP4.STTS = MP4.STSC = MP4.STCO = stco;\n\n MP4.STSZ = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00, // sample_count\n ]);\n MP4.VMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00,\n 0x00, 0x00,\n 0x00, 0x00 // opcolor\n ]);\n MP4.SMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance\n 0x00, 0x00 // reserved\n ]);\n\n MP4.STSD = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01]);// entry_count\n\n var majorBrand = new Uint8Array([105,115,111,109]); // isom\n var avc1Brand = new Uint8Array([97,118,99,49]); // avc1\n var minorVersion = new Uint8Array([0, 0, 0, 1]);\n\n MP4.FTYP = MP4.box(MP4.types.ftyp, majorBrand, minorVersion, majorBrand, avc1Brand);\n MP4.DINF = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, dref));\n }\n\n static box(type) {\n var\n payload = Array.prototype.slice.call(arguments, 1),\n size = 8,\n i = payload.length,\n len = i,\n result;\n // calculate the total size we need to allocate\n while (i--) {\n size += payload[i].byteLength;\n }\n result = new Uint8Array(size);\n result[0] = (size >> 24) & 0xff;\n result[1] = (size >> 16) & 0xff;\n result[2] = (size >> 8) & 0xff;\n result[3] = size & 0xff;\n result.set(type, 4);\n // copy the payload into the result\n for (i = 0, size = 8; i < len; i++) {\n // copy payload[i] array @ offset size\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n }\n\n static hdlr(type) {\n return MP4.box(MP4.types.hdlr, MP4.HDLR_TYPES[type]);\n }\n\n static mdat(data) {\n return MP4.box(MP4.types.mdat, data);\n }\n\n static mdhd(timescale, duration) {\n return MP4.box(MP4.types.mdhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x03, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (duration >> 24),\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00\n ]));\n }\n\n static mdia(track) {\n return MP4.box(MP4.types.mdia, MP4.mdhd(track.timescale, track.duration), MP4.hdlr(track.type), MP4.minf(track));\n }\n\n static mfhd(sequenceNumber) {\n return MP4.box(MP4.types.mfhd, new Uint8Array([\n 0x00,\n 0x00, 0x00, 0x00, // flags\n (sequenceNumber >> 24),\n (sequenceNumber >> 16) & 0xFF,\n (sequenceNumber >> 8) & 0xFF,\n sequenceNumber & 0xFF, // sequence_number\n ]));\n }\n\n static minf(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.smhd, MP4.SMHD), MP4.DINF, MP4.stbl(track));\n } else {\n return MP4.box(MP4.types.minf, MP4.box(MP4.types.vmhd, MP4.VMHD), MP4.DINF, MP4.stbl(track));\n }\n }\n\n static moof(sn, baseMediaDecodeTime, track) {\n return MP4.box(MP4.types.moof, MP4.mfhd(sn), MP4.traf(track,baseMediaDecodeTime));\n }\n/**\n * @param tracks... (optional) {array} the tracks associated with this movie\n */\n static moov(tracks) {\n var\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trak(tracks[i]);\n }\n\n return MP4.box.apply(null, [MP4.types.moov, MP4.mvhd(tracks[0].timescale, tracks[0].duration)].concat(boxes).concat(MP4.mvex(tracks)));\n }\n\n static mvex(tracks) {\n var\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = MP4.trex(tracks[i]);\n }\n return MP4.box.apply(null, [MP4.types.mvex].concat(boxes));\n }\n\n static mvhd(timescale,duration) {\n var\n bytes = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // creation_time\n 0x00, 0x00, 0x00, 0x02, // modification_time\n (timescale >> 24) & 0xFF,\n (timescale >> 16) & 0xFF,\n (timescale >> 8) & 0xFF,\n timescale & 0xFF, // timescale\n (duration >> 24) & 0xFF,\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return MP4.box(MP4.types.mvhd, bytes);\n }\n\n static sdtp(track) {\n var\n samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i;\n // leave the full box header (4 bytes) all zero\n // write the sample table\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n bytes[i + 4] = (flags.dependsOn << 4) |\n (flags.isDependedOn << 2) |\n (flags.hasRedundancy);\n }\n\n return MP4.box(MP4.types.sdtp, bytes);\n }\n\n static stbl(track) {\n return MP4.box(MP4.types.stbl, MP4.stsd(track), MP4.box(MP4.types.stts, MP4.STTS), MP4.box(MP4.types.stsc, MP4.STSC), MP4.box(MP4.types.stsz, MP4.STSZ), MP4.box(MP4.types.stco, MP4.STCO));\n }\n\n static avc1(track) {\n var sps = [], pps = [], i, data, len;\n // assemble the SPSs\n\n for (i = 0; i < track.sps.length; i++) {\n data = track.sps[i];\n len = data.byteLength;\n sps.push((len >>> 8) & 0xFF);\n sps.push((len & 0xFF));\n sps = sps.concat(Array.prototype.slice.call(data)); // SPS\n }\n\n // assemble the PPSs\n for (i = 0; i < track.pps.length; i++) {\n data = track.pps[i];\n len = data.byteLength;\n pps.push((len >>> 8) & 0xFF);\n pps.push((len & 0xFF));\n pps = pps.concat(Array.prototype.slice.call(data));\n }\n\n var avcc = MP4.box(MP4.types.avcC, new Uint8Array([\n 0x01, // version\n sps[3], // profile\n sps[4], // profile compat\n sps[5], // level\n 0xfc | 3, // lengthSizeMinusOne, hard-coded to 4 bytes\n 0xE0 | track.sps.length // 3bit reserved (111) + numOfSequenceParameterSets\n ].concat(sps).concat([\n track.pps.length // numOfPictureParameterSets\n ]).concat(pps))), // \"PPS\"\n width = track.width,\n height = track.height;\n //console.log('avcc:' + Hex.hexDump(avcc));\n return MP4.box(MP4.types.avc1, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n (width >> 8) & 0xFF,\n width & 0xff, // width\n (height >> 8) & 0xFF,\n height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x13,\n 0x76, 0x69, 0x64, 0x65,\n 0x6f, 0x6a, 0x73, 0x2d,\n 0x63, 0x6f, 0x6e, 0x74,\n 0x72, 0x69, 0x62, 0x2d,\n 0x68, 0x6c, 0x73, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11]), // pre_defined = -1\n avcc,\n MP4.box(MP4.types.btrt, new Uint8Array([\n 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0])) // avgBitrate\n );\n }\n\n static esds(track) {\n var configlen = track.config.length;\n return new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n\n 0x03, // descriptor_type\n 0x17+configlen, // length\n 0x00, 0x01, //es_id\n 0x00, // stream_priority\n\n 0x04, // descriptor_type\n 0x0f+configlen, // length\n 0x40, //codec : mpeg4_audio\n 0x15, // stream_type\n 0x00, 0x00, 0x00, // buffer_size\n 0x00, 0x00, 0x00, 0x00, // maxBitrate\n 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\n 0x05 // descriptor_type\n ].concat([configlen]).concat(track.config).concat([0x06, 0x01, 0x02])); // GASpecificConfig)); // length + audio config descriptor\n }\n\n static mp4a(track) {\n var audiosamplerate = track.audiosamplerate;\n return MP4.box(MP4.types.mp4a, new Uint8Array([\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, track.channelCount, // channelcount\n 0x00, 0x10, // sampleSize:16bits\n 0x00, 0x00, 0x00, 0x00, // reserved2\n (audiosamplerate >> 8) & 0xFF,\n audiosamplerate & 0xff, //\n 0x00, 0x00]),\n MP4.box(MP4.types.esds, MP4.esds(track)));\n }\n\n static stsd(track) {\n if (track.type === 'audio') {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.mp4a(track));\n } else {\n return MP4.box(MP4.types.stsd, MP4.STSD, MP4.avc1(track));\n }\n }\n\n static tkhd(track) {\n var id = track.id,\n duration = track.duration,\n width = track.width,\n height = track.height;\n return MP4.box(MP4.types.tkhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (id >> 24) & 0xFF,\n (id >> 16) & 0xFF,\n (id >> 8) & 0xFF,\n id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n (duration >> 24),\n (duration >> 16) & 0xFF,\n (duration >> 8) & 0xFF,\n duration & 0xFF, // duration\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n 0x00, 0x00, // non-audio track volume\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n (width >> 8) & 0xFF,\n width & 0xFF,\n 0x00, 0x00, // width\n (height >> 8) & 0xFF,\n height & 0xFF,\n 0x00, 0x00 // height\n ]));\n }\n\n static traf(track,baseMediaDecodeTime) {\n var sampleDependencyTable = MP4.sdtp(track),\n id = track.id;\n return MP4.box(MP4.types.traf,\n MP4.box(MP4.types.tfhd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF) // track_ID\n ])),\n MP4.box(MP4.types.tfdt, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (baseMediaDecodeTime >>24),\n (baseMediaDecodeTime >> 16) & 0XFF,\n (baseMediaDecodeTime >> 8) & 0XFF,\n (baseMediaDecodeTime & 0xFF) // baseMediaDecodeTime\n ])),\n MP4.trun(track,\n sampleDependencyTable.length +\n 16 + // tfhd\n 16 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8), // mdat header\n sampleDependencyTable);\n }\n\n /**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\n static trak(track) {\n track.duration = track.duration || 0xffffffff;\n return MP4.box(MP4.types.trak, MP4.tkhd(track), MP4.mdia(track));\n }\n\n static trex(track) {\n var id = track.id;\n return MP4.box(MP4.types.trex, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (id >> 24),\n (id >> 16) & 0XFF,\n (id >> 8) & 0XFF,\n (id & 0xFF), // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]));\n }\n\n static trun(track, offset) {\n var samples= track.samples || [],\n len = samples.length,\n arraylen = 12 + (16 * len),\n array = new Uint8Array(arraylen),\n i,sample,duration,size,flags,cts;\n offset += 8 + arraylen;\n array.set([\n 0x00, // version 0\n 0x00, 0x0f, 0x01, // flags\n (len >>> 24) & 0xFF,\n (len >>> 16) & 0xFF,\n (len >>> 8) & 0xFF,\n len & 0xFF, // sample_count\n (offset >>> 24) & 0xFF,\n (offset >>> 16) & 0xFF,\n (offset >>> 8) & 0xFF,\n offset & 0xFF // data_offset\n ],0);\n for (i = 0; i < len; i++) {\n sample = samples[i];\n duration = sample.duration;\n size = sample.size;\n flags = sample.flags;\n cts = sample.cts;\n array.set([\n (duration >>> 24) & 0xFF,\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n duration & 0xFF, // sample_duration\n (size >>> 24) & 0xFF,\n (size >>> 16) & 0xFF,\n (size >>> 8) & 0xFF,\n size & 0xFF, // sample_size\n (flags.isLeading << 2) | flags.dependsOn,\n (flags.isDependedOn << 6) |\n (flags.hasRedundancy << 4) |\n (flags.paddingValue << 1) |\n flags.isNonSync,\n flags.degradPrio & 0xF0 << 8,\n flags.degradPrio & 0x0F, // sample_flags\n (cts >>> 24) & 0xFF,\n (cts >>> 16) & 0xFF,\n (cts >>> 8) & 0xFF,\n cts & 0xFF // sample_composition_time_offset\n ],12+16*i);\n }\n return MP4.box(MP4.types.trun, array);\n }\n\n static initSegment(tracks) {\n if (!MP4.types) {\n MP4.init();\n }\n var movie = MP4.moov(tracks), result;\n result = new Uint8Array(MP4.FTYP.byteLength + movie.byteLength);\n result.set(MP4.FTYP);\n result.set(movie, MP4.FTYP.byteLength);\n return result;\n }\n}\n\nexport default MP4;\n", - "/**\n * fMP4 remuxer\n*/\n\n\nimport Event from '../events';\nimport {logger} from '../utils/logger';\nimport MP4 from '../remux/mp4-generator';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass MP4Remuxer {\n constructor(observer) {\n this.observer = observer;\n this.ISGenerated = false;\n this.PES2MP4SCALEFACTOR = 4;\n this.PES_TIMESCALE = 90000;\n this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;\n }\n\n get timescale() {\n return this.MP4_TIMESCALE;\n }\n\n destroy() {\n }\n\n insertDiscontinuity() {\n this._initPTS = this._initDTS = this.nextAacPts = this.nextAvcDts = undefined;\n }\n\n switchLevel() {\n this.ISGenerated = false;\n }\n\n remux(audioTrack,videoTrack,id3Track,timeOffset, contiguous) {\n // generate Init Segment if needed\n if (!this.ISGenerated) {\n this.generateIS(audioTrack,videoTrack,timeOffset);\n }\n //logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (videoTrack.samples.length) {\n this.remuxVideo(videoTrack,timeOffset,contiguous);\n }\n //logger.log('nb AAC samples:' + audioTrack.samples.length);\n if (audioTrack.samples.length) {\n this.remuxAudio(audioTrack,timeOffset,contiguous);\n }\n //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (id3Track.samples.length) {\n this.remuxID3(id3Track,timeOffset);\n }\n //notify end of parsing\n this.observer.trigger(Event.FRAG_PARSED);\n }\n\n generateIS(audioTrack,videoTrack,timeOffset) {\n var observer = this.observer,\n audioSamples = audioTrack.samples,\n videoSamples = videoTrack.samples,\n nbAudio = audioSamples.length,\n nbVideo = videoSamples.length,\n pesTimeScale = this.PES_TIMESCALE;\n\n if(nbAudio === 0 && nbVideo === 0) {\n observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found'});\n } else if (nbVideo === 0) {\n //audio only\n if (audioTrack.config) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n audioMoov: MP4.initSegment([audioTrack]),\n audioCodec : audioTrack.codec,\n audioChannelCount : audioTrack.channelCount\n });\n this.ISGenerated = true;\n }\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = audioSamples[0].pts - pesTimeScale * timeOffset;\n this._initDTS = audioSamples[0].dts - pesTimeScale * timeOffset;\n }\n } else\n if (nbAudio === 0) {\n //video only\n if (videoTrack.sps && videoTrack.pps) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n videoMoov: MP4.initSegment([videoTrack]),\n videoCodec: videoTrack.codec,\n videoWidth: videoTrack.width,\n videoHeight: videoTrack.height\n });\n this.ISGenerated = true;\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = videoSamples[0].pts - pesTimeScale * timeOffset;\n this._initDTS = videoSamples[0].dts - pesTimeScale * timeOffset;\n }\n }\n } else {\n //audio and video\n if (audioTrack.config && videoTrack.sps && videoTrack.pps) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n audioMoov: MP4.initSegment([audioTrack]),\n audioCodec: audioTrack.codec,\n audioChannelCount: audioTrack.channelCount,\n videoMoov: MP4.initSegment([videoTrack]),\n videoCodec: videoTrack.codec,\n videoWidth: videoTrack.width,\n videoHeight: videoTrack.height\n });\n this.ISGenerated = true;\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = Math.min(videoSamples[0].pts, audioSamples[0].pts) - pesTimeScale * timeOffset;\n this._initDTS = Math.min(videoSamples[0].dts, audioSamples[0].dts) - pesTimeScale * timeOffset;\n }\n }\n }\n }\n\n remuxVideo(track, timeOffset, contiguous) {\n var view,\n offset = 8,\n pesTimeScale = this.PES_TIMESCALE,\n pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n avcSample,\n mp4Sample,\n mp4SampleLength,\n unit,\n mdat, moof,\n firstPTS, firstDTS, lastDTS,\n pts, dts, ptsnorm, dtsnorm,\n samples = [];\n /* concatenate the video data and construct the mdat in place\n (need 8 more bytes to fill length and mpdat type) */\n mdat = new Uint8Array(track.len + (4 * track.nbNalu) + 8);\n view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(MP4.types.mdat, 4);\n while (track.samples.length) {\n avcSample = track.samples.shift();\n mp4SampleLength = 0;\n // convert NALU bitstream to MP4 format (prepend NALU with size field)\n while (avcSample.units.units.length) {\n unit = avcSample.units.units.shift();\n view.setUint32(offset, unit.data.byteLength);\n offset += 4;\n mdat.set(unit.data, offset);\n offset += unit.data.byteLength;\n mp4SampleLength += 4 + unit.data.byteLength;\n }\n pts = avcSample.pts - this._initDTS;\n dts = avcSample.dts - this._initDTS;\n // ensure DTS is not bigger than PTS\n dts = Math.min(pts,dts);\n //logger.log(`Video/PTS/DTS:${pts}/${dts}`);\n // if not first AVC sample of video track, normalize PTS/DTS with previous sample value\n // and ensure that sample duration is positive\n if (lastDTS !== undefined) {\n ptsnorm = this._PTSNormalize(pts, lastDTS);\n dtsnorm = this._PTSNormalize(dts, lastDTS);\n var sampleDuration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;\n if (sampleDuration <= 0) {\n logger.log(`invalid sample duration at PTS/DTS: ${avcSample.pts}/${avcSample.dts}:${sampleDuration}`);\n sampleDuration = 1;\n }\n mp4Sample.duration = sampleDuration;\n } else {\n var nextAvcDts = this.nextAvcDts,delta;\n // first AVC sample of video track, normalize PTS/DTS\n ptsnorm = this._PTSNormalize(pts, nextAvcDts);\n dtsnorm = this._PTSNormalize(dts, nextAvcDts);\n delta = Math.round((dtsnorm - nextAvcDts) / 90);\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (contiguous || Math.abs(delta) < 600) {\n if (delta) {\n if (delta > 1) {\n logger.log(`AVC:${delta} ms hole between fragments detected,filling it`);\n } else if (delta < -1) {\n logger.log(`AVC:${(-delta)} ms overlapping between fragments detected`);\n }\n // set DTS to next DTS\n dtsnorm = nextAvcDts;\n // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n ptsnorm = Math.max(ptsnorm - delta, dtsnorm);\n logger.log(`Video/PTS/DTS adjusted: ${ptsnorm}/${dtsnorm},delta:${delta}`);\n }\n }\n // remember first PTS of our avcSamples, ensure value is positive\n firstPTS = Math.max(0, ptsnorm);\n firstDTS = Math.max(0, dtsnorm);\n }\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: mp4SampleLength,\n duration: 0,\n cts: (ptsnorm - dtsnorm) / pes2mp4ScaleFactor,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0\n }\n };\n if (avcSample.key === true) {\n // the current sample is a key frame\n mp4Sample.flags.dependsOn = 2;\n mp4Sample.flags.isNonSync = 0;\n } else {\n mp4Sample.flags.dependsOn = 1;\n mp4Sample.flags.isNonSync = 1;\n }\n samples.push(mp4Sample);\n lastDTS = dtsnorm;\n }\n var lastSampleDuration = 0;\n if (samples.length >= 2) {\n lastSampleDuration = samples[samples.length - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n // next AVC sample DTS should be equal to last sample DTS + last sample duration\n this.nextAvcDts = dtsnorm + lastSampleDuration * pes2mp4ScaleFactor;\n track.len = 0;\n track.nbNalu = 0;\n if(samples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n var flags = samples[0].flags;\n // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n // https://code.google.com/p/chromium/issues/detail?id=229412\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n track.samples = samples;\n moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n this.observer.trigger(Event.FRAG_PARSING_DATA, {\n moof: moof,\n mdat: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: (ptsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: this.nextAvcDts / pesTimeScale,\n type: 'video',\n nb: samples.length\n });\n }\n\n remuxAudio(track,timeOffset, contiguous) {\n var view,\n offset = 8,\n pesTimeScale = this.PES_TIMESCALE,\n pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n aacSample, mp4Sample,\n unit,\n mdat, moof,\n firstPTS, firstDTS, lastDTS,\n pts, dts, ptsnorm, dtsnorm,\n samples = [],\n samples0 = [];\n\n track.samples.forEach(aacSample => {\n if(pts === undefined || aacSample.pts > pts) {\n samples0.push(aacSample);\n pts = aacSample.pts;\n } else {\n logger.warn('dropping past audio frame');\n }\n });\n\n while (samples0.length) {\n aacSample = samples0.shift();\n unit = aacSample.unit;\n pts = aacSample.pts - this._initDTS;\n dts = aacSample.dts - this._initDTS;\n //logger.log(`Audio/PTS:${aacSample.pts.toFixed(0)}`);\n // if not first sample\n if (lastDTS !== undefined) {\n ptsnorm = this._PTSNormalize(pts, lastDTS);\n dtsnorm = this._PTSNormalize(dts, lastDTS);\n // let's compute sample duration\n mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;\n if (mp4Sample.duration < 0) {\n // not expected to happen ...\n logger.log(`invalid AAC sample duration at PTS:${aacSample.pts}:${mp4Sample.duration}`);\n mp4Sample.duration = 0;\n }\n } else {\n var nextAacPts = this.nextAacPts,delta;\n ptsnorm = this._PTSNormalize(pts, nextAacPts);\n dtsnorm = this._PTSNormalize(dts, nextAacPts);\n delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (contiguous || Math.abs(delta) < 600) {\n // log delta\n if (delta) {\n if (delta > 0) {\n logger.log(`${delta} ms hole between AAC samples detected,filling it`);\n } else if (delta < 0) {\n // drop overlapping audio frames... browser will deal with it\n logger.log(`${(-delta)} ms overlapping between AAC samples detected, drop frame`);\n track.len -= unit.byteLength;\n continue;\n }\n // set DTS to next DTS\n ptsnorm = dtsnorm = nextAacPts;\n }\n }\n // remember first PTS of our aacSamples, ensure value is positive\n firstPTS = Math.max(0, ptsnorm);\n firstDTS = Math.max(0, dtsnorm);\n /* concatenate the audio data and construct the mdat in place\n (need 8 more bytes to fill length and mdat type) */\n mdat = new Uint8Array(track.len + 8);\n view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(MP4.types.mdat, 4);\n }\n mdat.set(unit, offset);\n offset += unit.byteLength;\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: unit.byteLength,\n cts: 0,\n duration:0,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1,\n }\n };\n samples.push(mp4Sample);\n lastDTS = dtsnorm;\n }\n var lastSampleDuration = 0;\n var nbSamples = samples.length;\n //set last sample duration as being identical to previous sample\n if (nbSamples >= 2) {\n lastSampleDuration = samples[nbSamples - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n if (nbSamples) {\n // next aac sample PTS should be equal to last sample PTS + duration\n this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;\n //logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n track.len = 0;\n track.samples = samples;\n moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n this.observer.trigger(Event.FRAG_PARSING_DATA, {\n moof: moof,\n mdat: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: this.nextAacPts / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n type: 'audio',\n nb: nbSamples\n });\n }\n }\n\n remuxID3(track,timeOffset) {\n var length = track.samples.length, sample;\n // consume samples\n if(length) {\n for(var index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting id3 pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = ((sample.pts - this._initPTS) / this.PES_TIMESCALE);\n sample.dts = ((sample.dts - this._initDTS) / this.PES_TIMESCALE);\n }\n this.observer.trigger(Event.FRAG_PARSING_METADATA, {\n samples:track.samples\n });\n }\n\n track.samples = [];\n timeOffset = timeOffset;\n }\n\n _PTSNormalize(value, reference) {\n var offset;\n if (reference === undefined) {\n return value;\n }\n if (reference < value) {\n // - 2^33\n offset = -8589934592;\n } else {\n // + 2^33\n offset = 8589934592;\n }\n /* PTS is 33bit (from 0 to 2^33 -1)\n if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n PTS looping occured. fill the gap */\n while (Math.abs(value - reference) > 4294967296) {\n value += offset;\n }\n return value;\n }\n\n}\n\nexport default MP4Remuxer;\n", + "/**\n * fMP4 remuxer\n*/\n\n\nimport Event from '../events';\nimport {logger} from '../utils/logger';\nimport MP4 from '../remux/mp4-generator';\nimport {ErrorTypes, ErrorDetails} from '../errors';\n\nclass MP4Remuxer {\n constructor(observer) {\n this.observer = observer;\n this.ISGenerated = false;\n this.PES2MP4SCALEFACTOR = 4;\n this.PES_TIMESCALE = 90000;\n this.MP4_TIMESCALE = this.PES_TIMESCALE / this.PES2MP4SCALEFACTOR;\n }\n\n get timescale() {\n return this.MP4_TIMESCALE;\n }\n\n destroy() {\n }\n\n insertDiscontinuity() {\n this._initPTS = this._initDTS = this.nextAacPts = this.nextAvcDts = undefined;\n }\n\n switchLevel() {\n this.ISGenerated = false;\n }\n\n remux(audioTrack,videoTrack,id3Track,timeOffset, contiguous) {\n // generate Init Segment if needed\n if (!this.ISGenerated) {\n this.generateIS(audioTrack,videoTrack,timeOffset);\n }\n //logger.log('nb AVC samples:' + videoTrack.samples.length);\n if (videoTrack.samples.length) {\n this.remuxVideo(videoTrack,timeOffset,contiguous);\n }\n //logger.log('nb AAC samples:' + audioTrack.samples.length);\n if (audioTrack.samples.length) {\n this.remuxAudio(audioTrack,timeOffset,contiguous);\n }\n //logger.log('nb ID3 samples:' + audioTrack.samples.length);\n if (id3Track.samples.length) {\n this.remuxID3(id3Track,timeOffset);\n }\n //notify end of parsing\n this.observer.trigger(Event.FRAG_PARSED);\n }\n\n generateIS(audioTrack,videoTrack,timeOffset) {\n var observer = this.observer,\n audioSamples = audioTrack.samples,\n videoSamples = videoTrack.samples,\n nbAudio = audioSamples.length,\n nbVideo = videoSamples.length,\n pesTimeScale = this.PES_TIMESCALE;\n\n if(nbAudio === 0 && nbVideo === 0) {\n observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found'});\n } else if (nbVideo === 0) {\n //audio only\n if (audioTrack.config) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n audioMoov: MP4.initSegment([audioTrack]),\n audioCodec : audioTrack.codec,\n audioChannelCount : audioTrack.channelCount\n });\n this.ISGenerated = true;\n }\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = audioSamples[0].pts - pesTimeScale * timeOffset;\n this._initDTS = audioSamples[0].dts - pesTimeScale * timeOffset;\n }\n } else\n if (nbAudio === 0) {\n //video only\n if (videoTrack.sps && videoTrack.pps) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n videoMoov: MP4.initSegment([videoTrack]),\n videoCodec: videoTrack.codec,\n videoWidth: videoTrack.width,\n videoHeight: videoTrack.height\n });\n this.ISGenerated = true;\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = videoSamples[0].pts - pesTimeScale * timeOffset;\n this._initDTS = videoSamples[0].dts - pesTimeScale * timeOffset;\n }\n }\n } else {\n //audio and video\n if (audioTrack.config && videoTrack.sps && videoTrack.pps) {\n observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT, {\n audioMoov: MP4.initSegment([audioTrack]),\n audioCodec: audioTrack.codec,\n audioChannelCount: audioTrack.channelCount,\n videoMoov: MP4.initSegment([videoTrack]),\n videoCodec: videoTrack.codec,\n videoWidth: videoTrack.width,\n videoHeight: videoTrack.height\n });\n this.ISGenerated = true;\n if (this._initPTS === undefined) {\n // remember first PTS of this demuxing context\n this._initPTS = Math.min(videoSamples[0].pts, audioSamples[0].pts) - pesTimeScale * timeOffset;\n this._initDTS = Math.min(videoSamples[0].dts, audioSamples[0].dts) - pesTimeScale * timeOffset;\n }\n }\n }\n }\n\n remuxVideo(track, timeOffset, contiguous) {\n var view,\n offset = 8,\n pesTimeScale = this.PES_TIMESCALE,\n pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n avcSample,\n mp4Sample,\n mp4SampleLength,\n unit,\n mdat, moof,\n firstPTS, firstDTS, lastDTS,\n pts, dts, ptsnorm, dtsnorm,\n flags,\n samples = [];\n /* concatenate the video data and construct the mdat in place\n (need 8 more bytes to fill length and mpdat type) */\n mdat = new Uint8Array(track.len + (4 * track.nbNalu) + 8);\n view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(MP4.types.mdat, 4);\n while (track.samples.length) {\n avcSample = track.samples.shift();\n mp4SampleLength = 0;\n // convert NALU bitstream to MP4 format (prepend NALU with size field)\n while (avcSample.units.units.length) {\n unit = avcSample.units.units.shift();\n view.setUint32(offset, unit.data.byteLength);\n offset += 4;\n mdat.set(unit.data, offset);\n offset += unit.data.byteLength;\n mp4SampleLength += 4 + unit.data.byteLength;\n }\n pts = avcSample.pts - this._initDTS;\n dts = avcSample.dts - this._initDTS;\n // ensure DTS is not bigger than PTS\n dts = Math.min(pts,dts);\n //logger.log(`Video/PTS/DTS:${Math.round(pts/90)}/${Math.round(dts/90)}`);\n // if not first AVC sample of video track, normalize PTS/DTS with previous sample value\n // and ensure that sample duration is positive\n if (lastDTS !== undefined) {\n ptsnorm = this._PTSNormalize(pts, lastDTS);\n dtsnorm = this._PTSNormalize(dts, lastDTS);\n var sampleDuration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;\n if (sampleDuration <= 0) {\n logger.log(`invalid sample duration at PTS/DTS: ${avcSample.pts}/${avcSample.dts}:${sampleDuration}`);\n sampleDuration = 1;\n }\n mp4Sample.duration = sampleDuration;\n } else {\n var nextAvcDts = this.nextAvcDts,delta;\n // first AVC sample of video track, normalize PTS/DTS\n ptsnorm = this._PTSNormalize(pts, nextAvcDts);\n dtsnorm = this._PTSNormalize(dts, nextAvcDts);\n delta = Math.round((dtsnorm - nextAvcDts) / 90);\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (contiguous || Math.abs(delta) < 600) {\n if (delta) {\n if (delta > 1) {\n logger.log(`AVC:${delta} ms hole between fragments detected,filling it`);\n } else if (delta < -1) {\n logger.log(`AVC:${(-delta)} ms overlapping between fragments detected`);\n }\n // set DTS to next DTS\n dtsnorm = nextAvcDts;\n // offset PTS as well, ensure that PTS is smaller or equal than new DTS\n ptsnorm = Math.max(ptsnorm - delta, dtsnorm);\n logger.log(`Video/PTS/DTS adjusted: ${ptsnorm}/${dtsnorm},delta:${delta}`);\n }\n }\n // remember first PTS of our avcSamples, ensure value is positive\n firstPTS = Math.max(0, ptsnorm);\n firstDTS = Math.max(0, dtsnorm);\n }\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${avcSample.pts}/${avcSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(avcSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: mp4SampleLength,\n duration: 0,\n cts: (ptsnorm - dtsnorm) / pes2mp4ScaleFactor,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0\n }\n };\n flags = mp4Sample.flags;\n if (avcSample.key === true) {\n // the current sample is a key frame\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n } else {\n flags.dependsOn = 1;\n flags.isNonSync = 1;\n }\n samples.push(mp4Sample);\n lastDTS = dtsnorm;\n }\n var lastSampleDuration = 0;\n if (samples.length >= 2) {\n lastSampleDuration = samples[samples.length - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n // next AVC sample DTS should be equal to last sample DTS + last sample duration\n this.nextAvcDts = dtsnorm + lastSampleDuration * pes2mp4ScaleFactor;\n track.len = 0;\n track.nbNalu = 0;\n if(samples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {\n flags = samples[0].flags;\n // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue\n // https://code.google.com/p/chromium/issues/detail?id=229412\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n track.samples = samples;\n moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n this.observer.trigger(Event.FRAG_PARSING_DATA, {\n moof: moof,\n mdat: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: (ptsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: this.nextAvcDts / pesTimeScale,\n type: 'video',\n nb: samples.length\n });\n }\n\n remuxAudio(track,timeOffset, contiguous) {\n var view,\n offset = 8,\n pesTimeScale = this.PES_TIMESCALE,\n pes2mp4ScaleFactor = this.PES2MP4SCALEFACTOR,\n aacSample, mp4Sample,\n unit,\n mdat, moof,\n firstPTS, firstDTS, lastDTS,\n pts, dts, ptsnorm, dtsnorm,\n samples = [],\n samples0 = [];\n\n track.samples.forEach(aacSample => {\n if(pts === undefined || aacSample.pts > pts) {\n samples0.push(aacSample);\n pts = aacSample.pts;\n } else {\n logger.warn('dropping past audio frame');\n }\n });\n\n while (samples0.length) {\n aacSample = samples0.shift();\n unit = aacSample.unit;\n pts = aacSample.pts - this._initDTS;\n dts = aacSample.dts - this._initDTS;\n //logger.log(`Audio/PTS:${Math.round(pts/90)}`);\n // if not first sample\n if (lastDTS !== undefined) {\n ptsnorm = this._PTSNormalize(pts, lastDTS);\n dtsnorm = this._PTSNormalize(dts, lastDTS);\n // let's compute sample duration\n mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;\n if (mp4Sample.duration < 0) {\n // not expected to happen ...\n logger.log(`invalid AAC sample duration at PTS:${aacSample.pts}:${mp4Sample.duration}`);\n mp4Sample.duration = 0;\n }\n } else {\n var nextAacPts = this.nextAacPts,delta;\n ptsnorm = this._PTSNormalize(pts, nextAacPts);\n dtsnorm = this._PTSNormalize(dts, nextAacPts);\n delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);\n // if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments\n if (contiguous || Math.abs(delta) < 600) {\n // log delta\n if (delta) {\n if (delta > 0) {\n logger.log(`${delta} ms hole between AAC samples detected,filling it`);\n } else if (delta < 0) {\n // drop overlapping audio frames... browser will deal with it\n logger.log(`${(-delta)} ms overlapping between AAC samples detected, drop frame`);\n track.len -= unit.byteLength;\n continue;\n }\n // set DTS to next DTS\n ptsnorm = dtsnorm = nextAacPts;\n }\n }\n // remember first PTS of our aacSamples, ensure value is positive\n firstPTS = Math.max(0, ptsnorm);\n firstDTS = Math.max(0, dtsnorm);\n /* concatenate the audio data and construct the mdat in place\n (need 8 more bytes to fill length and mdat type) */\n mdat = new Uint8Array(track.len + 8);\n view = new DataView(mdat.buffer);\n view.setUint32(0, mdat.byteLength);\n mdat.set(MP4.types.mdat, 4);\n }\n mdat.set(unit, offset);\n offset += unit.byteLength;\n //console.log('PTS/DTS/initDTS/normPTS/normDTS/relative PTS : ${aacSample.pts}/${aacSample.dts}/${this._initDTS}/${ptsnorm}/${dtsnorm}/${(aacSample.pts/4294967296).toFixed(3)}');\n mp4Sample = {\n size: unit.byteLength,\n cts: 0,\n duration:0,\n flags: {\n isLeading: 0,\n isDependedOn: 0,\n hasRedundancy: 0,\n degradPrio: 0,\n dependsOn: 1,\n }\n };\n samples.push(mp4Sample);\n lastDTS = dtsnorm;\n }\n var lastSampleDuration = 0;\n var nbSamples = samples.length;\n //set last sample duration as being identical to previous sample\n if (nbSamples >= 2) {\n lastSampleDuration = samples[nbSamples - 2].duration;\n mp4Sample.duration = lastSampleDuration;\n }\n if (nbSamples) {\n // next aac sample PTS should be equal to last sample PTS + duration\n this.nextAacPts = ptsnorm + pes2mp4ScaleFactor * lastSampleDuration;\n //logger.log('Audio/PTS/PTSend:' + aacSample.pts.toFixed(0) + '/' + this.nextAacDts.toFixed(0));\n track.len = 0;\n track.samples = samples;\n moof = MP4.moof(track.sequenceNumber++, firstDTS / pes2mp4ScaleFactor, track);\n track.samples = [];\n this.observer.trigger(Event.FRAG_PARSING_DATA, {\n moof: moof,\n mdat: mdat,\n startPTS: firstPTS / pesTimeScale,\n endPTS: this.nextAacPts / pesTimeScale,\n startDTS: firstDTS / pesTimeScale,\n endDTS: (dtsnorm + pes2mp4ScaleFactor * lastSampleDuration) / pesTimeScale,\n type: 'audio',\n nb: nbSamples\n });\n }\n }\n\n remuxID3(track,timeOffset) {\n var length = track.samples.length, sample;\n // consume samples\n if(length) {\n for(var index = 0; index < length; index++) {\n sample = track.samples[index];\n // setting id3 pts, dts to relative time\n // using this._initPTS and this._initDTS to calculate relative time\n sample.pts = ((sample.pts - this._initPTS) / this.PES_TIMESCALE);\n sample.dts = ((sample.dts - this._initDTS) / this.PES_TIMESCALE);\n }\n this.observer.trigger(Event.FRAG_PARSING_METADATA, {\n samples:track.samples\n });\n }\n\n track.samples = [];\n timeOffset = timeOffset;\n }\n\n _PTSNormalize(value, reference) {\n var offset;\n if (reference === undefined) {\n return value;\n }\n if (reference < value) {\n // - 2^33\n offset = -8589934592;\n } else {\n // + 2^33\n offset = 8589934592;\n }\n /* PTS is 33bit (from 0 to 2^33 -1)\n if diff between value and reference is bigger than half of the amplitude (2^32) then it means that\n PTS looping occured. fill the gap */\n while (Math.abs(value - reference) > 4294967296) {\n value += offset;\n }\n return value;\n }\n\n}\n\nexport default MP4Remuxer;\n", "\n// adapted from https://github.com/kanongil/node-m3u8parse/blob/master/attrlist.js\nclass AttrList {\n\n constructor(attrs) {\n if (typeof attrs === 'string') {\n attrs = AttrList.parseAttrList(attrs);\n }\n for(var attr in attrs){\n if(attrs.hasOwnProperty(attr)) {\n this[attr] = attrs[attr];\n }\n }\n }\n\n decimalInteger(attrName) {\n const intValue = parseInt(this[attrName], 10);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n return intValue;\n }\n\n hexadecimalInteger(attrName) {\n if(this[attrName]) {\n let stringValue = (this[attrName] || '0x').slice(2);\n stringValue = ((stringValue.length & 1) ? '0' : '') + stringValue;\n\n const value = new Uint8Array(stringValue.length / 2);\n for (let i = 0; i < stringValue.length / 2; i++) {\n value[i] = parseInt(stringValue.slice(i * 2, i * 2 + 2), 16);\n }\n return value;\n } else {\n return null;\n }\n }\n\n hexadecimalIntegerAsNumber(attrName) {\n const intValue = parseInt(this[attrName], 16);\n if (intValue > Number.MAX_SAFE_INTEGER) {\n return Infinity;\n }\n return intValue;\n }\n\n decimalFloatingPoint(attrName) {\n return parseFloat(this[attrName]);\n }\n\n enumeratedString(attrName) {\n return this[attrName];\n }\n\n decimalResolution(attrName) {\n const res = /^(\\d+)x(\\d+)$/.exec(this[attrName]);\n if (res === null) {\n return undefined;\n }\n return {\n width: parseInt(res[1], 10),\n height: parseInt(res[2], 10)\n };\n }\n\n static parseAttrList(input) {\n const re = /(.+?)=((?:\\\".*?\\\")|.*?)(?:,|$)/g;\n var match, attrs = {};\n while ((match = re.exec(input)) !== null) {\n var value = match[2], quote = '\"';\n\n if (value.indexOf(quote) === 0 &&\n value.lastIndexOf(quote) === (value.length-1)) {\n value = value.slice(1, -1);\n }\n attrs[match[1]] = value;\n }\n return attrs;\n }\n\n}\n\nexport default AttrList;\n", "var BinarySearch = {\n /**\n * Searches for an item in an array which matches a certain condition.\n * This requires the condition to only match one item in the array,\n * and for the array to be ordered.\n *\n * @param {Array} list The array to search.\n * @param {Function} comparisonFunction\n * Called and provided a candidate item as the first argument.\n * Should return:\n * > -1 if the item should be located at a lower index than the provided item.\n * > 1 if the item should be located at a higher index than the provided item.\n * > 0 if the item is the item you're looking for.\n *\n * @return {*} The object if it is found or null otherwise.\n */\n search: function(list, comparisonFunction) {\n var minIndex = 0;\n var maxIndex = list.length - 1;\n var currentIndex = null;\n var currentElement = null;\n \n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = list[currentIndex];\n \n var comparisonResult = comparisonFunction(currentElement);\n if (comparisonResult > 0) {\n minIndex = currentIndex + 1;\n }\n else if (comparisonResult < 0) {\n maxIndex = currentIndex - 1;\n }\n else {\n return currentElement;\n }\n }\n \n return null;\n }\n};\n\nmodule.exports = BinarySearch;\n", "'use strict';\n\nfunction noop() {}\n\nconst fakeLogger = {\n trace: noop,\n debug: noop,\n log: noop,\n warn: noop,\n info: noop,\n error: noop\n};\n\nlet exportedLogger = fakeLogger;\n\n//let lastCallTime;\n// function formatMsgWithTimeInfo(type, msg) {\n// const now = Date.now();\n// const diff = lastCallTime ? '+' + (now - lastCallTime) : '0';\n// lastCallTime = now;\n// msg = (new Date(now)).toISOString() + ' | [' + type + '] > ' + msg + ' ( ' + diff + ' ms )';\n// return msg;\n// }\n\nfunction formatMsg(type, msg) {\n msg = '[' + type + '] > ' + msg;\n return msg;\n}\n\nfunction consolePrintFn(type) {\n const func = window.console[type];\n if (func) {\n return function(...args) {\n if(args[0]) {\n args[0] = formatMsg(type, args[0]);\n }\n func.apply(window.console, args);\n };\n }\n return noop;\n}\n\nfunction exportLoggerFunctions(debugConfig, ...functions) {\n functions.forEach(function(type) {\n exportedLogger[type] = debugConfig[type] ? debugConfig[type].bind(debugConfig) : consolePrintFn(type);\n });\n}\n\nexport var enableLogs = function(debugConfig) {\n if (debugConfig === true || typeof debugConfig === 'object') {\n exportLoggerFunctions(debugConfig,\n // Remove out from list here to hard-disable a log-level\n //'trace',\n 'debug',\n 'log',\n 'info',\n 'warn',\n 'error'\n );\n // Some browsers don't allow to use bind on console object anyway\n // fallback to default if needed\n try {\n exportedLogger.log();\n } catch (e) {\n exportedLogger = fakeLogger;\n }\n }\n else {\n exportedLogger = fakeLogger;\n }\n};\n\nexport var logger = exportedLogger;\n", "var URLHelper = {\n\n // build an absolute URL from a relative one using the provided baseURL\n // if relativeURL is an absolute URL it will be returned as is.\n buildAbsoluteURL: function(baseURL, relativeURL) {\n // remove any remaining space and CRLF\n relativeURL = relativeURL.trim();\n if (/^[a-z]+:/i.test(relativeURL)) {\n // complete url, not relative\n return relativeURL;\n }\n\n var relativeURLQuery = null;\n var relativeURLHash = null;\n\n var relativeURLHashSplit = /^([^#]*)(.*)$/.exec(relativeURL);\n if (relativeURLHashSplit) {\n relativeURLHash = relativeURLHashSplit[2];\n relativeURL = relativeURLHashSplit[1];\n }\n var relativeURLQuerySplit = /^([^\\?]*)(.*)$/.exec(relativeURL);\n if (relativeURLQuerySplit) {\n relativeURLQuery = relativeURLQuerySplit[2];\n relativeURL = relativeURLQuerySplit[1];\n }\n\n var baseURLHashSplit = /^([^#]*)(.*)$/.exec(baseURL);\n if (baseURLHashSplit) {\n baseURL = baseURLHashSplit[1];\n }\n var baseURLQuerySplit = /^([^\\?]*)(.*)$/.exec(baseURL);\n if (baseURLQuerySplit) {\n baseURL = baseURLQuerySplit[1];\n }\n\n var baseURLDomainSplit = /^((([a-z]+):)?\\/\\/[a-z0-9\\.-]+(:[0-9]+)?\\/)(.*)$/i.exec(baseURL);\n var baseURLProtocol = baseURLDomainSplit[3];\n var baseURLDomain = baseURLDomainSplit[1];\n var baseURLPath = baseURLDomainSplit[5];\n\n var builtURL = null;\n if (/^\\/\\//.test(relativeURL)) {\n builtURL = baseURLProtocol+'://'+URLHelper.buildAbsolutePath('', relativeURL.substring(2));\n }\n else if (/^\\//.test(relativeURL)) {\n builtURL = baseURLDomain+URLHelper.buildAbsolutePath('', relativeURL.substring(1));\n }\n else {\n var newPath = URLHelper.buildAbsolutePath(baseURLPath, relativeURL);\n builtURL = baseURLDomain + newPath;\n }\n\n // put the query and hash parts back\n if (relativeURLQuery) {\n builtURL += relativeURLQuery;\n }\n if (relativeURLHash) {\n builtURL += relativeURLHash;\n }\n return builtURL;\n },\n\n // build an absolute path using the provided basePath\n // adapted from https://developer.mozilla.org/en-US/docs/Web/API/document/cookie#Using_relative_URLs_in_the_path_parameter\n // this does not handle the case where relativePath is \"/\" or \"//\". These cases should be handled outside this.\n buildAbsolutePath: function(basePath, relativePath) {\n var sRelPath = relativePath;\n var nUpLn, sDir = '', sPath = basePath.replace(/[^\\/]*$/, sRelPath.replace(/(\\/|^)(?:\\.?\\/+)+/g, '$1'));\n for (var nEnd, nStart = 0; nEnd = sPath.indexOf('/../', nStart), nEnd > -1; nStart = nEnd + nUpLn) {\n nUpLn = /^\\/(?:\\.\\.\\/)*/.exec(sPath.slice(nEnd))[0].length;\n sDir = (sDir + sPath.substring(nStart, nEnd)).replace(new RegExp('(?:\\\\\\/+[^\\\\\\/]*){0,' + ((nUpLn - 1) / 3) + '}$'), '/');\n }\n return sDir + sPath.substr(nStart);\n }\n};\n\nmodule.exports = URLHelper;\n", - "/**\n * XHR based logger\n*/\n\nimport {logger} from '../utils/logger';\n\nclass XhrLoader {\n\n constructor(config) {\n if (config && config.xhrSetup) {\n this.xhrSetup = config.xhrSetup;\n }\n }\n\n destroy() {\n this.abort();\n this.loader = null;\n }\n\n abort() {\n var loader = this.loader,\n timeoutHandle = this.timeoutHandle;\n if (loader && loader.readyState !== 4) {\n this.stats.aborted = true;\n loader.abort();\n }\n if (timeoutHandle) {\n window.clearTimeout(timeoutHandle);\n }\n }\n\n load(url, responseType, onSuccess, onError, onTimeout, timeout, maxRetry, retryDelay, onProgress = null, frag = null) {\n this.url = url;\n if (frag && !isNaN(frag.byteRangeStartOffset) && !isNaN(frag.byteRangeEndOffset)) {\n this.byteRange = frag.byteRangeStartOffset + '-' + (frag.byteRangeEndOffset-1);\n }\n this.responseType = responseType;\n this.onSuccess = onSuccess;\n this.onProgress = onProgress;\n this.onTimeout = onTimeout;\n this.onError = onError;\n this.stats = {trequest: performance.now(), retry: 0};\n this.timeout = timeout;\n this.maxRetry = maxRetry;\n this.retryDelay = retryDelay;\n this.timeoutHandle = window.setTimeout(this.loadtimeout.bind(this), timeout);\n this.loadInternal();\n }\n\n loadInternal() {\n var xhr = this.loader = new XMLHttpRequest();\n xhr.onreadystatechange = this.statechange.bind(this);\n xhr.onprogress = this.loadprogress.bind(this);\n\n xhr.open('GET', this.url, true);\n if (this.byteRange) {\n xhr.setRequestHeader('Range', 'bytes=' + this.byteRange);\n }\n xhr.responseType = this.responseType;\n this.stats.tfirst = null;\n this.stats.loaded = 0;\n if (this.xhrSetup) {\n this.xhrSetup(xhr, this.url);\n }\n xhr.send();\n }\n\n statechange(event) {\n var xhr = event.currentTarget,\n status = xhr.status,\n stats = this.stats;\n // don't proceed if xhr has been aborted\n // 4 = Response from server has been completely loaded.\n if (!stats.aborted && xhr.readyState === 4) {\n // http status between 200 to 299 are all successful\n if (status >= 200 && status < 300) {\n window.clearTimeout(this.timeoutHandle);\n stats.tload = performance.now();\n this.onSuccess(event, stats);\n } else {\n // error ...\n if (stats.retry < this.maxRetry) {\n logger.warn(`${status} while loading ${this.url}, retrying in ${this.retryDelay}...`);\n this.destroy();\n window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n // exponential backoff\n this.retryDelay = Math.min(2 * this.retryDelay, 64000);\n stats.retry++;\n } else {\n window.clearTimeout(this.timeoutHandle);\n logger.error(`${status} while loading ${this.url}` );\n this.onError(event);\n }\n }\n }\n }\n\n loadtimeout(event) {\n logger.warn(`timeout while loading ${this.url}` );\n this.onTimeout(event, this.stats);\n }\n\n loadprogress(event) {\n var stats = this.stats;\n if (stats.tfirst === null) {\n stats.tfirst = performance.now();\n }\n stats.loaded = event.loaded;\n if (this.onProgress) {\n this.onProgress(event, stats);\n }\n }\n}\n\nexport default XhrLoader;\n" + "/**\n * XHR based logger\n*/\n\nimport {logger} from '../utils/logger';\n\nclass XhrLoader {\n\n constructor(config) {\n if (config && config.xhrSetup) {\n this.xhrSetup = config.xhrSetup;\n }\n }\n\n destroy() {\n this.abort();\n this.loader = null;\n }\n\n abort() {\n var loader = this.loader,\n timeoutHandle = this.timeoutHandle;\n if (loader && loader.readyState !== 4) {\n this.stats.aborted = true;\n loader.abort();\n }\n if (timeoutHandle) {\n window.clearTimeout(timeoutHandle);\n }\n }\n\n load(url, responseType, onSuccess, onError, onTimeout, timeout, maxRetry, retryDelay, onProgress = null, frag = null) {\n this.url = url;\n if (frag && !isNaN(frag.byteRangeStartOffset) && !isNaN(frag.byteRangeEndOffset)) {\n this.byteRange = frag.byteRangeStartOffset + '-' + (frag.byteRangeEndOffset-1);\n }\n this.responseType = responseType;\n this.onSuccess = onSuccess;\n this.onProgress = onProgress;\n this.onTimeout = onTimeout;\n this.onError = onError;\n this.stats = {trequest: performance.now(), retry: 0};\n this.timeout = timeout;\n this.maxRetry = maxRetry;\n this.retryDelay = retryDelay;\n this.timeoutHandle = window.setTimeout(this.loadtimeout.bind(this), timeout);\n this.loadInternal();\n }\n\n loadInternal() {\n var xhr = this.loader = new XMLHttpRequest();\n xhr.onloadend = this.loadend.bind(this);\n xhr.onprogress = this.loadprogress.bind(this);\n\n xhr.open('GET', this.url, true);\n if (this.byteRange) {\n xhr.setRequestHeader('Range', 'bytes=' + this.byteRange);\n }\n xhr.responseType = this.responseType;\n this.stats.tfirst = null;\n this.stats.loaded = 0;\n if (this.xhrSetup) {\n this.xhrSetup(xhr, this.url);\n }\n xhr.send();\n }\n\n loadend(event) {\n var xhr = event.currentTarget,\n status = xhr.status,\n stats = this.stats;\n // don't proceed if xhr has been aborted\n if (!stats.aborted) {\n // http status between 200 to 299 are all successful\n if (status >= 200 && status < 300) {\n window.clearTimeout(this.timeoutHandle);\n stats.tload = performance.now();\n this.onSuccess(event, stats);\n } else {\n // error ...\n if (stats.retry < this.maxRetry) {\n logger.warn(`${status} while loading ${this.url}, retrying in ${this.retryDelay}...`);\n this.destroy();\n window.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n // exponential backoff\n this.retryDelay = Math.min(2 * this.retryDelay, 64000);\n stats.retry++;\n } else {\n window.clearTimeout(this.timeoutHandle);\n logger.error(`${status} while loading ${this.url}` );\n this.onError(event);\n }\n }\n }\n }\n\n loadtimeout(event) {\n logger.warn(`timeout while loading ${this.url}` );\n this.onTimeout(event, this.stats);\n }\n\n loadprogress(event) {\n var stats = this.stats;\n if (stats.tfirst === null) {\n stats.tfirst = performance.now();\n }\n stats.loaded = event.loaded;\n if (this.onProgress) {\n this.onProgress(event, stats);\n }\n }\n}\n\nexport default XhrLoader;\n" ] } \ No newline at end of file diff --git a/dashboard-ui/bower_components/hls.js/dist/hls.min.js b/dashboard-ui/bower_components/hls.js/dist/hls.min.js index 6026121b8a..28e4dc3231 100644 --- a/dashboard-ui/bower_components/hls.js/dist/hls.min.js +++ b/dashboard-ui/bower_components/hls.js/dist/hls.min.js @@ -1,4 +1,4 @@ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Hls=t()}}(function(){return function s(e,t,r){function i(a,d){if(!t[a]){if(!e[a]){var l="function"==typeof require&&require;if(!d&&l)return l(a,!0);if(n)return n(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var o=t[a]={exports:{}};e[a][0].call(o.exports,function(t){var r=e[a][1][t];return i(r?r:t)},o,o.exports,s,e,t,r)}return t[a].exports}for(var n="function"==typeof require&&require,a=0;ae||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},e.prototype.emit=function(u){var o,a,n,s,e,l;if(this._events||(this._events={}),"error"===u&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(o=arguments[1],o instanceof Error)throw o;throw TypeError('Uncaught, unspecified "error" event.')}if(a=this._events[u],i(a))return!1;if(t(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,s=new Array(n-1),e=1;n>e;e++)s[e-1]=arguments[e];a.apply(this,s)}else if(r(a)){for(n=arguments.length,s=new Array(n-1),e=1;n>e;e++)s[e-1]=arguments[e];for(l=a.slice(),n=l.length,e=0;n>e;e++)l[e].apply(this,s)}return!0},e.prototype.addListener=function(a,n){var s;if(!t(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,t(n.listener)?n.listener:n),this._events[a]?r(this._events[a])?this._events[a].push(n):this._events[a]=[this._events[a],n]:this._events[a]=n,r(this._events[a])&&!this._events[a].warned){var s;s=i(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[a].length>s&&(this._events[a].warned=!0,"function"==typeof console.trace)}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(i,e){function r(){this.removeListener(i,r),a||(a=!0,e.apply(this,arguments))}if(!t(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(i,r),this},e.prototype.removeListener=function(a,i){var e,s,o,n;if(!t(i))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(e=this._events[a],o=e.length,s=-1,e===i||t(e.listener)&&e.listener===i)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,i);else if(r(e)){for(n=o;n-->0;)if(e[n]===i||e[n].listener&&e[n].listener===i){s=n;break}if(0>s)return this;1===e.length?(e.length=0,delete this._events[a]):e.splice(s,1),this._events.removeListener&&this.emit("removeListener",a,i)}return this},e.prototype.removeAllListeners=function(e){var i,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(i in this._events)"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],t(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},e.prototype.listeners=function(e){var r;return r=this._events&&this._events[e]?t(this._events[e])?[this._events[e]]:this._events[e].slice():[]},e.listenerCount=function(e,r){var i;return i=e._events&&e._events[r]?t(e._events[r])?1:e._events[r].length:0}},{}],2:[function(n,i,s){var a=arguments[3],e=arguments[4],r=arguments[5],t=JSON.stringify;i.exports=function(u){for(var i,o=Object.keys(r),n=0,l=o.length;l>n;n++){var s=o[n];if(r[s].exports===u){i=s;break}}if(!i){i=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var d={},n=0,l=o.length;l>n;n++){var s=o[n];d[s]=s}e[i]=[Function(["require","module","exports"],"("+u+")(self)"),d]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),f={};f[i]=i,e[h]=[Function(["require"],"require("+t(i)+")(self)"),f];var c="("+a+")({"+Object.keys(e).map(function(r){return t(r)+":["+e[r][0]+","+t(e[r][1])+"]"}).join(",")+"},{},["+t(h)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(g.createObjectURL(new Blob([c],{type:"text/javascript"})))}},{}],3:[function(r,i,e){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function e(i,r){for(var t=0;t=e;e++)if(r=e<=this.lastfetchlevel?.8*i:.7*i,r=0&&i1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var h,l,n,o=this.hls;switch(this.state){case e.ERROR:break;case e.STARTING:this.startLevel=o.startLevel,-1===this.startLevel&&(this.startLevel=0,this.fragBitrateTest=!0),this.level=o.nextLoadLevel=this.startLevel,this.state=e.WAITING_LEVEL,this.loadedmetadata=!1;break;case e.IDLE:if(!this.media)break;h=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition,l=this.startFragmentRequested===!1?this.startLevel:o.nextLoadLevel;var v,I=this.bufferInfo(h,.3),N=I.len,d=I.end,c=this.fragPrevious;if(this.levels[l].hasOwnProperty("bitrate")?(v=Math.max(8*this.config.maxBufferSize/this.levels[l].bitrate,this.config.maxBufferLength),v=Math.min(v,this.config.maxMaxBufferLength)):v=this.config.maxBufferLength,v>N){if(o.nextLoadLevel=l,this.level=l,n=this.levels[l].details,"undefined"==typeof n){this.state=e.WAITING_LEVEL;break}var u=n.fragments,g=u.length,p=u[0].start,D=u[g-1].start+u[g-1].duration,a=void 0;if(n.live){if(d=n.startSN&&T<=n.endSN&&(a=u[T-n.startSN],t.logger.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=u[Math.min(g-1,Math.round(g/2))],t.logger.log("live playlist, switching playlist, unknown, load middle frag : "+a.sn))}}else p>d&&(a=u[0]);if(!a){var m;if(m=D>d?f.default.search(u,function(e){return e.start+e.duration<=d?1:e.start>d?-1:0}):u[g-1],m&&(a=m,p=m.start,c&&a.level===c.level&&a.sn===c.sn))if(a.sn1&&(a.expectedLen=Math.round(a.duration*this.levels[l].bitrate/8),a.trequest=performance.now()),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,a.loadCounter){a.loadCounter++;var w=this.config.fragLoadingLoopThreshold;if(a.loadCounter>w&&Math.abs(this.fragLoadIdx-a.loadIdx)1){var k=performance.now()-s.trequest;if(k>500*s.duration){var x=1e3*s.loaded/k;s.expectedLen_&&R>O&&(t.logger.warn("loading too slow, abort fragment loading"),t.logger.log("fragLoadedDelay/bufferStarvationDelay/fragLevelNextLoadedDelay :"+R.toFixed(1)+"/"+_.toFixed(1)+"/"+O.toFixed(1)),s.loader.abort(),o.trigger(r.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s}),this.state=e.IDLE)}}break;case e.FRAG_LOADING_WAITING_RETRY:var G=performance.now(),S=this.retryDate,P=this.media,M=P&&P.seeking;(!S||G>=S||M)&&(t.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=e.IDLE);break;case e.PARSING:break;case e.PARSED:case e.APPENDING:if(this.sourceBuffer){if(this.media.error)return t.logger.error("trying to append although a media error occured, switch to ERROR state"),void(this.state=e.ERROR);if(this.sourceBuffer.audio&&this.sourceBuffer.audio.updating||this.sourceBuffer.video&&this.sourceBuffer.video.updating);else if(this.mp4segments.length){var L=this.mp4segments.shift();try{this.sourceBuffer[L.type].appendBuffer(L.data),this.appendError=0}catch(a){if(t.logger.error("error while trying to append buffer:"+a.message+",try appending later"),this.mp4segments.unshift(L),22!==a.code){this.appendError?this.appendError++:this.appendError=1;var y={type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_APPEND_ERROR,frag:this.fragCurrent};if(this.appendError>this.config.appendErrorMaxRetry)return t.logger.log("fail "+this.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),y.fatal=!0,o.trigger(r.default.ERROR,y),void(this.state=e.ERROR);y.fatal=!1,o.trigger(r.default.ERROR,y)}}this.state=e.APPENDING}}else this.state=e.IDLE;break;case e.BUFFER_FLUSHING:for(;this.flushRange.length;){var C=this.flushRange[0];if(!this.flushBuffer(C.start,C.end))break;this.flushRange.shift()}0===this.flushRange.length&&(this.immediateSwitch&&this.immediateLevelSwitchEnd(),this.state=e.IDLE,this.fragPrevious=null)}this._checkBuffer(),this._checkFragmentChanged()}},{key:"bufferInfo",value:function(i,a){var e,n=this.media,t=n.buffered,r=[];for(e=0;ed&&(t[u-1].end=r[e].end):t.push(r[e])}else t.push(r[e])}for(e=0,o=0,l=n=i;e=s&&h>i?(l=s,n=h+a,o=n-i):s>i+a&&(f=s)}return{len:o,start:l,end:n,nextStart:f}}},{key:"getBufferRange",value:function(r){var e,t;for(e=this.bufferRange.length-1;e>=0;e--)if(t=this.bufferRange[e],r>=t.start&&r<=t.end)return t;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"isBuffered",value:function(r){for(var i=this.media,t=i.buffered,e=0;e=t.start(e)&&r<=t.end(e))return!0;return!1}},{key:"_checkFragmentChanged",value:function(){var t,e,i=this.media;if(i&&i.seeking===!1&&(e=i.currentTime,e>i.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),this.isBuffered(e)?t=this.getBufferRange(e):this.isBuffered(e+.1)&&(t=this.getBufferRange(e+.1)),t)){var a=t.frag;a!==this.fragPlaying&&(this.fragPlaying=a,this.hls.trigger(r.default.FRAG_CHANGED,{frag:a}))}}},{key:"flushBuffer",value:function(d,l){var r,e,o,s,i,a;if(this.flushBufferCounter++<2*this.bufferRange.length&&this.sourceBuffer)for(var u in this.sourceBuffer){if(r=this.sourceBuffer[u],r.updating)return!1;for(e=0;e.5)return t.logger.log("flush "+u+" ["+i+","+a+"], of ["+o+","+s+"], pos:"+this.media.currentTime),r.remove(i,a),!1}var n,h=[];for(e=0;e "+a+"/"+i.videoCodec+"; audio => "+r+"/"+i.audioCodec),(void 0===r||void 0===i.audioCodec)&&(r=i.audioCodec),(void 0===a||void 0===i.videoCodec)&&(a=i.videoCodec);var s=navigator.userAgent.toLowerCase();this.audiocodecswitch&&1!==i.audioChannelCount&&-1===s.indexOf("android")&&-1===s.indexOf("firefox")&&(r="mp4a.40.5"),this.sourceBuffer||(this.sourceBuffer={},t.logger.log("selected A/V codecs for sourceBuffers:"+r+","+a),r&&(n=this.sourceBuffer.audio=this.mediaSource.addSourceBuffer("video/mp4;codecs="+r),n.addEventListener("updateend",this.onsbue),n.addEventListener("error",this.onsbe)),a&&(n=this.sourceBuffer.video=this.mediaSource.addSourceBuffer("video/mp4;codecs="+a),n.addEventListener("updateend",this.onsbue),n.addEventListener("error",this.onsbe))),r&&this.mp4segments.push({type:"audio",data:i.audioMoov}),a&&this.mp4segments.push({type:"video",data:i.videoMoov}),this.tick()}}},{key:"onFragParsing",value:function(s,i){if(this.state===e.PARSING){this.tparse2=Date.now();var a=this.levels[this.level],n=this.fragCurrent;t.logger.log("parsed "+i.type+",PTS:["+i.startPTS.toFixed(3)+","+i.endPTS.toFixed(3)+"],DTS:["+i.startDTS.toFixed(3)+"/"+i.endDTS.toFixed(3)+"],nb:"+i.nb);var l=o.default.updateFragPTS(a.details,n.sn,i.startPTS,i.endPTS);this.hls.trigger(r.default.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:l}),this.mp4segments.push({type:i.type,data:i.moof}),this.mp4segments.push({type:i.type,data:i.mdat}),this.nextLoadPosition=i.endPTS,this.bufferRange.push({type:i.type,start:i.startPTS,end:i.endPTS,frag:n}),this.tick()}else t.logger.warn("not in PARSING state, discarding "+s)}},{key:"onFragParsed",value:function(){this.state===e.PARSING&&(this.state=e.PARSED,this.stats.tparsed=performance.now(),this.tick())}},{key:"onError",value:function(s,r){switch(r.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!r.fatal){var a=this.fragLoadError;if(a?a++:a=1,a<=this.config.fragLoadingMaxRetry){this.fragLoadError=a,r.frag.loadCounter=0;var n=Math.min(Math.pow(2,a-1)*this.config.fragLoadingRetryDelay,64e3);t.logger.warn("mediaController: frag loading failed, retry in "+n+" ms"),this.retryDate=performance.now()+n,this.state=e.FRAG_LOADING_WAITING_RETRY}else t.logger.error("mediaController: "+r.details+" reaches max retry, redispatch as fatal ..."),r.fatal=!0,this.hls.trigger(s,r),this.state=e.ERROR}break;case i.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:t.logger.warn("mediaController: "+r.details+" while loading frag,switch to "+(r.fatal?"ERROR":"IDLE")+" state ..."),this.state=r.fatal?e.ERROR:e.IDLE}}},{key:"onSBUpdateEnd",value:function(){if(this.state===e.APPENDING&&0===this.mp4segments.length){var a=this.fragCurrent,i=this.stats;a&&(this.fragPrevious=a,i.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*i.length/(i.tbuffered-i.tfirst)),this.hls.trigger(r.default.FRAG_BUFFERED,{stats:i,frag:a}),t.logger.log("media buffered : "+this.timeRangesToString(this.media.buffered)), -this.state=e.IDLE)}this.tick()}},{key:"_checkBuffer",value:function(){var e=this.media;if(e){var o=e.readyState;if(o){var a=this.seekAfterBuffered;if(a)e.duration>=a&&(e.currentTime=a,this.seekAfterBuffered=void 0);else{var r=e.currentTime,n=this.bufferInfo(r,0),u=!(e.paused||e.ended||e.seeking||3>o),s=.2;if(n.len<=s&&(r>e.playbackRate*this.lastCurrentTime||!u?s=0:t.logger.trace("playback seems stuck"),n.len<=s)){var i=n.nextStart,l=i-r;i&&.3>l&&l>.005&&!e.seeking&&(t.logger.log("adjust currentTime from "+r+" to "+i),e.currentTime=i)}}}}}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"onSBUpdateError",value:function(a){t.logger.error("sourceBuffer error:"+a),this.state=e.ERROR,this.hls.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"timeRangesToString",value:function(t){for(var r="",i=t.length,e=0;i>e;e++)r+="["+t.start(e)+","+t.end(e)+"]";return r}},{key:"onMediaSourceOpen",value:function(){t.logger.log("media source opened"),this.hls.trigger(r.default.MEDIA_ATTACHED),this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvmetadata=this.onMediaMetadata.bind(this),this.onvended=this.onMediaEnded.bind(this);var e=this.media;e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("loadedmetadata",this.onvmetadata),e.addEventListener("ended",this.onvended),this.levels&&this.config.autoStartLoad&&this.startLoad(),this.mediaSource.removeEventListener("sourceopen",this.onmso)}},{key:"onMediaSourceClose",value:function(){t.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){t.logger.log("media source ended")}},{key:"currentLevel",get:function(){if(this.media){var e=this.getBufferRange(this.media.currentTime);if(e)return e.frag.level}return-1}},{key:"nextBufferRange",get:function(){return this.media?this.followingBufferRange(this.getBufferRange(this.media.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}}]),a}();s.default=y,u.exports=s.default},{"../demux/demuxer":13,"../errors":17,"../events":18,"../helper/level-helper":19,"../utils/binary-search":27,"../utils/logger":28}],6:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;te;e++)c[(a[e]=e<<1^283*(e>>7))^e]=e;for(i=r=0;!f[i];i^=u||1,r=c[r]||1)for(t=r^r<<1^r<<2^r<<3^r<<4,t=t>>8^255&t^99,f[i]=t,g[t]=i,d=a[h=a[u=a[i]]],l=16843009*d^65537*h^257*u^16843008*i,s=257*a[t]^16843008*t,e=0;4>e;e++)n[e][i]=s=s<<24^s>>>8,o[e][t]=l=l<<24^l>>>8;for(e=0;5>e;e++)n[e]=n[e].slice(0),o[e]=o[e].slice(0)}},{key:"decrypt",value:function(L,p,_,b,E,m){var f,v,g,n,e=this._key[1],t=L^e[0],i=b^e[1],a=_^e[2],r=p^e[3],y=e.length/4-2,s=4,o=this._tables[1],h=o[0],d=o[1],u=o[2],l=o[3],c=o[4];for(n=0;y>n;n++)f=h[t>>>24]^d[i>>16&255]^u[a>>8&255]^l[255&r]^e[s],v=h[i>>>24]^d[a>>16&255]^u[r>>8&255]^l[255&t]^e[s+1],g=h[a>>>24]^d[r>>16&255]^u[t>>8&255]^l[255&i]^e[s+2],r=h[r>>>24]^d[t>>16&255]^u[i>>8&255]^l[255&a]^e[s+3],s+=4,t=f,i=v,a=g;for(n=0;4>n;n++)E[(3&-n)+m]=c[t>>>24]<<24^c[i>>16&255]<<16^c[a>>8&255]<<8^c[255&r]^e[s++],f=t,t=i,i=a,a=r,r=f}}]),e}();e.default=a,t.exports=e.default},{}],7:[function(t,r,e){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t>8|e>>>24}},{key:"doDecrypt",value:function(i,v,a){var u,f,s,h,l,c,d,n,e,r=new Int32Array(i.buffer,i.byteOffset,i.byteLength>>2),p=new o.default(Array.prototype.slice.call(v)),g=new Uint8Array(i.byteLength),t=new Int32Array(g.buffer);for(u=~~a[0],f=~~a[1],s=~~a[2],h=~~a[3],e=0;ee&&(255!==t[e]||240!==(240&t[e+1]));e++);for(r.audiosamplerate||(n=o.default.getAudioConfig(this.observer,t,e,p),r.config=n.config,r.audiosamplerate=n.samplerate,r.channelCount=n.channelCount,r.codec=n.codec,r.timescale=this.remuxer.timescale,r.duration=this.remuxer.timescale*y,l.logger.log("parsed codec:"+r.codec+",rate:"+n.samplerate+",nb channel:"+n.channelCount)),f=0;u>e+5&&(a=(3&t[e+3])<<11,a|=t[e+4]<<3,a|=(224&t[e+5])>>>5,s=1&t[e+1]?7:9,a-=s,c=Math.round(d+1024*f*9e4/r.audiosamplerate),a>0&&u>=e+s+a);)for(g={unit:t.subarray(e+s,e+s+a),pts:c,dts:c},r.samples.push(g),r.len+=a,e+=a+s,f++;u-1>e&&(255!==t[e]||240!==(240&t[e+1]));e++);this.remuxer.remux(this._aacTrack,{samples:[]},{samples:[{pts:d,dts:d,unit:h.payload}]},v)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(t){var e,r,a=new i.default(t);if(a.hasTimeStamp)for(e=a.length,r=t.length;r-1>e;e++)if(255===t[e]&&240===(240&t[e+1]))return!0;return!1}}]),e}();t.default=d,s.exports=t.default},{"../demux/id3":15,"../utils/logger":28,"./adts":10}],10:[function(t,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t>>6)+1,e=(60&u[l+2])>>>2,e>d.length-1?void f.trigger(Event.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+e}):(o=(1&u[l+2])<<2,o|=(192&u[l+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+i+",sampleingIndex:"+e+"["+d[e]+"Hz],channelConfig:"+o),-1!==h.indexOf("firefox")?e>=6?(i=5,t=new Array(4),n=e-3):(i=2,t=new Array(2),n=e):-1!==h.indexOf("android")?(i=2,t=new Array(2),n=e):(i=5,t=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&e>=6?n=e-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(e>=6||1===o)||!a&&1===o)&&(i=2,t=new Array(2)),n=e)),t[0]=i<<3,t[0]|=(14&e)>>1,t[1]|=(1&e)<<7,t[1]|=o<<3,5===i&&(t[1]|=(14&n)>>1,t[2]=(1&n)<<7,t[2]|=8,t[3]=0),{config:t,samplerate:d[e],channelCount:o,codec:"mp4a.40."+i})}}]),e}();e.default=o,i.exports=e.default},{"../errors":17,"../utils/logger":28}],11:[function(e,o,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(i,r){for(var t=0;t1?r-1:0),e=1;r>e;e++)a[e-1]=arguments[e];t.emit.apply(t,[i,i].concat(a))},t.off=function(a){for(var r=arguments.length,i=Array(r>1?r-1:0),e=1;r>e;e++)i[e-1]=arguments[e];t.removeListener.apply(t,[a].concat(i))},r.addEventListener("message",function(i){switch(i.data.cmd){case"init":r.demuxer=new n.default(t,h.default);break;case"demux":var e=i.data;r.demuxer.push(new Uint8Array(e.data),e.audioCodec,e.videoCodec,e.timeOffset,e.cc,e.level,e.sn,e.duration)}}),t.on(e.default.FRAG_PARSING_INIT_SEGMENT,function(a,t){var e={event:a},i=[];t.audioCodec&&(e.audioCodec=t.audioCodec,e.audioMoov=t.audioMoov.buffer,e.audioChannelCount=t.audioChannelCount,i.push(e.audioMoov)),t.videoCodec&&(e.videoCodec=t.videoCodec,e.videoMoov=t.videoMoov.buffer,e.videoWidth=t.videoWidth,e.videoHeight=t.videoHeight,i.push(e.videoMoov)),r.postMessage(e,i)}),t.on(e.default.FRAG_PARSING_DATA,function(i,e){var t={event:i,type:e.type,startPTS:e.startPTS,endPTS:e.endPTS,startDTS:e.startDTS,endDTS:e.endDTS,moof:e.moof.buffer,mdat:e.mdat.buffer,nb:e.nb};r.postMessage(t,[t.moof,t.mdat])}),t.on(e.default.FRAG_PARSED,function(e){r.postMessage({event:e})}),t.on(e.default.ERROR,function(e,t){r.postMessage({event:e,data:t})}),t.on(e.default.FRAG_PARSING_METADATA,function(e,t){var i={event:e,samples:t.samples};r.postMessage(i)})};i.default=o,s.exports=i.default},{"../demux/demuxer-inline":11,"../events":18,"../remux/mp4-remuxer":25,events:1}],13:[function(e,u,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(i,r){for(var t=0;t0&&null!=e&&null!=e.key&&"AES-128"===e.method){null==this.decrypter&&(this.decrypter=new p.default(this.hls));var u=this;this.decrypter.decrypt(t,e.key,e.iv,function(e){u.pushDecrypted(e,r,i,a,n,s,o,l)})}else this.pushDecrypted(t,r,i,a,n,s,o,l)}},{key:"onWorkerMessage",value:function(e){switch(e.data.event){case t.default.FRAG_PARSING_INIT_SEGMENT:var r={};e.data.audioMoov&&(r.audioMoov=new Uint8Array(e.data.audioMoov),r.audioCodec=e.data.audioCodec,r.audioChannelCount=e.data.audioChannelCount),e.data.videoMoov&&(r.videoMoov=new Uint8Array(e.data.videoMoov),r.videoCodec=e.data.videoCodec,r.videoWidth=e.data.videoWidth,r.videoHeight=e.data.videoHeight),this.hls.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,r);break;case t.default.FRAG_PARSING_DATA:this.hls.trigger(t.default.FRAG_PARSING_DATA,{moof:new Uint8Array(e.data.moof),mdat:new Uint8Array(e.data.mdat),startPTS:e.data.startPTS,endPTS:e.data.endPTS,startDTS:e.data.startDTS,endDTS:e.data.endDTS,type:e.data.type,nb:e.data.nb});break;case t.default.FRAG_PARSING_METADATA:this.hls.trigger(t.default.FRAG_PARSING_METADATA,{samples:e.data.samples});break;default:this.hls.trigger(e.data.event,e.data.data)}}}]),r}();i.default=y,u.exports=i.default},{"../crypt/decrypter":8,"../demux/demuxer-inline":11,"../demux/demuxer-worker":12,"../events":18,"../remux/mp4-remuxer":25,"../utils/logger":28,webworkify:2}],14:[function(t,r,e){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function e(i,r){for(var t=0;te?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0?r<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(a){var t,i,r=8,e=8;for(t=0;a>t;t++)0!==e&&(i=this.readEG(),e=(r+i+256)%256),r=0===e?r:e}},{key:"readSPS",value:function(){var t,v,p,l,a,n,i,o,r,s=0,d=0,h=0,f=0,c=1;if(this.readUByte(),t=this.readUByte(),v=this.readBits(5),this.skipBits(3),p=this.readUByte(),this.skipUEG(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var g=this.readUEG();if(3===g&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(o=3!==g?8:12,r=0;o>r;r++)this.readBoolean()&&(6>r?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var u=this.readUEG();if(0===u)this.readUEG();else if(1===u)for(this.skipBits(1),this.skipEG(),this.skipEG(),l=this.readUEG(),r=0;l>r;r++)this.skipEG();if(this.skipUEG(),this.skipBits(1),a=this.readUEG(),n=this.readUEG(),i=this.readBits(1),0===i&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(s=this.readUEG(),d=this.readUEG(),h=this.readUEG(),f=this.readUEG()),this.readBoolean()&&this.readBoolean()){var e=void 0,y=this.readUByte();switch(y){case 2:e=[12,11];break;case 3:e=[10,11];break;case 4:e=[16,11];break;case 5:e=[40,33];break;case 6:e=[24,11];break;case 7:e=[20,11];break;case 8:e=[32,11];break;case 9:e=[80,33];break;case 10:e=[18,11];break;case 11:e=[15,11];break;case 12:e=[64,33];break;case 13:e=[160,99];break;case 14:e=[4,3];break;case 15:e=[3,2];break;case 16:e=[2,1];break;case 255:e=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}e&&(c=e[0]/e[1])}return{width:(16*(a+1)-2*s-2*d)*c,height:(2-i)*(n+1)*16-(i?2:4)*(h+f)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();e.default=s,r.exports=e.default},{"../utils/logger":28}],15:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;tr);return t}},{key:"_parseID3Frames",value:function(r,e,n){for(var a,s,o,l,i;n>=e+8;)switch(a=this.readUTF(r,e,4),e+=4,s=r[e++]<<24+r[e++]<<16+r[e++]<<8+r[e++],l=r[e++]<<8+r[e++],o=e,a){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(r,e,44)){e+=44,e+=4;var u=1&r[e++];this._hasTimeStamp=!0,i=((r[e++]<<23)+(r[e++]<<15)+(r[e++]<<7)+r[e++])/45,u&&(i+=47721858.84),i=Math.round(i),t.logger.trace("ID3 timestamp found: "+i),this._timeStamp=i}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();e.default=s,i.exports=e.default},{"../utils/logger":28}],16:[function(e,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function e(i,r){for(var t=0;te;e+=188)if(71===i[e]){if(d=!!(64&i[e+1]),u=((31&i[e+1])<<8)+i[e+2],y=(48&i[e+3])>>4,y>1){if(a=e+5+i[e+4],a===e+188)continue}else a=e+4;p?u===g?(d&&(l&&this._parseAVCPES(this._parsePES(l)),l={data:[],size:0}),l&&(l.data.push(i.subarray(a,e+188)),l.size+=e+188-a)):u===c?(d&&(o&&this._parseAACPES(this._parsePES(o)),o={data:[],size:0}),o&&(o.data.push(i.subarray(a,e+188)),o.size+=e+188-a)):u===m&&(d&&(s&&this._parseID3PES(this._parsePES(s)),s={data:[],size:0}),s&&(s.data.push(i.subarray(a,e+188)),s.size+=e+188-a)):(d&&(a+=i[a]+1),0===u?this._parsePAT(i,a):u===this._pmtId&&(this._parsePMT(i,a),p=this.pmtParsed=!0,g=this._avcTrack.id,c=this._aacTrack.id,m=this._id3Track.id))}else this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});l&&this._parseAVCPES(this._parsePES(l)),o&&this._parseAACPES(this._parsePES(o)),s&&this._parseID3PES(this._parsePES(s)),this.remux()}},{key:"remux",value:function(){this.remuxer.remux(this._aacTrack,this._avcTrack,this._id3Track,this.timeOffset,this.contiguous)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){this._pmtId=(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(r,e){var a,n,s,i;for(a=(15&r[e+1])<<8|r[e+2],n=e+3+a-4,s=(15&r[e+10])<<8|r[e+11],e+=12+s;n>e;){switch(i=(31&r[e+1])<<8|r[e+2],r[e]){case 15:this._aacTrack.id=i;break;case 21:this._id3Track.id=i;break;case 27:this._avcTrack.id=i;break;default:t.logger.log("unkown stream type:"+r[e])}e+=((15&r[e+3])<<8|r[e+4])+5}}},{key:"_parsePES",value:function(t){var e,a,u,o,d,n,r,i,s,l=0;if(e=t.data[0],u=(e[0]<<16)+(e[1]<<8)+e[2],1===u){for(o=(e[4]<<8)+e[5],a=e[7],192&a&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,r>4294967295&&(r-=8589934592),64&a?(i=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,i>4294967295&&(i-=8589934592)):i=r),d=e[8],s=d+9,t.data[0]=t.data[0].subarray(s),t.size-=s,n=new Uint8Array(t.size);t.data.length;)e=t.data.shift(),n.set(e,l),l+=e.byteLength;return{data:n,pts:r,dts:i,len:o}}return null}},{key:"_parseAVCPES",value:function(a){var v,i,d=this,e=this._avcTrack,l=e.samples,p=this._parseAVCNALu(a.data),s=[],n=!1,g=!1,f=0;if(0===p.length&&l.length>0){var c=l[l.length-1],o=c.units.units[c.units.units.length-1],u=new Uint8Array(o.data.byteLength+a.data.byteLength);u.set(o.data,0),u.set(a.data,o.data.byteLength),o.data=u,c.units.length+=a.data.byteLength,e.len+=a.data.byteLength}a.data=null;var r="";p.forEach(function(t){switch(t.type){case 1:i=!0,n&&(r+="NDR ");break;case 5:i=!0,n&&(r+="IDR "),g=!0;break;case 6:i=!0,n&&(r+="SEI ");break;case 7:if(i=!0,n&&(r+="SPS "),!e.sps){var c=new h.default(t.data),l=c.readSPS();e.width=l.width,e.height=l.height,e.sps=[t.data],e.timescale=d.remuxer.timescale,e.duration=d.remuxer.timescale*d._duration;for(var v=t.data.subarray(1,4),u="avc1.",o=0;3>o;o++){var a=v[o].toString(16);a.length<2&&(a="0"+a),u+=a}e.codec=u}break;case 8:i=!0,n&&(r+="PPS "),e.pps||(e.pps=[t.data]);break;case 9:i=!0,n&&(r+="AUD ");break;default:i=!1,r+="unknown NAL "+t.type+" "}i&&(s.push(t),f+=t.data.byteLength)}),(n||r.length)&&t.logger.log(r),s.length&&(g===!0||e.sps)&&(v={units:{units:s,length:f},pts:a.pts,dts:a.dts,key:g},l.push(v),e.len+=f,e.nbNalu+=s.length)}},{key:"_parseAVCNALu",value:function(r){for(var n,i,s,o,a,h,t=0,c=r.byteLength,e=0,d=[];c>t;)switch(n=r[t++],e){case 0:0===n&&(e=1);break;case 1:e=0===n?2:0;break;case 2:case 3:if(0===n)e=3;else if(1===n){if(o=31&r[t],a)s={data:r.subarray(a,t-e-1),type:h},d.push(s);else if(i=t-e-1){var p=this._avcTrack,f=p.samples;if(f.length){var g=f[f.length-1],v=g.units.units,l=v[v.length-1],u=new Uint8Array(l.data.byteLength+i);u.set(l.data,0),u.set(r.subarray(0,i),l.data.byteLength),l.data=u,g.units.length+=i,p.len+=i}}a=t,h=o,(1===o||5===o)&&(t=c),e=0}else e=0}return a&&(s={data:r.subarray(a,c),type:h},d.push(s)),d}},{key:"_parseAACPES",value:function(p){var l,o,y,f,e,u,h,s,m,a=this._aacTrack,i=p.data,L=p.pts,_=0,E=this._duration,b=this.audioCodec;if(this.aacOverFlow){var v=new Uint8Array(this.aacOverFlow.byteLength+i.byteLength);v.set(this.aacOverFlow,0),v.set(i,this.aacOverFlow.byteLength),i=v}for(e=_,s=i.length;s-1>e&&(255!==i[e]||240!==(240&i[e+1]));e++);if(e){var c,d;if(s-1>e?(c="AAC PES did not start with ADTS header,offset:"+e,d=!1):(c="no ADTS header found in AAC PES",d=!0),this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:d,reason:c}),d)return}for(a.audiosamplerate||(l=g.default.getAudioConfig(this.observer,i,e,b),a.config=l.config,a.audiosamplerate=l.samplerate,a.channelCount=l.channelCount,a.codec=l.codec,a.timescale=this.remuxer.timescale,a.duration=a.timescale*E,t.logger.log("parsed codec:"+a.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)),f=0,y=9216e4/a.audiosamplerate;s>e+5&&(u=1&i[e+1]?7:9,o=(3&i[e+3])<<11|i[e+4]<<3|(224&i[e+5])>>>5,o-=u,h=Math.round(L+f*y),o>0&&s>=e+u+o);)for(m={unit:i.subarray(e+u,e+u+o),pts:h,dts:h},a.samples.push(m),a.len+=o,e+=o+u,f++;s-1>e&&(255!==i[e]||240!==(240&i[e+1]));e++);s>e?this.aacOverFlow=i.subarray(e,s):this.aacOverFlow=null}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]?!0:!1}}]),e}();i.default=u,o.exports=i.default},{"../errors":17,"../events":18,"../utils/logger":28,"./adts":10,"./exp-golomb":14}],17:[function(i,a,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t={NETWORK_ERROR:"hlsNetworkError",MEDIA_ERROR:"hlsMediaError",OTHER_ERROR:"hlsOtherError"};e.ErrorTypes=t;var r={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError"};e.ErrorDetails=r},{}],18:[function(r,t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsPTSUpdated",LEVEL_SWITCH:"hlsLevelSwitch",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress", -FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_METADATA:"hlsFraParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFPSDrop",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded"},t.exports=e.default},{}],19:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;td)return void(i.PTSKnown=!1);for(var r=c;d>=r;r++){var l=f[h+r],a=o[r];u=l.cc-a.cc,isNaN(l.startPTS)||(a.start=a.startPTS=l.startPTS,a.endPTS=l.endPTS,a.duration=l.duration,s=a)}if(u)for(t.logger.log("discontinuity sliding from playlist, take drift into account"),r=0;ri.endSN)return 0;o=l-i.startSN,n=i.fragments,r=n[o],isNaN(r.startPTS)||(a=Math.min(a,r.startPTS),s=Math.max(s,r.endPTS));var u=a-r.start;for(r.start=r.startPTS=a,r.endPTS=s,r.duration=s-a,t=o;t>0;t--)e.updatePTS(n,t,t-1);for(t=o;ti?r.start=e.start+e.duration:r.start=e.start-r.duration:a>i?(e.duration=n-e.start,e.duration<0&&t.logger.error("negative duration computed for frag "+e.sn+",level "+e.level+", there should be some duration drift between playlist and fragment!")):(r.duration=e.start-n,r.duration<0&&t.logger.error("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!"))}}]),e}();e.default=s,i.exports=e.default},{"../utils/logger":28}],20:[function(t,c,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t1?t-1:0),e=1;t>e;e++)a[e-1]=arguments[e];r.emit.apply(r,[i,i].concat(a))},r.off=function(a){for(var t=arguments.length,i=Array(t>1?t-1:0),e=1;t>e;e++)i[e-1]=arguments[e];r.removeListener.apply(r,[a].concat(i))},this.on=r.on.bind(r),this.off=r.off.bind(r),this.trigger=r.trigger.bind(r),this.playlistLoader=new d.default(this),this.fragmentLoader=new f.default(this),this.levelController=new m.default(this),this.abrController=new i.abrController(this),this.mediaController=new i.mediaController(this),this.keyLoader=new T.default(this)}return n(t,null,[{key:"isSupported",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"Events",get:function(){return i.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig||(t.defaultConfig={autoStartLoad:!0,debug:!1,maxBufferLength:30,maxBufferSize:6e7,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingLoopThreshold:3,appendErrorMaxRetry:3,loader:_.default,fLoader:void 0,pLoader:void 0,abrController:g.default,mediaController:p.default}),t.defaultConfig},set:function(e){t.defaultConfig=e}}]),n(t,[{key:"destroy",value:function(){e.logger.log("destroy"),this.trigger(i.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.mediaController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(t){e.logger.log("attachMedia"),this.media=t,this.trigger(i.default.MEDIA_ATTACHING,{media:t})}},{key:"detachMedia",value:function(){e.logger.log("detachMedia"),this.trigger(i.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(t){e.logger.log("loadSource:"+t),this.url=t,this.trigger(i.default.MANIFEST_LOADING,{url:t})}},{key:"startLoad",value:function(){e.logger.log("startLoad"),this.mediaController.startLoad()}},{key:"swapAudioCodec",value:function(){e.logger.log("swapAudioCodec"),this.mediaController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){e.logger.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.mediaController.currentLevel},set:function(t){e.logger.log("set currentLevel:"+t),this.loadLevel=t,this.mediaController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.mediaController.nextLevel},set:function(t){e.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.mediaController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){e.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel()},set:function(e){this.levelController.level=e}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(t){e.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){e.logger.log("set startLevel:"+t),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(t){e.logger.log("set autoLevelCapping:"+t),this.abrController.autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}}]),t}();a.default=l,c.exports=a.default},{"./controller/abr-controller":3,"./controller/level-controller":4,"./controller/mse-media-controller":5,"./errors":17,"./events":18,"./loader/fragment-loader":21,"./loader/key-loader":22,"./loader/playlist-loader":23,"./utils/logger":28,"./utils/xhr-loader":30,events:1}],21:[function(i,a,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(i,r){for(var t=0;t2?(e=t.shift()+".",e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).substr(-4)):e=r,e}},{key:"cloneObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"parseLevelPlaylist",value:function(A,l,R){var e,b,s,a,v=0,o=0,i={url:l,fragments:[],live:!0,startSN:0},r={method:null,key:null,iv:null,uri:null},E=0,h=null,t=null;for(b=/(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\d\.]+)[^\r\n]*([\r\n]+[^#|\r\n]+)?)|(?:#EXT-X-(BYTERANGE):([\d]+[@[\d]*)]*[\r\n]+([^#|\r\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g;null!==(e=b.exec(A));)switch(e.shift(),e=e.filter(function(e){return void 0!==e}),e[0]){case"MEDIA-SEQUENCE":v=i.startSN=parseInt(e[1]);break;case"TARGETDURATION":i.targetduration=parseFloat(e[1]);break;case"ENDLIST":i.live=!1;break;case"DIS":E++;break;case"BYTERANGE":var c=e[1].split("@");a=1===c.length?s:parseInt(c[1]),s=parseInt(c[0])+a,t&&!t.url&&(t.byteRangeStartOffset=a,t.byteRangeEndOffset=s,t.url=this.resolve(e[2],l));break;case"INF":var g=parseFloat(e[1]);if(!isNaN(g)){var u,m=v++;if(r.method&&r.uri&&!r.iv){u=this.cloneObj(r);for(var y=new Uint8Array(16),d=12;16>d;d++)y[d]=m>>8*(15-d)&255;u.iv=y}else u=r;var T=e[2]?this.resolve(e[2],l):null;t={url:T,duration:g,start:o,sn:m,level:R,cc:E,byteRangeStartOffset:a,byteRangeEndOffset:s,decryptdata:u,programDateTime:h},i.fragments.push(t),o+=g,a=null,h=null}break;case"KEY":var L=e[1],p=new n.default(L),f=p.enumeratedString("METHOD"),_=p.URI,S=p.hexadecimalInteger("IV");f&&(r={method:null,key:null,iv:null,uri:null},_&&"AES-128"===f&&(r.method=f,r.uri=this.resolve(_,l),r.key=null,r.iv=S));break;case"PROGRAM-DATE-TIME":h=new Date(Date.parse(e[1]))}return t&&!t.url&&(i.fragments.pop(),o-=t.duration),i.totalduration=o,i.endSN=v-1,i}},{key:"loadsuccess",value:function(u,i){var s,o=u.currentTarget,n=o.responseText,r=o.responseURL,l=this.id,d=this.id2,a=this.hls;if(void 0===r&&(r=this.url),i.tload=performance.now(),i.mtime=new Date(o.getResponseHeader("Last-Modified")),0===n.indexOf("#EXTM3U"))if(n.indexOf("#EXTINF:")>0)if(null===this.id)a.trigger(e.default.MANIFEST_LOADED,{levels:[{url:r}],url:r,stats:i});else{var h=this.parseLevelPlaylist(n,r,l);i.tparsed=performance.now(),a.trigger(e.default.LEVEL_LOADED,{details:h,level:l,id:d,stats:i})}else s=this.parseMasterPlaylist(n,r),s.length?a.trigger(e.default.MANIFEST_LOADED,{levels:s,url:r,stats:i}):a.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:t.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no level found in manifest"});else a.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:t.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(a){var r,i;null===this.id?(r=t.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0):(r=t.ErrorDetails.LEVEL_LOAD_ERROR,i=!1),this.loader.abort(),this.hls.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:this.url,loader:this.loader,response:a.currentTarget,level:this.id,id:this.id2})}},{key:"loadtimeout",value:function(){var r,i;null===this.id?(r=t.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0):(r=t.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1),this.loader.abort(),this.hls.trigger(e.default.ERROR,{type:t.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:this.url,loader:this.loader,level:this.id,id:this.id2})}}]),r}();i.default=c,l.exports=i.default},{"../errors":17,"../events":18,"../utils/attr-list":26,"../utils/url":29}],24:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;t>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=255&e,t.set(a,4),r=0,e=8;n>r;r++)t.set(i[r],e),e+=i[r].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,r){return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))}},{key:"moov",value:function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(r){for(var t=r.length,i=[];t--;)i[t]=e.trex(r[t]);return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,r){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,i)}},{key:"sdtp",value:function(n){var r,t,i=n.samples||[],a=new Uint8Array(4+i.length);for(t=0;t>>8&255),i.push(255&n),i=i.concat(Array.prototype.slice.call(a));for(r=0;r>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(a));var u=e.box(e.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|t.sps.length].concat(i).concat([t.pps.length]).concat(s))),o=t.width,l=t.height;return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var r=t.audiosamplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){var r=t.id,i=t.duration,a=t.width,n=t.height;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))}},{key:"traf",value:function(i,t){var a=e.sdtp(i),r=i.id;return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t])),e.trun(i,a.length+16+16+8+16+8+8),a)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(r){var t=r.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(f,o){var i,a,n,s,t,l,d=f.samples||[],r=d.length,h=12+16*r,u=new Uint8Array(h);for(o+=8+h,u.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,o>>>24&255,o>>>16&255,o>>>8&255,255&o],0),i=0;r>i;i++)a=d[i],n=a.duration,s=a.size,t=a.flags,l=a.cts,u.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,61440&t.degradPrio,15&t.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,u)}},{key:"initSegment",value:function(i){e.types||e.init();var t,r=e.moov(i);return t=new Uint8Array(e.FTYP.byteLength+r.byteLength),t.set(e.FTYP),t.set(r,e.FTYP.byteLength),t}}]),e}();e.default=a,t.exports=e.default},{}],25:[function(i,h,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var d=function(){function e(i,r){for(var t=0;t=y&&(t.logger.log("invalid sample duration at PTS/DTS: "+o.pts+"/"+o.dts+":"+y),y=1),s.duration=y}else{var n,m=this.nextAvcDts;l=this._PTSNormalize(E,m),i=this._PTSNormalize(g,m),n=Math.round((i-m)/90),(k||Math.abs(n)<600)&&n&&(n>1?t.logger.log("AVC:"+n+" ms hole between fragments detected,filling it"):-1>n&&t.logger.log("AVC:"+-n+" ms overlapping between fragments detected"),i=m,l=Math.max(l-n,i),t.logger.log("Video/PTS/DTS adjusted: "+l+"/"+i+",delta:"+n)),A=Math.max(0,l),_=Math.max(0,i)}s={size:L,duration:0,cts:(l-i)/f,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0}},o.key===!0?(s.flags.dependsOn=2,s.flags.isNonSync=0):(s.flags.dependsOn=1,s.flags.isNonSync=1),u.push(s),c=i}var v=0;if(u.length>=2&&(v=u[u.length-2].duration,s.duration=v),this.nextAvcDts=i+v*f,a.len=0,a.nbNalu=0,u.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var S=u[0].flags;S.dependsOn=2,S.isNonSync=0}a.samples=u,T=r.default.moof(a.sequenceNumber++,_/f,a),a.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:T,mdat:d,startPTS:A/p,endPTS:(l+f*v)/p,startDTS:_/p,endDTS:this.nextAvcDts/p,type:"video",nb:u.length})}},{key:"remuxAudio",value:function(i,k,S){var R,f,s,d,u,L,A,_,h,l,E,o,n,T=8,c=this.PES_TIMESCALE,p=this.PES2MP4SCALEFACTOR,v=[],b=[];for(i.samples.forEach(function(e){void 0===l||e.pts>l?(b.push(e),l=e.pts):t.logger.warn("dropping past audio frame")});b.length;){if(f=b.shift(),d=f.unit,l=f.pts-this._initDTS,E=f.dts-this._initDTS,void 0!==h)o=this._PTSNormalize(l,h),n=this._PTSNormalize(E,h),s.duration=(n-h)/p,s.duration<0&&(t.logger.log("invalid AAC sample duration at PTS:"+f.pts+":"+s.duration),s.duration=0);else{var a,m=this.nextAacPts;if(o=this._PTSNormalize(l,m),n=this._PTSNormalize(E,m),a=Math.round(1e3*(o-m)/c),(S||Math.abs(a)<600)&&a){if(a>0)t.logger.log(a+" ms hole between AAC samples detected,filling it");else if(0>a){t.logger.log(-a+" ms overlapping between AAC samples detected, drop frame"),i.len-=d.byteLength;continue}o=n=m}A=Math.max(0,o),_=Math.max(0,n),u=new Uint8Array(i.len+8),R=new DataView(u.buffer),R.setUint32(0,u.byteLength),u.set(r.default.types.mdat,4)}u.set(d,T),T+=d.byteLength,s={size:d.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},v.push(s),h=n}var y=0,g=v.length;g>=2&&(y=v[g-2].duration,s.duration=y),g&&(this.nextAacPts=o+p*y,i.len=0,i.samples=v,L=r.default.moof(i.sequenceNumber++,_/p,i),i.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:L,mdat:u,startPTS:A/c,endPTS:this.nextAacPts/c,startDTS:_/c,endDTS:(n+p*y)/c,type:"audio",nb:g}))}},{key:"remuxID3",value:function(r,a){var t,n=r.samples.length;if(n){for(var i=0;n>i;i++)t=r.samples[i],t.pts=(t.pts-this._initPTS)/this.PES_TIMESCALE,t.dts=(t.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(e.default.FRAG_PARSING_METADATA,{samples:r.samples})}r.samples=[],a=a}},{key:"_PTSNormalize",value:function(e,t){var r;if(void 0===t)return e;for(r=e>t?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}},{key:"timescale",get:function(){return this.MP4_TIMESCALE}}]),i}();a.default=o,h.exports=a.default},{"../errors":17,"../events":18,"../remux/mp4-generator":24,"../utils/logger":28}],26:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;tNumber.MAX_SAFE_INTEGER?1/0:e}},{key:"hexadecimalInteger",value:function(r){if(this[r]){var e=(this[r]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),t=0;tNumber.MAX_SAFE_INTEGER?1/0:e}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(t){var e=/^(\d+)x(\d+)$/.exec(this[t]);return null===e?void 0:{width:parseInt(e[1],10),height:parseInt(e[2],10)}}}],[{key:"parseAttrList",value:function(a){for(var t,n=/(.+?)=((?:\".*?\")|.*?)(?:,|$)/g,r={};null!==(t=n.exec(a));){var e=t[2],i='"';0===e.indexOf(i)&&e.lastIndexOf(i)===e.length-1&&(e=e.slice(1,-1)),r[t[1]]=e}return r}}]),e}();e.default=a,t.exports=e.default},{}],27:[function(r,e,i){"use strict";var t={search:function(a,s){for(var t=0,r=a.length-1,e=null,i=null;r>=t;){e=(t+r)/2|0,i=a[e];var n=s(i);if(n>0)t=e+1;else{if(!(0>n))return i;r=e-1}}return null}};e.exports=t},{}],28:[function(d,u,r){"use strict";function e(){}function l(t,e){return e="["+t+"] > "+e}function a(t){var r=window.console[t];return r?function(){for(var a=arguments.length,e=Array(a),i=0;a>i;i++)e[i]=arguments[i];e[0]&&(e[0]=l(t,e[0])),r.apply(window.console,e)}:e}function s(r){for(var i=arguments.length,n=Array(i>1?i-1:0),e=1;i>e;e++)n[e-1]=arguments[e];n.forEach(function(e){t[e]=r[e]?r[e].bind(r):a(e)})}Object.defineProperty(r,"__esModule",{value:!0});var i={trace:e,debug:e,log:e,warn:e,info:e,error:e},t=i,n=function(e){if(e===!0||"object"==typeof e){s(e,"debug","log","info","warn","error");try{t.log()}catch(e){t=i}}else t=i};r.enableLogs=n;var o=t;r.logger=o},{}],29:[function(r,t,i){"use strict";var e={buildAbsoluteURL:function(i,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var a=null,n=null,s=/^([^#]*)(.*)$/.exec(t);s&&(n=s[2],t=s[1]);var o=/^([^\?]*)(.*)$/.exec(t);o&&(a=o[2],t=o[1]);var u=/^([^#]*)(.*)$/.exec(i);u&&(i=u[1]);var d=/^([^\?]*)(.*)$/.exec(i);d&&(i=d[1]);var l=/^((([a-z]+):)?\/\/[a-z0-9\.-]+(:[0-9]+)?\/)(.*)$/i.exec(i),c=l[3],h=l[1],f=l[5],r=null;if(/^\/\//.test(t))r=c+"://"+e.buildAbsolutePath("",t.substring(2));else if(/^\//.test(t))r=h+e.buildAbsolutePath("",t.substring(1));else{var g=e.buildAbsolutePath(f,t);r=h+g}return a&&(r+=a),n&&(r+=n),r},buildAbsolutePath:function(n,s){for(var i,e,o=s,a="",t=n.replace(/[^\/]*$/,o.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),r=0;e=t.indexOf("/../",r),e>-1;r=e+i)i=/^\/(?:\.\.\/)*/.exec(t.slice(e))[0].length,a=(a+t.substring(r,e)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(i-1)/3+"}$"),"/");return a+t.substr(r)}};t.exports=e},{}],30:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t=200&&300>r?(window.clearTimeout(this.timeoutHandle),e.tload=performance.now(),this.onSuccess(i,e)):e.retrye||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},e.prototype.emit=function(u){var o,a,n,s,e,l;if(this._events||(this._events={}),"error"===u&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(o=arguments[1],o instanceof Error)throw o;throw TypeError('Uncaught, unspecified "error" event.')}if(a=this._events[u],i(a))return!1;if(t(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,s=new Array(n-1),e=1;n>e;e++)s[e-1]=arguments[e];a.apply(this,s)}else if(r(a)){for(n=arguments.length,s=new Array(n-1),e=1;n>e;e++)s[e-1]=arguments[e];for(l=a.slice(),n=l.length,e=0;n>e;e++)l[e].apply(this,s)}return!0},e.prototype.addListener=function(a,n){var s;if(!t(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,t(n.listener)?n.listener:n),this._events[a]?r(this._events[a])?this._events[a].push(n):this._events[a]=[this._events[a],n]:this._events[a]=n,r(this._events[a])&&!this._events[a].warned){var s;s=i(this._maxListeners)?e.defaultMaxListeners:this._maxListeners,s&&s>0&&this._events[a].length>s&&(this._events[a].warned=!0,"function"==typeof console.trace)}return this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(i,e){function r(){this.removeListener(i,r),a||(a=!0,e.apply(this,arguments))}if(!t(e))throw TypeError("listener must be a function");var a=!1;return r.listener=e,this.on(i,r),this},e.prototype.removeListener=function(a,i){var e,s,o,n;if(!t(i))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(e=this._events[a],o=e.length,s=-1,e===i||t(e.listener)&&e.listener===i)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,i);else if(r(e)){for(n=o;n-->0;)if(e[n]===i||e[n].listener&&e[n].listener===i){s=n;break}if(0>s)return this;1===e.length?(e.length=0,delete this._events[a]):e.splice(s,1),this._events.removeListener&&this.emit("removeListener",a,i)}return this},e.prototype.removeAllListeners=function(e){var i,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(i in this._events)"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],t(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},e.prototype.listeners=function(e){var r;return r=this._events&&this._events[e]?t(this._events[e])?[this._events[e]]:this._events[e].slice():[]},e.listenerCount=function(e,r){var i;return i=e._events&&e._events[r]?t(e._events[r])?1:e._events[r].length:0}},{}],2:[function(n,i,s){var a=arguments[3],e=arguments[4],r=arguments[5],t=JSON.stringify;i.exports=function(u){for(var i,o=Object.keys(r),n=0,l=o.length;l>n;n++){var s=o[n];if(r[s].exports===u){i=s;break}}if(!i){i=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var d={},n=0,l=o.length;l>n;n++){var s=o[n];d[s]=s}e[i]=[Function(["require","module","exports"],"("+u+")(self)"),d]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),f={};f[i]=i,e[h]=[Function(["require"],"require("+t(i)+")(self)"),f];var c="("+a+")({"+Object.keys(e).map(function(r){return t(r)+":["+e[r][0]+","+t(e[r][1])+"]"}).join(",")+"},{},["+t(h)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(v.createObjectURL(new Blob([c],{type:"text/javascript"})))}},{}],3:[function(t,s,e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var f=function(){function e(i,r){for(var t=0;t=e;e++)if(r=e<=this.lastfetchlevel?.8*i:.7*i,r=0&&i1&&setTimeout(this.tick,1),this.ticks=0)}},{key:"doTick",value:function(){var h,o,n,l=this.hls;switch(this.state){case e.ERROR:break;case e.STARTING:this.startLevel=l.startLevel,-1===this.startLevel&&(this.startLevel=0,this.fragBitrateTest=!0),this.level=l.nextLoadLevel=this.startLevel,this.state=e.WAITING_LEVEL,this.loadedmetadata=!1;break;case e.IDLE:if(!this.media)break;h=this.loadedmetadata?this.media.currentTime:this.nextLoadPosition,o=this.startFragmentRequested===!1?this.startLevel:l.nextLoadLevel;var v,x=this.bufferInfo(h,this.config.maxBufferHole),N=x.len,d=x.end,f=this.fragPrevious;if(this.levels[o].hasOwnProperty("bitrate")?(v=Math.max(8*this.config.maxBufferSize/this.levels[o].bitrate,this.config.maxBufferLength),v=Math.min(v,this.config.maxMaxBufferLength)):v=this.config.maxBufferLength,v>N){if(l.nextLoadLevel=o,this.level=o,n=this.levels[o].details,"undefined"==typeof n||n.live&&this.levelLastLoaded!==o){this.state=e.WAITING_LEVEL;break}var u=n.fragments,c=u.length,g=u[0].start,O=u[c-1].start+u[c-1].duration,a=void 0;if(n.live){if(d=n.startSN&&T<=n.endSN&&(a=u[T-n.startSN],t.logger.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=u[Math.min(c-1,Math.round(c/2))],t.logger.log("live playlist, switching playlist, unknown, load middle frag : "+a.sn))}}else g>d&&(a=u[0]);if(!a){var m;if(m=O>d?p.default.search(u,function(e){return e.start+e.duration<=d?1:e.start>d?-1:0}):u[c-1],m&&(a=m,g=m.start,f&&a.level===f.level&&a.sn===f.sn))if(a.sn1&&(a.expectedLen=Math.round(a.duration*this.levels[o].bitrate/8),a.trequest=performance.now()),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,a.loadCounter){a.loadCounter++;var w=this.config.fragLoadingLoopThreshold;if(a.loadCounter>w&&Math.abs(this.fragLoadIdx-a.loadIdx)1){var k=performance.now()-s.trequest;if(k>500*s.duration){var P=1e3*s.loaded/k;s.expectedLen_&&L>D&&(t.logger.warn("loading too slow, abort fragment loading"),t.logger.log("fragLoadedDelay/bufferStarvationDelay/fragLevelNextLoadedDelay :"+L.toFixed(1)+"/"+_.toFixed(1)+"/"+D.toFixed(1)),s.loader.abort(),l.trigger(r.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:s}),this.state=e.IDLE)}}break;case e.FRAG_LOADING_WAITING_RETRY:var G=performance.now(),S=this.retryDate,I=this.media,M=I&&I.seeking;(!S||G>=S||M)&&(t.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=e.IDLE);break;case e.PARSING:break;case e.PARSED:case e.APPENDING:if(this.sourceBuffer){if(this.media.error)return t.logger.error("trying to append although a media error occured, switch to ERROR state"),void(this.state=e.ERROR);if(this.sourceBuffer.audio&&this.sourceBuffer.audio.updating||this.sourceBuffer.video&&this.sourceBuffer.video.updating);else if(this.mp4segments.length){var R=this.mp4segments.shift();try{this.sourceBuffer[R.type].appendBuffer(R.data),this.appendError=0}catch(a){if(t.logger.error("error while trying to append buffer:"+a.message+",try appending later"),this.mp4segments.unshift(R),22!==a.code){this.appendError?this.appendError++:this.appendError=1;var y={type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_APPEND_ERROR,frag:this.fragCurrent};if(this.appendError>this.config.appendErrorMaxRetry)return t.logger.log("fail "+this.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),y.fatal=!0,l.trigger(r.default.ERROR,y),void(this.state=e.ERROR);y.fatal=!1,l.trigger(r.default.ERROR,y)}}this.state=e.APPENDING}}else this.state=e.IDLE;break;case e.BUFFER_FLUSHING:for(;this.flushRange.length;){var C=this.flushRange[0];if(!this.flushBuffer(C.start,C.end))break;this.flushRange.shift()}0===this.flushRange.length&&(this.immediateSwitch&&this.immediateLevelSwitchEnd(),this.state=e.IDLE,this.fragPrevious=null)}this._checkBuffer(),this._checkFragmentChanged()}},{key:"bufferInfo",value:function(i,a){var e,n=this.media,t=n.buffered,r=[];for(e=0;ed&&(t[u-1].end=r[e].end):t.push(r[e])}else t.push(r[e])}for(e=0,o=0,l=n=i;e=s&&h>i)l=s,n=h+a,o=n-i;else if(s>i+a){f=s;break}}return{len:o,start:l,end:n,nextStart:f}}},{key:"getBufferRange",value:function(r){var e,t;for(e=this.bufferRange.length-1;e>=0;e--)if(t=this.bufferRange[e],r>=t.start&&r<=t.end)return t;return null}},{key:"followingBufferRange",value:function(e){return e?this.getBufferRange(e.end+.5):null}},{key:"isBuffered",value:function(r){for(var i=this.media,t=i.buffered,e=0;e=t.start(e)&&r<=t.end(e))return!0;return!1}},{key:"_checkFragmentChanged",value:function(){var t,e,i=this.media;if(i&&i.seeking===!1&&(e=i.currentTime,e>i.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),this.isBuffered(e)?t=this.getBufferRange(e):this.isBuffered(e+.1)&&(t=this.getBufferRange(e+.1)),t)){var a=t.frag;a!==this.fragPlaying&&(this.fragPlaying=a,this.hls.trigger(r.default.FRAG_CHANGED,{frag:a}))}}},{key:"flushBuffer",value:function(d,l){var r,e,o,s,i,a;if(this.flushBufferCounter++<2*this.bufferRange.length&&this.sourceBuffer)for(var u in this.sourceBuffer){if(r=this.sourceBuffer[u],r.updating)return!1;for(e=0;e.5)return t.logger.log("flush "+u+" ["+i+","+a+"], of ["+o+","+s+"], pos:"+this.media.currentTime),r.remove(i,a),!1}var n,h=[];for(e=0;e "+a+"/"+i.videoCodec+"; audio => "+r+"/"+i.audioCodec),(void 0===r||void 0===i.audioCodec)&&(r=i.audioCodec),(void 0===a||void 0===i.videoCodec)&&(a=i.videoCodec);var s=navigator.userAgent.toLowerCase();this.audiocodecswitch&&1!==i.audioChannelCount&&-1===s.indexOf("android")&&-1===s.indexOf("firefox")&&(r="mp4a.40.5"),this.sourceBuffer||(this.sourceBuffer={},t.logger.log("selected A/V codecs for sourceBuffers:"+r+","+a),r&&(n=this.sourceBuffer.audio=this.mediaSource.addSourceBuffer("video/mp4;codecs="+r),n.addEventListener("updateend",this.onsbue),n.addEventListener("error",this.onsbe)),a&&(n=this.sourceBuffer.video=this.mediaSource.addSourceBuffer("video/mp4;codecs="+a),n.addEventListener("updateend",this.onsbue),n.addEventListener("error",this.onsbe))),r&&this.mp4segments.push({type:"audio",data:i.audioMoov}),a&&this.mp4segments.push({type:"video",data:i.videoMoov}),this.tick()}}},{key:"onFragParsingData",value:function(i){if(this.state===e.PARSING){this.tparse2=Date.now();var a=this.levels[this.level],n=this.fragCurrent;t.logger.log("parsed "+i.type+",PTS:["+i.startPTS.toFixed(3)+","+i.endPTS.toFixed(3)+"],DTS:["+i.startDTS.toFixed(3)+"/"+i.endDTS.toFixed(3)+"],nb:"+i.nb);var s=l.default.updateFragPTS(a.details,n.sn,i.startPTS,i.endPTS);this.hls.trigger(r.default.LEVEL_PTS_UPDATED,{details:a.details,level:this.level,drift:s}),this.mp4segments.push({type:i.type,data:i.moof}),this.mp4segments.push({type:i.type,data:i.mdat}),this.nextLoadPosition=i.endPTS,this.bufferRange.push({type:i.type,start:i.startPTS,end:i.endPTS,frag:n}),this.tick()}else t.logger.warn("not in PARSING state, ignoring FRAG_PARSING_DATA event")}},{key:"onFragParsed",value:function(){this.state===e.PARSING&&(this.state=e.PARSED,this.stats.tparsed=performance.now(),this.tick())}},{key:"onError",value:function(a){switch(a.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:if(!a.fatal){var n=this.fragLoadError;if(n?n++:n=1,n<=this.config.fragLoadingMaxRetry){this.fragLoadError=n,a.frag.loadCounter=0;var s=Math.min(Math.pow(2,n-1)*this.config.fragLoadingRetryDelay,64e3);t.logger.warn("mediaController: frag loading failed, retry in "+s+" ms"), +this.retryDate=performance.now()+s,this.state=e.FRAG_LOADING_WAITING_RETRY}else t.logger.error("mediaController: "+a.details+" reaches max retry, redispatch as fatal ..."),a.fatal=!0,this.hls.trigger(r.default.ERROR,a),this.state=e.ERROR}break;case i.ErrorDetails.FRAG_LOOP_LOADING_ERROR:case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:t.logger.warn("mediaController: "+a.details+" while loading frag,switch to "+(a.fatal?"ERROR":"IDLE")+" state ..."),this.state=a.fatal?e.ERROR:e.IDLE}}},{key:"onSBUpdateEnd",value:function(){if(this.state===e.APPENDING&&0===this.mp4segments.length){var a=this.fragCurrent,i=this.stats;a&&(this.fragPrevious=a,i.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*i.length/(i.tbuffered-i.tfirst)),this.hls.trigger(r.default.FRAG_BUFFERED,{stats:i,frag:a}),t.logger.log("media buffered : "+this.timeRangesToString(this.media.buffered)),this.state=e.IDLE)}this.tick()}},{key:"_checkBuffer",value:function(){var e=this.media;if(e){var o=e.readyState;if(o){var a=this.seekAfterBuffered;if(a)e.duration>=a&&(e.currentTime=a,this.seekAfterBuffered=void 0);else{var r=e.currentTime,n=this.bufferInfo(r,0),u=!(e.paused||e.ended||e.seeking||3>o),s=.2;if(n.len<=s&&(r>e.playbackRate*this.lastCurrentTime||!u?s=0:t.logger.log("playback seems stuck"),n.len<=s)){var i=n.nextStart,l=i-r;i&&l.005&&!e.seeking&&(t.logger.log("adjust currentTime from "+r+" to "+i),e.currentTime=i)}}}}}},{key:"swapAudioCodec",value:function(){this.audioCodecSwap=!this.audioCodecSwap}},{key:"onSBUpdateError",value:function(a){t.logger.error("sourceBuffer error:"+a),this.state=e.ERROR,this.hls.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1,frag:this.fragCurrent})}},{key:"timeRangesToString",value:function(t){for(var r="",i=t.length,e=0;i>e;e++)r+="["+t.start(e)+","+t.end(e)+"]";return r}},{key:"onMediaSourceOpen",value:function(){t.logger.log("media source opened"),this.hls.trigger(r.default.MEDIA_ATTACHED),this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvmetadata=this.onMediaMetadata.bind(this),this.onvended=this.onMediaEnded.bind(this);var e=this.media;e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("loadedmetadata",this.onvmetadata),e.addEventListener("ended",this.onvended),this.levels&&this.config.autoStartLoad&&this.startLoad(),this.mediaSource.removeEventListener("sourceopen",this.onmso)}},{key:"onMediaSourceClose",value:function(){t.logger.log("media source closed")}},{key:"onMediaSourceEnded",value:function(){t.logger.log("media source ended")}},{key:"currentLevel",get:function(){if(this.media){var e=this.getBufferRange(this.media.currentTime);if(e)return e.frag.level}return-1}},{key:"nextBufferRange",get:function(){return this.media?this.followingBufferRange(this.getBufferRange(this.media.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferRange;return e?e.frag.level:-1}}]),a}(o.default);s.default=_,h.exports=s.default},{"../demux/demuxer":13,"../errors":17,"../event-handler":18,"../events":19,"../helper/level-helper":20,"../utils/binary-search":28,"../utils/logger":29}],6:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;te;e++)c[(a[e]=e<<1^283*(e>>7))^e]=e;for(i=r=0;!f[i];i^=u||1,r=c[r]||1)for(t=r^r<<1^r<<2^r<<3^r<<4,t=t>>8^255&t^99,f[i]=t,v[t]=i,d=a[h=a[u=a[i]]],l=16843009*d^65537*h^257*u^16843008*i,s=257*a[t]^16843008*t,e=0;4>e;e++)n[e][i]=s=s<<24^s>>>8,o[e][t]=l=l<<24^l>>>8;for(e=0;5>e;e++)n[e]=n[e].slice(0),o[e]=o[e].slice(0)}},{key:"decrypt",value:function(R,p,_,b,E,m){var f,g,v,n,e=this._key[1],t=R^e[0],i=b^e[1],a=_^e[2],r=p^e[3],y=e.length/4-2,s=4,o=this._tables[1],h=o[0],d=o[1],u=o[2],l=o[3],c=o[4];for(n=0;y>n;n++)f=h[t>>>24]^d[i>>16&255]^u[a>>8&255]^l[255&r]^e[s],g=h[i>>>24]^d[a>>16&255]^u[r>>8&255]^l[255&t]^e[s+1],v=h[a>>>24]^d[r>>16&255]^u[t>>8&255]^l[255&i]^e[s+2],r=h[r>>>24]^d[t>>16&255]^u[i>>8&255]^l[255&a]^e[s+3],s+=4,t=f,i=g,a=v;for(n=0;4>n;n++)E[(3&-n)+m]=c[t>>>24]<<24^c[i>>16&255]<<16^c[a>>8&255]<<8^c[255&r]^e[s++],f=t,t=i,i=a,a=r,r=f}}]),e}();e.default=a,t.exports=e.default},{}],7:[function(t,r,e){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t>8|e>>>24}},{key:"doDecrypt",value:function(i,g,a){var u,f,s,h,l,c,d,n,e,r=new Int32Array(i.buffer,i.byteOffset,i.byteLength>>2),p=new o.default(Array.prototype.slice.call(g)),v=new Uint8Array(i.byteLength),t=new Int32Array(v.buffer);for(u=~~a[0],f=~~a[1],s=~~a[2],h=~~a[3],e=0;ee&&(255!==t[e]||240!==(240&t[e+1]));e++);for(r.audiosamplerate||(n=o.default.getAudioConfig(this.observer,t,e,p),r.config=n.config,r.audiosamplerate=n.samplerate,r.channelCount=n.channelCount,r.codec=n.codec,r.timescale=this.remuxer.timescale,r.duration=this.remuxer.timescale*y,l.logger.log("parsed codec:"+r.codec+",rate:"+n.samplerate+",nb channel:"+n.channelCount)),f=0;u>e+5&&(a=(3&t[e+3])<<11,a|=t[e+4]<<3,a|=(224&t[e+5])>>>5,s=1&t[e+1]?7:9,a-=s,c=Math.round(d+1024*f*9e4/r.audiosamplerate),a>0&&u>=e+s+a);)for(v={unit:t.subarray(e+s,e+s+a),pts:c,dts:c},r.samples.push(v),r.len+=a,e+=a+s,f++;u-1>e&&(255!==t[e]||240!==(240&t[e+1]));e++);this.remuxer.remux(this._aacTrack,{samples:[]},{samples:[{pts:d,dts:d,unit:h.payload}]},g)}},{key:"destroy",value:function(){}}],[{key:"probe",value:function(t){var e,r,a=new i.default(t);if(a.hasTimeStamp)for(e=a.length,r=t.length;r-1>e;e++)if(255===t[e]&&240===(240&t[e+1]))return!0;return!1}}]),e}();t.default=d,s.exports=t.default},{"../demux/id3":15,"../utils/logger":29,"./adts":10}],10:[function(t,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t>>6)+1,e=(60&u[l+2])>>>2,e>d.length-1?void f.trigger(Event.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+e}):(o=(1&u[l+2])<<2,o|=(192&u[l+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+i+",sampleingIndex:"+e+"["+d[e]+"Hz],channelConfig:"+o),-1!==h.indexOf("firefox")?e>=6?(i=5,t=new Array(4),n=e-3):(i=2,t=new Array(2),n=e):-1!==h.indexOf("android")?(i=2,t=new Array(2),n=e):(i=5,t=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&e>=6?n=e-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(e>=6||1===o)||!a&&1===o)&&(i=2,t=new Array(2)),n=e)),t[0]=i<<3,t[0]|=(14&e)>>1,t[1]|=(1&e)<<7,t[1]|=o<<3,5===i&&(t[1]|=(14&n)>>1,t[2]=(1&n)<<7,t[2]|=8,t[3]=0),{config:t,samplerate:d[e],channelCount:o,codec:"mp4a.40."+i})}}]),e}();e.default=o,i.exports=e.default},{"../errors":17,"../utils/logger":29}],11:[function(e,o,t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(i,r){for(var t=0;t1?r-1:0),e=1;r>e;e++)a[e-1]=arguments[e];t.emit.apply(t,[i,i].concat(a))},t.off=function(a){for(var r=arguments.length,i=Array(r>1?r-1:0),e=1;r>e;e++)i[e-1]=arguments[e];t.removeListener.apply(t,[a].concat(i))},r.addEventListener("message",function(i){switch(i.data.cmd){case"init":r.demuxer=new n.default(t,h.default);break;case"demux":var e=i.data;r.demuxer.push(new Uint8Array(e.data),e.audioCodec,e.videoCodec,e.timeOffset,e.cc,e.level,e.sn,e.duration)}}),t.on(e.default.FRAG_PARSING_INIT_SEGMENT,function(a,t){var e={event:a},i=[];t.audioCodec&&(e.audioCodec=t.audioCodec,e.audioMoov=t.audioMoov.buffer,e.audioChannelCount=t.audioChannelCount,i.push(e.audioMoov)),t.videoCodec&&(e.videoCodec=t.videoCodec,e.videoMoov=t.videoMoov.buffer,e.videoWidth=t.videoWidth,e.videoHeight=t.videoHeight,i.push(e.videoMoov)),r.postMessage(e,i)}),t.on(e.default.FRAG_PARSING_DATA,function(i,e){var t={event:i,type:e.type,startPTS:e.startPTS,endPTS:e.endPTS,startDTS:e.startDTS,endDTS:e.endDTS,moof:e.moof.buffer,mdat:e.mdat.buffer,nb:e.nb};r.postMessage(t,[t.moof,t.mdat])}),t.on(e.default.FRAG_PARSED,function(e){r.postMessage({event:e})}),t.on(e.default.ERROR,function(e,t){r.postMessage({event:e,data:t})}),t.on(e.default.FRAG_PARSING_METADATA,function(e,t){var i={event:e,samples:t.samples};r.postMessage(i)})};i.default=o,s.exports=i.default},{"../demux/demuxer-inline":11,"../events":19,"../remux/mp4-remuxer":26,events:1}],13:[function(e,u,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(i,r){for(var t=0;t0&&null!=e&&null!=e.key&&"AES-128"===e.method){null==this.decrypter&&(this.decrypter=new p.default(this.hls));var u=this;this.decrypter.decrypt(t,e.key,e.iv,function(e){u.pushDecrypted(e,r,i,a,n,s,o,l)})}else this.pushDecrypted(t,r,i,a,n,s,o,l)}},{key:"onWorkerMessage",value:function(e){switch(e.data.event){case t.default.FRAG_PARSING_INIT_SEGMENT:var r={};e.data.audioMoov&&(r.audioMoov=new Uint8Array(e.data.audioMoov),r.audioCodec=e.data.audioCodec,r.audioChannelCount=e.data.audioChannelCount),e.data.videoMoov&&(r.videoMoov=new Uint8Array(e.data.videoMoov),r.videoCodec=e.data.videoCodec,r.videoWidth=e.data.videoWidth,r.videoHeight=e.data.videoHeight),this.hls.trigger(t.default.FRAG_PARSING_INIT_SEGMENT,r);break;case t.default.FRAG_PARSING_DATA:this.hls.trigger(t.default.FRAG_PARSING_DATA,{moof:new Uint8Array(e.data.moof),mdat:new Uint8Array(e.data.mdat),startPTS:e.data.startPTS,endPTS:e.data.endPTS,startDTS:e.data.startDTS,endDTS:e.data.endDTS,type:e.data.type,nb:e.data.nb});break;case t.default.FRAG_PARSING_METADATA:this.hls.trigger(t.default.FRAG_PARSING_METADATA,{samples:e.data.samples});break;default:this.hls.trigger(e.data.event,e.data.data)}}}]),r}();i.default=y,u.exports=i.default},{"../crypt/decrypter":8,"../demux/demuxer-inline":11,"../demux/demuxer-worker":12,"../events":19,"../remux/mp4-remuxer":26,"../utils/logger":29,webworkify:2}],14:[function(t,r,e){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function e(i,r){for(var t=0;te?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}},{key:"readBits",value:function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0?r<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"skipEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBoolean",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(a){var t,i,r=8,e=8;for(t=0;a>t;t++)0!==e&&(i=this.readEG(),e=(r+i+256)%256),r=0===e?r:e}},{key:"readSPS",value:function(){var t,g,p,l,a,n,i,o,r,s=0,d=0,h=0,f=0,c=1;if(this.readUByte(),t=this.readUByte(),g=this.readBits(5),this.skipBits(3),p=this.readUByte(),this.skipUEG(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var v=this.readUEG();if(3===v&&this.skipBits(1),this.skipUEG(),this.skipUEG(),this.skipBits(1),this.readBoolean())for(o=3!==v?8:12,r=0;o>r;r++)this.readBoolean()&&(6>r?this.skipScalingList(16):this.skipScalingList(64))}this.skipUEG();var u=this.readUEG();if(0===u)this.readUEG();else if(1===u)for(this.skipBits(1),this.skipEG(),this.skipEG(),l=this.readUEG(),r=0;l>r;r++)this.skipEG();if(this.skipUEG(),this.skipBits(1),a=this.readUEG(),n=this.readUEG(),i=this.readBits(1),0===i&&this.skipBits(1),this.skipBits(1),this.readBoolean()&&(s=this.readUEG(),d=this.readUEG(),h=this.readUEG(),f=this.readUEG()),this.readBoolean()&&this.readBoolean()){var e=void 0,y=this.readUByte();switch(y){case 2:e=[12,11];break;case 3:e=[10,11];break;case 4:e=[16,11];break;case 5:e=[40,33];break;case 6:e=[24,11];break;case 7:e=[20,11];break;case 8:e=[32,11];break;case 9:e=[80,33];break;case 10:e=[18,11];break;case 11:e=[15,11];break;case 12:e=[64,33];break;case 13:e=[160,99];break;case 14:e=[4,3];break;case 15:e=[3,2];break;case 16:e=[2,1];break;case 255:e=[this.readUByte()<<8|this.readUByte(),this.readUByte()<<8|this.readUByte()]}e&&(c=e[0]/e[1])}return{width:(16*(a+1)-2*s-2*d)*c,height:(2-i)*(n+1)*16-(i?2:4)*(h+f)}}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}}]),e}();e.default=s,r.exports=e.default},{"../utils/logger":29}],15:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;tr);return t}},{key:"_parseID3Frames",value:function(r,e,n){for(var a,s,o,l,i;n>=e+8;)switch(a=this.readUTF(r,e,4),e+=4,s=r[e++]<<24+r[e++]<<16+r[e++]<<8+r[e++],l=r[e++]<<8+r[e++],o=e,a){case"PRIV":if("com.apple.streaming.transportStreamTimestamp"===this.readUTF(r,e,44)){e+=44,e+=4;var u=1&r[e++];this._hasTimeStamp=!0,i=((r[e++]<<23)+(r[e++]<<15)+(r[e++]<<7)+r[e++])/45,u&&(i+=47721858.84),i=Math.round(i),t.logger.trace("ID3 timestamp found: "+i),this._timeStamp=i}}}},{key:"hasTimeStamp",get:function(){return this._hasTimeStamp}},{key:"timeStamp",get:function(){return this._timeStamp}},{key:"length",get:function(){return this._length}},{key:"payload",get:function(){return this._payload}}]),e}();e.default=s,i.exports=e.default},{"../utils/logger":29}],16:[function(e,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var c=function(){function e(i,r){for(var t=0;te;e+=188)if(71===i[e]){if(d=!!(64&i[e+1]),u=((31&i[e+1])<<8)+i[e+2],y=(48&i[e+3])>>4,y>1){if(a=e+5+i[e+4],a===e+188)continue}else a=e+4;p?u===v?(d&&(l&&this._parseAVCPES(this._parsePES(l)),l={data:[],size:0}),l&&(l.data.push(i.subarray(a,e+188)),l.size+=e+188-a)):u===c?(d&&(o&&this._parseAACPES(this._parsePES(o)),o={data:[],size:0}),o&&(o.data.push(i.subarray(a,e+188)),o.size+=e+188-a)):u===m&&(d&&(s&&this._parseID3PES(this._parsePES(s)),s={data:[],size:0}),s&&(s.data.push(i.subarray(a,e+188)),s.size+=e+188-a)):(d&&(a+=i[a]+1),0===u?this._parsePAT(i,a):u===this._pmtId&&(this._parsePMT(i,a),p=this.pmtParsed=!0,v=this._avcTrack.id,c=this._aacTrack.id,m=this._id3Track.id))}else this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});l&&this._parseAVCPES(this._parsePES(l)),o&&this._parseAACPES(this._parsePES(o)),s&&this._parseID3PES(this._parsePES(s)),this.remux()}},{key:"remux",value:function(){this.remuxer.remux(this._aacTrack,this._avcTrack,this._id3Track,this.timeOffset,this.contiguous)}},{key:"destroy",value:function(){this.switchLevel(),this._initPTS=this._initDTS=void 0,this._duration=0}},{key:"_parsePAT",value:function(e,t){this._pmtId=(31&e[t+10])<<8|e[t+11]}},{key:"_parsePMT",value:function(r,e){var a,n,s,i;for(a=(15&r[e+1])<<8|r[e+2],n=e+3+a-4,s=(15&r[e+10])<<8|r[e+11],e+=12+s;n>e;){switch(i=(31&r[e+1])<<8|r[e+2],r[e]){case 15:this._aacTrack.id=i;break;case 21:this._id3Track.id=i;break;case 27:this._avcTrack.id=i;break;default:t.logger.log("unkown stream type:"+r[e])}e+=((15&r[e+3])<<8|r[e+4])+5}}},{key:"_parsePES",value:function(t){var e,a,u,o,d,n,r,i,s,l=0;if(e=t.data[0],u=(e[0]<<16)+(e[1]<<8)+e[2],1===u){for(o=(e[4]<<8)+e[5],a=e[7],192&a&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,r>4294967295&&(r-=8589934592),64&a?(i=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,i>4294967295&&(i-=8589934592)):i=r),d=e[8],s=d+9,t.data[0]=t.data[0].subarray(s),t.size-=s,n=new Uint8Array(t.size);t.data.length;)e=t.data.shift(),n.set(e,l),l+=e.byteLength;return{data:n,pts:r,dts:i,len:o}}return null}},{key:"_parseAVCPES",value:function(a){var g,i,d=this,e=this._avcTrack,l=e.samples,p=this._parseAVCNALu(a.data),s=[],n=!1,v=!1,f=0;if(0===p.length&&l.length>0){var c=l[l.length-1],o=c.units.units[c.units.units.length-1],u=new Uint8Array(o.data.byteLength+a.data.byteLength);u.set(o.data,0),u.set(a.data,o.data.byteLength),o.data=u,c.units.length+=a.data.byteLength,e.len+=a.data.byteLength}a.data=null;var r="";p.forEach(function(t){switch(t.type){case 1:i=!0,n&&(r+="NDR ");break;case 5:i=!0,n&&(r+="IDR "),v=!0;break;case 6:i=!0,n&&(r+="SEI ");break;case 7:if(i=!0,n&&(r+="SPS "),!e.sps){var c=new h.default(t.data),l=c.readSPS();e.width=l.width,e.height=l.height,e.sps=[t.data],e.timescale=d.remuxer.timescale,e.duration=d.remuxer.timescale*d._duration;for(var g=t.data.subarray(1,4),u="avc1.",o=0;3>o;o++){var a=g[o].toString(16);a.length<2&&(a="0"+a),u+=a}e.codec=u}break;case 8:i=!0,n&&(r+="PPS "),e.pps||(e.pps=[t.data]);break;case 9:i=!0,n&&(r+="AUD ");break;default:i=!1,r+="unknown NAL "+t.type+" "}i&&(s.push(t),f+=t.data.byteLength)}),(n||r.length)&&t.logger.log(r),s.length&&(v===!0||e.sps)&&(g={units:{units:s,length:f},pts:a.pts,dts:a.dts,key:v},l.push(g),e.len+=f,e.nbNalu+=s.length)}},{key:"_parseAVCNALu",value:function(r){for(var n,i,s,o,a,h,t=0,c=r.byteLength,e=0,d=[];c>t;)switch(n=r[t++],e){case 0:0===n&&(e=1);break;case 1:e=0===n?2:0;break;case 2:case 3:if(0===n)e=3;else if(1===n){if(o=31&r[t],a)s={data:r.subarray(a,t-e-1),type:h},d.push(s);else if(i=t-e-1){var p=this._avcTrack,f=p.samples;if(f.length){var v=f[f.length-1],g=v.units.units,l=g[g.length-1],u=new Uint8Array(l.data.byteLength+i);u.set(l.data,0),u.set(r.subarray(0,i),l.data.byteLength),l.data=u,v.units.length+=i,p.len+=i}}a=t,h=o,(1===o||5===o)&&(t=c),e=0}else e=0}return a&&(s={data:r.subarray(a,c),type:h},d.push(s)),d}},{key:"_parseAACPES",value:function(p){var l,o,y,f,e,u,h,s,m,a=this._aacTrack,i=p.data,R=p.pts,_=0,E=this._duration,b=this.audioCodec;if(this.aacOverFlow){var g=new Uint8Array(this.aacOverFlow.byteLength+i.byteLength);g.set(this.aacOverFlow,0),g.set(i,this.aacOverFlow.byteLength),i=g}for(e=_,s=i.length;s-1>e&&(255!==i[e]||240!==(240&i[e+1]));e++);if(e){var c,d;if(s-1>e?(c="AAC PES did not start with ADTS header,offset:"+e,d=!1):(c="no ADTS header found in AAC PES",d=!0),this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:d,reason:c}),d)return}for(a.audiosamplerate||(l=v.default.getAudioConfig(this.observer,i,e,b),a.config=l.config,a.audiosamplerate=l.samplerate,a.channelCount=l.channelCount,a.codec=l.codec,a.timescale=this.remuxer.timescale,a.duration=a.timescale*E,t.logger.log("parsed codec:"+a.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)),f=0,y=9216e4/a.audiosamplerate;s>e+5&&(u=1&i[e+1]?7:9,o=(3&i[e+3])<<11|i[e+4]<<3|(224&i[e+5])>>>5,o-=u,h=Math.round(R+f*y),o>0&&s>=e+u+o);)for(m={unit:i.subarray(e+u,e+u+o),pts:h,dts:h},a.samples.push(m),a.len+=o,e+=o+u,f++;s-1>e&&(255!==i[e]||240!==(240&i[e+1]));e++);s>e?this.aacOverFlow=i.subarray(e,s):this.aacOverFlow=null}},{key:"_parseID3PES",value:function(e){this._id3Track.samples.push(e)}}],[{key:"probe",value:function(e){return e.length>=564&&71===e[0]&&71===e[188]&&71===e[376]?!0:!1}}]),e}();i.default=u,o.exports=i.default},{"../errors":17,"../events":19,"../utils/logger":29,"./adts":10,"./exp-golomb":14}],17:[function(i,a,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t={NETWORK_ERROR:"hlsNetworkError",MEDIA_ERROR:"hlsMediaError",OTHER_ERROR:"hlsOtherError"};e.ErrorTypes=t;var r={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",LEVEL_LOAD_ERROR:"levelLoadError", +LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError"};e.ErrorDetails=r},{}],18:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;t1?i-1:0),t=1;i>t;t++)a[t-1]=arguments[t];this.handledEvents=a,this.useGenericHandler=!0,this.registerListeners()}return i(e,[{key:"destroy",value:function(){this.unregisterListeners()}},{key:"isEventHandler",value:function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent}},{key:"registerListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){if("hlsEventGeneric"===e)throw new Error("Forbidden event name: "+e);this.hls.on(e,this.onEvent)}.bind(this))}},{key:"unregisterListeners",value:function(){this.isEventHandler()&&this.handledEvents.forEach(function(e){this.hls.off(e,this.onEvent)}.bind(this))}},{key:"onEvent",value:function(e,t){this.onEventGeneric(e,t)}},{key:"onEventGeneric",value:function(e,t){var r=function(t,r){var e="on"+t.replace("hls","");if("function"!=typeof this[e])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+e+")");return this[e].bind(this,r)};r.call(this,e,t).call()}}]),e}();e.default=a,t.exports=e.default},{}],19:[function(t,e,r){"use strict";e.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded"}},{}],20:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;td)return void(i.PTSKnown=!1);for(var r=c;d>=r;r++){var l=f[h+r],a=o[r];u=l.cc-a.cc,isNaN(l.startPTS)||(a.start=a.startPTS=l.startPTS,a.endPTS=l.endPTS,a.duration=l.duration,s=a)}if(u)for(t.logger.log("discontinuity sliding from playlist, take drift into account"),r=0;ri.endSN)return 0;o=l-i.startSN,n=i.fragments,r=n[o],isNaN(r.startPTS)||(a=Math.min(a,r.startPTS),s=Math.max(s,r.endPTS));var u=a-r.start;for(r.start=r.startPTS=a,r.endPTS=s,r.duration=s-a,t=o;t>0;t--)e.updatePTS(n,t,t-1);for(t=o;ti?r.start=e.start+e.duration:r.start=e.start-r.duration:a>i?(e.duration=n-e.start,e.duration<0&&t.logger.error("negative duration computed for frag "+e.sn+",level "+e.level+", there should be some duration drift between playlist and fragment!")):(r.duration=e.start-n,r.duration<0&&t.logger.error("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!"))}}]),e}();e.default=s,i.exports=e.default},{"../utils/logger":29}],21:[function(t,c,a){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t1?t-1:0),e=1;t>e;e++)a[e-1]=arguments[e];r.emit.apply(r,[i,i].concat(a))},r.off=function(a){for(var t=arguments.length,i=Array(t>1?t-1:0),e=1;t>e;e++)i[e-1]=arguments[e];r.removeListener.apply(r,[a].concat(i))},this.on=r.on.bind(r),this.off=r.off.bind(r),this.trigger=r.trigger.bind(r),this.playlistLoader=new d.default(this),this.fragmentLoader=new f.default(this),this.levelController=new m.default(this),this.abrController=new i.abrController(this),this.mediaController=new i.mediaController(this),this.keyLoader=new T.default(this)}return n(t,null,[{key:"isSupported",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"Events",get:function(){return i.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig||(t.defaultConfig={autoStartLoad:!0,debug:!1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.3,maxSeekHole:2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingLoopThreshold:3,appendErrorMaxRetry:3,loader:_.default,fLoader:void 0,pLoader:void 0,abrController:v.default,mediaController:p.default}),t.defaultConfig},set:function(e){t.defaultConfig=e}}]),n(t,[{key:"destroy",value:function(){e.logger.log("destroy"),this.trigger(i.default.DESTROYING),this.detachMedia(),this.playlistLoader.destroy(),this.fragmentLoader.destroy(),this.levelController.destroy(),this.mediaController.destroy(),this.keyLoader.destroy(),this.url=null,this.observer.removeAllListeners()}},{key:"attachMedia",value:function(t){e.logger.log("attachMedia"),this.media=t,this.trigger(i.default.MEDIA_ATTACHING,{media:t})}},{key:"detachMedia",value:function(){e.logger.log("detachMedia"),this.trigger(i.default.MEDIA_DETACHING),this.media=null}},{key:"loadSource",value:function(t){e.logger.log("loadSource:"+t),this.url=t,this.trigger(i.default.MANIFEST_LOADING,{url:t})}},{key:"startLoad",value:function(){e.logger.log("startLoad"),this.mediaController.startLoad()}},{key:"swapAudioCodec",value:function(){e.logger.log("swapAudioCodec"),this.mediaController.swapAudioCodec()}},{key:"recoverMediaError",value:function(){e.logger.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)}},{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.mediaController.currentLevel},set:function(t){e.logger.log("set currentLevel:"+t),this.loadLevel=t,this.mediaController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.mediaController.nextLevel},set:function(t){e.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.mediaController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){e.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel()},set:function(e){this.levelController.level=e}},{key:"firstLevel",get:function(){return this.levelController.firstLevel},set:function(t){e.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){e.logger.log("set startLevel:"+t),this.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this.abrController.autoLevelCapping},set:function(t){e.logger.log("set autoLevelCapping:"+t),this.abrController.autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}}]),t}();a.default=l,c.exports=a.default},{"./controller/abr-controller":3,"./controller/level-controller":4,"./controller/mse-media-controller":5,"./errors":17,"./events":19,"./loader/fragment-loader":22,"./loader/key-loader":23,"./loader/playlist-loader":24,"./utils/logger":29,"./utils/xhr-loader":31,events:1}],22:[function(r,o,i){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(i,r){for(var t=0;t2?(e=t.shift()+".",e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).substr(-4)):e=r,e}},{key:"cloneObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"parseLevelPlaylist",value:function(A,l,L){var e,b,n,a,g=0,o=0,i={url:l,fragments:[],live:!0,startSN:0},r={method:null,key:null,iv:null,uri:null},E=0,h=null,t=null;for(b=/(?:#EXT-X-(MEDIA-SEQUENCE):(\d+))|(?:#EXT-X-(TARGETDURATION):(\d+))|(?:#EXT-X-(KEY):(.*))|(?:#EXT(INF):([\d\.]+)[^\r\n]*([\r\n]+[^#|\r\n]+)?)|(?:#EXT-X-(BYTERANGE):([\d]+[@[\d]*)]*[\r\n]+([^#|\r\n]+)?|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(PROGRAM-DATE-TIME):(.*))/g;null!==(e=b.exec(A));)switch(e.shift(),e=e.filter(function(e){return void 0!==e}),e[0]){case"MEDIA-SEQUENCE":g=i.startSN=parseInt(e[1]);break;case"TARGETDURATION":i.targetduration=parseFloat(e[1]);break;case"ENDLIST":i.live=!1;break;case"DIS":E++;break;case"BYTERANGE":var c=e[1].split("@");a=1===c.length?n:parseInt(c[1]),n=parseInt(c[0])+a,t&&!t.url&&(t.byteRangeStartOffset=a,t.byteRangeEndOffset=n,t.url=this.resolve(e[2],l));break;case"INF":var v=parseFloat(e[1]);if(!isNaN(v)){var u,m=g++;if(r.method&&r.uri&&!r.iv){u=this.cloneObj(r);for(var y=new Uint8Array(16),d=12;16>d;d++)y[d]=m>>8*(15-d)&255;u.iv=y}else u=r;var T=e[2]?this.resolve(e[2],l):null;t={url:T,duration:v,start:o,sn:m,level:L,cc:E,byteRangeStartOffset:a,byteRangeEndOffset:n,decryptdata:u,programDateTime:h},i.fragments.push(t),o+=v,a=null,h=null}break;case"KEY":var R=e[1],p=new s.default(R),f=p.enumeratedString("METHOD"),_=p.URI,S=p.hexadecimalInteger("IV");f&&(r={method:null,key:null,iv:null,uri:null},_&&"AES-128"===f&&(r.method=f,r.uri=this.resolve(_,l),r.key=null,r.iv=S));break;case"PROGRAM-DATE-TIME":h=new Date(Date.parse(e[1]))}return t&&!t.url&&(i.fragments.pop(),o-=t.duration),i.totalduration=o,i.endSN=g-1,i}},{key:"loadsuccess",value:function(u,i){var s,o=u.currentTarget,n=o.responseText,r=o.responseURL,l=this.id,d=this.id2,a=this.hls;if(void 0===r&&(r=this.url),i.tload=performance.now(),i.mtime=new Date(o.getResponseHeader("Last-Modified")),0===n.indexOf("#EXTM3U"))if(n.indexOf("#EXTINF:")>0)if(null===this.id)a.trigger(t.default.MANIFEST_LOADED,{levels:[{url:r}],url:r,stats:i});else{var h=this.parseLevelPlaylist(n,r,l);i.tparsed=performance.now(),a.trigger(t.default.LEVEL_LOADED,{details:h,level:l,id:d,stats:i})}else s=this.parseMasterPlaylist(n,r),s.length?a.trigger(t.default.MANIFEST_LOADED,{levels:s,url:r,stats:i}):a.trigger(t.default.ERROR,{type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no level found in manifest"});else a.trigger(t.default.ERROR,{type:e.ErrorTypes.NETWORK_ERROR,details:e.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:r,reason:"no EXTM3U delimiter"})}},{key:"loaderror",value:function(a){var r,i;null===this.id?(r=e.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0):(r=e.ErrorDetails.LEVEL_LOAD_ERROR,i=!1),this.loader.abort(),this.hls.trigger(t.default.ERROR,{type:e.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:this.url,loader:this.loader,response:a.currentTarget,level:this.id,id:this.id2})}},{key:"loadtimeout",value:function(){var r,i;null===this.id?(r=e.ErrorDetails.MANIFEST_LOAD_TIMEOUT,i=!0):(r=e.ErrorDetails.LEVEL_LOAD_TIMEOUT,i=!1),this.loader.abort(),this.hls.trigger(t.default.ERROR,{type:e.ErrorTypes.NETWORK_ERROR,details:r,fatal:i,url:this.url,loader:this.loader,level:this.id,id:this.id2})}}]),r}(n.default);a.default=h,u.exports=a.default},{"../errors":17,"../event-handler":18,"../events":19,"../utils/attr-list":27,"../utils/url":30}],25:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;t>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=255&e,t.set(a,4),r=0,e=8;n>r;r++)t.set(i[r],e),e+=i[r].byteLength;return t}},{key:"hdlr",value:function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}},{key:"mdhd",value:function(t,r){return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))}},{key:"mfhd",value:function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}},{key:"minf",value:function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))}},{key:"moof",value:function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))}},{key:"moov",value:function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(e.mvex(t)))}},{key:"mvex",value:function(r){for(var t=r.length,i=[];t--;)i[t]=e.trex(r[t]);return e.box.apply(null,[e.types.mvex].concat(i))}},{key:"mvhd",value:function(t,r){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,i)}},{key:"sdtp",value:function(n){var r,t,i=n.samples||[],a=new Uint8Array(4+i.length);for(t=0;t>>8&255),i.push(255&n),i=i.concat(Array.prototype.slice.call(a));for(r=0;r>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(a));var u=e.box(e.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|t.sps.length].concat(i).concat([t.pps.length]).concat(s))),o=t.width,l=t.height;return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))}},{key:"esds",value:function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}},{key:"mp4a",value:function(t){var r=t.audiosamplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),e.box(e.types.esds,e.esds(t)))}},{key:"stsd",value:function(t){return"audio"===t.type?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))}},{key:"tkhd",value:function(t){var r=t.id,i=t.duration,a=t.width,n=t.height;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,255&a,0,0,n>>8&255,255&n,0,0]))}},{key:"traf",value:function(i,t){var a=e.sdtp(i),r=i.id;return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),e.box(e.types.tfdt,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t])),e.trun(i,a.length+16+16+8+16+8+8),a)}},{key:"trak",value:function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"trex",value:function(r){var t=r.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}},{key:"trun",value:function(f,o){var i,a,n,s,t,l,d=f.samples||[],r=d.length,h=12+16*r,u=new Uint8Array(h);for(o+=8+h,u.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,o>>>24&255,o>>>16&255,o>>>8&255,255&o],0),i=0;r>i;i++)a=d[i],n=a.duration,s=a.size,t=a.flags,l=a.cts,u.set([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,61440&t.degradPrio,15&t.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,u)}},{key:"initSegment",value:function(i){e.types||e.init();var t,r=e.moov(i);return t=new Uint8Array(e.FTYP.byteLength+r.byteLength),t.set(e.FTYP),t.set(r,e.FTYP.byteLength),t}}]),e}();e.default=a,t.exports=e.default},{}],26:[function(i,h,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var d=function(){function e(i,r){for(var t=0;t=y&&(t.logger.log("invalid sample duration at PTS/DTS: "+l.pts+"/"+l.dts+":"+y),y=1),g.duration=y}else{var n,m=this.nextAvcDts;o=this._PTSNormalize(_,m),i=this._PTSNormalize(c,m),n=Math.round((i-m)/90),(k||Math.abs(n)<600)&&n&&(n>1?t.logger.log("AVC:"+n+" ms hole between fragments detected,filling it"):-1>n&&t.logger.log("AVC:"+-n+" ms overlapping between fragments detected"),i=m,o=Math.max(o-n,i),t.logger.log("Video/PTS/DTS adjusted: "+o+"/"+i+",delta:"+n)),T=Math.max(0,o),R=Math.max(0,i)}g={size:L,duration:0,cts:(o-i)/h,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0}},s=g.flags,l.key===!0?(s.dependsOn=2,s.isNonSync=0):(s.dependsOn=1,s.isNonSync=1),u.push(g),f=i}var b=0;u.length>=2&&(b=u[u.length-2].duration,g.duration=b),this.nextAvcDts=i+b*h,a.len=0,a.nbNalu=0,u.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&(s=u[0].flags,s.dependsOn=2,s.isNonSync=0),a.samples=u,S=r.default.moof(a.sequenceNumber++,R/h,a),a.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:S,mdat:d,startPTS:T/E,endPTS:(o+h*b)/E,startDTS:R/E,endDTS:this.nextAvcDts/E,type:"video",nb:u.length})}},{key:"remuxAudio",value:function(i,k,S){var L,f,s,d,u,R,A,_,h,l,E,o,n,T=8,c=this.PES_TIMESCALE,p=this.PES2MP4SCALEFACTOR,g=[],b=[];for(i.samples.forEach(function(e){void 0===l||e.pts>l?(b.push(e),l=e.pts):t.logger.warn("dropping past audio frame")});b.length;){if(f=b.shift(),d=f.unit,l=f.pts-this._initDTS,E=f.dts-this._initDTS,void 0!==h)o=this._PTSNormalize(l,h),n=this._PTSNormalize(E,h),s.duration=(n-h)/p,s.duration<0&&(t.logger.log("invalid AAC sample duration at PTS:"+f.pts+":"+s.duration),s.duration=0);else{var a,m=this.nextAacPts;if(o=this._PTSNormalize(l,m),n=this._PTSNormalize(E,m),a=Math.round(1e3*(o-m)/c),(S||Math.abs(a)<600)&&a){if(a>0)t.logger.log(a+" ms hole between AAC samples detected,filling it");else if(0>a){t.logger.log(-a+" ms overlapping between AAC samples detected, drop frame"),i.len-=d.byteLength;continue}o=n=m}A=Math.max(0,o),_=Math.max(0,n),u=new Uint8Array(i.len+8),L=new DataView(u.buffer),L.setUint32(0,u.byteLength),u.set(r.default.types.mdat,4)}u.set(d,T),T+=d.byteLength,s={size:d.byteLength,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},g.push(s),h=n}var y=0,v=g.length;v>=2&&(y=g[v-2].duration,s.duration=y),v&&(this.nextAacPts=o+p*y,i.len=0,i.samples=g,R=r.default.moof(i.sequenceNumber++,_/p,i),i.samples=[],this.observer.trigger(e.default.FRAG_PARSING_DATA,{moof:R,mdat:u,startPTS:A/c,endPTS:this.nextAacPts/c,startDTS:_/c,endDTS:(n+p*y)/c,type:"audio",nb:v}))}},{key:"remuxID3",value:function(r,a){var t,n=r.samples.length;if(n){for(var i=0;n>i;i++)t=r.samples[i],t.pts=(t.pts-this._initPTS)/this.PES_TIMESCALE,t.dts=(t.dts-this._initDTS)/this.PES_TIMESCALE;this.observer.trigger(e.default.FRAG_PARSING_METADATA,{samples:r.samples})}r.samples=[],a=a}},{key:"_PTSNormalize",value:function(e,t){var r;if(void 0===t)return e;for(r=e>t?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}},{key:"timescale",get:function(){return this.MP4_TIMESCALE}}]),i}();a.default=o,h.exports=a.default},{"../errors":17,"../events":19,"../remux/mp4-generator":25,"../utils/logger":29}],27:[function(n,t,e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(i,r){for(var t=0;tNumber.MAX_SAFE_INTEGER?1/0:e}},{key:"hexadecimalInteger",value:function(r){if(this[r]){var e=(this[r]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),t=0;tNumber.MAX_SAFE_INTEGER?1/0:e}},{key:"decimalFloatingPoint",value:function(e){return parseFloat(this[e])}},{key:"enumeratedString",value:function(e){return this[e]}},{key:"decimalResolution",value:function(t){var e=/^(\d+)x(\d+)$/.exec(this[t]);return null===e?void 0:{width:parseInt(e[1],10),height:parseInt(e[2],10)}}}],[{key:"parseAttrList",value:function(a){for(var t,n=/(.+?)=((?:\".*?\")|.*?)(?:,|$)/g,r={};null!==(t=n.exec(a));){var e=t[2],i='"';0===e.indexOf(i)&&e.lastIndexOf(i)===e.length-1&&(e=e.slice(1,-1)),r[t[1]]=e}return r}}]),e}();e.default=a,t.exports=e.default},{}],28:[function(r,e,i){"use strict";var t={search:function(a,s){for(var t=0,r=a.length-1,e=null,i=null;r>=t;){e=(t+r)/2|0,i=a[e];var n=s(i);if(n>0)t=e+1;else{if(!(0>n))return i;r=e-1}}return null}};e.exports=t},{}],29:[function(d,u,r){"use strict";function e(){}function l(t,e){return e="["+t+"] > "+e}function a(t){var r=window.console[t];return r?function(){for(var a=arguments.length,e=Array(a),i=0;a>i;i++)e[i]=arguments[i];e[0]&&(e[0]=l(t,e[0])),r.apply(window.console,e)}:e}function s(r){for(var i=arguments.length,n=Array(i>1?i-1:0),e=1;i>e;e++)n[e-1]=arguments[e];n.forEach(function(e){t[e]=r[e]?r[e].bind(r):a(e)})}Object.defineProperty(r,"__esModule",{value:!0});var i={trace:e,debug:e,log:e,warn:e,info:e,error:e},t=i,n=function(e){if(e===!0||"object"==typeof e){s(e,"debug","log","info","warn","error");try{t.log()}catch(e){t=i}}else t=i};r.enableLogs=n;var o=t;r.logger=o},{}],30:[function(r,t,i){"use strict";var e={buildAbsoluteURL:function(i,t){if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var a=null,n=null,s=/^([^#]*)(.*)$/.exec(t);s&&(n=s[2],t=s[1]);var o=/^([^\?]*)(.*)$/.exec(t);o&&(a=o[2],t=o[1]);var u=/^([^#]*)(.*)$/.exec(i);u&&(i=u[1]);var d=/^([^\?]*)(.*)$/.exec(i);d&&(i=d[1]);var l=/^((([a-z]+):)?\/\/[a-z0-9\.-]+(:[0-9]+)?\/)(.*)$/i.exec(i),c=l[3],h=l[1],f=l[5],r=null;if(/^\/\//.test(t))r=c+"://"+e.buildAbsolutePath("",t.substring(2));else if(/^\//.test(t))r=h+e.buildAbsolutePath("",t.substring(1));else{var v=e.buildAbsolutePath(f,t);r=h+v}return a&&(r+=a),n&&(r+=n),r},buildAbsolutePath:function(n,s){for(var i,e,o=s,a="",t=n.replace(/[^\/]*$/,o.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),r=0;e=t.indexOf("/../",r),e>-1;r=e+i)i=/^\/(?:\.\.\/)*/.exec(t.slice(e))[0].length,a=(a+t.substring(r,e)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(i-1)/3+"}$"),"/");return a+t.substr(r)}};t.exports=e},{}],31:[function(r,i,e){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(i,r){for(var t=0;t=200&&300>r?(window.clearTimeout(this.timeoutHandle),e.tload=performance.now(),this.onSuccess(i,e)):e.retry", diff --git a/dashboard-ui/bower_components/hls.js/src/controller/abr-controller.js b/dashboard-ui/bower_components/hls.js/src/controller/abr-controller.js index 2036e5c720..7e886208f6 100644 --- a/dashboard-ui/bower_components/hls.js/src/controller/abr-controller.js +++ b/dashboard-ui/bower_components/hls.js/src/controller/abr-controller.js @@ -3,23 +3,22 @@ */ import Event from '../events'; +import EventHandler from '../event-handler'; -class AbrController { +class AbrController extends EventHandler { constructor(hls) { - this.hls = hls; + super(hls, Event.FRAG_LOAD_PROGRESS); this.lastfetchlevel = 0; this._autoLevelCapping = -1; this._nextAutoLevel = -1; - this.onflp = this.onFragmentLoadProgress.bind(this); - hls.on(Event.FRAG_LOAD_PROGRESS, this.onflp); } destroy() { - this.hls.off(Event.FRAG_LOAD_PROGRESS, this.onflp); + EventHandler.prototype.destroy.call(this); } - onFragmentLoadProgress(event, data) { + onFragLoadProgress(data) { var stats = data.stats; if (stats.aborted === undefined) { this.lastfetchduration = (performance.now() - stats.trequest) / 1000; diff --git a/dashboard-ui/bower_components/hls.js/src/controller/level-controller.js b/dashboard-ui/bower_components/hls.js/src/controller/level-controller.js index 3d4e6ecdd8..be7c328740 100644 --- a/dashboard-ui/bower_components/hls.js/src/controller/level-controller.js +++ b/dashboard-ui/bower_components/hls.js/src/controller/level-controller.js @@ -3,35 +3,29 @@ */ import Event from '../events'; +import EventHandler from '../event-handler'; import {logger} from '../utils/logger'; import {ErrorTypes, ErrorDetails} from '../errors'; -class LevelController { +class LevelController extends EventHandler { constructor(hls) { - this.hls = hls; - this.onml = this.onManifestLoaded.bind(this); - this.onll = this.onLevelLoaded.bind(this); - this.onerr = this.onError.bind(this); + super(hls, + Event.MANIFEST_LOADED, + Event.LEVEL_LOADED, + Event.ERROR); this.ontick = this.tick.bind(this); - hls.on(Event.MANIFEST_LOADED, this.onml); - hls.on(Event.LEVEL_LOADED, this.onll); - hls.on(Event.ERROR, this.onerr); this._manualLevel = this._autoLevelCapping = -1; } destroy() { - var hls = this.hls; - hls.off(Event.MANIFEST_LOADED, this.onml); - hls.off(Event.LEVEL_LOADED, this.onll); - hls.off(Event.ERROR, this.onerr); if (this.timer) { clearInterval(this.timer); } this._manualLevel = -1; } - onManifestLoaded(event, data) { + onManifestLoaded(data) { var levels0 = [], levels = [], bitrateStart, i, bitrateSet = {}, videoCodecFound = false, audioCodecFound = false, hls = this.hls; // regroup redundant level together @@ -166,7 +160,7 @@ class LevelController { this._startLevel = newLevel; } - onError(event, data) { + onError(data) { if(data.fatal) { return; } @@ -224,7 +218,7 @@ class LevelController { } } - onLevelLoaded(event, data) { + onLevelLoaded(data) { // check if current playlist is a live playlist if (data.details.live && !this.timer) { // if live playlist we will have to reload it periodically diff --git a/dashboard-ui/bower_components/hls.js/src/controller/mse-media-controller.js b/dashboard-ui/bower_components/hls.js/src/controller/mse-media-controller.js index d751d585a9..77ad631a61 100644 --- a/dashboard-ui/bower_components/hls.js/src/controller/mse-media-controller.js +++ b/dashboard-ui/bower_components/hls.js/src/controller/mse-media-controller.js @@ -4,6 +4,7 @@ import Demuxer from '../demux/demuxer'; import Event from '../events'; +import EventHandler from '../event-handler'; import {logger} from '../utils/logger'; import BinarySearch from '../utils/binary-search'; import LevelHelper from '../helper/level-helper'; @@ -23,39 +24,31 @@ const State = { BUFFER_FLUSHING : 8 }; -class MSEMediaController { +class MSEMediaController extends EventHandler { constructor(hls) { + super(hls, Event.MEDIA_ATTACHING, + Event.MEDIA_DETACHING, + Event.MANIFEST_PARSED, + Event.LEVEL_LOADED, + Event.KEY_LOADED, + Event.FRAG_LOADED, + Event.FRAG_PARSING_INIT_SEGMENT, + Event.FRAG_PARSING_DATA, + Event.FRAG_PARSED, + Event.ERROR); this.config = hls.config; this.audioCodecSwap = false; - this.hls = hls; this.ticks = 0; // Source Buffer listeners this.onsbue = this.onSBUpdateEnd.bind(this); this.onsbe = this.onSBUpdateError.bind(this); - // internal listeners - this.onmediaatt0 = this.onMediaAttaching.bind(this); - this.onmediadet0 = this.onMediaDetaching.bind(this); - this.onmp = this.onManifestParsed.bind(this); - this.onll = this.onLevelLoaded.bind(this); - this.onfl = this.onFragLoaded.bind(this); - this.onkl = this.onKeyLoaded.bind(this); - this.onis = this.onInitSegment.bind(this); - this.onfpg = this.onFragParsing.bind(this); - this.onfp = this.onFragParsed.bind(this); - this.onerr = this.onError.bind(this); this.ontick = this.tick.bind(this); - hls.on(Event.MEDIA_ATTACHING, this.onmediaatt0); - hls.on(Event.MEDIA_DETACHING, this.onmediadet0); - hls.on(Event.MANIFEST_PARSED, this.onmp); } destroy() { this.stop(); - var hls = this.hls; - hls.off(Event.MEDIA_ATTACHING, this.onmediaatt0); - hls.off(Event.MEDIA_DETACHING, this.onmediadet0); - hls.off(Event.MANIFEST_PARSED, this.onmp); + EventHandler.prototype.destroy.call(this); this.state = State.IDLE; } @@ -87,13 +80,6 @@ class MSEMediaController { this.timer = setInterval(this.ontick, 100); this.level = -1; this.fragLoadError = 0; - hls.on(Event.FRAG_LOADED, this.onfl); - hls.on(Event.FRAG_PARSING_INIT_SEGMENT, this.onis); - hls.on(Event.FRAG_PARSING_DATA, this.onfpg); - hls.on(Event.FRAG_PARSED, this.onfp); - hls.on(Event.ERROR, this.onerr); - hls.on(Event.LEVEL_LOADED, this.onll); - hls.on(Event.KEY_LOADED, this.onkl); } stop() { @@ -128,14 +114,6 @@ class MSEMediaController { this.demuxer.destroy(); this.demuxer = null; } - var hls = this.hls; - hls.off(Event.FRAG_LOADED, this.onfl); - hls.off(Event.FRAG_PARSED, this.onfp); - hls.off(Event.FRAG_PARSING_DATA, this.onfpg); - hls.off(Event.LEVEL_LOADED, this.onll); - hls.off(Event.KEY_LOADED, this.onkl); - hls.off(Event.FRAG_PARSING_INIT_SEGMENT, this.onis); - hls.off(Event.ERROR, this.onerr); } tick() { @@ -189,7 +167,7 @@ class MSEMediaController { // we are not at playback start, get next load level from level Controller level = hls.nextLoadLevel; } - var bufferInfo = this.bufferInfo(pos,0.3), + var bufferInfo = this.bufferInfo(pos,this.config.maxBufferHole), bufferLen = bufferInfo.len, bufferEnd = bufferInfo.end, fragPrevious = this.fragPrevious, @@ -208,7 +186,9 @@ class MSEMediaController { this.level = level; levelDetails = this.levels[level].details; // if level info not retrieved yet, switch state and wait for level retrieval - if (typeof levelDetails === 'undefined') { + // if live playlist, ensure that new playlist has been refreshed to avoid loading/try to load + // a useless and outdated fragment (that might even introduce load error if it is already out of the live playlist) + if (typeof levelDetails === 'undefined' || levelDetails.live && this.levelLastLoaded !== level) { this.state = State.WAITING_LEVEL; break; } @@ -364,7 +344,7 @@ class MSEMediaController { } pos = v.currentTime; var fragLoadedDelay = (frag.expectedLen - frag.loaded) / loadRate; - var bufferStarvationDelay = this.bufferInfo(pos,0.3).end - pos; + var bufferStarvationDelay = this.bufferInfo(pos,this.config.maxBufferHole).end - pos; var fragLevelNextLoadedDelay = frag.duration * this.levels[hls.nextLoadLevel].bitrate / (8 * loadRate); //bps/Bps /* if we have less than 2 frag duration in buffer and if frag loaded delay is greater than buffer starvation delay ... and also bigger than duration needed to load fragment at next level ...*/ @@ -545,6 +525,7 @@ class MSEMediaController { bufferLen = bufferEnd - pos; } else if ((pos + maxHoleDuration) < start) { bufferStartNext = start; + break; } } return {len: bufferLen, start: bufferStart, end: bufferEnd, nextStart : bufferStartNext}; @@ -797,7 +778,7 @@ class MSEMediaController { } } - onMediaAttaching(event, data) { + onMediaAttaching(data) { var media = this.media = data.media; // setup the media source var ms = this.mediaSource = new MediaSource(); @@ -870,7 +851,7 @@ class MSEMediaController { if (this.state === State.FRAG_LOADING) { // check if currently loaded fragment is inside buffer. //if outside, cancel fragment loading, otherwise do nothing - if (this.bufferInfo(this.media.currentTime,0.3).len === 0) { + if (this.bufferInfo(this.media.currentTime,this.config.maxBufferHole).len === 0) { logger.log('seeking outside of buffer while fragment load in progress, cancel fragment load'); var fragCurrent = this.fragCurrent; if (fragCurrent) { @@ -919,7 +900,7 @@ class MSEMediaController { } - onManifestParsed(event, data) { + onManifestParsed(data) { var aac = false, heaac = false, codecs; data.levels.forEach(level => { // detect if we have different kind of audio codecs used amongst playlists @@ -945,13 +926,14 @@ class MSEMediaController { } } - onLevelLoaded(event,data) { + onLevelLoaded(data) { var newDetails = data.details, newLevelId = data.level, curLevel = this.levels[newLevelId], duration = newDetails.totalduration; logger.log(`level ${newLevelId} loaded [${newDetails.startSN},${newDetails.endSN}],duration:${duration}`); + this.levelLastLoaded = newLevelId; if (newDetails.live) { var curDetails = curLevel.details; @@ -998,7 +980,7 @@ class MSEMediaController { } } - onFragLoaded(event, data) { + onFragLoaded(data) { var fragCurrent = this.fragCurrent; if (this.state === State.FRAG_LOADING && fragCurrent && @@ -1039,7 +1021,7 @@ class MSEMediaController { this.fragLoadError = 0; } - onInitSegment(event, data) { + onFragParsingInitSegment(data) { if (this.state === State.PARSING) { // check if codecs have been explicitely defined in the master playlist for this level; // if yes use these ones instead of the ones parsed from the demux @@ -1098,7 +1080,7 @@ class MSEMediaController { } } - onFragParsing(event, data) { + onFragParsingData(data) { if (this.state === State.PARSING) { this.tparse2 = Date.now(); var level = this.levels[this.level], @@ -1115,7 +1097,7 @@ class MSEMediaController { //trigger handler right now this.tick(); } else { - logger.warn(`not in PARSING state, discarding ${event}`); + logger.warn(`not in PARSING state, ignoring FRAG_PARSING_DATA event`); } } @@ -1128,7 +1110,7 @@ class MSEMediaController { } } - onError(event, data) { + onError(data) { switch(data.details) { case ErrorDetails.FRAG_LOAD_ERROR: case ErrorDetails.FRAG_LOAD_TIMEOUT: @@ -1153,7 +1135,7 @@ class MSEMediaController { logger.error(`mediaController: ${data.details} reaches max retry, redispatch as fatal ...`); // redispatch same error but with fatal set to true data.fatal = true; - this.hls.trigger(event, data); + this.hls.trigger(Event.ERROR, data); this.state = State.ERROR; } } @@ -1216,14 +1198,14 @@ _checkBuffer() { // playhead moving or media not playing jumpThreshold = 0; } else { - logger.trace('playback seems stuck'); + logger.log('playback seems stuck'); } // if we are below threshold, try to jump if next buffer range is close if(bufferInfo.len <= jumpThreshold) { - // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a 300 ms range) + // no buffer available @ currentTime, check if next buffer is close (more than 5ms diff but within a config.maxSeekHole second range) var nextBufferStart = bufferInfo.nextStart, delta = nextBufferStart-currentTime; if(nextBufferStart && - (delta < 0.3) && + (delta < this.config.maxSeekHole) && (delta > 0.005) && !media.seeking) { // next buffer is close ! adjust currentTime to nextBufferStart diff --git a/dashboard-ui/bower_components/hls.js/src/event-handler.js b/dashboard-ui/bower_components/hls.js/src/event-handler.js new file mode 100644 index 0000000000..b2e8f042fb --- /dev/null +++ b/dashboard-ui/bower_components/hls.js/src/event-handler.js @@ -0,0 +1,66 @@ +/* +* +* All objects in the event handling chain should inherit from this class +* +*/ + +//import {logger} from './utils/logger'; + +class EventHandler { + + constructor(hls, ...events) { + this.hls = hls; + this.onEvent = this.onEvent.bind(this); + this.handledEvents = events; + this.useGenericHandler = true; + + this.registerListeners(); + } + + destroy() { + this.unregisterListeners(); + } + + isEventHandler() { + return typeof this.handledEvents === 'object' && this.handledEvents.length && typeof this.onEvent === 'function'; + } + + registerListeners() { + if (this.isEventHandler()) { + this.handledEvents.forEach(function(event) { + if (event === 'hlsEventGeneric') { + throw new Error('Forbidden event name: ' + event); + } + this.hls.on(event, this.onEvent); + }.bind(this)); + } + } + + unregisterListeners() { + if (this.isEventHandler()) { + this.handledEvents.forEach(function(event) { + this.hls.off(event, this.onEvent); + }.bind(this)); + } + } + + /* + * arguments: event (string), data (any) + */ + onEvent(event, data) { + this.onEventGeneric(event, data); + } + + onEventGeneric(event, data) { + var eventToFunction = function(event, data) { + var funcName = 'on' + event.replace('hls', ''); + if (typeof this[funcName] !== 'function') { + throw new Error(`Event ${event} has no generic handler in this ${this.constructor.name} class (tried ${funcName})`); + } + return this[funcName].bind(this, data); + }; + eventToFunction.call(this, event, data).call(); + } +} + +export default EventHandler; \ No newline at end of file diff --git a/dashboard-ui/bower_components/hls.js/src/events.js b/dashboard-ui/bower_components/hls.js/src/events.js index bf49f62ced..df75d9e66c 100644 --- a/dashboard-ui/bower_components/hls.js/src/events.js +++ b/dashboard-ui/bower_components/hls.js/src/events.js @@ -1,4 +1,4 @@ -export default { +module.exports = { // fired before MediaSource is attaching to media element - data: { media } MEDIA_ATTACHING: 'hlsMediaAttaching', // fired when MediaSource has been succesfully attached to media element - data: { } @@ -20,7 +20,7 @@ export default { // fired when a level's details have been updated based on previous details, after it has been loaded. - data: { details : levelDetails object, level : id of updated level } LEVEL_UPDATED: 'hlsLevelUpdated', // fired when a level's PTS information has been updated after parsing a fragment - data: { details : levelDetails object, level : id of updated level, drift: PTS drift observed when parsing last fragment } - LEVEL_PTS_UPDATED: 'hlsPTSUpdated', + LEVEL_PTS_UPDATED: 'hlsLevelPtsUpdated', // fired when a level switch is requested - data: { level : id of new level } LEVEL_SWITCH: 'hlsLevelSwitch', // fired when a fragment loading starts - data: { frag : fragment object} @@ -34,7 +34,7 @@ export default { // fired when Init Segment has been extracted from fragment - data: { moov : moov MP4 box, codecs : codecs found while parsing fragment} FRAG_PARSING_INIT_SEGMENT: 'hlsFragParsingInitSegment', // fired when parsing id3 is completed - data: { samples : [ id3 samples pes ] } - FRAG_PARSING_METADATA: 'hlsFraParsingMetadata', + FRAG_PARSING_METADATA: 'hlsFragParsingMetadata', // fired when moof/mdat have been extracted from fragment - data: { moof : moof MP4 box, mdat : mdat MP4 box} FRAG_PARSING_DATA: 'hlsFragParsingData', // fired when fragment parsing is completed - data: undefined @@ -44,7 +44,7 @@ export default { // fired when fragment matching with current media position is changing - data : { frag : fragment object } FRAG_CHANGED: 'hlsFragChanged', // Identifier for a FPS drop event - data: {curentDropped, currentDecoded, totalDroppedFrames} - FPS_DROP: 'hlsFPSDrop', + FPS_DROP: 'hlsFpsDrop', // Identifier for an error event - data: { type : error type, details : error details, fatal : if true, hls.js cannot/will not try to recover, if false, hls.js will try to recover,other error specific data} ERROR: 'hlsError', // fired when hls.js instance starts destroying. Different from MEDIA_DETACHED as one could want to detach and reattach a media to the instance of hls.js to handle mid-rolls for example diff --git a/dashboard-ui/bower_components/hls.js/src/hls.js b/dashboard-ui/bower_components/hls.js/src/hls.js index 0feeeb995f..96b10f2a4f 100644 --- a/dashboard-ui/bower_components/hls.js/src/hls.js +++ b/dashboard-ui/bower_components/hls.js/src/hls.js @@ -41,6 +41,8 @@ class Hls { debug: false, maxBufferLength: 30, maxBufferSize: 60 * 1000 * 1000, + maxBufferHole: 0.3, + maxSeekHole: 2, liveSyncDurationCount:3, liveMaxLatencyDurationCount: Infinity, maxMaxBufferLength: 600, diff --git a/dashboard-ui/bower_components/hls.js/src/loader/fragment-loader.js b/dashboard-ui/bower_components/hls.js/src/loader/fragment-loader.js index f1604b298f..c7b4e93ccc 100644 --- a/dashboard-ui/bower_components/hls.js/src/loader/fragment-loader.js +++ b/dashboard-ui/bower_components/hls.js/src/loader/fragment-loader.js @@ -3,14 +3,13 @@ */ import Event from '../events'; +import EventHandler from '../event-handler'; import {ErrorTypes, ErrorDetails} from '../errors'; -class FragmentLoader { +class FragmentLoader extends EventHandler { constructor(hls) { - this.hls = hls; - this.onfl = this.onFragLoading.bind(this); - hls.on(Event.FRAG_LOADING, this.onfl); + super(hls, Event.FRAG_LOADING); } destroy() { @@ -18,10 +17,10 @@ class FragmentLoader { this.loader.destroy(); this.loader = null; } - this.hls.off(Event.FRAG_LOADING, this.onfl); + EventHandler.prototype.destroy.call(this); } - onFragLoading(event, data) { + onFragLoading(data) { var frag = data.frag; this.frag = frag; this.frag.loaded = 0; diff --git a/dashboard-ui/bower_components/hls.js/src/loader/key-loader.js b/dashboard-ui/bower_components/hls.js/src/loader/key-loader.js index d37374b72b..94a16bf7c3 100644 --- a/dashboard-ui/bower_components/hls.js/src/loader/key-loader.js +++ b/dashboard-ui/bower_components/hls.js/src/loader/key-loader.js @@ -3,16 +3,15 @@ */ import Event from '../events'; +import EventHandler from '../event-handler'; import {ErrorTypes, ErrorDetails} from '../errors'; -class KeyLoader { +class KeyLoader extends EventHandler { constructor(hls) { - this.hls = hls; + super(hls, Event.KEY_LOADING); this.decryptkey = null; this.decrypturl = null; - this.ondkl = this.onDecryptKeyLoading.bind(this); - hls.on(Event.KEY_LOADING, this.ondkl); } destroy() { @@ -20,10 +19,10 @@ class KeyLoader { this.loader.destroy(); this.loader = null; } - this.hls.off(Event.KEY_LOADING, this.ondkl); + EventHandler.prototype.destroy.call(this); } - onDecryptKeyLoading(event, data) { + onKeyLoading(data) { var frag = this.frag = data.frag, decryptdata = frag.decryptdata, uri = decryptdata.uri; diff --git a/dashboard-ui/bower_components/hls.js/src/loader/playlist-loader.js b/dashboard-ui/bower_components/hls.js/src/loader/playlist-loader.js index 42257423a1..68e4646c5f 100644 --- a/dashboard-ui/bower_components/hls.js/src/loader/playlist-loader.js +++ b/dashboard-ui/bower_components/hls.js/src/loader/playlist-loader.js @@ -3,19 +3,18 @@ */ import Event from '../events'; +import EventHandler from '../event-handler'; import {ErrorTypes, ErrorDetails} from '../errors'; import URLHelper from '../utils/url'; import AttrList from '../utils/attr-list'; //import {logger} from '../utils/logger'; -class PlaylistLoader { +class PlaylistLoader extends EventHandler { constructor(hls) { - this.hls = hls; - this.onml = this.onManifestLoading.bind(this); - this.onll = this.onLevelLoading.bind(this); - hls.on(Event.MANIFEST_LOADING, this.onml); - hls.on(Event.LEVEL_LOADING, this.onll); + super(hls, + Event.MANIFEST_LOADING, + Event.LEVEL_LOADING); } destroy() { @@ -24,15 +23,14 @@ class PlaylistLoader { this.loader = null; } this.url = this.id = null; - this.hls.off(Event.MANIFEST_LOADING, this.onml); - this.hls.off(Event.LEVEL_LOADING, this.onll); + EventHandler.prototype.destroy.call(this); } - onManifestLoading(event, data) { + onManifestLoading(data) { this.load(data.url, null); } - onLevelLoading(event, data) { + onLevelLoading(data) { this.load(data.url, data.level, data.id); } diff --git a/dashboard-ui/bower_components/hls.js/src/remux/mp4-remuxer.js b/dashboard-ui/bower_components/hls.js/src/remux/mp4-remuxer.js index ffb311a1e7..3c0e1fd813 100644 --- a/dashboard-ui/bower_components/hls.js/src/remux/mp4-remuxer.js +++ b/dashboard-ui/bower_components/hls.js/src/remux/mp4-remuxer.js @@ -129,6 +129,7 @@ class MP4Remuxer { mdat, moof, firstPTS, firstDTS, lastDTS, pts, dts, ptsnorm, dtsnorm, + flags, samples = []; /* concatenate the video data and construct the mdat in place (need 8 more bytes to fill length and mpdat type) */ @@ -152,7 +153,7 @@ class MP4Remuxer { dts = avcSample.dts - this._initDTS; // ensure DTS is not bigger than PTS dts = Math.min(pts,dts); - //logger.log(`Video/PTS/DTS:${pts}/${dts}`); + //logger.log(`Video/PTS/DTS:${Math.round(pts/90)}/${Math.round(dts/90)}`); // if not first AVC sample of video track, normalize PTS/DTS with previous sample value // and ensure that sample duration is positive if (lastDTS !== undefined) { @@ -201,13 +202,14 @@ class MP4Remuxer { degradPrio: 0 } }; + flags = mp4Sample.flags; if (avcSample.key === true) { // the current sample is a key frame - mp4Sample.flags.dependsOn = 2; - mp4Sample.flags.isNonSync = 0; + flags.dependsOn = 2; + flags.isNonSync = 0; } else { - mp4Sample.flags.dependsOn = 1; - mp4Sample.flags.isNonSync = 1; + flags.dependsOn = 1; + flags.isNonSync = 1; } samples.push(mp4Sample); lastDTS = dtsnorm; @@ -222,7 +224,7 @@ class MP4Remuxer { track.len = 0; track.nbNalu = 0; if(samples.length && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { - var flags = samples[0].flags; + flags = samples[0].flags; // chrome workaround, mark first sample as being a Random Access Point to avoid sourcebuffer append issue // https://code.google.com/p/chromium/issues/detail?id=229412 flags.dependsOn = 2; @@ -270,7 +272,7 @@ class MP4Remuxer { unit = aacSample.unit; pts = aacSample.pts - this._initDTS; dts = aacSample.dts - this._initDTS; - //logger.log(`Audio/PTS:${aacSample.pts.toFixed(0)}`); + //logger.log(`Audio/PTS:${Math.round(pts/90)}`); // if not first sample if (lastDTS !== undefined) { ptsnorm = this._PTSNormalize(pts, lastDTS); diff --git a/dashboard-ui/bower_components/hls.js/src/utils/xhr-loader.js b/dashboard-ui/bower_components/hls.js/src/utils/xhr-loader.js index 5756f1fdc0..40b0946946 100644 --- a/dashboard-ui/bower_components/hls.js/src/utils/xhr-loader.js +++ b/dashboard-ui/bower_components/hls.js/src/utils/xhr-loader.js @@ -49,7 +49,7 @@ class XhrLoader { loadInternal() { var xhr = this.loader = new XMLHttpRequest(); - xhr.onreadystatechange = this.statechange.bind(this); + xhr.onloadend = this.loadend.bind(this); xhr.onprogress = this.loadprogress.bind(this); xhr.open('GET', this.url, true); @@ -65,13 +65,12 @@ class XhrLoader { xhr.send(); } - statechange(event) { + loadend(event) { var xhr = event.currentTarget, status = xhr.status, stats = this.stats; // don't proceed if xhr has been aborted - // 4 = Response from server has been completely loaded. - if (!stats.aborted && xhr.readyState === 4) { + if (!stats.aborted) { // http status between 200 to 299 are all successful if (status >= 200 && status < 300) { window.clearTimeout(this.timeoutHandle); diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index 17f68b3351..db08f2170c 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -29,14 +29,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/iron-behaviors", + "homepage": "https://github.com/PolymerElements/iron-behaviors", "_release": "1.0.12", "_resolution": { "type": "version", "tag": "v1.0.12", "commit": "657f526a2382a659cdf4e13be87ecc89261588a3" }, - "_source": "git://github.com/polymerelements/iron-behaviors.git", + "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-behaviors" + "_originalSource": "PolymerElements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index 99d82dd61d..0216a6c581 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.4", + "version": "1.1.5", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -44,14 +44,14 @@ "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "Polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.1.4", + "_release": "1.1.5", "_resolution": { "type": "version", - "tag": "v1.1.4", - "commit": "8ca01ac3cafc61abd980d262875ffca0c79640fa" + "tag": "v1.1.5", + "commit": "0aa8318b5e026688f94c78c7673acabf5bad0f17" }, "_source": "git://github.com/polymerelements/paper-input.git", "_target": "^1.0.9", diff --git a/dashboard-ui/bower_components/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index 22775b8851..99a9b83b38 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.4", + "version": "1.1.5", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -44,7 +44,7 @@ "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "Polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" } } diff --git a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html index f41669c7e9..3edbb79ca9 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-behavior.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-behavior.html @@ -32,7 +32,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN */ /** - * The label for this input. Bind this to ``'s content and `hidden` property, e.g. + * The label for this input. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * ``'s content and `hidden` property, e.g. * `[[label]]` in your `template` */ label: { @@ -40,7 +42,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * The value for this input. Bind this to the ``'s `bindValue` + * The value for this input. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `bindValue` * property, or the value property of your input that is `notify:true`. */ value: { @@ -49,8 +53,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Set to true to disable this input. Bind this to both the ``'s - * and the input's `disabled` property. + * Set to true to disable this input. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * both the ``'s and the input's `disabled` property. */ disabled: { type: Boolean, @@ -58,9 +63,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Returns true if the value is invalid. Bind this to both the ``'s - * and the input's `invalid` property. - * + * Returns true if the value is invalid. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to both the + * ``'s and the input's `invalid` property. + * * If `autoValidate` is true, the `invalid` attribute is managed automatically, * which can clobber attempts to manage it manually. */ @@ -71,48 +77,55 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Set to true to prevent the user from entering invalid input. Bind this to the - * ``'s `preventInvalidInput` property. + * Set to true to prevent the user from entering invalid input. If you're + * using PaperInputBehavior to implement your own paper-input-like element, + * bind this to ``'s `preventInvalidInput` property. */ preventInvalidInput: { type: Boolean }, /** - * Set this to specify the pattern allowed by `preventInvalidInput`. Bind this to the - * ``'s `allowedPattern` property. + * Set this to specify the pattern allowed by `preventInvalidInput`. If + * you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `allowedPattern` + * property. */ allowedPattern: { type: String }, /** - * The type of the input. The supported types are `text`, `number` and `password`. Bind this - * to the ``'s `type` property. + * The type of the input. The supported types are `text`, `number` and `password`. + * If you're using PaperInputBehavior to implement your own paper-input-like element, + * bind this to the ``'s `type` property. */ type: { type: String }, /** - * The datalist of the input (if any). This should match the id of an existing ``. Bind this - * to the ``'s `list` property. + * The datalist of the input (if any). This should match the id of an existing ``. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `list` property. */ list: { type: String }, /** - * A pattern to validate the `input` with. Bind this to the ``'s - * `pattern` property. + * A pattern to validate the `input` with. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `pattern` property. */ pattern: { type: String }, /** - * Set to true to mark the input as required. Bind this to the ``'s - * `required` property. + * Set to true to mark the input as required. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `required` property. */ required: { type: Boolean, @@ -120,8 +133,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * The error message to display when the input is invalid. Bind this to the - * ``'s content, if using. + * The error message to display when the input is invalid. If you're using + * PaperInputBehavior to implement your own paper-input-like element, + * bind this to the ``'s content, if using. */ errorMessage: { type: String @@ -136,8 +150,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Set to true to disable the floating label. Bind this to the ``'s - * `noLabelFloat` property. + * Set to true to disable the floating label. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `noLabelFloat` property. */ noLabelFloat: { type: Boolean, @@ -145,8 +160,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Set to true to always float the label. Bind this to the ``'s - * `alwaysFloatLabel` property. + * Set to true to always float the label. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `alwaysFloatLabel` property. */ alwaysFloatLabel: { type: Boolean, @@ -154,8 +170,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Set to true to auto-validate the input value. Bind this to the ``'s - * `autoValidate` property. + * Set to true to auto-validate the input value. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `autoValidate` property. */ autoValidate: { type: Boolean, @@ -163,8 +180,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Name of the validator to use. Bind this to the ``'s `validator` - * property. + * Name of the validator to use. If you're using PaperInputBehavior to + * implement your own paper-input-like element, bind this to + * the ``'s `validator` property. */ validator: { type: String @@ -173,7 +191,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN // HTMLInputElement attributes for binding if needed /** - * Bind this to the ``'s `autocomplete` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `autocomplete` property. */ autocomplete: { type: String, @@ -181,29 +200,34 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Bind this to the ``'s `autofocus` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `autofocus` property. */ autofocus: { type: Boolean }, /** - * Bind this to the ``'s `inputmode` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `inputmode` property. */ inputmode: { type: String }, /** - * Bind this to the ``'s `minlength` property. + * The minimum length of the input value. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `minlength` property. */ minlength: { type: Number }, /** - * The maximum length of the input value. Bind this to the ``'s - * `maxlength` property. + * The maximum length of the input value. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `maxlength` property. */ maxlength: { type: Number @@ -211,7 +235,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * The minimum (numeric or date-time) input value. - * Bind this to the ``'s `min` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `min` property. */ min: { type: String @@ -220,7 +245,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * The maximum (numeric or date-time) input value. * Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`). - * Bind this to the ``'s `max` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `max` property. */ max: { type: String @@ -228,14 +254,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * Limits the numeric or date-time increments. - * Bind this to the ``'s `step` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `step` property. */ step: { type: String }, /** - * Bind this to the ``'s `name` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `name` property. */ name: { type: String @@ -251,7 +279,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Bind this to the ``'s `readonly` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `readonly` property. */ readonly: { type: Boolean, @@ -259,7 +288,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Bind this to the ``'s `size` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `size` property. */ size: { type: Number @@ -268,7 +298,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN // Nonstandard attributes for binding if needed /** - * Bind this to the ``'s `autocapitalize` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `autocapitalize` property. */ autocapitalize: { type: String, @@ -276,7 +307,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Bind this to the ``'s `autocorrect` property. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `autocorrect` property. */ autocorrect: { type: String, @@ -284,28 +316,36 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, /** - * Bind this to the ``'s `autosave` property, used with type=search. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `autosave` property, + * used with type=search. */ autosave: { type: String }, /** - * Bind this to the ``'s `results` property, used with type=search. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `results` property, + * used with type=search. */ results: { type: Number }, /** - * Bind this to the ``'s `accept` property, used with type=file. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the ``'s `accept` property, + * used with type=file. */ accept: { type: String }, /** - * Bind this to the ``'s `multiple` property, used with type=file. + * If you're using PaperInputBehavior to implement your own paper-input-like + * element, bind this to the``'s `multiple` property, + * used with type=file. */ multiple: { type: Boolean @@ -354,8 +394,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return this.inputElement; }, + registered: function() { + // These types have some default placeholder text; overlapping + // the label on top of it looks terrible. Auto-float the label in this case. + this._typesThatHaveText = ["date", "datetime", "datetime-local", "month", + "time", "week", "file"]; + }, + attached: function() { this._updateAriaLabelledBy(); + + if (this.inputElement && + this._typesThatHaveText.indexOf(this.inputElement.type) !== -1) { + this.alwaysFloatLabel = true; + } }, _appendStringWithSpace: function(str, more) { diff --git a/dashboard-ui/bower_components/paper-input/paper-input.html b/dashboard-ui/bower_components/paper-input/paper-input.html index 1fe88a6dc0..13cdf97e8a 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input.html +++ b/dashboard-ui/bower_components/paper-input/paper-input.html @@ -39,9 +39,10 @@ for `suffix`). A `paper-input` can use the native `type=search` or `type=file` features. -However, since we can't control the native styling of the input, in these cases -it's recommended to use a placeholder text, or `always-float-label`, -as to not overlap the native UI (search icon, file button, etc.). +However, since we can't control the native styling of the input (search icon, +file button, date placeholder, etc.), in these cases the label will be +automatically floated. The `placeholder` attribute can still be used for +additional informational text. @@ -100,6 +101,7 @@ style this element. aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" + title$="[[title]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input.html b/dashboard-ui/bower_components/paper-input/test/paper-input.html index 2479b0d55b..df7915d2bf 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input.html @@ -70,7 +70,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - @@ -95,6 +94,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + @@ -121,6 +126,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN assert.ok(floatingLabel); }); + test('special types autofloat the label', function() { + var input = fixture('date'); + // Browsers that don't support special types like `date` fallback + // to `text`, so make sure to only test if type is still preserved after + // the element is attached. + if (input.inputElement.type === "date") { + assert.equal(input.alwaysFloatLabel, true); + var floatingLabel = Polymer.dom(Polymer.dom(input.root).querySelector('paper-input-container').root).querySelector('.label-is-floating'); + assert.ok(floatingLabel); + } + }); + test('always-float-label attribute works without placeholder', function() { var input = fixture('always-float-label'); var container = Polymer.dom(input.root).querySelector('paper-input-container'); diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index b3a07a70af..6cb5d92767 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -24,14 +24,14 @@ "web-component-tester": "*" }, "private": true, - "homepage": "https://github.com/polymer/polymer", + "homepage": "https://github.com/Polymer/polymer", "_release": "1.2.3", "_resolution": { "type": "version", "tag": "v1.2.3", "commit": "aa535d1675342007cbf64dc9c66497cf74cbc616" }, - "_source": "git://github.com/polymer/polymer.git", + "_source": "git://github.com/Polymer/polymer.git", "_target": "^1.0.0", - "_originalSource": "polymer/polymer" + "_originalSource": "Polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/components/imagestore.js b/dashboard-ui/components/imagestore.js deleted file mode 100644 index 95842d7a1a..0000000000 --- a/dashboard-ui/components/imagestore.js +++ /dev/null @@ -1,185 +0,0 @@ -(function () { - - function setImageIntoElement(elem, url) { - - if (elem.tagName !== "IMG") { - - elem.style.backgroundImage = "url('" + url + "')"; - - } else { - elem.setAttribute("src", url); - } - - if (browserInfo.chrome && !browserInfo.mobile) { - if (!elem.classList.contains('noFade')) { - fadeIn(elem, 1); - } - } - } - - function fadeIn(elem, iterations) { - - var keyframes = [ - { opacity: '0', offset: 0 }, - { opacity: '1', offset: 1 }]; - var timing = { duration: 200, iterations: iterations }; - return elem.animate(keyframes, timing); - } - - // Request Quota (only for File System API) - var requestedBytes = 1024 * 1024 * 600; // MB - var imageCacheDirectoryEntry; - var imageCacheFolder = 'images'; - - function createDir(rootDirEntry, folders, callback, errorCallback) { - // Throw out './' or '/' and move on to prevent something like '/foo/.//bar'. - if (folders[0] == '.' || folders[0] == '') { - folders = folders.slice(1); - } - rootDirEntry.getDirectory(folders[0], { create: true }, function (dirEntry) { - // Recursively add the new subfolder (if we still have another to create). - if (folders.length > 1) { - createDir(dirEntry, folders.slice(1), callback, errorCallback); - } else { - callback(dirEntry); - } - }, errorCallback); - } - - navigator.webkitPersistentStorage.requestQuota(requestedBytes, function (grantedBytes) { - - var requestMethod = window.webkitRequestFileSystem || window.requestFileSystem; - - requestMethod(PERSISTENT, grantedBytes, function (fs) { - - fileSystem = fs; - - createDir(fileSystem.root, imageCacheFolder.split('/'), function (dirEntry) { - - imageCacheDirectoryEntry = dirEntry; - - }); - - }); - - }); - - var fileSystem; - - function imageFileStore() { - - var self = this; - - function getCacheKey(url) { - - // Try to strip off the domain to share the cache between local and remote connections - var index = url.indexOf('://'); - - if (index != -1) { - url = url.substring(index + 3); - - index = url.indexOf('/'); - - if (index != -1) { - url = url.substring(index + 1); - } - - } - - return CryptoJS.MD5(url).toString(); - } - - function downloadToFile(url, dir, filename, callback, errorCallback) { - - console.log('Downloading ' + url); - - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.responseType = "arraybuffer"; - - xhr.onload = function (e) { - if (this.status == 200) { - writeData(dir, filename, this.getResponseHeader('Content-Type'), this.response, callback, errorCallback); - } else { - errorCallback(''); - } - } - - xhr.send(); - } - - function writeData(dir, filename, fileType, data, callback, errorCallback) { - - dir.getFile(filename, { create: true }, function (fileEntry) { - - // Create a FileWriter object for our FileEntry (log.txt). - fileEntry.createWriter(function (fileWriter) { - - fileWriter.onwriteend = function (e) { - callback(fileEntry); - }; - - fileWriter.onerror = errorCallback; - - // Create a new Blob and write it to log.txt. - var blob = new Blob([data], { type: fileType }); - - fileWriter.write(blob); - - }, errorCallback); - - }, errorCallback); - } - - self.getImageUrl = function (originalUrl) { - - return new Promise(function (resolve, reject) { - - if (originalUrl.indexOf('tag=') != -1) { - originalUrl += "&accept=webp"; - } - - var key = getCacheKey(originalUrl); - - var fileEntryCallback = function (fileEntry) { - resolve(fileEntry.toURL()); - }; - - var errorCallback = function (e) { - console.log('Imagestore error: ' + e.name); - reject(); - }; - - if (!fileSystem || !imageCacheDirectoryEntry) { - errorCallback(''); - return; - } - - var path = '/' + imageCacheFolder + "/" + key; - - fileSystem.root.getFile(path, { create: false }, fileEntryCallback, function () { - - downloadToFile(originalUrl, imageCacheDirectoryEntry, key, fileEntryCallback, errorCallback); - }); - }); - }; - - self.setImageInto = function (elem, url) { - - self.getImageUrl(url).then(function (localUrl) { - - setImageIntoElement(elem, localUrl); - - }, function () { - setImageIntoElement(elem, url); - }); - }; - - window.ImageStore = self; - } - - require(['cryptojs-md5'], function () { - new imageFileStore(); - }); - -})(); \ No newline at end of file diff --git a/dashboard-ui/components/itemidentifier/itemidentifier.js b/dashboard-ui/components/itemidentifier/itemidentifier.js index af7b539831..eed94646bd 100644 --- a/dashboard-ui/components/itemidentifier/itemidentifier.js +++ b/dashboard-ui/components/itemidentifier/itemidentifier.js @@ -1,4 +1,4 @@ -define(['components/paperdialoghelper', 'paper-dialog', 'paper-fab', 'paper-input'], function (paperDialogHelper) { +define(['components/paperdialoghelper', 'paper-dialog', 'paper-fab', 'paper-input', 'paper-checkbox'], function (paperDialogHelper) { var currentItem; var currentDeferred; diff --git a/dashboard-ui/components/paperdialoghelper.js b/dashboard-ui/components/paperdialoghelper.js index 514729587b..00ce17a038 100644 --- a/dashboard-ui/components/paperdialoghelper.js +++ b/dashboard-ui/components/paperdialoghelper.js @@ -102,9 +102,9 @@ // but not needed here since this is already on top of an existing dialog // but skip it in IE because it's causing the entire browser to hang // Also have to disable for firefox because it's causing select elements to not be clickable - if (!browserInfo.msie && !browserInfo.mozilla) { + if (!browserInfo.msie && !browserInfo.firefox) { if (options.modal !== false) { - dlg.setAttribute('modal', 'modal'); + //dlg.setAttribute('modal', 'modal'); } } diff --git a/dashboard-ui/components/tvguide/tvguide.js b/dashboard-ui/components/tvguide/tvguide.js index 0e7b1342a5..1f57ddaf7a 100644 --- a/dashboard-ui/components/tvguide/tvguide.js +++ b/dashboard-ui/components/tvguide/tvguide.js @@ -478,9 +478,9 @@ var tabContent = options.element; tabContent.innerHTML = Globalize.translateDocument(template); - Events.on(tabContent.querySelector('.programGrid'), 'scroll', function () { + tabContent.querySelector('.programGrid').addEventListener('scroll', function (e) { - onProgramGridScroll(tabContent, this); + onProgramGridScroll(tabContent, e.target); }); if (browserInfo.mobile) { diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index ef8f245fab..6736cb4022 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -24,11 +24,6 @@ ${OptionSyncOnlyOnWifi} - - - - ${OptionSyncLosslessAudioOriginal} - diff --git a/dashboard-ui/scripts/appsettings.js b/dashboard-ui/scripts/appsettings.js index a66bff0325..ac898bf826 100644 --- a/dashboard-ui/scripts/appsettings.js +++ b/dashboard-ui/scripts/appsettings.js @@ -84,14 +84,6 @@ return appStorage.getItem('syncOnlyOnWifi') != 'false'; }, - syncLosslessAudio: function (val) { - - if (val != null) { - update('syncLosslessAudio', val.toString()); - } - - return appStorage.getItem('syncLosslessAudio') != 'false'; - }, syncPath: function (val) { if (val != null) { diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 8deb4e0edc..b95cef20b4 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -1159,7 +1159,7 @@ performAdvancedRefresh(page); break; case 'delete': - LibraryBrowser.deleteItem(currentItem.Id); + LibraryBrowser.deleteItems([currentItem.Id]); break; case 'editimages': LibraryBrowser.editImages(currentItem.Id); diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index fedb9a7e2f..56ea06aba8 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1915,7 +1915,7 @@ if (currentItem && currentItem.Id == itemId) { if (currentItem.Type == 'Recording') { - Dashboard.navigate('livetv.html'); + LibraryBrowser.showTab('livetv.html', 3); } else { Dashboard.navigate('index.html'); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index f5181c06a0..3a5e5b79ea 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -155,7 +155,7 @@ enableFullPaperTabs: function () { if (browserInfo.animate && !browserInfo.mobile) { - //return true; + return true; } return AppInfo.isNativeApp; @@ -834,27 +834,37 @@ }); - Dashboard.alert(Globalize.translate('MessageRefreshQueued')); }, - deleteItem: function (itemId) { + deleteItems: function (itemIds) { - // The timeout allows the flyout to close - setTimeout(function () { + return new Promise(function (resolve, reject) { var msg = Globalize.translate('ConfirmDeleteItem'); + var title = Globalize.translate('HeaderDeleteItem'); - Dashboard.confirm(msg, Globalize.translate('HeaderDeleteItem'), function (result) { + if (itemIds.length > 1) { + msg = Globalize.translate('ConfirmDeleteItems'); + title = Globalize.translate('HeaderDeleteItems'); + } + + Dashboard.confirm(msg, title, function (result) { if (result) { - ApiClient.deleteItem(itemId); - Events.trigger(LibraryBrowser, 'itemdeleting', [itemId]); + var promises = itemIds.map(function (itemId) { + ApiClient.deleteItem(itemId); + Events.trigger(LibraryBrowser, 'itemdeleting', [itemId]); + }); + + resolve(); + + } else { + reject(); } }); - - }, 250); + }); }, editImages: function (itemId) { @@ -876,11 +886,11 @@ editMetadata: function (itemId) { Dashboard.navigate('edititemmetadata.html?id=' + itemId); - return; - require(['components/metadataeditor/metadataeditor'], function () { - MetadataEditor.show(itemId); - }); + //require(['components/metadataeditor/metadataeditor'], function (metadataeditor) { + + // metadataeditor.show(itemId); + //}); }, showMoreCommands: function (positionTo, itemId, commands) { @@ -991,7 +1001,7 @@ PlaylistManager.showPanel([itemId]); break; case 'delete': - LibraryBrowser.deleteItem(itemId); + LibraryBrowser.deleteItems([itemId]); break; case 'download': { @@ -1594,12 +1604,8 @@ itemCommands.push('queuefromhere'); } - // There's no detail page with a dedicated delete function - if (item.Type == 'Playlist' || item.Type == 'BoxSet') { - - if (item.CanDelete) { - itemCommands.push('delete'); - } + if (item.CanDelete) { + itemCommands.push('delete'); } if (SyncManager.isAvailable(item)) { @@ -2892,7 +2898,7 @@ var fireCallbackOnClose = false; var delay = browserInfo.animate ? 0 : 100; - setTimeout(function() { + setTimeout(function () { paperDialogHelper.open(dlg).then(function () { if (options.callback && fireCallbackOnClose) { diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index d55214233d..c22dc976d8 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -469,7 +469,7 @@ PlaylistManager.showPanel([itemId]); break; case 'delete': - LibraryBrowser.deleteItem(itemId); + LibraryBrowser.deleteItems([itemId]); break; case 'download': { @@ -1025,7 +1025,7 @@ function showSelections(initialCard) { - require(['paper-checkbox'], function() { + require(['paper-checkbox'], function () { var cards = document.querySelectorAll('.card'); for (var i = 0, length = cards.length; i < length; i++) { showSelection(cards[i]); @@ -1101,6 +1101,14 @@ ironIcon: 'playlist-add' }); + if (user.Policy.EnableContentDeletion) { + items.push({ + name: Globalize.translate('ButtonDelete'), + id: 'delete', + ironIcon: 'delete' + }); + } + if (user.Policy.EnableContentDownloading && AppInfo.supportsDownloading) { //items.push({ // name: Globalize.translate('ButtonDownload'), @@ -1149,6 +1157,12 @@ PlaylistManager.showPanel(items); hideSelections(); break; + case 'delete': + LibraryBrowser.deleteItems(items).then(function () { + Dashboard.navigate('index.html'); + }); + hideSelections(); + break; case 'groupvideos': combineVersions($($.mobile.activePage)[0], items); break; diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js index 50ad77db48..f33ae36ce7 100644 --- a/dashboard-ui/scripts/livetvrecordings.js +++ b/dashboard-ui/scripts/livetvrecordings.js @@ -70,7 +70,8 @@ showParentTitle: true, centerText: true, coverImage: true, - lazy: true + lazy: true, + overlayPlayButton: true }); @@ -84,7 +85,8 @@ ApiClient.getLiveTvRecordings({ userId: Dashboard.getCurrentUserId(), - IsInProgress: true + IsInProgress: true, + Fields: 'CanDelete' }).then(function (result) { @@ -96,7 +98,8 @@ userId: Dashboard.getCurrentUserId(), limit: 12, - IsInProgress: false + IsInProgress: false, + Fields: 'CanDelete' }).then(function (result) { diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 03824619e3..0f8ad00326 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -569,7 +569,7 @@ // viblast can help us here //return true; - return window.MediaSource != null; + return window.MediaSource != null && !browserInfo.firefox; }; self.changeStream = function (ticks, params) { diff --git a/dashboard-ui/scripts/mysyncsettings.js b/dashboard-ui/scripts/mysyncsettings.js index 2d8d48b740..fe5cfcfb78 100644 --- a/dashboard-ui/scripts/mysyncsettings.js +++ b/dashboard-ui/scripts/mysyncsettings.js @@ -4,7 +4,6 @@ page.querySelector('#txtSyncPath').value = AppSettings.syncPath(); page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi(); - page.querySelector('#chkSyncLosslessAudio').checked = AppSettings.syncLosslessAudio(); var uploadServers = AppSettings.cameraUploadServers(); @@ -24,7 +23,6 @@ AppSettings.syncPath(page.querySelector('#txtSyncPath').value); AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked); - AppSettings.syncLosslessAudio(page.querySelector('#chkSyncLosslessAudio').checked); AppSettings.cameraUploadServers($(".chkUploadServer", page).get().filter(function (i) { diff --git a/dashboard-ui/scripts/registrationservices.js b/dashboard-ui/scripts/registrationservices.js index 022b880986..5ce9d2452d 100644 --- a/dashboard-ui/scripts/registrationservices.js +++ b/dashboard-ui/scripts/registrationservices.js @@ -235,7 +235,7 @@ $('#regPrice', page).html("" + Globalize.translate('ValuePriceUSD').replace('{0}', "$" + pkg.price.toFixed(2)) + ""); $('#ppButton', page).hide(); - var url = "http://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner; + var url = "https://mb3admin.com/admin/service/user/getPayPalEmail?id=" + pkg.owner; fetch(url).then(function (response) { diff --git a/dashboard-ui/scripts/sections.js b/dashboard-ui/scripts/sections.js index 67d0b9476c..cd6342fe1c 100644 --- a/dashboard-ui/scripts/sections.js +++ b/dashboard-ui/scripts/sections.js @@ -617,7 +617,7 @@ html += ''; html += '' + Globalize.translate('HeaderLatestTvRecordings') + ''; - html += '' + Globalize.translate('ButtonMore') + ''; + html += '' + Globalize.translate('ButtonMore') + ''; html += ''; } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 1cf2209250..5868c62238 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1849,6 +1849,14 @@ var AppInfo = {}; connectservice: apiClientBowerPath + '/connectservice' }; + if (navigator.webkitPersistentStorage) { + paths.imageloader = embyWebComponentsBowerPath + "/images/persistentimageloader"; + } else if (Dashboard.isRunningInCordova()) { + paths.imageloader = 'cordova/imagestore'; + } else { + paths.imageloader = embyWebComponentsBowerPath + "/images/basicimageloader"; + } + paths.hlsjs = bowerPath + "/hls.js/dist/hls.min"; if (Dashboard.isRunningInCordova()) { @@ -1878,6 +1886,7 @@ var AppInfo = {}; }; requirejs.config({ + waitSeconds: 0, map: { '*': { 'css': bowerPath + '/emby-webcomponents/requirecss', @@ -1999,7 +2008,7 @@ var AppInfo = {}; } if (Dashboard.isRunningInCordova() && browserInfo.android) { - define("audiorenderer", ["cordova/android/vlcplayer"]); + define("audiorenderer", ["scripts/htmlmediarenderer"]); define("videorenderer", ["cordova/android/vlcplayer"]); } else if (Dashboard.isRunningInCordova() && browserInfo.safari) { @@ -2124,23 +2133,11 @@ var AppInfo = {}; }; if (Dashboard.isRunningInCordova() && browserInfo.android) { - AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(','); - - // TODO: This is going to exclude it from both playback and sync, so improve on this - if (AppSettings.syncLosslessAudio()) { - AppInfo.directPlayAudioContainers.push('flac'); - } - AppInfo.directPlayVideoContainers = "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm".split(','); } else if (Dashboard.isRunningInCordova() && browserInfo.safari) { - AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus".split(','); - - // TODO: This is going to exclude it from both playback and sync, so improve on this - if (AppSettings.syncLosslessAudio()) { - AppInfo.directPlayAudioContainers.push('flac'); - } + AppInfo.directPlayAudioContainers = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac".split(','); } var promises = []; @@ -2262,13 +2259,6 @@ var AppInfo = {}; var postInitDependencies = []; - if (navigator.webkitPersistentStorage) { - postInitDependencies.push('components/imagestore'); - } - else if (Dashboard.isRunningInCordova()) { - postInitDependencies.push('cordova/imagestore'); - } - postInitDependencies.push('scripts/thememediaplayer'); postInitDependencies.push('scripts/remotecontrol'); postInitDependencies.push('css!css/notifications.css'); @@ -2357,7 +2347,7 @@ var AppInfo = {}; deviceName = "Chrome"; } else if (browserInfo.edge) { deviceName = "Edge"; - } else if (browserInfo.mozilla) { + } else if (browserInfo.firefox) { deviceName = "Firefox"; } else if (browserInfo.msie) { deviceName = "Internet Explorer"; @@ -2396,7 +2386,7 @@ var AppInfo = {}; var keys = []; keys.push(navigator.userAgent); keys.push((navigator.cpuClass || "")); - + keys.push(new Date().getTime()); var randomId = CryptoJS.SHA1(keys.join('|')).toString(); appStorage.setItem('_deviceId', randomId); onDeviceAdAcquired(randomId); diff --git a/dashboard-ui/scripts/supporterkeypage.js b/dashboard-ui/scripts/supporterkeypage.js index 2685b024e6..5ae72bd29e 100644 --- a/dashboard-ui/scripts/supporterkeypage.js +++ b/dashboard-ui/scripts/supporterkeypage.js @@ -77,7 +77,7 @@ oldkey: oldkey }; - var url = "http://mb3admin.com/admin/service/supporter/linkKeys"; + var url = "https://mb3admin.com/admin/service/supporter/linkKeys"; console.log(url); $.post(url, info).then(function (res) { var result = JSON.parse(res); @@ -101,7 +101,7 @@ var email = $('#txtEmail', form).val(); - var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email=" + email; + var url = "https://mb3admin.com/admin/service/supporter/retrievekey?email=" + email; console.log(url); $.post(url).then(function (res) { var result = JSON.parse(res); diff --git a/dashboard-ui/strings/html/ca.json b/dashboard-ui/strings/html/ca.json index 2e6b80f722..8ab2df7ecc 100644 --- a/dashboard-ui/strings/html/ca.json +++ b/dashboard-ui/strings/html/ca.json @@ -57,7 +57,7 @@ "ButtonOk": "D'acord", "ButtonCancel": "Cancel\u00b7la", "ButtonExit": "Surt", - "ButtonNew": "New", + "ButtonNew": "Nou", "HeaderTV": "TV", "HeaderAudio": "\u00c0udio", "HeaderVideo": "V\u00eddeo", @@ -173,7 +173,7 @@ "TabLatest": "Darrers", "TabUpcoming": "Propers", "TabShows": "Programes", - "TabEpisodes": "Episodes", + "TabEpisodes": "Episodis", "TabGenres": "G\u00e8neres", "TabPeople": "Gent", "TabNetworks": "Xarxes", @@ -191,7 +191,7 @@ "HeaderResume": "Resume", "HeaderNextUp": "A Continuaci\u00f3", "NoNextUpItemsMessage": "Cap trobat. Comen\u00e7a a mirar els teus programes!", - "HeaderLatestEpisodes": "\u00daltims episodis", + "HeaderLatestEpisodes": "Darrers episodis", "HeaderPersonTypes": "Tipus de Persones:", "TabSongs": "Can\u00e7ons", "TabAlbums": "\u00c0lbums", @@ -361,7 +361,7 @@ "TabOthers": "Altres", "HeaderExtractChapterImagesFor": "Extrau imatges d'episodis per a:", "OptionMovies": "Pel\u00b7l\u00edcules", - "OptionEpisodes": "Episodes", + "OptionEpisodes": "Episodis", "OptionOtherVideos": "Altres V\u00eddeos", "TitleMetadata": "Metadades", "LabelAutomaticUpdates": "Habilita actualitzacions autom\u00e0tiques", @@ -543,7 +543,7 @@ "LabelPreferredDisplayLanguage": "Idioma de visualitzaci\u00f3 preferit:", "LabelPreferredDisplayLanguageHelp": "La traducci\u00f3 d'Emby \u00e9s un projecte en curs.", "LabelReadHowYouCanContribute": "Apr\u00e8n com pots contribuir.", - "HeaderNewCollection": "New Collection", + "HeaderNewCollection": "Nova Col\u00b7lecci\u00f3", "ButtonSubmit": "Submit", "ButtonCreate": "Crea", "LabelCustomCss": "CSS propi:", @@ -631,8 +631,8 @@ "ButtonShutdown": "Atura", "ButtonUpdateNow": "Update Now", "TabHosting": "Hosting", - "PleaseUpdateManually": "Please shutdown the server and update manually.", - "NewServerVersionAvailable": "A new version of Emby Server is available!", + "PleaseUpdateManually": "Si et plau, apaga el servidor i actualitza manualment.", + "NewServerVersionAvailable": "Hi ha una nova versi\u00f3 del Servidor Emby disponible!", "ServerUpToDate": "L'Emby est\u00e0 actualitzat", "LabelComponentsUpdated": "The following components have been installed or updated:", "MessagePleaseRestartServerToFinishUpdating": "Si et plau, reinicia el servidor per finalitzar les actualitzacions.", @@ -952,7 +952,7 @@ "ViewTypeTvShowSeries": "S\u00e8ries:", "ViewTypeTvGenres": "G\u00e8neres", "ViewTypeTvFavoriteSeries": "S\u00e8ries Preferides", - "ViewTypeTvFavoriteEpisodes": "Episodis preferits", + "ViewTypeTvFavoriteEpisodes": "Episodis Preferits", "ViewTypeMovieResume": "Resume", "ViewTypeMovieLatest": "Darrers", "ViewTypeMovieMovies": "Pel\u00b7l\u00edcules", @@ -1083,7 +1083,7 @@ "OptionUnidentified": "Unidentified", "OptionMissingParentalRating": "Missing parental rating", "OptionStub": "Stub", - "HeaderEpisodes": "Episodes:", + "HeaderEpisodes": "Episodis:", "OptionSeason0": "Temporada 0", "LabelReport": "Report:", "OptionReportSongs": "Can\u00e7ons", @@ -1094,7 +1094,7 @@ "OptionReportMovies": "Pel\u00b7l\u00edcules", "OptionReportHomeVideos": "V\u00eddeos dom\u00e8stics", "OptionReportGames": "Jocs", - "OptionReportEpisodes": "Episodes", + "OptionReportEpisodes": "Episodis", "OptionReportCollections": "Col\u00b7leccions", "OptionReportBooks": "Llibres", "OptionReportArtists": "Artists", @@ -1274,9 +1274,9 @@ "ButtonLearnMore": "Learn more", "TabPlayback": "Reproducci\u00f3", "HeaderLanguagePreferences": "Language Preferences", - "TabCinemaMode": "Cinema Mode", + "TabCinemaMode": "Mode Cinema", "TitlePlayback": "Reproducci\u00f3", - "LabelEnableCinemaModeFor": "Enable cinema mode for:", + "LabelEnableCinemaModeFor": "Habilitar mode cinema per:", "CinemaModeConfigurationHelp": "Cinema mode brings the theater experience straight to your living room with the ability to play trailers and custom intros before the main feature.", "OptionTrailersFromMyMovies": "Inclou tr\u00e0ilers de pel\u00b7l\u00edcules a la meva biblioteca", "OptionUpcomingMoviesInTheaters": "Include trailers from new and upcoming movies", @@ -1294,7 +1294,7 @@ "LabelDisplayTrailersWithinMovieSuggestions": "Display trailers within movie suggestions", "LabelDisplayTrailersWithinMovieSuggestionsHelp": "Requires installation of the Trailer channel.", "CinemaModeConfigurationHelp2": "Emby apps will have a setting to enable or disable cinema mode. TV apps enable cinema mode by default.", - "LabelEnableCinemaMode": "Enable cinema mode", + "LabelEnableCinemaMode": "Habilitar mode cinema", "HeaderCinemaMode": "Mode Cinema", "LabelDateAddedBehavior": "Date added behavior for new content:", "OptionDateAddedImportTime": "Empra la data d'escaneig", diff --git a/dashboard-ui/strings/html/de.json b/dashboard-ui/strings/html/de.json index 9d1806097e..35b039af46 100644 --- a/dashboard-ui/strings/html/de.json +++ b/dashboard-ui/strings/html/de.json @@ -31,12 +31,12 @@ "LabelEnableVideoImageExtraction": "Aktiviere Videobild-Extrahierung", "VideoImageExtractionHelp": "F\u00fcr Videos die noch keinen Bilder haben, und f\u00fcr die wir keine Internetbilder finden k\u00f6nnen. Dadurch wird der erste Scan der Bibliotheken etwas mehr Zeit beanspruchen, f\u00fchrt aber zu einer ansprechenderen Pr\u00e4sentation.", "LabelEnableChapterImageExtractionForMovies": "Extrahiere Kapitelbilder f\u00fcr Filme", - "LabelChapterImageExtractionForMoviesHelp": "Das Extrahieren von Kapitel-Bildern erm\u00f6glicht es den Clients eine grafische Szenenauswahl anzubieten. Das Erstellen ist recht langsam, rechenintensiv und erfordert einige Gigabyte an freien Speicherplatz. Diese Aufgabe startet jede Nacht, das kann aber in den geplanten Aufgaben ge\u00e4ndert werden. Es wird nicht empfohlen diese Aufgabe in Zeiten hoher Server-Auslastung zu starten.", + "LabelChapterImageExtractionForMoviesHelp": "Das Extrahieren von Kapitel-Bildern erm\u00f6glicht es den Clients eine grafische Szenenauswahl anzubieten. Das Erstellen kann langsam, rechenintensiv sein und erfordert einige Gigabyte an freien Speicherplatz. Diese Aufgabe startet jede Nacht und kann im Bereich \"Geplanten Aufgaben\" ge\u00e4ndert werden. Es wird nicht empfohlen diese Aufgabe in Zeiten hoher Serverbenutzung zu starten.", "LabelEnableAutomaticPortMapping": "Aktiviere automatische Portweiterleitung", "LabelEnableAutomaticPortMappingHelp": "UPnP erm\u00f6glicht die automatische Routerkonfiguration f\u00fcr den einfachen Remote-Zugriff. Diese Option ist nicht f\u00fcr jeden Router verf\u00fcgbar.", "HeaderTermsOfService": "Emby Nutzungsbedingungen", - "MessagePleaseAcceptTermsOfService": "Bitte akzeptiere die Nutzungsbedingungen & Datenschutzbestimmungen um fortzufahren.", - "OptionIAcceptTermsOfService": "Ich akzeptiere die Nutzungsbedingungen.", + "MessagePleaseAcceptTermsOfService": "Bitte akzeptieren Sie die Nutzungsbedingungen & Datenschutzbestimmungen bevor Sie fortfahren.", + "OptionIAcceptTermsOfService": "Ich akzeptiere die Nutzungsbedingungen", "ButtonPrivacyPolicy": "Datenschutzbestimmungen", "ButtonTermsOfService": "Nutzungsbedingungen", "HeaderDeveloperOptions": "Entwickleroptionen", @@ -56,7 +56,7 @@ "HeaderSync": "Synchronisation", "ButtonOk": "Ok", "ButtonCancel": "Abbrechen", - "ButtonExit": "Schlie\u00dfen", + "ButtonExit": "Beenden", "ButtonNew": "Neu", "HeaderTV": "TV", "HeaderAudio": "Audio", @@ -70,24 +70,24 @@ "HeaderInstalledServices": "Installierte Dienste", "HeaderAvailableServices": "Verf\u00fcgbare Dienste", "MessageNoServicesInstalled": "Zur Zeit sind keine Dienste installiert.", - "HeaderToAccessPleaseEnterEasyPinCode": "Bitte geben Sie Ihren vereinfachten PIN Code ein", - "KidsModeAdultInstruction": "Verwenden Sie das Schloss-Symbol in der rechten oberen Ecke um den Kindermodus zu verlassen oder zu konfigurieren. Sie ben\u00f6tigen daf\u00fcr Ihren PIN Code.", + "HeaderToAccessPleaseEnterEasyPinCode": "Um Zugang zu erhalten, geben Sie bitte Ihren einfachen PIN Code ein", + "KidsModeAdultInstruction": "Verwenden Sie das Schloss-Symbol in der rechten unteren Ecke um den Kindermodus zu konfigurieren oder zu verlassen. Sie ben\u00f6tigen daf\u00fcr Ihren PIN Code.", "ButtonConfigurePinCode": "PIN Code festlegen", "HeaderAdultsReadHere": "Eltern, bitte lesen!", "RegisterWithPayPal": "Registrieren mit PayPal", "HeaderEnjoyDayTrial": "Genie\u00dfen Sie eine 14 Tage Testversion", "LabelSyncTempPath": "Verzeichnis f\u00fcr tempor\u00e4re Dateien", - "LabelSyncTempPathHelp": "Legen Sie ein eigenes Synchronisations-Arbeits Verzeichnis fest. Konvertierte Medien werden w\u00e4hrend der Synchronisation hier gespeichert.", - "LabelCustomCertificatePath": "Eigener Zertifikats Ordner:", + "LabelSyncTempPathHelp": "Legen Sie ein Arbeitsverzeichnis f\u00fcr die Synchronisation fest. Konvertierte Medien werden w\u00e4hrend der Synchronisation hier gespeichert.", + "LabelCustomCertificatePath": "Eigener Zertifikatsordner:", "LabelCustomCertificatePathHelp": "F\u00fcgen Sie ihr eigenes SSL Zertifikat als .pfx Datei hinzu. Wenn ausgelassen, wird der Server ein selbst signiertes Zertifikat f\u00fcr Sie erstellen.", "TitleNotifications": "Benachrichtigungen", - "OptionDetectArchiveFilesAsMedia": "Behandle Archive wie Medien", - "OptionDetectArchiveFilesAsMediaHelp": "Wenn aktiviert werden .rar und .zip Datei-Erweiterungen wie Medien behandelt.", + "OptionDetectArchiveFilesAsMedia": "Erkenne Archive als Medien", + "OptionDetectArchiveFilesAsMediaHelp": "Wenn aktiviert, werden Dateien mit der Erweiterung .rar und .zip als Medien erkannt.", "LabelEnterConnectUserName": "Benutzername oder Email:", - "LabelEnterConnectUserNameHelp": "Dies ist Ihr Emby Konto Benutzername oder Email.", + "LabelEnterConnectUserNameHelp": "Dies ist Ihr Emby online Benutzername oder Email.", "LabelEnableEnhancedMovies": "Aktiviere erweiterte Filmdarstellung.", "LabelEnableEnhancedMoviesHelp": "Wenn aktiviert, werden Filme als Verzeichnisse dargestellt, welche Trailer, Extras, Besetzung & Crew sowie weitere Inhalte enth\u00e4lt.", - "HeaderSyncJobInfo": "Synchronisations-Aufgabe", + "HeaderSyncJobInfo": "Synchronisationsaufgabe", "FolderTypeMixed": "Gemischter Inhalt", "FolderTypeMovies": "Filme", "FolderTypeMusic": "Musik", @@ -99,7 +99,7 @@ "FolderTypeBooks": "B\u00fccher", "FolderTypeTvShows": "TV", "FolderTypeInherit": "\u00dcbernehmen", - "LabelContentType": "Inhalte-Typ:", + "LabelContentType": "Typ des Inhalts:", "TitleScheduledTasks": "Geplante Aufgaben", "HeaderSetupLibrary": "Medienbibliotheken einrichten", "ButtonAddMediaFolder": "Medienverzeichnis hinzuf\u00fcgen", @@ -301,7 +301,7 @@ "OptionHideUser": "Verberge diesen Benutzer in den Anmeldebildschirmen", "OptionHideUserFromLoginHelp": "Hilfreich f\u00fcr private oder versteckte Administrator-Konten. Der Benutzer muss sich manuell mit der Eingabe des Benutzernamens und Passworts anmelden.", "OptionDisableUser": "Sperre diesen Benutzer", - "OptionDisableUserHelp": "Wenn deaktivierten Benutzern wird der Server keine Verbindung von diesem Benutzer erlauben. Bestehende Verbindungen werden sofort beendet.", + "OptionDisableUserHelp": "Wenn deaktiviert wird der Server keine Verbindung von diesem Benutzer erlauben. Bestehende Verbindungen werden sofort beendet.", "HeaderAdvancedControl": "Erweiterte Kontrolle", "LabelName": "Name:", "ButtonHelp": "Hilfe", @@ -572,7 +572,7 @@ "LabelMinResumePercentageHelp": "Titel werden als \"nicht abgespielt\" eingetragen, wenn sie vor dieser Zeit gestoppt werden", "LabelMaxResumePercentageHelp": "Titel werden als \"vollst\u00e4ndig abgespielt\" eingetragen, wenn sie nach dieser Zeit gestoppt werden", "LabelMinResumeDurationHelp": "Titel die k\u00fcrzer als dieser Wert sind, werden nicht fortsetzbar sein", - "TitleAutoOrganize": "automatische Sortierung", + "TitleAutoOrganize": "Autom. Organisation", "TabActivityLog": "Aktivit\u00e4tsverlauf", "HeaderName": "Name", "HeaderDate": "Datum", @@ -866,7 +866,7 @@ "LabelSeriesNamePlain": "Serienname", "ValueSeriesNamePeriod": "Serien.Name", "ValueSeriesNameUnderscore": "Serien_Name", - "ValueEpisodeNamePeriod": "Episodentitel", + "ValueEpisodeNamePeriod": "Episoden.Name", "ValueEpisodeNameUnderscore": "Episoden_Name", "LabelSeasonNumberPlain": "Staffelnummer", "LabelEpisodeNumberPlain": "Episodennummer", @@ -990,7 +990,7 @@ "LabelKodiMetadataEnablePathSubstitutionHelp": "Aktiviert die Pfadersetzung f\u00fcr Bildpfade durch Benutzung der Server Pfadersetzung Einstellungen", "LabelKodiMetadataEnablePathSubstitutionHelp2": "Siehe Pfadersetzung.", "OptionDisplayChannelsInline": "Zeige Kan\u00e4le in meinen Ansichten.", - "OptionDisplayChannelsInlineHelp": "Wenn aktiviert. werden Kan\u00e4le direkt in Ihren anderen Ansichten. Wenn deaktiviert werden diese nur in einer separaten Kanal-Ansicht angezeigt.", + "OptionDisplayChannelsInlineHelp": "Wenn aktiviert, werden Kan\u00e4le direkt in anderen Ansichten angezeigt. Wenn deaktiviert werden diese nur in einer separaten Kanal-Ansicht angezeigt.", "LabelDisplayCollectionsView": "Zeigt eine Ansicht f\u00fcr Sammlungen, um Filmsammlungen darzustellen", "LabelDisplayCollectionsViewHelp": "Die erstellt eine eigene Ansicht f\u00fcr Sammlungen, auf denen Sie Zugriff haben. Um eine Sammlung zu erstellen benutzen Sie einen Rechtsklick oder halten Sie einen Film gedr\u00fcckt und w\u00e4hlen Sie 'Zu Sammlung hinzuf\u00fcgen'.", "LabelKodiMetadataEnableExtraThumbs": "Kopiere Extrafanart in Extrathumbs", @@ -1249,7 +1249,7 @@ "XmlDocumentAttributeListHelp": "Diese Attribute werden f\u00fcr das Stammelement jeder XML-Antwort angewendet.", "OptionSaveMetadataAsHidden": "Speichere Metadaten und Bilder als versteckte Dateien", "LabelExtractChaptersDuringLibraryScan": "Erzeuge Kapitelbilder w\u00e4hrend des scannens der Bibliothek", - "LabelExtractChaptersDuringLibraryScanHelp": "Fall aktiviert, werden Kapitelbilder w\u00e4hrend des Imports von Videos beim Bibliothekenscan erzeugt. Falls deaktiviert, werden die Kapitelbilder w\u00e4hrend einer eigens daf\u00fcr geplanten Aufgabe erstellt, was den Bibliothekenscan beschleunigt.", + "LabelExtractChaptersDuringLibraryScanHelp": "Fall aktiviert, werden Kapitelbilder w\u00e4hrend des Imports von Videos beim Bibliothekenscan erzeugt. Falls deaktiviert, werden die Kapitelbilder w\u00e4hrend einer eigens daf\u00fcr geplanten Aufgabe erstellt, was den regelm\u00e4\u00dfig Bibliothekenscan beschleunigt.", "LabelConnectGuestUserName": "Ihr Emby Benutzername oder Emailadresse:", "LabelConnectUserName": "Emby Benutzername\/ Email-Adresse:", "LabelConnectUserNameHelp": "Verbinden Sie diesen lokalen Benutzer mit einem Online Emby Account um vereinfachten Zugriff von jedem Emby Programm zu erhalten, auch ohne die IP-Adresse des Servers zu kennen.", @@ -1407,7 +1407,7 @@ "HeaderPlaylists": "Wiedergabeliste", "HeaderViewStyles": "Zeige Stiele", "LabelSelectViewStyles": "Aktiviere erweiterte Ansichten f\u00fcr:", - "LabelSelectViewStylesHelp": "Wenn aktiviert werden Darstellungen von Kategorien mit Medieninformationen wie Empfehlungen, k\u00fcrzlich hinzugef\u00fcgt, Genres und weitere, angereichert. Wenn deaktiviert werden diese nur als simple Verzeichnisse dargestellt.", + "LabelSelectViewStylesHelp": "Wenn aktiviert werden Darstellungen von Kategorien mit Medieninformationen wie Empfehlungen, k\u00fcrzlich hinzugef\u00fcgt, Genres und weitere, angereichert. Wenn deaktiviert werden diese nur als einfache Verzeichnisse dargestellt.", "TabPhotos": "Fotos", "TabVideos": "Videos", "HeaderWelcomeToEmby": "Willkommen zu Emby", diff --git a/dashboard-ui/strings/html/es-MX.json b/dashboard-ui/strings/html/es-MX.json index 0d5747bf34..b61fc7d961 100644 --- a/dashboard-ui/strings/html/es-MX.json +++ b/dashboard-ui/strings/html/es-MX.json @@ -136,12 +136,12 @@ "LabelAudioLanguagePreference": "Preferencia de idioma de audio:", "LabelSubtitleLanguagePreference": "Preferencia de idioma de subt\u00edtulos:", "OptionDefaultSubtitles": "Por Defecto", - "OptionSmartSubtitles": "Smart", - "OptionSmartSubtitlesHelp": "Subtitles matching the language preference will be loaded when the audio is in a foreign language.", + "OptionSmartSubtitles": "Inteligente", + "OptionSmartSubtitlesHelp": "Los subt\u00edtulos que coincidan con el lenguaje preferido ser\u00e1n cargados cuando el audio se encuentre en un idioma extranjero.", "OptionOnlyForcedSubtitles": "\u00danicamente subt\u00edtulos forzados", "OptionAlwaysPlaySubtitles": "Siempre mostrar subt\u00edtulos", "OptionNoSubtitles": "Sin Subtitulos", - "OptionDefaultSubtitlesHelp": "Subtitles are loaded based on the default and forced flags in the embedded metadata. Language preferences are considered when multiple options are available.", + "OptionDefaultSubtitlesHelp": "Los subtitulos son cargados basados en los indicadores \"por defecto\" y \"forzado\" incluidos en los metadatos. Las preferencias de idioma son consideradas cuando hay m\u00faltiples opciones disponibles.", "OptionOnlyForcedSubtitlesHelp": "Se cargar\u00e1n \u00fanicamente subt\u00edtulos marcados como forzados.", "OptionAlwaysPlaySubtitlesHelp": "Los subt\u00edtulos que coincidan con el lenguaje preferido ser\u00e1n cargados independientemente del lenguaje del audio.", "OptionNoSubtitlesHelp": "Los subt\u00edtulos no ser\u00e1n cargados por defecto.", @@ -499,7 +499,7 @@ "HeaderTo": "Hasta", "LabelFrom": "Desde:", "LabelTo": "Hasta:", - "LabelToHelp": "Example: \\\\MyServer\\Movies (a path clients can access)", + "LabelToHelp": "Ejemplo: \\\\MiServidor\\Peliculas (una ruta a la que los clientes pueden acceder)", "ButtonAddPathSubstitution": "Agregar Ruta Alternativa", "OptionSpecialEpisode": "Especiales", "OptionMissingEpisode": "Episodios Faltantes", diff --git a/dashboard-ui/strings/html/fr.json b/dashboard-ui/strings/html/fr.json index d1761ce9f5..bdafadde7e 100644 --- a/dashboard-ui/strings/html/fr.json +++ b/dashboard-ui/strings/html/fr.json @@ -541,7 +541,7 @@ "LabelFriendlyServerName": "Surnom du serveur:", "LabelFriendlyServerNameHelp": "Ce nom sera utilis\u00e9 pour identifier le serveur. Si laiss\u00e9 vide, le nom d'ordinateur sera utilis\u00e9.", "LabelPreferredDisplayLanguage": "Langue d'affichage pr\u00e9f\u00e9r\u00e9e :", - "LabelPreferredDisplayLanguageHelp": "La traduction d'Emby est un porjet en cours.", + "LabelPreferredDisplayLanguageHelp": "La traduction d'Emby est un projet en cours.", "LabelReadHowYouCanContribute": "Voir comment vous pouvez contribuer.", "HeaderNewCollection": "Nouvelle collection", "ButtonSubmit": "Soumettre", diff --git a/dashboard-ui/strings/html/nl.json b/dashboard-ui/strings/html/nl.json index 975f02ba6a..c8888eaf84 100644 --- a/dashboard-ui/strings/html/nl.json +++ b/dashboard-ui/strings/html/nl.json @@ -499,7 +499,7 @@ "HeaderTo": "Naar", "LabelFrom": "Van:", "LabelTo": "Naar:", - "LabelToHelp": "Example: \\\\MyServer\\Movies (a path clients can access)", + "LabelToHelp": "Voorbeeld: \\\\Server\\Films (een pad waar apps bij kunnen)", "ButtonAddPathSubstitution": "Vervanging toevoegen", "OptionSpecialEpisode": "Specials", "OptionMissingEpisode": "Ontbrekende Afleveringen", diff --git a/dashboard-ui/strings/html/pt-BR.json b/dashboard-ui/strings/html/pt-BR.json index d962611cb1..6f9e003c7c 100644 --- a/dashboard-ui/strings/html/pt-BR.json +++ b/dashboard-ui/strings/html/pt-BR.json @@ -1339,7 +1339,7 @@ "HeaderTrailerReelHelp": "Inicie um carrossel de trailers para reproduzir uma longa lista de reprodu\u00e7\u00e3o de trailers.", "MessageNoTrailersFound": "Nenhum trailer encontrado. Instale o canal Trailer para melhorar sua experi\u00eancia com filmes, adicionando uma biblioteca de trailers da internet.", "HeaderNewUsers": "Novos Usu\u00e1rios", - "ButtonSignUp": "Entrar", + "ButtonSignUp": "Registrar", "ButtonForgotPassword": "Esqueci a senha", "OptionDisableUserPreferences": "Desativar acesso \u00e0s prefer\u00eancias do usu\u00e1rio.", "OptionDisableUserPreferencesHelp": "Se ativado, apenas administradores poder\u00e3o configurar imagens do perfil do usu\u00e1rio, senhas e prefer\u00eancias de idioma.", @@ -1435,7 +1435,7 @@ "OptionSyncToSDCard": "Sincronizado para um cart\u00e3o SD externo", "LabelEmail": "Email:", "LabelUsername": "Nome do Usu\u00e1rio:", - "HeaderSignUp": "Inscrever-se", + "HeaderSignUp": "Registrar", "LabelPasswordConfirm": "Senha (confirmar):", "ButtonAddServer": "Adicionar Servidor", "TabHomeScreen": "Tela In\u00edcio", diff --git a/dashboard-ui/strings/html/ru.json b/dashboard-ui/strings/html/ru.json index 22819bb420..52a5c73c33 100644 --- a/dashboard-ui/strings/html/ru.json +++ b/dashboard-ui/strings/html/ru.json @@ -84,7 +84,7 @@ "OptionDetectArchiveFilesAsMedia": "\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043c\u0435\u0434\u0438\u0430\u0434\u0430\u043d\u043d\u044b\u043c\u0438", "OptionDetectArchiveFilesAsMediaHelp": "\u041f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438 rar \u0438 zip \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u0434\u0438\u0430\u0444\u0430\u0439\u043b\u043e\u0432.", "LabelEnterConnectUserName": "\u0418\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u042d-\u043f\u043e\u0447\u0442\u0430:", - "LabelEnterConnectUserNameHelp": "\u042d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0448\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u042d-\u043f\u043e\u0447\u0442\u044b \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 Emby.", + "LabelEnterConnectUserNameHelp": "\u042d\u0442\u043e - \u0432\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0447\u0451\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 Emby \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u042d-\u043f\u043e\u0447\u0442\u044b.", "LabelEnableEnhancedMovies": "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0438\u043b\u044c\u043c\u043e\u0432", "LabelEnableEnhancedMoviesHelp": "\u041f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u0444\u0438\u043b\u044c\u043c\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043f\u0430\u043f\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u043b\u0435\u0440\u044b, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b, \u043a\u0442\u043e \u0441\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0438 \u043a\u0442\u043e \u0441\u043d\u0438\u043c\u0430\u043b, \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435.", "HeaderSyncJobInfo": "\u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438", @@ -301,7 +301,7 @@ "OptionHideUser": "\u0421\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0432\u0445\u043e\u0434\u0430", "OptionHideUserFromLoginHelp": "\u0426\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0434\u043b\u044f \u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u0443\u0447\u0451\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u0432\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0432\u0432\u043e\u0434\u044f \u0441\u0432\u043e\u0451 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.", "OptionDisableUser": "\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f", - "OptionDisableUserHelp": "\u041f\u0440\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u044b.", + "OptionDisableUserHelp": "\u041f\u0440\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043b\u044e\u0431\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u0418\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u044b.", "HeaderAdvancedControl": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435", "LabelName": "\u0418\u043c\u044f (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435):", "ButtonHelp": "\u0421\u043f\u0440\u0430\u0432\u043a\u0430...", @@ -1415,7 +1415,7 @@ "ButtonSkip": "\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c", "TextConnectToServerManually": "\u0421\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e", "ButtonSignInWithConnect": "\u0412\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Connect", - "ButtonConnect": "\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435", + "ButtonConnect": "\u041f\u043e\u0434\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f", "LabelServerHost": "\u0425\u043e\u0441\u0442:", "LabelServerHostHelp": "192.168.1.100 \u0438\u043b\u0438 https:\/\/myserver.com", "LabelServerPort": "\u041f\u043e\u0440\u0442:", diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 42fdfe5760..c52abea876 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -678,7 +678,7 @@ "HeaderRequireManualLoginHelp": "When disabled clients may present a login screen with a visual selection of users.", "OptionOtherApps": "Other apps", "OptionMobileApps": "Mobile apps", - "HeaderNotificationList": "Click on a notification to configure it's sending options.", + "HeaderNotificationList": "Click on a notification to configure sending options.", "NotificationOptionApplicationUpdateAvailable": "Application update available", "NotificationOptionApplicationUpdateInstalled": "Application update installed", "NotificationOptionPluginUpdateInstalled": "Plugin update installed", diff --git a/dashboard-ui/strings/javascript/ar.json b/dashboard-ui/strings/javascript/ar.json index 9ed760d1cd..04bf784f76 100644 --- a/dashboard-ui/strings/javascript/ar.json +++ b/dashboard-ui/strings/javascript/ar.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/bg-BG.json b/dashboard-ui/strings/javascript/bg-BG.json index 388af1d8c6..4a8899c6fb 100644 --- a/dashboard-ui/strings/javascript/bg-BG.json +++ b/dashboard-ui/strings/javascript/bg-BG.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/ca.json b/dashboard-ui/strings/javascript/ca.json index 96bfdf0d3e..ea70af6262 100644 --- a/dashboard-ui/strings/javascript/ca.json +++ b/dashboard-ui/strings/javascript/ca.json @@ -96,8 +96,8 @@ "SyncJobItemStatusReadyToTransfer": "Ready to Transfer", "LabelCollection": "Collection", "HeaderAddToCollection": "Afegir a Col\u00b7lecci\u00f3", - "HeaderNewCollection": "New Collection", - "NewCollectionNameExample": "Example: Star Wars Collection", + "HeaderNewCollection": "Nova Col\u00b7lecci\u00f3", + "NewCollectionNameExample": "Exemple: Col\u00b7leci\u00f3 Star Wars", "OptionSearchForInternetMetadata": "Search the internet for artwork and metadata", "LabelSelectCollection": "Select collection:", "HeaderDevices": "Dispositius", @@ -224,7 +224,7 @@ "ButtonMore": "More", "HeaderFavoriteMovies": "Favorite Movies", "HeaderFavoriteShows": "Programes Preferits", - "HeaderFavoriteEpisodes": "Favorite Episodes", + "HeaderFavoriteEpisodes": "Episodis Preferits", "HeaderFavoriteGames": "Favorite Games", "HeaderRatingsDownloads": "Valoraci\u00f3 \/ Desc\u00e0rregues", "HeaderConfirmProfileDeletion": "Confirm Profile Deletion", @@ -427,7 +427,7 @@ "HeaderNotifications": "Notificacions", "HeaderSelectPlayer": "Select Player", "ButtonSelect": "Select", - "ButtonNew": "New", + "ButtonNew": "Nou", "MessageInternetExplorerWebm": "For best results with Internet Explorer please install the WebM playback plugin.", "HeaderVideoError": "Video Error", "ButtonAddToPlaylist": "Afegir a la llista de reproducci\u00f3", @@ -466,7 +466,7 @@ "OptionCollections": "Col\u00b7leccions", "OptionSeries": "S\u00e8ries", "OptionSeasons": "Seasons", - "OptionEpisodes": "Episodes", + "OptionEpisodes": "Episodis", "OptionGames": "Jocs", "OptionGameSystems": "Game systems", "OptionMusicArtists": "M\u00fasics", @@ -533,7 +533,7 @@ "FolderTypeTvShows": "TV", "TabMovies": "Pel\u00b7l\u00edcules", "TabSeries": "S\u00e8ries", - "TabEpisodes": "Episodes", + "TabEpisodes": "Episodis", "TabTrailers": "Tr\u00e0ilers", "TabGames": "Jocs", "TabAlbums": "\u00c0lbums", @@ -582,7 +582,7 @@ "ValueOneSeries": "1 series", "ValueSeriesCount": "{0} series", "ValueOneEpisode": "1 episode", - "ValueEpisodeCount": "{0} episodes", + "ValueEpisodeCount": "{0} episodis", "ValueOneGame": "1 game", "ValueGameCount": "{0} games", "ValueOneAlbum": "1 album", @@ -634,7 +634,7 @@ "HeaderAlbums": "Albums", "HeaderGames": "Jocs", "HeaderBooks": "Llibres", - "HeaderEpisodes": "Episodes", + "HeaderEpisodes": "Episodis", "HeaderSeasons": "Seasons", "HeaderTracks": "Tracks", "HeaderItems": "Items", @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restaurar la compra", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "Per a tu", "ButtonLibrary": "Biblioteca", @@ -900,7 +900,7 @@ "MessageEmbyForAndroidHasMoved": "Emby for Android has moved to a new home in the app store. Please consider checking out the new app. You may continue to use this app for as long as you wish.", "HeaderNextUp": "A Continuaci\u00f3", "HeaderLatestMovies": "\u00daltimes pel\u00b7l\u00edcules", - "HeaderLatestEpisodes": "\u00daltims episodis", + "HeaderLatestEpisodes": "Darrers episodis", "EmbyPremiereMonthly": "Emby Premiere Monthly", "EmbyPremiereMonthlyWithPrice": "Emby Premiere Monthly {0}", "HeaderEmailAddress": "Correu electr\u00f2nic", diff --git a/dashboard-ui/strings/javascript/cs.json b/dashboard-ui/strings/javascript/cs.json index 2ed6fe6ff9..4493964900 100644 --- a/dashboard-ui/strings/javascript/cs.json +++ b/dashboard-ui/strings/javascript/cs.json @@ -889,7 +889,7 @@ "ButtonNo": "Ne", "ButtonRestorePreviousPurchase": "Obnovit n\u00e1kup", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "Pro v\u00e1s", "ButtonLibrary": "Knihovna", diff --git a/dashboard-ui/strings/javascript/da.json b/dashboard-ui/strings/javascript/da.json index b35d855bb2..e2064d39e8 100644 --- a/dashboard-ui/strings/javascript/da.json +++ b/dashboard-ui/strings/javascript/da.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/de.json b/dashboard-ui/strings/javascript/de.json index a6e1f2d543..af773f8380 100644 --- a/dashboard-ui/strings/javascript/de.json +++ b/dashboard-ui/strings/javascript/de.json @@ -106,7 +106,7 @@ "ButtonAddToCollection": "Zu Sammlung hinzuf\u00fcgen", "HeaderSelectCertificatePath": "W\u00e4hlen Sie einen Zertifikat Ordner", "ConfirmMessageScheduledTaskButton": "Dieser Vorgang l\u00e4uft in der Regel automatisch als geplante Aufgabe ab und erfordert keine manuellen Eingabe. Um die geplante Aufgabe zu konfigurieren, finden Sie unter:", - "HeaderSupporterBenefit": "Eine aktive Emby Premiere Mitgliedschaft erm\u00f6glicht weitere Vorteile wie z.B. Zugriff auf die Synchronisation, Premium Plugi,s, Internet Channels und mehr. {0}Erfahren Sie mehr{1}.", + "HeaderSupporterBenefit": "Eine aktive Emby Premiere Mitgliedschaft erm\u00f6glicht weitere Vorteile wie z.B. Zugriff auf Sync, Premium Plugins, Internet Channel Inhalte, und mehr. {0}Erfahren Sie mehr{1}.", "LabelSyncNoTargetsHelp": "Es sieht so aus als w\u00fcrden Sie aktuell keine Apps verwenden, die Synchronisation unterst\u00fctzen.", "HeaderWelcomeToProjectServerDashboard": "Willkommen zur Emby Server \u00dcbersicht", "HeaderWelcomeToProjectWebClient": "Willkommen zu Emby", @@ -159,7 +159,7 @@ "ButtonPlaylist": "Wiedergabeliste", "ButtonPreviousTrack": "Vorheriger Titel", "LabelEnabled": "Aktivieren", - "LabelDisabled": "Deaktivieren", + "LabelDisabled": "Deaktiviert", "ButtonMoreInformation": "mehr Informationen", "LabelNoUnreadNotifications": "Keine ungelesenen Benachrichtigungen", "ButtonViewNotifications": "Benachrichtigungen anschauen", @@ -889,7 +889,7 @@ "ButtonNo": "Nein", "ButtonRestorePreviousPurchase": "Kauf wiederherstellen", "AlreadyPaid": "Schon Bezahlt?", - "AlreadyPaidHelp1": "Wenn Sie bereits eine \u00e4ltere Version des Media Browsers f\u00fcr Android erworben haben, so m\u00fcssen Sie keine erneute Zahlung t\u00e4tigen um diese App zu aktivieren. In diesem Fall senden Sie und bitte eine Email an {0} und wir aktivieren die App f\u00fcr Sie.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Sie haben bereits Emby Premiere? Dann brechen Sie diesen Dialog ab, melden Sie sich innerhalb der App innerhalb Ihres Heimnetzes an und die App wird automatisch freigeschaltet.", "ButtonForYou": "F\u00fcr Sie", "ButtonLibrary": "Biliothek", diff --git a/dashboard-ui/strings/javascript/el.json b/dashboard-ui/strings/javascript/el.json index fc64c7eda9..7b4bd6b7b9 100644 --- a/dashboard-ui/strings/javascript/el.json +++ b/dashboard-ui/strings/javascript/el.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/en-GB.json b/dashboard-ui/strings/javascript/en-GB.json index 663410d823..ca35473588 100644 --- a/dashboard-ui/strings/javascript/en-GB.json +++ b/dashboard-ui/strings/javascript/en-GB.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/en-US.json b/dashboard-ui/strings/javascript/en-US.json index 67fe3a366b..b23b571bc2 100644 --- a/dashboard-ui/strings/javascript/en-US.json +++ b/dashboard-ui/strings/javascript/en-US.json @@ -355,6 +355,8 @@ "ButtonBrowseOnlineImages": "Browse online images", "HeaderDeleteItem": "Delete Item", "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "MessagePleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageValueNotCorrect": "The value entered is not correct. Please try again.", "MessageItemSaved": "Item saved.", @@ -889,7 +891,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/es-AR.json b/dashboard-ui/strings/javascript/es-AR.json index fe729e0d8c..e2e058a358 100644 --- a/dashboard-ui/strings/javascript/es-AR.json +++ b/dashboard-ui/strings/javascript/es-AR.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/es-MX.json b/dashboard-ui/strings/javascript/es-MX.json index 1e109336b3..8d8e285756 100644 --- a/dashboard-ui/strings/javascript/es-MX.json +++ b/dashboard-ui/strings/javascript/es-MX.json @@ -1,5 +1,5 @@ { - "LabelFromHelp": "Example: {0} (on the server)", + "LabelFromHelp": "Ejemplo: {0} (en el servidor)", "SettingsSaved": "Configuraci\u00f3n guardada.", "AddUser": "Agregar usuario", "Users": "Usuarios", @@ -397,7 +397,7 @@ "HeaderAlert": "Alerta", "MessagePleaseRestart": "Por favor reinicie para finalizar la actualizaci\u00f3n.", "ButtonRestart": "Reiniciar", - "MessagePleaseRefreshPage": "Please refresh this page to receive new updates from Emby Server.", + "MessagePleaseRefreshPage": "Por favor vuelva a cargar esta pagina para recibir nuevas actualizaciones del Servidor Emby.", "ButtonHide": "Ocultar", "MessageSettingsSaved": "Configuraci\u00f3n guardada.", "ButtonSignOut": "Cerrar Sesi\u00f3n", @@ -888,9 +888,9 @@ "ButtonYes": "Si", "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restaurar Compra", - "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", - "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", + "AlreadyPaid": "\u00bfYa esta pagado?", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp2": "\u00bfYa tiene Emby Premiere? Solo de cancelar a este cuadro de dialogo, inicie sesi\u00f3n con la app desde la red WIFI de su hogar, y sera desbloqueado autom\u00e1ticamente.", "ButtonForYou": "Para T\u00ed", "ButtonLibrary": "Biblioteca", "ButtonSearch": "B\u00fasqueda", @@ -922,8 +922,8 @@ "PleaseAddAtLeastOneFolder": "Por favor agregue al menos una carpeta a esta biblioteca dando clic al bot\u00f3n de Agregar.", "ErrorAddingMediaPathToVirtualFolder": "Hubo un error agregando la ruta de medios. Por favor aseg\u00farese de que la ruta es valida y que el proceso del Servidor Emby tenga acceso a ese destino.", "ErrorRemovingEmbyConnectAccount": "Hubo un error retirando la cuenta de Emby Connect. Por favor aseg\u00farese que su conexi\u00f3n a internet esta activa e intente de nuevo.", - "ErrorAddingEmbyConnectAccount1": "There was an error adding the Emby Connect account. Have you created an Emby account? Sign up at {0}.", - "ErrorAddingEmbyConnectAccount2": "Please ensure the Emby account has been activated by following the instructions in the email sent after creating the account. If you did not receive this email then please send an email to {0} from the email address used with the Emby account.", + "ErrorAddingEmbyConnectAccount1": "Hubo un error agregando la cuenta de Emby Connect. \u00bfYa ha creado una cuenta de Emby? Registrese en {0}.", + "ErrorAddingEmbyConnectAccount2": "Por favor aseg\u00farese que la cuenta Emby ha sido activada siguiendo las instrucciones incluidas en el correo electr\u00f3nico que recibi\u00f3 al crear la cuenta. Si no recibi\u00f3 dicho correo electr\u00f3nico por favor escriba uno a {0} desde la direcci\u00f3n de correo electr\u00f3nico usada con la cuenta Emby.", "HeaderFavoriteArtists": "Artistas Favoritos", "HeaderFavoriteSongs": "Canciones Favoritas", "HeaderConfirmPluginInstallation": "Confirmar Instalaci\u00f3n de Complemento", diff --git a/dashboard-ui/strings/javascript/es.json b/dashboard-ui/strings/javascript/es.json index 5b81c8e876..1b3abdf61c 100644 --- a/dashboard-ui/strings/javascript/es.json +++ b/dashboard-ui/strings/javascript/es.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/fi.json b/dashboard-ui/strings/javascript/fi.json index 4c7464a460..1a414cb0a6 100644 --- a/dashboard-ui/strings/javascript/fi.json +++ b/dashboard-ui/strings/javascript/fi.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/fr.json b/dashboard-ui/strings/javascript/fr.json index 236617a2fd..da9acfa0e4 100644 --- a/dashboard-ui/strings/javascript/fr.json +++ b/dashboard-ui/strings/javascript/fr.json @@ -889,7 +889,7 @@ "ButtonNo": "Non", "ButtonRestorePreviousPurchase": "Restaurer l'achat", "AlreadyPaid": "Vous avez d\u00e9j\u00e0 pay\u00e9 ?", - "AlreadyPaidHelp1": "Si vous avez d\u00e9j\u00e0 pay\u00e9 pour installer une ancienne version de Media Browser for Android, vous n'avez pas besoin de payer \u00e0 nouveau. Envoyez-nous un email \u00e0 {0}, et nous l'activerons pour vous.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Vous avez Emby Premiere? Fermez juste cette boite de dialogue, connectez-vous \u00e0 l'application en passant par le r\u00e9seau WIFI de chez vous, et l'activation sera automatique.", "ButtonForYou": "Pour vous", "ButtonLibrary": "Biblioth\u00e8que", diff --git a/dashboard-ui/strings/javascript/gsw.json b/dashboard-ui/strings/javascript/gsw.json index 4cfc38f4f0..032af4d880 100644 --- a/dashboard-ui/strings/javascript/gsw.json +++ b/dashboard-ui/strings/javascript/gsw.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/he.json b/dashboard-ui/strings/javascript/he.json index 1c5b8f6283..af694e04cf 100644 --- a/dashboard-ui/strings/javascript/he.json +++ b/dashboard-ui/strings/javascript/he.json @@ -889,7 +889,7 @@ "ButtonNo": "\u05dc\u05d0", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "\u05d1\u05e9\u05d1\u05d9\u05dc\u05da", "ButtonLibrary": "\u05e1\u05e4\u05e8\u05d9\u05d4", diff --git a/dashboard-ui/strings/javascript/hr.json b/dashboard-ui/strings/javascript/hr.json index fe4f766dc1..231425e0cd 100644 --- a/dashboard-ui/strings/javascript/hr.json +++ b/dashboard-ui/strings/javascript/hr.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/it.json b/dashboard-ui/strings/javascript/it.json index 9cdb984e5b..cb764b0b0e 100644 --- a/dashboard-ui/strings/javascript/it.json +++ b/dashboard-ui/strings/javascript/it.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Ripristinare acquisto", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "Per te", "ButtonLibrary": "libreria", diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json index 7ac9a44238..185a5c47fd 100644 --- a/dashboard-ui/strings/javascript/javascript.json +++ b/dashboard-ui/strings/javascript/javascript.json @@ -359,6 +359,8 @@ "ButtonBrowseOnlineImages": "Browse online images", "HeaderDeleteItem": "Delete Item", "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", + "HeaderDeleteItems": "Delete Items", + "ConfirmDeleteItems": "Deleting these items will delete them from both the file system and your media library. Are you sure you wish to continue?", "MessagePleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageValueNotCorrect": "The value entered is not correct. Please try again.", "MessageItemSaved": "Item saved.", @@ -899,7 +901,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/kk.json b/dashboard-ui/strings/javascript/kk.json index 773b9761cb..4fa822ce77 100644 --- a/dashboard-ui/strings/javascript/kk.json +++ b/dashboard-ui/strings/javascript/kk.json @@ -889,7 +889,7 @@ "ButtonNo": "\u0416\u043e\u049b", "ButtonRestorePreviousPurchase": "\u0421\u0430\u0442\u044b\u043f \u0430\u043b\u0493\u0430\u043d\u0434\u044b \u049b\u0430\u043b\u043f\u044b\u043d\u0430 \u043a\u0435\u043b\u0442\u0456\u0440\u0443", "AlreadyPaid": "\u04d8\u043b\u0434\u0435\u049b\u0430\u0448\u0430\u043d \u0442\u04e9\u043b\u0435\u043d\u0434\u0456 \u043c\u0435?", - "AlreadyPaidHelp1": "\u0415\u0433\u0435\u0440 Media Browser for Android \u0435\u0441\u043a\u0456 \u043d\u04b1\u0441\u049b\u0430\u0441\u044b\u043d \u043e\u0440\u043d\u0430\u0442\u0443 \u04af\u0448\u0456\u043d \u0441\u0456\u0437 \u04d9\u043b\u0434\u0435\u049b\u0430\u0448\u0430\u043d \u0442\u04e9\u043b\u0435\u0433\u0435\u043d \u0431\u043e\u043b\u0441\u0430\u04a3\u044b\u0437, \u043e\u0441\u044b \u049b\u043e\u043b\u0434\u0430\u043d\u0431\u0430\u043d\u044b \u0456\u0441\u043a\u0435 \u049b\u043e\u0441\u0443 \u04af\u0448\u0456\u043d \u0441\u0456\u0437\u0433\u0435 \u049b\u0430\u0439\u0442\u0430\u0434\u0430\u043d \u0442\u04e9\u043b\u0435\u0443\u0433\u0435 \u049b\u0430\u0436\u0435\u0442\u0456 \u0436\u043e\u049b. \u0411\u0456\u0437\u0433\u0435 {0} \u0436\u0430\u043d\u044b\u043d\u0430 \u0445\u0430\u0442 \u0436\u0456\u0431\u0435\u0440\u0456\u04a3\u0456\u0437 \u0441\u043e\u043d\u0434\u0430 \u0441\u0456\u0437 \u04af\u0448\u0456\u043d \u043e\u043d\u044b \u0431\u0435\u043b\u0441\u0435\u043d\u0434\u0456\u0440\u0435\u043c\u0456\u0437.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Emby Premiere \u0431\u0430\u0440 \u043c\u0430? \u0416\u0430\u0439 \u0493\u0430\u043d\u0430 \u0431\u04b1\u043b \u0442\u0456\u043b\u0434\u0435\u0441\u0443\u0434\u0456 \u0431\u043e\u043b\u0434\u044b\u0440\u043c\u0430\u04a3\u044b\u0437, \u0441\u0456\u0437\u0434\u0456\u04a3 \u04af\u0439\u043b\u0456\u043a WiFi-\u0436\u0435\u043b\u0456\u0441\u0456 \u0456\u0448\u0456\u043d\u0435\u043d \u049b\u043e\u043b\u0434\u0430\u043d\u0431\u0430\u0493\u0430 \u043a\u0456\u0440\u0456\u04a3\u0456\u0437, \u0441\u043e\u043d\u0434\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0442\u044b \u0442\u04af\u0440\u0434\u0435 \u043e\u043d\u044b\u04a3 \u049b\u04b1\u043b\u043f\u044b \u0430\u0448\u044b\u043b\u0430\u0434\u044b.", "ButtonForYou": "\u0421\u0456\u0437 \u04af\u0448\u0456\u043d...", "ButtonLibrary": "\u0422\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430...", diff --git a/dashboard-ui/strings/javascript/ko.json b/dashboard-ui/strings/javascript/ko.json index 5a3cc530fc..7ac6022fde 100644 --- a/dashboard-ui/strings/javascript/ko.json +++ b/dashboard-ui/strings/javascript/ko.json @@ -889,7 +889,7 @@ "ButtonNo": "\uc544\ub2c8\uc624", "ButtonRestorePreviousPurchase": "\uad6c\ub9e4 \ubcf5\uc6d0", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "\ub77c\uc774\ube0c\ub7ec\ub9ac", diff --git a/dashboard-ui/strings/javascript/ms.json b/dashboard-ui/strings/javascript/ms.json index 3cafabe4b6..cc3ef87c22 100644 --- a/dashboard-ui/strings/javascript/ms.json +++ b/dashboard-ui/strings/javascript/ms.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/nb.json b/dashboard-ui/strings/javascript/nb.json index cc7294cc58..933876915a 100644 --- a/dashboard-ui/strings/javascript/nb.json +++ b/dashboard-ui/strings/javascript/nb.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/nl.json b/dashboard-ui/strings/javascript/nl.json index a3a37febd4..b2cef1e742 100644 --- a/dashboard-ui/strings/javascript/nl.json +++ b/dashboard-ui/strings/javascript/nl.json @@ -1,5 +1,5 @@ { - "LabelFromHelp": "Example: {0} (on the server)", + "LabelFromHelp": "Voorbeeld: {0} (op de server)", "SettingsSaved": "Instellingen opgeslagen.", "AddUser": "Gebruiker toevoegen", "Users": "Gebruikers", @@ -889,7 +889,7 @@ "ButtonNo": "Nee", "ButtonRestorePreviousPurchase": "Herstel aankoop", "AlreadyPaid": "Al betaald?", - "AlreadyPaidHelp1": "Als je al betaald hebt om een oudere versie van Media Browser voor Android te installeren hoef je niet opnieuw te betalen om deze app te activeren. Stuur ons een e-mail op {0} en we zullen deze voor jou activeren.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Heb je Emby Premiere? Annuleer dan gewoon deze dialoog en meld je aan in de app vanop je draaloos thuisnetwerk en deze zal automatische ontgrendeld worden.", "ButtonForYou": "Voor U", "ButtonLibrary": "Bibliotheek", diff --git a/dashboard-ui/strings/javascript/pl.json b/dashboard-ui/strings/javascript/pl.json index 80bb1ea10b..3d0a1e62e5 100644 --- a/dashboard-ui/strings/javascript/pl.json +++ b/dashboard-ui/strings/javascript/pl.json @@ -889,7 +889,7 @@ "ButtonNo": "Nie", "ButtonRestorePreviousPurchase": "Przywr\u00f3\u0107 zakup", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "Dla Ciebie", "ButtonLibrary": "Biblioteka", diff --git a/dashboard-ui/strings/javascript/pt-BR.json b/dashboard-ui/strings/javascript/pt-BR.json index ba4ff29cfe..7b74c6cee1 100644 --- a/dashboard-ui/strings/javascript/pt-BR.json +++ b/dashboard-ui/strings/javascript/pt-BR.json @@ -724,7 +724,7 @@ "ButtonParentalControl": "Controle Parental", "HeaderInvitationSent": "Convite Enviado", "MessageInvitationSentToUser": "Um email foi enviado para {0}, convidando para aceitar seu convite de compartilhamento.", - "MessageInvitationSentToNewUser": "Um email foi enviado para {0} convidando para inscrever-se no Emby.", + "MessageInvitationSentToNewUser": "Um email foi enviado para {0} convidando para registrar-se no Emby.", "HeaderConnectionFailure": "Falha na Conex\u00e3o", "MessageUnableToConnectToServer": "N\u00e3o foi poss\u00edvel conectar ao servidor selecionado. Por favor, certifique-se que esteja sendo executado e tente novamente.", "ButtonSelectServer": "Selecionar Servidor", @@ -889,7 +889,7 @@ "ButtonNo": "N\u00e3o", "ButtonRestorePreviousPurchase": "Restaurar Compra", "AlreadyPaid": "J\u00e1 Est\u00e1 Pago?", - "AlreadyPaidHelp1": "Se voc\u00ea j\u00e1 pagou para instalar uma vers\u00e3o antiga do Media Browser for Android, n\u00e3o \u00e9 necess\u00e1rio pagar novamente para ativar este app. Envie-nos um e-mail para {0} e n\u00f3s ativaremos para voc\u00ea.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Obteve o Emby Premiere? Apenas cancele este texto, entre no app dentro da sua rede WI-FI dom\u00e9stica e o app ser\u00e1 desbloqueado automaticamente.", "ButtonForYou": "Para Voc\u00ea", "ButtonLibrary": "Biblioteca", diff --git a/dashboard-ui/strings/javascript/pt-PT.json b/dashboard-ui/strings/javascript/pt-PT.json index 8955d2ed25..d22ee017fc 100644 --- a/dashboard-ui/strings/javascript/pt-PT.json +++ b/dashboard-ui/strings/javascript/pt-PT.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/ro.json b/dashboard-ui/strings/javascript/ro.json index ebfa6c8c53..040cb17523 100644 --- a/dashboard-ui/strings/javascript/ro.json +++ b/dashboard-ui/strings/javascript/ro.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/ru.json b/dashboard-ui/strings/javascript/ru.json index ae282d5931..959ba0ec6d 100644 --- a/dashboard-ui/strings/javascript/ru.json +++ b/dashboard-ui/strings/javascript/ru.json @@ -865,7 +865,7 @@ "OptionDatePlayed": "\u0414\u0430\u0442\u0430 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f", "OptionDateAdded": "\u0414\u0430\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f", "OptionPlayCount": "\u041a\u043e\u043b. \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439", - "ButtonDisconnect": "\u0420\u0430\u0437\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435", + "ButtonDisconnect": "\u0420\u0430\u0437\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f", "OptionAlbumArtist": "\u0418\u0441\u043f. \u0430\u043b\u044c\u0431\u043e\u043c\u0430", "OptionArtist": "\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c", "OptionAlbum": "\u0410\u043b\u044c\u0431\u043e\u043c", @@ -889,7 +889,7 @@ "ButtonNo": "\u041d\u0435\u0442", "ButtonRestorePreviousPurchase": "\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435", "AlreadyPaid": "\u0423\u0436\u0435 \u043e\u043f\u043b\u0430\u0442\u0438\u043b\u0438?", - "AlreadyPaidHelp1": "\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u043b\u0438 \u0437\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Media Browser for Android, \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0441\u043d\u043e\u0432\u0430, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043d\u0430\u043c \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0430 {0}, \u0438 \u043c\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0434\u043b\u044f \u0432\u0430\u0441.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "\u041f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0438 Emby Premiere? \u041f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u0438\u0430\u043b\u043e\u0433, \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0435\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 WiF-\u0441\u0435\u0442\u0438, \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043e.", "ButtonForYou": "\u0414\u043b\u044f \u0432\u0430\u0441...", "ButtonLibrary": "\u041c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0430...", diff --git a/dashboard-ui/strings/javascript/sl-SI.json b/dashboard-ui/strings/javascript/sl-SI.json index 9c981f29c3..431770bafa 100644 --- a/dashboard-ui/strings/javascript/sl-SI.json +++ b/dashboard-ui/strings/javascript/sl-SI.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/sv.json b/dashboard-ui/strings/javascript/sv.json index ad3f88d042..a598c91025 100644 --- a/dashboard-ui/strings/javascript/sv.json +++ b/dashboard-ui/strings/javascript/sv.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/tr.json b/dashboard-ui/strings/javascript/tr.json index bf37523502..897d6ca7b9 100644 --- a/dashboard-ui/strings/javascript/tr.json +++ b/dashboard-ui/strings/javascript/tr.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/uk.json b/dashboard-ui/strings/javascript/uk.json index f833957ba4..de80bd2f49 100644 --- a/dashboard-ui/strings/javascript/uk.json +++ b/dashboard-ui/strings/javascript/uk.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/vi.json b/dashboard-ui/strings/javascript/vi.json index 28094f792f..aa4298f67c 100644 --- a/dashboard-ui/strings/javascript/vi.json +++ b/dashboard-ui/strings/javascript/vi.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/zh-CN.json b/dashboard-ui/strings/javascript/zh-CN.json index 7907dec544..6b1a08138c 100644 --- a/dashboard-ui/strings/javascript/zh-CN.json +++ b/dashboard-ui/strings/javascript/zh-CN.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/strings/javascript/zh-HK.json b/dashboard-ui/strings/javascript/zh-HK.json index 088694b3de..73a4342857 100644 --- a/dashboard-ui/strings/javascript/zh-HK.json +++ b/dashboard-ui/strings/javascript/zh-HK.json @@ -889,7 +889,7 @@ "ButtonNo": "\u5426", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "\u5a92\u9ad4\u5eab", diff --git a/dashboard-ui/strings/javascript/zh-TW.json b/dashboard-ui/strings/javascript/zh-TW.json index 60948b281f..05bdaa25e9 100644 --- a/dashboard-ui/strings/javascript/zh-TW.json +++ b/dashboard-ui/strings/javascript/zh-TW.json @@ -889,7 +889,7 @@ "ButtonNo": "No", "ButtonRestorePreviousPurchase": "Restore Purchase", "AlreadyPaid": "Already Paid?", - "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Send us an email at {0} and we'll get it activated for you.", + "AlreadyPaidHelp1": "If you already paid to install an older version of Media Browser for Android, you don't need to pay again in order to activate this app. Click OK to send us an email at {0} and we'll get it activated for you.", "AlreadyPaidHelp2": "Got Emby Premiere? Just cancel this dialog, sign into the app from within your home WIFI network, and it will be unlocked automatically.", "ButtonForYou": "For You", "ButtonLibrary": "Library", diff --git a/dashboard-ui/thirdparty/jquery.unveil-custom.js b/dashboard-ui/thirdparty/jquery.unveil-custom.js index 97ec2a3549..361f61fe41 100644 --- a/dashboard-ui/thirdparty/jquery.unveil-custom.js +++ b/dashboard-ui/thirdparty/jquery.unveil-custom.js @@ -1,4 +1,4 @@ -define(['visibleinviewport'], function (visibleInViewport) { +define(['visibleinviewport', 'imageloader'], function (visibleInViewport, imageLoader) { var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel'); var thresholdX = screen.availWidth; @@ -11,11 +11,27 @@ function fillImage(elem) { var source = elem.getAttribute('data-src'); if (source) { - ImageStore.setImageInto(elem, source); + imageLoader.loadImage(elem, source).then(fadeIn); elem.setAttribute("data-src", ''); } } + function fadeIn(elem) { + + if (!browserInfo.animate || browserInfo.mobile) { + return; + } + if (elem.classList.contains('noFade')) { + return; + } + + var keyframes = [ + { opacity: '0', offset: 0 }, + { opacity: '1', offset: 1 }]; + var timing = { duration: 300, iterations: 1 }; + elem.animate(keyframes, timing); + } + function cancelAll(tokens) { for (var i = 0, length = tokens.length; i < length; i++) { @@ -90,11 +106,7 @@ for (var i = 0, length = elems.length; i < length; i++) { var elem = elems[0]; - var source = elem.getAttribute('data-src'); - if (source) { - ImageStore.setImageInto(elem, source); - elem.setAttribute("data-src", ''); - } + fillImage(elem); } } @@ -109,36 +121,6 @@ fillImages([elem]); } - function setImageIntoElement(elem, url) { - - if (elem.tagName !== "IMG") { - - elem.style.backgroundImage = "url('" + url + "')"; - - } else { - elem.setAttribute("src", url); - } - - if (browserInfo.animate && !browserInfo.mobile) { - if (!elem.classList.contains('noFade')) { - fadeIn(elem, 1); - } - } - } - - function fadeIn(elem, iterations) { - - var keyframes = [ - { opacity: '0', offset: 0 }, - { opacity: '1', offset: 1 }]; - var timing = { duration: 200, iterations: iterations }; - return elem.animate(keyframes, timing); - } - - window.ImageStore = { - setImageInto: setImageIntoElement - }; - window.ImageLoader = { fillImages: fillImages, lazyImage: lazyImage,