部署上线webrtc项目发现 ios h5 video默认情况下
设置静音实现自动播放后
手动点击播放时候自动全屏播放了,交互不好,如图:
打印查看video所有自带的dom属性
const videoDom = document.getElementsByTagName('video')[0]
const obj = {}
for(const prop in videoDom){
obj[prop] = videoDom[prop]
}
console.log(obj)
playsInline默认为false
js添加
video.addEventListener('loadedmetadata', () => {
video.playsInline = true
video.muted = true
video.controls = false
video.play()
})
标签:h5,const,ios,prop,video,videoDom
From: https://www.cnblogs.com/NanKe-Studying/p/17067959.html