2017-08-05 61 views
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()); 
    }); 
    }); 
}); 

感謝您的幫助!

回答