Skip to content

Commit

Permalink
Revert "Merge pull request webrtc#482 from fippo/addtrack"
Browse files Browse the repository at this point in the history
This reverts commit 5e0928a, reversing
changes made to db6a194.
  • Loading branch information
KaptenJansson committed Oct 12, 2017
1 parent 5e0928a commit d368f3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
4 changes: 1 addition & 3 deletions src/web_app/js/peerconnectionclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ PeerConnectionClient.prototype.addStream = function(stream) {
if (!this.pc_) {
return;
}
stream.getTracks().forEach(function(track) {
this.pc_.addTrack(track, stream);
});
this.pc_.addStream(stream);
};

PeerConnectionClient.prototype.startAsCaller = function(offerOptions) {
Expand Down
9 changes: 0 additions & 9 deletions src/web_app/js/peerconnectionclient_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,9 @@ describe('PeerConnectionClient Test', function() {

peerConnections.push(this);
};

MockRTCPeerConnection.prototype.addStream = function(stream) {
this.streams.push(stream);
};

MockRTCPeerConnection.prototype.addTrack = function(track, stream) {
// TODO: improve mock.
if (this.streams.indexOf(stream) !== -1) {
this.streams.push(stream);
}
};

MockRTCPeerConnection.prototype.createOffer = function(constraints) {
var self = this;
return new Promise(function(resolve, reject) {
Expand Down

0 comments on commit d368f3d

Please sign in to comment.