VKVideo
@objc
public class VKVideo : NSObject
This class provides the representation of a video object
-
The unique ID identifying this video
Declaration
Swift
@objc public internal(set) var videoID: String { get }
-
The tags that describes this video
Declaration
Swift
@objc public internal(set) var tags: Set<String> { get set }
-
The metadata that describes this video
Declaration
Swift
@objc public internal(set) var metadata: [String : String] { get set }
-
The video rating
Declaration
Swift
@objc public internal(set) var rating: Int { get set }
-
Declaration
Swift
@objc public func setMetadata(metadata: [String : String], reset: Bool = false)
-
The HLS url of this video
Declaration
Swift
@objc public internal(set) var mediaHLSURL: URL? { get }
-
The shareable url of this video
Declaration
Swift
@objc public internal(set) var shareURL: URL? { get }
-
Content Filter response
Declaration
Swift
@objc public internal(set) var contentFilter: VKContentFilter { get }
-
Object Detection response
Declaration
Swift
@objc public internal(set) var objectDetection: VKObjectDetection { get }
-
The geolocation to which this video was taken
Declaration
Swift
@objc public internal(set) var location: CLLocation? { get }
-
The creation date of this video
Declaration
Swift
@objc public internal(set) var creationDate: Date! { get }
-
The shot date of this video
Declaration
Swift
@objc public internal(set) var shotOn: Date! { get }
-
The modified date of this video
Declaration
Swift
@objc public internal(set) var modifyDate: Date! { get }
-
The title of this video
Declaration
Swift
@objc public internal(set) var title: String { get }
-
The description for this video
Declaration
Swift
@objc public internal(set) var videoDescription: String { get }
-
The thumbnail image URL for this video
Declaration
Swift
@objc public internal(set) var thumbnailImageURL: URL? { get }
-
The length of this video in seconds
Declaration
Swift
@objc public internal(set) var duration: TimeInterval { get }
-
Declaration
Swift
@objc public internal(set) var height: Int { get }
-
Declaration
Swift
@objc public internal(set) var width: Int { get }
-
The state of the video
Declaration
Swift
@objc public internal(set) var state: VKVideoState { get }
-
Declaration
Swift
@objc public internal(set) var playable: Bool { get }
-
Video Transcription
Declaration
Swift
@objc public internal(set) var transcription: String? { get }
-
Declaration
Swift
public override var hash: Int { get }
-
init(videoID:
tags: metadata: shareURL: width: height: mediaMP4URL360p: mediaMP4URL540p: mediaMP4URL720p: mediaHLSURL: location: shotOn: creationDate: modifyDate: title: videoDescription: thumbnailImageURL: duration: state: transcription: playable: mediaMP4URL1080p: contentFilter: objectDetection: ) Initialize VKVideo State can be one of the following: init, processing, processed, failed, all, unknown
Declaration
Swift
public init(videoID: String, tags: Set<String>, metadata: [String : String], shareURL: URL?, width: Int, height: Int, mediaMP4URL360p: URL?, mediaMP4URL540p: URL?, mediaMP4URL720p: URL?, mediaHLSURL: URL?, location: CLLocation?, shotOn: Date, creationDate: Date!, modifyDate: Date!, title: String, videoDescription: String, thumbnailImageURL: URL?, duration: TimeInterval, state: VKVideoState = .unknown, transcription: String? = nil, playable: Bool = false, mediaMP4URL1080p: URL? = nil, contentFilter: VKContentFilter = VKContentFilter(), objectDetection: VKObjectDetection = VKObjectDetection())
-
Declaration
Swift
public func encode() -> [String : Any]
-
Declaration
Swift
public static func decode(data: [String : Any]) -> VKVideo?
-
Declaration
Swift
public func mp4URL(resolution: VKVideoResolution) -> URL?