简体   繁体   English

Twilio 可编程视频变焦摄像头

[英]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.

相关问题 Twilio 2.7.2 可编程摄像机保持开启状态 - Twilio 2.7.2 Programmable Video Camera Stays On Twilio可编程视频聊天室 - Twilio Programmable Video chatroom Twilio 可编程视频使用 Javascript - Twilio Programmable Video Using Javascript Twilio可编程视频JS /离子 - Twilio Programmable Video JS / Ionic Twilio 可编程视频 - 某些参与者禁用视频,仍需要摄像头权限 - Twilio Programmable Video - Disabled videos for certain participants, camera permission is still requested 我们可以禁用可编程视频中的视频 API - P2P 连接 - Twilio - Can we disable the Video in the Programmable Video API - P2P connection - Twilio 删除包含轨道的 HTML 元素是否足够,还是需要先在 Twilio Programmable Video 中分离它们? - Is it enough to remove the HTML elements containing tracks or do they need to be detached first in Twilio Programmable Video? Twilio 可编程视频:当dominantSpeaker 更改时,音频似乎音量增加并构建static - Twilio Programmable Video: when dominantSpeaker changes, the audio seems to increase in volume and build static 使用来自IP Camera RTSP的Twilio流式传输视频 - Stream Video using Twilio from IP Camera RTSP 有没有办法在 twilio 可编程聊天中添加私人频道? - Is there a way to add private channels to twilio programmable chat?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM