0

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

Raju Abe
  • 735
  • 2
  • 10
  • 25

1 Answers1

0

it is an audio compatibility issue from android video capturing. based on Video compatibility issue: android recorded video not played in iPhone stack overflow answer my android team changed audio format AMR to AAC. Now we are able to play video captured from android device in iOS Devices.

Raju Abe
  • 735
  • 2
  • 10
  • 25