Commit 5126dd6 1 parent b2f3c08 commit 5126dd6 Copy full SHA for 5126dd6
File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,15 @@ extension AVCaptureDevice.Format {
22
22
}
23
23
24
24
func toDictionary( ) -> [ String : Any ] {
25
+ let videoDimensions = CMVideoFormatDescriptionGetDimensions ( formatDescription)
26
+
25
27
var dict : [ String : Any ] = [
26
28
" videoStabilizationModes " : videoStabilizationModes. map ( \. descriptor) ,
27
29
" autoFocusSystem " : autoFocusSystem. descriptor,
28
30
" photoHeight " : highResolutionStillImageDimensions. height,
29
31
" photoWidth " : highResolutionStillImageDimensions. width,
32
+ " videoHeight " : videoDimensions. height,
33
+ " videoWidth " : videoDimensions. width,
30
34
" maxISO " : maxISO,
31
35
" minISO " : minISO,
32
36
" fieldOfView " : videoFieldOfView,
@@ -41,11 +45,11 @@ extension AVCaptureDevice.Format {
41
45
]
42
46
} ,
43
47
]
48
+
44
49
if #available( iOS 13 . 0 , * ) {
45
50
dict [ " isHighestPhotoQualitySupported " ] = self . isHighestPhotoQualitySupported
46
- dict [ " videoHeight " ] = self . formatDescription. presentationDimensions ( ) . height
47
- dict [ " videoWidth " ] = self . formatDescription. presentationDimensions ( ) . width
48
51
}
52
+
49
53
return dict
50
54
}
51
55
}
Original file line number Diff line number Diff line change @@ -118,16 +118,12 @@ export interface CameraDeviceFormat {
118
118
photoWidth : number ;
119
119
/**
120
120
* The video resolutions's height
121
- *
122
- * @platform iOS 13.0
123
121
*/
124
- videoHeight ? : number ;
122
+ videoHeight : number ;
125
123
/**
126
124
* The video resolution's width
127
- *
128
- * @platform iOS 13.0
129
125
*/
130
- videoWidth ? : number ;
126
+ videoWidth : number ;
131
127
/**
132
128
* A boolean value specifying whether this format supports the highest possible photo quality that can be delivered on the current platform.
133
129
*
You can’t perform that action at this time.
0 commit comments