@camera.ui/camera-ui-eufy 0.0.19 → 0.0.21

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/bundle.zip ADDED
Binary file
package/package.json CHANGED
@@ -1,45 +1,33 @@
1
1
  {
2
2
  "displayName": "Eufy",
3
3
  "name": "@camera.ui/camera-ui-eufy",
4
- "version": "0.0.19",
4
+ "version": "0.0.21",
5
5
  "description": "camera.ui eufy plugin",
6
6
  "author": "seydx (https://github.com/seydx/camera.ui)",
7
7
  "main": "./dist/index.js",
8
- "type": "module",
8
+ "type": "commonjs",
9
9
  "scripts": {
10
10
  "build": "rimraf dist && tsc",
11
- "format": "prettier --write 'src/' --ignore-unknown --no-error-on-unmatched-pattern",
12
- "lint": "eslint --fix --ext .js,.ts .",
13
- "update": "updates --update ./",
11
+ "bundle": "npm run format && npm run lint && npm run build && cui bundle",
12
+ "format": "prettier --write \"src/\" --ignore-unknown --no-error-on-unmatched-pattern",
14
13
  "install-updates": "npm i --save",
15
- "prepublishOnly": "npm i --package-lock-only && npm run lint && npm run format && npm run build"
14
+ "lint": "eslint .",
15
+ "lint:fix": "eslint --fix .",
16
+ "prepublishOnly": "node -e \"if(!process.env.SAFE_PUBLISH){console.error('Error: Please use @camera.ui/cli to publish the plugin:\\n npm run publish:alpha\\n npm run publish:beta\\n npm run publish:latest\\n');process.exit(1)}\"",
17
+ "publish:alpha": "cui publish --alpha",
18
+ "publish:beta": "cui publish --beta",
19
+ "publish:latest": "cui publish --latest",
20
+ "update": "updates --update ./"
16
21
  },
17
22
  "dependencies": {
18
- "@camera.ui/rtsp": "^0.0.39",
19
23
  "eufy-security-client": "^3.1.1"
20
24
  },
21
- "devDependencies": {
22
- "@camera.ui/types": "^0.0.76",
23
- "@rushstack/eslint-patch": "^1.10.4",
24
- "@types/node": "^22.7.5",
25
- "@types/ws": "^8.5.12",
26
- "@typescript-eslint/eslint-plugin": "^8.8.1",
27
- "@typescript-eslint/parser": "^8.8.1",
28
- "concurrently": "^9.0.1",
29
- "eslint": "8.57.0",
30
- "eslint-config-prettier": "^9.1.0",
31
- "eslint-plugin-prettier": "^5.2.1",
32
- "prettier": "^3.3.3",
33
- "rimraf": "^6.0.1",
34
- "typescript": "^5.6.3",
35
- "updates": "^16.4.0"
36
- },
37
25
  "bugs": {
38
26
  "url": "https://github.com/seydx/camera.ui/issues"
39
27
  },
40
28
  "engines": {
41
- "camera.ui": ">=0.0.34-alpha.1",
42
- "node": ">=20.17.0"
29
+ "camera.ui": ">=0.0.34-alpha.4",
30
+ "node": ">=20.18.0"
43
31
  },
44
32
  "homepage": "https://github.com/seydx/camera.ui#readme",
45
33
  "keywords": [
@@ -58,6 +46,10 @@
58
46
  "objectDetection",
59
47
  "ptz"
60
48
  ],
61
- "dependencies": []
49
+ "dependencies": [],
50
+ "options": {
51
+ "extendedMotionDetection": false
52
+ },
53
+ "bundled": true
62
54
  }
63
- }
55
+ }
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- All notable changes to this project will be documented in this file.
2
-
3
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
-
6
- ## [X.X.X] - ???
7
-
8
- - Initial Release
package/CONTRIBUTING.md DELETED
@@ -1 +0,0 @@
1
- # Contributing
package/LICENSE.md DELETED
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023-2024 seydx <dev@seydx.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md DELETED
@@ -1 +0,0 @@
1
- # @camera.ui/camera-ui-eufy
@@ -1,356 +0,0 @@
1
- {
2
- "schema": {
3
- "homes": {
4
- "type": "array",
5
- "key": "homes",
6
- "title": "Homes",
7
- "description": "Eufy Homes",
8
- "items": {
9
- "type": "object",
10
- "title": "Home",
11
- "description": "Eufy Home",
12
- "required": true,
13
- "properties": {
14
- "debug": {
15
- "type": "boolean",
16
- "title": "Debug",
17
- "description": "Enable debug mode",
18
- "required": false,
19
- "defaultValue": false,
20
- "store": true
21
- },
22
- "name": {
23
- "type": "string",
24
- "title": "Home Name",
25
- "description": "Name of the home",
26
- "required": true,
27
- "store": true
28
- },
29
- "username": {
30
- "type": "string",
31
- "title": "Login Email",
32
- "description": "Email for the login",
33
- "format": "email",
34
- "required": true,
35
- "store": true
36
- },
37
- "password": {
38
- "type": "string",
39
- "title": "Login Password",
40
- "description": "Password for the login",
41
- "format": "password",
42
- "required": true,
43
- "store": true
44
- },
45
- "country": {
46
- "type": "string",
47
- "title": "Country",
48
- "description": "Country for the login",
49
- "required": false,
50
- "store": true,
51
- "defaultValue": "United States",
52
- "enum": [
53
- "Afghanistan",
54
- "Aland Islands",
55
- "Albania",
56
- "Algeria",
57
- "American Samoa",
58
- "Andorra",
59
- "Angola",
60
- "Anguilla",
61
- "Antarctica",
62
- "Antigua and Barbuda",
63
- "Argentina",
64
- "Armenia",
65
- "Aruba",
66
- "Australia",
67
- "Austria",
68
- "Azerbaijan",
69
- "Bahamas",
70
- "Bahrain",
71
- "Bangladesh",
72
- "Barbados",
73
- "Belarus",
74
- "Belgium",
75
- "Belize",
76
- "Benin",
77
- "Bermuda",
78
- "Bhutan",
79
- "Bolivia",
80
- "Bonaire, Sint Eustatius and Saba",
81
- "Bosnia and Herzegovina",
82
- "Botswana",
83
- "Bouvet Island",
84
- "Brazil",
85
- "British Indian Ocean Territory",
86
- "Brunei Darussalam",
87
- "Bulgaria",
88
- "Burkina Faso",
89
- "Burundi",
90
- "Cambodia",
91
- "Cameroon",
92
- "Canada",
93
- "Cape Verde",
94
- "Cayman Islands",
95
- "Central African Republic",
96
- "Chad",
97
- "Chile",
98
- "China",
99
- "Christmas Island",
100
- "Cocos (Keeling) Islands",
101
- "Colombia",
102
- "Comoros",
103
- "Congo",
104
- "Congo, the Democratic Republic of the",
105
- "Cook Islands",
106
- "Costa Rica",
107
- "Cote DIvoire",
108
- "Croatia",
109
- "Cuba",
110
- "Curacao",
111
- "Cyprus",
112
- "Czech Republic",
113
- "Denmark",
114
- "Djibouti",
115
- "Dominica",
116
- "Dominican Republic",
117
- "Ecuador",
118
- "Egypt",
119
- "El Salvador",
120
- "Equatorial Guinea",
121
- "Eritrea",
122
- "Estonia",
123
- "Ethiopia",
124
- "Falkland Islands (Malvinas)",
125
- "Faroe Islands",
126
- "Fiji",
127
- "Finland",
128
- "France",
129
- "French Guiana",
130
- "French Polynesia",
131
- "French Southern Territories",
132
- "Gabon",
133
- "Gambia",
134
- "Georgia",
135
- "Germany",
136
- "Ghana",
137
- "Gibraltar",
138
- "Greece",
139
- "Greenland",
140
- "Grenada",
141
- "Guadeloupe",
142
- "Guam",
143
- "Guatemala",
144
- "Guernsey",
145
- "Guinea",
146
- "Guinea-Bissau",
147
- "Guyana",
148
- "Haiti",
149
- "Heard Island and Mcdonald Islands",
150
- "Holy See (Vatican City State)",
151
- "Honduras",
152
- "Hong Kong",
153
- "Hungary",
154
- "Iceland",
155
- "India",
156
- "Indonesia",
157
- "Iran, Islamic Republic of",
158
- "Iraq",
159
- "Ireland",
160
- "Isle of Man",
161
- "Israel",
162
- "Italy",
163
- "Jamaica",
164
- "Japan",
165
- "Jersey",
166
- "Jordan",
167
- "Kazakhstan",
168
- "Kenya",
169
- "Kiribati",
170
- "Korea, Democratic Peoples Republic of",
171
- "Korea, Republic of",
172
- "Kosovo",
173
- "Kuwait",
174
- "Kyrgyzstan",
175
- "Lao Peoples Democratic Republic",
176
- "Latvia",
177
- "Lebanon",
178
- "Lesotho",
179
- "Liberia",
180
- "Libyan Arab Jamahiriya",
181
- "Liechtenstein",
182
- "Lithuania",
183
- "Luxembourg",
184
- "Macao",
185
- "Macedonia, the Former Yugoslav Republic of",
186
- "Madagascar",
187
- "Malawi",
188
- "Malaysia",
189
- "Maldives",
190
- "Mali",
191
- "Malta",
192
- "Marshall Islands",
193
- "Martinique",
194
- "Mauritania",
195
- "Mauritius",
196
- "Mayotte",
197
- "Mexico",
198
- "Micronesia, Federated States of",
199
- "Moldova, Republic of",
200
- "Monaco",
201
- "Mongolia",
202
- "Montenegro",
203
- "Montserrat",
204
- "Morocco",
205
- "Mozambique",
206
- "Myanmar",
207
- "Namibia",
208
- "Nauru",
209
- "Nepal",
210
- "Netherlands",
211
- "Netherlands Antilles",
212
- "New Caledonia",
213
- "New Zealand",
214
- "Nicaragua",
215
- "Niger",
216
- "Nigeria",
217
- "Niue",
218
- "Norfolk Island",
219
- "Northern Mariana Islands",
220
- "Norway",
221
- "Oman",
222
- "Pakistan",
223
- "Palau",
224
- "Palestinian Territory, Occupied",
225
- "Panama",
226
- "Papua New Guinea",
227
- "Paraguay",
228
- "Peru",
229
- "Philippines",
230
- "Pitcairn",
231
- "Poland",
232
- "Portugal",
233
- "Puerto Rico",
234
- "Qatar",
235
- "Reunion",
236
- "Romania",
237
- "Russian Federation",
238
- "Rwanda",
239
- "Saint Barthelemy",
240
- "Saint Helena",
241
- "Saint Kitts and Nevis",
242
- "Saint Lucia",
243
- "Saint Martin",
244
- "Saint Pierre and Miquelon",
245
- "Saint Vincent and the Grenadines",
246
- "Samoa",
247
- "San Marino",
248
- "Sao Tome and Principe",
249
- "Saudi Arabia",
250
- "Senegal",
251
- "Serbia",
252
- "Serbia and Montenegro",
253
- "Seychelles",
254
- "Sierra Leone",
255
- "Singapore",
256
- "Sint Maarten",
257
- "Slovakia",
258
- "Slovenia",
259
- "Solomon Islands",
260
- "Somalia",
261
- "South Africa",
262
- "South Georgia and the South Sandwich Islands",
263
- "South Sudan",
264
- "Spain",
265
- "Sri Lanka",
266
- "Sudan",
267
- "Suriname",
268
- "Svalbard and Jan Mayen",
269
- "Swaziland",
270
- "Sweden",
271
- "Switzerland",
272
- "Syrian Arab Republic",
273
- "Taiwan, Province of China",
274
- "Tajikistan",
275
- "Tanzania, United Republic of",
276
- "Thailand",
277
- "Timor-Leste",
278
- "Togo",
279
- "Tokelau",
280
- "Tonga",
281
- "Trinidad and Tobago",
282
- "Tunisia",
283
- "Turk",
284
- "Turkmenistan",
285
- "Turks and Caicos Islands",
286
- "Tuvalu",
287
- "Uganda",
288
- "Ukraine",
289
- "United Arab Emirates",
290
- "United Kingdom",
291
- "United States",
292
- "United States Minor Outlying Islands",
293
- "Uruguay",
294
- "Uzbekistan",
295
- "Vanuatu",
296
- "Venezuela",
297
- "Viet Nam",
298
- "Virgin Islands, British",
299
- "Virgin Islands, U.s.",
300
- "Wallis and Futuna",
301
- "Western Sahara",
302
- "Yemen",
303
- "Zambia",
304
- "Zimbabwe"
305
- ]
306
- },
307
- "deviceName": {
308
- "type": "string",
309
- "title": "Device Name",
310
- "description": "Name of the device",
311
- "required": false,
312
- "defaultValue": "camera.ui",
313
- "store": true
314
- },
315
- "useP2P": {
316
- "type": "boolean",
317
- "title": "Use P2P",
318
- "description": "Use P2P for live stream",
319
- "required": false,
320
- "defaultValue": false,
321
- "store": true
322
- },
323
- "maxLiveStreamDuration": {
324
- "type": "number",
325
- "title": "Max Live Stream Duration",
326
- "description": "Max duration of live stream in seconds",
327
- "required": false,
328
- "defaultValue": 86400,
329
- "minimum": 60,
330
- "maximum": 86400,
331
- "store": true
332
- },
333
- "ignoreDevices": {
334
- "type": "array",
335
- "title": "Ignore Devices",
336
- "description": "List of devices to ignore",
337
- "required": false,
338
- "items": {
339
- "type": "string",
340
- "title": "Device",
341
- "description": "Device to ignore"
342
- },
343
- "defaultValue": [],
344
- "store": true
345
- }
346
- },
347
- "buttons": [
348
- {
349
- "label": "Login",
350
- "onSubmit": "onLogin"
351
- }
352
- ]
353
- }
354
- }
355
- }
356
- }
package/dist/camera.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import type { CameraDelegate, CameraDevice, LoggerService } from '@camera.ui/types';
2
- import type { Camera as EufyCamera, EufySecurity } from 'eufy-security-client';
3
- import type Eufy from './index.js';
4
- import type { EufyHome } from './types.js';
5
- export declare class Camera implements CameraDelegate {
6
- cameraDevice: CameraDevice;
7
- private platform;
8
- private home;
9
- private eufyClient;
10
- private eufyDevice;
11
- private logger;
12
- private ffmpegPath?;
13
- private rtspServer;
14
- private localLivestreamManager;
15
- private talkbackStream;
16
- constructor(platform: Eufy, home: EufyHome, eufyClient: EufySecurity, eufyDevice: EufyCamera, logger: LoggerService);
17
- createCameraDevice(): Promise<void>;
18
- snapshot(): Promise<ArrayBuffer | undefined>;
19
- reboot(): Promise<void>;
20
- private createRTSPServer;
21
- private checkStates;
22
- }
package/dist/camera.js DELETED
@@ -1,127 +0,0 @@
1
- import { RTSPSingleServer } from '@camera.ui/rtsp';
2
- import { PropertyName } from 'eufy-security-client';
3
- import { LocalLivestreamManager } from './eufy/LocalLiveStreamManager.js';
4
- import { TalkbackStream } from './eufy/Talkback.js';
5
- export class Camera {
6
- cameraDevice;
7
- platform;
8
- home;
9
- eufyClient;
10
- eufyDevice;
11
- logger;
12
- ffmpegPath;
13
- rtspServer;
14
- localLivestreamManager;
15
- talkbackStream;
16
- constructor(platform, home, eufyClient, eufyDevice, logger) {
17
- this.platform = platform;
18
- this.home = home;
19
- this.eufyClient = eufyClient;
20
- this.eufyDevice = eufyDevice;
21
- this.logger = logger;
22
- }
23
- async createCameraDevice() {
24
- await this.createRTSPServer();
25
- const sourceName = 'P2P';
26
- const streamUrls = [this.rtspServer.streamUrl];
27
- // const streamUrls = [`ffmpeg:${this.rtspServer.streamUrl}#video=copy#audio=opus`];
28
- // const streamUrls = [this.rtspServer.streamUrl, `ffmpeg:${transcodedSourceName}#video=copy#audio=opus`];
29
- const cameraDevice = Array.from(this.platform.cameras.values()).find((camera) => camera.nativeId === this.eufyDevice.getSerial());
30
- if (!cameraDevice) {
31
- this.logger.log(this.home.name, 'Adding camera', this.eufyDevice.getName());
32
- this.cameraDevice = await this.platform.api.deviceManager.createCamera({
33
- name: this.eufyDevice.getName(),
34
- nativeId: this.eufyDevice.getSerial(),
35
- hasBattery: this.eufyDevice.hasBattery(),
36
- info: {
37
- manufacturer: 'Eufy',
38
- model: this.eufyDevice.getModel(),
39
- hardware: this.eufyDevice.getHardwareVersion(),
40
- serialNumber: this.eufyDevice.getSerial(),
41
- firmwareVersion: this.eufyDevice.getSoftwareVersion(),
42
- supportUrl: 'https://support.eufy.com/',
43
- },
44
- sources: [
45
- {
46
- name: sourceName,
47
- roles: ['high-resolution', 'snapshot'],
48
- urls: streamUrls,
49
- },
50
- ],
51
- });
52
- }
53
- else {
54
- this.cameraDevice = cameraDevice;
55
- await this.cameraDevice.updateCameraSource(cameraDevice.streamSource._id, { urls: streamUrls });
56
- }
57
- this.cameraDevice.setDelegate('cameraDelegate', this);
58
- this.localLivestreamManager = new LocalLivestreamManager(this.home, this.eufyClient, this.eufyDevice, this.cameraDevice, this.logger);
59
- this.talkbackStream = new TalkbackStream(this.home, this.eufyClient, this.eufyDevice, this.cameraDevice, this.logger);
60
- const ffmpegPath = await this.platform.api.coreManager.getFFmpegPath();
61
- this.rtspServer.changeFFmpegPath(ffmpegPath);
62
- await this.cameraDevice.connect();
63
- this.checkStates();
64
- }
65
- async snapshot() {
66
- return;
67
- }
68
- async reboot() {
69
- return;
70
- }
71
- async createRTSPServer() {
72
- let stream;
73
- if (this.home.useP2P) {
74
- stream = {
75
- name: 'Eufy',
76
- addBackchannel: true,
77
- ffmpegArgs: {
78
- inputArgs: ['-f', 'h264', '-i', 'pipe:3', '-f', 'aac', '-i', 'pipe:4'],
79
- audioEncoderArgs: ['-acodec', 'libopus', '-application:a', 'lowdelay', '-min_comp', '0'],
80
- videoEncoderArgs: ['-vcodec', 'copy'],
81
- },
82
- ffmpegTalkbackArgs: {
83
- audioEncoderArgs: ['-acodec', 'libfdk_aac', '-ac', '2', '-ar', '16k', '-b:a', '20k', '-f', 'adts'],
84
- outputArgs: ['-'],
85
- },
86
- };
87
- }
88
- else {
89
- stream = {
90
- name: 'Eufy',
91
- url: this.eufyDevice.getPropertyValue(PropertyName.DeviceRTSPStreamUrl),
92
- };
93
- }
94
- const rtspLogger = {
95
- // log: this.logger.log.bind(this.logger),
96
- warn: this.logger.warn.bind(this.logger),
97
- error: this.logger.error.bind(this.logger),
98
- // debug: this.logger.trace.bind(this.logger),
99
- };
100
- this.rtspServer = await RTSPSingleServer.initialize({ stream }, rtspLogger);
101
- await this.rtspServer.listen();
102
- if (this.home.useP2P) {
103
- const client = this.rtspServer.getClient();
104
- client.onStreamStarted.subscribe(async (streamProcess) => {
105
- try {
106
- const stationStream = await this.localLivestreamManager.getLocalLivestream();
107
- stationStream.videostream.pipe(streamProcess.cp.stdio[4]);
108
- stationStream.audiostream.pipe(streamProcess.cp.stdio[5]);
109
- }
110
- catch (error) {
111
- this.logger.error(this.home.name, this.cameraDevice.name, 'Failed to start local livestream:', error);
112
- streamProcess.kill();
113
- }
114
- });
115
- client.onStreamStopped.subscribe(() => {
116
- this.localLivestreamManager.stopLocalLiveStream();
117
- });
118
- client.onTalkbackProcessStarted.subscribe((talkbackProcess) => {
119
- talkbackProcess.cp.stdout?.pipe(this.talkbackStream);
120
- });
121
- }
122
- }
123
- checkStates() {
124
- this.logger.debug(`${this.cameraDevice.name}: Checking states...`);
125
- }
126
- }
127
- //# sourceMappingURL=camera.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camera.js","sourceRoot":"","sources":["../src/camera.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASpD,MAAM,OAAO,MAAM;IACV,YAAY,CAAgB;IAE3B,QAAQ,CAAO;IACf,IAAI,CAAW;IACf,UAAU,CAAe;IACzB,UAAU,CAAa;IACvB,MAAM,CAAgB;IACtB,UAAU,CAAU;IAEpB,UAAU,CAAoB;IAC9B,sBAAsB,CAA0B;IAChD,cAAc,CAAkB;IAExC,YAAY,QAAc,EAAE,IAAc,EAAE,UAAwB,EAAE,UAAsB,EAAE,MAAqB;QACjH,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC7B,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE9B,MAAM,UAAU,GAAG,KAAK,CAAC;QACzB,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC/C,oFAAoF;QACpF,0GAA0G;QAE1G,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EA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IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,CAAQ,CAAa,CAAC,CAAC;gBAC/E,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,mCAAmC,EAAE,KAAK,CAAC,CAAC;oBACtG,aAAa,CAAC,IAAI,EAAE,CAAC;gBACvB,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,CAAC;YACpD,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,EAAE;gBAC5D,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,sBAAsB,CAAC,CAAC;IACrE,CAAC;CACF"}
@@ -1,31 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import type { CameraDevice, LoggerService } from '@camera.ui/types';
3
- import type { Device, EufySecurity, Station, StreamMetadata } from 'eufy-security-client';
4
- import type { Readable } from 'node:stream';
5
- import type { EufyHome } from '../types.js';
6
- export type StationStream = {
7
- station: Station;
8
- device: Device;
9
- metadata: StreamMetadata;
10
- videostream: Readable;
11
- audiostream: Readable;
12
- createdAt: number;
13
- };
14
- export declare class LocalLivestreamManager extends EventEmitter {
15
- private readonly CONNECTION_ESTABLISHED_TIMEOUT;
16
- private stationStream;
17
- private livestreamStartedAt;
18
- private livestreamIsStarting;
19
- private eufyClient;
20
- private cameraDevice;
21
- private home;
22
- private logger;
23
- private serial_number;
24
- constructor(home: EufyHome, eufyClient: EufySecurity, eufyDevice: Device, cameraDevice: CameraDevice, logger: LoggerService);
25
- private initialize;
26
- getLocalLivestream(): Promise<StationStream>;
27
- private startAndGetLocalLiveStream;
28
- stopLocalLiveStream(): void;
29
- private onStationLivestreamStop;
30
- private onStationLivestreamStart;
31
- }