Git Product home page Git Product logo

fluttercandies / flutter_wechat_camera_picker Goto Github PK

View Code? Open in Web Editor NEW
346.0 7.0 136.0 2.9 MB

A camera picker (take photos and videos) for Flutter projects based on WeChat's UI. It's a standalone module of wechat_assets_picker yet it can be run separately.

Home Page: https://pub.dev/packages/wechat_camera_picker

License: Apache License 2.0

Dart 98.69% Kotlin 0.22% Ruby 0.82% Swift 0.25% Objective-C 0.02%
flutter wechat camera picker

flutter_wechat_camera_picker's Introduction

Flutter WeChat Camera Picker

pub package pub package CodeFactor

Build status GitHub license GitHub stars GitHub forks

Flutter Candies QQ群

Language: English | 中文

A camera picker for Flutter projects based on WeChat's UI, which is also a separate runnable extension to the wechat_assets_picker.

Current WeChat version that UI based on: 8.3.x UI designs will be updated following the WeChat update in anytime.

See the Migration Guide to learn how to migrate between breaking changes.

Versions compatibility

The package only guarantees to be working on the stable version of Flutter. We won't update it in real-time to align with other channels of Flutter.

2.8.0 3.3.0 3.16.0
4.2.0+
4.0.0+
3.0.0+

Package credits

The package is built from these wonderful packages.

Name Features
photo_manager The basic abstractions and management for assets.
camera Captures images and videos.
video_player Plays videos and audios correspondingly.

Their implementation should be relatively stable in the package. If you've found any issues related to them when using the picker, submit issues to our issue tracker first.

Table of content

Features ✨

  • ♿ Complete a11y support with TalkBack and VoiceOver
  • ♻️ Fully implementable with States override
  • 🎏 Fully customizable theme based on ThemeData
  • 💚 Completely WeChat style (even more)
  • ⚡️ Adjustable performance with different configurations
  • 📷 Picture taking support
  • 🎥 Video recording support
    • ⏱ Duration limitation support
    • 🔍 Scale when recording support
  • ☀️ Exposure adjust support
  • 🔍️ Scale with pinch support
  • 💱 i18n support
    • ⏪ RTL language support
  • 🖾 Foreground custom widget builder support
  • 🕹️ Intercept saving with custom process

Screenshots 📸

READ THIS FIRST ‼️

Be aware of below notices before you started anything:

  • Due to understanding differences and the limitation of a single document, documents will not cover all the contents. If you find nothing related to your expected features and cannot understand about concepts, run the example project and check every options first. It has covered 90% of regular requests with the package.
  • The package deeply integrates with the photo_manager plugin, make sure you understand these two concepts as much as possible:

When you have questions about related APIs and behaviors, check photo_manager's API docs for more details.

Most usages are detailed covered by the example. Please walk through the example carefully before you have any questions.

Preparing for use 🍭

If you got a resolve conflict error when running flutter pub get, please use dependency_overrides to fix it.

Setup

Run flutter pub add wechat_camera_picker, or add wechat_camera_picker to pubspec.yaml dependencies manually.

dependencies:
  wechat_camera_picker: ^latest_version

The latest stable version is: pub package

The latest dev version is: pub package

Follow these detailed setup guide before runs:

Then import the package in your code:

import 'package:wechat_camera_picker/wechat_camera_picker.dart';

Usage 📖

Localizations

When you're picking assets, the package will obtain the Locale? from your BuildContext, and return the corresponding text delegate of the current language. Make sure you have a valid Locale in your widget tree that can be accessed from the BuildContext. Otherwise, the default Chinese delegate will be used.

Embedded text delegates languages are:

  • 简体中文 (default)
  • English
  • Tiếng Việt

If you want to use a custom/fixed text delegate, pass it through the CameraPickerConfig.textDelegate.

Simple usage

final AssetEntity? entity = await CameraPicker.pickFromCamera(context);

With configurations

Use CameraPickerConfig for more picking behaviors.

final AssetEntity? entity = await CameraPicker.pickFromCamera(
  context,
  pickerConfig: const CameraPickerConfig(),
);

Fields in CameraPickerConfig:

Name Type Description Default Value
enableRecording bool Whether the picker can record video. false
onlyEnableRecording bool Whether the picker can only record video. Only available when enableRecording is true . false
enableTapRecording bool Whether allow the record can start with single tap. Only available when enableRecording is true . false
enableAudio bool Whether Whether the picker should record audio. Only available with recording. true
enableSetExposure bool Whether users can set the exposure point by tapping. true
enableExposureControlOnPoint bool Whether users can adjust exposure according to the set point. true
enablePinchToZoom bool Whether users can zoom the camera by pinch. true
enablePullToZoomInRecord bool Whether users can zoom by pulling up when recording video. true
shouldDeletePreviewFile bool Whether the preview file will be delete when pop. false
shouldAutoPreviewVideo bool Whether the video should be played instantly in the preview. false
maximumRecordingDuration Duration? The maximum duration of the video recording process. const Duration(seconds: 15)
minimumRecordingDuration Duration The minimum duration of the video recording process. const Duration(seconds: 1)
theme ThemeData? Theme data for the picker. CameraPicker.themeData(wechatThemeColor)
textDelegate CameraPickerTextDelegate? Text delegate that controls text in widgets. CameraPickerTextDelegate
resolutionPreset ResolutionPreset Present resolution for the camera. ResolutionPreset.max
cameraQuarterTurns int The number of clockwise quarter turns the camera view should be rotated. 0
imageFormatGroup ImageFormatGroup Describes the output of the raw image format. ImageFormatGroup.unknown
preferredLensDirection CameraLensDirection Which lens direction is preferred when first using the camera. CameraLensDirection.back
lockCaptureOrientation DeviceOrientation? Whether the camera should be locked to the specific orientation during captures. null
foregroundBuilder ForegroundBuilder? The foreground widget builder which will cover the whole camera preview. null
previewTransformBuilder PreviewTransformBuilder? The widget builder which will transform the camera preview. null
onEntitySaving EntitySaveCallback? The callback type define for saving entity in the viewer. null
onError CameraErrorHandler? The error handler when any error occurred during the picking process. null
onXFileCaptured XFileCapturedCallback? The callback type definition when the XFile is captured by the camera. null
onMinimumRecordDurationNotMet VoidCallback? The callback when the recording is not met the minimum recording duration. null

Using custom States

All user interface can be customized through custom States, including:

  • CameraPickerState
  • CameraPickerViewerState

After override States, pass them through the picking method, more specifically:

  • CameraPicker.pickFromCamera(createPickerState: () => CustomCameraPickerState());
  • CameraPickerViewer.pushToViewer(..., createViewerState: () => CustomCameraPickerViewerState());

Frequently asked question 💭

Why the orientation behavior is strange on iOS?

Currently, the preview is not correctly synced on the iOS. You can find more details in this issue: flutter/flutter#89216 . Other than that, please submit issues to describe your question.

Contributors ✨

Thank goes to these wonderful people (emoji key):

Alex Li
Alex Li

💻 🎨 📖 💡 🤔 🚧 💬 👀
Caijinglong
Caijinglong

💡 🤔
Lael
Lael

📖
mjl0602
mjl0602

💻 🤔
AliasWang
AliasWang

💻 🤔
leftcoding
leftcoding

🐛
Luong The Vinh
Luong The Vinh

💻
luomo-pro
luomo-pro

️️️️♿️ 🐛
LeonardoZhu
LeonardoZhu

💻
Nguyen Phuc Loi
Nguyen Phuc Loi

🌍
Amos
Amos

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

flutter_wechat_camera_picker's People

Contributors

alexv525 avatar allcontributors[bot] avatar amoshuke avatar caijinglong avatar laelluo avatar lcuis avatar leftcoding avatar mjl0602 avatar nploi avatar siyukok avatar thevinhluong avatar zhuboao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_wechat_camera_picker's Issues

Android麦克风权限问题

你好,情况是这样的,我这边的使用场景只需要拍照,不需要录制视频,但是还是需要获取麦克风权限才能使用CameraPicker,可不可以在不录制视频的情况下,不请求麦克风权限,不然很难跟用户解释

How to change language?

First of all, great work!
But you want to know how to change the language. Or add your own text. Thanks

All captured images rotated into landscape

1.0 When clicking on the "confirm" button it’s stuck there for some seconds (shoot video is properly working).
2.0 When clicked in portrait mode it’s automatically going landscape.
3.0 Front camera captured image has a mirror problem.
WhatsApp Image 2020-12-29 at 6 16 23 PM

Video is saving but unable to play

Hi, im recording video using this, and the video also saved to the gallery but unable to play the video from gallery. kindly anyone faced this issue so please help.

开 issue 前必读 (Read before create a new issue)

The issue section is to let users and developers feedback their problem in usage, their request for features, their confusion about the source code and classes. Not a place to make argument, say bad words, ask for a non-sense help, or bring up some off-topic words.
So before you fire up a new issue, please think twice that if it's really necessary to do it, or just go check the documentation again.

Here're the things banned from the repository:

  • Not following the issue template. (close immediately with invalid label)
  • Ask a question which has a clear explanation in document. (close immediately with i: read document label)
  • Ask a question which is not related to the package. (close immediately with invalid (maybe stackoverflow) label)
  • 'reap without sowing' (close immediately with wontfix label)
  • Recommend something under the issue. (ban & lock & close permanently)
  • Insulting anyone (ban & lock & close permanently)
  • (more to add...)

国内用户请注意

如果不是严重问题,请直接到 QQ群:181398081 进行提问,快速便捷,长期在线支持。
尽量使用英文 提 issue ,原因无他,仅因 GitHub 为国际开源社区,你提的问题很有可能国际友人也有经历。如果你认为仅用英语表达不够完善,可以使用双语补充
Issue 区是用来反馈使用问题、请求新功能实现、源码讨论的地方,不是用来进行无谓的争吵、爆粗、问无关问题、白嫖的地方。所以在提交新的 issue 前,请三思,如果三思后认为仍然需要开 issue,请继续你的行动,否则请出门左转文档区。

以下内容将直接处理:

  • 不使用 issue 模板创建 issue、或使用了模板但是没有依照模板内容创建(立刻被关闭并打上 invalid 标签)
  • 问一个文档里已明确说明的问题(立刻被关闭并打上 i: read document 标签)
  • 问与该组件无关的问题(立刻被关闭并打上 invalid(也可能是 stackoverflow )标签)
  • 想白嫖(立刻被关闭并打上 wontfix 标签)
  • 推荐另一个组件(立刻被 永久屏蔽 & 锁定 & 关闭
  • 侮辱任何人(立刻被 永久屏蔽 & 锁定 & 关闭
  • (更多暂时想不起来的事)

933637000BD236B04928636CD26F8511

Camera tuning improvements

请问是否可以支持调节曝光度这些参数的设置呢?
目前我使用的是你的微信素材选择器,可以拍照,但是想操作人控制拍照的参数。不知道这个需求难度大不大
谢谢

[BUG] pad Camera magnifies

When you open it landscape on an Android tablet, the camera magnifies, but the photos are fine

IMG_1226.MOV
  • Device: 小米pad5
  • Package Version: [e.g. 2.6.3]
  • Flutter Version: [e.g. v2.2.2]

[BUG] [Android] camera cannot shoot after app pause(open other app)

problem

in Android device, camera cannot shoot after app pause(open other app)

procedure

  1. open this package camera view
  2. open other app (or my app pause)
  3. back to my app (displayed camera view)
  4. shoot, but cannot

device

Pixel 4a
version: Android12 beta4

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.56.2)
[✓] Connected device (3 available)

Log

W/MessageQueue(13757): Handler (android.os.Handler) {b2650ba} sending message to a Handler on a dead thread
W/MessageQueue(13757): java.lang.IllegalStateException: Handler (android.os.Handler) {b2650ba} sending message to a Handler on a dead thread
W/MessageQueue(13757): 	at android.os.MessageQueue.enqueueMessage(MessageQueue.java:560)
W/MessageQueue(13757): 	at android.os.Handler.enqueueMessage(Handler.java:778)
W/MessageQueue(13757): 	at android.os.Handler.sendMessageAtTime(Handler.java:727)
W/MessageQueue(13757): 	at android.os.Handler.sendMessageDelayed(Handler.java:697)
W/MessageQueue(13757): 	at android.os.Handler.post(Handler.java:427)
W/MessageQueue(13757): 	at android.hardware.camera2.impl.CameraDeviceImpl$CameraHandlerExecutor.execute(CameraDeviceImpl.java:2264)
W/MessageQueue(13757): 	at android.hardware.camera2.impl.CameraDeviceImpl$CameraDeviceCallbacks.onCaptureStarted(CameraDeviceImpl.java:1976)
W/MessageQueue(13757): 	at android.hardware.camera2.ICameraDeviceCallbacks$Stub.onTransact(ICameraDeviceCallbacks.java:160)
W/MessageQueue(13757): 	at android.os.Binder.execTransactInternal(Binder.java:1184)
W/MessageQueue(13757): 	at android.os.Binder.execTransact(Binder.java:1143)

help me.

other Android version happen? i dont know... sorry,

Interactive improvements

Thanks for this great package!

I have a few suggestions for you to make this package better:

  1. Add the option to zoom (pinch to zoom).
  2. Double tap to switch cameras (front to back and vice versa).
  3. Add masks to the camera view (square mask or circle mask).

That is all,
Thanks again!

[Bug] Can't handle exceptions

The package suppresses all exceptions that may occur while working with the camera. This is not correct because it is not possible to handle the denial of permission to access the camera and any other exception that is thrown.

Take a look at the following pieces of code:

} on CameraException catch (e) {
realDebugPrint('CameraException: $e');
} finally {

} catch (e) {
realDebugPrint('Error when switch flash mode: $e');
}

I gave as an example, in fact, there are more such places.

Hey! I have an issue with saving captured images through camera.

I am using this plugin with wechat asset picker. But when I tried older versions of both plugins I could not take a photo, but could record a video.
But this time when I upgraded these two plugins I can take a photo but cannot save it while pressing green button, but when I go back to the home page and return to the image picking screens there appear my taken photos. I think this bug is about navigations. But one more bug is I cant take a video properly. The circular duration line sometimes working but sometimes not.
wechat_assets_picker: ^4.2.2
wechat_camera_picker: ^2.0.0-dev.1
My flutter doctor and others are OK.
But one more question. Is it possible to make minsdkversion decrease till 16?

Not taking picture from Rear Camera

[CameraPicker - LOG] �[39;49mError when taking pictures: CameraException(captureTimeout, Picture capture request timed out)

It shows above error on taking picture from rear camera

[Android] 多次快速点击拍照页崩溃

1.CameraPicker.pickFromCamera(context)开启拍照
2.多次快速点击拍照页奔溃,错误日志为java.lang.AssertionError: The cameraBoundaries should be set (using ExposurePointFeature.setCameraBoundaries(Size)) before updating the exposure point.

  • OS:Android 10
  • Package Version: 2.6.2
  • Flutter Version: v2.5.3

Crash when calls camera on iPhone 6

版本:wechat_camera_picker: ^2.0.0-dev.3 以下
手机版本:iOS 11.0
错误日志:
-[FlutterViewController setNeedsUpdateOfHomeIndicatorAutoHidden]: unrecognized selector sent to instance 0x104016600
2021-03-12 10:31:27.228869+0800 Runner[643:35763] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterViewController setNeedsUpdateOfHomeIndicatorAutoHidden]: unrecognized selector sent to instance 0x104016600'

CameraPicker必须放在AssetPicker中使用吗?

  AlertOptionViewS01.show(
      context,
      title: '添加图片',
      actions: ["拍照", "手机相册"],
      cancelTitle: '取消',
      didSelectedAtIndex: (index, name) {
        print('index, name: ($index, $name)');
        if (index == 1) {
           CameraPicker.pickFromCamera(
             context,
             isAllowRecording: false,
           ).then((result) {
            print('assets: $assets');
           });

        } else if (index == 2) {
          AssetPicker.pickAssets(context).then((List<AssetEntity> assets) {
            print('assets: $assets');   
          });
        }
      },
    );
  },
);

以上代码,AssetPicker可以跳转,CameraPicker无法跳转。
如示例demo中的代码,CameraPicker必须在AssetPicker中使用吗?

使用过程中的几点建议

  1. 有没有选项调节默认前置摄像头
  2. 有没有选项默认关闭闪光灯
  3. 有没有选项默认写入私有文件夹中,不然iOS会弹个访问照片的提示框

iPhone6 调用相机奔溃

-[FlutterViewController setNeedsUpdateOfHomeIndicatorAutoHidden]: unrecognized selector sent to instance 0x105018a00
2021-03-10 14:34:34.074521+0800 Runner[2654:340622] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FlutterViewController setNeedsUpdateOfHomeIndicatorAutoHidden]: unrecognized selector sent to instance 0x105018a00'

想问一下如何更改文案?

目前只看到设置英文,但是如何更改里面的文案呢?因为我只需要录屏,但是文案有些拍照,我需要把拍照的文案去除掉。谢谢了。

wechat_camera_picker所依赖的camera插件的CameraController方法参数变了,导致升级新版本编译不过去了

/usr/local/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/wechat_camera_picker-1.3.0/lib/src/widget/camera_picker.dart:423:43: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
        await cameraController.takePicture(path);
                                          ^
/usr/local/Library/flutter/.pub-cache/hosted/pub.flutter-io.cn/wechat_camera_picker-1.3.0/lib/src/widget/camera_picker.dart:496:43: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
      cameraController.startVideoRecording(filePath).then((dynamic _) {

Confirm button text is hard coded

The confirm button text for this plugin has been hardcoded and can not be changed to English. The value set in the getter previewConfirmButton is 完成

wechat_camera_picker所依赖的camera插件,未使用就获取了mac地址信息这块有什么处理办法吗?

When testing the Android privacy compliance protocol, it was found that the wechat_camera_picker plugin library obtained the mac address information without calling any permissions. Is there any solution here? Blogger thank you
由于测试安卓隐私合规协议时,在未调用任何权限时,就发现wechat_camera_picker插件库获取了mac地址信息,这里有什么解决办法吗?博主,非常感谢

运行demo 后置摄像头拍照报错

后置摄像头拍照报错
手机:小米 redmi 10x
log:
E/flutter (13213): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: CameraException(captureTimeout, Picture capture request timed out)
E/flutter (13213): #0 CameraController.takePicture (package:camera/src/camera_controller.dart:346:7)
E/flutter (13213):
E/flutter (13213): #1 CameraPickerState.takePicture (package:wechat_camera_picker/src/widget/camera_picker.dart:738:23)
E/flutter (13213):

前置摄像头拍照没有问题

Camera crash problem

Hi, this package is great. Thank you
I have a problem now, when users are not allowed to use the album, it will crash when the photo is taken. I think users can also get AssetEntity when they are not allowed to use the album. I hope you can solve this problem, thank you

[BUG] Flutter SDK 2.5.3 build error

1、Flutter SDK 2.5.3
2、Flutter build apk

/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:135: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_HIGH);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:139: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_2160P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:143: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_1080P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:147: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_720P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:151: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_480P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:155: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_QVGA);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java:159: 警告: [deprecation] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_LOW);
^
错误: 发现警告, 但指定了 -Werror
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:138: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_HIGH);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:142: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_2160P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:146: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_1080P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:150: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_720P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:154: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_480P);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:158: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_QVGA);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/CameraUtils.java:162: 警告: [depration] CamcorderProfile中的get(int,int)已过时
return CamcorderProfile.get(cameraId, CamcorderProfile.QUALITY_LOW);
^
/Users/kris/Documents/WorkSpace/flutter/.pub-cache/hosted/pub.flutter-io.cn/camera-0.8.1+7/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java:15: 警告: [deprecation] MediaRecorder中的MediaRecorder()已过时
return new MediaRecorder();
^
1 个错误
15 个警告

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':camera:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

A problem occurred evaluating root project 'device_info'.

My project does not integrate device info, only your project is integrated. You can debug on real Android devices, but not build apk.

* What went wrong:
A problem occurred evaluating root project 'device_info'.
> Failed to apply plugin [id 'com.android.internal.version-check']
   > Minimum supported Gradle version is 5.6.4. Current version is 5.6.2. If using the gradle wrapper, try editing the distributionUrl in /Users/mac/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+8/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.6.4-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s


The plugin device_info could not be built due to the issue above.```

Record video without the user to keep holding record button

Hello, I really liked the package, and the resolution preset it has given is really an awesome feature. Thank you!
However, I used the params for onlyEnableRecording: true and I wanted the user to just tap the record button to start recording instead of the need to hold it. Is there any way this is possible? Also, I would really appreciate it if there was a Timer showing the recorded time.

Failed to find GeneratedAppGlideModule

W/Glide (23337): Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
D/skia (23337): --- Failed to create image decoder with message 'unimplemented'
D/skia (23337): --- Failed to create image decoder with message 'unimplemented'

wechat_camera_picker: ^2.6.0

[Feature] Play the video instantly when previewing

现在我用的版本是
wechat_camera_picker: 2.2.0
在拍摄完小视频后预览总是需要点击播放按钮才可以查看视频预览。
能不能拍完后直接开始播放视频预览呢?

Could we have the video played instantly when previewing?

长按拍摄时报错

当我长按录制视频结束时报错:Error when stop recording video: CameraException(videoRecordingFailed, null),请问该如何解决呢.

flutter版本:1.17.5
dart版本:2.8.4
android版本:5.1

ios 录制视频出错

iphone6s 点击录制视频,出现闪退

AssetEntity assetEntity = await CameraPicker.pickFromCamera(
context,
isAllowRecording: true,
isOnlyAllowRecording: true,
);

flutter : Channel stable, 1.22.4, on macOS 11.0.1 20B29 darwin-x64, locale zh-Hans-CN

wechat_camera_picker: ^1.3.0

错误代码:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriterInputPixelBufferAdaptor appendPixelBuffer:withPresentationTime:] A pixel buffer cannot be appended when readyForMoreMediaData is NO.'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.