# BasePlayer

    @objc public class BasePlayer: NSObject

Base class for audio, video and photo player

- `connectionDelegate`

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

  #### Declaration

  Swift

      public weak var connectionDelegate: ConnectionDelegate? = nil

### APIs for Common Use, Objective C + Swift

- `disconnect(_:)`

  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 public func disconnect(completionHandler: ((error: NSError?) -> Void)? = nil)

  #### Parameters

  `completionHandler` | callback handler of OnDisconnect

- `play()`

  Play last sent media contents.

  #### Declaration

  Swift

      @objc public func play()

- `pause()`

  Pause currently playing media.

  #### Declaration

  Swift

      @objc public func pause()

- `stop()`

  Stop currently playing media.

  #### Declaration

  Swift

      @objc public func stop()

- `mute()`

  Mute the volume of player on a connected device.

  #### Declaration

  Swift

      @objc public func mute()

- `unMute()`

  UnMute the volume of player on a connected device.

  #### Declaration

  Swift

      @objc public func unMute()

- `getVolume()`

  Request the volume of player on a connected device.

  #### Declaration

  Swift

      @objc public func getVolume()

- `previous()`

  Request previous to the player on a connected device.

  #### Declaration

  Swift

      @objc public func previous()

- `next()`

  Request next to the player on a connected device.

  #### Declaration

  Swift

      @objc public func next()

- `setVolume(_:)`

  Set volume on device playing media.

  #### Declaration

  Swift

      @objc public func setVolume(volume: UInt8)

  #### Parameters

  `volume` | Integer value between 0 and 100.

- `volumeUp()`

  increase volume of the player by 1.

  #### Declaration

  Swift

      @objc public func volumeUp()

- `volumeDown()`

  decrease volume of the player by 1.

  #### Declaration

  Swift

      @objc public func volumeDown()

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

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