@mega-yfue/eufy-sdk 0.4.0-beta.20 → 0.4.0-beta.22
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.js
CHANGED
|
@@ -15714,7 +15714,8 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
|
|
|
15714
15714
|
this.trace({
|
|
15715
15715
|
phase: "lookup-channels",
|
|
15716
15716
|
local: !this.cfg.noBroadcast || this.cfg.localAddress !== void 0,
|
|
15717
|
-
cloud: this.cloudLookup !== void 0
|
|
15717
|
+
cloud: this.cloudLookup !== void 0,
|
|
15718
|
+
...this.cloudLookup ? {} : { cloudMissing: dskKey ? "cloud-addresses" : "dsk-key" }
|
|
15718
15719
|
});
|
|
15719
15720
|
this.sendLookups();
|
|
15720
15721
|
this.lookupTimer = setInterval(() => this.sendLookups(), LOOKUP_RETRY_MS);
|
|
@@ -18484,6 +18485,7 @@ var AUDIO_HEADER_LEN2 = 16;
|
|
|
18484
18485
|
var AUDIO_NONCE_START = 32;
|
|
18485
18486
|
var AUDIO_BODY_START = 44;
|
|
18486
18487
|
var AUDIO_CODEC_AAC_LC = 0;
|
|
18488
|
+
var FINISH_CHANNEL = 0;
|
|
18487
18489
|
var FIRST_FRAME_WAIT_MS = 2e4;
|
|
18488
18490
|
var IDLE_END_MS = 15e3;
|
|
18489
18491
|
var DEFAULT_TRANSFER_MS = 12e4;
|
|
@@ -18535,15 +18537,17 @@ function receiveRecording(session, request) {
|
|
|
18535
18537
|
collected = [];
|
|
18536
18538
|
};
|
|
18537
18539
|
const onData = (frame) => {
|
|
18538
|
-
if (frame.channel !== request.channel)
|
|
18539
|
-
return;
|
|
18540
18540
|
if (frame.commandId === CommandType.CMD_DOWNLOAD_FINISH) {
|
|
18541
|
+
if (frame.channel !== request.channel && frame.channel !== FINISH_CHANNEL)
|
|
18542
|
+
return;
|
|
18541
18543
|
if (draining)
|
|
18542
18544
|
incomplete(draining);
|
|
18543
18545
|
else
|
|
18544
18546
|
deliver();
|
|
18545
18547
|
return stop();
|
|
18546
18548
|
}
|
|
18549
|
+
if (frame.channel !== request.channel)
|
|
18550
|
+
return;
|
|
18547
18551
|
if (frame.commandId !== CommandType.CMD_VIDEO_FRAME && frame.commandId !== CommandType.CMD_AUDIO_FRAME)
|
|
18548
18552
|
return;
|
|
18549
18553
|
if (frame.dataType !== RECORDING_DATA_TYPE)
|