简体   繁体   English

Twilio Video JS:静音 RemoteParticipant 的音频

[英]Twilio Video JS: Muting RemoteParticipant's audio

I have a scenario wherein I would need to mute some of the remote participants in the video call in my local machine.我有一个场景,我需要在本地机器上将视频通话中的一些远程参与者静音。 Example of this use case is when I want to be able to just hear a remote participant that is presenting and no else.此用例的示例是当我希望能够只听到正在演示的远程参与者而不是其他人时。

Solution I found online is to muted as stated here: https://github.com/twilio/twilio-video.js/issues/363 .我在网上找到的解决方案是按照此处所述进行静音: https : //github.com/twilio/twilio-video.js/issues/363

Muting the html element appears to work but I'm just curious if there is a Twilio method that can achieve the same result?静音 html 元素似乎有效,但我只是好奇是否有 Twilio 方法可以实现相同的结果?

At this time, the SDK does not provide a native ability to mute remote tracks.目前,SDK 不提供静音远程曲目的本机功能。 Only the local participant can disable their own tracks.只有本地参与者可以禁用自己的轨道。

A solution to this problem is the track subscription API.这个问题的一个解决方案是轨道订阅 API。 This API allows you to make a request to update a certain participant's subscribe rules so you can programmatically unsubscribe users from tracks.此 API 允许您请求更新某个参与者的订阅规则,以便您可以以编程方式从曲目中取消订阅用户。 For your use case, you can could hit this API to unsubscribe participants from specific users in the room, or unsubscribe all participants from all tracks except the presenter.对于您的用例,您可以点击此 API 取消订阅房间中特定用户的参与者,或者取消订阅除演示者之外的所有轨道的所有参与者。

More info on this can be found here: https://www.twilio.com/docs/video/api/track-subscriptions可以在此处找到有关此的更多信息: https : //www.twilio.com/docs/video/api/track-subscriptions

Let me know what you think!让我知道你的想法!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM