@norskvideo/norsk-studio-built-ins 1.15.0 → 1.16.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/README.md +16 -0
- package/client/info.js +571 -302
- package/client/style.css +321 -112
- package/lib/input.rtmp/info.js +1 -1
- package/lib/input.rtmp/info.js.map +1 -1
- package/lib/input.silence/info.js +1 -0
- package/lib/input.silence/info.js.map +1 -1
- package/lib/input.srt-caller/info.js +6 -5
- package/lib/input.srt-caller/info.js.map +1 -1
- package/lib/input.srt-caller/runtime.d.ts +1 -1
- package/lib/input.srt-listener/info.js +7 -5
- package/lib/input.srt-listener/info.js.map +1 -1
- package/lib/input.srt-listener/runtime.d.ts +1 -1
- package/lib/input.udp-ts/info.d.ts +1 -1
- package/lib/input.udp-ts/info.js +5 -4
- package/lib/input.udp-ts/info.js.map +1 -1
- package/lib/input.udp-ts/runtime.d.ts +1 -1
- package/lib/input.videoTestCard/info.js +1 -0
- package/lib/input.videoTestCard/info.js.map +1 -1
- package/lib/output.autoCmaf/info.d.ts +1 -1
- package/lib/output.autoCmaf/info.js +54 -1
- package/lib/output.autoCmaf/info.js.map +1 -1
- package/lib/output.autoCmaf/runtime.d.ts +10 -0
- package/lib/output.autoCmaf/runtime.js +35 -4
- package/lib/output.autoCmaf/runtime.js.map +1 -1
- package/lib/output.autoCmaf/summary.js +23 -1
- package/lib/output.autoCmaf/summary.js.map +1 -1
- package/lib/output.preview/info.js +1 -0
- package/lib/output.preview/info.js.map +1 -1
- package/lib/output.preview/runtime.js +8 -4
- package/lib/output.preview/runtime.js.map +1 -1
- package/lib/output.rtmp/info.js +1 -0
- package/lib/output.rtmp/info.js.map +1 -1
- package/lib/output.srt/info.js +6 -5
- package/lib/output.srt/info.js.map +1 -1
- package/lib/output.srt/runtime.d.ts +1 -1
- package/lib/output.statistics/info.js +1 -0
- package/lib/output.statistics/info.js.map +1 -1
- package/lib/output.udpTs/info.d.ts +1 -1
- package/lib/output.udpTs/info.js +4 -3
- package/lib/output.udpTs/info.js.map +1 -1
- package/lib/output.udpTs/runtime.d.ts +1 -1
- package/lib/output.whep/info.js +1 -0
- package/lib/output.whep/info.js.map +1 -1
- package/lib/processor.browserOverlay/info.d.ts +2 -2
- package/lib/processor.browserOverlay/info.js +55 -1
- package/lib/processor.browserOverlay/info.js.map +1 -1
- package/lib/processor.browserOverlay/inline-view.d.ts +6 -0
- package/lib/processor.browserOverlay/inline-view.js +8 -0
- package/lib/processor.browserOverlay/inline-view.js.map +1 -0
- package/lib/processor.browserOverlay/openApi.d.ts +174 -0
- package/lib/processor.browserOverlay/openApi.js +3 -0
- package/lib/processor.browserOverlay/openApi.js.map +1 -0
- package/lib/processor.browserOverlay/runtime.d.ts +40 -6
- package/lib/processor.browserOverlay/runtime.js +147 -18
- package/lib/processor.browserOverlay/runtime.js.map +1 -1
- package/lib/processor.browserOverlay/summary-view.d.ts +4 -0
- package/lib/processor.browserOverlay/summary-view.js +27 -0
- package/lib/processor.browserOverlay/summary-view.js.map +1 -0
- package/lib/processor.browserOverlay/types.yaml +65 -0
- package/lib/processor.cascadingSwitch/info.js +1 -0
- package/lib/processor.cascadingSwitch/info.js.map +1 -1
- package/lib/processor.fixedLadder/codec-editor.js +1 -1
- package/lib/processor.fixedLadder/codec-editor.js.map +1 -1
- package/lib/processor.fixedLadder/codec-view.js +1 -1
- package/lib/processor.fixedLadder/codec-view.js.map +1 -1
- package/lib/processor.fixedLadder/info.js +1 -0
- package/lib/processor.fixedLadder/info.js.map +1 -1
- package/lib/processor.fixedLadder/rung-view.js +1 -1
- package/lib/processor.fixedLadder/rung-view.js.map +1 -1
- package/lib/processor.onscreenGraphic/info.js +3 -3
- package/lib/processor.onscreenGraphic/info.js.map +1 -1
- package/lib/processor.onscreenGraphic/runtime.js +54 -106
- package/lib/processor.onscreenGraphic/runtime.js.map +1 -1
- package/lib/processor.onscreenGraphic/summary-view.js +1 -1
- package/lib/processor.onscreenGraphic/summary-view.js.map +1 -1
- package/lib/processor.onscreenGraphic/types.d.ts +239 -1
- package/lib/processor.onscreenGraphic/types.yaml +142 -5
- package/lib/processor.whisper-transcribe/info.js +3 -2
- package/lib/processor.whisper-transcribe/info.js.map +1 -1
- package/lib/shared/drm/axinom.d.ts +2 -0
- package/lib/shared/drm/axinom.js +120 -0
- package/lib/shared/drm/axinom.js.map +1 -0
- package/lib/shared/drm/cpix.d.ts +24 -0
- package/lib/shared/drm/cpix.js +97 -0
- package/lib/shared/drm/cpix.js.map +1 -0
- package/lib/shared/drm/ezdrm.d.ts +2 -0
- package/lib/shared/drm/ezdrm.js +26 -0
- package/lib/shared/drm/ezdrm.js.map +1 -0
- package/lib/shared/srt-socket-options.js +6 -6
- package/lib/shared/srt-socket-options.js.map +1 -1
- package/lib/test/srt-input-caller.js +5 -5
- package/lib/test/srt-input-caller.js.map +1 -1
- package/lib/test/srt-input-listener.js +18 -18
- package/lib/test/srt-input-listener.js.map +1 -1
- package/lib/test/srt-output.js +2 -2
- package/lib/test/srt-output.js.map +1 -1
- package/lib/test/udp-output.js +2 -2
- package/lib/test/udp-output.js.map +1 -1
- package/lib/test/udp-ts-input.js +2 -2
- package/lib/test/udp-ts-input.js.map +1 -1
- package/lib/util.stats.latency/info.js +1 -0
- package/lib/util.stats.latency/info.js.map +1 -1
- package/lib/util.stats.ma35d/info.js +1 -0
- package/lib/util.stats.ma35d/info.js.map +1 -1
- package/lib/util.timestamps/info.js +1 -0
- package/lib/util.timestamps/info.js.map +1 -1
- package/package.json +10 -6
- package/Readme.adoc +0 -16
@@ -1,10 +1,134 @@
|
|
1
1
|
openapi: 3.0.0
|
2
|
+
info:
|
3
|
+
title: Onscreen Graphics Overlay Component
|
4
|
+
version: 1.0.0
|
5
|
+
|
6
|
+
paths:
|
7
|
+
# Static paths (available at runtime and design time)
|
8
|
+
/graphics:
|
9
|
+
get:
|
10
|
+
summary: Return the currently available graphic files
|
11
|
+
description: Returns all the graphics files on the server
|
12
|
+
x-route-type: static
|
13
|
+
responses:
|
14
|
+
200:
|
15
|
+
description: Successful operation
|
16
|
+
content:
|
17
|
+
application/json:
|
18
|
+
schema:
|
19
|
+
type: array
|
20
|
+
description: A list of the graphic files available
|
21
|
+
items:
|
22
|
+
$ref: "#/components/schemas/graphic"
|
23
|
+
post:
|
24
|
+
summary: Upload a new graphic
|
25
|
+
description: Upload a new graphic as a multi-part form POST
|
26
|
+
x-route-type: static
|
27
|
+
requestBody:
|
28
|
+
description: A multipart form containing the file to upload)
|
29
|
+
content:
|
30
|
+
multipart/form-data:
|
31
|
+
schema:
|
32
|
+
type: object
|
33
|
+
properties:
|
34
|
+
# The property name 'file' will be used for all files.
|
35
|
+
file:
|
36
|
+
type: string
|
37
|
+
format: binary
|
38
|
+
required: [file]
|
39
|
+
responses:
|
40
|
+
204:
|
41
|
+
description: The file was uploaded successfully
|
42
|
+
400:
|
43
|
+
description: No file was uploaded
|
44
|
+
404:
|
45
|
+
description: Not Found
|
46
|
+
409:
|
47
|
+
description: A graphic with the same name already exists
|
48
|
+
500:
|
49
|
+
description: File upload failed
|
50
|
+
/graphic:
|
51
|
+
delete:
|
52
|
+
summary: Delete a graphic file from the server
|
53
|
+
description: Deletes the passed filename from the server if present
|
54
|
+
x-route-type: static
|
55
|
+
tags: [foo]
|
56
|
+
requestBody:
|
57
|
+
description: The graphic to delete
|
58
|
+
content:
|
59
|
+
application/json:
|
60
|
+
schema:
|
61
|
+
type: object
|
62
|
+
properties:
|
63
|
+
filename:
|
64
|
+
type: string
|
65
|
+
description: 'The name of the graphic file to delete'
|
66
|
+
example: graphic.png
|
67
|
+
required: ['filename']
|
68
|
+
responses:
|
69
|
+
204:
|
70
|
+
description: The graphic was successfully deleted
|
71
|
+
404:
|
72
|
+
description: The specified graphic was not found
|
73
|
+
500:
|
74
|
+
description: Failed to delete the graphic
|
75
|
+
|
76
|
+
# Component instance paths (available at runtime only)
|
77
|
+
/active-graphic:
|
78
|
+
get:
|
79
|
+
summary: Info about the current graphic
|
80
|
+
description: Returns the configuration for current the onscreen graphic is any
|
81
|
+
x-route-type: instance
|
82
|
+
responses:
|
83
|
+
200:
|
84
|
+
description: Details of the configured graphic
|
85
|
+
content:
|
86
|
+
application/json:
|
87
|
+
schema:
|
88
|
+
$ref: "#/components/schemas/config"
|
89
|
+
204:
|
90
|
+
description: No graphic configured
|
91
|
+
404:
|
92
|
+
description: Component not found
|
93
|
+
post:
|
94
|
+
summary: Change the current graphic file and/or position
|
95
|
+
description: Change the current graphic file and/or position
|
96
|
+
x-route-type: instance
|
97
|
+
requestBody:
|
98
|
+
description: The graphic filename and location (sending an empty JSON object will delete the graphic)
|
99
|
+
content:
|
100
|
+
application/json:
|
101
|
+
schema:
|
102
|
+
oneOf:
|
103
|
+
- $ref: "#/components/schemas/config"
|
104
|
+
- $ref: "#/components/schemas/emptyObject"
|
105
|
+
responses:
|
106
|
+
204:
|
107
|
+
description: The active graphic was successfully updated
|
108
|
+
400:
|
109
|
+
description: Invalid request
|
110
|
+
content:
|
111
|
+
application/json:
|
112
|
+
schema:
|
113
|
+
$ref: '#/components/schemas/errorResponse'
|
114
|
+
404:
|
115
|
+
description: Component not found
|
116
|
+
delete:
|
117
|
+
summary: Stop displaying the current graphic
|
118
|
+
x-route-type: instance
|
119
|
+
responses:
|
120
|
+
204:
|
121
|
+
description: The active graphic was successfully hidden
|
122
|
+
404:
|
123
|
+
description: Component not found
|
124
|
+
|
125
|
+
|
2
126
|
components:
|
3
127
|
schemas:
|
4
128
|
position:
|
5
129
|
type: string
|
6
|
-
description:
|
7
|
-
example:
|
130
|
+
description: Where the graphic is to be displayed
|
131
|
+
example: "topright"
|
8
132
|
enum:
|
9
133
|
- topleft
|
10
134
|
- topright
|
@@ -12,14 +136,27 @@ components:
|
|
12
136
|
- bottomright
|
13
137
|
graphic:
|
14
138
|
type: string
|
15
|
-
description:
|
16
|
-
example:
|
139
|
+
description: The name of the image file
|
140
|
+
example: Norsk.png
|
17
141
|
config:
|
18
142
|
type: object
|
19
|
-
description:
|
143
|
+
description: The configuration for the onscreen graphic
|
20
144
|
properties:
|
21
145
|
graphic:
|
22
146
|
$ref: "#/components/schemas/graphic"
|
23
147
|
position:
|
24
148
|
$ref: "#/components/schemas/position"
|
149
|
+
emptyObject:
|
150
|
+
type: object
|
151
|
+
example: {}
|
152
|
+
errorResponse:
|
153
|
+
type: object
|
154
|
+
description: Details of why the request failed
|
155
|
+
properties:
|
156
|
+
error:
|
157
|
+
type: string
|
158
|
+
description: A description of the error
|
159
|
+
details:
|
160
|
+
type: string
|
161
|
+
description: The unacceptable data
|
25
162
|
|
@@ -6,6 +6,7 @@ function default_1({ defineComponent, Av, Subtitle, validation: { Z } }) {
|
|
6
6
|
identifier: 'processor.whisper-transcribe',
|
7
7
|
category: 'processor',
|
8
8
|
name: "Whisper Transcribe",
|
9
|
+
description: "This component transcribes audio from a video stream.",
|
9
10
|
subscription: {
|
10
11
|
accepts: {
|
11
12
|
type: 'single-stream',
|
@@ -34,8 +35,8 @@ function default_1({ defineComponent, Av, Subtitle, validation: { Z } }) {
|
|
34
35
|
configForm: {
|
35
36
|
form: {
|
36
37
|
model: { help: "The ggml model path", hint: { type: 'text', validation: Z.string().min(1, "Choosing a model is mandatory") } },
|
37
|
-
translate: { help: "Whether to translate the output to English", hint: { type: 'boolean', defaultValue: false } },
|
38
|
-
language: { help: "Source language (otherwise automatic)", hint: { type: 'text', validation: Z.union([Z.string().length(0), Z.string().min(1)]) } }
|
38
|
+
translate: { help: "Whether to translate the output to English", hint: { type: 'boolean', optional: true, defaultValue: false } },
|
39
|
+
language: { help: "Source language (otherwise automatic)", hint: { type: 'text', optional: true, validation: Z.union([Z.string().length(0), Z.string().min(1)]) } }
|
39
40
|
}
|
40
41
|
}
|
41
42
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/processor.whisper-transcribe/info.ts"],"names":[],"mappings":";;AAGA,
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/process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AAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE;gBACjI,QAAQ,EAAE,EAAE,IAAI,EAAE,uCAAuC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;aACpK;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
@@ -0,0 +1,120 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.axinomInit = axinomInit;
|
7
|
+
const cpix_1 = require("./cpix");
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
9
|
+
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
10
|
+
async function axinomInit(config) {
|
11
|
+
const tenantId = config?.tenantId;
|
12
|
+
const managementKey = config?.managementKey;
|
13
|
+
if (!tenantId) {
|
14
|
+
throw new Error("Missing Tenant ID for Axinom DRM authentication");
|
15
|
+
}
|
16
|
+
if (!managementKey) {
|
17
|
+
throw new Error("Missing Tenant ID for Axinom DRM authentication");
|
18
|
+
}
|
19
|
+
const auth = Buffer.from(`${tenantId}:${managementKey}`, "utf-8").toString("base64");
|
20
|
+
const encryptionKeyIds = { audio: (0, node_crypto_1.randomUUID)(), video: (0, node_crypto_1.randomUUID)() };
|
21
|
+
const endpoint = "https://key-server-management.axprod.net/api/SpekeV2";
|
22
|
+
const request = `
|
23
|
+
<?xml version="1.0"?>
|
24
|
+
<cpix:CPIX contentId="norskStudio" version="2.3" xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc">
|
25
|
+
<cpix:ContentKeyList>
|
26
|
+
<cpix:ContentKey kid="${encryptionKeyIds.audio}" commonEncryptionScheme="cbcs"/>
|
27
|
+
<cpix:ContentKey kid="${encryptionKeyIds.video}" commonEncryptionScheme="cbcs"/>
|
28
|
+
</cpix:ContentKeyList>
|
29
|
+
<cpix:DRMSystemList>
|
30
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.audio}" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2">
|
31
|
+
<cpix:HLSSignalingData playlist="media"/>
|
32
|
+
<cpix:HLSSignalingData playlist="master"/>
|
33
|
+
</cpix:DRMSystem>
|
34
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.audio}" systemId="9a04f079-9840-4286-ab92-e65be0885f95">
|
35
|
+
<cpix:PSSH/>
|
36
|
+
<cpix:ContentProtectionData/>
|
37
|
+
<cpix:HLSSignalingData playlist="media"/>
|
38
|
+
<cpix:HLSSignalingData playlist="master"/>
|
39
|
+
<cpix:SmoothStreamingProtectionHeaderData/>
|
40
|
+
</cpix:DRMSystem>
|
41
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.audio}" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
|
42
|
+
<cpix:PSSH/>
|
43
|
+
<cpix:ContentProtectionData/>
|
44
|
+
<cpix:HLSSignalingData playlist="media"/>
|
45
|
+
<cpix:HLSSignalingData playlist="master"/>
|
46
|
+
</cpix:DRMSystem>
|
47
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.video}" systemId="94ce86fb-07ff-4f43-adb8-93d2fa968ca2">
|
48
|
+
<cpix:HLSSignalingData playlist="media"/>
|
49
|
+
<cpix:HLSSignalingData playlist="master"/>
|
50
|
+
</cpix:DRMSystem>
|
51
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.video}" systemId="9a04f079-9840-4286-ab92-e65be0885f95">
|
52
|
+
<cpix:PSSH/>
|
53
|
+
<cpix:ContentProtectionData/>
|
54
|
+
<cpix:HLSSignalingData playlist="media"/>
|
55
|
+
<cpix:HLSSignalingData playlist="master"/>
|
56
|
+
<cpix:SmoothStreamingProtectionHeaderData/>
|
57
|
+
</cpix:DRMSystem>
|
58
|
+
<cpix:DRMSystem kid="${encryptionKeyIds.video}" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
|
59
|
+
<cpix:PSSH/>
|
60
|
+
<cpix:ContentProtectionData/>
|
61
|
+
<cpix:HLSSignalingData playlist="media"/>
|
62
|
+
<cpix:HLSSignalingData playlist="master"/>
|
63
|
+
</cpix:DRMSystem>
|
64
|
+
</cpix:DRMSystemList>
|
65
|
+
<cpix:ContentKeyUsageRuleList>
|
66
|
+
<cpix:ContentKeyUsageRule kid="${encryptionKeyIds.video}" intendedTrackType="VIDEO">
|
67
|
+
<cpix:VideoFilter />
|
68
|
+
</cpix:ContentKeyUsageRule>
|
69
|
+
<cpix:ContentKeyUsageRule kid="${encryptionKeyIds.audio}" intendedTrackType="AUDIO">
|
70
|
+
<cpix:AudioFilter />
|
71
|
+
</cpix:ContentKeyUsageRule>
|
72
|
+
</cpix:ContentKeyUsageRuleList>
|
73
|
+
</cpix:CPIX>
|
74
|
+
`.split('\n').map(line => line.substring(4)).join('\n').trim();
|
75
|
+
const response_inflight = await fetch(endpoint, {
|
76
|
+
method: "POST",
|
77
|
+
withCredentials: true,
|
78
|
+
credentials: "include",
|
79
|
+
headers: {
|
80
|
+
"Content-Type": "application/xml",
|
81
|
+
"Authorization": "Basic " + auth,
|
82
|
+
"X-Speke-Version": "2.0",
|
83
|
+
},
|
84
|
+
body: request,
|
85
|
+
});
|
86
|
+
if (!response_inflight.ok) {
|
87
|
+
throw new Error(response_inflight.status + " " + response_inflight.headers.get("x-axdrm-errormessage") || "unknown error from Axinom API");
|
88
|
+
}
|
89
|
+
const response = await response_inflight.text();
|
90
|
+
return (0, cpix_1.parseCpix)({ cpix: response, encryptionKeyIds, token: mkToken(config, [encryptionKeyIds.audio, encryptionKeyIds.video]) });
|
91
|
+
}
|
92
|
+
function mkToken(config, keys) {
|
93
|
+
const comKey = config?.comKey;
|
94
|
+
const comKeyId = config?.comKeyId;
|
95
|
+
if (!comKey || !comKeyId) {
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
const msg = {
|
99
|
+
"version": 1,
|
100
|
+
"begin_date": "2000-01-01T09:53:22+03:00",
|
101
|
+
"expiration_date": "2025-12-31T23:59:40+03:00",
|
102
|
+
"com_key_id": comKeyId,
|
103
|
+
"message": {
|
104
|
+
"type": "entitlement_message",
|
105
|
+
"version": 2,
|
106
|
+
"license": {
|
107
|
+
"duration": 3600
|
108
|
+
},
|
109
|
+
"content_keys_source": {
|
110
|
+
"inline": keys.map(id => ({ id }))
|
111
|
+
}
|
112
|
+
}
|
113
|
+
};
|
114
|
+
const communicationKey = Buffer.from(comKey, "base64");
|
115
|
+
return jsonwebtoken_1.default.sign(msg, communicationKey, {
|
116
|
+
"algorithm": "HS256",
|
117
|
+
"noTimestamp": true
|
118
|
+
});
|
119
|
+
}
|
120
|
+
//# sourceMappingURL=axinom.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"axinom.js","sourceRoot":"","sources":["../../../src/shared/drm/axinom.ts"],"names":[],"mappings":";;;;;AAKA,gCAqFC;AAzFD,iCAAmC;AACnC,6CAAyC;AACzC,gEAA+B;AAExB,KAAK,UAAU,UAAU,CAAC,MAAgC;IAC/D,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,EAAE,aAAa,CAAC;IAC5C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CA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type KeyResponse = {
|
2
|
+
encryptionKeyId: string;
|
3
|
+
encryptionKey: string;
|
4
|
+
encryptionPssh: string;
|
5
|
+
mediaSignaling: string;
|
6
|
+
multivariantSignaling: string;
|
7
|
+
dashSignalling: string;
|
8
|
+
};
|
9
|
+
export type CryptoDetails = {
|
10
|
+
audio: KeyResponse;
|
11
|
+
video: KeyResponse;
|
12
|
+
token?: string;
|
13
|
+
};
|
14
|
+
export type AVKeyIds = {
|
15
|
+
audio: string;
|
16
|
+
video: string;
|
17
|
+
};
|
18
|
+
export type CpixResponse = {
|
19
|
+
cpix: string;
|
20
|
+
encryptionKeyIds: AVKeyIds;
|
21
|
+
token?: string;
|
22
|
+
};
|
23
|
+
export declare function parseCpix(resp: CpixResponse): CryptoDetails;
|
24
|
+
export {};
|
@@ -0,0 +1,97 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.parseCpix = parseCpix;
|
4
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
5
|
+
function parseCpix(resp) {
|
6
|
+
const parsed = new fast_xml_parser_1.XMLParser({ ignoreDeclaration: true, ignorePiTags: true, ignoreAttributes: false }).parse(resp.cpix);
|
7
|
+
const cpix = parsed["cpix:CPIX"];
|
8
|
+
const result = {};
|
9
|
+
for (const key of ["audio", "video"]) {
|
10
|
+
const encryptionKeyId = resp.encryptionKeyIds[key];
|
11
|
+
let encryptionKey = "";
|
12
|
+
const ContentKeys = ensureXmlList(cpix["cpix:ContentKeyList"]["cpix:ContentKey"]);
|
13
|
+
for (const ContentKey of ContentKeys) {
|
14
|
+
if (ContentKey["@_kid"] !== encryptionKeyId)
|
15
|
+
continue;
|
16
|
+
const encryptionKeyBase64 = ContentKey["cpix:Data"]["pskc:Secret"]["pskc:PlainValue"];
|
17
|
+
encryptionKey = Buffer.from(encryptionKeyBase64, "base64").toString("hex");
|
18
|
+
}
|
19
|
+
if (!encryptionKey)
|
20
|
+
throw new Error(`Could not find encryption key ${encryptionKeyId} in response`);
|
21
|
+
const encryptionPsshs = [];
|
22
|
+
const mediaSignalings = [];
|
23
|
+
const multivariantSignalings = [];
|
24
|
+
let contentProtection = "";
|
25
|
+
contentProtection +=
|
26
|
+
`<ContentProtection xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="${encryptionKeyId}"
|
27
|
+
schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" />`;
|
28
|
+
const DRMSystems = ensureXmlList(cpix["cpix:DRMSystemList"]["cpix:DRMSystem"]);
|
29
|
+
for (const DRMSystem of DRMSystems) {
|
30
|
+
if (DRMSystem["@_kid"] !== encryptionKeyId)
|
31
|
+
continue;
|
32
|
+
const playlist = (name) => {
|
33
|
+
for (const signaling of ensureXmlList(DRMSystem["cpix:HLSSignalingData"])) {
|
34
|
+
if (typeof signaling === "string" && name === "media")
|
35
|
+
return signaling;
|
36
|
+
if (signaling["@_playlist"] === name)
|
37
|
+
return ensureXmlText(signaling);
|
38
|
+
}
|
39
|
+
return "";
|
40
|
+
};
|
41
|
+
encryptionPsshs.push(DRMSystem["cpix:PSSH"] || "");
|
42
|
+
mediaSignalings.push(playlist("media"));
|
43
|
+
multivariantSignalings.push(playlist("master"));
|
44
|
+
const systemId = DRMSystem["@_systemId"];
|
45
|
+
if (typeof systemId === "string") {
|
46
|
+
const contentProtectionData = ensureXmlText(DRMSystem["cpix:ContentProtectionData"]);
|
47
|
+
contentProtection += `
|
48
|
+
<ContentProtection xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="${encryptionKeyId}"
|
49
|
+
schemeIdUri="urn:uuid:${systemId}">
|
50
|
+
${un64(contentProtectionData)}
|
51
|
+
</ContentProtection>
|
52
|
+
`;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
const encryptionPssh = cat64(encryptionPsshs);
|
56
|
+
const mediaSignaling = mediaSignalings.map(un64).join("\n");
|
57
|
+
const multivariantSignaling = multivariantSignalings.map(un64).join("\n");
|
58
|
+
result[key] = {
|
59
|
+
encryptionKey,
|
60
|
+
encryptionKeyId,
|
61
|
+
encryptionPssh,
|
62
|
+
mediaSignaling,
|
63
|
+
multivariantSignaling,
|
64
|
+
dashSignalling: contentProtection,
|
65
|
+
};
|
66
|
+
}
|
67
|
+
if (!result.audio || !result.video) {
|
68
|
+
throw new Error("Missing audio and/or video encryption data");
|
69
|
+
}
|
70
|
+
return { audio: result.audio, video: result.video, token: resp.token };
|
71
|
+
function ensureXmlList(nodes) {
|
72
|
+
if (Array.isArray(nodes))
|
73
|
+
return nodes;
|
74
|
+
return [nodes];
|
75
|
+
}
|
76
|
+
function ensureXmlText(node) {
|
77
|
+
if (node === undefined || node === null)
|
78
|
+
return "";
|
79
|
+
if (typeof node === "string")
|
80
|
+
return node;
|
81
|
+
if (typeof node === "object" && "#text" in node && typeof node["#text"] === "string")
|
82
|
+
return node["#text"];
|
83
|
+
return "";
|
84
|
+
}
|
85
|
+
function cat64(items, sep) {
|
86
|
+
let buffers = items.map(s => Buffer.from(s, "base64"));
|
87
|
+
if (sep) {
|
88
|
+
const sepb = Buffer.from(sep, "utf-8");
|
89
|
+
buffers = Array.prototype.concat(...buffers.map(b => [sepb, b])).slice(1);
|
90
|
+
}
|
91
|
+
return Buffer.concat(buffers).toString("base64");
|
92
|
+
}
|
93
|
+
function un64(encoded) {
|
94
|
+
return Buffer.from(encoded, "base64").toString("utf-8");
|
95
|
+
}
|
96
|
+
}
|
97
|
+
//# sourceMappingURL=cpix.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpix.js","sourceRoot":"","sources":["../../../src/shared/drm/cpix.ts"],"names":[],"mappings":";;AA8BA,8BA0GC;AAxID,qDAA4C;AA8B5C,SAAgB,SAAS,CAAC,IAAkB;IAC1C,MAAM,MAAM,GAAG,IAAI,2BAAS,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAA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AC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;IACD,SAAS,IAAI,CAAC,OAAe;QAC3B,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ezdrmInit = ezdrmInit;
|
4
|
+
const cpix_1 = require("./cpix");
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
6
|
+
async function ezdrmInit(config) {
|
7
|
+
const token = config?.token;
|
8
|
+
if (!token) {
|
9
|
+
throw new Error("Missing Token for EZDRM authentication");
|
10
|
+
}
|
11
|
+
const encryptionKeyIds = { audio: (0, node_crypto_1.randomUUID)(), video: (0, node_crypto_1.randomUUID)() };
|
12
|
+
const ezdrmEndpoint = "https://cpix.ezdrm.com/KeyGenerator/cpix2.aspx";
|
13
|
+
const params = new URLSearchParams({
|
14
|
+
k: `empty,audio1=${encryptionKeyIds.audio},video1=${encryptionKeyIds.video}`,
|
15
|
+
c: "norskStudio",
|
16
|
+
t: token,
|
17
|
+
}).toString();
|
18
|
+
const url = `${ezdrmEndpoint}?${params}`;
|
19
|
+
const response_inflight = await fetch(url);
|
20
|
+
if (!response_inflight.ok) {
|
21
|
+
throw new Error(response_inflight.status + " " + response_inflight.statusText);
|
22
|
+
}
|
23
|
+
const response = await response_inflight.text();
|
24
|
+
return (0, cpix_1.parseCpix)({ cpix: response, encryptionKeyIds, token: config?.pX });
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=ezdrm.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ezdrm.js","sourceRoot":"","sources":["../../../src/shared/drm/ezdrm.ts"],"names":[],"mappings":";;AAIA,8BAsBC;AAzBD,iCAAmC;AACnC,6CAAyC;AAElC,KAAK,UAAU,SAAS,CAAC,MAA+B;IAC7D,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,CAAC;IAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,IAAA,wBAAU,GAAE,EAAE,KAAK,EAAE,IAAA,wBAAU,GAAE,EAAE,CAAC;IACtE,MAAM,aAAa,GAAG,gDAAgD,CAAC;IACvE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;QACjC,CAAC,EAAE,gBAAgB,gBAAgB,CAAC,KAAK,WAAW,gBAAgB,CAAC,KAAK,EAAE;QAC5E,CAAC,EAAE,aAAa;QAChB,CAAC,EAAE,KAAK;KACT,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEd,MAAM,GAAG,GAAG,GAAG,aAAa,IAAI,MAAM,EAAE,CAAC;IAEzC,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,MAAM,GAAG,GAAG,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACjF,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAChD,OAAO,IAAA,gBAAS,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
@@ -4,31 +4,31 @@ const result = ({ Z }) => ({
|
|
4
4
|
receiveLatency: {
|
5
5
|
help: "The latency value in the receiving direction of the socket (SRTO_RCVLATENCY)",
|
6
6
|
hint: {
|
7
|
-
type: "numeric", validation: Z.optional(Z.number())
|
7
|
+
type: "numeric", optional: true, validation: Z.optional(Z.number())
|
8
8
|
},
|
9
9
|
},
|
10
10
|
peerLatency: {
|
11
11
|
help: "The latency value provided by the sender side as a minimum value for the receiver (SRTO_PEERLATENCY)",
|
12
12
|
hint: {
|
13
|
-
type: "numeric", validation: Z.optional(Z.number())
|
13
|
+
type: "numeric", optional: true, validation: Z.optional(Z.number())
|
14
14
|
}
|
15
15
|
},
|
16
16
|
inputBandwidth: {
|
17
|
-
help: "Input bandwidth (SRTO_INPUTBW
|
17
|
+
help: "Input bandwidth (SRTO_INPUTBW)",
|
18
18
|
hint: {
|
19
|
-
type: "numeric", validation: Z.optional(Z.number())
|
19
|
+
type: "numeric", optional: true, validation: Z.optional(Z.number())
|
20
20
|
}
|
21
21
|
},
|
22
22
|
overheadBandwidth: {
|
23
23
|
help: "Overhead bandwidth (SRTO_OHEADBW)",
|
24
24
|
hint: {
|
25
|
-
type: "numeric", validation: Z.optional(Z.number())
|
25
|
+
type: "numeric", optional: true, validation: Z.optional(Z.number())
|
26
26
|
}
|
27
27
|
},
|
28
28
|
maxBandwidth: {
|
29
29
|
help: "Max bandwidth (SRTO_MAXBW)",
|
30
30
|
hint: {
|
31
|
-
type: "numeric", validation: Z.optional(Z.number())
|
31
|
+
type: "numeric", optional: true, validation: Z.optional(Z.number())
|
32
32
|
}
|
33
33
|
},
|
34
34
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"srt-socket-options.js","sourceRoot":"","sources":["../../src/shared/srt-socket-options.ts"],"names":[],"mappings":";;AAGA,MAAM,MAAM,GAAG,CAAC,EAAE,CAAC,EAAc,EAA6B,EAAE,CAAC,CAAC;IAChE,cAAc,EAAE;QACd,IAAI,EAAE,8EAA8E;QACpF,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC,QA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 +50,7 @@ describe("SRT Caller Input", () => {
|
|
50
50
|
.addNode(new builder_1.YamlNodeBuilder('srt', (0, info_1.default)(client_types_1.RegistrationConsts), {
|
51
51
|
sourceName: 'foo',
|
52
52
|
port: 65403,
|
53
|
-
|
53
|
+
host: '127.0.0.1',
|
54
54
|
socketOptions: {}
|
55
55
|
}).reify())
|
56
56
|
.reify();
|
@@ -66,7 +66,7 @@ describe("SRT Caller Input", () => {
|
|
66
66
|
srt = await norsk.output.srt({
|
67
67
|
id: "av-srt-output",
|
68
68
|
mode: "listener",
|
69
|
-
|
69
|
+
host: "0.0.0.0",
|
70
70
|
port: 65403
|
71
71
|
});
|
72
72
|
srt.subscribe([{ source: av, sourceSelector: norsk_sdk_1.selectAV }]);
|
@@ -91,7 +91,7 @@ describe("SRT Caller Reconnect", () => {
|
|
91
91
|
.addNode(new builder_1.YamlNodeBuilder('srt', (0, info_1.default)(client_types_1.RegistrationConsts), {
|
92
92
|
sourceName: 'foo',
|
93
93
|
port: 65403,
|
94
|
-
|
94
|
+
host: '127.0.0.1',
|
95
95
|
socketOptions: {}
|
96
96
|
}).reify())
|
97
97
|
.reify();
|
@@ -107,7 +107,7 @@ describe("SRT Caller Reconnect", () => {
|
|
107
107
|
srt = await norsk.output.srt({
|
108
108
|
id: "av-srt-output",
|
109
109
|
mode: "listener",
|
110
|
-
|
110
|
+
host: "0.0.0.0",
|
111
111
|
port: 65403
|
112
112
|
});
|
113
113
|
srt.subscribe([{ source: av, sourceSelector: norsk_sdk_1.selectAV }]);
|
@@ -131,7 +131,7 @@ describe("SRT Caller Reconnect", () => {
|
|
131
131
|
srt = await norsk.output.srt({
|
132
132
|
id: "av-srt-output",
|
133
133
|
mode: "listener",
|
134
|
-
|
134
|
+
host: "0.0.0.0",
|
135
135
|
port: 65403
|
136
136
|
});
|
137
137
|
srt.subscribe([{ source: av, sourceSelector: norsk_sdk_1.selectAV }]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"srt-input-caller.js","sourceRoot":"","sources":["../../src/test/srt-input-caller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoH;AACpH,2BAAkC;AAElC,6EAA4G;AAC5G,wFAA0E;AAC1E,gDAAwB;AACxB,+FAAgE;AAChE,yEAAqJ;AAGrJ,oEAA+C;AAC/C,sFAA+G;AAC/G,wFAAoG;AACpG,mEAA4E;AAC5E,6EAAiF;AAEjF,KAAK,UAAU,cAAc;IAC3B,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,MAAM,IAAA,eAAW,EAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,KAAK,UAAU,YAAY;QACzB,MAAM,OAAO,GAAG,MAAM,cAAc,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,qBAAW,EAAE;aAC3B,OAAO,CACN,IAAI,yBAAe,CAChB,KAAK,EACJ,IAAA,cAAO,EAAC,iCAAkB,CAAC,EAC3B;YACE,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE,KAAK;YACX,
|
1
|
+
{"version":3,"file":"srt-input-caller.js","sourceRoot":"","sources":["../../src/test/srt-input-caller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoH;AACpH,2BAAkC;AAElC,6EAA4G;AAC5G,wFAA0E;AAC1E,gDAAwB;AACxB,+FAAgE;AAChE,yEAAqJ;AAGrJ,oEAA+C;AAC/C,sFAA+G;AAC/G,wFAAoG;AACpG,mEAA4E;AAC5E,6EAAiF;AAEjF,KAAK,UAAU,cAAc;IAC3B,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,MAAM,IAAA,eAAW,EAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,QAAQ,CAAC,kBAAkB,EAAE,GAAG,E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