Chromium Code Reviews
DescriptionMigrate AudioFocusChangeListener to browser and always send GAIN
When each player has its own AudioFocusChangeListener, they must all
request AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK and not react to
AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK so that they don't affect each
other. However, DUCK is intended to be used for temporary audio focus
and can result in overlapping audio between the player and an external
application.
In order to signal external applications to stop playing, GAIN must be
sent. By migrating the AudioFocusChangeListener to the browser level,
GAIN can be sent on behalf of all players and any type of
AUDIOFOCUS_LOSS can interrupt all players.
BUG=429192
TEST=Run ContentShell instrumentation test:
./build/android/test_runner.py instrumentation \
--test-apk=ContentShellTest --isolate-file-path \
content/content_shell_test_apk.isolate -f "AudioFocusManagerTest*"
Patch Set 1 #
Total comments: 4
Patch Set 2 : webview suggestions from boliu #Messages
Total messages: 14 (3 generated)
|