@mega-yfue/eufy-sdk 0.5.0-beta.46 → 0.5.0-beta.48
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 +6 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16099,6 +16099,9 @@ var P2PSession = class _P2PSession extends EventEmitter2 {
|
|
|
16099
16099
|
}
|
|
16100
16100
|
} else if (hasHeader(msg, ResponseMessageType.CAM_ID) || hasHeader(msg, ResponseMessageType.TURN_SERVER_CAM_ID)) {
|
|
16101
16101
|
this.onConnected({ host: rinfo.address, port: rinfo.port }, socket);
|
|
16102
|
+
} else if (hasHeader(msg, ResponseMessageType.END)) {
|
|
16103
|
+
if (fromConnectedPeer)
|
|
16104
|
+
void this.close().catch((error) => this.emit("error", error));
|
|
16102
16105
|
} else if (hasHeader(msg, ResponseMessageType.PONG)) {
|
|
16103
16106
|
this.lastPongData = msg.length > 4 ? msg.subarray(4) : void 0;
|
|
16104
16107
|
} else if (hasHeader(msg, ResponseMessageType.PING)) {
|
|
@@ -22012,8 +22015,10 @@ var P2PCommandRouter = class _P2PCommandRouter {
|
|
|
22012
22015
|
tearDownStation(stationSn) {
|
|
22013
22016
|
this.manager.remove(stationSn);
|
|
22014
22017
|
for (const key of [...this.liveSources.keys()]) {
|
|
22015
|
-
|
|
22018
|
+
const owner = this.liveSessionKeys.get(key);
|
|
22019
|
+
if (key.startsWith(`${stationSn}:`) && !(owner && _P2PCommandRouter.isMediaSessionKey(owner))) {
|
|
22016
22020
|
this.dropLiveSource(key);
|
|
22021
|
+
}
|
|
22017
22022
|
}
|
|
22018
22023
|
for (const [key, talk] of this.talkbacks) {
|
|
22019
22024
|
if (key.startsWith(`${stationSn}:`)) {
|