SystemUiApi

@MainActor
@objc(BMPSystemUiApi)
public protocol SystemUiApi

The SystemUiApi for interactions regarding the system UI. Using this API just has an effect if userInterfaceType in StyleConfig is set to .system. This is the default value on tvOS, on iOS it has to be set specifically.

  • An array of actions and menus to display with the default player controls. Contains the currently displayed items. Items can be added and removed dynamically at any time.

    The initial state can be configured using SystemUserInterfaceConfig.transportBarCustomMenuItems

    Use this property to display custom pop-up menus in transport bar. This property only supports menu elements of type UIAction and UIMenu, and supports displaying inline one level of submenus.

    Declaration

    Swift

    @available(tvOS 15.0, *)
    @available(iOS, unavailable)
    @MainActor
    var transportBarCustomMenuItems: [UIMenuElement] { get set }
  • An array of action controls to present contextually during playback. To dismiss the controls, set this property value back to an empty array. Default value is an empty array.

    Use this property to present action controls for a specific time in the presentation, such as showing a Skip Intro button during a title sequence. Have your app observe the player’s timing, and when playback reaches a point at which to present controls, set the property value to one or more custom actions.

    Note

    The player view presents contextual actions only when the transport bar isn’t visible.

    Declaration

    Swift

    @available(tvOS 15.0, *)
    @available(iOS, unavailable)
    @MainActor
    var contextualActions: [UIAction] { get set }
  • An array of actions to present in the Info content view. Default value is a single action that plays the current media from the beginning when tapped.

    The Info content view can display up to two custom action controls along its trailing edge. Contains the currently presented actions. The default value (if present) can be replaced, an additional action can be added, or set this property value to an empty array to display no actions.

    Declaration

    Swift

    @available(tvOS 15.0, *)
    @available(iOS, unavailable)
    @MainActor
    var infoViewActions: [UIAction] { get set }
  • An array of view controllers to display as content tabs in the player user interface. A default Info tab is displayed as the first content tab if SourceConfig.title and SourceConfig.sourceDescription are not nil. This default tab cannot be modified.

    If SystemUserInterfaceConfig.showInfoViews is set to false, no content tabs are displayed.

    Custom tabs can be defined by creating subclasses of UIViewController and appending them to this array.

    Important

    Initialize the custom view controller’s title property value before setting it on this property. The system uses the custom view controller’s title as the tab title.

    Important

    The view controller whose view has the greatest height determines the height for all tab’s content views. Set the height of content views consistently using preferredContentSize to simplify layout, or define appropriate auto layout constraints on their views.

    Declaration

    Swift

    @available(tvOS 15.0, *)
    @available(iOS, unavailable)
    @MainActor
    var customInfoViewControllers: [UIViewController] { get set }