MagineKitConfiguration

public struct MagineKitConfiguration

MagineKitConfiguration holds the app-credentials, network session, user credentials and orientation hooks.

  • Will eventually be switched out to callbacks where we pass in some meta-deta to make decisions on case basis. if true, only audio streams will be played.

    Declaration

    Swift

    public static var isAudioOnly: Bool
  • Bundle for language in question.

  • example: [[NSBundle mainBundle] pathForResource:"ar" ofType:@"lproj"]

  • Attention

    Defaults to mainBundle

    Declaration

    Swift

    public static var languageBundle: Bundle = Bundle.main
  • A configuration for the staging environment

    Declaration

    Swift

    public var staging:MagineKitConfiguration
  • The backing variable for closures used for returning a UIViewController subclass for the specified Viewable object. Defaults to MagineKits default player controller using the passed through

    Declaration

    Swift

    public var viewableControllerHandler: ((_ withViewable:Viewable) -> UIViewController?) =
  • Setting a handlers for returning a UIViewController subclass for the specified Viewable object.

    Declaration

    Swift

    public mutating func setViewableControllerHandler(_ handler: @escaping ((_ viewable:Viewable) -> UIViewController?) )
  • Setting a handler for processing a UIViewController subclass for the specified Authentication Error event.

    Declaration

    Swift

    public mutating func setOnAuthenticationError(_ handler: @escaping ((_ viewController:UIViewController, _ playableAsset:PlayableAsset) -> Void) )
  • Setting a handler for processing a UIViewController subclass when tapping on Sign In Button.

    Declaration

    Swift

    public mutating func setOnSignInButtonTapped(_ handler: @escaping ((_ viewController:UIViewController, _ playableAsset:PlayableAsset) -> Void) )
  • Setting a handler for returning the Accept-Language header value when requesting content.

    Declaration

    Swift

    public mutating func setOnAcceptedLanguageHandler(_ handler: @escaping (( _ language:String) -> String))
  • Setting a handler for capturing NSError.

    Declaration

    Swift

    public mutating func setOnErrorHandler(_ handler: @escaping (( _ error:NSError) -> NSError))
  • Listen and apply updates from the stylesheets to the UI in real time.

    Attention

    Only works on simulators.

    Declaration

    Swift

    public func listenAndApplyStylesheetUpdates()