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

  • 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 the volume of player on a connected device.

    Declaration

    Swift

    @objc open func getVolume()
  • 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()