Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the no-torch rule to plain HTML5 Web APIs #48

Open
AMorgaut opened this issue Jul 10, 2024 · 0 comments
Open

Extend the no-torch rule to plain HTML5 Web APIs #48

AMorgaut opened this issue Jul 10, 2024 · 0 comments
Labels
🚀 enhancement New feature or request 🗃️ rule Impacts a rule

Comments

@AMorgaut
Copy link

AMorgaut commented Jul 10, 2024

Solution you'd like

La règle no-torch devrait detecter l'utilisation de la contrainte torch de l'API HTML5 MediaTrackConstraints (torch)

const mediaStream = await navigator.mediaDevices.getUserMedia({video: true});
const [track] = mediaStream.getVideoTracks();
try { 
  await track.applyConstraints({ advanced: [
    { torch: on }
  ] });
  // Do something with the track such as using the Image Capture API.
} catch((e) {
  // The constraints could not be satisfied by the available devices.
}

Is your feature request related to a problem?

La règle no-torch repose actuellement sur une lib React Native. Telle quelle, cette version devrait avoir un lable react + potentiellement un label react-native.

Alternatives you've considered

No response

Additional Information

No response

@AMorgaut AMorgaut added the 🚀 enhancement New feature or request label Jul 10, 2024
@utarwyn utarwyn added the 🗃️ rule Impacts a rule label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request 🗃️ rule Impacts a rule
Projects
None yet
Development

No branches or pull requests

2 participants