Videochat netstream SoundTransform 不适用于音量控制
我有一个视频聊天应用程序,可以有 6 名参与者。我想做的是让每个发布者可以选择控制自己的流的音量。我的代码看起来像这样。
[global]
private var volumeTransform:SoundTransform;
[In the init method where ]
outgoingStream = new NetStream( nc );
....
volumeTransform = outgoingStream.soundTransform;
[In adjustVolume method]
....
volumeTransform.volume = event.value;
outgoingStream.soundTransform = volumeTransform;
有什么想法为什么这行不通吗?
-- 编辑可能的解决方案 --
可能的解决方案是这样的:校准滑块并设置麦克风增益,增益为零实际上是静音,增益为 100 是全音量。似乎对我有用。
I have a video chat application where there can be 6 participants. What I would like to do is give the option to each publisher to control their own stream's volume. The code I have looks like this.
[global]
private var volumeTransform:SoundTransform;
[In the init method where ]
outgoingStream = new NetStream( nc );
....
volumeTransform = outgoingStream.soundTransform;
[In adjustVolume method]
....
volumeTransform.volume = event.value;
outgoingStream.soundTransform = volumeTransform;
Any ideas why this would not work?
-- EDIT A POSSIBLE SOLUTION --
A possible solution can be this : Calibrate the slider and set the microphone gain, a gain of zero effectively is mute and a gain of 100 is full volume. Seems to work for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您无法执行您所要求的操作,您需要使用 Microphone.gain 属性(如上面编辑的评论中所述)。
您可以编写一些代码来在聊天参与者之间发送消息,从而允许管理员(或所有用户)修改其他人的麦克风增益。
I don't think you can do what you are asking for, you need to use the Microphone.gain property (as noted in the edited comment above).
You could conceivable write some code to send messages between the chat participants allowing an admin (or all users) to modify someone else's mic gain.