# PhotoPlayer

    @objc public class PhotoPlayer: BasePlayer

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

- `playerDelegate`

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

  #### Declaration

  Swift

      public weak var playerDelegate: PhotoPlayerDelegate? = nil

### Public APIs- objective C compatible

- `playContent(_:completionHandler:)`

  this method play image content on TV.

  #### Declaration

  Swift

      @objc public func playContent(contentURL: NSURL, 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.

- `playContent(_:title:completionHandler:)`

  this method play image content on TV.

  #### Declaration

  Swift

      @objc public func playContent(contentURL: NSURL, 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.

- `setSlideTimeout(_:)`

  sets slide show timeout period

  #### Declaration

  Swift

      @objc public func setSlideTimeout(time: NSTimeInterval)

  #### Parameters

  `time` | slide show time-out period in milliseconds.

- `setBackgroundMusic(_:)`

  sets background audio in slide show.

  #### Declaration

  Swift

      @objc public func setBackgroundMusic(contentURL: NSURL)

  #### Parameters

  `contentURL` | Background audio contentURL.

- `stopBackgroundMusic()`

  stops background audio in slide show.

  #### Declaration

  Swift

      @objc public func stopBackgroundMusic()

- `resumeApplicationInForeground(_:)`

  resumes TV widget/application from background process.

  #### Declaration

  Swift

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

- `getList()`

  request player list i.e currently playing on TV.

  #### Declaration

  Swift

      @objc public func getList()

- `clearList()`

  request to delete(removeAll) player list.

  #### Declaration

  Swift

      @objc public func clearList()

- `removeFromList(_:)`

  remove specific image from player list.

  #### Declaration

  Swift

      @objc public func removeFromList(contentURL: NSURL)

  #### Parameters

  `contentURL` | image URL

- `addToList(_:title:albumName:albumArtUrl:)`

  add image to player list.

  #### Declaration

  Swift

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

  #### Parameters

  `contentURL` | URL
  `title` | Title
  `albumName` | Album NAme
  `albumArtUrl` | Album Art URL

- `addToList(_:)`

  add Photo item to player list.

  #### Declaration

  Swift

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

  #### Parameters

  `arrayDictofData` | list data in form array of dictionary

### Notification Method

- `onMessage(_:)`

  Notification of any data received from TV player

  #### Declaration

  Swift

      public func onMessage(notification: NSNotification!)

  #### Parameters

  `notification` | contains player queue event and action

© 2016 . All rights reserved. (Last updated: 2016-10-27)

Generated by jazzy ♪♫ v0.7.2, a Realm project.