bstenm
bstenm

Reputation: 139

Flutter Web: Record webcam with Flutter Web

There is an official camera package for flutter on IOS and Android but not supported for web. Has anyone managed to record a webcam stream on Flutter Web?

Upvotes: 1

Views: 4352

Answers (2)

Masih Tamsoy
Masih Tamsoy

Reputation: 86

https://pub.dev/packages/flutter_webrtc

check for get_user_media_sample_web.dart in /example of flutter_webrtc package. webcam recording feature works for me.

Upvotes: 0

Calvin Gonsalves
Calvin Gonsalves

Reputation: 2030

You can follow https://medium.com/@mk.pyts/how-to-access-webcam-video-stream-in-flutter-for-web-1bdc74f2e9c7 article which explains how to access the webcam in flutter web.

However, the article doesn't explain how to switch off the camera and reinitialize it.

You can take a look at my working code https://gist.github.com/CalvinGonsalves/3d01cf88a6660ca87068f17f1c99a5dd

I have experienced issues opening the webcam by running it from VScode but Android Studio works fine.

Upvotes: 3

Related Questions