BMPUserInterfaceAPI

@protocol BMPUserInterfaceAPI <NSObject>

API methods related to the user interface.

  • Returns true if the player is currently in fullscreen mode.

    Declaration

    Objective-C

    @property (readonly, getter=isFullscreen, nonatomic) BOOL fullscreen;

    Swift

    var isFullscreen: Bool { get }

    Return Value

    True if the player is currently in fullscreen mode.

  • Returns true if the players playback controls are currently shown, false if they are hidden.

    Declaration

    Objective-C

    @property (readonly, getter=areControlsShown, nonatomic) BOOL controlsShown;

    Swift

    var areControlsShown: Bool { get }

    Return Value

    True if the players playback controls are currently shown, false if they are hidden.

  • The player enters fullscreen mode. Has no effect if already in fullscreen.

    Declaration

    Objective-C

    - (void)enterFullscreen;

    Swift

    func enterFullscreen()
  • The player exits fullscreen mode. Has no effect if not in fullscreen.

    Declaration

    Objective-C

    - (void)exitFullscreen;

    Swift

    func exitFullscreen()
  • Sets a poster image which will be displayed before playback starts.

    Declaration

    Objective-C

    - (void)setPosterImage:(nonnull NSURL *)url keepPersistent:(BOOL)keepPersistent;

    Swift

    func setPosterImage(url: NSURL, keepPersistent: Bool)

    Parameters

    url

    The URL to the poster image

    keepPersistent

    Flag to set the poster image persistent so it is also displayed during playback.

  • Set the subtitle styles which should be applied to WebVTT subtitles and other legible text. Setting subtitle styles using this method completely replaces all previously set subtitle styles.

    Setting subtitle styles is only supported when the userInterfaceType in the StyleConfiguration is set to BMPUserInterfaceTypeSystem or BMPUserInterfaceTypeSubtitle.

    Declaration

    Objective-C

    - (void)setSubtitleStyles:(nullable NSArray<AVTextStyleRule *> *)subtitleStyles;

    Swift

    func setSubtitleStyles(_ subtitleStyles: [Any]?)

    Parameters

    subtitleStyles

    The subtitle styles which should be applied.