Commit 93a7e4a
committed
Media element volume changing from 0 to >0 does not activate audio session
rdar://161691743
https://bugs.webkit.org/show_bug.cgi?id=303946
Reviewed by Andy Estes.
Changing the volume of a media element does not trigger a call to the
PlatformMediaSession's canProduceAudioChanged() method. Because all call sites
that update canProduceAudioChanged() should also update the sleep disabler,
make a new private convenience method on HTMLMediaElement that does both.
Tests: media/volume-activate-audio-session.html
media/volume-sleep-disable.html
* LayoutTests/media/volume-activate-audio-session-expected.txt: Added.
* LayoutTests/media/volume-activate-audio-session.html: Added.
* LayoutTests/media/volume-sleep-disable-expected.txt: Added.
* LayoutTests/media/volume-sleep-disable.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::setMutedInternal):
(WebCore::HTMLMediaElement::checkForAudioAndVideo):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):
(WebCore::HTMLMediaElement::canProduceAudioChanged):
* Source/WebCore/html/HTMLMediaElement.h:
Canonical link: https://commits.webkit.org/304297@main1 parent 30ee8b0 commit 93a7e4a
File tree
8 files changed
+107
-7
lines changed- LayoutTests
- media
- platform
- glib
- ios/media
- Source/WebCore/html
8 files changed
+107
-7
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4850 | 4850 | | |
4851 | 4851 | | |
4852 | 4852 | | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
4853 | 4856 | | |
4854 | 4857 | | |
4855 | 4858 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
| 1129 | + | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
| |||
1933 | 1933 | | |
1934 | 1934 | | |
1935 | 1935 | | |
1936 | | - | |
| 1936 | + | |
1937 | 1937 | | |
1938 | 1938 | | |
1939 | 1939 | | |
| |||
4735 | 4735 | | |
4736 | 4736 | | |
4737 | 4737 | | |
| 4738 | + | |
| 4739 | + | |
| 4740 | + | |
4738 | 4741 | | |
4739 | 4742 | | |
4740 | 4743 | | |
4741 | 4744 | | |
4742 | 4745 | | |
4743 | 4746 | | |
| 4747 | + | |
| 4748 | + | |
4744 | 4749 | | |
4745 | 4750 | | |
4746 | 4751 | | |
4747 | 4752 | | |
4748 | 4753 | | |
| 4754 | + | |
4749 | 4755 | | |
4750 | 4756 | | |
4751 | 4757 | | |
| |||
4805 | 4811 | | |
4806 | 4812 | | |
4807 | 4813 | | |
4808 | | - | |
4809 | | - | |
| 4814 | + | |
4810 | 4815 | | |
4811 | 4816 | | |
4812 | 4817 | | |
| |||
6576 | 6581 | | |
6577 | 6582 | | |
6578 | 6583 | | |
6579 | | - | |
| 6584 | + | |
6580 | 6585 | | |
6581 | 6586 | | |
6582 | 6587 | | |
| |||
7097 | 7102 | | |
7098 | 7103 | | |
7099 | 7104 | | |
7100 | | - | |
| 7105 | + | |
7101 | 7106 | | |
7102 | | - | |
7103 | 7107 | | |
7104 | 7108 | | |
7105 | 7109 | | |
| |||
10245 | 10249 | | |
10246 | 10250 | | |
10247 | 10251 | | |
| 10252 | + | |
| 10253 | + | |
| 10254 | + | |
| 10255 | + | |
| 10256 | + | |
| 10257 | + | |
10248 | 10258 | | |
10249 | 10259 | | |
10250 | 10260 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
1177 | 1178 | | |
1178 | 1179 | | |
1179 | 1180 | | |
| |||
0 commit comments