Set Element Call's user-agent back to the default but include the bundle name.

Apparently livekit-js-sdk does feature detection based on UA sniffing.
This commit is contained in:
Doug
2026-08-11 12:35:34 +01:00
committed by Doug
parent d3b12561b3
commit 947a47943b
@@ -117,6 +117,7 @@ struct CallView: UIViewRepresentable {
configuration.userContentController = userContentController
configuration.allowsInlineMediaPlayback = true
configuration.allowsPictureInPictureMediaPlayback = true
configuration.applicationNameForUserAgent = InfoPlistReader.main.bundleDisplayName
if let script = viewModelContext.viewState.script {
let userScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: false)
@@ -129,8 +130,6 @@ struct CallView: UIViewRepresentable {
webView.isInspectable = true
webView.scrollView.contentInsetAdjustmentBehavior = .never // Let Element Call manage the safe areas within the web view.
webView.customUserAgent = UserAgentBuilder.makeASCIIUserAgent()
// https://stackoverflow.com/a/77963877/730924
webView.allowsLinkPreview = true