MediaPlayer
@objc open class MediaPlayer: NSObject
This class is wrapper which handle tv media calls. its basic functionality is to launch DMP on TV and whatever notification comes from TV side it passes on to further module.
-
Namespace for constants that describe notices from media player on TV.
See moreDeclaration
Swift
public struct PlayerNotice
-
TV service name
Declaration
Swift
open fileprivate(set) var service: Service
-
Application Connection Status with TV.
Declaration
Swift
open fileprivate(set) var connected: Bool = false
-
Notification of any data received from TV player
Declaration
Swift
public func onMessage(_ message: Message)
Parameters
notification
contains player queue event and action
-
event occur when connection occur with channel
- client: The client that is connecting which is yourself
- error: An error info if connect fails
Declaration
Swift
public func onConnect(_ client: ChannelClient?, error: NSError?)
-
event occur when disconnection occur with channel.
- client: The client that is disconnecting which is yourself
- error: An error info if disconnect fails
Declaration
Swift
public func onDisconnect(_ client: ChannelClient?, error: NSError?)
-
Declaration
Swift
public func onClientConnect(_ client: ChannelClient)
Parameters
client
The Client that just connected to the Channel
-
Declaration
Swift
public func onClientDisconnect(_ client: ChannelClient)
Parameters
client
The Client that just disconnected from the Channel
-
Declaration
Swift
public func onError(_ error: NSError)
Parameters
error
The error
-
Declaration
Swift
public func onReady()