我正在寻找仅在 ApiRTC 中进行音频呼叫的方法,但随着流不断出现,我似乎无法做到这一点。希望有人可以提供帮助。提前致谢。下面是我的代码
startVoiceCall() {
//apiRTC.setLogLevel(10);
this.ua = new apiRTC.UserAgent({
uri: "apzkey:xxxx",
});
let registerInformation = {
cloudUrl: "https://cloud.apizee.com",
};
this.ua
.register(registerInformation)
.then((session) => {
this.isDisabled = false;
console.log("User registered with session: ", session);
session
.on("contactListUpdate", (updatedContacts) => {
console.log("contactListUpdate", updatedContacts);
})
.on("incomingCall", (invitation) => {
var answerOptions = {
mediaTypeForIncomingCall : 'AUDIO'
};
invitation.accept(null, answerOptions).then((call) => {
this.currentCall = call;
this.setAudioCallListeners();
this.onCall = true;
});
});
//session.allowMultipleCalls(true);
this.connectedSession = session;
});
this.checkPermissions();
}