Media
open class Media : NSObject
Class that contains the information of the media object
-
The type of stream represented as an enum.
Declaration
Swift
open var type: StreamType
-
This flag indicates if the content is Live or VoD
Declaration
Swift
open var isLive: Bool
-
This flag indicates if the content should be played automatically after the content has been loaded
Declaration
Swift
open var autoplay: Bool
-
Total duration of the stream
Declaration
Swift
open var duration: Double
-
Title of the stream.
This will be used on the default UI provided.
Declaration
Swift
open var title: String
-
The URL where the stream is located
Declaration
Swift
open var source: String
-
The URL for the poster image.
The poster image will be shown as an overlay while loading a video or while playing audio-only content
Declaration
Swift
open var poster: String
-
List of available captions for the stream
The default value is an empty list.
Declaration
Swift
open var captions: [Caption]
-
Flag that indicates if the content has a buffer that can be seekable.
This flag is only useful for Live content. VoD content is always seekable.
Declaration
Swift
open var dvr: Bool
-
URL of the certificate that allows playback.
This is only required for DRM content on Fairplay, Verimatrix, ExpressPlay, and Azure.
Declaration
Swift
open var certificateUrl: String
-
This flag indicates if the response of the verification server is JSON or another format.
Declaration
Swift
open var jsonResponse: Bool
-
Creates an instance of the Media object with default values.
Declaration
Swift
public override init()
-
Creates an instance of the Media object.
Declaration
Swift
public convenience init(source: String, type: StreamType, duration: Double, isLive: Bool, title: String = "", poster: String = "", captions: [Caption] = [Caption]())
Parameters
source
URL where the stream is located
type
The type of stream represented as an enum
duration
Total duration of the stream
isLive
This flag indicates if the content is Live or VoD
title
Title of the stream
poster
The URL for the poster image
captions
List of available captions for the stream