Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 1a38ddf

Browse files
anniek-valkmvanbeusekombparrishMines
authored
[camera] Added documentation about video not working correctly on Android emulators (#3180)
* Added information of video not working correctly on Android emulators to `README.md`. * Changed up the text and added a link * Version fix * Update packages/camera/README.md Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl> * Improve grammar as suggested Co-authored-by: Maurice Parrish <bmparr@google.com> Co-authored-by: Maurits van Beusekom <maurits@vnbskm.nl> Co-authored-by: Maurice Parrish <bmparr@google.com>
1 parent a674fce commit 1a38ddf

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.8+12
2+
3+
* Added information of video not working correctly on Android emulators to `README.md`.
4+
15
## 0.5.8+11
26

37
* Fix rare nullptr exception on Android.

packages/camera/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Change the minimum Android sdk version to 21 (or higher) in your `android/app/bu
4141
minSdkVersion 21
4242
```
4343

44+
It's important to note that the `MediaRecorder` class is not working properly on emulators, as stated in the documentation: https://developer.android.com/reference/android/media/MediaRecorder. Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.
45+
4446
### Handling Lifecycle states
4547

4648
As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/camera/CHANGELOG.md#050) of the camera plugin, lifecycle changes are no longer handled by the plugin. This means developers are now responsible to control camera resources when the lifecycle state is updated. Failure to do so might lead to unexpected behavior (for example as described in issue [#39109](https://github.com/flutter/flutter/issues/39109)). Handling lifecycle changes can be done by overriding the `didChangeAppLifecycleState` method like so:

packages/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.5.8+11
5+
version: 0.5.8+12
66

77
homepage: https://github.com/flutter/plugins/tree/master/packages/camera
88

0 commit comments

Comments
 (0)