diff --git a/plugins/alexa/src/types/camera.ts b/plugins/alexa/src/types/camera.ts index 378d6f842..7f4cf8f6a 100644 --- a/plugins/alexa/src/types/camera.ts +++ b/plugins/alexa/src/types/camera.ts @@ -1,27 +1,20 @@ -import sdk, { FFMpegInput, HttpResponse, MotionSensor, RTCAVSignalingSetup, RTCSignalingChannel, RTCSignalingOptions, RTCSignalingSendIceCandidate, RTCSignalingSession, ScryptedDevice, ScryptedDeviceType, ScryptedInterface, ScryptedMimeTypes, VideoCamera } from "@scrypted/sdk"; +import { HttpResponse, MotionSensor, RTCAVSignalingSetup, RTCSignalingChannel, RTCSignalingOptions, RTCSignalingSendIceCandidate, RTCSignalingSession, ScryptedDevice, ScryptedDeviceType, ScryptedInterface, VideoCamera } from "@scrypted/sdk"; import { addSupportedType, AlexaCapabilityHandler, capabilityHandlers, EventReport } from "./common"; -import { startRTCPeerConnectionFFmpegInput } from '@scrypted/common/src/ffmpeg-to-wrtc'; -import { BrowserSignalingSession, startRTCSignalingSession } from '@scrypted/common/src/rtc-signaling'; -import crypto from 'crypto'; import { createMessageId } from "../message"; import { Capability } from "alexa-smarthome-ts/lib/skill/Capability"; -import { DiscoveryEndpoint } from "alexa-smarthome-ts"; - -const { mediaManager } = sdk; addSupportedType(ScryptedDeviceType.Camera, { probe(device) { - if (!device.interfaces.includes(ScryptedInterface.VideoCamera)) + if (!device.interfaces.includes(ScryptedInterface.RTCSignalingChannel)) return; - const capabilities: Capability[] = [ { "type": "AlexaInterface", "interface": "Alexa.RTCSessionController", "version": "3", "configuration": { - "isFullDuplexAudioSupported": false, + isFullDuplexAudioSupported: true, } } as any, ]; diff --git a/plugins/alexa/src/types/doorbell.ts b/plugins/alexa/src/types/doorbell.ts index 44966bf35..b17815f8a 100644 --- a/plugins/alexa/src/types/doorbell.ts +++ b/plugins/alexa/src/types/doorbell.ts @@ -1,11 +1,13 @@ -import sdk, { BinarySensor, ScryptedDevice, ScryptedDeviceType, ScryptedInterface } from "@scrypted/sdk"; +import { BinarySensor, ScryptedDevice, ScryptedDeviceType, ScryptedInterface } from "@scrypted/sdk"; import { addSupportedType, EventReport } from "./common"; addSupportedType(ScryptedDeviceType.Doorbell, { probe(device) { - if (!device.interfaces.includes(ScryptedInterface.VideoCamera) || !device.interfaces.includes(ScryptedInterface.BinarySensor)) + if (!device.interfaces.includes(ScryptedInterface.RTCSignalingChannel) || !device.interfaces.includes(ScryptedInterface.BinarySensor)) return; + const isFullDuplexAudioSupported = device.providedInterfaces.includes(ScryptedInterface.Intercom) || device.providedInterfaces.includes(ScryptedInterface.RTCSignalingChannel); + return { displayCategories: ['CAMERA'], capabilities: [ @@ -14,7 +16,7 @@ addSupportedType(ScryptedDeviceType.Doorbell, { "interface": "Alexa.RTCSessionController", "version": "3", "configuration": { - "isFullDuplexAudioSupported": false, + isFullDuplexAudioSupported: true, } }, {