Skip to main content

Function: resolvePolicyDisplayMode()

resolvePolicyDisplayMode(options): CharDisplayMode
Resolves Char’s standard host display-mode policy. Policy:
  • Closed state to pip
  • Open on desktop to inline
  • Open on narrow viewport to fullscreen
The resolved mode is then constrained to availableModes.

Parameters

options

Host orchestration inputs: open, isNarrowViewport, and optional availableModes.

availableModes?

readonly CharDisplayMode[]

isNarrowViewport

boolean

open

boolean

Returns

CharDisplayMode Final mode that satisfies policy and availability constraints.