Protocols
The following protocols are available globally.
-
Defines basic properties available for every ad type
See moreDeclaration
Objective-C
@protocol BMPAd <NSObject, _BMPJsonEncodable>Swift
protocol Ad : _JsonEncodable -
Contains information about an ad break.
See moreDeclaration
Objective-C
@protocol BMPAdBreak <BMPAdConfig, _BMPJsonEncodable>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 <_BMPJsonEncodable>Swift
protocol AdConfig : _JsonEncodable -
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 <_BMPJsonEncodable>Swift
protocol AdData : _JsonEncodable -
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 -
Is linked to one
SourceConfigand is used to manage offline content and offline DRM related tasks for this singleSourceConfig.IMPORTANT: Methods from
OfflineContentManagerneed to be called from the main thread.This class offers functionality to handle the whole lifecycle of protected and unprotected offline content.
Depending on the current state of the
SourceConfig, which is represented byofflineState, different methods are allowed to be called. The table below shows all possible and allowed transitions between the different states. Each line describes one transition which happens immediately and synchronously. When there is a method call noted in column “Method call triggering transition”, the “Following State” is entered immediately after the method call returns.When there is no method call noted, the “Following State” is entered when the event described in column “OfflineContentManagerListener event” was received.
The “Following State” is always noted under the assumption that no error occurred when calling the transition method, or during processing of the current task. Errors are always reported to
onError(_:,offlineContentManager:). See the documentation ofOfflineContentManagerListenerfor more information.Calling any method in an invalid state will not result in any state change.
See moreCurrent State Method call triggering transition OfflineContentManagerListener event Following State NotDownloaded download - Downloading Downloading cancelDownload - Canceling Downloading suspendDownload onContentDownloadSuspended Suspended Downloading - onContentDownloadFinished Downloaded Downloading - onContentDownloadProgressChanged Downloading Downloaded deleteOfflineData - NotDownloaded Suspended resumeDownload onContentDownloadResumed Downloading Suspended cancelDownload - Canceling Canceling - onContentDownloadCanceled NotDownloaded Downloaded renewOfflineLicense onOfflineContentLicenseRenewed Downloaded Declaration
Objective-C
@protocol BMPOfflineContentManager <NSObject, BMPOfflineContentManagerEventHandler>Swift
protocol OfflineContentManager : OfflineContentManagerEventHandler -
Manages listeners to specific
See moreOfflineContentManagers and notifies those listenersDeclaration
Objective-C
@protocol BMPOfflineContentManagerEventHandler <NSObject> -
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 -
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 -
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 -
Undocumented
See moreDeclaration
Swift
@objc(BMPCueEvent) public protocol CueEvent -
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 -
Enables external control over the associated BMPSubtitleTrack
See moreDeclaration
Swift
@objc(BMPSubtitleTrackController) public protocol SubtitleTrackController : NSObjectProtocol -
Undocumented
See moreDeclaration
Swift
@objc(BMPMetadataEntry) public protocol MetadataEntry -
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 -
This API is used as an incubator for experimental features. Tweaks are not officially supported and are not guaranteed to be stable, i.e. their naming, functionality and API can change at any time within the tweaks or when being promoted to an official feature and moved into its final configuration namespace.
See moreDeclaration
Swift
@objc(BMPOfflineContentManagerTweaksApi) public protocol OfflineContentManagerTweaksApi -
Protocol for listeners for the
See moreOfflineContentManager.Declaration
Swift
@objc(BMPOfflineContentManagerListener) public protocol OfflineContentManagerListener : NSObjectProtocol -
Protocol for delegate for the OfflineManager.
See moreDeclaration
Swift
@objc(BMPOfflineManagerDelegate) public protocol OfflineManagerDelegate : NSObjectProtocol -
Protocol for listeners for the OfflineManager.
See moreDeclaration
Swift
@available(*, deprecated, message: "Use OfflineContentManagerListener instead") @objc(BMPOfflineManagerListener) public protocol OfflineManagerListener : NSObjectProtocol -
See
See moreOfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPAvailableTracksFetchedEvent) public protocol AvailableTracksFetchedEvent : OfflineEvent -
See
OfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentDownloadCanceledEvent) public protocol ContentDownloadCanceledEvent : OfflineEvent -
See
OfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentDownloadFinishedEvent) public protocol ContentDownloadFinishedEvent : OfflineEvent -
See
See moreOfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentDownloadProgressChangedEvent) public protocol ContentDownloadProgressChangedEvent : OfflineEvent -
See
See moreOfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentDownloadResumedEvent) public protocol ContentDownloadResumedEvent : OfflineEvent -
See
OfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentDownloadSuspendedEvent) public protocol ContentDownloadSuspendedEvent : OfflineEvent -
See
See moreOfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPContentUrlMigrationFinishedEvent) public protocol ContentUrlMigrationFinishedEvent : OfflineEvent -
See
OfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPOfflineContentLicenseExpiredEvent) public protocol OfflineContentLicenseExpiredEvent : OfflineEvent -
See
OfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPOfflineContentLicenseRenewedEvent) public protocol OfflineContentLicenseRenewedEvent : OfflineEvent -
See
See moreOfflineContentManagerListenerfor more information on this event.Declaration
Swift
@objc(BMPOfflineErrorEvent) public protocol OfflineErrorEvent : OfflineEvent -
Protocol for all
OfflineEventclasses.Declaration
Swift
@objc(BMPOfflineEvent) public protocol OfflineEvent : Event
Protocols Reference