diff --git a/rtcpeerconnection.js b/rtcpeerconnection.js index 92f7096593457b87ef51cefd73b52147918bdd43..e4e40fd3c65354bd21a96bd5025e64e0b6d848f7 100644 --- a/rtcpeerconnection.js +++ b/rtcpeerconnection.js @@ -114,7 +114,14 @@ function PeerConnection(config, constraints) { this.pc = new RTCPeerConnection(config, constraints); - this.getLocalStreams = this.pc.getLocalStreams.bind(this.pc); + if (typeof this.pc.getLocalStreams === 'function') { + this.getLocalStreams = this.pc.getLocalStreams.bind(this.pc); + } else { + this.getLocalStreams = function () { + return []; + }; + } + this.getRemoteStreams = this.pc.getRemoteStreams.bind(this.pc); this.addStream = this.pc.addStream.bind(this.pc);