Protocols
The following protocols are available globally.
-
Defines basic properties available for every ad type
See moreDeclaration
Objective-C
@protocol BMPAd <NSObject, _BMPJsonable>Swift
protocol Ad : _BMPJsonable -
Contains information about an ad break.
See moreDeclaration
Objective-C
@protocol BMPAdBreak <BMPAdConfig, _BMPJsonable>Swift
protocol AdBreak : AdConfig -
Declaration
Objective-C
@protocol BMPAdBreakConfig <BMPAdTagConfig>Swift
protocol AdBreakConfig : AdTagConfig -
Contains the base config options for an ad.
See moreDeclaration
Objective-C
@protocol BMPAdConfig <_BMPJsonable>Swift
protocol AdConfig : _BMPJsonable -
Holds various additional ad data.
See moreSee
ImaAdData for more information on what additional data is available when using the Google IMA SDK implementation.Declaration
Objective-C
@protocol BMPAdData <_BMPJsonable>Swift
protocol AdData : _BMPJsonable -
Declaration
Objective-C
@protocol BMPAdTagConfig <BMPAdConfig>Swift
protocol AdTagConfig : AdConfig -
Listener protocol which can be used to listen to events of the BMPBitmovinCastManager.
See moreDeclaration
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 moreDeclaration
Objective-C
@protocol BMPBufferApi <NSObject>Swift
protocol BufferApi : NSObjectProtocol -
Methods for handling received messages from Bitmovin Web UI
See moreDeclaration
Objective-C
@protocol BMPCustomMessageHandlerDelegate <NSObject>Swift
protocol CustomMessageHandlerDelegate : NSObjectProtocol -
Base protocol for all event classes.
See moreDeclaration
Objective-C
@protocol BMPEvent <NSObject>Swift
protocol Event : NSObjectProtocol -
A BMPFullscreenHandler implementation can be set on a
See morePlayerViewusing its fullscreenHandler property. A BMPFullscreenHandler acts as a delegate for handling the fullscreen related behaviour of the player view.Declaration
Objective-C
@protocol BMPFullscreenHandler <NSObject>Swift
protocol FullscreenHandler : NSObjectProtocol -
Contains IMA specific information about an AdBreak.
See
BMPAdBreakDeclaration
Objective-C
@protocol BMPImaAdBreak <BMPAdBreak, BMPImaAdBreakConfig>Swift
protocol ImaAdBreak : AdBreak, ImaAdBreakConfig -
Contains IMA specific AdBreakConfig options.
See
BMPAdBreakConfigDeclaration
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 moreDeclaration
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 an ad which gets displayed during content playback
-
Loads, controls and renders audio and video content represented through
Sources. A player instance can be created via thePlayerFactory.createfunction and will idle until one or moreSources 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.isActiveidentifies 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 thePlaylistApi.The player emits events during a player session. See
PlayerEventHandleron how to subscribe to events.Events are divided intoPlayerEventandSourceEvent, depending on if they are specific to a player session or a source. WhileSourceEvents 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 aPlayerEvent.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
See morePlayerView. ThePlayerViewalready 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, anAVPlayerLayeror anAVPlayerViewControllercan be registered viaregisterPlayerLayer/registerPlayerViewController. SeePlayerViewfor more details.Declaration
Objective-C
@protocol BMPPlayer <NSObject, BMPPlayerEventHandler, BMPRemoteControlApi>Swift
protocol Player : PlayerEventHandler, RemoteControlApi -
Manages listeners to specific
See morePlayerEvents and notifies those listeners when such an event is being emitted. Listeners need to conform to thePlayerListenerprotocol. SeePlayerListenerabout possible event method implementations.Declaration
Objective-C
@protocol BMPPlayerEventHandler <NSObject>Swift
protocol PlayerEventHandler : NSObjectProtocol -
Defines listener methods for all events available for the Player
See moreDeclaration
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 moreDeclaration
Objective-C
@protocol BMPRemoteControlApi <NSObject>Swift
protocol RemoteControlApi : NSObjectProtocol -
Enables external control over the associated BMPSubtitleTrack
See moreDeclaration
Objective-C
@protocol BMPSubtitleTrackController <NSObject>Swift
protocol SubtitleTrackController : NSObjectProtocol -
API methods related to the user interface.
See moreDeclaration
Objective-C
@protocol BMPUserInterfaceApi <NSObject>Swift
protocol UserInterfaceApi : NSObjectProtocol -
Handles adding and removing of event listeners.
See moreDeclaration
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 moreDeclaration
Objective-C
@protocol BMPUserInterfaceListener <NSObject>Swift
protocol UserInterfaceListener : NSObjectProtocol -
Undocumented
See moreDeclaration
Objective-C
@protocol BMPMetadataEntry <NSObject> @property (nonatomic, readonly) BMPMetadataType metadataType; @end -
Undocumented
See moreDeclaration
Objective-C
@protocol _BMPTimelineMarker <NSObject> @property (nonatomic, readonly) NSTimeInterval start; @property (nonatomic, readonly) NSTimeInterval end; @end -
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
PlaylistTransitionevent is emitted and the newSourcebecomes active while the old one becomes inactive.Accessible through Player.playlist.
Current event-related limitations
Per design, only
See moreSourceEvents for an active source are emitted from thePlayer. 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).Declaration
Swift
@objc(BMPPlaylistApi) public protocol PlaylistApi -
Manages listeners to specific
See moreSourceEventand notifies those listeners when such an event is being emitted. Listeners need to conform to theSourceListenerprotocol. SeeSourceListenerabout possible event method implementations.Declaration
Swift
@objc(BMPSourceEventHandler) public protocol SourceEventHandler -
Protocol for all
SourceEventclasses.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 moreDeclaration
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 moreDeclaration
Swift
@objc(BMPPreprocessHttpRequestDelegate) public protocol PreprocessHttpRequestDelegate -
Represents audio and video content that can be loaded into a
Player. A Source instance can be created via theSourceFactory.createfunction and will idle until it is loaded into a player. After loading the source into a player,isAttachedToPlayeristrueand 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 thePlaylistApi.The source starts out
LoadingState.unloaded, transitions toLoadingState.loadingonce the source starts loading and finally transitions toLoadingState.loadedwhen it finished loading. When unloaded from a player, the source reverts to beingLoadingState.unloadedand 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
SourceEventHandleron how to subscribe to events. The source only emits events of typeSourceEvent, and events that are emitted while the source is active are also emitted through the player it is attached to.Current event-related limitations
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
See moreSourceListenerfor more information about events emitted from the source.Declaration
Swift
@objc(BMPSource) public protocol Source : SourceEventHandler -
Protocol for delegate for the OfflineManager.
See moreDeclaration
Swift
@objc(BMPOfflineManagerDelegate) public protocol OfflineManagerDelegate : NSObjectProtocol -
Protocol for listeners for the OfflineManager.
See moreDeclaration
Swift
@objc(BMPOfflineManagerListener) public protocol OfflineManagerListener : NSObjectProtocol
Protocols Reference