Skip to content

Commit

Permalink
do not show controls on video element
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Sep 9, 2024
1 parent 6b07dc0 commit 9febbe8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/src/web/mobile_scanner_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ class MobileScannerWeb extends MobileScannerPlatform {
..transformOrigin = 'center'
..pointerEvents = 'none';

// Do not show the media controls, as this is a preview element.
// Also prevent play/pause events from changing the media controls.
videoElement.controls = false;

videoElement.onplay = (JSAny _) {
videoElement.controls = false;
}.toJS;

videoElement.onpause = (JSAny _) {
videoElement.controls = false;
}.toJS;

// Attach the video element to its parent container
// and setup the PlatformView factory for this `textureId`.
_divElement = HTMLDivElement()
Expand Down

0 comments on commit 9febbe8

Please sign in to comment.