     }
     return nil
   }
-  
+
   func currentIndex() -> Int {
     let index: NSNumber = hysteriaPlayer.getHysteriaIndex(hysteriaPlayer.getCurrentItem())
     return Int(index)
   }
-  
+
   private func fetchAndPlayAtIndex(index: Int) {
     hysteriaPlayer.fetchAndPlayPlayerItem(index)
   }
-  
+
   func playingItemDurationTime() -> Float {
     return hysteriaPlayer.getPlayingItemDurationTime()
   }

      break
    }
  }
  
  func hysteriaPlayerItemFailedToPlayEndTime(item: AVPlayerItem!, error: NSError!) {
    if logs {print("• item failed to play end time :error >> \(error.description)")}
  }
  
  func hysteriaPlayerItemPlaybackStall(item: AVPlayerItem!) {
    if logs {print("• item playback stall :item >> \(item)")}
  }
  
}

// MARK: - HysteriaPlayerDelegate
extension HysteriaManager: HysteriaPlayerDelegate {

  func hysteriaPlayerWillChangedAtIndex(index: Int) {
    if logs {print("• player will changed :atindex >> \(index)")}
  }

  func hysteriaPlayerCurrentItemChanged(item: AVPlayerItem!) {
    if logs {print("• current item changed :item >> \(item)")}
    delegate?.playerCurrentTrackChanged(currentItem())
    queueDelegate?.queueUpdated()
    updateCurrentItem()
  }

  func hysteriaPlayerRateChanged(isPlaying: Bool) {
    if logs {print("• player rate changed :isplaying >> \(isPlaying)")}
    delegate?.playerRateChanged(isPlaying)
  }

  func hysteriaPlayerDidReachEnd() {
    if logs {print("• player did reach end")}
  }

  func hysteriaPlayerCurrentItemPreloaded(time: CMTime) {
    if logs {print("• current item preloaded :time >> \(CMTimeGetSeconds(time))")}
  }

  func hysteriaPlayerDidFailed(identifier: HysteriaPlayerFailed, error: NSError!) {
    if logs {print("• player did failed :error >> \(error.description)")}
    switch identifier {
