最近做项目遇到video加载资源在iOS(iPadOS) safari不触发canplaythrough事件的状况
src设置后调用load()可以解决ios版本较新的机器(ios14及以上),
var video = document.createElement('VIDEO');
video.addEventListener('canplaythrough', loadedVideo, false);
video.src = url;
video.load();
var video = document.createElement('VIDEO');
video.addEventListener('canplaythrough', loadedVideo, false);
video.src = url;
video.load();