VKPlaylist

public class VKPlaylist : NSObject, VKPlaylistProtocol
  • Storing video objects

    Declaration

    Swift

    public internal(set) var videos: [VKVideo] { get }
  • Return count

    Declaration

    Swift

    public var count: Int { get }
  • Declaration

    Swift

    public internal(set) var totalCount: Int? { get }
  • Video playlist delegate

    Declaration

    Swift

    weak public var delegate: VKPlaylistDelegate?
  • Initialize empty playlist

    Declaration

    Swift

    public override init()
  • Initialize playlist with array of videos

    Declaration

    Swift

    public init(videos: [VKVideo])
  • Clear playlist (sets videos to empty array)

    Declaration

    Swift

    public func reset()
  • Return video at index

    Declaration

    Swift

    public func videoAt(_ index: Int) -> VKVideo?
  • Return video by id

    Declaration

    Swift

    public func videoById(_ videoId: String) -> VKVideo?
  • Check if video at given index exists locally

    Declaration

    Swift

    public func hasVideoAt(_ index: Int) -> Bool
  • Check if video by given id exists locally

    Declaration

    Swift

    public func hasVideoById(_ videoId: String) -> Bool
  • Add custom videos to the playlist

    Declaration

    Swift

    public func addVideos(_ videos: [VKVideo], at index: Int? = nil)
  • Add custom video to the playlist

    Declaration

    Swift

    public func addVideo(_ video: VKVideo, at index: Int? = nil)
  • Remove videos by ids from the playlist

    Declaration

    Swift

    public func removeVideos(byIds ids: [String])
  • Remove video by id from the playlist

    Declaration

    Swift

    public func removeVideo(byId id: String)