mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -117,6 +117,7 @@ struct CallView: UIViewRepresentable {
|
|||||||
configuration.userContentController = userContentController
|
configuration.userContentController = userContentController
|
||||||
configuration.allowsInlineMediaPlayback = true
|
configuration.allowsInlineMediaPlayback = true
|
||||||
configuration.allowsPictureInPictureMediaPlayback = true
|
configuration.allowsPictureInPictureMediaPlayback = true
|
||||||
|
configuration.applicationNameForUserAgent = InfoPlistReader.main.bundleDisplayName
|
||||||
|
|
||||||
if let script = viewModelContext.viewState.script {
|
if let script = viewModelContext.viewState.script {
|
||||||
let userScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: false)
|
let userScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: false)
|
||||||
@@ -129,8 +130,6 @@ struct CallView: UIViewRepresentable {
|
|||||||
webView.isInspectable = true
|
webView.isInspectable = true
|
||||||
webView.scrollView.contentInsetAdjustmentBehavior = .never // Let Element Call manage the safe areas within the web view.
|
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
|
// https://stackoverflow.com/a/77963877/730924
|
||||||
webView.allowsLinkPreview = true
|
webView.allowsLinkPreview = true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user