Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ function CameraDeviceConfiguration.match_profile(device, status_light_enabled_pr

local camera_endpoints = switch_utils.get_endpoints_by_device_type(device, fields.DEVICE_TYPE_ID.CAMERA)
if #camera_endpoints > 0 then
if #device:get_endpoints(clusters.WebRTCTransportProvider.ID, {cluster_type = "SERVER"}) > 0 and
#device:get_endpoints(clusters.WebRTCTransportRequestor.ID, {cluster_type = "CLIENT"}) > 0 then
table.insert(main_component_capabilities, capabilities.webrtc.ID)
end
local camera_ep = switch_utils.get_endpoint_info(device, camera_endpoints[1])
for _, ep_cluster in pairs(camera_ep.clusters or {}) do
if ep_cluster.cluster_id == clusters.CameraAvStreamManagement.ID then
Expand Down Expand Up @@ -102,9 +106,6 @@ function CameraDeviceConfiguration.match_profile(device, status_light_enabled_pr
table.insert(main_component_capabilities, capabilities.zoneManagement.ID)
elseif ep_cluster.cluster_id == clusters.OccupancySensing.ID then
table.insert(main_component_capabilities, capabilities.motionSensor.ID)
elseif ep_cluster.cluster_id == clusters.WebRTCTransportProvider.ID and
#device:get_endpoints(clusters.WebRTCTransportRequestor.ID, {cluster_type = "CLIENT"}) > 0 then
table.insert(main_component_capabilities, capabilities.webrtc.ID)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ local function update_device_profile()
{
"main",
{
"webrtc",
"videoCapture2",
"cameraViewportSettings",
"localMediaStorage",
Expand All @@ -167,7 +168,6 @@ local function update_device_profile()
"mechanicalPanTiltZoom",
"videoStreamSettings",
"zoneManagement",
"webrtc",
"motionSensor",
"sounds",
}
Expand Down
Loading