Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Why does the WebView in my Mac app behave differently from Safari?

$
0
0

I couldn't find an answer on MDN Web Docs and Stack Overflow, Google Search so I'm posting a question.

The issue I'm experiencing is that...

Why does the 'playbackRate Change' button in the provided 'controls' of the HTML Audio attribute not work in my macOS project's WebView?

I have a very simple HTML that plays audio.

<audio src="../Audio/013.mp3" controls="controls" style="width:370px;position: absolute;top:560px;left:200px;"></audio>

In Safari, the buttons supported in Controls work fine. However, in my Mac app, the playback speed change button doesn't work.

Just like this

#Safari
enter image description here

# my Mac App
enter image description here

Deployment Target and Minimum Deployments macOS -> 12.0

Please note that it only supports macOS apps.

I have tried.

webView.allowsLinkPreview = falsewebView.allowsBackForwardNavigationGestures = true webView.configuration.allowsAirPlayForMediaPlayback = true webView.configuration.preferences.javaScriptCanOpenWindowsAutomatically = truewebView.configuration.preferences.javaScriptEnabled = truewebView.configuration.defaultWebpagePreferences.allowsContentJavaScript = truewebView.configuration.mediaTypesRequiringUserActionForPlayback = .audio

App Sandbox -> outgoing Connections (Client) Check

++

As an additional test, the playbackRate functionality itself works, but the button remains inactive.

enter image description here

enter image description here


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>