         }
     }
     
-    func loadPlayerHistoryItem(item: PlayerHistoryItem) {
+    func loadPlayerHistoryItem(item: PlayerHistoryItem, startFromLastPlaybackPosition: Bool = false) {
         
         self.audioPlayer.dispose()
         self.audioPlayer = STKAudioPlayer()

    
    fileprivate func addObservers() {
        NotificationCenter.default.addObserver(self, selector: #selector(headphonesWereUnplugged), name: .AVAudioSessionRouteChange, object: AVAudioSession.sharedInstance())
    }
    
    fileprivate func removeObservers() {
        NotificationCenter.default.removeObserver(self, name: .AVAudioSessionRouteChange, object: AVAudioSession.sharedInstance())
    }
    
    @objc private func stopAtEndTime() {

    }
    
    @objc func playInterrupted(notification: NSNotification) {
        if notification.name == NSNotification.Name.AVAudioSessionInterruption, let userInfo = notification.userInfo {
            var intValue: UInt = 0
            (userInfo[AVAudioSessionInterruptionTypeKey] as! NSValue).getValue(&intValue)
            
            switch AVAudioSessionInterruptionType(rawValue: intValue) {
                case .some(.began):
                    savePlaybackPosition()
                case .some(.ended):
                    var intOptionValue: UInt = 0
                    (userInfo[AVAudioSessionInterruptionOptionKey] as! NSValue).getValue(&intOptionValue)
                    if intOptionValue == AVAudioSessionInterruptionFlags_ShouldResume && self.audioPlayer.state == .playing, let item = self.nowPlayingItem {
                        // Resuming from background might not work in StreamingKit, so I am loading the playerHistoryItem over again
                        // Using startFromLastPlaybackPosition so if a clip is now playing, then it will resume from the last playback position instead of the clip start time
                        self.loadPlayerHistoryItem(item: item, startFromLastPlaybackPosition: true)
                    }
                default:
                    break
