BasePlayer

@objc open class BasePlayer: NSObject

Base class for audio, video and photo player

  • The Connection delegate protocol defines the event methods available for channel Connection/DisConnection.

    Declaration

    Swift

    open weak var connectionDelegate: ConnectionDelegate? = nil
  • Disconnects to the channel. This method will asynchronously call the delegate’s onDisconnect method and post a ChannelEvent. - parameter completionHandler: callback handler of OnDisconnect

    Declaration

    Swift

    @objc open func disconnect(_ leaveHostRunning: Bool = true, completionHandler: ((_ error: NSError?) -> Void)? = nil)

    Parameters

    completionHandler

    callback handler of OnDisconnect

  • connects to the DMP standby screen with provides functionality to launch with Logo or upto three Background images - parameter screenSaverURL1: Optional Background Image Url

    Declaration

    Swift

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

    Parameters

    screenSaverURL1

    Optional Background Image Url

  • connects to the DMP standby screen with provides functionality to launch with Logo or upto three Background images - parameter screenSaverURL1: Optional Background Image Url - parameter screenSaverURL2: Optional Background Image Url

    Declaration

    Swift

    @objc open func standbyConnect(_ screenSaverURL1: URL?, screenSaverURL2: URL?, completionHandler: ((NSError?) -> Void)?)

    Parameters

    screenSaverURL1

    Optional Background Image Url

    screenSaverURL2

    Optional Background Image Url

  • connects to the DMP standby screen with provides functionality to launch with Logo or upto three Background images - parameter screenSaverURL1: Optional Background Image Url - parameter screenSaverURL2: Optional Background Image Url - parameter screenSaverURL3: Optional Background Image Url - parameter completionHandler: The response completion closure, it will be executed in the request queue i.e. in a backgound thread.

    Declaration

    Swift

    @objc open func standbyConnect(_ screenSaverURL1: URL?, screenSaverURL2: URL?, screenSaverURL3: URL?, completionHandler: ((NSError?) -> Void)?)

    Parameters

    screenSaverURL1

    Optional Background Image Url

    screenSaverURL2

    Optional Background Image Url

    screenSaverURL3

    Optional Background Image Url

    completionHandler

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

  • Sets the Watermark for the player - parameter watermarkUrl: Url from where watermark image will be downloaded

    Declaration

    Swift

    @objc open func setPlayerWatermark(_ watermarkUrl: URL?)

    Parameters

    watermarkUrl

    Url from where watermark image will be downloaded

  • Removes Player watermark set

    Declaration

    Swift

    @objc open func removePlayerWatermark()
  • Play last sent media contents.

    Declaration

    Swift

    @objc open func play()
  • Pause currently playing media.

    Declaration

    Swift

    @objc open func pause()
  • Stop currently playing media.

    Declaration

    Swift

    @objc open func stop()
  • Mute the volume of player on a connected device.

    Declaration

    Swift

    @objc open func mute()
  • UnMute the volume of player on a connected device.

    Declaration

    Swift

    @objc open func unMute()
  • Request previous to the player on a connected device.

    Declaration

    Swift

    @objc open func previous()
  • Request next to the player on a connected device.

    Declaration

    Swift

    @objc open func next()
  • Set volume on device playing media.

    Declaration

    Swift

    @objc open func setVolume(_ volume: UInt8)

    Parameters

    volume

    Integer value between 0 and 100.

  • increase volume of the player by 1.

    Declaration

    Swift

    @objc open func volumeUp()
  • decrease volume of the player by 1.

    Declaration

    Swift

    @objc open func volumeDown()
  • get the control status of the player - like volume etc.

    Declaration

    Swift

    @objc open func getControlStatus()