         hideControlsTimer?.invalidate()
         if isPlaybackPlaying() {
             hideAnimated()
-        } else if let playback = container.playback {
+        } else if let playback = container?.playback {
             listenToOnce(playback, eventName: Event.playing.rawValue) { [weak self] _ in self?.hideAnimated() }
         }
     }


    @IBOutlet open weak var airPlayVolumeView: MPVolumeView?

    internal(set) open var container: Container!
    internal(set) open var controlsHidden = false

    open var bufferPercentage: CGFloat = 0.0


    fileprivate func pause() {
        playbackControlState = .paused
        container?.playback?.pause()
        trigger(Event.didPause.rawValue)
    }

    fileprivate func play() {
        playbackControlState = .playing
        container?.playback?.play()
        trigger(Event.playing.rawValue)
    }

    fileprivate func stop() {
        playbackControlState = .stopped
        container?.playback?.stop()
        trigger(Event.didStop.rawValue)
    }

