Skip to content
Snippets Groups Projects
Commit b36e007a authored by Xander Dumaine's avatar Xander Dumaine Committed by GitHub
Browse files

Merge pull request #89 from otalk/getRemoteStream

don't blow up if getRemoteStreams is not available
parents ceae9c5d d8b3f96b
No related branches found
No related tags found
No related merge requests found
...@@ -117,7 +117,14 @@ function PeerConnection(config, constraints) { ...@@ -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.addStream = this.pc.addStream.bind(this.pc);
this.removeStream = function (stream) { this.removeStream = function (stream) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment