diff --git a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift index 0afebaecc..b15081aab 100644 --- a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift +++ b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift @@ -167,8 +167,8 @@ private struct CallView: UIViewRepresentable { // MARK: - WKUIDelegate func webView(_ webView: WKWebView, decideMediaCapturePermissionsFor origin: WKSecurityOrigin, initiatedBy frame: WKFrameInfo, type: WKMediaCaptureType) async -> WKPermissionDecision { - // If we are using the local url, we allow the camera and microphone, otherwise we need to verify that the host matches the one from the provided URL. - guard url.isFileURL || origin.host == url.host else { + // Allow if the origin is local, otherwise don't allow permissions for domains different than what the call was started on + guard origin.protocol == "file" || origin.host == url.host else { return .deny }