# AudioPlayerDelegate

Undocumented

### All Optional Callbacks

- `onBufferingStart()`

  event occurs on Buffering of Audio Start.

  #### Declaration

  Swift

      @objc optional func onBufferingStart()

- `onBufferingComplete()`

  event occurs on Buffering of Audio Complete.

  #### Declaration

  Swift

      @objc optional func onBufferingComplete()

- `onBufferingProgress(_:)`

  event occurs asynchronously when audio buffering is in progress.

  #### Declaration

  Swift

      @objc optional func onBufferingProgress(_ progress: Int)

  #### Parameters

  `progress` | current Buffer Progerss

- `onCurrentPlayTime(_:)`

  event occurs continously when Audio streaming is going on.

  #### Declaration

  Swift

      @objc optional func onCurrentPlayTime(_ progress: Int)

  #### Parameters

  `progress` | current playing time of Audio.

- `onStreamingStarted(_:)`

  event occurs when Audio streaming start.

  #### Declaration

  Swift

      @objc optional func onStreamingStarted(_ duration: Int)

  #### Parameters

  `duration` | total duration of audio.

- `onStreamCompleted()`

  event occurs when Audio streaming completed.

  #### Declaration

  Swift

      @objc optional func onStreamCompleted()

- `onPlayerInitialized()`

  event occurs when Audio is shared with TV for the first time.

  #### Declaration

  Swift

      @objc optional func onPlayerInitialized()

- `onPlayerChange(_:)`

  event occurs when different type of media is shared with TV. (Audio is shared after photo/video share)

  #### Declaration

  Swift

      @objc optional func onPlayerChange(_ playerType: String)

  #### Parameters

  `playerType` | current player type (photo/audio/video)

- `onPlay()`

  event occurs when paused audio is played.

  #### Declaration

  Swift

      @objc optional func onPlay()

- `onPause()`

  event occurs on audio pause.

  #### Declaration

  Swift

      @objc optional func onPause()

- `onStop()`

  event occurs on audio stop.

  #### Declaration

  Swift

      @objc optional func onStop()

- `onMute()`

  event occurs on Player mute.

  #### Declaration

  Swift

      @objc optional func onMute()

- `onUnMute()`

  event occurs on Player unMute.

  #### Declaration

  Swift

      @objc optional func onUnMute()

- `onNext()`

  event occurs when Player plays next content.

  #### Declaration

  Swift

      @objc optional func onNext()

- `onPrevious()`

  event occurs when Player plays previous content.

  #### Declaration

  Swift

      @objc optional func onPrevious()

- `onControlStatus(_:muteStatus:shuffleStatus:mode:)`

  provides the status of play controls like volume, mute/unmute and mode of player like single or repeat all - parameter volLevel: player volume level - parameter muteStatus: player mute status - parameter shuffleStatus: player shuffle status - parameter mode: player mode single or repeat all

  #### Declaration

  Swift

      @objc optional func onControlStatus(_ volLevel: Int, muteStatus: Bool, shuffleStatus: Bool, mode: String)

  #### Parameters

  `volLevel` | player volume level
  `muteStatus` | player mute status
  `shuffleStatus` | player shuffle status
  `mode` | player mode single or repeat all

- `onVolumeChange(_:)`

  event occurs on player volume change.

  #### Declaration

  Swift

      @objc optional func onVolumeChange(_ volLevel: Int)

  #### Parameters

  `volLevel` | player volume to be set.

- `onAddToList(_:)`

  event occurs on audio addition in TV queue(player list).

  #### Declaration

  Swift

      @objc optional func onAddToList(_ enqueuedItem: [String: AnyObject])

  #### Parameters

  `enqueuedItem` | enqueued audio item.

- `onRemoveFromList(_:)`

  event occurs on audio remove from TV queue(player list).

  #### Declaration

  Swift

      @objc optional func onRemoveFromList(_ dequeuedItem: [String: AnyObject])

  #### Parameters

  `dequeuedItem` | dequeued audio Item.

- `onClearList()`

  event occurs on TV queue(player list) deletion.

  #### Declaration

  Swift

      @objc optional func onClearList()

- `onGetList(_:)`

  event occurs when player list(TV queue) is recieved.

  #### Declaration

  Swift

      @objc optional func onGetList(_ queueList: [String: AnyObject])

  #### Parameters

  `queueList` | play list of TV

- `onShuffle(_:)`

  event occurs when player list is shuffled.

  #### Declaration

  Swift

      @objc optional func onShuffle(_ status: Bool)

  #### Parameters

  `status` | shuffle status(true/false)

- `onRepeat(_:)`

  event occurs on player list repeat.

  #### Declaration

  Swift

      @objc optional func onRepeat(_ mode: String)

  #### Parameters

  `mode` | specify repeat all/repeat single audio

- `onCurrentPlaying(_:)`

  occurs when new audio is shared with TV.

  #### Declaration

  Swift

      @objc optional func onCurrentPlaying(_ currentItem: [String: AnyObject])

  #### Parameters

  `currentItem` | current shared item.

- `onApplicationSuspend()`

  occurs when TV Application/widget goes into background.

  #### Declaration

  Swift

      @objc optional func onApplicationSuspend()

- `onApplicationResume()`

  occurs when TV Application/widget comes in foreground.

  #### Declaration

  Swift

      @objc optional func onApplicationResume()

- `onError(_:)`

  occurs when error is occured in playing Audio

  #### Declaration

  Swift

      @objc optional func onError(_ error: NSError)

  #### Parameters

  `error` | eror details

© 2017 . All rights reserved. (Last updated: 2017-06-08)

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