Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
906 stars 199 forks source link

Unhandled Exception: PlatformException(VIDEO_ERROR, video is not recording, , null) when running sample app on iOS #459

Open Snipesengan opened 2 months ago

Snipesengan commented 2 months ago

Steps to Reproduce

I ran the sample app camera_analysis_capabilities.dart and when i go to record a video i get the following error

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VIDEO_ERROR, video is not recording, , null)

0 CameraInterface.stopRecordingVideo (package:camerawesome/pigeon.dart:989:7)

#1 VideoRecordingCameraState.stopRecording (package:camerawesome/src/orchestrator/states/video_camera_recording_state.dart:87:20) ## Expected results Self explanatory ## Actual results [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VIDEO_ERROR, video is not recording, , null) #0 CameraInterface.stopRecordingVideo (package:camerawesome/pigeon.dart:989:7) #1 VideoRecordingCameraState.stopRecording (package:camerawesome/src/orchestrator/states/video_camera_recording_state.dart:87:20) ## About your device | Brand | Model | OS | | ------- | ----------- | --------- | | *Apple* | *iPhone 14 Pro Max* | *17.3.1* | ## Your flutter version Run this in your command line ```flutter --version``` Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 300451adae (8 days ago) • 2024-03-27 21:54:07 -0500 Engine • revision e76c956498 Tools • Dart 3.3.3 • DevTools 2.31.1
Snipesengan commented 2 months ago

The issue seems to be that isVideoRecordingAndImageAnalysis is false for the device I am using. Weird, because the doc says iPhone should have this capability?

fmg-nhan commented 2 months ago

I ran to this issue as well and it seems that on ios this feature is not supported - isVideoRecordingAndImageAnalysis will always returns false

https://github.com/Apparence-io/CamerAwesome/blob/a6715d98a8511a4c7fe736fbdd61ac97f53c231c/ios/Classes/CamerawesomePlugin.m#L704-L706