文件最后提交记录最后更新时间
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[camera] Add CameraX plugin for development (#6178) 3 年前
[camera] Add CameraInfo class and clean CameraX plugin (#6345) 3 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[various] Clean up contributing guides (#8032) Several packages had documentation about how to use Pigeon or Mockito generation; this made sense when those were rare, but they are both now extremely common in our packages. Instead, https://github.com/flutter/flutter/pull/158326 adds this information to the general documentation for contribuing to flutter/packages, so it no longer needs to be in (a random subset of) specific packages. This also removes Contributing sections from several READMEs, as READMEs should be client-focused rather than developer-focused, and puts content in CONTRIBUTING.md where needed.1 年前
[camera] Add CameraX plugin for development (#6178) 3 年前
[camera_android_camerax] Remove duplicated 'report' in README.md (#7708) *Remove the duplicated report word in README.md of camera_android_camerax package.* *List which issues are fixed by this PR. You must list at least one issue.*1 年前
[camera_android_camerax] Implement enableAudio for video recording (#9264) > [!NOTE] > This should land after https://github.com/flutter/packages/pull/9241, which should safely bumps the AGP version of this plugin's example app higher than this PR does. Fixes https://github.com/flutter/flutter/issues/168551 by implementing the enableAudio camera setting for video recording. Also: - Bumps CameraX library version to the latest version,1.5.0-beta01 (to use a new CameraX method in this implementation) - Bumps the plugin AGP version to that which 1.5.0-beta01 requires (8.6.0) - Bumps the plugin's example app AGP version to that which 1.5.0-beta01 requires (8.6.0) -- will be overridden by https://github.com/flutter/packages/pull/9241 - Corrects the example app to use the enableAudio setting just as the app-facing camera widget does - Adds lint errors caused by the **pigeon generated** CameraXLibrary.g.kt file caused by the 1.5.0-beta01 bump to a lint-baseline.xml file (all the errors are [UnsageOptInUsage](https://googlesamples.github.io/android-custom-lint-rules/checks/UnsafeOptInUsageError.md.html) lints caused by the plugin's [ExperimentalCamera2Interop](https://developer.android.com/reference/androidx/camera/camera2/interop/ExperimentalCamera2Interop) usage which is unrelated to this PR) ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
README.md

camera_android_camerax

The Android implementation of camera built with the CameraX library.

Note: If any of the limitations prevent you from using using camera_android_camerax or if you run into any problems, please report these issues under flutter/flutter with [camerax] in the title. You may also opt back into the camera_android implementation if you need.

Usage

As of camera: ^0.11.0, this package is endorsed, which means you can simply use camera normally. This package will be automatically be included in your app when you do, so you do not need to add it to your pubspec.yaml.

However, if you import this package to use any of its APIs directly, you should add it to your pubspec.yaml as usual.

Limitations

Concurrent preview display, video recording, image capture, and image streaming

The CameraX plugin only supports the concurrent camera use cases supported by Camerax; see their documentation for more information. To avoid the usage of unsupported concurrent use cases, the plugin behaves according to the following:

  • If the preview is paused (via pausePreview), concurrent video recording and image capture and/or image streaming (via startVideoCapturing(cameraId, VideoCaptureOptions(streamCallback:...))) is supported.
  • If the preview is not paused
    • and the camera device is at least supported hardware LIMITED, then concurrent image capture and video recording is supported.
    • and the camera device is at least supported hardware LEVEL_3, then concurrent video recording and image streaming is supported, but concurrent video recording, image streaming, and image capture is not supported.

setDescriptionWhileRecording is unimplemented Issue #148013

setDescriptionWhileRecording, used to switch cameras while recording video, is currently unimplemented due to this not currently being supported by CameraX.

240p resolution configuration for video recording

240p resolution configuration for video recording is unsupported by CameraX, and thus, the plugin will fall back to target 480p (ResolutionPreset.medium) if configured with ResolutionPreset.low.

Setting stream options for video capture

Calling startVideoCapturing with VideoCaptureOptions configured with streamOptions is currently unsupported do to limitations of the platform interface, and thus that parameter will silently be ignored.

What requires Android permissions

Writing to external storage to save image files

In order to save captured images and videos to files on Android 10 and below, CameraX requires specifying the WRITE_EXTERNAL_STORAGE permission (see the CameraX documentation). This is already done in the plugin, so no further action is required on your end.

To understand the privacy impact of specifying the WRITE_EXTERNAL_STORAGE permission, see the WRITE_EXTERNAL_STORAGE documentation. We have seen apps also have the READ_EXTERNAL_STORAGE permission automatically added to the merged Android manifest; it appears to be implied from WRITE_EXTERNAL_STORAGE. If you do not want the READ_EXTERNAL_STORAGE permission to be included in the merged Android manifest of your app, then take the following steps to remove it:

  1. Ensure that your app nor any of the plugins that it depends on require the READ_EXTERNAL_STORAGE permission.
  2. Add the following to your app's your_app/android/app/src/main/AndroidManifest.xml:
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
    tools:node="remove" />

Allowing image streaming in the background

As of Android 14, to allow for background image streaming, you will need to specify the foreground TYPE_CAMERA foreground service permission in your app's manifest. Specifically, in your_app/android/app/src/main/AndroidManifest.xml add the following:

<manifest ...>
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
  ...
</manifest>

Contributing

For more information on contributing to this plugin, see CONTRIBUTING.md.