 
 // 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 {

// MARK: - HysteriaManager
/// Layer to interact with Hysteria instance and delegate methods.
class HysteriaManager: NSObject {
  
  static let sharedInstance = HysteriaManager()
  var queue = PlayerQueue()
  var delegate: SwiftPlayerDelegate?

    }
    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()
  }
