Fixes data channels JS errors.

This commit is contained in:
hristoterezov 2015-09-14 16:24:47 -05:00
parent 8cabf2b003
commit f1a1d6fa7d
2 changed files with 2 additions and 2 deletions

View File

@ -509,7 +509,7 @@ var RTCEvents = require("../../service/RTC/RTCEvents");
* @param peerConnection WebRTC peer connection instance.
*/
function DataChannels(peerConnection, emitter) {
peerConnection.ondatachannel = this.onDataChannel;
peerConnection.ondatachannel = this.onDataChannel.bind(this);
this.eventEmitter = emitter;
this._dataChannels = [];

View File

@ -10,7 +10,7 @@ var RTCEvents = require("../../service/RTC/RTCEvents");
* @param peerConnection WebRTC peer connection instance.
*/
function DataChannels(peerConnection, emitter) {
peerConnection.ondatachannel = this.onDataChannel;
peerConnection.ondatachannel = this.onDataChannel.bind(this);
this.eventEmitter = emitter;
this._dataChannels = [];