hls.js 1.5.12 → 1.5.13-0.canary.10403
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 +4 -3
- package/dist/hls-demo.js +41 -38
- package/dist/hls-demo.js.map +1 -1
- package/dist/hls.js +4174 -2625
- package/dist/hls.js.d.ts +173 -108
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +2851 -1914
- 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 +2560 -1608
- 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 +3546 -1982
- 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 +38 -38
- package/src/config.ts +5 -2
- package/src/controller/abr-controller.ts +39 -25
- package/src/controller/audio-stream-controller.ts +141 -137
- package/src/controller/audio-track-controller.ts +1 -1
- package/src/controller/base-playlist-controller.ts +27 -10
- package/src/controller/base-stream-controller.ts +215 -82
- package/src/controller/buffer-controller.ts +250 -97
- package/src/controller/buffer-operation-queue.ts +16 -19
- package/src/controller/cap-level-controller.ts +3 -2
- package/src/controller/cmcd-controller.ts +51 -14
- package/src/controller/content-steering-controller.ts +29 -15
- package/src/controller/eme-controller.ts +10 -23
- package/src/controller/error-controller.ts +28 -22
- package/src/controller/fps-controller.ts +8 -3
- package/src/controller/fragment-finders.ts +44 -16
- package/src/controller/fragment-tracker.ts +58 -25
- package/src/controller/gap-controller.ts +43 -16
- package/src/controller/id3-track-controller.ts +45 -35
- package/src/controller/latency-controller.ts +18 -13
- package/src/controller/level-controller.ts +37 -19
- package/src/controller/stream-controller.ts +100 -83
- package/src/controller/subtitle-stream-controller.ts +35 -47
- package/src/controller/subtitle-track-controller.ts +5 -3
- package/src/controller/timeline-controller.ts +20 -22
- package/src/crypt/aes-crypto.ts +21 -2
- package/src/crypt/decrypter-aes-mode.ts +4 -0
- package/src/crypt/decrypter.ts +32 -16
- package/src/crypt/fast-aes-key.ts +28 -5
- package/src/demux/audio/aacdemuxer.ts +2 -2
- package/src/demux/audio/ac3-demuxer.ts +4 -3
- package/src/demux/audio/adts.ts +9 -4
- package/src/demux/audio/base-audio-demuxer.ts +16 -14
- package/src/demux/audio/mp3demuxer.ts +4 -3
- package/src/demux/audio/mpegaudio.ts +1 -1
- package/src/demux/mp4demuxer.ts +7 -7
- package/src/demux/sample-aes.ts +2 -0
- package/src/demux/transmuxer-interface.ts +8 -16
- package/src/demux/transmuxer-worker.ts +4 -4
- package/src/demux/transmuxer.ts +16 -3
- package/src/demux/tsdemuxer.ts +75 -38
- package/src/demux/video/avc-video-parser.ts +210 -121
- package/src/demux/video/base-video-parser.ts +135 -2
- package/src/demux/video/exp-golomb.ts +0 -208
- package/src/demux/video/hevc-video-parser.ts +749 -0
- package/src/events.ts +8 -1
- package/src/exports-named.ts +1 -1
- package/src/hls.ts +73 -43
- package/src/loader/date-range.ts +71 -5
- package/src/loader/fragment-loader.ts +23 -21
- package/src/loader/fragment.ts +8 -4
- package/src/loader/key-loader.ts +3 -1
- package/src/loader/level-details.ts +6 -6
- package/src/loader/level-key.ts +10 -9
- package/src/loader/m3u8-parser.ts +138 -144
- package/src/loader/playlist-loader.ts +5 -7
- package/src/remux/mp4-generator.ts +196 -1
- package/src/remux/mp4-remuxer.ts +36 -16
- package/src/remux/passthrough-remuxer.ts +1 -1
- package/src/task-loop.ts +5 -2
- package/src/types/component-api.ts +3 -1
- package/src/types/demuxer.ts +3 -0
- package/src/types/events.ts +19 -6
- package/src/types/fragment-tracker.ts +2 -2
- package/src/types/media-playlist.ts +9 -1
- package/src/types/remuxer.ts +1 -1
- package/src/utils/attr-list.ts +96 -9
- package/src/utils/buffer-helper.ts +12 -31
- package/src/utils/cea-608-parser.ts +1 -3
- package/src/utils/codecs.ts +34 -5
- package/src/utils/encryption-methods-util.ts +21 -0
- package/src/utils/fetch-loader.ts +1 -1
- package/src/utils/hash.ts +10 -0
- package/src/utils/hdr.ts +4 -7
- package/src/utils/imsc1-ttml-parser.ts +1 -1
- package/src/utils/keysystem-util.ts +1 -6
- package/src/utils/level-helper.ts +71 -44
- package/src/utils/logger.ts +58 -23
- package/src/utils/mp4-tools.ts +5 -3
- package/src/utils/rendition-helper.ts +100 -74
- package/src/utils/utf8-utils.ts +18 -0
- package/src/utils/variable-substitution.ts +0 -19
- package/src/utils/webvtt-parser.ts +2 -12
- package/src/demux/id3.ts +0 -411
- package/src/types/general.ts +0 -6
package/README.md
CHANGED
@@ -37,6 +37,7 @@ 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
|
40
41
|
- ISO/IEC 13818-7 ADTS AAC Elementary Stream
|
41
42
|
- ISO/IEC 11172-3 / ISO/IEC 13818-3 (MPEG-1/2 Audio Layer III) Elementary Stream
|
42
43
|
- ATSC A/52 / AC-3 / Dolby Digital Elementary Stream
|
@@ -302,11 +303,11 @@ HLS.js is supported on:
|
|
302
303
|
- Edge for Windows 10+
|
303
304
|
- Safari 9+ for macOS 10.11+
|
304
305
|
- Safari for iPadOS 13+
|
305
|
-
- Safari for iOS 17.1+
|
306
|
+
- Safari for iOS 17.1+ since HLS version [1.5.0](https://github.com/video-dev/hls.js/releases/tag/v1.5.0) using Managed Media Source (MMS) [WebKit blog](https://webkit.org/blog/14735/webkit-features-in-safari-17-1/)
|
306
307
|
|
307
308
|
A [Promise polyfill](https://github.com/taylorhakes/promise-polyfill) is required in browsers missing native promise support.
|
308
309
|
|
309
|
-
**Please note:**
|
310
|
+
**Please note:**
|
310
311
|
|
311
312
|
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.
|
312
313
|
|
@@ -438,7 +439,7 @@ The following players integrate HLS.js for HLS playback:
|
|
438
439
|
| [<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/) |
|
439
440
|
| [<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/) |
|
440
441
|
| [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) |
|
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/) |
|
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/) | [<img src="https://static.rutube.ru/static/img/svg/logo_rutube_black_color_154x25.svg" width="120">](https://rutube.ru/) | |
|
442
443
|
|
443
444
|
## Chrome/Firefox integration
|
444
445
|
|
package/dist/hls-demo.js
CHANGED
@@ -249,6 +249,22 @@
|
|
249
249
|
url: 'https://hlsjs-test-streams-wistia.s3.amazonaws.com/start-delimiter.m3u8',
|
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
|
+
},
|
253
|
+
aes256: {
|
254
|
+
url: 'https://jvaryhlstests.blob.core.windows.net/hlstestdata/playlist_encrypted.m3u8',
|
255
|
+
description: 'aes-256 and aes-256-ctr full segment encryption',
|
256
|
+
abr: false
|
257
|
+
},
|
258
|
+
mpegTsHevcHls: {
|
259
|
+
url: 'https://devoldemar.github.io/streams/hls/bipbop/hevc.m3u8',
|
260
|
+
description: 'Advanced stream (HEVC Main 10, MPEG-TS segments)',
|
261
|
+
skipFunctionalTests: true
|
262
|
+
},
|
263
|
+
mpegTsBitmovinHevc: {
|
264
|
+
url: 'https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v720p_ts.m3u8',
|
265
|
+
description: 'HLS M2TS by Bitmovin (HEVC Main, many NALUs overflowing PESes, video only)',
|
266
|
+
abr: false,
|
267
|
+
skipFunctionalTests: true
|
252
268
|
}
|
253
269
|
};
|
254
270
|
|
@@ -1194,50 +1210,39 @@
|
|
1194
1210
|
document.body.removeChild(textArea);
|
1195
1211
|
}
|
1196
1212
|
|
1213
|
+
function _defineProperties(e, r) {
|
1214
|
+
for (var t = 0; t < r.length; t++) {
|
1215
|
+
var o = r[t];
|
1216
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
1217
|
+
}
|
1218
|
+
}
|
1219
|
+
function _createClass(e, r, t) {
|
1220
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
1221
|
+
writable: !1
|
1222
|
+
}), e;
|
1223
|
+
}
|
1224
|
+
function _extends() {
|
1225
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
1226
|
+
for (var e = 1; e < arguments.length; e++) {
|
1227
|
+
var t = arguments[e];
|
1228
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
1229
|
+
}
|
1230
|
+
return n;
|
1231
|
+
}, _extends.apply(null, arguments);
|
1232
|
+
}
|
1197
1233
|
function _toPrimitive(t, r) {
|
1198
1234
|
if ("object" != typeof t || !t) return t;
|
1199
1235
|
var e = t[Symbol.toPrimitive];
|
1200
1236
|
if (void 0 !== e) {
|
1201
|
-
var i = e.call(t, r
|
1237
|
+
var i = e.call(t, r );
|
1202
1238
|
if ("object" != typeof i) return i;
|
1203
1239
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1204
1240
|
}
|
1205
|
-
return (
|
1241
|
+
return (String )(t);
|
1206
1242
|
}
|
1207
1243
|
function _toPropertyKey(t) {
|
1208
1244
|
var i = _toPrimitive(t, "string");
|
1209
|
-
return "symbol" == typeof i ? i :
|
1210
|
-
}
|
1211
|
-
function _defineProperties(target, props) {
|
1212
|
-
for (var i = 0; i < props.length; i++) {
|
1213
|
-
var descriptor = props[i];
|
1214
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
1215
|
-
descriptor.configurable = true;
|
1216
|
-
if ("value" in descriptor) descriptor.writable = true;
|
1217
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
1218
|
-
}
|
1219
|
-
}
|
1220
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
1221
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
1222
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
1223
|
-
Object.defineProperty(Constructor, "prototype", {
|
1224
|
-
writable: false
|
1225
|
-
});
|
1226
|
-
return Constructor;
|
1227
|
-
}
|
1228
|
-
function _extends() {
|
1229
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
1230
|
-
for (var i = 1; i < arguments.length; i++) {
|
1231
|
-
var source = arguments[i];
|
1232
|
-
for (var key in source) {
|
1233
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1234
|
-
target[key] = source[key];
|
1235
|
-
}
|
1236
|
-
}
|
1237
|
-
}
|
1238
|
-
return target;
|
1239
|
-
};
|
1240
|
-
return _extends.apply(this, arguments);
|
1245
|
+
return "symbol" == typeof i ? i : i + "";
|
1241
1246
|
}
|
1242
1247
|
|
1243
1248
|
var Chart$1 = {exports: {}};
|
@@ -4456,8 +4461,7 @@
|
|
4456
4461
|
i;
|
4457
4462
|
for (i = 0; i < len; i++) {
|
4458
4463
|
if (
|
4459
|
-
(
|
4460
|
-
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
|
4464
|
+
(toInt(array1[i]) !== toInt(array2[i]))
|
4461
4465
|
) {
|
4462
4466
|
diffs++;
|
4463
4467
|
}
|
@@ -23978,7 +23982,7 @@
|
|
23978
23982
|
ctx.stroke();
|
23979
23983
|
}
|
23980
23984
|
};
|
23981
|
-
_createClass(TimelineChart, [{
|
23985
|
+
return _createClass(TimelineChart, [{
|
23982
23986
|
key: "chartScales",
|
23983
23987
|
get: function get() {
|
23984
23988
|
return this.chart.scales;
|
@@ -24015,7 +24019,6 @@
|
|
24015
24019
|
}
|
24016
24020
|
}
|
24017
24021
|
}]);
|
24018
|
-
return TimelineChart;
|
24019
24022
|
}();
|
24020
24023
|
function stripDeliveryDirectives(url) {
|
24021
24024
|
if (url === '') {
|