@amazon/vinyl-hls-parser 1.1.1 → 2.0.0
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/dist/hlsTestAssets/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs +140 -58
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +139 -57
- package/dist/index.js.map +4 -4
- package/dist/test/benchmark.es5.js +79 -255
- package/dist/test/benchmark.js +584 -1224
- package/dist/test/benchmark.js.map +4 -4
- package/dist/types/current/index.d.ts +11 -10
- package/dist/types/current/index.d.ts.map +1 -1
- package/dist/types/current/index.js +11 -10
- package/dist/types/current/parse/parseMainPlaylist.d.ts +8 -3
- package/dist/types/current/parse/parseMainPlaylist.d.ts.map +1 -1
- package/dist/types/current/parse/parseMainPlaylist.js +43 -5
- package/dist/types/current/parse/parseMediaPlaylist.d.ts +11 -4
- package/dist/types/current/parse/parseMediaPlaylist.d.ts.map +1 -1
- package/dist/types/current/parse/parseMediaPlaylist.js +111 -7
- package/dist/types/current/tsconfig.tsbuildinfo +1 -1
- package/dist/types/current/types/AlternativeRendition.d.ts +13 -0
- package/dist/types/current/types/AlternativeRendition.d.ts.map +1 -1
- package/dist/types/current/types/HlsDateRange.d.ts +51 -0
- package/dist/types/current/types/HlsDateRange.d.ts.map +1 -0
- package/dist/types/current/types/HlsDateRange.js +11 -0
- package/dist/types/{ts4.7/types/MainPlaylist.d.ts → current/types/HlsMainPlaylist.d.ts} +4 -4
- package/dist/types/current/types/HlsMainPlaylist.d.ts.map +1 -0
- package/dist/types/{ts4.1/types/MediaPlaylist.d.ts → current/types/HlsMediaPlaylist.d.ts} +11 -4
- package/dist/types/current/types/HlsMediaPlaylist.d.ts.map +1 -0
- package/dist/types/ts3.7/index.d.ts +11 -10
- package/dist/types/ts3.7/parse/parseMainPlaylist.d.ts +8 -3
- package/dist/types/ts3.7/parse/parseMediaPlaylist.d.ts +11 -4
- package/dist/types/ts3.7/types/AlternativeRendition.d.ts +13 -0
- package/dist/types/ts3.7/types/HlsDateRange.d.ts +51 -0
- package/dist/types/ts3.7/types/{MainPlaylist.d.ts → HlsMainPlaylist.d.ts} +4 -4
- package/dist/types/ts3.7/types/{MediaPlaylist.d.ts → HlsMediaPlaylist.d.ts} +11 -4
- package/dist/types/ts4.1/index.d.ts +11 -10
- package/dist/types/ts4.1/parse/parseMainPlaylist.d.ts +8 -3
- package/dist/types/ts4.1/parse/parseMediaPlaylist.d.ts +11 -4
- package/dist/types/ts4.1/types/AlternativeRendition.d.ts +13 -0
- package/dist/types/ts4.1/types/HlsDateRange.d.ts +51 -0
- package/dist/types/{current/types/MainPlaylist.d.ts → ts4.1/types/HlsMainPlaylist.d.ts} +4 -4
- package/dist/types/{current/types/MediaPlaylist.d.ts → ts4.1/types/HlsMediaPlaylist.d.ts} +11 -4
- package/dist/types/ts4.7/index.d.ts +11 -10
- package/dist/types/ts4.7/parse/parseMainPlaylist.d.ts +8 -3
- package/dist/types/ts4.7/parse/parseMediaPlaylist.d.ts +11 -4
- package/dist/types/ts4.7/types/AlternativeRendition.d.ts +13 -0
- package/dist/types/ts4.7/types/HlsDateRange.d.ts +51 -0
- package/dist/types/{ts4.1/types/MainPlaylist.d.ts → ts4.7/types/HlsMainPlaylist.d.ts} +4 -4
- package/dist/types/ts4.7/types/{MediaPlaylist.d.ts → HlsMediaPlaylist.d.ts} +11 -4
- package/package.json +30 -19
- package/dist/test/benchmark.css +0 -71
- package/dist/test/benchmark.html +0 -67
- package/dist/test/favicon.png +0 -0
- package/dist/test/index.html +0 -61
- package/dist/test/integ.es5.js +0 -410
- package/dist/test/integ.js +0 -2127
- package/dist/test/integ.js.map +0 -7
- package/dist/test/jasmine.css +0 -304
- package/dist/test/jasmineHtml.es5.js +0 -670
- package/dist/test/jasmineHtml.js +0 -10851
- package/dist/test/jasmineHtml.js.map +0 -7
- package/dist/test/styles.css +0 -42
- package/dist/types/current/types/MainPlaylist.d.ts.map +0 -1
- package/dist/types/current/types/MediaPlaylist.d.ts.map +0 -1
- package/dist/unit/types/current/index.d.ts +0 -7
- package/dist/unit/types/current/index.d.ts.map +0 -1
- package/dist/unit/types/current/index.js +0 -6
- package/dist/unit/types/current/parse/parseAttributes.test.d.ts +0 -2
- package/dist/unit/types/current/parse/parseAttributes.test.d.ts.map +0 -1
- package/dist/unit/types/current/parse/parseAttributes.test.js +0 -70
- package/dist/unit/types/current/parse/parseMainPlaylist.test.d.ts +0 -2
- package/dist/unit/types/current/parse/parseMainPlaylist.test.d.ts.map +0 -1
- package/dist/unit/types/current/parse/parseMainPlaylist.test.js +0 -194
- package/dist/unit/types/current/parse/parseMediaPlaylist.test.d.ts +0 -2
- package/dist/unit/types/current/parse/parseMediaPlaylist.test.d.ts.map +0 -1
- package/dist/unit/types/current/parse/parseMediaPlaylist.test.js +0 -401
- package/dist/unit/types/current/parse/parseUtil.test.d.ts +0 -2
- package/dist/unit/types/current/parse/parseUtil.test.d.ts.map +0 -1
- package/dist/unit/types/current/parse/parseUtil.test.js +0 -67
- package/dist/unit/types/current/setup.d.ts +0 -2
- package/dist/unit/types/current/setup.d.ts.map +0 -1
- package/dist/unit/types/current/setup.js +0 -19
- package/dist/unit/types/current/tsconfig.tsbuildinfo +0 -1
- /package/dist/types/current/types/{MainPlaylist.js → HlsMainPlaylist.js} +0 -0
- /package/dist/types/current/types/{MediaPlaylist.js → HlsMediaPlaylist.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amazon/vinyl-hls-parser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A fast HLS manifest parser for browser and Node.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,67 +23,78 @@
|
|
|
23
23
|
">=5.4": {
|
|
24
24
|
"*": [
|
|
25
25
|
"./dist/types/current/index.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"hlsTestAssets": [
|
|
28
|
+
"./dist/hlsTestAssets/types/current/index.d.ts"
|
|
26
29
|
]
|
|
27
30
|
},
|
|
28
31
|
">=4.7": {
|
|
29
32
|
"*": [
|
|
30
33
|
"./dist/types/ts4.7/index.d.ts"
|
|
34
|
+
],
|
|
35
|
+
"hlsTestAssets": [
|
|
36
|
+
"./dist/hlsTestAssets/types/ts4.7/index.d.ts"
|
|
31
37
|
]
|
|
32
38
|
},
|
|
33
39
|
">=4.1": {
|
|
34
40
|
"*": [
|
|
35
41
|
"./dist/types/ts4.1/index.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"hlsTestAssets": [
|
|
44
|
+
"./dist/hlsTestAssets/types/ts4.1/index.d.ts"
|
|
36
45
|
]
|
|
37
46
|
},
|
|
38
47
|
">=3.7": {
|
|
39
48
|
"*": [
|
|
40
49
|
"./dist/types/ts3.7/index.d.ts"
|
|
50
|
+
],
|
|
51
|
+
"hlsTestAssets": [
|
|
52
|
+
"./dist/hlsTestAssets/types/ts3.7/index.d.ts"
|
|
41
53
|
]
|
|
42
54
|
}
|
|
43
55
|
},
|
|
44
56
|
"exports": {
|
|
45
57
|
".": {
|
|
58
|
+
"development": "./src/index.ts",
|
|
46
59
|
"types@>=5.4": "./dist/types/current/index.d.ts",
|
|
47
60
|
"types@>=4.7": "./dist/types/ts4.7/index.d.ts",
|
|
48
61
|
"require": "./dist/index.cjs",
|
|
49
62
|
"import": "./dist/index.js"
|
|
50
63
|
},
|
|
51
64
|
"./hlsTestAssets": {
|
|
65
|
+
"development": "./test/hlsTestAssets/index.ts",
|
|
66
|
+
"types@>=5.4": "./dist/hlsTestAssets/types/current/index.d.ts",
|
|
67
|
+
"types@>=4.7": "./dist/hlsTestAssets/types/ts4.7/index.d.ts",
|
|
52
68
|
"import": "./dist/hlsTestAssets/index.js"
|
|
53
69
|
}
|
|
54
70
|
},
|
|
55
71
|
"scripts": {
|
|
56
72
|
"analyzeExports": "tsx buildSrc/analyzeExports.ts",
|
|
57
73
|
"analyzeExports:write": "tsx buildSrc/analyzeExports.ts --write",
|
|
58
|
-
"clean": "rimraf --glob dist
|
|
74
|
+
"clean": "rimraf --glob dist \"**/*.tsbuildinfo\"",
|
|
59
75
|
"indexFiles:check": "tsx buildSrc/writeIndexFiles.ts --check",
|
|
60
76
|
"indexFiles:write": "tsx buildSrc/writeIndexFiles.ts",
|
|
61
77
|
"build": "tsx buildSrc/build.ts",
|
|
62
78
|
"build:release": "tsx buildSrc/build.ts --release",
|
|
63
79
|
"prettier:check": "prettier . --ignore-path ../../.prettierignore --cache --check",
|
|
64
80
|
"prettier:write": "prettier . --ignore-path ../../.prettierignore --cache --write",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"lint:write": "npm run indexFiles:write && npm run eslint:write && npm run prettier:write",
|
|
69
|
-
"validate": "npm run lint && npm run test",
|
|
70
|
-
"test": "tsx --tsconfig ../../tsconfig.flat.json ../../node_modules/jasmine/bin/jasmine --config=test/unit/jasmine.config.json",
|
|
81
|
+
"lint": "npm run indexFiles:check && npm run oxlint:check && npm run prettier:check",
|
|
82
|
+
"lint:write": "npm run indexFiles:write && npm run oxlint:write && npm run prettier:write",
|
|
83
|
+
"test": "tsx ../../node_modules/jasmine/bin/jasmine --config=test/unit/jasmine.config.json",
|
|
71
84
|
"test:coverage": "c8 npm run test",
|
|
72
|
-
"test:benchmark": "tsx
|
|
73
|
-
"test:integration": "tsx --tsconfig ../../tsconfig.flat.json ../../node_modules/jasmine/bin/jasmine test/integ/index.ts",
|
|
85
|
+
"test:benchmark": "tsx ../../node_modules/jasmine/bin/jasmine test/benchmark/index.ts",
|
|
74
86
|
"watch": "tsx buildSrc/build.ts --watch",
|
|
75
|
-
"watch:release": "tsx buildSrc/build.ts --watch --release"
|
|
87
|
+
"watch:release": "tsx buildSrc/build.ts --watch --release",
|
|
88
|
+
"oxlint:check": "oxlint --type-aware --deny-warnings",
|
|
89
|
+
"oxlint:write": "oxlint --type-aware --fix"
|
|
76
90
|
},
|
|
77
91
|
"devDependencies": {
|
|
78
|
-
"@amazon/vinyl-build-utils": "^
|
|
79
|
-
"@amazon/vinyl-jasmine-wrapper": "^
|
|
92
|
+
"@amazon/vinyl-build-utils": "^2.0.0",
|
|
93
|
+
"@amazon/vinyl-jasmine-wrapper": "^2.0.0"
|
|
80
94
|
},
|
|
81
95
|
"dependencies": {
|
|
82
|
-
"@amazon/vinyl-util": "^
|
|
83
|
-
"@amazon/vinyl-validation": "^
|
|
96
|
+
"@amazon/vinyl-util": "^2.0.0",
|
|
97
|
+
"@amazon/vinyl-validation": "^2.0.0"
|
|
84
98
|
},
|
|
85
|
-
"
|
|
86
|
-
"defaults, chrome 52, firefox 54, edge 15, safari 8"
|
|
87
|
-
],
|
|
88
|
-
"gitHead": "e5a3429d802564132b16808a5b8a8e15a023a548"
|
|
99
|
+
"gitHead": "88ece0504b080347bbea6f240cf587ee863b7ff3"
|
|
89
100
|
}
|
package/dist/test/benchmark.css
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024. Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
html,
|
|
6
|
-
body {
|
|
7
|
-
font-family: 'Roboto', sans-serif;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
h1,
|
|
11
|
-
h2,
|
|
12
|
-
h3,
|
|
13
|
-
h4,
|
|
14
|
-
h5 {
|
|
15
|
-
margin-top: 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
#benchmarkResults {
|
|
19
|
-
padding: 5px 5px 150px;
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
align-content: center;
|
|
23
|
-
width: 540px;
|
|
24
|
-
margin: 0 auto;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.benchmarkComparison {
|
|
28
|
-
margin: 20px;
|
|
29
|
-
padding: 5px;
|
|
30
|
-
border: thin solid #b4b9c7;
|
|
31
|
-
border-radius: 8px;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.benchmarkComparison > table {
|
|
37
|
-
width: 100%;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
thead,
|
|
41
|
-
tfoot {
|
|
42
|
-
background-color: #6f7893;
|
|
43
|
-
color: #fff;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
tbody {
|
|
47
|
-
background-color: #e8eaef;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
caption {
|
|
51
|
-
padding: 10px;
|
|
52
|
-
caption-side: bottom;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
table {
|
|
56
|
-
border-collapse: collapse;
|
|
57
|
-
border: thin solid rgb(220, 220, 227);
|
|
58
|
-
letter-spacing: 1px;
|
|
59
|
-
font-family: sans-serif;
|
|
60
|
-
font-size: 0.8rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
td,
|
|
64
|
-
th {
|
|
65
|
-
border: thin solid rgb(195, 195, 199);
|
|
66
|
-
padding: 5px 10px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
td {
|
|
70
|
-
text-align: center;
|
|
71
|
-
}
|
package/dist/test/benchmark.html
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
~ Copyright (c) 2024. Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
-
-->
|
|
4
|
-
|
|
5
|
-
<!doctype html>
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<meta charset="utf-8" />
|
|
9
|
-
<title>Vinyl Performance Benchmarks</title>
|
|
10
|
-
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
12
|
-
<link rel="shortcut icon" type="image/png" href="favicon.png" />
|
|
13
|
-
<link rel="stylesheet" href="jasmine.css" />
|
|
14
|
-
<link rel="stylesheet" href="benchmark.css" />
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
/**
|
|
18
|
-
* Loads a script.
|
|
19
|
-
*
|
|
20
|
-
* @param options {{
|
|
21
|
-
* src: string,
|
|
22
|
-
* module?: boolean
|
|
23
|
-
* }}
|
|
24
|
-
*/
|
|
25
|
-
function loadScript(options) {
|
|
26
|
-
const script = document.createElement('script')
|
|
27
|
-
if (options.module) script.type = 'module'
|
|
28
|
-
script.src = options.src
|
|
29
|
-
script.async = false
|
|
30
|
-
document.head.appendChild(script)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const isModernBrowser = typeof BigInt !== 'undefined'
|
|
34
|
-
|
|
35
|
-
// Detects if this is a modern es2020 browser.
|
|
36
|
-
// Otherwise, loads the es5 version.
|
|
37
|
-
if (isModernBrowser) {
|
|
38
|
-
loadScript({
|
|
39
|
-
src: 'jasmineHtml.js',
|
|
40
|
-
module: true,
|
|
41
|
-
})
|
|
42
|
-
loadScript({
|
|
43
|
-
src: 'benchmark.js',
|
|
44
|
-
module: true,
|
|
45
|
-
})
|
|
46
|
-
} else {
|
|
47
|
-
loadScript({
|
|
48
|
-
src: 'jasmineHtml.es5.js',
|
|
49
|
-
})
|
|
50
|
-
loadScript({
|
|
51
|
-
src: 'benchmark.es5.js',
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
57
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
58
|
-
<link
|
|
59
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"
|
|
60
|
-
rel="stylesheet"
|
|
61
|
-
/>
|
|
62
|
-
</head>
|
|
63
|
-
|
|
64
|
-
<body>
|
|
65
|
-
<div id="jasmineContainer"></div>
|
|
66
|
-
</body>
|
|
67
|
-
</html>
|
package/dist/test/favicon.png
DELETED
|
Binary file
|
package/dist/test/index.html
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
~ Copyright (c) 2025. Amazon.com, Inc. or its affiliates. All rights reserved.
|
|
3
|
-
-->
|
|
4
|
-
|
|
5
|
-
<!doctype html>
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<meta charset="utf-8" />
|
|
9
|
-
<title>Jasmine Spec Runner</title>
|
|
10
|
-
|
|
11
|
-
<link rel="shortcut icon" type="image/png" href="favicon.png" />
|
|
12
|
-
<link rel="stylesheet" href="styles.css" />
|
|
13
|
-
<link rel="stylesheet" href="jasmine.css" />
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
/**
|
|
17
|
-
* Loads a script.
|
|
18
|
-
*
|
|
19
|
-
* @param options {{
|
|
20
|
-
* src: string,
|
|
21
|
-
* module?: boolean
|
|
22
|
-
* }}
|
|
23
|
-
*/
|
|
24
|
-
function loadScript(options) {
|
|
25
|
-
const script = document.createElement('script')
|
|
26
|
-
if (options.module) script.type = 'module'
|
|
27
|
-
script.src = options.src
|
|
28
|
-
script.async = false
|
|
29
|
-
document.head.appendChild(script)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const isModernBrowser = typeof BigInt !== 'undefined'
|
|
33
|
-
|
|
34
|
-
// Detects if this is a modern es2020 browser.
|
|
35
|
-
// Otherwise, loads the es5 version.
|
|
36
|
-
if (isModernBrowser) {
|
|
37
|
-
loadScript({
|
|
38
|
-
src: 'jasmineHtml.js',
|
|
39
|
-
module: true,
|
|
40
|
-
})
|
|
41
|
-
loadScript({
|
|
42
|
-
src: 'integ.js',
|
|
43
|
-
module: true,
|
|
44
|
-
})
|
|
45
|
-
} else {
|
|
46
|
-
loadScript({
|
|
47
|
-
src: 'jasmineHtml.es5.js',
|
|
48
|
-
})
|
|
49
|
-
loadScript({
|
|
50
|
-
src: 'integ.es5.js',
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
</script>
|
|
54
|
-
</head>
|
|
55
|
-
|
|
56
|
-
<body>
|
|
57
|
-
<div class="callout" id="unlockAudioPrompt" style="display: none">
|
|
58
|
-
<div class="instructions">Press any key or click to begin.</div>
|
|
59
|
-
</div>
|
|
60
|
-
</body>
|
|
61
|
-
</html>
|