MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
444 stars 53 forks source link

[Problem/Bug]: Can't change Audio Volume in Xbox #4330

Open elmanuelv opened 8 months ago

elmanuelv commented 8 months ago

What happened?

I have a project with music and an option to change the volume.

When running Visual Studio 2022 it works perfectly fine. But when I export as a UWP package and port to Xbox, the music stays always at a constant volume.

XboxAudioTest.zip

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

120.0.2210.144

SDK Version

1.0.1823.32

Framework

WinUI2/UWP

Operating System

Xbox

OS Version

10.0.25398.2923

Repro steps

On Windows

  1. Open solution
  2. Run and change the volume using the arrow keys (this should work correctly)
  3. Export project as application package
  4. Port to Xbox

On Xbox

  1. Open the project
  2. Press the direction buttons to change the music volume (not working)

AB#48784016

AshleyScirra commented 8 months ago

I was able to find a minimal repro for this: xbox-issue4330.zip

I have reproduced the issue with both the originally provided files and the minimal repro. The problem occurs with using AudioContext's createMediaElementSource() method. If that is used to connect a media element to an AudioContext gain node, then changing the gain node's gain seems to have no effect on the output audio volume. When previewing on a Windows device it works correctly (as it does on all other browsers/platforms); running exactly the same files in WebView2 on Xbox shows the issue where audio volume is not altered. (Note you must click or press a gamepad button to start audio playback.)

This is important for all content made in Construct as it plays music and controls the volume using this approach.

jennifer-jacobs commented 8 months ago

Hi @elmanuelv,

Thanks for reporting this and I've repro'd this behavior as well. It's been added to our backlog!