⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269138 in webkit


Ignore:
Timestamp:
Oct 28, 2020, 11:13:47 PM (6 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r268791. rdar://problem/70795323

[iOS] Disable audio capture in the background for non Safari applications
https://bugs.webkit.org/show_bug.cgi?id=217948
<rdar://problem/70241557>

Reviewed by Eric Carlson.

Source/WebCore:

We do not have good OS support when capturing audio in a WebProcess for a backgrounded application.
Until we have proper support, it seems best to mute audio capture when being backgrounded.
Manually tested.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm: (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):

LayoutTests:

  • platform/ios/mediastream/video-muted-in-background-tab.html: By default, audio capture will be muted in WTR if page goes to background. Update the test to explicitly request for audio capture to continue while in background.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268791 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-610-branch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-610-branch/LayoutTests/ChangeLog

    r268980 r269138  
     12020-10-28  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r268791. rdar://problem/70795323
     4
     5    [iOS] Disable audio capture in the background for non Safari applications
     6    https://bugs.webkit.org/show_bug.cgi?id=217948
     7    <rdar://problem/70241557>
     8   
     9    Reviewed by Eric Carlson.
     10   
     11    Source/WebCore:
     12   
     13    We do not have good OS support when capturing audio in a WebProcess for a backgrounded application.
     14    Until we have proper support, it seems best to mute audio capture when being backgrounded.
     15    Manually tested.
     16   
     17    * platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
     18    (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
     19   
     20    LayoutTests:
     21   
     22    * platform/ios/mediastream/video-muted-in-background-tab.html:
     23    By default, audio capture will be muted in WTR if page goes to background.
     24    Update the test to explicitly request for audio capture to continue while in background.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2020-10-21  Youenn Fablet  <youenn@apple.com>
     30
     31            [iOS] Disable audio capture in the background for non Safari applications
     32            https://bugs.webkit.org/show_bug.cgi?id=217948
     33            <rdar://problem/70241557>
     34
     35            Reviewed by Eric Carlson.
     36
     37            * platform/ios/mediastream/video-muted-in-background-tab.html:
     38            By default, audio capture will be muted in WTR if page goes to background.
     39            Update the test to explicitly request for audio capture to continue while in background.
     40
    1412020-10-26  Karl Rackler  <rackler@apple.com>
    242
  • branches/safari-610-branch/LayoutTests/platform/ios/mediastream/video-muted-in-background-tab.html

    r261373 r269138  
    4343
    4444            promise_test(async (t) => {
    45                 if (window.internals)
     45                if (window.internals) {
     46                    window.internals.setShouldInterruptAudioOnPageVisibilityChange(false);
    4647                    window.internals.setPageVisibility(false);
     48                }
    4749                assert_false(audioTrack.muted, "audio track is active");
    4850                assert_true(videoTrack.muted, "video track is muted");
  • branches/safari-610-branch/Source/WebCore/ChangeLog

    r268837 r269138  
     12020-10-28  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r268791. rdar://problem/70795323
     4
     5    [iOS] Disable audio capture in the background for non Safari applications
     6    https://bugs.webkit.org/show_bug.cgi?id=217948
     7    <rdar://problem/70241557>
     8   
     9    Reviewed by Eric Carlson.
     10   
     11    Source/WebCore:
     12   
     13    We do not have good OS support when capturing audio in a WebProcess for a backgrounded application.
     14    Until we have proper support, it seems best to mute audio capture when being backgrounded.
     15    Manually tested.
     16   
     17    * platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
     18    (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
     19   
     20    LayoutTests:
     21   
     22    * platform/ios/mediastream/video-muted-in-background-tab.html:
     23    By default, audio capture will be muted in WTR if page goes to background.
     24    Update the test to explicitly request for audio capture to continue while in background.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2020-10-21  Youenn Fablet  <youenn@apple.com>
     30
     31            [iOS] Disable audio capture in the background for non Safari applications
     32            https://bugs.webkit.org/show_bug.cgi?id=217948
     33            <rdar://problem/70241557>
     34
     35            Reviewed by Eric Carlson.
     36
     37            We do not have good OS support when capturing audio in a WebProcess for a backgrounded application.
     38            Until we have proper support, it seems best to mute audio capture when being backgrounded.
     39            Manually tested.
     40
     41            * platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
     42            (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange):
     43
    1442020-10-21  Russell Epstein  <repstein@apple.com>
    245
  • branches/safari-610-branch/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm

    r260366 r269138  
    2929#if ENABLE(MEDIA_STREAM)
    3030
     31#include "RuntimeApplicationChecks.h"
     32
    3133namespace WebCore {
    3234
     
    3436{
    3537#if PLATFORM(IOS)
     38    if (!WebCore::IOSApplication::isMobileSafari() && !WebCore::IOSApplication::isSafariViewService())
     39        return true;
     40
    3641    NSArray *modes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"];
    3742    if (!modes)
Note: See TracChangeset for help on using the changeset viewer.