SourceFactory

@available(iOS 14.0, tvOS 14.0, *)
@objc(BMPSourceFactory)
public class SourceFactory : NSObject

Factory to create Sources which can be loaded into a Player.

  • Creates a source configured via the provided SourceConfig.

    Declaration

    Swift

    @objc(createFrom:)
    public static func create(from sourceConfig: SourceConfig) -> Source
  • Declaration

    Swift

    public static func _registerModuleFactories<T>(_ factory: @escaping (Source) -> T) where T : _SourceModule
  • Creates a Source instance where Analytics can be configured via the provided SourceConfig and the BitmovinAnalyticsConfig.

    Declaration

    Swift

    static func create(
        from sourceConfig: SourceConfig,
        sourceMetadata: SourceMetadata
    ) -> Source

    Parameters

    sourceConfig

    Source configuration

    sourceMetadata

    Source metadata for Analytics

    Return Value

    Source instance