Steps to Reproduce
run https://zkfiddle.org/sample/3q7t634/9-Barcode-scanner in ios mobile (ios ver 18+)
Click "detach" then "attach"
Current Result
black view
Expected Result
able to scan
Workaround
https://zkfiddle.org/sample/3kqs4ml/1-ZK-5874
zk-5874.js
The patch also works for ZK-5230
Workaround 2
1st part in the zul stopping the video on close (closing without scanning):
<window id=\"barcodescannerWindow\" xmlns:w=\"client\" w:onClose=\"console.log('close video (on close in zul)');navigator.mediaDevices.getUserMedia({audio:false,video:{'facingMode': {'excat': 'environment'}}}).then(stream => {stream.getVideoTracks()[0].stop();console.log('done close in zul');});\">
2nd part in java ondetect (when scanned):
Clients.evalJavaScript("console.log('close video (on detect)');navigator.mediaDevices.getUserMedia({audio:false,video:{\"facingMode\": {\"excat\": \"environment\"}}}).then(stream => {stream.getVideoTracks()[0].stop();console.log('done detect');})");
- relates to
-
ZK-5230 adding Barcodescanner twice causes javascript errors
-
- Open
-