Use this interface to define custom layouts beyond the built-in
'grid', 'speaker', and 'sidebar' options. Custom layouts allow
developers to add application-specific video arrangements.
Creating Custom Layouts
Each layout definition requires:
id: Unique string identifier (used as the layout value)
label: Human-readable name shown in the layout menu
icon: Optional React node for the menu item (defaults to grid icon)
Using Custom Layouts
Define your layouts array with LayoutDefinition objects
Pass the array to ControlBar via the layouts prop
Handle the custom layout ID in your onLayoutChange callback
Render your custom layout in your video grid component
Definition of a layout option for the video grid.
Remarks
Use this interface to define custom layouts beyond the built-in 'grid', 'speaker', and 'sidebar' options. Custom layouts allow developers to add application-specific video arrangements.
Creating Custom Layouts
Each layout definition requires:
layoutvalue)Using Custom Layouts
LayoutDefinitionobjectsControlBarvia thelayoutsproponLayoutChangecallbackExample
Basic custom layout:
Example
Completely custom layouts (replacing built-ins):
Example
Layout with i18n labels:
See
DEFAULT_LAYOUTSfrom@hiyve/react-ui- The built-in layouts constant