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-12-29 14:15:26 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9fa1d014356756f0ef0f75d328ffea808e5621ef
9fa1d014
1 parent
15d3557b
remove the video element from the DOM when disposing the controller
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
lib/src/web/mobile_scanner_web.dart
lib/src/web/mobile_scanner_web.dart
View file @
9fa1d01
...
...
@@ -185,5 +185,22 @@ class MobileScannerWeb extends MobileScannerPlatform {
await
stop
();
await
_barcodesController
.
close
();
await
_constraintsController
.
close
();
// Finally, remove the video element from the DOM.
try
{
final
HTMLCollection
?
divChildren
=
_divElement
?.
children
;
if
(
divChildren
!=
null
)
{
for
(
int
i
=
0
;
i
<
divChildren
.
length
;
i
++)
{
final
Node
?
child
=
divChildren
.
item
(
i
);
if
(
child
!=
null
)
{
_divElement
?.
removeChild
(
child
);
}
}
}
}
catch
(
_
)
{
// The video element was no longer a child of the container element.
}
}
}
...
...
Please
register
or
login
to post a comment