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.
Files changed (109) hide show
  1. package/README.md +3 -4
  2. package/dist/hls-demo.js +38 -41
  3. package/dist/hls-demo.js.map +1 -1
  4. package/dist/hls.js +2911 -4558
  5. package/dist/hls.js.d.ts +112 -186
  6. package/dist/hls.js.map +1 -1
  7. package/dist/hls.light.js +2291 -3311
  8. package/dist/hls.light.js.map +1 -1
  9. package/dist/hls.light.min.js +1 -1
  10. package/dist/hls.light.min.js.map +1 -1
  11. package/dist/hls.light.mjs +1813 -2835
  12. package/dist/hls.light.mjs.map +1 -1
  13. package/dist/hls.min.js +1 -1
  14. package/dist/hls.min.js.map +1 -1
  15. package/dist/hls.mjs +4707 -6356
  16. package/dist/hls.mjs.map +1 -1
  17. package/dist/hls.worker.js +1 -1
  18. package/dist/hls.worker.js.map +1 -1
  19. package/package.json +42 -42
  20. package/src/config.ts +2 -5
  21. package/src/controller/abr-controller.ts +25 -39
  22. package/src/controller/audio-stream-controller.ts +136 -156
  23. package/src/controller/audio-track-controller.ts +1 -1
  24. package/src/controller/base-playlist-controller.ts +10 -27
  25. package/src/controller/base-stream-controller.ts +107 -263
  26. package/src/controller/buffer-controller.ts +97 -250
  27. package/src/controller/buffer-operation-queue.ts +19 -16
  28. package/src/controller/cap-level-controller.ts +2 -3
  29. package/src/controller/cmcd-controller.ts +14 -51
  30. package/src/controller/content-steering-controller.ts +15 -29
  31. package/src/controller/eme-controller.ts +23 -10
  32. package/src/controller/error-controller.ts +22 -28
  33. package/src/controller/fps-controller.ts +3 -8
  34. package/src/controller/fragment-finders.ts +16 -44
  35. package/src/controller/fragment-tracker.ts +25 -58
  36. package/src/controller/gap-controller.ts +16 -43
  37. package/src/controller/id3-track-controller.ts +35 -45
  38. package/src/controller/latency-controller.ts +13 -18
  39. package/src/controller/level-controller.ts +19 -37
  40. package/src/controller/stream-controller.ts +83 -100
  41. package/src/controller/subtitle-stream-controller.ts +47 -35
  42. package/src/controller/subtitle-track-controller.ts +3 -5
  43. package/src/controller/timeline-controller.ts +22 -20
  44. package/src/crypt/aes-crypto.ts +2 -21
  45. package/src/crypt/decrypter.ts +16 -32
  46. package/src/crypt/fast-aes-key.ts +5 -28
  47. package/src/demux/audio/aacdemuxer.ts +5 -5
  48. package/src/demux/audio/ac3-demuxer.ts +4 -5
  49. package/src/demux/audio/adts.ts +4 -9
  50. package/src/demux/audio/base-audio-demuxer.ts +15 -21
  51. package/src/demux/audio/mp3demuxer.ts +3 -4
  52. package/src/demux/audio/mpegaudio.ts +1 -1
  53. package/src/demux/id3.ts +411 -0
  54. package/src/demux/inject-worker.ts +4 -38
  55. package/src/demux/mp4demuxer.ts +8 -17
  56. package/src/demux/sample-aes.ts +0 -2
  57. package/src/demux/transmuxer-interface.ts +83 -106
  58. package/src/demux/transmuxer-worker.ts +77 -111
  59. package/src/demux/transmuxer.ts +22 -46
  60. package/src/demux/tsdemuxer.ts +65 -131
  61. package/src/demux/video/avc-video-parser.ts +156 -219
  62. package/src/demux/video/base-video-parser.ts +9 -133
  63. package/src/demux/video/exp-golomb.ts +208 -0
  64. package/src/errors.ts +0 -2
  65. package/src/events.ts +1 -8
  66. package/src/exports-named.ts +1 -1
  67. package/src/hls.ts +48 -97
  68. package/src/loader/date-range.ts +5 -71
  69. package/src/loader/fragment-loader.ts +21 -23
  70. package/src/loader/fragment.ts +4 -8
  71. package/src/loader/key-loader.ts +1 -3
  72. package/src/loader/level-details.ts +6 -6
  73. package/src/loader/level-key.ts +9 -10
  74. package/src/loader/m3u8-parser.ts +144 -138
  75. package/src/loader/playlist-loader.ts +7 -5
  76. package/src/remux/mp4-generator.ts +1 -196
  77. package/src/remux/mp4-remuxer.ts +84 -55
  78. package/src/remux/passthrough-remuxer.ts +8 -23
  79. package/src/task-loop.ts +2 -5
  80. package/src/types/component-api.ts +1 -3
  81. package/src/types/demuxer.ts +1 -3
  82. package/src/types/events.ts +6 -19
  83. package/src/types/fragment-tracker.ts +2 -2
  84. package/src/types/general.ts +6 -0
  85. package/src/types/media-playlist.ts +1 -9
  86. package/src/types/remuxer.ts +1 -1
  87. package/src/utils/attr-list.ts +9 -96
  88. package/src/utils/buffer-helper.ts +31 -12
  89. package/src/utils/cea-608-parser.ts +3 -1
  90. package/src/utils/codecs.ts +5 -34
  91. package/src/utils/discontinuities.ts +47 -21
  92. package/src/utils/fetch-loader.ts +1 -1
  93. package/src/utils/hdr.ts +7 -4
  94. package/src/utils/imsc1-ttml-parser.ts +1 -1
  95. package/src/utils/keysystem-util.ts +6 -1
  96. package/src/utils/level-helper.ts +44 -71
  97. package/src/utils/logger.ts +23 -58
  98. package/src/utils/mp4-tools.ts +3 -5
  99. package/src/utils/rendition-helper.ts +74 -100
  100. package/src/utils/variable-substitution.ts +19 -0
  101. package/src/utils/webvtt-parser.ts +12 -2
  102. package/dist/hls.d.mts +0 -3179
  103. package/dist/hls.d.ts +0 -3179
  104. package/src/crypt/decrypter-aes-mode.ts +0 -4
  105. package/src/demux/video/hevc-video-parser.ts +0 -718
  106. package/src/utils/encryption-methods-util.ts +0 -21
  107. package/src/utils/hash.ts +0 -10
  108. package/src/utils/utf8-utils.ts +0 -18
  109. package/src/version.ts +0 -1
@@ -1,21 +0,0 @@
1
- import { DecrypterAesMode } from '../crypt/decrypter-aes-mode';
2
-
3
- export function isFullSegmentEncryption(method: string): boolean {
4
- return (
5
- method === 'AES-128' || method === 'AES-256' || method === 'AES-256-CTR'
6
- );
7
- }
8
-
9
- export function getAesModeFromFullSegmentMethod(
10
- method: string,
11
- ): DecrypterAesMode {
12
- switch (method) {
13
- case 'AES-128':
14
- case 'AES-256':
15
- return DecrypterAesMode.cbc;
16
- case 'AES-256-CTR':
17
- return DecrypterAesMode.ctr;
18
- default:
19
- throw new Error(`invalid full segment method ${method}`);
20
- }
21
- }
package/src/utils/hash.ts DELETED
@@ -1,10 +0,0 @@
1
- // From https://github.com/darkskyapp/string-hash
2
- export function hash(text: string) {
3
- let hash = 5381;
4
- let i = text.length;
5
- while (i) {
6
- hash = (hash * 33) ^ text.charCodeAt(--i);
7
- }
8
-
9
- return (hash >>> 0).toString();
10
- }
@@ -1,18 +0,0 @@
1
- // breaking up those two types in order to clarify what is happening in the decoding path.
2
- type DecodedFrame<T> = { key: string; data: T; info?: any };
3
- export type Frame = DecodedFrame<ArrayBuffer | string>;
4
- // http://stackoverflow.com/questions/8936984/uint8array-to-string-in-javascript/22373197
5
- // http://www.onicos.com/staff/iz/amuse/javascript/expert/utf.txt
6
- /* utf.js - UTF-8 <=> UTF-16 convertion
7
- *
8
- * Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
9
- * Version: 1.0
10
- * LastModified: Dec 25 1999
11
- * This library is free. You can redistribute it and/or modify it.
12
- */
13
-
14
- export function strToUtf8array(str: string): Uint8Array {
15
- return Uint8Array.from(unescape(encodeURIComponent(str)), (c) =>
16
- c.charCodeAt(0),
17
- );
18
- }
package/src/version.ts DELETED
@@ -1 +0,0 @@
1
- export const version = __VERSION__;