@camera.ui/camera-ui-homekit 0.0.28 → 0.0.29

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.
Files changed (59) hide show
  1. package/bundle.zip +0 -0
  2. package/package.json +17 -34
  3. package/CHANGELOG.md +0 -8
  4. package/CONTRIBUTING.md +0 -1
  5. package/LICENSE.md +0 -22
  6. package/README.md +0 -1
  7. package/dist/camera/accessory.d.ts +0 -28
  8. package/dist/camera/accessory.js +0 -380
  9. package/dist/camera/accessory.js.map +0 -1
  10. package/dist/camera/recordingDelegate.d.ts +0 -27
  11. package/dist/camera/recordingDelegate.js +0 -264
  12. package/dist/camera/recordingDelegate.js.map +0 -1
  13. package/dist/camera/services.d.ts +0 -28
  14. package/dist/camera/services.js +0 -202
  15. package/dist/camera/services.js.map +0 -1
  16. package/dist/camera/sessionWrapper.d.ts +0 -40
  17. package/dist/camera/sessionWrapper.js +0 -517
  18. package/dist/camera/sessionWrapper.js.map +0 -1
  19. package/dist/camera/streamingDelegate.d.ts +0 -14
  20. package/dist/camera/streamingDelegate.js +0 -100
  21. package/dist/camera/streamingDelegate.js.map +0 -1
  22. package/dist/camera/streamingServer.d.ts +0 -26
  23. package/dist/camera/streamingServer.js +0 -145
  24. package/dist/camera/streamingServer.js.map +0 -1
  25. package/dist/constants.d.ts +0 -1
  26. package/dist/constants.js +0 -7
  27. package/dist/constants.js.map +0 -1
  28. package/dist/crypto.d.ts +0 -1
  29. package/dist/crypto.js +0 -34
  30. package/dist/crypto.js.map +0 -1
  31. package/dist/index.d.ts +0 -16
  32. package/dist/index.js +0 -53
  33. package/dist/index.js.map +0 -1
  34. package/dist/types.d.ts +0 -16
  35. package/dist/types.js +0 -2
  36. package/dist/types.js.map +0 -1
  37. package/dist/utils/mac.d.ts +0 -4
  38. package/dist/utils/mac.js +0 -19
  39. package/dist/utils/mac.js.map +0 -1
  40. package/dist/utils/opus-repacketizer.d.ts +0 -7
  41. package/dist/utils/opus-repacketizer.js +0 -163
  42. package/dist/utils/opus-repacketizer.js.map +0 -1
  43. package/dist/utils/processor.d.ts +0 -85
  44. package/dist/utils/processor.js +0 -475
  45. package/dist/utils/processor.js.map +0 -1
  46. package/dist/utils/return-audio-transcoder.d.ts +0 -39
  47. package/dist/utils/return-audio-transcoder.js +0 -82
  48. package/dist/utils/return-audio-transcoder.js.map +0 -1
  49. package/dist/utils/srtp.d.ts +0 -8
  50. package/dist/utils/srtp.js +0 -22
  51. package/dist/utils/srtp.js.map +0 -1
  52. package/dist/utils/utils.d.ts +0 -10
  53. package/dist/utils/utils.js +0 -38
  54. package/dist/utils/utils.js.map +0 -1
  55. package/media/cameraOffline.png +0 -0
  56. package/media/maxStreams.png +0 -0
  57. package/media/noSnapshot.png +0 -0
  58. package/media/privacyMode.png +0 -0
  59. package/scripts/install-optional-deps.js +0 -17
package/bundle.zip ADDED
Binary file
package/package.json CHANGED
@@ -1,49 +1,31 @@
1
1
  {
2
2
  "displayName": "HomeKit",
3
3
  "name": "@camera.ui/camera-ui-homekit",
4
- "version": "0.0.28",
4
+ "version": "0.0.29",
5
5
  "description": "camera.ui homekit 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",
16
- "postinstall": "node scripts/install-optional-deps.js"
17
- },
18
- "dependencies": {
19
- "@camera.ui/common": "^0.0.22",
20
- "hap-nodejs": "^1.1.0",
21
- "pick-port": "^2.1.0",
22
- "rxjs": "^7.8.1",
23
- "werift": "^0.20.0"
24
- },
25
- "devDependencies": {
26
- "@camera.ui/types": "^0.0.77",
27
- "@rushstack/eslint-patch": "^1.10.4",
28
- "@types/node": "^22.7.6",
29
- "@types/ws": "^8.5.12",
30
- "@typescript-eslint/eslint-plugin": "^8.10.0",
31
- "@typescript-eslint/parser": "^8.10.0",
32
- "concurrently": "^9.0.1",
33
- "eslint": "8.57.0",
34
- "eslint-config-prettier": "^9.1.0",
35
- "eslint-plugin-prettier": "^5.2.1",
36
- "prettier": "^3.3.3",
37
- "rimraf": "^6.0.1",
38
- "typescript": "^5.6.3",
39
- "updates": "^16.4.0"
14
+ "lint": "eslint .",
15
+ "lint:fix": "eslint --fix .",
16
+ "postinstall": "node scripts/install-optional-deps.js",
17
+ "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)}\"",
18
+ "publish:alpha": "cui publish --alpha",
19
+ "publish:beta": "cui publish --beta",
20
+ "publish:latest": "cui publish --latest",
21
+ "update": "updates --update ./"
40
22
  },
41
23
  "bugs": {
42
24
  "url": "https://github.com/seydx/camera.ui/issues"
43
25
  },
44
26
  "engines": {
45
- "camera.ui": ">=0.0.34-alpha.2",
46
- "node": ">=20.17.0"
27
+ "camera.ui": ">=0.0.34-alpha.4",
28
+ "node": ">=20.18.0"
47
29
  },
48
30
  "homepage": "https://github.com/seydx/camera.ui#readme",
49
31
  "keywords": [
@@ -58,6 +40,7 @@
58
40
  },
59
41
  "camera.ui": {
60
42
  "extension": "hub",
61
- "dependencies": []
43
+ "dependencies": [],
44
+ "bundled": true
62
45
  }
63
- }
46
+ }
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-homekit
@@ -1,28 +0,0 @@
1
- import { CameraController } from 'hap-nodejs';
2
- import { Subscribed } from '../utils/utils.js';
3
- import type { CameraDevice, CameraStorage, PluginAPI } from '@camera.ui/types';
4
- import type HomeKit from '../index.js';
5
- import type { CameraStorageValues } from '../types.js';
6
- export declare class CameraAccessory extends Subscribed {
7
- controller?: CameraController;
8
- cameraStorage: CameraStorage<CameraStorageValues>;
9
- api: PluginAPI;
10
- private logger;
11
- private cameraLogger;
12
- private cameraDevice;
13
- private accessory?;
14
- private cameraServices?;
15
- private published;
16
- private publishedExternalAccessories;
17
- private accessoryPort;
18
- private get advertiser();
19
- constructor(platform: HomeKit, cameraDevice: CameraDevice);
20
- teardown(destroy?: boolean): Promise<void>;
21
- private publishAccessory;
22
- private unpublishAccessory;
23
- private republishAccessory;
24
- private resetAccessory;
25
- private setupAccessory;
26
- private createCameraStorage;
27
- private createControllerOptions;
28
- }
@@ -1,380 +0,0 @@
1
- import { randomBytes } from 'crypto';
2
- import { Accessory, CameraController, Characteristic, Service, uuid, } from 'hap-nodejs';
3
- import { ControllerStorage } from 'hap-nodejs/dist/lib/model/ControllerStorage.js';
4
- import { baseAdvertiser } from '../constants.js';
5
- import * as mac from '../utils/mac.js';
6
- import { generateValidAccessoryName, Subscribed } from '../utils/utils.js';
7
- import { RecordingDelegate } from './recordingDelegate.js';
8
- import { CameraServices } from './services.js';
9
- import { StreamingDelegate } from './streamingDelegate.js';
10
- export class CameraAccessory extends Subscribed {
11
- controller;
12
- cameraStorage;
13
- api;
14
- logger;
15
- cameraLogger;
16
- cameraDevice;
17
- accessory;
18
- cameraServices;
19
- published = false;
20
- publishedExternalAccessories = new Map();
21
- accessoryPort;
22
- get advertiser() {
23
- return this.cameraStorage.values.advertiser.split(' (')[0];
24
- }
25
- constructor(platform, cameraDevice) {
26
- super();
27
- this.api = platform.api;
28
- this.logger = platform.logger;
29
- this.cameraLogger = cameraDevice.logger;
30
- this.cameraDevice = cameraDevice;
31
- this.cameraStorage = this.createCameraStorage();
32
- this.cameraDevice.onConnected.subscribe(async (connected) => {
33
- if (connected) {
34
- await this.publishAccessory(false);
35
- }
36
- else {
37
- await this.unpublishAccessory(false);
38
- }
39
- });
40
- }
41
- async teardown(destroy) {
42
- if (this.published) {
43
- this.published = false;
44
- if (this.accessory) {
45
- this.accessory.removeAllListeners();
46
- if (destroy) {
47
- this.cameraLogger.log('Removing...');
48
- await this.accessory.destroy();
49
- }
50
- else {
51
- this.cameraLogger.log('Stopping...');
52
- await this.accessory.unpublish();
53
- }
54
- this.resetAccessory(destroy);
55
- const advertiseAddress = await this.cameraStorage.getValue('advertiseAddress');
56
- this.publishedExternalAccessories.delete(advertiseAddress);
57
- }
58
- }
59
- }
60
- async publishAccessory(republish) {
61
- if (!this.published) {
62
- try {
63
- const accessoryPin = await this.cameraStorage.getValue('accessoryPin');
64
- const advertiseAddress = await this.cameraStorage.getValue('advertiseAddress');
65
- const accessoryPortOverride = this.cameraStorage.values.accessoryPortOverride;
66
- if (this.publishedExternalAccessories.has(advertiseAddress)) {
67
- throw new Error(`Accessory ${this.cameraDevice.name} experienced an address collision.`);
68
- }
69
- if (!republish) {
70
- this.cameraLogger.log(`Publishing camera (${this.advertiser})`);
71
- }
72
- else {
73
- this.cameraLogger.log(`Republishing camera (${this.advertiser})`);
74
- }
75
- this.setupAccessory();
76
- this.accessory.on("listening" /* AccessoryEventTypes.LISTENING */, (port) => {
77
- this.accessoryPort = port;
78
- this.cameraLogger.debug(`is running on port ${port}`);
79
- this.cameraLogger.log(`Please add the camera manually in Home app. Setup Code: ${accessoryPin}`);
80
- });
81
- const addresses = await this.api.coreManager.getServerAddresses();
82
- let bind = addresses.length ? addresses : undefined;
83
- if (!bind) {
84
- this.cameraLogger.debug('No server addresses set, binding to: en0, lo0, 0.0.0.0');
85
- bind = ['en0', 'lo0', '0.0.0.0'];
86
- }
87
- const port = accessoryPortOverride === 0 && this.accessoryPort === undefined ? undefined : accessoryPortOverride || this.accessoryPort;
88
- const publishInfo = {
89
- username: advertiseAddress,
90
- pincode: accessoryPin,
91
- category: this.accessory.category,
92
- port,
93
- bind,
94
- addIdentifyingMaterial: true,
95
- advertiser: this.advertiser,
96
- };
97
- await this.accessory.publish(publishInfo);
98
- this.publishedExternalAccessories.set(advertiseAddress, this.accessory);
99
- this.published = true;
100
- }
101
- catch (error) {
102
- this.cameraLogger.error('Error publishing camera', error);
103
- this.unpublishAccessory(true);
104
- }
105
- }
106
- }
107
- async unpublishAccessory(reset) {
108
- if (this.accessory) {
109
- if (!reset) {
110
- this.accessory.controllerStorage = new ControllerStorage(this.accessory);
111
- }
112
- await this.teardown(reset);
113
- }
114
- }
115
- async republishAccessory(reset) {
116
- await this.unpublishAccessory(reset);
117
- await this.publishAccessory(!reset);
118
- }
119
- resetAccessory(destroy) {
120
- if (destroy) {
121
- this.accessoryPort = undefined;
122
- }
123
- this.cameraServices = undefined;
124
- this.accessory = undefined;
125
- this.unsubscribe();
126
- }
127
- setupAccessory() {
128
- this.cameraLogger.log('Configuring camera...');
129
- const republishId = this.cameraStorage.values.republishId;
130
- const accessoryUUID = uuid.generate(republishId + '-' + this.cameraDevice.id);
131
- this.accessory = new Accessory(generateValidAccessoryName(this.cameraDevice.name), accessoryUUID);
132
- this.accessory.category = this.cameraDevice.type === 'doorbell' ? 18 /* Categories.VIDEO_DOORBELL */ : 17 /* Categories.IP_CAMERA */;
133
- const accessoryInformation = this.accessory.getService(Service.AccessoryInformation);
134
- accessoryInformation?.setCharacteristic(Characteristic.Name, this.cameraDevice.name);
135
- accessoryInformation?.setCharacteristic(Characteristic.ConfiguredName, this.cameraDevice.name);
136
- accessoryInformation?.setCharacteristic(Characteristic.Manufacturer, 'camera.ui');
137
- accessoryInformation?.setCharacteristic(Characteristic.Identify, true);
138
- if (this.cameraDevice.info.manufacturer)
139
- accessoryInformation?.setCharacteristic(Characteristic.Manufacturer, this.cameraDevice.info.manufacturer);
140
- if (this.cameraDevice.info.model)
141
- accessoryInformation?.setCharacteristic(Characteristic.Model, this.cameraDevice.info.model);
142
- if (this.cameraDevice.info.serialNumber)
143
- accessoryInformation?.setCharacteristic(Characteristic.SerialNumber, this.cameraDevice.info.serialNumber);
144
- if (this.cameraDevice.info.firmwareVersion)
145
- accessoryInformation?.setCharacteristic(Characteristic.FirmwareRevision, this.cameraDevice.info.firmwareVersion);
146
- this.accessory.on("identify" /* AccessoryEventTypes.IDENTIFY */, () => this.cameraLogger.debug('identified!'));
147
- this.addSubscriptions(this.cameraDevice.onPropertyChange('type').subscribe(({ newData }) => {
148
- this.cameraLogger.debug('Changing accessory category to', newData);
149
- if (this.accessory) {
150
- this.accessory.category = newData === 'doorbell' ? 18 /* Categories.VIDEO_DOORBELL */ : 17 /* Categories.IP_CAMERA */;
151
- }
152
- }), this.cameraDevice.onPropertyChange('name').subscribe(({ newData }) => {
153
- this.cameraLogger.debug('Changing accessory name', newData);
154
- accessoryInformation?.setCharacteristic(Characteristic.Name, this.cameraDevice.name);
155
- accessoryInformation?.setCharacteristic(Characteristic.ConfiguredName, this.cameraDevice.name);
156
- }), this.cameraDevice.onPropertyChange('info').subscribe(({ newData }) => {
157
- this.cameraLogger.debug('Changing accessory information', newData);
158
- if (newData.manufacturer)
159
- accessoryInformation?.setCharacteristic(Characteristic.Manufacturer, newData.manufacturer);
160
- if (newData.model)
161
- accessoryInformation?.setCharacteristic(Characteristic.Model, newData.model);
162
- if (newData.serialNumber)
163
- accessoryInformation?.setCharacteristic(Characteristic.SerialNumber, newData.serialNumber);
164
- if (newData.firmwareVersion)
165
- accessoryInformation?.setCharacteristic(Characteristic.FirmwareRevision, newData.firmwareVersion);
166
- }));
167
- this.cameraServices = new CameraServices(this.accessory, this, this.cameraDevice);
168
- this.controller = new CameraController(this.createControllerOptions(this.accessory));
169
- this.accessory.configureController(this.controller);
170
- }
171
- createCameraStorage() {
172
- return this.api.storageController.createCameraStorage(this, this.cameraDevice.id, {
173
- qrCode: {
174
- type: 'string',
175
- key: 'qrCode',
176
- title: 'QR Code',
177
- description: 'The QR code to use for pairing the HomeKit camera',
178
- format: 'qrCode',
179
- group: 'Pairing',
180
- readonly: true,
181
- onGet: async () => {
182
- return this.accessory?.setupURI() || '';
183
- },
184
- },
185
- accessoryPin: {
186
- type: 'string',
187
- key: 'pincode',
188
- title: 'PIN',
189
- description: 'The pin to use for pairing the HomeKit camera',
190
- group: 'Pairing',
191
- store: true,
192
- readonly: true,
193
- onGet: async () => {
194
- if (this.cameraStorage.values.accessoryPin) {
195
- return this.cameraStorage.values.accessoryPin;
196
- }
197
- return mac.randomPinCode();
198
- },
199
- },
200
- accessoryPort: {
201
- type: 'number',
202
- key: 'accessoryPort',
203
- title: 'Port',
204
- description: 'The port to use for the HomeKit camera',
205
- group: 'Advanced',
206
- readonly: true,
207
- onGet: async () => {
208
- return this.accessoryPort;
209
- },
210
- },
211
- accessoryPortOverride: {
212
- type: 'number',
213
- key: 'accessoryPortOverride',
214
- title: 'Override Port',
215
- description: 'Override the port to use for the HomeKit camera (0 = auto)',
216
- group: 'Advanced',
217
- store: true,
218
- required: false,
219
- defaultValue: 0,
220
- minimum: 0,
221
- maximum: 65535,
222
- onSet: async () => {
223
- await this.republishAccessory();
224
- },
225
- },
226
- advertiser: {
227
- type: 'string',
228
- key: 'advertiser',
229
- title: 'mDNS advertiser',
230
- description: 'The mDNS advertiser to use for the HomeKit camera',
231
- group: 'Advanced',
232
- store: true,
233
- defaultValue: baseAdvertiser[0],
234
- enum: baseAdvertiser,
235
- onSet: async (newAdvertiser) => {
236
- const advertiser = newAdvertiser.split(' (')[0];
237
- this.cameraLogger.log('Changing mDNS advertiser to:', advertiser);
238
- await this.republishAccessory();
239
- },
240
- },
241
- advertiseAddress: {
242
- type: 'string',
243
- key: 'advertiseAddress',
244
- title: 'Username',
245
- description: 'The username to use for pairing the HomeKit camera',
246
- readonly: true,
247
- hidden: true,
248
- onGet: async () => {
249
- const republishId = this.cameraStorage.values.republishId;
250
- return mac.generate(`${republishId}-${this.cameraDevice.id}`);
251
- },
252
- },
253
- republishId: {
254
- type: 'string',
255
- store: true,
256
- hidden: true,
257
- defaultValue: '',
258
- },
259
- reset: {
260
- type: 'button',
261
- title: 'Reset Pairing',
262
- key: 'reset',
263
- group: 'Reset',
264
- description: 'Reset the pairing of the HomeKit camera',
265
- onSet: async () => {
266
- this.cameraLogger.log('Reset pairing...');
267
- await this.cameraStorage.setValue('republishId', randomBytes(8).toString('hex'));
268
- await this.cameraStorage.setValue('accessoryPin', mac.randomPinCode());
269
- await this.republishAccessory(true);
270
- },
271
- },
272
- useHardwareAcceleration: {
273
- type: 'boolean',
274
- key: 'useHardwareAcceleration',
275
- title: 'Use Hardware Acceleration',
276
- description: 'Use hardware acceleration for streaming',
277
- group: 'Advanced',
278
- defaultValue: true,
279
- store: true,
280
- },
281
- transcodeStreaming: {
282
- type: 'boolean',
283
- key: 'transcodeStreaming',
284
- title: 'Transcode Streaming',
285
- description: 'Force transcode streaming',
286
- group: 'Advanced',
287
- defaultValue: false,
288
- store: true,
289
- },
290
- transcodeRecording: {
291
- type: 'boolean',
292
- key: 'transcodeRecording',
293
- title: 'Transcode Recording',
294
- description: 'Force transcode recording for HKSV',
295
- group: 'Advanced',
296
- defaultValue: false,
297
- store: true,
298
- },
299
- });
300
- }
301
- createControllerOptions(accessory) {
302
- return {
303
- cameraStreamCount: 10,
304
- delegate: new StreamingDelegate(this, this.cameraDevice),
305
- streamingOptions: {
306
- supportedCryptoSuites: [0 /* SRTPCryptoSuites.AES_CM_128_HMAC_SHA1_80 */],
307
- video: {
308
- resolutions: [
309
- [320, 180, 30],
310
- [320, 240, 15], // Apple Watch requires this configuration
311
- [320, 240, 30],
312
- [480, 270, 30],
313
- [480, 360, 30],
314
- [640, 360, 30],
315
- [640, 480, 30],
316
- [1280, 720, 30],
317
- [1280, 960, 30],
318
- [1920, 1080, 30],
319
- ],
320
- codec: {
321
- profiles: [0 /* H264Profile.BASELINE */],
322
- levels: [0 /* H264Level.LEVEL3_1 */, 1 /* H264Level.LEVEL3_2 */, 2 /* H264Level.LEVEL4_0 */],
323
- },
324
- },
325
- audio: {
326
- codecs: [
327
- {
328
- type: "OPUS" /* AudioStreamingCodecType.OPUS */,
329
- // required by watch
330
- samplerate: 8 /* AudioStreamingSamplerate.KHZ_8 */,
331
- },
332
- {
333
- type: "OPUS" /* AudioStreamingCodecType.OPUS */,
334
- samplerate: 16 /* AudioStreamingSamplerate.KHZ_16 */,
335
- },
336
- {
337
- type: "OPUS" /* AudioStreamingCodecType.OPUS */,
338
- samplerate: 24 /* AudioStreamingSamplerate.KHZ_24 */,
339
- },
340
- ],
341
- twoWayAudio: true,
342
- },
343
- },
344
- recording: {
345
- options: {
346
- prebufferLength: 8000,
347
- mediaContainerConfiguration: [
348
- {
349
- type: 0 /* MediaContainerType.FRAGMENTED_MP4 */,
350
- fragmentLength: 4000,
351
- },
352
- ],
353
- video: {
354
- type: 0 /* VideoCodecType.H264 */,
355
- parameters: {
356
- levels: [0 /* H264Level.LEVEL3_1 */, 1 /* H264Level.LEVEL3_2 */, 2 /* H264Level.LEVEL4_0 */],
357
- profiles: [1 /* H264Profile.MAIN */],
358
- },
359
- resolutions: [
360
- [1280, 720, 30],
361
- [1920, 1080, 30],
362
- ],
363
- },
364
- audio: {
365
- codecs: [
366
- {
367
- type: 0 /* AudioRecordingCodecType.AAC_LC */,
368
- bitrateMode: 0 /* AudioBitrate.VARIABLE */,
369
- samplerate: 3 /* AudioRecordingSamplerate.KHZ_32 */,
370
- audioChannels: 1,
371
- },
372
- ],
373
- },
374
- },
375
- delegate: new RecordingDelegate(this, accessory, this.cameraDevice),
376
- },
377
- };
378
- }
379
- }
380
- //# sourceMappingURL=accessory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accessory.js","sourceRoot":"","sources":["../../src/camera/accessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EACL,SAAS,EAOT,gBAAgB,EAEhB,cAAc,EAId,OAAO,EAEP,IAAI,GAEL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM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4BACV,MAAM,EAAE,oFAA4D;4BACpE,QAAQ,EAAE,0BAAkB;yBAC7B;wBACD,WAAW,EAAE;4BACX,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC;4BACf,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;yBACjB;qBACF;oBACD,KAAK,EAAE;wBACL,MAAM,EAAE;4BACN;gCACE,IAAI,wCAAgC;gCACpC,WAAW,+BAAuB;gCAClC,UAAU,yCAAiC;gCAC3C,aAAa,EAAE,CAAC;6BACjB;yBACF;qBACF;iBACF;gBACD,QAAQ,EAAE,IAAI,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;aACpE;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,27 +0,0 @@
1
- import { HDSProtocolSpecificErrorReason } from 'hap-nodejs';
2
- import type { CameraDevice } from '@camera.ui/types';
3
- import type { Accessory, CameraRecordingConfiguration, CameraRecordingDelegate, RecordingPacket } from 'hap-nodejs';
4
- import type { CameraAccessory } from './accessory.js';
5
- export declare class RecordingDelegate implements CameraRecordingDelegate {
6
- private cameraAccessory;
7
- private accessory;
8
- private cameraDevice;
9
- private cameraLogger;
10
- private isRecording;
11
- private handlingRecordingRequest;
12
- private maxVideoDuration;
13
- private recordingTimeout?;
14
- private server?;
15
- private configuration?;
16
- constructor(cameraAccessory: CameraAccessory, accessory: Accessory, cameraDevice: CameraDevice);
17
- updateRecordingActive(active: boolean): Promise<void>;
18
- updateRecordingConfiguration(configuration?: CameraRecordingConfiguration): void;
19
- handleRecordingStreamRequest(streamId: number): AsyncGenerator<RecordingPacket, any, unknown>;
20
- closeRecordingStream(streamId: number, reason?: HDSProtocolSpecificErrorReason): Promise<void>;
21
- acknowledgeStream(streamId: number): Promise<void>;
22
- private cleanupRecording;
23
- private getSampleRate;
24
- private getProfile;
25
- private getLevel;
26
- private getHdsReason;
27
- }