Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GWT requests unnecessary microphone permission #7348

Open
1 of 6 tasks
Frosty-J opened this issue Feb 22, 2024 · 5 comments · May be fixed by #7359
Open
1 of 6 tasks

GWT requests unnecessary microphone permission #7348

Frosty-J opened this issue Feb 22, 2024 · 5 comments · May be fixed by #7359
Milestone

Comments

@Frosty-J
Copy link
Contributor

Frosty-J commented Feb 22, 2024

Issue details

The SNAPSHOT build of libGDX appears to try to access the microphone for GWT. I am uncomfortable with releasing anything that requests microphone access unnecessarily.

1.12.1 on left; 1.12.2-SNAPSHOT on right. All that is different is gdxVersion:

Comparison screenshot

Reproduction steps/code

html:superDev

Version of libGDX and/or relevant dependencies

1.12.2-SNAPSHOT

Please select the affected platforms

  • Android
  • iOS
  • HTML/GWT
  • Windows
  • Linux
  • macOS
@SimonIT
Copy link
Member

SimonIT commented Feb 22, 2024

That's because of my PR #7243. The permission is needed to fetch the available output devices.

@Frosty-J
Copy link
Contributor Author

Could this behaviour be made optional? Such as by only performing the query when doing Gdx.audio.getAvailableOutputDevices() rather than each second.

@SimonIT
Copy link
Member

SimonIT commented Feb 23, 2024

It can be optional with a flag, but we can't do it in the method itself (at least I don't know how), because the JS API is async and the method is sync

@Frosty-J
Copy link
Contributor Author

Frosty-J commented Feb 23, 2024

Hmm, yeah, we'd either need developers to call the method multiple times (probably not a bad idea anyway since devices can change) or something in GwtApplicationConfiguration.

I don't think the SNAPSHOT behaviour should be the default, when most games are fine with using the default output device or letting the user choose via navigator.mediaDevices.selectAudioOutput() (just because microphone access is spooky - if it wasn't for that, I wouldn't care so much).

@Hyperion2400
Copy link

That's because of my PR #7243. The permission is needed to fetch the available output devices.

This should definitely not be made the default behaviour. Please consider a different solution.

@crykn crykn added this to the 1.12.2 milestone Feb 27, 2024
SimonIT added a commit to SimonIT/libgdx that referenced this issue Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants