TypedSource
@objc
public class TypedSource : NSObject, Codable
The TypedSource
object provides the following properties:
-
The ‘src’ property represents the source URL of the manifest or video file to be played.
Declaration
Swift
@objc public var src: URL
-
Specifies the content type (MIME type) of source being played.
'application/x-mpegURL'
or'application/vnd.apple.mpegurl'
indicates HLS,'video/mp4'
indicates MP4.Declaration
Swift
@objc public var type: String
-
This optional property can be used to specify required DRM parameters for a playback source. Information like the license acquisition URL, request headers and other vendor-specific parameters are wrapped in an object implementing the DRMConfiguration interface.
Declaration
Swift
public var drm: DRMConfiguration?
-
This optional property can be used to specify CORS parameters.
Declaration
Swift
public var crossOrigin: CrossOrigin?
-
Parse / Expose date ranges from HLS manifest.
Declaration
Swift
public var hlsDateRange: Bool?
-
This optional property can be used to specify required Server-Side Ad Injection parameters for a playback source. Parameters used to configure the player to optimally play streams with server-inserted ads from specific SSAI vendors are wrapped in an object implementing the ServerSideAdInsertionConfiguration interface.
Declaration
Swift
public var ssai: ServerSideAdInsertionConfiguration?
-
Constructs a TypedSource
Declaration
Swift
public init(src: String, type: String, drm: DRMConfiguration? = nil, crossOrigin: CrossOrigin? = nil, hlsDateRange: Bool? = nil)
Parameters
src
the source URL
type
the type
drm
the optional DRM configuration
crossOrigin
the CORS policy to be used
hlsDateRange
the optional date ranges from HLS manifest