Created
October 30, 2022 14:18
-
-
Save mebjas/b6266dfed43b85d529dfecf2217fbef6 to your computer and use it in GitHub Desktop.
Helper function to check if torch is supported on the given video track.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Returns {@code true} if torch is supported. */ | |
function isTorchSupported(html5Qrcode: Html5Qrcode): boolean { | |
let settings = html5Qrcode.getRunningTrackSettings(); | |
return "torch" in settings; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment