2013-12-14 59 views

回答

2
peer.onaddstream = function (event) { 
    var stream = event.stream; 

    if (stream.getAudioTracks().length) alert('Peer has audio stream.'); 
    if (stream.getVideoTracks().length) alert('Peer has video stream.'); 
};