stop user interaction for streamFrameController->renderView to fix multi-touch issue
This commit is contained in:
1 parent
4074823e4e
commit
9ffeba72fe
3 files changed
+23
-14
No files matched your search
@@ -106,9 +106,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
selector:@selector(keyboardWillHide:)
|
selector:@selector(keyboardWillHide:)
|
||||||
name:UIKeyboardWillHideNotification
|
name:UIKeyboardWillHideNotification
|
||||||
object:nil];
|
object:nil];
|
||||||
if(settings.touchMode.intValue == PURE_NATIVE_TOUCH) [self addGestureRecognizer:keyboardToggleRecognizer]; //keep legacy approach in pure native mode
|
|
||||||
else [self->streamFrameTopLayerView addGestureRecognizer:keyboardToggleRecognizer]; //add to the superview in other modes
|
|
||||||
|
|
||||||
|
// if(settings.touchMode.intValue == PURE_NATIVE_TOUCH) [self addGestureRecognizer:keyboardToggleRecognizer]; //keep legacy approach in pure native mode
|
||||||
|
// else [self->streamFrameTopLayerView addGestureRecognizer:keyboardToggleRecognizer]; //add to the superview in other modes
|
||||||
|
|
||||||
|
[self->streamFrameTopLayerView addGestureRecognizer:keyboardToggleRecognizer]; //add to the superview in other modes
|
||||||
|
|
||||||
#if TARGET_OS_TV
|
#if TARGET_OS_TV
|
||||||
// tvOS requires RelativeTouchHandler to manage Apple Remote input
|
// tvOS requires RelativeTouchHandler to manage Apple Remote input
|
||||||
|
|||||||
@@ -55,7 +55,13 @@
|
|||||||
BOOL _userIsInteracting;
|
BOOL _userIsInteracting;
|
||||||
CGSize _keyboardSize;
|
CGSize _keyboardSize;
|
||||||
UIWindow *_extWindow;
|
UIWindow *_extWindow;
|
||||||
UIView *_renderView;
|
UIView *_streamVideoRenderView;
|
||||||
|
/*
|
||||||
|
* View architecture of this viewController:
|
||||||
|
* self.view (named `streamFrameTopLayerView` in StreamView.m, where slide & tap gestures, and onScreenControls & onScreenButtonView buttons are registered)
|
||||||
|
* - streamView (where touchHandlers are registered)
|
||||||
|
* - streamVideoRenderView (where stream view is rendered)
|
||||||
|
*/
|
||||||
UIWindow *_deviceWindow;
|
UIWindow *_deviceWindow;
|
||||||
dispatch_block_t _delayedRemoveExtScreen;
|
dispatch_block_t _delayedRemoveExtScreen;
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
@@ -194,7 +200,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[self.view insertSubview:self->_renderView atIndex:0];
|
[self->_streamView insertSubview:self->_streamVideoRenderView atIndex:0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,9 +275,10 @@
|
|||||||
_controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig delegate:self];
|
_controllerSupport = [[ControllerSupport alloc] initWithConfig:self.streamConfig delegate:self];
|
||||||
_inactivityTimer = nil;
|
_inactivityTimer = nil;
|
||||||
|
|
||||||
_renderView = (StreamView*)[[UIView alloc] initWithFrame:self.view.frame];
|
_streamVideoRenderView = (StreamView*)[[UIView alloc] initWithFrame:self.view.frame];
|
||||||
_streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
_streamView = [[StreamView alloc] initWithFrame:self.view.frame];
|
||||||
_renderView.bounds = _streamView.bounds;
|
_streamVideoRenderView.bounds = _streamView.bounds;
|
||||||
|
_streamVideoRenderView.userInteractionEnabled = false; // this will prevent renderView from intrecepting touchEvents which shall be interacting with streamView
|
||||||
//[_streamView setupStreamView:_controllerSupport interactionDelegate:self config:self.streamConfig];
|
//[_streamView setupStreamView:_controllerSupport interactionDelegate:self config:self.streamConfig];
|
||||||
[self reConfigStreamViewRealtime]; // call this method again to make sure all gestures are configured & added to the superview(self.view), including the gestures added from inside the streamview.
|
[self reConfigStreamViewRealtime]; // call this method again to make sure all gestures are configured & added to the superview(self.view), including the gestures added from inside the streamview.
|
||||||
|
|
||||||
@@ -313,7 +320,7 @@
|
|||||||
_tipLabel.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height * 0.9);
|
_tipLabel.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height * 0.9);
|
||||||
|
|
||||||
_streamMan = [[StreamManager alloc] initWithConfig:self.streamConfig
|
_streamMan = [[StreamManager alloc] initWithConfig:self.streamConfig
|
||||||
renderView:_renderView
|
renderView:_streamVideoRenderView
|
||||||
connectionCallbacks:self];
|
connectionCallbacks:self];
|
||||||
NSOperationQueue* opQueue = [[NSOperationQueue alloc] init];
|
NSOperationQueue* opQueue = [[NSOperationQueue alloc] init];
|
||||||
[opQueue addOperation:_streamMan];
|
[opQueue addOperation:_streamMan];
|
||||||
@@ -533,11 +540,11 @@
|
|||||||
_extWindow = [[UIWindow alloc] initWithFrame:frame];
|
_extWindow = [[UIWindow alloc] initWithFrame:frame];
|
||||||
}
|
}
|
||||||
_extWindow.screen = extScreen;
|
_extWindow.screen = extScreen;
|
||||||
_renderView.bounds = frame;
|
_streamVideoRenderView.bounds = frame;
|
||||||
_renderView.frame = frame;
|
_streamVideoRenderView.frame = frame;
|
||||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||||
[nc postNotificationName:@"ScreenChanged" object:self];
|
[nc postNotificationName:@"ScreenChanged" object:self];
|
||||||
[_extWindow addSubview:_renderView];
|
[_extWindow addSubview:_streamVideoRenderView];
|
||||||
_extWindow.hidden = NO;
|
_extWindow.hidden = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,15 +552,15 @@
|
|||||||
Log(LOG_I, @"Removing External Screen");
|
Log(LOG_I, @"Removing External Screen");
|
||||||
_extWindow.hidden = YES;
|
_extWindow.hidden = YES;
|
||||||
[self handleViewResize];
|
[self handleViewResize];
|
||||||
[self.view insertSubview:_renderView atIndex:0];
|
[_streamView insertSubview:_streamVideoRenderView atIndex:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) handleViewResize{
|
- (void) handleViewResize{
|
||||||
_streamView.bounds = _deviceWindow.bounds;
|
_streamView.bounds = _deviceWindow.bounds;
|
||||||
_streamView.frame = _deviceWindow.frame;
|
_streamView.frame = _deviceWindow.frame;
|
||||||
if(![self isAirPlaying]){
|
if(![self isAirPlaying]){
|
||||||
_renderView.bounds = _deviceWindow.bounds;
|
_streamVideoRenderView.bounds = _deviceWindow.bounds;
|
||||||
_renderView.frame = _deviceWindow.frame;
|
_streamVideoRenderView.frame = _deviceWindow.frame;
|
||||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||||
[nc postNotificationName:@"ScreenChanged" object:self];
|
[nc postNotificationName:@"ScreenChanged" object:self];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1283,7 +1283,7 @@
|
|||||||
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
|
"$(PROJECT_DIR)/libs/FFmpeg/lib/iOS-Sim",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 9.0.263;
|
MARKETING_VERSION = 9.0.263;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-trzj2.iOS";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.moonlight-trzj3.iOS";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE = "";
|
PROVISIONING_PROFILE = "";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
Reference in new issue
Block a user