Type Aliases
The following type aliases are available globally.
-
A dictionary matching the JSON standard.
Declaration
Swift
public typealias JSONObject = [String : Any] -
An array matching the JSON standard on JSON arrays.
Declaration
Swift
public typealias JSONArray = [Any] -
A closure used by the
JWPlayerPlaylistItemCallbackto return aJWPlayerItemobject.Declaration
Swift
public typealias JWPlayerItemCompletion = (JWPlayerItem?) -> () -
A closure used by the
JWPlayerProtocol.setPlaylistItemCallback(:)API to notify developers about playlist progression.if shouldModifyPlayerItem { // Returning a modified item the player will reflect any change in the item. completion(modifiedItem) } else if shouldSkipPlayerItem { // Returning nil the player will skip the next item in the playlist. completion(nil) } else { // Returning the same item the player will continue with the media playback. completion(item) }Declaration
Swift
public typealias JWPlayerPlaylistItemCallback = (_ item: JWPlayerItem, _ index: Int, _ completion: @escaping JWPlayerItemCompletion) -> VoidParameters
itemThe next item in the playlist.
indexThe index of the next item.
completionA closure block used to notify the player about any change with the next item.
Type Aliases Reference