Real Time setting menu in streamView beta

This commit is contained in:
True Zhuanjia
2024-07-08 20:45:48 +08:00
4 changed files with 22 additions and 2 deletions
@@ -52,7 +52,6 @@
UIScrollView *_scrollView;
BOOL _userIsInteracting;
CGSize _keyboardSize;
#if !TARGET_OS_TV
CustomEdgeSwipeGestureRecognizer *_exitSwipeRecognizer;
CustomTapGestureRecognizer *_oscLayoutTapRecoginizer;
@@ -60,12 +59,20 @@
#endif
}
- (void)reConfigStreamView{
[_streamView setupStreamView:_controllerSupport interactionDelegate:self config:self.streamConfig];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
#if !TARGET_OS_TV
[[self revealViewController] setPrimaryViewController:self];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reConfigStreamView) // //force expand settings view to update resolution table, and all setting includes current fullscreen resolution will be updated.
name:@"SettingsViewClosed"
object:nil];
#endif
}
@@ -136,7 +143,7 @@
[self.view addGestureRecognizer:_playPauseTapGestureRecognizer];
#else
_exitSwipeRecognizer = [[CustomEdgeSwipeGestureRecognizer alloc] initWithTarget:self action:@selector(edgeSwiped)];
_exitSwipeRecognizer = [[CustomEdgeSwipeGestureRecognizer alloc] initWithTarget:self action:@selector(expandSettingsView)];
_exitSwipeRecognizer.edges = _settings.swipeExitScreenEdge.intValue;
_exitSwipeRecognizer.normalizedThresholdDistance = _settings.swipeToExitDistance.floatValue;
_exitSwipeRecognizer.delaysTouchesBegan = NO;
@@ -412,6 +419,10 @@
[self returnToMainFrame];
}
- (void)expandSettingsView{
[self.mainframeViewcontroller simulateSettingsButtonPress];
}
- (void)edgeSwiped {
Log(LOG_I, @"User swiped to end stream");