JWPlayerItem
@objcMembers
public class JWPlayerItem : NSObject, JWJSONEncodable
Defines a player item which contains the information about the media content.
-
Title of the player item.
Declaration
Swift
public internal(set) var title: String? { get } -
Short description of the player item.
Declaration
Swift
public override var description: String { get } -
Poster image url of the player item.
Declaration
Swift
public internal(set) var posterImage: URL? { get } -
Number of seconds from the start of a media asset when playback should begin.
Declaration
Swift
public internal(set) var startTime: TimeInterval { get } -
The player item’s media identifier.
Declaration
Swift
public internal(set) var mediaId: String? { get } -
URL to a feed that contains related items for a particular player item.
Declaration
Swift
public internal(set) var recommendations: URL? { get } -
Determines whether media should start automatically after loading. The default value is
false.Declaration
Swift
@available(*, deprecated, message: "Instead read from JWPlayerConfiguration.autostart") public internal(set) var autostart: Bool { get } -
An array of
JWVideoSourceobjects representing multiple quality levels of a video.Seealso
JWVideoSourceDeclaration
Swift
public internal(set) var videoSources: [JWVideoSource]! { get } -
An array of
JWMediaTrackobjects providing captions for different languages or thumbnails images.Seealso
JWMediaTrackDeclaration
Swift
public internal(set) var mediaTracks: [JWMediaTrack]? { get } -
The URL of the VMAP file to load.
Note
Used for JW and IMA.Declaration
Swift
public internal(set) var vmapURL: URL? { get } -
A
JWGoogleDAIStreamobject that provides info about either a VoD or Live stream.Seealso
JWGoogleDAIStreamDeclaration
Swift
public internal(set) var googleDAIStream: JWGoogleDAIStream? { get } -
A dictionary that contains options used to customize the initialization of the asset.
Note
For more information, refer to Initialization OptionsDeclaration
Swift
public internal(set) var assetOptions: [String : Any]? { get } -
Array of metadata that an be passed externally to supplement the encoded metadata of the underlying media asset.
Note
Supersedes the external metadata specified in theJWPlayerConfiguration, for this player item.Note
Capped at 5 metadata instances; the instances in excess will be excluded.See also
JWExternalMetadataDeclaration
Swift
public internal(set) var externalMetadata: [JWExternalMetadata]? { get } -
An array of skippable time ranges within the content.
Declaration
Swift
@available(tvOS 14, *) @available(iOS, unavailable) public internal(set) var skippableTimeRanges: [JWSkippableTimeRange] { get }
-
Returns a chapter track, if it exists.
Declaration
Swift
public var chapterTrack: JWChapterTrack? { get } -
Returns the captions tracks, if they exist.
Declaration
Swift
public var captionTracks: [JWCaptionTrack] { get } -
Returns a thumbnail track, if it exists.
Declaration
Swift
public var thumbnailTrack: JWMediaTrack? { get } -
Overridden to check quickly and accurately if two player items are the same.
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool -
Declaration
Swift
public func toJSONObject() -> JSONObject -
Calling this method converts the
JSONObjectinto aJWPlayerItem.Declaration
Swift
public static func from(json: JSONObject) -> AnyObject?Return Value
A
JWPlayerItem, ornilif it does not succeed.
JWPlayerItem Class Reference