现在大部分手机打开摄像头黑屏 这里提供一些打开摄像头后黑屏的useragent,没有任何异常信息 Mozilla/5.0 (Linux; Android 11; PDSM00 Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/6804 MicroMessenger/8.0.15.2020(0x28000F3D) Process/tools WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 Mozilla/5.0 (Linux; Android 10; OXF-AN10 Build/HUAWEIOXF-AN10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/7847 MicroMessenger/8.0.15.2020(0x28000F3D) Process/tools WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 Mozilla/5.0 (Linux; Android 10; BKL-AL20 Build/HUAWEIBKL-AL20; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/045811 Mobile Safari/537.36 MMWEBID/4405 MicroMessenger/8.0.15.2020(0x28000F3D) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64 还有很多其他的机型都打不开现在这个概率越来越高了
微信内部分安卓手机用webview加载的h5 摄像头显示白屏现象: 部分安卓手机,微信内打开h5 无法正常显示摄像头的效果, 但是用手机自带的浏览器能正常打开浏览器的效果,demo在最下面 目前大致核心的代码片段: navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(function(stream) { var video = document.getElementById('video'); try { window.stream = stream; video.srcObject = stream; } catch (error) { video.src = window.URL.createObjectURL(stream); } }); [图片] 有问题的机型: 华为Mate 30(鸿蒙系统166版本) 、oppo reno4pro、vivo x7 plus、oppo A32 [图片][图片] demo: https://yx.beisong100.com/newh5v2/index.html [图片]
2021-10-27