[ad_1]
I’ve an app which is mainly loading an internet site or to be actual a search engine like google. This sort of search engine has some functionalities like saving merchandise and likewise scan them over barcode scanner with webrtc. There I’ve persistent drawback that i am not likely ready to make use of the cam once I faucet the world to activate it. After it asks for permission it stays black.
//
// ViewController.swift
// WETID.de
//
// Created by user931404 on 12/11/21.
//
import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate {
var webView: WKWebView!
override func loadView() {
let config = WKWebViewConfiguration()
webView=WKWebView(body: .zero, configuration: config)
webView.navigationDelegate=self
view = webView
config.allowsPictureInPictureMediaPlayback = true
config.allowsInlineMediaPlayback = true
}
@IBOutlet var webview: WKWebView!
override func viewDidLoad() {
tremendous.viewDidLoad()
let url = URL(string: "https://wetid.de")!
webView.load(URLRequest(url: url))
webView.allowsBackForwardNavigationGestures = true
// Do any extra setup after loading the view.
}
}
I attempted many options like altering the construction and add some new configs in addition to including additonal choices in data.plist however with out success, does anyone know a greater resolution?
[ad_2]
