diff --git a/rtcpeerconnection.js b/rtcpeerconnection.js index 364e4496fd4919894f61db4482f285f738e33330..471d401416154f3e3ba6a6883f88372ef4815850 100644 --- a/rtcpeerconnection.js +++ b/rtcpeerconnection.js @@ -161,7 +161,7 @@ function PeerConnection(config, constraints) { this.pc.onremovestream = this.emit.bind(this, 'removeStream'); this.pc.onremovetrack = this.emit.bind(this, 'removeTrack'); this.pc.onaddstream = this.emit.bind(this, 'addStream'); - this.pc.onaddtrack = this.emit.bind(this, 'addTrack'); + this.pc.ontrack = this.emit.bind(this, 'addTrack'); this.pc.onnegotiationneeded = this.emit.bind(this, 'negotiationNeeded'); this.pc.oniceconnectionstatechange = this.emit.bind(this, 'iceConnectionStateChange'); this.pc.onsignalingstatechange = this.emit.bind(this, 'signalingStateChange');