Skip to main content

API reference

Public classes#

NameDescription
VdoCipherProvides delegate setup method
VdoAssetAsset referenced with a video-id
AssetPlaybackDelegatePlayer events delegate

class VdoCipher#

Methods#

static func setPlaybackDelegate(delegate: AssetPlaybackDelegate)

class VdoAsset#

Properties#

NameTypeDescription
titlestring
downloadStateVdoAsset.DownloadState
percentDownlaodedDouble
videoIdString
DownloadStatestatic enum
- notDownloaded
- downloading
- downloaded
Keysstatic struct
- videoId
- percentDownloaded
- downloadState

Methods#

static func makeAsset(videoId: String, onLoad: @escaping (VdoFramework.VdoAsset) -> Void)

func playOnline(otp: String, playbackInfo: String)

func playOffline()

func getDownloadState() -> VdoAsset.DownloadState

func deleteDownload()

func cancelDownload()

func startDownload(otp: String, playbackInfo: String)

protocol AssetPlaybackDelegate#

Callbacks

func streamPlaybackManager(playerReadyToPlay player: AVFoundation.AVPlayer)

func streamPlaybackManager(playerCurrentItemDidChange player: AVFoundation.AVPlayer)

Notifications#

NSNotification.Name is extended to have three new static properties.

  1. AssetDownloadProgress

  2. AssetDownloadStateChanged

  3. AssetPersistenceManagerDidRestoreState

The entire swiftinterface file for reference#

// swift-interface-format-version: 1.0// swift-compiler-version: Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)// swift-module-flags: -target arm64-apple-ios14.5 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name VdoFrameworkimport AVFoundationimport Foundationimport Swiftimport UIKit@_exported import VdoFramework@_hasMissingDesignatedInitializers public class VdoCipher {  public static func setPlaybackDelegate(delegate: VdoFramework.AssetPlaybackDelegate)  @objc deinit}public protocol AssetPlaybackDelegate : AnyObject {  func streamPlaybackManager(playerReadyToPlay player: AVFoundation.AVPlayer)  func streamPlaybackManager(playerCurrentItemDidChange player: AVFoundation.AVPlayer)}@_hasMissingDesignatedInitializers public class VdoAsset {  public var title: Swift.String?  public var downloadState: VdoFramework.VdoAsset.DownloadState?  public var percentDownload: Swift.Double?  final public let videoId: Swift.String  public static func makeAsset(videoId: Swift.String, onLoad: @escaping (VdoFramework.VdoAsset) -> Swift.Void)  public func playOnline(otp: Swift.String, playbackInfo: Swift.String)  public func playOffline()  public func getDownloadState() -> VdoFramework.VdoAsset.DownloadState  public func deleteDownload()  public func cancelDownload()  public func startDownload(otp: Swift.String, playbackInfo: Swift.String)  @objc deinit}extension VdoAsset : Swift.Equatable {  public static func == (lhs: VdoFramework.VdoAsset, rhs: VdoFramework.VdoAsset) -> Swift.Bool}extension VdoAsset {  public enum DownloadState : Swift.String {    case notDownloaded    case downloading    case downloaded    public init?(rawValue: Swift.String)    public typealias RawValue = Swift.String    public var rawValue: Swift.String {      get    }  }}extension VdoAsset {  public struct Keys {    public static let videoId: Swift.String    public static let percentDownloaded: Swift.String    public static let downloadState: Swift.String  }}extension NSNotification.Name {  public static let AssetDownloadProgress: Foundation.Notification.Name  public static let AssetDownloadStateChanged: Foundation.Notification.Name  public static let AssetPersistenceManagerDidRestoreState: Foundation.Notification.Name}extension VdoFramework.VdoAsset.DownloadState : Swift.Equatable {}extension VdoFramework.VdoAsset.DownloadState : Swift.Hashable {}extension VdoFramework.VdoAsset.DownloadState : Swift.RawRepresentable {}