Protocols

The following protocols are available globally.

  • Defines basic properties available for every ad type

    See more

    Declaration

    Objective-C

    @protocol BMPAd <NSObject, _BMPJsonable>

    Swift

    protocol Ad : _BMPJsonable
  • Contains information about an ad break.

    See more

    Declaration

    Objective-C

    @protocol BMPAdBreak <BMPAdConfig, _BMPJsonable>

    Swift

    protocol AdBreak : AdConfig
  • Contains config options for an AdBreak.

    See

    BMPAdBreak
    See more

    Declaration

    Objective-C

    @protocol BMPAdBreakConfig <BMPAdTagConfig>

    Swift

    protocol AdBreakConfig : AdTagConfig
  • Contains the base config options for an ad.

    See more

    Declaration

    Objective-C

    @protocol BMPAdConfig <_BMPJsonable>

    Swift

    protocol AdConfig : _BMPJsonable
  • Holds various additional ad data.

    See

    ImaAdData for more information on what additional data is available when using the Google IMA SDK implementation.
    See more

    Declaration

    Objective-C

    @protocol BMPAdData <_BMPJsonable>

    Swift

    protocol AdData : _BMPJsonable
  • Contains config options for an AdTag.

    See

    BMPAdTag
    See more

    Declaration

    Objective-C

    @protocol BMPAdTagConfig <BMPAdConfig>

    Swift

    protocol AdTagConfig : AdConfig
  • Listener protocol which can be used to listen to events of the BMPBitmovinCastManager.

    See more

    Declaration

    Objective-C

    @protocol BMPBitmovinCastManagerListener <NSObject>

    Swift

    protocol BitmovinCastManagerListener : NSObjectProtocol
  • Provides the means to configure buffer settings and to query the current buffer state. Accessible through Player.buffer.

    See more

    Declaration

    Objective-C

    @protocol BMPBufferApi <NSObject>

    Swift

    protocol BufferApi : NSObjectProtocol
  • Methods for handling received messages from Bitmovin Web UI

    See more

    Declaration

    Objective-C

    @protocol BMPCustomMessageHandlerDelegate <NSObject>

    Swift

    protocol CustomMessageHandlerDelegate : NSObjectProtocol
  • Base protocol for all event classes.

    See more

    Declaration

    Objective-C

    @protocol BMPEvent <NSObject>

    Swift

    protocol Event : NSObjectProtocol
  • A BMPFullscreenHandler implementation can be set on a PlayerView using its fullscreenHandler property. A BMPFullscreenHandler acts as a delegate for handling the fullscreen related behaviour of the player view.

    See more

    Declaration

    Objective-C

    @protocol BMPFullscreenHandler <NSObject>

    Swift

    protocol FullscreenHandler : NSObjectProtocol
  • Contains IMA specific information about an AdBreak.

    See

    BMPAdBreak

    Declaration

    Objective-C

    @protocol BMPImaAdBreak <BMPAdBreak, BMPImaAdBreakConfig>

    Swift

    protocol ImaAdBreak : AdBreak, ImaAdBreakConfig
  • Contains IMA specific AdBreakConfig options.

    See

    BMPAdBreakConfig

    Declaration

    Objective-C

    @protocol BMPImaAdBreakConfig <BMPAdBreakConfig, BMPImaAdTagConfig>

    Swift

    protocol ImaAdBreakConfig : AdBreakConfig, ImaAdTagConfig
  • Holds additional ad data that’s available when using the Google IMA SDK implementation.

    See more

    Declaration

    Objective-C

    @protocol BMPImaAdData <BMPVastAdData>

    Swift

    protocol ImaAdData : VastAdData
  • Contains IMA specific AdTagConfig options.

    Declaration

    Objective-C

    @protocol BMPImaAdTagConfig <BMPAdTagConfig>

    Swift

    protocol ImaAdTagConfig : AdTagConfig
  • Defines a linear ad which requires the playback of the content to stop

    See more

    Declaration

    Objective-C

    @protocol BMPLinearAd <BMPAd>

    Swift

    protocol LinearAd : Ad
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol BMPMetadataEntry <NSObject>
    @property (nonatomic, readonly) BMPMetadataType metadataType;
    @end

    Swift

    protocol MetadataEntry : NSObjectProtocol
  • Protocol for listeners for the BMPOfflineManager.

    See more

    Declaration

    Objective-C

    @protocol BMPOfflineManagerListener <NSObject>

    Swift

    protocol OfflineManagerListener : NSObjectProtocol
  • Defines an ad which gets displayed during content playback

    Declaration

    Objective-C

    @protocol BMPOverlayAd <BMPAd>

    Swift

    protocol OverlayAd : Ad
  • Loads, controls and renders audio and video content represented through Sources. A player instance can be created via the PlayerFactory.create function and will idle until one or more Sources are loaded. Once load is called, the player becomes active and initiates necessary downloads to start playback of the loaded source(s).

    In case multiple sources were loaded into the player, Source.isActive identifies which source is currently active in the player (i.e. being played back). Only one source can be active at any time and API calls on the player will act on that source. More information on how to manage multiple sources can be found on the PlaylistApi.

    The player emits events during a player session. See PlayerEventHandler on how to subscribe to events. Events are divided into PlayerEvent and SourceEvent, depending on if they are specific to a player session or a source. While SourceEvents are naturally emitted from a source, they are also emitted from the player for the active source. This allows for all event handling to be done through the player in case only a single source is loaded, enabling the same workflows as on v2 of the Bitmovin Player SDK, where it was not possible to load multiple sources and where each event was a PlayerEvent.

    The player implements the RemoteControlApi, which offers the ability to connect to a cast-compatible device, allowing remote playback of the loaded sources.

    By default, a player instance does not provide any UI components. To use the default Bitmovin Player Web UI, a player instance can be attached to a PlayerView. The PlayerView already comes with a Layer to render video into, the Bitmovin Player Web UI and handling for standard UI use-cases. If a custom UI is preferred, an AVPlayerLayer or an AVPlayerViewController can be registered via registerPlayerLayer / registerPlayerViewController. See PlayerView for more details.

    See more

    Declaration

    Objective-C

    @protocol BMPPlayer <NSObject, BMPPlayerEventHandler, BMPRemoteControlApi>

    Swift

    protocol Player : PlayerEventHandler, RemoteControlApi
  • Manages listeners to specific PlayerEvents and notifies those listeners when such an event is being emitted. Listeners need to conform to the PlayerListener protocol. See PlayerListener about possible event method implementations.

    See more

    Declaration

    Objective-C

    @protocol BMPPlayerEventHandler <NSObject>

    Swift

    protocol PlayerEventHandler : NSObjectProtocol
  • Defines listener methods for all events available for the Player

    See more

    Declaration

    Objective-C

    @protocol BMPPlayerListener <NSObject>

    Swift

    protocol PlayerListener : NSObjectProtocol
  • Provides the means to initiate and manage casting of video to a cast-compatible remote device.

    See more

    Declaration

    Objective-C

    @protocol BMPRemoteControlApi <NSObject>

    Swift

    protocol RemoteControlApi : NSObjectProtocol
  • Enables external control over the associated BMPSubtitleTrack

    See more

    Declaration

    Objective-C

    @protocol BMPSubtitleTrackController <NSObject>

    Swift

    protocol SubtitleTrackController : NSObjectProtocol
  • API methods related to the user interface.

    See more

    Declaration

    Objective-C

    @protocol BMPUserInterfaceApi <NSObject>

    Swift

    protocol UserInterfaceApi : NSObjectProtocol
  • Handles adding and removing of event listeners.

    See more

    Declaration

    Objective-C

    @protocol BMPUserInterfaceEventHandler <NSObject>

    Swift

    protocol UserInterfaceEventHandler : NSObjectProtocol
  • Defines listener methods for all events available for the PlayerView. See the documentation of the single listener methods for further information.

    See more

    Declaration

    Objective-C

    @protocol BMPUserInterfaceListener <NSObject>

    Swift

    protocol UserInterfaceListener : NSObjectProtocol
  • Holds various additional ad data that’s available in the VAST response.

    See more

    Declaration

    Objective-C

    @protocol BMPVastAdData <BMPAdData>

    Swift

    protocol VastAdData : AdData
  • Provides the means to manage the playlist.

    When the player transitions from one source in the playlist to another (either by normal playback or by seeking), a PlaylistTransition event is emitted and the new Source becomes active while the old one becomes inactive.

    Accessible through Player.playlist.

    Per design, only SourceEvents for an active source are emitted from the Player. As not all source events are currently emitted per source (see current limitations on Source), some events that should only be emitted from the player for an active source can currently also be emitted for an inactive source in a playlist. The affected events will be gradually migrated to the expected behaviour (i.e. the player only emits source events for the active source, while the source itself emits all source events affecting that source).

    See more

    Declaration

    Swift

    @objc(BMPPlaylistApi)
    public protocol PlaylistApi
  • Manages listeners to specific SourceEvent and notifies those listeners when such an event is being emitted. Listeners need to conform to the SourceListener protocol. See SourceListener about possible event method implementations.

    See more

    Declaration

    Swift

    @objc(BMPSourceEventHandler)
    public protocol SourceEventHandler
  • Protocol for all SourceEvent classes.

    Declaration

    Swift

    @objc(BMPSourceEvent)
    public protocol SourceEvent : Event
  • Includes all possible methods that an implementation of this protocol can implement. The corresponding method will be called when an event is emitted (if implemented).

    See more

    Declaration

    Swift

    @objc(BMPSourceListener)
    public protocol SourceListener : NSObjectProtocol
  • Can be used to change request parameters before a request is made.

    Only changing DRM requests is currently supported.

    See more

    Declaration

    Swift

    @objc(BMPPreprocessHttpRequestDelegate)
    public protocol PreprocessHttpRequestDelegate : NSObjectProtocol
  • Represents audio and video content that can be loaded into a Player. A Source instance can be created via the SourceFactory.create function and will idle until it is loaded into a player. After loading the source into a player, isAttachedToPlayer is true and the same source can not be loaded into a different player until unloaded.

    Multiple sources can be loaded into a player as part of a PlaylistConfig, where the first source in the playlist immediately becomes active. When the player transitions to another source in the playlist, that source becomes active. More information on how to manage multiple sources can be found on the PlaylistApi.

    The source starts out LoadingState.unloaded, transitions to LoadingState.loading once the source starts loading and finally transitions to LoadingState.loaded when it finished loading. When unloaded from a player, the source reverts to being LoadingState.unloaded and detached. After this, the source can be loaded again into a (different) player.

    The source emits events while it is attached to a player. See SourceEventHandler on how to subscribe to events. The source only emits events of type SourceEvent, and events that are emitted while the source is active are also emitted through the player it is attached to.

    Only a few events are currently emitted from the source. This is a temporary limitation until all source events are emitted correctly from the source. See SourceListener for more information about events emitted from the source.

    See more

    Declaration

    Swift

    @objc(BMPSource)
    public protocol Source : SourceEventHandler