Skip to main content

Class: UiConfig

  • cast.framework.ui.UiConfig is a class for configuring the user interface of a Cast receiver application.

  • The touchScreenOptimizedApp property in UiConfig informs the SDK if the receiver application supports an interactive UI, which affects UI control assignments and the presentation of a scrim over content.

  • Setting touchScreenOptimizedApp to true enables configurable ControlsSlots and a transparent scrim, while setting it to false or leaving it undefined results in non-configurable ControlsSlots and an opaque scrim.

  • The touchScreenOptimizedApp flag is set by default when using the cast-media-player element for interactive devices but has no effect on non-interactive devices.

cast.framework.ui.UiConfig

class static

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年09月18日 UTC.

AltStyle によって変換されたページ (->オリジナル) /