         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() }
         }
     }

    }

    open var fullscreenDisabled: Bool {
        return container.options[kFullscreenDisabled] as? Bool ?? false
    }

    fileprivate var duration: CGFloat {
        return CGFloat(container.playback?.duration ?? 0.0)
    }

    public required init?(coder aDecoder: NSCoder) {


    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)
    }

