PhotoPlayer
@objc public 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
public weak var playerDelegate: PhotoPlayerDelegate? = nil
-
this method play image content on TV.
Declaration
Swift
@objc public func playContent(contentURL: NSURL, completionHandler: ((NSError?) -> Void)? = nil)Parameters
contentURLimage Url
completionHandlerThe 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 public func playContent(contentURL: NSURL, title: String, completionHandler: ((NSError?) -> Void)? = nil)Parameters
contentURLimage URL
titleimage Title
completionHandlerThe response completion closure, it will be executed in the request queue i.e. in a backgound thread.
-
sets slide show timeout period
Declaration
Swift
@objc public func setSlideTimeout(time: NSTimeInterval)Parameters
timeslide show time-out period in milliseconds.
-
sets background audio in slide show.
Declaration
Swift
@objc public func setBackgroundMusic(contentURL: NSURL)Parameters
contentURLBackground audio contentURL.
-
stops background audio in slide show.
Declaration
Swift
@objc public func stopBackgroundMusic() -
resumes TV widget/application from background process.
Declaration
Swift
@objc public func resumeApplicationInForeground(completionHandler: ((NSError?) -> Void)? = nil) -
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 image from player list.
Declaration
Swift
@objc public func removeFromList(contentURL: NSURL)Parameters
contentURLimage URL
-
add image to player list.
Declaration
Swift
@objc public func addToList(contentURL: NSURL, title: String = "", albumName: String = "", albumArtUrl: NSURL = NSURL(fileURLWithPath: ""))Parameters
contentURLURL
titleTitle
albumNameAlbum NAme
albumArtUrlAlbum Art URL
-
add Photo item to player list.
Declaration
Swift
@objc public func addToList(var arrayDictofData: [[String: AnyObject]])Parameters
arrayDictofDatalist data in form array of dictionary
-
Notification of any data received from TV player
Declaration
Swift
public func onMessage(notification: NSNotification!)Parameters
notificationcontains player queue event and action
PhotoPlayer Class Reference