Web SDK // Allow sharing of camera and mic via JavaScript

We need to be able to dynamically allow users to share the camera/mic via JavaScript.
That means basically, we want to show/hide the share-buttons dynamically via the API.

As a workaround I now simply call:
document.querySelector(".join-audio-container").style.display = “none”;
document.querySelector(".send-video-container").style.display = “none”;

But that is a suboptimal solution, because all participants are still visible in the gallery with a black image.
And they can still unmute themselves via the participant list.

There is no option to disable the gallery view, is there?
Is it possible to display only users in the gallery who have shared the camera?