diff --git a/rtcpeerconnection.js b/rtcpeerconnection.js index 546f19f9d3cfe9156ba4073aad172bd1f917f3be..f18275ac9e29f7cdec7bd00bd54b728e027a3c5c 100644 --- a/rtcpeerconnection.js +++ b/rtcpeerconnection.js @@ -117,7 +117,14 @@ function PeerConnection(config, constraints) { }; } - this.getRemoteStreams = this.pc.getRemoteStreams.bind(this.pc); + if (typeof this.pc.getRemoteStreams === 'function') { + this.getRemoteStreams = this.pc.getRemoteStreams.bind(this.pc); + } else { + this.getRemoteStreams = function () { + return []; + }; + } + this.addStream = this.pc.addStream.bind(this.pc); this.removeStream = function (stream) {