Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0e59dbc
Fixes flutter/flutter#148013: setDescriptionWhileRecording with andro…
blackorbs-dev Aug 24, 2025
fcc11be
Fixes flutter/flutter#148013: updated Version and Changelog
blackorbs-dev Aug 24, 2025
971ebc8
Address review feedback: code fix
blackorbs-dev Aug 25, 2025
87c985e
Address review feedback: implement code fixes and suggestions
blackorbs-dev Aug 25, 2025
80d3c61
Merge branch 'main' into fix-issue-148013
blackorbs-dev Aug 27, 2025
0461e63
Update camera_android_camerax readme, revert changes for unaffected c…
blackorbs-dev Aug 27, 2025
f4a076d
Merge branch 'main' into fix-issue-148013
blackorbs-dev Aug 27, 2025
1a8397e
Merge branch 'main' into fix-issue-148013
blackorbs-dev Aug 28, 2025
a631f15
fix merge issue with main
blackorbs-dev Aug 28, 2025
4eece12
update version and changelog
blackorbs-dev Aug 28, 2025
3ac789c
Implement code fixes and suggestions
blackorbs-dev Aug 29, 2025
53e3aa3
Merge branch 'main' into fix-issue-148013
blackorbs-dev Aug 29, 2025
8fbb01c
Address some nits
blackorbs-dev Sep 3, 2025
41aac10
Merge branch 'main' into fix-issue-148013
blackorbs-dev Sep 3, 2025
b1c2ac1
Reformat merge from main
blackorbs-dev Sep 3, 2025
1ddc209
Merge branch 'main' into fix-issue-148013
blackorbs-dev Sep 9, 2025
3b2164f
checkout camera_avfoundation to upstream main
blackorbs-dev Sep 9, 2025
d73bccb
update camera_android_camerax readme
blackorbs-dev Sep 9, 2025
69eb480
Merge branch 'main' into fix-issue-148013
blackorbs-dev Sep 10, 2025
3e799c2
implement version bump for camera_platform_interface
blackorbs-dev Sep 11, 2025
5520c89
implement changes for platform consistency
blackorbs-dev Sep 11, 2025
8614a35
format code changes
blackorbs-dev Sep 11, 2025
d9ce45b
platform changes for setDescriptionWhileRecording with android camerax
blackorbs-dev Sep 13, 2025
5bc3992
platform changes for setDescriptionWhileRecording with android camerax
blackorbs-dev Sep 13, 2025
34f3862
Merge branch 'main' into split-camera-interface
blackorbs-dev Sep 13, 2025
8d971a4
update doc and changelog
blackorbs-dev Sep 13, 2025
3373107
Merge branch 'main' into split-camera-interface
blackorbs-dev Sep 16, 2025
3a74560
update changelog
blackorbs-dev Sep 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/camera/camera_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT
## 2.11.0

* Adds a flag to configure a recording to be persistent across camera changes. See
`VideoCaptureOptions.enablePersistentRecording`.
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.

## 2.10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ abstract class CameraPlatform extends PlatformInterface {
}

/// Sets the active camera while recording.
///
/// On Android, you must start the recording with [startVideoCapturing]
/// with `enablePersistentRecording` set to `true`
/// to avoid cancelling any active recording.
Future<void> setDescriptionWhileRecording(CameraDescription description) {
throw UnimplementedError(
'setDescriptionWhileRecording() is not implemented.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class VideoCaptureOptions {
this.maxDuration,
this.streamCallback,
this.streamOptions,
this.enablePersistentRecording = true,
}) : assert(
streamOptions == null || streamCallback != null,
'Must specify streamCallback if providing streamOptions.',
Expand All @@ -43,6 +44,17 @@ class VideoCaptureOptions {
/// Should only be set if a streamCallback is also present.
final CameraImageStreamOptions? streamOptions;

/// Configures the recording to be a persistent recording.
///
/// A persistent recording can only be stopped by explicitly calling [CameraPlatform.stopVideoRecording]
/// and will ignore events that would normally cause recording to stop, such as lifecycle events.
///
/// On Android, you must set this parameter to `true`
/// to avoid cancelling any active recording when calling [CameraPlatform.setDescriptionWhileRecording].
///
/// Defaults to `true`.
final bool enablePersistentRecording;

@override
bool operator ==(Object other) =>
identical(this, other) ||
Expand All @@ -51,9 +63,15 @@ class VideoCaptureOptions {
cameraId == other.cameraId &&
maxDuration == other.maxDuration &&
streamCallback == other.streamCallback &&
streamOptions == other.streamOptions;
streamOptions == other.streamOptions &&
enablePersistentRecording == other.enablePersistentRecording;

@override
int get hashCode =>
Object.hash(cameraId, maxDuration, streamCallback, streamOptions);
int get hashCode => Object.hash(
cameraId,
maxDuration,
streamCallback,
streamOptions,
enablePersistentRecording,
);
}
2 changes: 1 addition & 1 deletion packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.10.0
version: 2.11.0

environment:
sdk: ^3.7.0
Expand Down