Mattias Baldi
Mattias Baldi

Reputation: 1

How to revoke microphone/media permissions?

I have created a three.js immersive experience that allows users to walk around an open world.

One specific part of the experience uses the microphone input. As users approach that part, the browser request access to the microphone using MediaDevices: getUserMedia() method.

When the user walks away from that part of the experience, I want the permission reset/revoked, so the record icon on the browser tab dissapears, and the user doesn't feel like their microphone is being used unneccessarily. When the user re-enters the same part of the experience, a new request will be prompted.

However, the Revoke() method has been deprecated, and it seems like multiple threads on stackoverflow are talking about the, stop method(), while it may stop the track, it doesn't reset the permission or remove the recording icon, like some of the threads are suggesting?

My hunch is that after the revoke method was deprecated, that it's no longer possible, but seeing more of those threads on stackoverflow, makes me wonder, if my hunch is right. Some of them are 5+ years old though.a

This one says it's not possible at all, so I am confused

Revoke (depreceated) and Stop(), but neither removed the recording icon or reset permissions.

Upvotes: 0

Views: 22

Answers (0)

Related Questions