0
我试图使用twilio视频api实施2人视频通话。我似乎无法访问任何参与者的音频/视频音轨,无论是在房间还是通过参与者连接的回拨。有问题的代码,我尝试访问新加入的参与者的曲目是:无法使用twilio视频访问参与者曲目
Twilio.Video.connect(token, {name:room_name}).then(function(room) {
console.log('Successfully joined a Room:');
//console.log(room);
room.on('participantConnected', function(participant) {
console.log('A remote Participant connected:');
console.log(participant.sid);
participant.tracks.forEach(track => {
//This does not get added and the console.log doesn't fire.
console.log('adding track');
document.getElementById('videoRow').appendChild(track.attach());
});
});
});
感谢您的帮助!