获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
document.addEventListener("WeixinJSBridgeReady", () => { document.querySelector("#target_video").play() }) 如果需要播放动态的video,可以先在页面加载时放置一个隐藏的video标签,然后执行上述代码,需要播放时 const video = document.querySelector("#target_video") container.appendChild(video) video.src = src video.currentTime = 0 video.play()
ios web-view中,js调用video标签的play()方法后会报错?通过play方法来播放视频后会报错, chrome和safari没有问题,只是小程序webview上有问题 Uncaught (in promise) { "name": "NotAllowedError", "message": "The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.", "stack": "play@[native code]\nAo@ 微信版本:8.0.17 手机型号:iPhoneX 系统版本:iOS15.2.1
2024-07-17