Skip to content

Instantly share code, notes, and snippets.

@mebjas
Created October 30, 2022 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mebjas/b6266dfed43b85d529dfecf2217fbef6 to your computer and use it in GitHub Desktop.
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.
/** 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