@mega-yfue/eufy-sdk 0.5.0-beta.24 → 0.5.0-beta.26
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/core/contracts.d.ts
CHANGED
|
@@ -488,6 +488,8 @@ export type VideoCodec = "h264" | "h265" | "av1";
|
|
|
488
488
|
* headers promise decodes to no picture at all.
|
|
489
489
|
*/
|
|
490
490
|
export interface LiveVideoFrame {
|
|
491
|
+
/** Source-reported unsigned 32-bit timestamp; unit and clock origin are unspecified. */
|
|
492
|
+
sourceTimestamp?: number;
|
|
491
493
|
/** True on an IDR — a unit a consumer may begin decoding at, never a continuation of an earlier one. */
|
|
492
494
|
keyframe: boolean;
|
|
493
495
|
/**
|
package/dist/index.js
CHANGED
|
@@ -17751,7 +17751,13 @@ function beginsAccessUnit(body) {
|
|
|
17751
17751
|
return body[2] === 1 || body[2] === 0 && body[3] === 1;
|
|
17752
17752
|
}
|
|
17753
17753
|
function unitOf(header, data) {
|
|
17754
|
-
return {
|
|
17754
|
+
return {
|
|
17755
|
+
sourceTimestamp: header.timestamp,
|
|
17756
|
+
keyframe: header.keyframe,
|
|
17757
|
+
width: header.width,
|
|
17758
|
+
height: header.height,
|
|
17759
|
+
data
|
|
17760
|
+
};
|
|
17755
17761
|
}
|
|
17756
17762
|
|
|
17757
17763
|
// dist/transport/p2p/annexb.js
|
|
@@ -18280,6 +18286,7 @@ var LiveStream = class extends EventEmitter3 {
|
|
|
18280
18286
|
this.lastCodec = sniffAnnexbCodec(unit.data) ?? this.lastCodec;
|
|
18281
18287
|
this.settleKeepalive();
|
|
18282
18288
|
this.emit("video", {
|
|
18289
|
+
sourceTimestamp: unit.sourceTimestamp,
|
|
18283
18290
|
keyframe: unit.keyframe,
|
|
18284
18291
|
width: unit.width,
|
|
18285
18292
|
height: unit.height,
|
|
@@ -23514,8 +23521,8 @@ var RtcSession = class extends EventEmitter9 {
|
|
|
23514
23521
|
this.announceClose();
|
|
23515
23522
|
});
|
|
23516
23523
|
this.signaling.on("error", (e) => this.emit("error", e));
|
|
23517
|
-
this.peer.on("iceCandidate", (c) => this.
|
|
23518
|
-
this.peer.on("iceGatheringComplete", () => this.
|
|
23524
|
+
this.peer.on("iceCandidate", (c) => this.trickle(toWireCandidate(c)));
|
|
23525
|
+
this.peer.on("iceGatheringComplete", () => this.trickle(""));
|
|
23519
23526
|
this.peer.on("commandChannelOpen", () => {
|
|
23520
23527
|
if (this.connected)
|
|
23521
23528
|
return;
|
|
@@ -23581,6 +23588,16 @@ var RtcSession = class extends EventEmitter9 {
|
|
|
23581
23588
|
this.settleAuth(new Error("RTC session closed while waiting for signalling auth"));
|
|
23582
23589
|
this.announceClose();
|
|
23583
23590
|
}
|
|
23591
|
+
/**
|
|
23592
|
+
* Trickle one local candidate, or the empty end-of-candidates. The native peer can report one after the
|
|
23593
|
+
* signalling socket has closed, and sending then throws inside a native callback, where the throw can't
|
|
23594
|
+
* be caught and aborts the process. A candidate with no open socket is dropped.
|
|
23595
|
+
*/
|
|
23596
|
+
trickle(candidate) {
|
|
23597
|
+
if (!this.signaling.isOpen)
|
|
23598
|
+
return;
|
|
23599
|
+
this.signaling.sendInfoCandidate(candidate);
|
|
23600
|
+
}
|
|
23584
23601
|
announceClose() {
|
|
23585
23602
|
if (this.closeAnnounced)
|
|
23586
23603
|
return;
|