W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2021

[mediacapture-main] Inability to turn off torch with track applyConstraints (#779)

From: shieldsyWRH55 via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Mar 2021 00:07:19 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-828503802-1615421238-sysbot+gh@w3.org>
shieldsyWRH55 has just created a new issue for https://github.com/w3c/mediacapture-main:

== Inability to turn off torch with track applyConstraints ==
I had been using a video stream in a QR code scanner web application. Originally the user the option to toggle the torch on mobile devices. Recently this has become broken and now I am no longer able to turn the torch off after it has been turned off. 

Setting the torch constraint to false using this piece of javascript code no longer works. However, will work the very first time when setting the torch to true. 

this.$video.srcObject.getVideoTracks()[0].applyConstraints({
            advanced: [{ torch: on }]
});

_**on** is a passed in boolean_ 

Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/779 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 11 March 2021 00:07:21 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:53 UTC