Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
86 views
in Technique[技术] by (71.8m points)

javascript - Swift WebViewKit Fails to Display Video Stream

I have a demo that I am trying to produce on a mobile device. The webkit works perfectly except it does not display the video that is playing (via IVS API) to the mobile. All other objects are presented.

What should I do to get the video to display from web-ui?

http://localhost:3000/

video displays on web-ui not on iOS simulator.

Swift Class:

import WebKit

class ViewController: UIViewController, WKNavigationDelegate {
    
    var webView: WKWebView!
    
    override func loadView() {
        webView = WKWebView()
        webView.navigationDelegate = self
        view = webView
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let url = URL(string: "http://localhost:3000")!
        webView.load(URLRequest(url: url))
        webView.allowsBackForwardNavigationGestures = true
    }

}

Plist:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict> 
</dict>
</plist>```

Trying to demo this for work and am not a swift dev.  Any advice very much appreciated!
question from:https://stackoverflow.com/questions/65601826/swift-webviewkit-fails-to-display-video-stream

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...