Title: [273178] branches/safari-611-branch/Source/WebCore
- Revision
- 273178
- Author
- alanc...@apple.com
- Date
- 2021-02-19 15:38:05 -0800 (Fri, 19 Feb 2021)
Log Message
Cherry-pick r273069. rdar://problem/74500798
Backgrounding a page that is playing and capturing audio will stop audio playing
https://bugs.webkit.org/show_bug.cgi?id=222032
<rdar://problem/74389497>
Reviewed by Eric Carlson.
When a page gets backgrounded while capturing, it will continue doing capture, as can be seen with the red status bar.
In that case, for video conferencing, it makes sense that audio being played continues playing, at least for MediaStreamTrack.
The red status bar is an indication that the call is continuing.
Also, for MediaStreamTrack, audio and video content are not buffered: they are played or discarded.
The media player, whenever not visible, will stop processing video but will continue processing audio if not interrupted.
This makes it working for websites using video elements for both audio and video, which is more common than websites using video elements for video and audio elements for audio.
Manually tested.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (273177 => 273178)
--- branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-19 23:38:02 UTC (rev 273177)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog 2021-02-19 23:38:05 UTC (rev 273178)
@@ -1,5 +1,50 @@
2021-02-19 Alan Coon <alanc...@apple.com>
+ Cherry-pick r273069. rdar://problem/74500798
+
+ Backgrounding a page that is playing and capturing audio will stop audio playing
+ https://bugs.webkit.org/show_bug.cgi?id=222032
+ <rdar://problem/74389497>
+
+ Reviewed by Eric Carlson.
+
+ When a page gets backgrounded while capturing, it will continue doing capture, as can be seen with the red status bar.
+ In that case, for video conferencing, it makes sense that audio being played continues playing, at least for MediaStreamTrack.
+ The red status bar is an indication that the call is continuing.
+ Also, for MediaStreamTrack, audio and video content are not buffered: they are played or discarded.
+ The media player, whenever not visible, will stop processing video but will continue processing audio if not interrupted.
+ This makes it working for websites using video elements for both audio and video, which is more common than websites using video elements for video and audio elements for audio.
+
+ Manually tested.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-18 Youenn Fablet <you...@apple.com>
+
+ Backgrounding a page that is playing and capturing audio will stop audio playing
+ https://bugs.webkit.org/show_bug.cgi?id=222032
+ <rdar://problem/74389497>
+
+ Reviewed by Eric Carlson.
+
+ When a page gets backgrounded while capturing, it will continue doing capture, as can be seen with the red status bar.
+ In that case, for video conferencing, it makes sense that audio being played continues playing, at least for MediaStreamTrack.
+ The red status bar is an indication that the call is continuing.
+ Also, for MediaStreamTrack, audio and video content are not buffered: they are played or discarded.
+ The media player, whenever not visible, will stop processing video but will continue processing audio if not interrupted.
+ This makes it working for websites using video elements for both audio and video, which is more common than websites using video elements for video and audio elements for audio.
+
+ Manually tested.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
+
+2021-02-19 Alan Coon <alanc...@apple.com>
+
Cherry-pick r273003. rdar://problem/74500696
Animated keyframe style needs to go through full style adjuster
Modified: branches/safari-611-branch/Source/WebCore/html/HTMLMediaElement.cpp (273177 => 273178)
--- branches/safari-611-branch/Source/WebCore/html/HTMLMediaElement.cpp 2021-02-19 23:38:02 UTC (rev 273177)
+++ branches/safari-611-branch/Source/WebCore/html/HTMLMediaElement.cpp 2021-02-19 23:38:05 UTC (rev 273178)
@@ -7552,6 +7552,12 @@
if (((m_videoFullscreenMode == VideoFullscreenModeStandard) || m_videoFullscreenStandby) && supportsPictureInPicture() && isPlaying())
return true;
#endif
+#if ENABLE(MEDIA_STREAM)
+ if (hasMediaStreamSrcObject() && mediaState() & IsPlayingAudio && document().mediaState() & MediaProducer::HasActiveAudioCaptureDevice) {
+ INFO_LOG(LOGIDENTIFIER, "returning true because playing an audio MediaStreamTrack");
+ return true;
+ }
+#endif
} else if (type == PlatformMediaSession::SuspendedUnderLock) {
if (isPlayingToExternalTarget()) {
INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToExternalTarget() is true");
@@ -7561,6 +7567,12 @@
INFO_LOG(LOGIDENTIFIER, "returning true because isPlayingToAutomotiveHeadUnit() is true");
return true;
}
+#if ENABLE(MEDIA_STREAM)
+ if (hasMediaStreamSrcObject() && mediaState() & IsPlayingAudio && document().mediaState() & MediaProducer::HasActiveAudioCaptureDevice) {
+ INFO_LOG(LOGIDENTIFIER, "returning true because playing an audio MediaStreamTrack");
+ return true;
+ }
+#endif
}
return false;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes