-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
长按拍摄时报错 #12
Comments
提供更多信息? |
import 'package:flutter/material.dart';
import 'package:wechat_camera_picker/wechat_camera_picker.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: InkWell(
child: Text('拍摄'),
onTap: () async {
final AssetEntity entity = await CameraPicker.pickFromCamera(
context,
isAllowRecording: true,
maximumRecordingDuration: Duration(seconds: 5));
print(entity);
},
),
),
);
}
} 这就是全部代码了,还需要其他什么信息吗? |
更多的报错信息 |
当我触发这个错误后,我又尝试单击拍摄按钮,遇到如下错误
希望这些对你有用 |
目前看起来是官方的 |
尝试降低一下 |
ResolutionPreset调成low,依然不可以 |
嗯,试下官方demo。 |
淦...换了个手机就正常了,难道有什么东西不兼容旧设备吗 |
camera的问题还是很多,所以有些时候与它本身的质量有关... |
那就先这样吧,多谢多谢啊 |
同样是camera插件的问题,It seems that this issue going to be fixed with this PR: flutter/plugins#3651好像有个PR解决了这个问题,不知道官方有没有合并进去。在某些手机上 Camera2的API不能用。补充一个相同 bug的 issue 链接 flutter/flutter#40519 |
我也在关注这个PR,PR本身质量不错,但原作者交付的过程太慢,有很多改进已经被拆分到其他地方完成了。 |
好的A少,升级下插件版本呗 |
|
当我长按录制视频结束时报错:Error when stop recording video: CameraException(videoRecordingFailed, null),请问该如何解决呢.
flutter版本:1.17.5
dart版本:2.8.4
android版本:5.1
The text was updated successfully, but these errors were encountered: