* Implement a webrtc to rtsp support in camera as a registry Allow integrations to register a provider that can convert an RTSP stream and WebRTC offer to a WebRTC answer. This is planned to be used by the RTSPtoWebRTC server integration as an initial pass, but could support other server implementations as well (or even native implementationf or that matter). * Fix test bug to improve test covergae and restructure statements * Add missing call to refresh webrtc providers * Run provider refresh in parallel since it may send RPCs * Replace for loop with any * Fix pylint warning to use a generator
26 lines
835 B
Python
26 lines
835 B
Python
"""Constants for Camera component."""
|
|
from typing import Final
|
|
|
|
DOMAIN: Final = "camera"
|
|
|
|
DATA_CAMERA_PREFS: Final = "camera_prefs"
|
|
DATA_RTSP_TO_WEB_RTC: Final = "rtsp_to_web_rtc"
|
|
|
|
PREF_PRELOAD_STREAM: Final = "preload_stream"
|
|
|
|
SERVICE_RECORD: Final = "record"
|
|
|
|
CONF_LOOKBACK: Final = "lookback"
|
|
CONF_DURATION: Final = "duration"
|
|
|
|
CAMERA_STREAM_SOURCE_TIMEOUT: Final = 10
|
|
CAMERA_IMAGE_TIMEOUT: Final = 10
|
|
|
|
# A camera that supports CAMERA_SUPPORT_STREAM may have a single stream
|
|
# type which is used to inform the frontend which player to use.
|
|
# Streams with RTSP sources typically use the stream component which uses
|
|
# HLS for display. WebRTC streams use the home assistant core for a signal
|
|
# path to initiate a stream, but the stream itself is between the client and
|
|
# device.
|
|
STREAM_TYPE_HLS = "hls"
|
|
STREAM_TYPE_WEB_RTC = "web_rtc"
|