Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
40 Views

how to get the sender ID?

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.
Tags (2)
0 Kudos
1 Reply
Highlighted
40 Views

Just try e.stream.from.

Thanks!

0 Kudos