Changeset 246002 in webkit
- Timestamp:
- May 31, 2019, 4:49:31 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 23 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab-expected.txt (added)
-
LayoutTests/platform/ios/mediastream/audio-muted-in-background-tab.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/SourcesCocoa.txt (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (6 diffs)
-
Source/WebCore/dom/Document.cpp (modified) (1 diff)
-
Source/WebCore/page/RuntimeEnabledFeatures.h (modified) (2 diffs)
-
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp (modified) (3 diffs)
-
Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h (modified) (2 diffs)
-
Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h (modified) (3 diffs)
-
Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm (modified) (1 diff)
-
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h (modified) (1 diff)
-
Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp (modified) (1 diff)
-
Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm (copied) (copied from trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb ) (2 diffs)
-
Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.cpp (modified) (2 diffs)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb (modified) (1 diff)
-
Source/WebKit/Shared/WebPreferences.yaml (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (modified) (1 diff)
-
Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245999 r246002 1 2019-05-31 Youenn Fablet <youenn@apple.com> 2 3 Add an option to mute audio capture automatically when page is not visible 4 https://bugs.webkit.org/show_bug.cgi?id=198307 5 6 Reviewed by Eric Carlson. 7 8 * platform/ios/mediastream/audio-muted-in-background-tab-expected.txt: Added. 9 * platform/ios/mediastream/audio-muted-in-background-tab.html: Added. 10 1 11 2019-05-31 Shawn Roberts <sroberts@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r245987 r246002 1 2019-05-31 Youenn Fablet <youenn@apple.com> 2 3 Add an option to mute audio capture automatically when page is not visible 4 https://bugs.webkit.org/show_bug.cgi?id=198307 5 6 Reviewed by Eric Carlson. 7 8 Reuse video capture mechanism for audio capture. 9 In case document gets in the background, interrupt the audio track if the audio factory requires it. 10 CoreAudioCaptureSourceIOS requires the audio source be interrupted if the app has not the right background mode. 11 It also allows interrupting the audio capture based on a runtime flag. 12 13 Add a runtime flag to control this. 14 Internals API is used to set it for test purposes, off by default. 15 For regular cases, the runtime flag is set through web preferences. 16 17 Test: platform/ios/mediastream/audio-muted-in-background-tab.html 18 19 * dom/Document.cpp: 20 (WebCore::Document::notifyMediaCaptureOfVisibilityChanged): 21 * page/RuntimeEnabledFeatures.h: 22 (WebCore::RuntimeEnabledFeatures::interruptAudioOnPageVisibilityChangeEnabled const): 23 (WebCore::RuntimeEnabledFeatures::setInterruptAudioOnPageVisibilityChangeEnabled): 24 * platform/mediastream/RealtimeMediaSourceCenter.cpp: 25 (WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter): 26 (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange): 27 (WebCore::RealtimeMediaSourceCenter::setCapturePageState): 28 (WebCore::RealtimeMediaSourceCenter::visibilityDidChange): 29 * platform/mediastream/RealtimeMediaSourceCenter.h: 30 (WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange): 31 * platform/mediastream/RealtimeMediaSourceFactory.h: 32 (WebCore::AudioCaptureFactory::setAudioCapturePageState): 33 (WebCore::VideoCaptureFactory::setVideoCapturePageState): 34 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h: 35 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: 36 (WebCore::CoreAudioCaptureSourceFactory::setAudioCapturePageState): 37 (WebCore::CoreAudioCaptureSourceFactoryIOS::shouldInterruptAudioOnPageVisibilityChange): 38 * platform/mediastream/mac/CoreAudioCaptureSource.h: 39 * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: 40 (WebCore::RealtimeMediaSourceCenter::initializeShouldInterruptAudioOnPageVisibilityChange): 41 * testing/Internals.cpp: 42 (WebCore::Internals::resetToConsistentState): 43 (WebCore::Internals::setShouldInterruptAudioOnPageVisibilityChange): 44 * testing/Internals.h: 45 * testing/Internals.idl: 46 1 47 2019-05-31 Geoffrey Garen <ggaren@apple.com> 2 48 -
trunk/Source/WebCore/SourcesCocoa.txt
r245964 r246002 543 543 platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm 544 544 platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 545 platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm 545 546 platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp 546 547 platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r245964 r246002 7279 7279 4162A4551011464700DFF3ED /* JSDedicatedWorkerGlobalScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDedicatedWorkerGlobalScope.cpp; sourceTree = "<group>"; }; 7280 7280 4162A4561011464700DFF3ED /* JSDedicatedWorkerGlobalScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDedicatedWorkerGlobalScope.h; sourceTree = "<group>"; }; 7281 416CE4A4229DF12E00A8A686 /* RealtimeMediaSourceCenterMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RealtimeMediaSourceCenterMac.mm; sourceTree = "<group>"; }; 7281 7282 416D759F20C6441300D02D2C /* NetworkLoadInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkLoadInformation.h; sourceTree = "<group>"; }; 7282 7283 416E0B37209BC3C2004A95D9 /* FetchIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchIdentifier.h; sourceTree = "<group>"; }; … … 15883 15884 5CDD83391E4324BB00621E83 /* RealtimeIncomingVideoSourceCocoa.mm */, 15884 15885 4A0FFAA31AAF5EF60062803B /* RealtimeMediaSourceCenterMac.cpp */, 15886 416CE4A4229DF12E00A8A686 /* RealtimeMediaSourceCenterMac.mm */, 15885 15887 41103AA71E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.cpp */, 15886 15888 41103AA81E39790A00769F14 /* RealtimeOutgoingAudioSourceCocoa.h */, … … 16387 16389 isa = PBXGroup; 16388 16390 children = ( 16389 6F0CD694229ED32700C5994E /* InlineLine.h */,16390 6F0CD692229ED31900C5994E /* InlineLine.cpp */,16391 16391 6FE7DDDD20EC6E8B008B5B4E /* text */, 16392 16392 6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */, … … 16399 16399 1123AFDC209ABBBA00736ACC /* InlineInvalidation.h */, 16400 16400 6FE7CFA02177EEF1005B1573 /* InlineItem.h */, 16401 6F0CD692229ED31900C5994E /* InlineLine.cpp */, 16402 6F0CD694229ED32700C5994E /* InlineLine.h */, 16401 16403 6FB47E612277425A00C7BCB0 /* InlineLineBox.h */, 16402 16404 6FE198132178397B00446F08 /* InlineLineBreaker.cpp */, … … 28192 28194 714C7C671FDAD2A900F2BEE1 /* AnimationPlaybackEventInit.h in Headers */, 28193 28195 71025ECD1F99F0CE004A250C /* AnimationTimeline.h in Headers */, 28194 6F0CD695229ED32700C5994E /* InlineLine.h in Headers */,28195 28196 0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */, 28196 28197 57152B5A21CB3E88000C37CA /* ApduCommand.h in Headers */, … … 29498 29499 6FE7CFA22177EEF2005B1573 /* InlineItem.h in Headers */, 29499 29500 BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */, 29501 6F0CD695229ED32700C5994E /* InlineLine.h in Headers */, 29500 29502 6FB47E632277425A00C7BCB0 /* InlineLineBox.h in Headers */, 29501 29503 6FE198172178397C00446F08 /* InlineLineBreaker.h in Headers */, -
trunk/Source/WebCore/dom/Document.cpp
r245964 r246002 7649 7649 return; 7650 7650 7651 RealtimeMediaSourceCenter::singleton().set VideoCapturePageState(hidden(), page()->isMediaCaptureMuted());7651 RealtimeMediaSourceCenter::singleton().setCapturePageState(hidden(), page()->isMediaCaptureMuted()); 7652 7652 #endif 7653 7653 } -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r245964 r246002 357 357 bool pageAtRuleSupportEnabled() const { return m_pageAtRuleSupportEnabled; } 358 358 void setPageAtRuleSupportEnabled(bool isEnabled) { m_pageAtRuleSupportEnabled = isEnabled; } 359 360 bool interruptAudioOnPageVisibilityChangeEnabled() const { return m_interruptAudioOnPageVisibilityChangeEnabled; } 361 void setInterruptAudioOnPageVisibilityChangeEnabled(bool enabled) { m_interruptAudioOnPageVisibilityChangeEnabled = enabled; } 359 362 360 363 WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures(); … … 541 544 542 545 bool m_referrerPolicyAttributeEnabled { false }; 546 bool m_interruptAudioOnPageVisibilityChangeEnabled { false }; 543 547 544 548 friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; -
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
r245964 r246002 39 39 #include "Logging.h" 40 40 #include "MediaStreamPrivate.h" 41 #include "RuntimeEnabledFeatures.h" 41 42 #include <wtf/SHA1.h> 42 43 … … 263 264 } 264 265 265 void RealtimeMediaSourceCenter::setVideoCapturePageState(bool interrupted, bool pageMuted) 266 { 266 void RealtimeMediaSourceCenter::setCapturePageState(bool interrupted, bool pageMuted) 267 { 268 if (RuntimeEnabledFeatures::sharedFeatures().interruptAudioOnPageVisibilityChangeEnabled()) 269 audioCaptureFactory().setAudioCapturePageState(interrupted, pageMuted); 267 270 videoCaptureFactory().setVideoCapturePageState(interrupted, pageMuted); 268 271 } … … 318 321 } 319 322 323 #if !PLATFORM(COCOA) 324 bool RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange() 325 { 326 return false; 327 } 328 #endif 329 320 330 } // namespace WebCore 321 331 -
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.h
r245964 r246002 87 87 WEBCORE_EXPORT void setDevicesChangedObserver(std::function<void()>&&); 88 88 89 void set VideoCapturePageState(bool, bool);89 void setCapturePageState(bool interrupted, bool pageMuted); 90 90 91 91 void captureDevicesChanged(); 92 93 WEBCORE_EXPORT static bool shouldInterruptAudioOnPageVisibilityChange(); 92 94 93 95 private: … … 114 116 VideoCaptureFactory* m_videoCaptureFactoryOverride { nullptr }; 115 117 DisplayCaptureFactory* m_displayCaptureFactoryOverride { nullptr }; 118 119 bool m_shouldInterruptAudioOnPageVisibilityChange { false }; 116 120 }; 117 121 -
trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceFactory.h
r245964 r246002 58 58 virtual CaptureSourceOrError createAudioCaptureSource(const CaptureDevice&, String&&, const MediaConstraints*) = 0; 59 59 virtual CaptureDeviceManager& audioCaptureDeviceManager() = 0; 60 virtual void setAudioCapturePageState(bool interrupted, bool pageMuted) 61 { 62 UNUSED_PARAM(interrupted); 63 UNUSED_PARAM(pageMuted); 64 } 60 65 61 66 protected: … … 72 77 virtual CaptureSourceOrError createVideoCaptureSource(const CaptureDevice&, String&&, const MediaConstraints*) = 0; 73 78 virtual CaptureDeviceManager& videoCaptureDeviceManager() = 0; 74 virtual void setVideoCapturePageState(bool, bool) { } 79 virtual void setVideoCapturePageState(bool interrupted, bool pageMuted) 80 { 81 UNUSED_PARAM(interrupted); 82 UNUSED_PARAM(pageMuted); 83 } 75 84 76 85 protected: … … 83 92 virtual CaptureSourceOrError createDisplayCaptureSource(const CaptureDevice&, const MediaConstraints*) = 0; 84 93 virtual CaptureDeviceManager& displayCaptureDeviceManager() = 0; 85 virtual void setDisplayCapturePageState(bool , bool) { }86 94 87 95 protected: -
trunk/Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm
r245964 r246002 127 127 } 128 128 129 void CoreAudioCaptureSourceFactory::setAudioCapturePageState(bool interrupted, bool pageMuted) 130 { 131 if (auto* activeSource = this->activeSource()) 132 activeSource->setInterrupted(interrupted, pageMuted); 133 } 134 129 135 } 130 136 -
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h
r245964 r246002 143 143 144 144 CaptureDeviceManager& audioCaptureDeviceManager() final; 145 #if PLATFORM(IOS_FAMILY) 146 void setAudioCapturePageState(bool interrupted, bool pageMuted) final; 147 #endif 145 148 }; 146 149 -
trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp
r245964 r246002 39 39 #include "Logging.h" 40 40 #include "MediaStreamPrivate.h" 41 #include "RuntimeEnabledFeatures.h" 41 42 #include "ScreenDisplayCaptureSourceMac.h" 42 43 #include "WindowDisplayCaptureSourceMac.h" -
trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm
r245999 r246002 1 1 /* 2 * <%= @warning %>3 *4 2 * Copyright (C) 2017 Apple Inc. All rights reserved. 5 3 * … … 27 25 28 26 #include "config.h" 29 #include " WebPreferencesStore.h"27 #include "RealtimeMediaSourceCenter.h" 30 28 31 #include "WebPreferencesDefaultValues.h" 32 #include "WebPreferencesKeys.h" 33 #include <wtf/NeverDestroyed.h> 34 #include <wtf/Variant.h> 29 #if ENABLE(MEDIA_STREAM) 35 30 36 // FIXME: These should added via options in WebPreferences.yaml, rather than hardcoded. 37 #include <WebCore/DeprecatedGlobalSettings.h> 38 #include <WebCore/LibWebRTCProvider.h> 39 #include <WebCore/SecurityOrigin.h> 40 #include <WebCore/Settings.h> 41 #include <WebCore/TextEncodingRegistry.h> 31 namespace WebCore { 42 32 43 namespace WebKit { 44 using namespace WebCore; 45 46 WebPreferencesStore::ValueMap& WebPreferencesStore::defaults() 33 bool RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange() 47 34 { 48 static NeverDestroyed<ValueMap> defaults; 49 if (defaults.get().isEmpty()) { 50 <%- for @pref in @preferences do -%> 51 <%- if @pref.condition -%> 52 #if <%= @pref.condition %> 53 <%- end -%> 54 defaults.get().set(WebPreferencesKey::<%= @pref.nameLower %>Key(), Value(<%= @pref.type %>(<%= @pref.defaultValue %>))); 55 <%- if @pref.condition -%> 35 #if PLATFORM(IOS) 36 NSArray *modes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIBackgroundModes"]; 37 if (!modes) 38 return true; 39 40 int modesCount = [modes count]; 41 for (int i = 0; i < modesCount; i++) { 42 if ([[modes objectAtIndex:i] isEqual: @"audio"]) 43 return false; 44 } 45 return true; 46 #else 47 return false; 56 48 #endif 57 <%- end -%>58 <%- end -%>59 }60 61 return defaults;62 49 } 63 50 64 } // namespace WebKit 51 } // namespace WebCore 52 53 #endif // ENABLE(MEDIA_STREAM) -
trunk/Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp
r245964 r246002 97 97 private: 98 98 #if PLATFORM(IOS_FAMILY) 99 void setVideoCapturePageState(bool interrupted, bool pageMuted) 99 void setVideoCapturePageState(bool interrupted, bool pageMuted) final 100 100 { 101 101 if (activeSource()) … … 140 140 } 141 141 private: 142 #if PLATFORM(IOS_FAMILY) 143 void setAudioCapturePageState(bool interrupted, bool pageMuted) final 144 { 145 if (activeSource()) 146 activeSource()->setInterrupted(interrupted, pageMuted); 147 } 148 #endif 142 149 CaptureDeviceManager& audioCaptureDeviceManager() final { return MockRealtimeMediaSourceCenter::singleton().audioCaptureDeviceManager(); } 143 150 }; -
trunk/Source/WebCore/testing/Internals.cpp
r245964 r246002 533 533 534 534 MediaEngineConfigurationFactory::disableMock(); 535 536 #if ENABLE(MEDIA_STREAM) 537 RuntimeEnabledFeatures::sharedFeatures().setInterruptAudioOnPageVisibilityChangeEnabled(false); 538 #endif 535 539 } 536 540 … … 1503 1507 1504 1508 #if ENABLE(MEDIA_STREAM) 1509 void Internals::setShouldInterruptAudioOnPageVisibilityChange(bool shouldInterrupt) 1510 { 1511 RuntimeEnabledFeatures::sharedFeatures().setInterruptAudioOnPageVisibilityChangeEnabled(shouldInterrupt); 1512 } 1505 1513 1506 1514 void Internals::setMockMediaCaptureDevicesEnabled(bool enabled) -
trunk/Source/WebCore/testing/Internals.h
r245964 r246002 517 517 518 518 #if ENABLE(MEDIA_STREAM) 519 void setShouldInterruptAudioOnPageVisibilityChange(bool); 519 520 void setMockMediaCaptureDevicesEnabled(bool); 520 521 void setMediaCaptureRequiresSecureConnection(bool); -
trunk/Source/WebCore/testing/Internals.idl
r245964 r246002 673 673 [Conditional=WEB_RTC] void applyRotationForOutgoingVideoSources(RTCPeerConnection connection); 674 674 675 [Conditional=MEDIA_STREAM] void setShouldInterruptAudioOnPageVisibilityChange(boolean shouldInterrupt); 675 676 [Conditional=MEDIA_STREAM] void setCameraMediaStreamTrackOrientation(MediaStreamTrack track, short orientation); 676 677 [Conditional=MEDIA_STREAM] void observeMediaStreamTrack(MediaStreamTrack track); -
trunk/Source/WebKit/ChangeLog
r245998 r246002 1 2019-05-31 Youenn Fablet <youenn@apple.com> 2 3 Add an option to mute audio capture automatically when page is not visible 4 https://bugs.webkit.org/show_bug.cgi?id=198307 5 6 Reviewed by Eric Carlson. 7 8 Add API to set the new runtime flag. 9 Make source proxy factories implement this automatic muting. 10 11 * Shared/WebPreferences.yaml: 12 * UIProcess/API/Cocoa/WKPreferences.mm: 13 (-[WKPreferences _interruptAudioOnPageVisibilityChangeEnabled]): 14 (-[WKPreferences _setInterruptAudioOnPageVisibilityChangeEnabled:]): 15 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: 16 * WebProcess/cocoa/UserMediaCaptureManager.cpp: 17 (WebKit::UserMediaCaptureManager::setAudioCapturePageState): 18 (WebKit::UserMediaCaptureManager::setVideoCapturePageState): 19 * WebProcess/cocoa/UserMediaCaptureManager.h: 20 1 21 2019-05-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 22 -
trunk/Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
r245964 r246002 37 37 #include <WebCore/DeprecatedGlobalSettings.h> 38 38 #include <WebCore/LibWebRTCProvider.h> 39 #include <WebCore/RealtimeMediaSourceCenter.h> 39 40 #include <WebCore/SecurityOrigin.h> 40 41 #include <WebCore/Settings.h> -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r245964 r246002 546 546 condition: ENABLE(WEB_RTC) 547 547 548 InterruptAudioOnPageVisibilityChangeEnabled: 549 type: bool 550 defaultValue: WebCore::RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange() 551 webcoreBinding: RuntimeEnabledFeatures 552 condition: ENABLE(MEDIA_STREAM) 553 548 554 WebRTCUnifiedPlanEnabled: 549 555 type: bool -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
r245964 r246002 650 650 } 651 651 652 - (BOOL)_interruptAudioOnPageVisibilityChangeEnabled 653 { 654 return _preferences->interruptAudioOnPageVisibilityChangeEnabled(); 655 } 656 657 - (void)_setInterruptAudioOnPageVisibilityChangeEnabled:(BOOL)enabled 658 { 659 _preferences->setInterruptAudioOnPageVisibilityChangeEnabled(enabled); 660 } 661 652 662 - (BOOL)_enumeratingAllNetworkInterfacesEnabled 653 663 { -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
r245964 r246002 121 121 @property (nonatomic, setter=_setWebRTCLegacyAPIEnabled:) BOOL _webRTCLegacyAPIEnabled WK_API_AVAILABLE(macos(10.13), ios(11.0)); 122 122 @property (nonatomic, setter=_setInactiveMediaCaptureSteamRepromptIntervalInMinutes:) double _inactiveMediaCaptureSteamRepromptIntervalInMinutes WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 123 @property (nonatomic, setter=_setInterruptAudioOnPageVisibilityChangeEnabled:) BOOL _interruptAudioOnPageVisibilityChangeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 123 124 124 125 @property (nonatomic, setter=_setJavaScriptCanAccessClipboard:) BOOL _javaScriptCanAccessClipboard WK_API_AVAILABLE(macos(10.13), ios(11.0)); -
trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp
r245964 r246002 367 367 } 368 368 369 } 370 369 #if PLATFORM(IOS_FAMILY) 370 void UserMediaCaptureManager::setAudioCapturePageState(bool interrupted, bool pageMuted) 371 { 372 if (auto* activeSource = static_cast<AudioCaptureFactory*>(this)->activeSource()) 373 activeSource->setInterrupted(interrupted, pageMuted); 374 } 375 376 void UserMediaCaptureManager::setVideoCapturePageState(bool interrupted, bool pageMuted) 377 { 378 if (auto* activeSource = static_cast<VideoCaptureFactory*>(this)->activeSource()) 379 activeSource->setInterrupted(interrupted, pageMuted); 380 } 371 381 #endif 382 383 } 384 385 #endif -
trunk/Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.h
r245964 r246002 80 80 WebCore::CaptureDeviceManager& displayCaptureDeviceManager() final { return m_noOpCaptureDeviceManager; } 81 81 82 #if PLATFORM(IOS_FAMILY) 83 void setAudioCapturePageState(bool interrupted, bool pageMuted) final; 84 void setVideoCapturePageState(bool interrupted, bool pageMuted) final; 85 #endif 86 82 87 // IPC::MessageReceiver 83 88 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
Note:
See TracChangeset
for help on using the changeset viewer.