hls.js 1.5.14-0.canary.10559 → 1.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/hls-demo.js +38 -41
- package/dist/hls-demo.js.map +1 -1
- package/dist/hls.js +2911 -4558
- package/dist/hls.js.d.ts +112 -186
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +2291 -3311
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +1813 -2835
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +4707 -6356
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +42 -42
- package/src/config.ts +2 -5
- package/src/controller/abr-controller.ts +25 -39
- package/src/controller/audio-stream-controller.ts +136 -156
- package/src/controller/audio-track-controller.ts +1 -1
- package/src/controller/base-playlist-controller.ts +10 -27
- package/src/controller/base-stream-controller.ts +107 -263
- package/src/controller/buffer-controller.ts +97 -250
- package/src/controller/buffer-operation-queue.ts +19 -16
- package/src/controller/cap-level-controller.ts +2 -3
- package/src/controller/cmcd-controller.ts +14 -51
- package/src/controller/content-steering-controller.ts +15 -29
- package/src/controller/eme-controller.ts +23 -10
- package/src/controller/error-controller.ts +22 -28
- package/src/controller/fps-controller.ts +3 -8
- package/src/controller/fragment-finders.ts +16 -44
- package/src/controller/fragment-tracker.ts +25 -58
- package/src/controller/gap-controller.ts +16 -43
- package/src/controller/id3-track-controller.ts +35 -45
- package/src/controller/latency-controller.ts +13 -18
- package/src/controller/level-controller.ts +19 -37
- package/src/controller/stream-controller.ts +83 -100
- package/src/controller/subtitle-stream-controller.ts +47 -35
- package/src/controller/subtitle-track-controller.ts +3 -5
- package/src/controller/timeline-controller.ts +22 -20
- package/src/crypt/aes-crypto.ts +2 -21
- package/src/crypt/decrypter.ts +16 -32
- package/src/crypt/fast-aes-key.ts +5 -28
- package/src/demux/audio/aacdemuxer.ts +5 -5
- package/src/demux/audio/ac3-demuxer.ts +4 -5
- package/src/demux/audio/adts.ts +4 -9
- package/src/demux/audio/base-audio-demuxer.ts +15 -21
- package/src/demux/audio/mp3demuxer.ts +3 -4
- package/src/demux/audio/mpegaudio.ts +1 -1
- package/src/demux/id3.ts +411 -0
- package/src/demux/inject-worker.ts +4 -38
- package/src/demux/mp4demuxer.ts +8 -17
- package/src/demux/sample-aes.ts +0 -2
- package/src/demux/transmuxer-interface.ts +83 -106
- package/src/demux/transmuxer-worker.ts +77 -111
- package/src/demux/transmuxer.ts +22 -46
- package/src/demux/tsdemuxer.ts +65 -131
- package/src/demux/video/avc-video-parser.ts +156 -219
- package/src/demux/video/base-video-parser.ts +9 -133
- package/src/demux/video/exp-golomb.ts +208 -0
- package/src/errors.ts +0 -2
- package/src/events.ts +1 -8
- package/src/exports-named.ts +1 -1
- package/src/hls.ts +48 -97
- package/src/loader/date-range.ts +5 -71
- package/src/loader/fragment-loader.ts +21 -23
- package/src/loader/fragment.ts +4 -8
- package/src/loader/key-loader.ts +1 -3
- package/src/loader/level-details.ts +6 -6
- package/src/loader/level-key.ts +9 -10
- package/src/loader/m3u8-parser.ts +144 -138
- package/src/loader/playlist-loader.ts +7 -5
- package/src/remux/mp4-generator.ts +1 -196
- package/src/remux/mp4-remuxer.ts +84 -55
- package/src/remux/passthrough-remuxer.ts +8 -23
- package/src/task-loop.ts +2 -5
- package/src/types/component-api.ts +1 -3
- package/src/types/demuxer.ts +1 -3
- package/src/types/events.ts +6 -19
- package/src/types/fragment-tracker.ts +2 -2
- package/src/types/general.ts +6 -0
- package/src/types/media-playlist.ts +1 -9
- package/src/types/remuxer.ts +1 -1
- package/src/utils/attr-list.ts +9 -96
- package/src/utils/buffer-helper.ts +31 -12
- package/src/utils/cea-608-parser.ts +3 -1
- package/src/utils/codecs.ts +5 -34
- package/src/utils/discontinuities.ts +47 -21
- package/src/utils/fetch-loader.ts +1 -1
- package/src/utils/hdr.ts +7 -4
- package/src/utils/imsc1-ttml-parser.ts +1 -1
- package/src/utils/keysystem-util.ts +6 -1
- package/src/utils/level-helper.ts +44 -71
- package/src/utils/logger.ts +23 -58
- package/src/utils/mp4-tools.ts +3 -5
- package/src/utils/rendition-helper.ts +74 -100
- package/src/utils/variable-substitution.ts +19 -0
- package/src/utils/webvtt-parser.ts +12 -2
- package/dist/hls.d.mts +0 -3179
- package/dist/hls.d.ts +0 -3179
- package/src/crypt/decrypter-aes-mode.ts +0 -4
- package/src/demux/video/hevc-video-parser.ts +0 -718
- package/src/utils/encryption-methods-util.ts +0 -21
- package/src/utils/hash.ts +0 -10
- package/src/utils/utf8-utils.ts +0 -18
- package/src/version.ts +0 -1
package/README.md
CHANGED
@@ -37,7 +37,6 @@ HLS.js is written in [ECMAScript6] (`*.js`) and [TypeScript] (`*.ts`) (strongly
|
|
37
37
|
- Fragmented MP4 container
|
38
38
|
- MPEG-2 TS container
|
39
39
|
- ITU-T Rec. H.264 and ISO/IEC 14496-10 Elementary Stream
|
40
|
-
- ITU-T Rec. H.265 and ISO/IEC 23008-2 Elementary Stream
|
41
40
|
- ISO/IEC 13818-7 ADTS AAC Elementary Stream
|
42
41
|
- ISO/IEC 11172-3 / ISO/IEC 13818-3 (MPEG-1/2 Audio Layer III) Elementary Stream
|
43
42
|
- ATSC A/52 / AC-3 / Dolby Digital Elementary Stream
|
@@ -303,11 +302,11 @@ HLS.js is supported on:
|
|
303
302
|
- Edge for Windows 10+
|
304
303
|
- Safari 9+ for macOS 10.11+
|
305
304
|
- Safari for iPadOS 13+
|
306
|
-
- Safari for iOS 17.1+
|
305
|
+
- Safari for iOS 17.1+
|
307
306
|
|
308
307
|
A [Promise polyfill](https://github.com/taylorhakes/promise-polyfill) is required in browsers missing native promise support.
|
309
308
|
|
310
|
-
**Please note:**
|
309
|
+
**Please note:** iOS Safari on iPhone does not support the MediaSource API. This includes all browsers on iOS as well as apps using UIWebView and WKWebView.
|
311
310
|
|
312
311
|
Safari browsers (iOS, iPadOS, and macOS) have built-in HLS support through the plain video "tag" source URL. See the example below (Using HLS.js) to run appropriate feature detection and choose between using HLS.js or natively built-in HLS support.
|
313
312
|
|
@@ -439,7 +438,7 @@ The following players integrate HLS.js for HLS playback:
|
|
439
438
|
| [<img src="https://player.mtvnservices.com/edge/hosted/Viacom_logo.svg" width="120">](https://www.viacom.com/) | [<img src="https://user-images.githubusercontent.com/1181974/29248959-efabc440-802d-11e7-8050-7c1f4ca6c607.png" width="120">](https://vk.com/) | [<img src="https://avatars0.githubusercontent.com/u/5090060?s=200&v=4" width="120">](https://www.jwplayer.com) | [<img src="https://raw.githubusercontent.com/kaltura/kaltura-player-js/master/docs/images/kaltura-logo.svg" width="120">](https://corp.kaltura.com/) |
|
440
439
|
| [<img src="https://showmax.akamaized.net/e/logo/showmax_black.png" width="120">](https://tech.showmax.com) | [<img src="https://static3.1tv.ru/assets/web/logo-ac67852f1625b338f9d1fb96be089d03557d50bfc5790d5f48dc56799f59dec6.svg" width="120" height="120">](https://www.1tv.ru/) | [<img src="https://user-images.githubusercontent.com/1480052/40482633-c013ebce-5f55-11e8-96d5-b776415de0ce.png" width="120">](https://www.zdf.de) | [<img src="https://cms-static.brid.tv/img/brid-logo-120x120.jpg" width="120">](https://www.brid.tv/) |
|
441
440
|
| [cdn77](https://streaming.cdn77.com/) | [<img src="https://avatars0.githubusercontent.com/u/7442371?s=200&v=4" width="120">](https://r7.com/) | [<img src="https://raw.githubusercontent.com/Novage/p2p-media-loader/gh-pages/images/p2pml-logo.png" width="120">](https://github.com/Novage/p2p-media-loader) | [<img src="https://avatars3.githubusercontent.com/u/45617200?s=400" width="120">](https://kayosports.com.au) |
|
442
|
-
| [<img src="https://avatars1.githubusercontent.com/u/5279615?s=400&u=9771a216836c613f1edf4afe71cfc69d4c5657ed&v=4" width="120">](https://flosports.tv) | [<img src="https://www.logolynx.com/images/logolynx/c6/c67a2cb3ad33a82b5518f8ad8f124703.png" width="120">](https://global.axon.com/) |
|
441
|
+
| [<img src="https://avatars1.githubusercontent.com/u/5279615?s=400&u=9771a216836c613f1edf4afe71cfc69d4c5657ed&v=4" width="120">](https://flosports.tv) | [<img src="https://www.logolynx.com/images/logolynx/c6/c67a2cb3ad33a82b5518f8ad8f124703.png" width="120">](https://global.axon.com/) | | |
|
443
442
|
|
444
443
|
## Chrome/Firefox integration
|
445
444
|
|
package/dist/hls-demo.js
CHANGED
@@ -250,22 +250,6 @@
|
|
250
250
|
description: "A stream with the start delimiter overlapping between PES packets.\n Related to https://github.com/video-dev/hls.js/issues/3834, where Apple Silicon chips throw decoding errors if\n NAL units are not starting right at the beginning of the PES packet when using hardware accelerated decoding.",
|
251
251
|
abr: false,
|
252
252
|
skipFunctionalTests: true
|
253
|
-
},
|
254
|
-
aes256: {
|
255
|
-
url: 'https://jvaryhlstests.blob.core.windows.net/hlstestdata/playlist_encrypted.m3u8',
|
256
|
-
description: 'aes-256 and aes-256-ctr full segment encryption',
|
257
|
-
abr: false
|
258
|
-
},
|
259
|
-
mpegTsHevcHls: {
|
260
|
-
url: 'https://devoldemar.github.io/streams/hls/bipbop/hevc.m3u8',
|
261
|
-
description: 'Advanced stream (HEVC Main 10, MPEG-TS segments)',
|
262
|
-
skipFunctionalTests: true
|
263
|
-
},
|
264
|
-
mpegTsBitmovinHevc: {
|
265
|
-
url: 'https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v720p_ts.m3u8',
|
266
|
-
description: 'HLS M2TS by Bitmovin (HEVC Main, many NALUs overflowing PESes, video only)',
|
267
|
-
abr: false,
|
268
|
-
skipFunctionalTests: true
|
269
253
|
}
|
270
254
|
};
|
271
255
|
|
@@ -1211,39 +1195,50 @@
|
|
1211
1195
|
document.body.removeChild(textArea);
|
1212
1196
|
}
|
1213
1197
|
|
1214
|
-
function _defineProperties(e, r) {
|
1215
|
-
for (var t = 0; t < r.length; t++) {
|
1216
|
-
var o = r[t];
|
1217
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
1218
|
-
}
|
1219
|
-
}
|
1220
|
-
function _createClass(e, r, t) {
|
1221
|
-
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
1222
|
-
writable: !1
|
1223
|
-
}), e;
|
1224
|
-
}
|
1225
|
-
function _extends() {
|
1226
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
1227
|
-
for (var e = 1; e < arguments.length; e++) {
|
1228
|
-
var t = arguments[e];
|
1229
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
1230
|
-
}
|
1231
|
-
return n;
|
1232
|
-
}, _extends.apply(null, arguments);
|
1233
|
-
}
|
1234
1198
|
function _toPrimitive(t, r) {
|
1235
1199
|
if ("object" != typeof t || !t) return t;
|
1236
1200
|
var e = t[Symbol.toPrimitive];
|
1237
1201
|
if (void 0 !== e) {
|
1238
|
-
var i = e.call(t, r);
|
1202
|
+
var i = e.call(t, r || "default");
|
1239
1203
|
if ("object" != typeof i) return i;
|
1240
1204
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1241
1205
|
}
|
1242
|
-
return (String )(t);
|
1206
|
+
return ("string" === r ? String : Number)(t);
|
1243
1207
|
}
|
1244
1208
|
function _toPropertyKey(t) {
|
1245
1209
|
var i = _toPrimitive(t, "string");
|
1246
|
-
return "symbol" == typeof i ? i : i
|
1210
|
+
return "symbol" == typeof i ? i : String(i);
|
1211
|
+
}
|
1212
|
+
function _defineProperties(target, props) {
|
1213
|
+
for (var i = 0; i < props.length; i++) {
|
1214
|
+
var descriptor = props[i];
|
1215
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
1216
|
+
descriptor.configurable = true;
|
1217
|
+
if ("value" in descriptor) descriptor.writable = true;
|
1218
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
1219
|
+
}
|
1220
|
+
}
|
1221
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
1222
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
1223
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
1224
|
+
Object.defineProperty(Constructor, "prototype", {
|
1225
|
+
writable: false
|
1226
|
+
});
|
1227
|
+
return Constructor;
|
1228
|
+
}
|
1229
|
+
function _extends() {
|
1230
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
1231
|
+
for (var i = 1; i < arguments.length; i++) {
|
1232
|
+
var source = arguments[i];
|
1233
|
+
for (var key in source) {
|
1234
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1235
|
+
target[key] = source[key];
|
1236
|
+
}
|
1237
|
+
}
|
1238
|
+
}
|
1239
|
+
return target;
|
1240
|
+
};
|
1241
|
+
return _extends.apply(this, arguments);
|
1247
1242
|
}
|
1248
1243
|
|
1249
1244
|
var Chart$1 = {exports: {}};
|
@@ -4462,7 +4457,8 @@
|
|
4462
4457
|
i;
|
4463
4458
|
for (i = 0; i < len; i++) {
|
4464
4459
|
if (
|
4465
|
-
(
|
4460
|
+
(dontConvert && array1[i] !== array2[i]) ||
|
4461
|
+
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
|
4466
4462
|
) {
|
4467
4463
|
diffs++;
|
4468
4464
|
}
|
@@ -23983,7 +23979,7 @@
|
|
23983
23979
|
ctx.stroke();
|
23984
23980
|
}
|
23985
23981
|
};
|
23986
|
-
|
23982
|
+
_createClass(TimelineChart, [{
|
23987
23983
|
key: "chartScales",
|
23988
23984
|
get: function get() {
|
23989
23985
|
return this.chart.scales;
|
@@ -24020,6 +24016,7 @@
|
|
24020
24016
|
}
|
24021
24017
|
}
|
24022
24018
|
}]);
|
24019
|
+
return TimelineChart;
|
24023
24020
|
}();
|
24024
24021
|
function stripDeliveryDirectives(url) {
|
24025
24022
|
if (url === '') {
|