The following classes are available globally.
Classes
-
Create AirPlay client instance
See moreDeclaration
Swift
public class AirPlayFactory : CastComponentFactoryProtocol -
BroadpeakMetadata
See moreDeclaration
Swift
public class BroadpeakMetadata : AnalyticsMetadata -
BroadpeakSettings
See moreDeclaration
Swift
public class BroadpeakSettings -
ChromecastMetadata
See moreDeclaration
Swift
public class ChromecastMetadata : AnalyticsMetadata -
Create Chromecast client instance
See moreDeclaration
Swift
public class ChromecastFactory : CastComponentFactoryProtocol -
Create Appium client instance
See moreDeclaration
Swift
public class ConvivaFactory : AnalyticsComponentFactoryProtocol -
ConvivaMetadata
See moreDeclaration
Swift
public class ConvivaMetadata : AnalyticsMetadata -
ConvivaSettings
See moreDeclaration
Swift
public class ConvivaSettings
-
Declaration
Swift
public class IMA: BaseComponent, IMAContentPlayhead, IMAAdsLoaderDelegate, IMAAdsManagerDelegate, ViewBasedComponentProtocolextension IMA: AdsComponentProtocolextension IMA: AdsAPI -
Create IMA client instance
See moreDeclaration
Swift
public class IMAFactory : AdsComponentFactoryProtocol -
Create Mux client instance
See moreDeclaration
Swift
public class MuxFactory : AnalyticsComponentFactoryProtocol -
MuxMetadata
See moreDeclaration
Swift
public class MuxMetadata : AnalyticsMetadata -
Declaration
Swift
public class MuxSettings -
Create IMA client instance
See moreDeclaration
Swift
public class SubtitlesFactory : SubtitlesComponentFactoryProtocol -
Create Thumbnails client instance
See moreDeclaration
Swift
public class ThumbnailsFactory : ThumbnailsComponentFactoryProtocol -
CastlabsVT
See moreDeclaration
Swift
public class VTWithWidevinePlugin : CLPluginProtocol -
Declaration
Swift
public class WidevineDrmFactory : DrmComponentFactoryProtocol -
Create Youbora client instance
See moreDeclaration
Swift
public class YouboraFactory : AnalyticsComponentFactoryProtocol -
YouboraMetadata
See moreDeclaration
Swift
public class YouboraMetadata : AnalyticsMetadata -
YouboraSettings
See moreDeclaration
Swift
public class YouboraSettings -
BasePlayer implements all properties that are updated from the State and must be synchronised on ‘playerQueue’
See moreDeclaration
Swift
open class BasePlayer : BaseInterceptable -
Cross-component communication move outside factory
See moreDeclaration
Swift
open class BasePlayerStateSubscriber : InternalStateSubscriberProtocol -
Default handler for phone call interruption
Declaration
Swift
public class DefaultPhoneCallHandler -
The meta-data class wraps and mandatory and optional meta-data that are send to various analytics backends.
The two parameters that are mandatory in all cases are
liveandassetId. Theliveflag needs to be set totrueif the content is a live stream. Analytics backends usually require this information before playback starts. TheassetIdidentifies the content uniquely within the analytics system.Declaration
Swift
open class AnalyticsMetadata -
The cast settings class wraps common settings for Chromecast
See moreappIdis mandatory for casting.Declaration
Swift
open class CastSettings
-
This structure describes player configuration for a single asset.
ClearKey usage
guard let url = URL(string: "STREAM-URL") else { return } let config = PlayerConfiguration(with: url) config.contentType = .hls let player = PRESTOplaySDK.shared.player() player.open(config: config)FairPlay usage
guard let url = URL(string: "STREAM-URL") else { return } let config = PlayerConfiguration(with: url) config.contentType = .hls config.drmSystem = .fairplay config.drmConfiguration = DrmConfiguration() config.drmConfiguration?.environment = .production config.drmConfiguration?.userId = "..." config.drmConfiguration?.sessionId = "..." config.drmConfiguration?.merchant = "..." config.drmConfiguration?.assetId = "..." config.drmConfiguration?.variantId = "..." let player = PRESTOplaySDK.shared.player() player.open(config: config)Custom RequestModifier usage
Example showing custom FairPlay URLs.
See moreguard let url = URL(string: "STREAM-URL") else { return } let config = PlayerConfiguration(with: url) config.contentType = .hls config.drmSystem = .fairplay config.drmConfiguration = DrmConfiguration() config.drmConfiguration?.licensingUrl = URL(string: "LICENSING-URL") config.drmConfiguration?.certificateUrl = URL(string: "CERTIFICATE-URL") // Add request/response modifiers on SDK level. PRESTOplaySDK.shared.requestModifiers.append(RequestModifier()) PRESTOplaySDK.shared.responseModifiers.append(ResponseModifier()) let player = PRESTOplaySDK.shared.player() player.open(config: config)Declaration
Swift
@objc public class PlayerConfiguration : NSObject, NSCopying, Codable
-
Container that groups all available media tracks by type.
See moreDeclaration
Swift
public class Tracks : Equatable, CustomStringConvertible
-
Base rendition metadata shared by audio/video rendition variants.
See moreDeclaration
Swift
public class Rendition : Equatable
-
Audio-specific rendition type.
Declaration
Swift
public class AudioRendition : Rendition
-
DRM metadata attached to renditions.
See moreDeclaration
Swift
public class DrmInfo : Equatable -
CastlabsApple
See moreDeclaration
Swift
@objc public class CorePlugins : NSObject, CLPluginProtocol -
The CMCD Configuration
See moreDeclaration
Swift
public class CmcdConfiguration : NSObject, NSCopying, Codable -
Discussion: Apple uses predefined network sessions called URLSession. There is no way to create a dedicated URLSession for each Request. If ‘NetworkConfiguration’ is updated it will affect the whole URLSession, which is shared for all the HTTP/S requests in ‘NetworkEngine’.
See moreDeclaration
Swift
public class NetworkConfiguration : NSObject, NSCopying, Codable -
Configuration for per-state timeouts of the player state machine. Values are in seconds. Use 0 to disable a timeout for a state.
See moreDeclaration
Swift
public class StateTimeoutConfiguration : NSObject, NSCopying, Codable -
HLS settings shared by the Apple HLS player and downloader.
See moreDeclaration
Swift
public class HLSSettings -
The subtitles settings to customize subtitles rendering.
See moreDeclaration
Swift
public class SubtitlesStyle : NSObject -
GridThumbnail
Used to define a request to download images and slice them into multiple thumbnails in a grid pattern. Each image will be sliced into smaller segments based on the
gridWidthandgridHeight. E.g. if these are both set to2, then the image will be divided into a 2 x 2 grid producing 4 equal sized thumbnails per image. The grid cells are ordered from left to right, then top to bottom.Single or multiple images may be downloaded using this object. If
maxIndexis greater than 1 and thepathTemplatecontains the token index then multiple image urls can be specified. The final image urls which will be downloaded are specified by the baseUrl + the result of the pathTemplate substitution. The index token in pathTemplate will be substituted with the index 1 up to and including maxIndex. E.g. ifpathTemplatewhereimage_$index$.jpgand maxIndex were 3, thenimage_1.jpg,image_2.jpg,image_3.jpgwould be generated from the substitution.Each thumbnail will be displayed for
See moredurationMswith no gabs in between. Therefore thumbnails will cover a total timerange ofdurationMsmultiplied by the total number of thumbnails generated.Declaration
Swift
public class GridThumbnail -
Defines a single thumbnail image along with it’s timing information.
See moreDeclaration
Swift
public class ThumbnailImage