在UIWebView中具有多选的HTML文件输入不适用于视频 [英] HTML file input with multi selection in UIWebView not working for videos

查看:116
本文介绍了在UIWebView中具有多选的HTML文件输入不适用于视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用UIWebView(Cordova)创建打包为本机iOS应用程序的上传表单时遇到问题。问题是当在允许多个选择的元素中选择视频时。与仅可以进行单一选择的情况不同,所选视频也不是压缩的。预处理并因此以某种方式受到限制。

I've been having issues with creating an upload form packaged as a native iOS app using UIWebView (Cordova). Problem is that when a video is selected in a element that allows multiple selection. Unlike when only single selection is possible, the selected videos are not "compressed" aka. preprocessed and thus restricted in some way.

当尝试使用FileReader读取从照片库中选择的此类视频时,onerror函数会从FileReader中抛出ProgressEvent 使用以下FileError,代码1表示NOT_FOUND_ERR。

When trying to read such a video selected from the photo library using FileReader, the onerror function throws a "ProgressEvent" from the "FileReader" with the following "FileError" with code "1" meaning "NOT_FOUND_ERR".

但它在普通的iOS Safari Web视图中工作正常。

However it works fine in a normal iOS Safari web view.

我已向Apple提交了错误报告。

I've submitted a bug report to Apple.

此问题听起来与earlier issue ,其中以相同方式选择的视频没有文件大小。

Also this issue sounds very similar to an earlier issue where a video selected the same way had zero filesize.

推荐答案

我发现只有解决方案是跳过iOS UIWebView的多重选项,这只是一个不幸的解决方法。

Only solution I've found is to skip the multiple option for iOS UIWebView, which is just an unfortunate workaround.

这篇关于在UIWebView中具有多选的HTML文件输入不适用于视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆