Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add pause to Camera
  • Loading branch information
bselwe committed Aug 13, 2021
commit 1bad5a82182329fef5285930cb12737204e98f56
5 changes: 5 additions & 0 deletions packages/camera/camera_web/lib/src/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ class Camera {
await videoElement.play();
}

/// Pauses the camera stream on the current frame.
void pause() async {
videoElement.pause();
}

/// Stops the camera stream and resets the camera source.
void stop() {
final tracks = videoElement.srcObject?.getTracks();
Expand Down