[英]Twilio programmable video zoom in camera
I am using twilio video javascript sdk in a browser (or mobile webview).我在浏览器(或移动 web 视图)中使用 twilio 视频 javascript sdk。 It works just fine, both ends publish their tracks.它工作得很好,两端都发布了他们的曲目。 But I have not found any way for a user to zoom in his/hers camera exept from a custom css solution.但是我没有找到任何方法让用户放大他/她的相机,除了自定义 css 解决方案。 Is there any "native" way to zoom in a camera that is powering the published track in twilio video/webrtc?是否有任何“本机”方法来放大为 twilio 视频/webrtc 中已发布轨道提供动力的相机?
Thanks in advance提前致谢
Edit:编辑:
Actually, the navigator.mediaDevices.getSupportedConstraints().zoom
is true in all cases which means it is indeed supported by webview but the track.mediaStreamTrack.getCapabilities()
does not have the zoom property when in android webview. Actually, the navigator.mediaDevices.getSupportedConstraints().zoom
is true in all cases which means it is indeed supported by webview but the track.mediaStreamTrack.getCapabilities()
does not have the zoom property when in android webview. When in android chrome it works just fine.在 android 镀铬时,它工作得很好。 Does anyone know why this happens?有谁知道为什么会这样?
There is a relatively new API for pan-tilt-zoom that works with getUserMedia.有一个相对较新的 API 用于与 getUserMedia 一起使用的 pan-tilt-zoom。 In a nutshell you should be able to use简而言之,您应该能够使用
navigator.mediaDevices.getUserMedia({video: {zoom: true}})
and then use MediaStreamTrack.applyConstraint to change the zoom.然后使用 MediaStreamTrack.applyConstraint 更改缩放。 See the web.dev article for the details (as well as pitfalls)有关详细信息(以及陷阱),请参阅web.dev文章
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.