Skip to content

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

Description

@AMorgaut

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

Metadata

Metadata

Fields

No fields configured for Feature.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions