             player.observe(\.timeControlStatus) { [weak self] player, _ in self?.triggerStallingIfNeeded(player) },
             player.observe(\.rate, options: .prior) { [weak self] player, changes in self?.handlePlayerRateChanged(player, changes) },
         ]
-    }
-
-    @objc func addObservers() {
+        
         NotificationCenter.default.addObserver(
             self,
             selector: #selector(playbackDidEnd),

        
        return player
    }

    private func triggerSetupError() {
        trigger(.error)
        Logger.logError("could not setup player", scope: pluginName)
    }

    private func setupPlayerIfNeeded() {
        guard player == nil else { return }
        guard let asset = asset else { return triggerSetupError() }

        player = createAVPlayer(with: asset, shouldLoop: shouldLoop)
        playerLayer = AVPlayerLayer(player: player)
        view.layer.addSublayer(playerLayer)
        playerLayer.frame = view.bounds
        setupMaxResolution(for: playerLayer.frame.size)

        asset.wait(for: .characteristics, then: selectDefaultMediaOptionIfNeeded)
        asset.wait(for: .duration, then: durationAvailable)
        setupObservers()
        addObservers()
    }

    private func durationAvailable() {
        trigger(.assetReady)
        seekToStartAtIfNeeded()
    }

    private func seekToStartAtIfNeeded() {
        guard canStartAt else { return }
        
        seek(startAt)
    }
    
    private func seekToLiveStartTime() {
        guard let liveStartTime = liveStartTime else { return }
        
        let positionToSeek = liveStartTime - epochDvrWindowStart
        
        seek(positionToSeek)
    }

    #if os(tvOS)
    internal func loadMetadata() {
        if let playerItem = player?.currentItem {
            nowPlayingService.setItems(to: playerItem, with: options)
        }
    }
    #endif

    @objc func setupObservers() {
        observers += [
            view.observe(\.bounds) { [weak self] view, _ in
                self?.maximizePlayer(within: view)

            name: .AVPlayerItemNewAccessLogEntry,
            object: nil
        )
        
        NotificationCenter.default.addObserver(
            self,
            selector: #selector(onFailedToPlayToEndTime),
