[webkit-changes] [WebKit/WebKit] 005881: [SwiftUI] Support media-related API functionality
Richard Robinson
noreply at github.com
Mon Dec 23 10:23:45 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00588182d1cf03e9414afa467d2266b7bc293317
https://github.com/WebKit/WebKit/commit/00588182d1cf03e9414afa467d2266b7bc293317
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2024-12-23 (Mon, 23 Dec 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Swift/WKUIDelegateAdapter.swift
M Source/WebKit/UIProcess/API/Swift/WebPage+Configuration.swift
M Source/WebKit/UIProcess/API/Swift/WebPage.swift
M Tools/SwiftBrowser/Resources/iOS/Info.plist
M Tools/SwiftBrowser/Resources/mac/Info.plist
M Tools/SwiftBrowser/Source/AppStorageKeys.swift
M Tools/SwiftBrowser/Source/BrowserViewModel.swift
M Tools/SwiftBrowser/Source/ContentView.swift
M Tools/SwiftBrowser/Source/SettingsView.swift
Log Message:
-----------
[SwiftUI] Support media-related API functionality
https://bugs.webkit.org/show_bug.cgi?id=284651
rdar://141109070
Reviewed by Aditya Keerthi.
Add functionality to support controlling media interaction to WebPage and WebView:
* Adds an observable `fullscreenState` to WebPage which is analogous to the one on WKWebView.
* Adds some functions to WebPage which are analogous to their WebPage counterparts, such as `setAllMediaPlaybackSuspended`
* Adds several properties and functions to WebPage to be able to observe and control camera and microphone capture state.
* Adds support for customizing when permission prompts are displayed.
* Source/WebKit/UIProcess/API/Swift/View+WebViewModifiers.swift:
(EnvironmentValues.webViewCameraCaptureState):
(EnvironmentValues.webViewMicrophoneCaptureState):
(View.webViewCameraCaptureState(_:)):
(View.webViewMicrophoneCaptureState(_:)):
* Source/WebKit/UIProcess/API/Swift/WebPage.swift:
(fullscreenState):
(pauseAllMediaPlayback):
(mediaPlaybackState):
(setAllMediaPlaybackSuspended(_:)):
(closeAllMediaPresentations):
(WebPage_v0.handlesURLScheme(_:)): Deleted.
(WebPage_v0.backForwardList): Deleted.
(WebPage_v0.url): Deleted.
(WebPage_v0.title): Deleted.
(WebPage_v0.estimatedProgress): Deleted.
(WebPage_v0.isLoading): Deleted.
(WebPage_v0.serverTrust): Deleted.
(WebPage_v0.hasOnlySecureContent): Deleted.
(WebPage_v0.isWritingToolsActive): Deleted.
(WebPage_v0.mediaType): Deleted.
(WebPage_v0.customUserAgent): Deleted.
(WebPage_v0.isInspectable): Deleted.
(WebPage_v0.backingWebView): Deleted.
(WebPage_v0.load(_:)): Deleted.
(WebPage_v0.load(_:mimeType:characterEncoding:baseURL:)): Deleted.
(WebPage_v0.load(_:baseURL:)): Deleted.
(WebPage_v0.load(fileURL:allowingReadAccessTo:)): Deleted.
(WebPage_v0.load(fileRequest:allowingReadAccessTo:)): Deleted.
(WebPage_v0.load(simulatedRequest:response:responseData:)): Deleted.
(WebPage_v0.load(simulatedRequest:responseHTML:)): Deleted.
(WebPage_v0.reload(_:)): Deleted.
(WebPage_v0.stopLoading): Deleted.
(WebPage_v0.callAsyncJavaScript(_:arguments:in:contentWorld:)): Deleted.
(WebPage_v0.snapshot(_:)): Deleted.
(WebPage_v0.pdf(_:)): Deleted.
(WebPage_v0.webArchiveData): Deleted.
* Source/WebKit/UIProcess/API/Swift/WebView.swift:
(WebViewRepresentable.makePlatformView(_:)):
(WebViewRepresentable.updatePlatformView(_:context:)):
(WebViewRepresentable.makeCoordinator):
(Coordinator.cameraCaptureState):
(Coordinator.microphoneCaptureState):
(Coordinator.observations):
(Coordinator.owner):
(Coordinator.updateObservations):
* Tools/SwiftBrowser/Resources/iOS/Info.plist:
* Tools/SwiftBrowser/Resources/mac/Info.plist:
* Tools/SwiftBrowser/Source/ContentView.swift:
(LabelConfiguration.captureState):
(LabelConfiguration.body):
(PrincipalToolbarGroup.cameraCaptureState):
(PrincipalToolbarGroup.microphoneCaptureState):
(PrincipalToolbarGroup.body):
(ContentView.cameraCaptureState):
(ContentView.microphoneCaptureState):
(ContentView.body):
Canonical link: https://commits.webkit.org/288251@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list