Skip to content
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

capture() and startRecordVideo() are NOT working in Android 14 #344

Open
Saqib92 opened this issue Sep 9, 2024 · 0 comments
Open

capture() and startRecordVideo() are NOT working in Android 14 #344

Saqib92 opened this issue Sep 9, 2024 · 0 comments

Comments

@Saqib92
Copy link

Saqib92 commented Sep 9, 2024

Throwing error when trying any method:

{message: 'Camera is not running'}

async recordVid() {
    try {
      let opt: CameraPreviewOptions = {
        position: 'front',
        width: window.screen.width,
        height: window.screen.height
      }
      await CameraPreview.startRecordVideo(opt)
      
      await new Promise(resolve => setTimeout(resolve, 5000))

      const fileUrl = await CameraPreview.stopRecordVideo()
      console.log(fileUrl)
      
    }
    catch (err) {
      console.log(err)
    }

  }

Getting this error:

Screenshot 2024-09-09 at 2 01 42 PM

Added permissions in manifest:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant