AI-generated Key Takeaways
-
UiConfig
provides configuration options for the user interface of a Cast receiver application. -
The
touchScreenOptimizedApp
property indicates whether the receiver app is interactive, influencing UI control assignments and scrim behavior. -
When playing audio, the default UI will override any custom UI, especially on non-interactive devices.
-
If using a custom media element on non-interactive devices, the receiver app is responsible for defining the UI components.
cast.framework.ui. UiConfig
UI Configuration.
Constructor
UiConfig
new UiConfig()
Property
touchScreenOptimizedApp
(boolean or undefined)
If set, the SDK will be notified that the receiver application is configured to support an interactive UI. This allows the receiver to modify the UI ControlsSlot assignments and shows a transparent scrim over the content when presented. If disabled, the ControlsSlots are not configurable and the scrim presented is opaque. When playing audio content the default UI will replace any custom UI. This flag is set by default when using the cast-media-player element. For non-interactive devices this flag has no effect. For these devices if using the cast-media-player element, the SDK will render default UI. If using a custom media element the SDK will rely on the receiver application to define the UI components.