A package that uses a camera to record video and take pictures 一个使用摄像头录制视频与拍照的包
After the video recording with the front-facing camera is finished, the FFMEPG is used to perform the horizontal flipping of the video, which will take different processing time depending on the performance of the device and the video size. Therefore, it is recommended to control the video size within 720P and 1 minute.
因为使用前置摄像头录制视频结束后,使用ffmepg作了视频水平翻转,此过程会因设备性能及视频大小,在处理时间有所不同,所以建议拍照视频大小控制在720p,1分钟以内.
Add this to your package's pubspec.yaml file:
dependencies:
camera_recorder: ^latest
initialize EasyLoading(which this package use loading dialog) in your MaterialApp/CupertinoApp:
import 'package:flutter/material.dart';
import 'package:camera_recorder/camera_recorder.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter EasyLoading',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: TextButton(
onPressed: () async {
final AssetEntity? result =
await CameraView.showCameraView(context);
},
child: Text('show camera')),
builder: EasyLoading.init(),
);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。