|
@@ -98,14 +98,21 @@ function computeCameraVideoSize( // eslint-disable-line max-params
|
98
|
98
|
}
|
99
|
99
|
|
100
|
100
|
const aspectRatio = videoWidth / videoHeight;
|
|
101
|
+ const videoSpaceRatio = videoSpaceWidth / videoSpaceHeight;
|
101
|
102
|
|
102
|
103
|
switch (videoLayoutFit) {
|
103
|
104
|
case 'height':
|
104
|
105
|
return [ videoSpaceHeight * aspectRatio, videoSpaceHeight ];
|
105
|
106
|
case 'width':
|
106
|
107
|
return [ videoSpaceWidth, videoSpaceWidth / aspectRatio ];
|
|
108
|
+ case 'nocrop':
|
|
109
|
+ return computeCameraVideoSize(
|
|
110
|
+ videoWidth,
|
|
111
|
+ videoHeight,
|
|
112
|
+ videoSpaceWidth,
|
|
113
|
+ videoSpaceHeight,
|
|
114
|
+ videoSpaceRatio < aspectRatio ? 'width' : 'height');
|
107
|
115
|
case 'both': {
|
108
|
|
- const videoSpaceRatio = videoSpaceWidth / videoSpaceHeight;
|
109
|
116
|
const maxZoomCoefficient = interfaceConfig.MAXIMUM_ZOOMING_COEFFICIENT
|
110
|
117
|
|| Infinity;
|
111
|
118
|
|