Bug 276813

Summary: [Web Audio] Cannot change volume of media element source playing WebM Opus
Product: WebKit Reporter: Ashley Gullen <ashley>
Component: Web AudioAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, cdumez, jean-yves.avenard, jer.noble, karlcow, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=151589

Description Ashley Gullen 2024-07-19 05:09:18 PDT
Minimal repro: https://downloads.scirra.com/labs/bugs/webmmediavol/

Steps to reproduce:
1. Press 'Play WebM'
2. Press 'Set volume low'

Observed result: no change in playback volume
Expected result: significantly lower playback volume

This only affects playback of WebM Opus audio. When playing MP4 AAC audio (press 'Play MP4' instead), it does correctly change the audio volume.

Description:

The repro sets up an AudioContext, and pipes an Audio element through it like this via calling createMediaElementSource():

MediaElementAudioSourceNode -> GainNode -> AudioContext destination

It then changes the volume of the GainNode after the MediaElementAudioSourceNode.

When playing WebM Opus, changing the volume of that GainNode has no effect on the playback volume. When playing MP4 AAC, it does change the playback volume.

Notes:

This affects our browser-based game creation tool Construct (www.construct.net).

It is also similar to issue 151589 which was filed back in 2015.
Comment 1 Ashley Gullen 2024-07-19 05:11:55 PDT
Note this reproduces in Safari 17.5 on macOS Sonoma 14.5 and iOS 17.5.1.
Comment 2 Radar WebKit Bug Importer 2024-07-26 05:10:13 PDT
<rdar://problem/132564818>
Comment 3 Ahmad Saleem 2024-07-26 14:35:05 PDT
I am able to reproduce this on Safari 17.6 Beta where 'set volume low' does not do anything while in case of Chrome Canary 129 and Firefox Nightly 130, it indeed lower the volume.