Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Error on stopScan when startScan didn't fully loaded yet #296

Open
SeddikKadi opened this issue Sep 16, 2023 · 0 comments
Open

Error on stopScan when startScan didn't fully loaded yet #296

SeddikKadi opened this issue Sep 16, 2023 · 0 comments

Comments

@SeddikKadi
Copy link

SeddikKadi commented Sep 16, 2023

Describe the bug
on web platform, when i start the scan and call stopScan before the camera fully loaded i get the following error: Uncaught (in promise) TypeError: st is null on st.getTracks() in the following function:

       var _a;
       if (this._video) {
           this._video.pause();
           const st = this._video.srcObject;
           const tracks = st.getTracks();
           for (var i = 0; i < tracks.length; i++) {
               var track = tracks[i];
               track.stop();
           }
           (_a = this._video.parentElement) === null || _a === void 0 ? void 0 : _a.remove();
           this._video = null;
       }
   }```


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant