Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).

how to get the sender ID?

song_w_
Beginner
345 Views

hi dear:

we have faced the big problem by using the java script API,below is the sample code.    

p2p.on('stream-added',function(e){ // A remote stream is available.
if(e.stream.isScreen()){
$('#screen video').show();
attachMediaStream($('#screen video').get(0),e.stream.mediaStream); // Show remote screen stream.
} else if(e.stream.hasVideo()) {
$('#remote video').show();
attachMediaStream($('#remote video').get(0),e.stream.mediaStream); // Show remote video stream.
}
isVideo++;
});
 
 
our question is: how to get the senderID in this event?
we have tried to use e.stream.id(), but it return null.
0 Kudos
1 Reply
Chunbo_H_Intel1
Employee
345 Views

Just try e.stream.from.

Thanks!

0 Kudos
Reply