Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #311 from webrtc/fixSrcObject
Browse files Browse the repository at this point in the history
Use srcObject instead of src
  • Loading branch information
KaptenJansson committed May 30, 2016
2 parents de6024f + e501c7d commit 4360745
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/web_app/js/appcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,15 @@ AppController.prototype.transitionToActive_ = function() {
'ms.');

// Prepare the remote video and PIP elements.
trace('reattachMediaStream: ' + this.localVideo_.src);
trace('reattachMediaStream: ' + this.localVideo_.srcObject);
adapter.browserShim.reattachMediaStream(this.miniVideo_, this.localVideo_);

// Transition opacity from 0 to 1 for the remote and mini videos.
this.activate_(this.remoteVideo_);
this.activate_(this.miniVideo_);
// Transition opacity from 1 to 0 for the local video.
this.deactivate_(this.localVideo_);
this.localVideo_.src = '';
this.localVideo_.srcObject = null;
// Rotate the div containing the videos 180 deg with a CSS transform.
this.activate_(this.videosDiv_);
this.show_(this.hangupSvg_);
Expand All @@ -352,13 +352,13 @@ AppController.prototype.transitionToWaiting_ = function() {
this.remoteVideoResetTimer_ = setTimeout(function() {
this.remoteVideoResetTimer_ = null;
trace('Resetting remoteVideo src after transitioning to waiting.');
this.remoteVideo_.src = '';
this.remoteVideo_.srcObject = null;
}.bind(this), 800);
}

// Set localVideo.src now so that the local stream won't be lost if the call
// is restarted before the timeout.
this.localVideo_.src = this.miniVideo_.src;
// Set localVideo.srcObject now so that the local stream won't be lost if the
// call is restarted before the timeout.
this.localVideo_.srcObject = this.miniVideo_.srcObject;

// Transition opacity from 0 to 1 for the local video.
this.activate_(this.localVideo_);
Expand Down

0 comments on commit 4360745

Please sign in to comment.