首页 > 解决方案 > iOS 在音频上传时使用“捕获”HTML 属性崩溃

问题描述

输入 html 可以正确打开用户的音频上传选项——但不显示记录选项。

<input type="file" name="audio_upload" accept="audio/*" required />

当我添加capture属性时,它会使我的浏览器在 iOS 上崩溃。它不会在 Android 上执行此操作:

<input type="file" name="audio_upload" accept="audio/*" capture required />

这是您自己尝试的代码片段:

    <input type="file" name="audio_upload" accept="audio/*" required />

<input type="file" name="audio_upload" accept="audio/*" capture required />

我在我的 iPhone 11 上试过,它在 safari 上崩溃了。我的朋友也尝试过,但它在他的 iPhone 6s 上崩溃了。

我只尝试了我的 android s7 edge 并没有崩溃。

这是同一个错误吗?https://bugs.webkit.org/show_bug.cgi?id=202039

我是否试图做一些不应该被允许的事情?

谢谢

标签: htmlios

解决方案


推荐阅读