VideoPlayer

@objc public class VideoPlayer: BasePlayer

Video Player Class handle the Video share, control and TV Player queue.

  • The Video Player delegate protocol defines the event methods available for a Video.

    Declaration

    Swift

    public weak var playerDelegate: VideoPlayerDelegate? = nil
  • this method play video content on TV.

    Declaration

    Swift

    @objc public func playContent(contentURL: NSURL, completionHandler: ((NSError?) -> Void)? = nil)

    Parameters

    contentURL

    video Url

    completionHandler

    The response completion closure, it will be executed in the request queue i.e. in a backgound thread.

  • this method play video content on TV.

    Declaration

    Swift

    @objc public func playContent(contentURL: NSURL, title: String, thumbnailURL: NSURL, completionHandler: ((NSError?) -> Void)? = nil)

    Parameters

    contentURL

    Content URL

    title

    Content Title

    thumbnailURL

    Content thumbnail URL

    completionHandler

    The response completion closure, it will be executed in the request queue i.e. in a backgound thread.

  • This method sends request to player for fast forwarding the video.

    Declaration

    Swift

    @objc public func forward()
  • This method sends request to player for rewind the video.

    Declaration

    Swift

    @objc public func rewind()
  • Seek the given time in currently playing media.

    Declaration

    Swift

    @objc public func seek(time: NSTimeInterval)

    Parameters

    time

    Time in seconds within length of currently playing media.

  • repeat player list.

    Declaration

    Swift

    @objc public func repeatQueue()
  • resumes TV widget/application from background process.

    Declaration

    Swift

    @objc public func resumeApplicationInForeground(completionHandler: ((NSError?) -> Void)? = nil)

    Parameters

    completionHandler

    The response completion closure, it will be executed in the request queue i.e. in a backgound thread.

  • request player list i.e currently playing on TV.

    Declaration

    Swift

    @objc public func getList()
  • request to delete(removeAll) player list.

    Declaration

    Swift

    @objc public func clearList()
  • remove specific video content from player list.

    Declaration

    Swift

    @objc public func removeFromList(contentURL: NSURL)

    Parameters

    contentURL

    video URL

  • Add video item to player list.

    Declaration

    Swift

    @objc public func addToList(contentURL: NSURL, title: String = "", thumbnailURL: NSURL = NSURL(fileURLWithPath: ""))

    Parameters

    contentURL

    URL

    title

    Title

    thumbnailURL

    thumbnail URL

  • Add video item to player list.

    Declaration

    Swift

    @objc public func addToList(var arrayDictofData: [[String: AnyObject]])

    Parameters

    arrayDictofData

    list data in form array of dictionary

  • Notification of any data received from TV player

    Declaration

    Swift

    public func onMessage(notification: NSNotification!)

    Parameters

    notification

    contains player queue event and action