//
//  AppDelegate.swift
//  BroadpeakDemo
//
//

import CastlabsApple
import CastlabsBroadpeak
import PRESTOplay
import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(
        _: UIApplication,
        didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?
    )
        -> Bool
    {
        // Override point for customization after application launch.

        let broadpeakSettings = BroadpeakSettings(
            analyticsAddress: "YOUR-ANALYTICS-SERVER-ADDRESS",
            nanoCDNHost: "",
            domainNames: ""
                //            options: [
                //                .timeoutNanoCDNDiscoverResolving: Int32(100),
                //                .timeoutNanoCDNStaticResolving: Int32(200),
                //                .timeoutNanoCDNRequestRouter: Int32(300)
                //            ]
        )

        _ = PRESTOplaySDK.shared.setup(
            "LICENSE",
            [
                HLSPlugin(),
                BroadpeakPlugin(broadpeakSettings),
            ])
        return true
    }
}
