in mainFrameView, lock landscape orientation for iPhone, lock current orientation for iPad
Fullscreen version
This commit is contained in:
1 parent
caa4fccabd
commit
cc13b60411
4 files changed
+20
-14
No files matched your search
@@ -38,7 +38,7 @@
|
|||||||
<attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="onscreenControls" attributeType="Integer 32" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="optimizeGames" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="optimizeGames" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<attribute name="oscLayoutToolFingers" optional="YES" attributeType="Integer 16" defaultValueString="4" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="oscLayoutToolFingers" optional="YES" attributeType="Integer 16" defaultValueString="4" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="oscTapExlusionAreaSize" optional="YES" attributeType="Float" defaultValueString="1.05" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="oscTapExlusionAreaSize" optional="YES" attributeType="Float" defaultValueString="1.03" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="playAudioOnPC" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="playAudioOnPC" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<attribute name="pointerVelocityModeDivider" optional="YES" attributeType="Float" defaultValueString="0.5" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="pointerVelocityModeDivider" optional="YES" attributeType="Float" defaultValueString="0.5" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="preferredCodec" attributeType="Integer 32" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="preferredCodec" attributeType="Integer 32" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<attribute name="touchMode" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="touchMode" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="touchPointerVelocityFactor" optional="YES" attributeType="Float" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="touchPointerVelocityFactor" optional="YES" attributeType="Float" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
|
||||||
<attribute name="uniqueId" attributeType="String" syncable="YES"/>
|
<attribute name="uniqueId" attributeType="String" syncable="YES"/>
|
||||||
<attribute name="unlockDisplayOrientation" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="unlockDisplayOrientation" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<attribute name="useFramePacing" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
<attribute name="useFramePacing" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
|
||||||
<attribute name="width" attributeType="Integer 32" defaultValueString="1280" usesScalarValueType="NO" syncable="YES"/>
|
<attribute name="width" attributeType="Integer 32" defaultValueString="1280" usesScalarValueType="NO" syncable="YES"/>
|
||||||
</entity>
|
</entity>
|
||||||
|
|||||||
@@ -720,6 +720,9 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
[self _setFrontViewPosition:initialPosition withDuration:0.0];
|
[self _setFrontViewPosition:initialPosition withDuration:0.0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (bool)isIphone{
|
||||||
|
return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone);
|
||||||
|
}
|
||||||
|
|
||||||
- (UIInterfaceOrientationMask)getCurrentOrientation{
|
- (UIInterfaceOrientationMask)getCurrentOrientation{
|
||||||
CGFloat screenHeightInPoints = CGRectGetHeight([[UIScreen mainScreen] bounds]);
|
CGFloat screenHeightInPoints = CGRectGetHeight([[UIScreen mainScreen] bounds]);
|
||||||
@@ -732,18 +735,21 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
// tested on iOS17. this method does not call back on iOS14, runtime orientation limitation not working for iOS14. Probably depends on iOS16 or higher.
|
// tested on iOS17. this method does not call back on iOS14, runtime orientation limitation not working for iOS14. Probably depends on iOS16 or higher.
|
||||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||||
// Return the supported interface orientations based on the current state
|
// Return the supported interface orientations acoordingly
|
||||||
// NSLog(@"supportedInterfaceOrientations called back 666");
|
|
||||||
|
if(self.mainFrameIsInHostView){
|
||||||
|
if([self isIphone]) return UIInterfaceOrientationMaskLandscape; //always try to lock orientaion to landscape in mainFrameView in order to prevent bug.
|
||||||
|
else return [self getCurrentOrientation]; //always try to lock current orientaion in mainFrameView for iPad in order to prevent bug.
|
||||||
|
}
|
||||||
|
|
||||||
//lock the orientation accordingly after streaming is started
|
//lock the orientation accordingly after streaming is started
|
||||||
DataManager* dataMan = [[DataManager alloc] init];
|
DataManager* dataMan = [[DataManager alloc] init];
|
||||||
Settings *currentSettings = [dataMan retrieveSettings];
|
Settings *currentSettings = [dataMan retrieveSettings];
|
||||||
//Handle Lock Display Orientation on & off
|
|
||||||
|
|
||||||
if(self.mainFrameIsInHostView) return [self getCurrentOrientation]; //always try to lock orientaion in mainFrameView in order to prevent bug.
|
|
||||||
if(currentSettings.unlockDisplayOrientation){
|
if(currentSettings.unlockDisplayOrientation){
|
||||||
return UIInterfaceOrientationMaskAll; // 90 Degree rotation will be allowed in streaming
|
return UIInterfaceOrientationMaskAll; // 90 Degree rotation will be allowed in streaming or app view
|
||||||
}
|
}
|
||||||
else return [self getCurrentOrientation];
|
else return [self getCurrentOrientation]; // 90 Degree rotation not allowed in streaming or app view
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1154,19 +1154,19 @@
|
|||||||
"zh-Hans" : {
|
"zh-Hans" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zh-Hant" : {
|
"zh-Hant" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zh-HK" : {
|
"zh-HK" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2594,19 +2594,19 @@
|
|||||||
"zh-Hans" : {
|
"zh-Hans" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zh-Hant" : {
|
"zh-Hant" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zh-HK" : {
|
"zh-HK" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
"state" : "translated",
|
"state" : "translated",
|
||||||
"value" : "串流中允许90°转屏"
|
"value" : "允许90°转屏(App视图、串流时生效)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user