如何让Kurento的音频电平显示在用户界面上?

问题描述 投票:0回答:1

我正在使用kurento在nodejs中开发多方会议(客户端为kurento-utils-js,服务器端为kurento-client包)。

当有人说话时(无论是本地还是远程流),我想在用户界面(UI)上显示音频电平,只显示他正在说话。

node.js video-streaming webrtc kurento
1个回答
0
投票

你可以使用 hark API提供 kurentoUtils. 调整[-100, 0]之间的阈值,看看哪个值最适合你。我的工作是-50。

const speechEvent =kurentoUtils.WebRtcPeer.hark(stream, { threshold: -50 });
speechEvent.on('speaking', () => {
 /* do something on the UI */
});
speechEvent.on('stopped_speaking', () => {
  /* do something on the UI */
});
© www.soinside.com 2019 - 2024. All rights reserved.