【发布时间】:2020-07-30 14:40:02
【问题描述】:
我正在尝试实现基本视频通话的代码示例 一切都很顺利,只是当我与电话 A 通话时,声音转移到电话 B 并在句末附加了回声,任何人都知道如何消除回声。 它发生在我的 A10 和 A71 以及计算机上。 我的脚本:
public void JoinChannel(string channelName)
{
//set callback
Debug.Log("Join channel");
screen1.SetActive(true);
screen2.SetActive(true);
joinButton.SetActive(false);
inputField.SetActive(false);
mRtcEngine.OnJoinChannelSuccess = OnJoinChannelSuccess;
mRtcEngine.OnUserJoined = OnUserJoined;
mRtcEngine.OnUserOffline = OnUserOffline;
//enable video
mRtcEngine.EnableVideo();
//allow camera output callback
mRtcEngine.EnableVideoObserver();
//join the channel
mRtcEngine.JoinChannel(channelName, null, 0);
}
private void OnUserJoined(uint uid, int elapsed)
{
textDebug.GetComponent<Text>().text = "OnUserJoined";
Debug.Log("OnUserJoined");
GameObject go;
go = screen1;
go.name = uid.ToString();
VideoSurface o = go.AddComponent<VideoSurface>();
o.SetForUser(uid);
o.SetEnable(true);
Debug.Log(uid);
mRemotePeer = uid;
}
【问题讨论】:
标签: unity3d agora.io videochat