Open mrlife opened 5 months ago
Verified on VS for Mac 17.6.10 build 428 (8.0.7), can repro issue with sample project on MacCatalyst platform.
@jaosnz-rep, thanks for checking it out and verifying the repro. I am on the same version of VS for Mac. I was a little unsure what you meant by "can not repro", though.
For the dotnet-policy-service comment, what version is the comment asking I use? Here is what I have, which seems to be the latest.
.NET SDK: Version: 8.0.203 Commit: 5e1ceea679 Workload version: 8.0.200-manifests.a7f084b6
Runtime Environment: OS Name: Mac OS X OS Version: 14.4 OS Platform: Darwin RID: osx-arm64 Base Path: /usr/local/share/dotnet/sdk/8.0.203/
.NET workloads installed: [maui-maccatalyst] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased
[wasi-experimental] Installation Source: SDK 8.0.200 Manifest Version: 8.0.3/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.workload.mono.toolchain.current/8.0.3/WorkloadManifest.json Install Type: FileBased
[maui-android] Installation Source: SDK 8.0.200 Manifest Version: 8.0.7/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maui/8.0.7/WorkloadManifest.json Install Type: FileBased
[ios] Installation Source: SDK 8.0.200 Manifest Version: 17.2.8043/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.ios/17.2.8043/WorkloadManifest.json Install Type: FileBased
[maccatalyst] Installation Source: SDK 8.0.200 Manifest Version: 17.2.8043/8.0.100 Manifest Path: /usr/local/share/dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.maccatalyst/17.2.8043/WorkloadManifest.json Install Type: FileBased
Host: Version: 8.0.3 Architecture: arm64 Commit: 9f4b1f5d66
.NET SDKs installed: 8.0.100 [/usr/local/share/dotnet/sdk] 8.0.101 [/usr/local/share/dotnet/sdk] 8.0.102 [/usr/local/share/dotnet/sdk] 8.0.203 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found: None
Environment variables: Not set
global.json file: Not found
Sorry @mrlife , the description in the previous comment is wrong, and the error is reproduced on the macOS platform.
This is likely a limitation of the MacCatalyst native WebView control. I added this HTML to a regular WebView and it showed the items are not available:
<div>
<button onclick="alert('requestMediaKeySystemAccess = ' + navigator.requestMediaKeySystemAccess)">requestMediaKeySystemAccess?</button>
<button onclick="alert('MediaKeys = ' + window.MediaKeys)">MediaKeys?</button>
<button onclick="alert('location.href = ' + window.location.href)">location.href?</button>
</div>
(And I also added location.href
just to see that something was working.)
This issue likely needs to be reported via Apple Feedback Assistant.
Hi @Eilon, thank you for checking this situation and corroborating the issue. Do you know if the native WebView used on Mac Catalyst is a WkWebView or something else?
On MacCatalyst it's also WKWebView.
Description
On iOS device (17.4), iOS simulator (17.4), and Android simulator, navigator.requestMediaKeySystemAccess and window.MediaKeys are defined, however they are not on Mac Catalyst.
Steps to Reproduce
Please see the linked sample app that reproduces the issue. As soon as the app launches, a JavaScript alert will display for each of
navigator.requestMediaKeySystemAccess
andwindow.MediaKeys
, indicating whether it exists.Expected behavior is that navigator.requestMediaKeySystemAccess and window.MediaKeys exist on Mac Catalyst like they do on the other platforms.
Link to public reproduction project repository
https://github.com/mrlife/MediaKeysTest
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
macOS Sonoma 14.4
Did you find any workaround?
No response
Relevant log output
No response