Changeset 273069 in webkit
- Timestamp:
- Feb 18, 2021 12:43:51 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273068 r273069 1 2021-02-18 Youenn Fablet <youenn@apple.com> 2 3 Backgrounding a page that is playing and capturing audio will stop audio playing 4 https://bugs.webkit.org/show_bug.cgi?id=222032 5 <rdar://problem/74389497> 6 7 Reviewed by Eric Carlson. 8 9 When a page gets backgrounded while capturing, it will continue doing capture, as can be seen with the red status bar. 10 In that case, for video conferencing, it makes sense that audio being played continues playing, at least for MediaStreamTrack. 11 The red status bar is an indication that the call is continuing. 12 Also, for MediaStreamTrack, audio and video content are not buffered: they are played or discarded. 13 The media player, whenever not visible, will stop processing video but will continue processing audio if not interrupted. 14 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. 15 16 Manually tested. 17 18 * html/HTMLMediaElement.cpp: 19 (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const): 20 1 21 2021-02-18 Rob Buis <rbuis@igalia.com> 2 22 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r272920 r273069 7578 7578 return true; 7579 7579 #endif 7580 #if ENABLE(MEDIA_STREAM) 7581 if (hasMediaStreamSrcObject() && mediaState() & IsPlayingAudio && document().mediaState() & MediaProducer::HasActiveAudioCaptureDevice) { 7582 INFO_LOG(LOGIDENTIFIER, "returning true because playing an audio MediaStreamTrack"); 7583 return true; 7584 } 7585 #endif 7580 7586 } else if (type == PlatformMediaSession::SuspendedUnderLock) { 7581 7587 if (isPlayingToExternalTarget()) { … … 7587 7593 return true; 7588 7594 } 7595 #if ENABLE(MEDIA_STREAM) 7596 if (hasMediaStreamSrcObject() && mediaState() & IsPlayingAudio && document().mediaState() & MediaProducer::HasActiveAudioCaptureDevice) { 7597 INFO_LOG(LOGIDENTIFIER, "returning true because playing an audio MediaStreamTrack"); 7598 return true; 7599 } 7600 #endif 7589 7601 } 7590 7602 return false;
Note: See TracChangeset
for help on using the changeset viewer.