From 5e52ab8d60a06b214a7bfdec1c793b759ade095e Mon Sep 17 00:00:00 2001 From: Baku Hashimoto Date: Wed, 18 Sep 2024 00:54:50 +0900 Subject: [PATCH] Add TethrManager.pairedCameras --- core/src/TethrManager.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/TethrManager.ts b/core/src/TethrManager.ts index eca6005..4423463 100644 --- a/core/src/TethrManager.ts +++ b/core/src/TethrManager.ts @@ -82,12 +82,14 @@ export class TethrManager extends EventEmitter { } #emitPairedCameras() { - const cameras = [ + this.emit('pairedCameraChange', this.pairedCameras) + } + + get pairedCameras(): Tethr[] { + return [ ...this.#ptpusbCameras.values(), ...(this.#webcam ? [this.#webcam] : []), ] - - this.emit('pairedCameraChange', cameras) } /**