Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-11-27 18:42:24 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df6b0af9a96185db873b88cd6e9021d130ae3589
df6b0af9
1 parent
4756a6d3
optimize a function typing
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
lib/src/web/zxing/zxing_browser_multi_format_reader.dart
lib/src/web/zxing/zxing_browser_multi_format_reader.dart
View file @
df6b0af
import
'dart:js_interop'
;
import
'package:js/js.dart'
;
import
'package:web/web.dart'
;
/// The JS interop class for the ZXing BrowserMultiFormatReader.
...
...
@@ -22,13 +21,13 @@ class ZXingBrowserMultiFormatReader {
}
extension
ZXingBrowserMultiFormatReaderExt
on
ZXingBrowserMultiFormatReader
{
///
Set the source for the [HTMLVideoElement] that acts as input for the barcode reader
.
///
Attach a [MediaStream] to a [HTMLVideoElement]
.
///
/// This function takes a [HTMLVideoElement], and a [MediaStream] as arguments,
/// and returns no result.
/// This function accepts a [MediaStream] and a [HTMLVideoElement] as arguments,
/// and returns a [JSPromise].
///
/// See https://github.com/zxing-js/library/blob/master/src/browser/BrowserCodeReader.ts#L1182
external
JSFunction
addVideoSource
;
/// See https://github.com/zxing-js/library/blob/master/src/browser/BrowserCodeReader.ts#L406
external
JSFunction
attachStreamToVideo
;
/// Continuously decode barcodes from a [HTMLVideoElement].
///
...
...
@@ -46,15 +45,6 @@ extension ZXingBrowserMultiFormatReaderExt on ZXingBrowserMultiFormatReader {
/// See https://github.com/zxing-js/library/blob/master/src/browser/BrowserCodeReader.ts#L458
external
JSFunction
isVideoPlaying
;
/// Prepare the video element for the barcode reader.
///
/// This function takes a [HTMLVideoElement] as argument,
/// and returns the same [HTMLVideoElement],
/// after it was prepared for the barcode reader.
///
/// See https://github.com/zxing-js/library/blob/master/src/browser/BrowserCodeReader.ts#L802
external
JSFunction
prepareVideoElement
;
/// Reset the barcode reader to it's initial state,
/// and stop any ongoing barcode decoding.
///
...
...
Please
register
or
login
to post a comment