CinemaMod / mcef

A Minecraft mod and library for adding the Chromium web browser into the game (Minecraft Chromium Embedded Framework)
GNU Lesser General Public License v2.1
74 stars 24 forks source link

api: How to configure sites permissions? #69

Closed HiWord9 closed 11 months ago

HiWord9 commented 11 months ago

Hi i am a developer and i am doing a thing. I am wondering is there a way to allow some sites to use my mic or to disable sounds on it in mcef api. Asking esspecialy after finding out that discord.com can not be fully used cause it has no access to microphone.

ds58 commented 11 months ago

MCEF exposes the full API of java-cef. Therefore, you should understand how to accomplish this in java-cef and conversely, CEF.

Seems like you may need to pass --enable-media-stream as a command switch argument to CEF. https://magpcss.org/ceforum/viewtopic.php?t=15794

Currently, we don't have a way for you to do this since we hardcoded the command switch arguments without the ability to change them. See: https://github.com/CinemaMod/mcef/blob/1.20.1/common/src/main/java/com/cinemamod/mcef/CefUtil.java#L78

We're probably going to have to allow users to edit these in the MCEF settings located in .minecraft/mcef/mcef.properties. This would mean there would be a manual step for users in order to allow microphone/webcam permission.