@apocaliss92/nodelink-js 0.5.1-beta.6 → 0.5.1-beta.8
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/index.cjs +27 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41455,8 +41455,21 @@ function encodeImaAdpcm(pcm, blockSizeBytes) {
|
|
|
41455
41455
|
}
|
|
41456
41456
|
|
|
41457
41457
|
// src/reolink/baichuan/utils/audioMulaw.ts
|
|
41458
|
-
var
|
|
41459
|
-
|
|
41458
|
+
var alawmulawNs = __toESM(require("alawmulaw"), 1);
|
|
41459
|
+
function resolveAlawmulaw() {
|
|
41460
|
+
const ns = alawmulawNs;
|
|
41461
|
+
if (ns.mulaw && ns.alaw) {
|
|
41462
|
+
return { mulaw: ns.mulaw, alaw: ns.alaw };
|
|
41463
|
+
}
|
|
41464
|
+
const fallback = ns.default;
|
|
41465
|
+
if (fallback?.mulaw && fallback?.alaw) {
|
|
41466
|
+
return { mulaw: fallback.mulaw, alaw: fallback.alaw };
|
|
41467
|
+
}
|
|
41468
|
+
throw new Error(
|
|
41469
|
+
"alawmulaw: unable to resolve mulaw/alaw codecs from module exports"
|
|
41470
|
+
);
|
|
41471
|
+
}
|
|
41472
|
+
var { mulaw, alaw } = resolveAlawmulaw();
|
|
41460
41473
|
function mulawToPcm16(bytes) {
|
|
41461
41474
|
if (bytes.length === 0) return new Int16Array(0);
|
|
41462
41475
|
return mulaw.decode(bytes);
|
|
@@ -42124,9 +42137,20 @@ CSeq: ${cseq}\r
|
|
|
42124
42137
|
switch (method) {
|
|
42125
42138
|
case "OPTIONS":
|
|
42126
42139
|
send(200, "OK", {
|
|
42127
|
-
Public: "OPTIONS, DESCRIBE, SETUP, PLAY, RECORD, TEARDOWN"
|
|
42140
|
+
Public: "OPTIONS, DESCRIBE, SETUP, PLAY, RECORD, TEARDOWN, GET_PARAMETER, SET_PARAMETER"
|
|
42128
42141
|
});
|
|
42129
42142
|
return;
|
|
42143
|
+
// RFC 2326 §10.8 keepalive. Frigate's bundled go2rtc 1.9.10 sets a
|
|
42144
|
+
// ~30s read deadline on the producer socket during RECORD; without
|
|
42145
|
+
// a periodic reply on the same TCP connection that deadline fires
|
|
42146
|
+
// and the client gives up with "i/o timeout". go2rtc sends an empty
|
|
42147
|
+
// GET_PARAMETER (no body) as the keepalive — we just need to
|
|
42148
|
+
// acknowledge it. SET_PARAMETER is accepted for symmetry with
|
|
42149
|
+
// clients that prefer it for keepalive.
|
|
42150
|
+
case "GET_PARAMETER":
|
|
42151
|
+
case "SET_PARAMETER":
|
|
42152
|
+
send(200, "OK", sessionId ? { Session: sessionId } : {});
|
|
42153
|
+
return;
|
|
42130
42154
|
case "DESCRIBE": {
|
|
42131
42155
|
const resolved = this.resolveRouteForRequest(url);
|
|
42132
42156
|
if (!resolved) {
|