Commit f40ad2e4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

movie view: correctly update brightness slider when screen brightness is...

movie view: correctly update brightness slider when screen brightness is changed by the user through a OS provided way

(cherry picked from commit dfd21ae9)
parent e26241fc
......@@ -219,6 +219,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
name:UIScreenDidConnectNotification object:nil];
[center addObserver:self selector:@selector(handleExternalScreenDidDisconnect:)
name:UIScreenDidDisconnectNotification object:nil];
[center addObserver:self selector:@selector(screenBrightnessChanged:)
name:UIScreenBrightnessDidChangeNotification object:nil];
_playingExternallyTitle.text = NSLocalizedString(@"PLAYING_EXTERNALLY_TITLE", nil);
_playingExternallyDescription.text = NSLocalizedString(@"PLAYING_EXTERNALLY_DESC", nil);
......@@ -1474,6 +1476,11 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
[self _resetIdleTimer];
}
- (void)screenBrightnessChanged:(NSNotification *)notification
{
self.brightnessSlider.value = [(UIScreen *)notification.object brightness] * 2.;
}
#pragma mark - playback view
- (IBAction)playbackSliderAction:(UISlider *)sender
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment