     fileprivate var playerLayer: AVPlayerLayer?
     fileprivate var playerStatus: AVPlayerStatus = .unknown
     fileprivate var currentState = PlaybackState.idle
+    fileprivate var timeObserver: Any?
     private var backgroundSessionBackup: String?
 
     open var url: URL?

            player?.removeObserver(self, forKeyPath: "currentItem.playbackLikelyToKeepUp")
            player?.removeObserver(self, forKeyPath: "currentItem.playbackBufferEmpty")
            player?.removeObserver(self, forKeyPath: "externalPlaybackActive")
        }

        NotificationCenter.default.removeObserver(self)

    }

    fileprivate func addTimeElapsedCallback() {
        timeObserver = player?.addPeriodicTimeObserver(forInterval: CMTimeMakeWithSeconds(0.2, 600), queue: nil) { [weak self] time in
            self?.timeUpdated(time)
        }
    }
