PhotoPlayer

@objc open class PhotoPlayer: BasePlayer

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

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

    Declaration

    Swift

    open weak var playerDelegate: PhotoPlayerDelegate? = nil
  • this method play image content on TV.

    Declaration

    Swift

    @objc open func playContent(_ contentURL: URL, completionHandler: ((NSError?) -> Void)? = nil)

    Parameters

    contentURL

    image Url

    completionHandler

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

  • this method play image content on TV.

    Declaration

    Swift

    @objc open func playContent(_ contentURL: URL?, title: String, completionHandler: ((NSError?) -> Void)? = nil)

    Parameters

    contentURL

    image URL

    title

    image Title

    completionHandler

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

  • sets background audio in slide show.

    Declaration

    Swift

    @objc open func setBackgroundMusic(_ contentURL: URL)

    Parameters

    contentURL

    Background audio contentURL.

  • stops background audio in slide show.

    Declaration

    Swift

    @objc open func stopBackgroundMusic()
  • resumes TV widget/application from background process.

    Declaration

    Swift

    @objc open func resumeApplicationInForeground(_ completionHandler: ((NSError?) -> Void)? = nil)
  • request player list i.e currently playing on TV.

    Declaration

    Swift

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

    Declaration

    Swift

    @objc open func clearList()
  • remove specific image from player list.

    Declaration

    Swift

    @objc open func removeFromList(_ contentURL: URL)

    Parameters

    contentURL

    image URL

  • add image to player list.

    Declaration

    Swift

    @objc open func addToList(_ contentURL: URL, title: String = "")

    Parameters

    contentURL

    URL

    title

    Title

    albumName

    Album NAme

    albumArtUrl

    Album Art URL

  • add Photo item to player list.

    Declaration

    Swift

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

    Parameters

    arrayDictofData

    list data in form array of dictionary

  • Notification of any data received from TV player

    Declaration

    Swift

    open func onMessage(_ notification: Notification!)

    Parameters

    notification

    contains player queue event and action