Skip to content

@camera.ui/sdk / plugin / isHub

Function: isHub()

isHub(contract): boolean

Defined in: plugin/helper.ts:208

Reports whether the plugin's role is Hub (a cross-camera aggregator such as a smart-home bridge or recorder, which owns no cameras of its own).

Parameters

contract

PluginContract

Plugin contract to inspect.

Returns

boolean

true if the role is PluginRole.Hub.

Example

ts
import { isHub } from '@camera.ui/sdk';

if (isHub(contract)) skipLocalDiscovery();