Interface CameraControllerOptions

interface CameraControllerOptions {
    cameraStreamCount?: number;
    delegate: CameraStreamingDelegate;
    recording?: {
        delegate: CameraRecordingDelegate;
        options: CameraRecordingOptions;
    };
    sensors?: {
        motion?: boolean | Service;
        occupancy?: boolean | Service;
    };
    streamingOptions: CameraStreamingOptions;
}

Properties

cameraStreamCount?: number

Amount of parallel camera streams the accessory is capable of running. As of the official HAP specification non SecureVideo cameras have a minimum required amount of 2 (but 1 is also fine). Secure Video cameras just expose 1 stream.

Default value: 1

Delegate which handles the actual RTP/RTCP video/audio streaming and Snapshot requests.

recording?: {
    delegate: CameraRecordingDelegate;
    options: CameraRecordingOptions;
}

When supplying this option, it will enable support for HomeKit Secure Video. This will create the Service.CameraRecordingManagement, Service.CameraOperatingMode and Service.DataStreamTransportManagement services.

NOTE: The controller only initializes the required characteristics for the Service.CameraOperatingMode. You may add optional characteristics, if required, by accessing the service directly CameraController.recordingManagement.operatingModeService.

Type declaration

sensors?: {
    motion?: boolean | Service;
    occupancy?: boolean | Service;
}

This config section configures optional sensors for the camera. It e.g. may be used to set up a EventTriggerOption.MOTION trigger when configuring Secure Video.

You may either specify and provide the desired Services or specify their creation and maintenance using a boolean flag. In this case the controller will create and maintain the service for you. Otherwise, when you supply an already created instance of the Service, you are responsible yourself to manage the service (e.g. creating, restoring, adding to the accessory, ...).

The services can be accessed through the documented property after the call to Accessory.configureController has returned.

Type declaration

streamingOptions: CameraStreamingOptions

Options regarding video/audio streaming