我正在尝试使用矩阵突触和 matrix-js-sdk 库的帮助创建视频通话,我可以使视频通话正常工作,但问题在于语音传输,拨打电话的用户没有收到任何语音、视频工作正常。我要调用的代码
call = sdk.createNewMatrixCall(
client, room_id
);
var remoteVideo = document.querySelector('#remote')
call.placeVideoCall(
remoteVideo,localVideo
);
和回答代码
client.on("Call.incoming", function(c) {
console.log("Call ringing");
document.getElementById("result").innerHTML = "<p>Incoming call...</p>";
console.log(c ,'-------------------------')
// this.setState({call:c})
call = c
_this.callListerner(call);
// call.answer()
});
document.getElementById("answer").addEventListener('click',function() {
console.log("Answering call...");
console.log("Call => %s", call);
var localVideo = document.querySelector('#local')
call.setLocalVideoElement(localVideo)
var remoteVideo = document.querySelector('#remote')
call.setRemoteVideoElement(remoteVideo)
call.answer();
console.log(call , 'sssssssssss')
document.getElementById("result").innerHTML = "<p>Answered call.</p>";
})
这是我正在测试的代码=到目前为止我的代码