IOS的webview中的video标签事件无法触发
[代码]<[代码][代码]html[代码][代码]>[代码][代码]<[代码][代码]head[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]meta[代码] [代码]name[代码][代码]=[代码][代码]"viewport"[代码][代码] [代码][代码]content[代码][代码]=[代码][代码]"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"[代码] [代码]/>[代码][代码]</[代码][代码]head[代码][代码]>[代码][代码]<[代码][代码]style[代码][代码]>[代码][代码] [代码][代码].test {[代码][代码] [代码][代码]outline: none;[代码][代码] [代码][代码]background-color: transparent;[代码][代码] [代码][代码]}[代码][代码]</[代码][代码]style[代码][代码]>[代码][代码]<[代码][代码]body[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]input[代码] [代码]type[代码][代码]=[代码][代码]"file"[代码] [代码]name[代码][代码]=[代码][代码]"file"[代码] [代码]capture[代码][代码]=[代码][代码]"camcorder"[代码] [代码]id[代码][代码]=[代码][代码]"file"[代码] [代码]/>[代码][代码] [代码][代码]<[代码][代码]video[代码] [代码]id[代码][代码]=[代码][代码]"audio_id"[代码] [代码]controls autoplay loop hidden>Your browser can't support HTML5 Audio</[代码][代码]video[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]script[代码][代码]>[代码][代码] [代码][代码]let file = document.getElementById('file');[代码][代码] [代码][代码]file.addEventListener('change', (e) => {[代码][代码] [代码][代码]console.log(document.getElementById('file').files[0]);[代码][代码] [代码][代码]var url = URL.createObjectURL(document.getElementById('file').files[0]);[代码][代码] [代码][代码]var videos = document.getElementById("audio_id");[代码][代码] [代码][代码]console.log(url);[代码][代码] [代码][代码]videos.src = url;[代码][代码] [代码][代码]videos.ondurationchange = function () {[代码][代码] [代码][代码]var minutes = parseInt(videos.duration / 60, 10);[代码][代码] [代码][代码]var seconds = videos.duration % 60;[代码] [代码] [代码][代码]alert(`${minutes}m ${seconds}s`);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]</[代码][代码]script[代码][代码]>[代码][代码]</[代码][代码]body[代码][代码]>[代码][代码]</[代码][代码]html[代码][代码]>[代码]web-view 中src设置为该html文件时无法触发ondurationchange 和其他video事件,在开发者工具中可以触发ondurationchange 和其他video事件 18.18分左右已上传日志