Skip to content

Commit 971cdc4

Browse files
authored
✨ Add minimumRecordingDuration (#168)
Fixes #150.
1 parent 0de51dd commit 971cdc4

File tree

6 files changed

+102
-56
lines changed

6 files changed

+102
-56
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ that can be found in the LICENSE file. -->
44

55
# Changelog
66

7-
## 3.7.1
7+
## 3.8.0
88

99
### New features
1010

1111
- Add Vietnamese language text delegate. (#166).
12+
- Add `CameraPickerConfig.minimumRecordingDuration`. (#168)
1213

1314
### Improvements
1415

README-ZH.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -118,31 +118,33 @@ final AssetEntity? entity = await CameraPicker.pickFromCamera(
118118

119119
`CameraPickerConfig` 的成员说明:
120120

121-
| 参数名 | 类型 | 描述 | 默认值 |
122-
|------------------------------|-----------------------------|----------------------------------------------------|--------------------------------------------|
123-
| enableRecording | `bool` | 选择器是否可以录像 | `false` |
124-
| onlyEnableRecording | `bool` | 选择器是否仅可以录像。只在 `enableRecording``true` 时有效。 | `false` |
125-
| enableTapRecording | `bool` | 选择器是否可以单击录像。只在 `onlyEnableRecording``true` 时生效。 | `false` |
126-
| enableAudio | `bool` | 选择器是否需要录制音频。只在 `enableRecording``true` 时有效。 | `true` |
127-
| enableSetExposure | `bool` | 用户是否可以在界面上通过点击设定曝光点 | `true` |
128-
| enableExposureControlOnPoint | `bool` | 用户是否可以根据已经设置的曝光点调节曝光度 | `true` |
129-
| enablePinchToZoom | `bool` | 用户是否可以在界面上双指缩放相机对焦 | `true` |
130-
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
131-
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
132-
| shouldAutoPreviewVideo | `bool` | 在预览时是否直接播放视频 | `false` |
133-
| maximumRecordingDuration | `Duration` | 录制视频最长时长 | `const Duration(seconds: 15)` |
134-
| theme | `ThemeData?` | 选择器的主题 | `CameraPicker.themeData(wechatThemeColor)` |
135-
| textDelegate | `CameraPickerTextDelegate?` | 控制部件中的文字实现 | `CameraPickerTextDelegate` |
136-
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
137-
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次 90 度 | `0` |
138-
| imageFormatGroup | `ImageFormatGroup` | 输出图像的格式描述 | `ImageFormatGroup.unknown` |
139-
| preferredLensDirection | `CameraLensDirection` | 首次使用相机时首选的镜头方向 | `CameraLensDirection.back` |
140-
| lockCaptureOrientation | `DeviceOrientation?` | 摄像机在拍摄时锁定的旋转角度 | null |
141-
| foregroundBuilder | `ForegroundBuilder?` | 覆盖在相机预览上方的前景构建 | null |
142-
| previewTransformBuilder | `PreviewTransformBuilder?` | 对相机预览做变换的构建 | null |
143-
| onEntitySaving | `EntitySaveCallback?` | 在查看器中保存图片时的回调 | null |
144-
| onError | `CameraErrorHandler?` | 拍摄照片过程中的自定义错误处理 | null |
145-
| onXFileCaptured | `XFileCapturedCallback?` | 拍摄文件生成后的回调 | null |
121+
| 参数名 | 类型 | 描述 | 默认值 |
122+
|-------------------------------|-----------------------------|----------------------------------------------------|--------------------------------------------|
123+
| enableRecording | `bool` | 选择器是否可以录像 | `false` |
124+
| onlyEnableRecording | `bool` | 选择器是否仅可以录像。只在 `enableRecording``true` 时有效。 | `false` |
125+
| enableTapRecording | `bool` | 选择器是否可以单击录像。只在 `onlyEnableRecording``true` 时生效。 | `false` |
126+
| enableAudio | `bool` | 选择器是否需要录制音频。只在 `enableRecording``true` 时有效。 | `true` |
127+
| enableSetExposure | `bool` | 用户是否可以在界面上通过点击设定曝光点 | `true` |
128+
| enableExposureControlOnPoint | `bool` | 用户是否可以根据已经设置的曝光点调节曝光度 | `true` |
129+
| enablePinchToZoom | `bool` | 用户是否可以在界面上双指缩放相机对焦 | `true` |
130+
| enablePullToZoomInRecord | `bool` | 用户是否可以在录制视频时上拉缩放 | `true` |
131+
| shouldDeletePreviewFile | `bool` | 返回页面时是否删除预览文件 | `false` |
132+
| shouldAutoPreviewVideo | `bool` | 在预览时是否直接播放视频 | `false` |
133+
| maximumRecordingDuration | `Duration?` | 录制视频最长时长 | `const Duration(seconds: 15)` |
134+
| minimumRecordingDuration | `Duration` | 录制视频最短时长 | `const Duration(seconds: 1)` |
135+
| theme | `ThemeData?` | 选择器的主题 | `CameraPicker.themeData(wechatThemeColor)` |
136+
| textDelegate | `CameraPickerTextDelegate?` | 控制部件中的文字实现 | `CameraPickerTextDelegate` |
137+
| resolutionPreset | `ResolutionPreset` | 相机的分辨率预设 | `ResolutionPreset.max` |
138+
| cameraQuarterTurns | `int` | 摄像机视图顺时针旋转次数,每次 90 度 | `0` |
139+
| imageFormatGroup | `ImageFormatGroup` | 输出图像的格式描述 | `ImageFormatGroup.unknown` |
140+
| preferredLensDirection | `CameraLensDirection` | 首次使用相机时首选的镜头方向 | `CameraLensDirection.back` |
141+
| lockCaptureOrientation | `DeviceOrientation?` | 摄像机在拍摄时锁定的旋转角度 | null |
142+
| foregroundBuilder | `ForegroundBuilder?` | 覆盖在相机预览上方的前景构建 | null |
143+
| previewTransformBuilder | `PreviewTransformBuilder?` | 对相机预览做变换的构建 | null |
144+
| onEntitySaving | `EntitySaveCallback?` | 在查看器中保存图片时的回调 | null |
145+
| onError | `CameraErrorHandler?` | 拍摄照片过程中的自定义错误处理 | null |
146+
| onXFileCaptured | `XFileCapturedCallback?` | 拍摄文件生成后的回调 | null |
147+
| onMinimumRecordDurationNotMet | `VoidCallback?` | 录制时长未达到最小时长时的回调方法 | null |
146148

147149
### 使用自定义的 `State`
148150

0 commit comments

Comments
 (0)