 open class SpinnerPlugin: OverlayPlugin {
 
     fileprivate var spinningWheel: UIActivityIndicatorView!
+    private let loadingStates: [PlaybackState] = [.none, .stalling]
 
     @objc var isAnimating: Bool {
         return spinningWheel.isAnimating

        view.accessibilityIdentifier = "SpinnerPlugin"
    }
    
    open override func bindEvents() {}

    open override func render() {
        view.addMatchingConstraints(spinningWheel)

        listenTo(playback, event: .didPause) { [weak self] _ in self?.stopAnimating() }
        listenTo(playback, event: .didStop) { [weak self] _ in self?.stopAnimating() }
    }
    
    private func updateVisibility() {
        let playbackState = core?.activePlayback?.state ?? .error
        
        if loadingStates.contains(playbackState) {
            startAnimating()
        } else {
            stopAnimating()
        }
    }
    
    private func startAnimating() {
        view.isHidden = false
        spinningWheel.startAnimating()
