如何像Google Meet一样实现相机切换

发布于 2025-01-24 13:31:45 字数 113 浏览 3 评论 0原文

我正在尝试实现Google Meet具有的诸如开/关切口之类的东西。我尝试从getusermedia获取曲目并启用设置= true/fals,它可以正常工作,但摄像机指示灯仍在始终出现。他们如何切换相机和指示灯?

I am trying to implement something like the camera on/off toggle that Google Meet has. I have tried getting the tracks from getUserMedia and setting enabled = true/false, it works but the camera indicator light is still on all the time. How are they able to toggle the camera and the indicator light?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伴我心暖 2025-01-31 13:31:45

要丢失相机指示灯,您将必须删除对流的任何引用(不只是设置为false)。
因此,您必须从同伴中删除轨道。
感谢收发器api 同伴没有重新谈判的冰。

To lose the camera indicator you will have to remove any reference to the stream (no just set enabled to false).
So you have to remove the track from the peer.
Thanks to Transceiver APi you can easily switch/remove track from the peer without renegotiate the ice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文