We are uploading and playing captured videos from both android and iOS devices. we are uploading in to s3 bucket.I am successfully playing video which is uploaded from iOS devices, I am getting the error Plug-in handled load
for video uploaded from android device. I am using UIWebView
to playing the videos. if I am using WKWebView
also getting same issue
my code is here
self.webView = UIWebView(frame: self.previewView.bounds)
webView.allowsInlineMediaPlayback = true
self.webView.delegate = self
self.webView.isOpaque = false
webView.backgroundColor = UIColor.black
var request = URLRequest(url: url)
self.previewView.addSubview(webView)
let userAgent = self.webView.stringByEvaluatingJavaScript(from: "navigator.userAgent")!+ "Custom agent"
UserDefaults.standard.register(defaults: ["UserAgent" : userAgent])
webView.loadRequest(request)
I am getting below error
Error Domain=WebKitErrorDomain Code=204 "Plug-in handled load" UserInfo={NSErrorFailingURLStringKey=https://xxx-xxx-videos.s3.amazonaws.com/my_web_videos/video/xxx/video.mp4, NSErrorFailingURLKey=https://xxx-xxx-videos.s3.amazonaws.com/my_web_videos/video/xxx/video.mp4, WebKitErrorMIMETypeKey=video/mp4, NSLocalizedDescription=Plug-in handled load}
I have tried solutions one of stackoverflow post for user agent it suddenly stopped working. Can anyone help me how to solve this issue. Thank You in Advance