Skip to content

Commit 80703a0

Browse files
committed
Merge pull request #46 from joseph-onsip/23
WebRTC.MediaHandler: peerConnection.onaddstream emits 'addStream' event
2 parents a39057f + 27528e0 commit 80703a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/WebRTC/MediaHandler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ var MediaHandler = function(session, options) {
2222
'iceFailed',
2323
'getDescription',
2424
'setDescription',
25-
'dataChannel'
25+
'dataChannel',
26+
'addStream'
2627
];
2728
options = options || {};
2829

@@ -71,6 +72,7 @@ var MediaHandler = function(session, options) {
7172
this.peerConnection.onaddstream = function(e) {
7273
self.logger.log('stream added: '+ e.stream.id);
7374
self.render();
75+
self.emit('addStream', e);
7476
};
7577

7678
this.peerConnection.onremovestream = function(e) {

0 commit comments

Comments
 (0)