-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#5261Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
I saw when send command device left and iOS execute device right, like this:
if ([orientation isEqualToString:@"portraitDown"]) {
return UIDeviceOrientationPortraitUpsideDown;
} else if ([orientation isEqualToString:@"landscapeLeft"]) {
return UIDeviceOrientationLandscapeRight;
} else if ([orientation isEqualToString:@"landscapeRight"]) {
return UIDeviceOrientationLandscapeLeft;
} else if ([orientation isEqualToString:@"portraitUp"]) {
return UIDeviceOrientationPortrait;
}
but why
if (deviceOrientation == UIDeviceOrientationPortrait) {
return AVCaptureVideoOrientationPortrait;
} else if (deviceOrientation == UIDeviceOrientationLandscapeLeft) {
// Note: device orientation is flipped compared to video orientation. When UIDeviceOrientation
// is landscape left the video orientation should be landscape right.
return AVCaptureVideoOrientationLandscapeRight;
} else if (deviceOrientation == UIDeviceOrientationLandscapeRight) {
// Note: device orientation is flipped compared to video orientation. When UIDeviceOrientation
// is landscape right the video orientation should be landscape left.
return AVCaptureVideoOrientationLandscapeLeft;
} else if (deviceOrientation == UIDeviceOrientationPortraitUpsideDown) {
return AVCaptureVideoOrientationPortraitUpsideDown;
} else {
return AVCaptureVideoOrientationPortrait;
}
The above is based on the value transfer direction of flutter, and the following is based on the direction of real equipment. Are there any special scenes
Why does videoOrientation not follow deviceOrientation?
Doing so will cause the up and down directions of the custom camera UI to be reversed
Metadata
Metadata
Assignees
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds