Commit dfd21ae9 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
parent afa7c7f2
......@@ -210,6 +210,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);
......@@ -1435,6 +1437,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