PlayerFactory
@available(iOS 14.0, tvOS 14.0, *)
public class PlayerFactory
Factory to create a Player instance.
-
Returns the player SDK version number.
Declaration
Swift
public static var sdkVersion: String { get } -
Creates a player instance configured via the provided
PlayerConfig.Declaration
Swift
@available(*, deprecated, renamed: "createPlayer(playerConfig:﹚", message: "Use createPlayer(playerConfig:﹚ instead. In case of standalone Player Core usage, update to PlayerCoreFactory.createPlayer(playerConfig:﹚") public static func create(playerConfig: PlayerConfig = PlayerConfig()) -> PlayerParameters
playerConfigplayer configuration
Return Value
Player instance
-
Declaration
Swift
public static func _registerModuleFactories<T>(_ factory: @escaping (Player) -> T) where T : _PlayerModule -
Returns the analytics collector SDK version number.
Only accessible from Swift as the analytics collector does not have ObjC support for this property.
Declaration
Swift
static var analyticsSdkVersion: String { get } -
Creates a
Playerinstance where Analytics is enabled and configured via the providedPlayerConfigand theBitmovinAnalyticsConfig.Declaration
Swift
@available(*, deprecated, renamed: "createPlayer(playerConfig:analytics:﹚") static func create( // swiftlint:disable:this function_default_parameter_at_end playerConfig: PlayerConfig = PlayerConfig(), analyticsConfig: AnalyticsConfig, defaultMetadata: DefaultMetadata = DefaultMetadata() ) -> PlayerParameters
playerConfigPlayer configuration
analyticsConfigAnalytics configuration
defaultMetadataThe
DefaultMetadatawhich acts as fallback if not specified elsewhere.Return Value
Playerinstance -
Creates and configures a
Playerinstance.The
AnalyticsPlayerConfigcan be used to customize the analytics data collection, or to disable analytics support for thePlayerinstance.Note
If you have manually configured Bitmovin Analytics using the
BitmovinAnalyticsCollector, either migrate to the bundled collector or disable bundled analytics by passingAnalyticsPlayerConfig.disabledtoanalytics. Using both, the bundled and the manually configured collector will result in a crash.Declaration
Swift
static func createPlayer( playerConfig: PlayerConfig = PlayerConfig(), analytics: AnalyticsPlayerConfig = .enabled ) -> PlayerParameters
playerConfigPlayer configuration
analyticsAnalytics player config to customize analytics data collection, or to disable analytics support
Return Value
Playerinstance
PlayerFactory Class Reference