public class PRESTOPlaySDK
Main interface for initializing the SDK and additional plugins.
public class PRESTOPlaySDK
Main interface for initializing the SDK and additional plugins.
Returns the globally shared SDK instance.
Swift
public static let shared: PRESTOPlaySDK
Initializes the SDK. This method should be called before any other.
Only the first call to this method is honored. Subsequent calls are no-ops.
Swift
public func register(_ license: String, _ plugins: [CLPluginProtocol]) -> LicenseCheck
license
|
License description. |
plugins
|
Array of plugin to be enabled. |
Initialization result.
Sets the logging verbosity.
Swift
public func setLogLevel(_ level: CLLogLevel)
level
|
Log level. |
Creates player without configuration.
Configuration can be loaded later with load
method.
Swift
public func player() -> PlayerAPI
Common player interface.
Creates player for given configuration.
Swift
public func player(for config: PlayerConfiguration) -> PlayerAPI?
config
|
Player configuration. |
Player instance.
Initializes cast with cast settings.
At this point authorization requests are triggered if required.
Swift
public func cast(for castSettings: CastSettings) -> CastAPI?
castSettings
|
Cast settings. |
Instance of cast.
Creates DRM Prefetcher for given configuration.
Swift
public func prefetcher(for config: PlayerConfiguration) -> CLDrmPrefetcherAPI?
config
|
Player configuration. |
DRM prefetcher instance.
Helper method which delegates DRM system selection to a correct strategy.
Swift
public func drm(for config: PlayerConfiguration) -> DrmAPI?
config
|
Player configuration. |
Correct DRM system.
Creates downloader without configuration.
Configuration can be loaded later with createDownload
method.
Swift
public func downloader() -> DownloaderAPI
Common downloader interface.
Returns the Advertisments client.
Swift
public func ads(for player: PlayerAPI) -> AdsAPI?
player
|
Current player instance. |
Advertisment instance.
Creates an Analytics client for a given player and analytics backend.
Swift
public func analytics(
for player: PlayerAPI,
_ backend: AnalyticsBackend? = nil)
-> AnalyticsAPI?
player
|
Player instance. |
backend
|
Analytics backend. |
Returns the Subtitles client for a given player.
Swift
public func subtitles(for player: PlayerAPI) -> SubtitlesAPI?
player
|
Current player instance. |
Subtitles client.
Returns the Thumbnails client for a given player.
Swift
public func thumbnails(for player: PlayerAPI) -> ThumbnailsAPI?
player
|
Current player instance. |
Thumbnails client.