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
public static func create(playerConfig: PlayerConfig = PlayerConfig()) -> Player
Parameters
playerConfig
player 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
Player
instance where Analytics is enabled and configured via the providedPlayerConfig
and theBitmovinAnalyticsConfig
.Declaration
Swift
static func create( // swiftlint:disable:this function_default_parameter_at_end playerConfig: PlayerConfig = PlayerConfig(), analyticsConfig: AnalyticsConfig, defaultMetadata: DefaultMetadata = DefaultMetadata() ) -> Player
Parameters
playerConfig
Player configuration
analyticsConfig
Analytics configuration
defaultMetadata
The
DefaultMetadata
which acts as fallback if not specified elsewhere.Return Value
Player
instance