             self.currentPlayer.mediaConfig = mediaConfig
         }
         
+        // Reset the pause position
+        liveDVRPausedPosition = nil
+        
         self.currentPlayer.loadMedia(from: self.selectedSource, handler: handler)
     }
 }

        return self.currentPlayer.loadedTimeRanges
    }
    
    func play() {
        if self.mediaEntry?.mediaType == .live {
            self.currentPlayer.playFromLiveEdge()
        } else {
            self.currentPlayer.play()
        }
    }
    
    func pause() {
        self.currentPlayer.pause()
    }
    
    func resume() {
        if self.mediaEntry?.mediaType == .live {
            self.currentPlayer.playFromLiveEdge()
        } else {
            self.currentPlayer.resume()
        }
    }
    

    lazy var timeObserver = TimeObserver(timeProvider: self)
    var playheadObserverUUID: UUID?
    
    struct PausePosition {
        let date: Date = Date()
        let savedPosition: TimeInterval
        
        init(_ position: TimeInterval) {
            self.savedPosition = position
        }
    }
    var liveDVRPausedPosition: PausePosition?
    
    /************************************************************/
    // MARK: - Initialization
    /************************************************************/
