I am trying to plow off the connected MacBook webcam and cam-led lighting safari browser.

Here is my lawmaking

myStream[0].getVideoTracks().forEach(track => rail.stop())

It works on Chrome but doesn't in Safari.

How practise you turn off the green light of the webcam? I looked at this part:

https://developer.mozilla.org/ko/docs/Web/API/MediaStreamTrack/cease

Erowlin

5,757 3 golden badges 32 silver badges 61 bronze badges

asked Oct xx, 2021 at 8:36

ane

  • That's the way to do. Check that y'all didn't request several times the camera, that would be the virtually plausible explanation.

    Oct 20, 2021 at 8:42

2 Answers 2

We tin can't plow off mac webcam greenlight manually if the webcam isn't turned off anymore according to apple tree's new policy. It will turn off if the webcam is not in use

answered October twenty, 2021 at 8:45

6

  • but google run into is safari browser turn off cam led possible.

    Oct 20, 2021 at 8:47

  • oh, but Apple said in their latest software updates it won't be possible anymore. only at that place could be ways

    Oct 20, 2021 at 8:51

  • then we can't controlled webcam device in safari browser?

    Oct 20, 2021 at 9:26

  • When they call VideoStreamTrack.stop() the camera should be off, that "policy" doesn't apply here.

    Oct 20, 2021 at 11:03

  • @PhilippHancke non on my Safari 15.0 (16612.1.29.41.four, 16612) and neither on TP. They must have requested the MediaStream multiple times and lost rails of one of these, merely without more info from OP nosotros can't tell for sure.

    Oct 21, 2021 at ane:58

answered Oct 20, 2021 at 13:thirteen

two

  • What ethical side? They stopped the track, the webcam is not beingness used anymore.

    Oct 20, 2021 at 23:38

  • Oops right, I edited my message.

    Oct 21, 2021 at viii:52

Not the answer you're looking for? Browse other questions tagged javascript macos safari webrtc webcam or ask your own question.