 	/// A `UIWindow` that is inserted above the system status bar to show the volume indicator.
 	internal let volumeWindow: UIWindow = UIWindow()
 	
+	/// A standard iOS `MPVolumeView` that never appears but is necessary to hide the system volume HUD.
+	private let volumeView = MPVolumeView()
+	
 	/// A timer that controls when the `VolumeBar` automatically hides.
 	///
 	/// Each time a volume button is pressed, the timer is invalidated and set again with duration `minimumVisibleDuration`.

		volumeWindow.backgroundColor = nil
		volumeWindow.rootViewController = volumeViewController
		volumeWindow.windowLevel = UIWindowLevelStatusBar + 1
	}
	
	deinit {

	/// Observe changes in volume.
	///
	/// This method is called when the user presses either of the volume buttons.
	public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
		// Exit early if the object isn't an `AVAudioSession`.
		guard object is AVAudioSession else { return }
		
		show()
	}
	
	/// Observe when the application background state changes.
	public func applicationWillResignActive(notification: Notification) {
