Browse Source

Fixed event and scope order/update issues created by rooms service.

pull/152/head
Simon Eisenmann 11 years ago
parent
commit
6f174f8517
  1. 2
      static/js/directives/audiovideo.js
  2. 2
      static/js/directives/buddylist.js
  3. 2
      static/js/directives/presentation.js
  4. 2
      static/js/directives/screenshare.js
  5. 4
      static/js/mediastream/webrtc.js

2
static/js/directives/audiovideo.js

@ -215,6 +215,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -215,6 +215,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
mediaStream.webrtc.e.on("done", function() {
$scope.$apply(function() {
$scope.hasUsermedia = false;
$scope.isActive = false;
$scope.peersTalking = {};
@ -239,6 +240,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -239,6 +240,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
});
$scope.rendererName = $scope.defaultRendererName;
$scope.haveStreams = false;
});
});

2
static/js/directives/buddylist.js

@ -42,7 +42,7 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) { @@ -42,7 +42,7 @@ define(['underscore', 'text!partials/buddylist.html'], function(_, template) {
};
webrtc.e.on("done", function() {
updateBuddyListVisibility();
$scope.$apply(updateBuddyListVisibility);
});
$scope.$on("room.joined", function(ev) {

2
static/js/directives/presentation.js

@ -704,12 +704,14 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'], @@ -704,12 +704,14 @@ define(['jquery', 'underscore', 'text!partials/presentation.html', 'bigscreen'],
};
mediaStream.webrtc.e.on("done", function() {
$scope.$apply(function() {
_.each($scope.availablePresentations, function(presentation) {
presentation.clear();
});
$scope.availablePresentations = [];
$scope.activeDownloads = [];
});
});
$(document).on("keyup", function(event) {
if (!$scope.layout.presentation) {

2
static/js/directives/screenshare.js

@ -318,7 +318,7 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials @@ -318,7 +318,7 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials
};
mediaStream.webrtc.e.on("done", function() {
$scope.stopScreenshare();
$scope.$apply($scope.stopScreenshare);
});
$scope.$watch("layout.screenshare", function(newval, oldval) {

4
static/js/mediastream/webrtc.js

@ -608,17 +608,21 @@ function($, _, PeerCall, PeerConference, PeerXfer, PeerScreenshare, UserMedia, u @@ -608,17 +608,21 @@ function($, _, PeerCall, PeerConference, PeerXfer, PeerScreenshare, UserMedia, u
if (reason !== "receivedbye") {
this.api.sendBye(id, reason);
}
_.defer(_.bind(function() {
if (this.currentcall && currentcall) {
this.e.triggerHandler("statechange", ["connected", this.currentcall]);
} else {
this.e.triggerHandler("done", [reason]);
}
}, this));
return;
}
}
if (this.currentcall) {
id = this.currentcall.id;
_.defer(_.bind(function() {
this.e.triggerHandler("done", [reason]);
}, this));
}
this.stop();
if (id) {

Loading…
Cancel
Save