Browse Source

Disable joined and left sound when in a call.

pull/217/head
Simon Eisenmann 11 years ago
parent
commit
05a5b1b4bf
  1. 13
      static/js/controllers/uicontroller.js

13
static/js/controllers/uicontroller.js

@ -231,6 +231,19 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'web @@ -231,6 +231,19 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'web
mediaStream.webrtc.setAudioMute(cameraMute);
});
$scope.$watch("peer", function(c, o) {
// Watch for peer and disable some sounds while there is a peer.
if (c && !o) {
// New call.
playSound.disable("joined");
playSound.disable("left");
} else if (!c && o) {
// No longer in call.
playSound.disable("joined", false);
playSound.disable("left", false);
}
});
var ringer = playSound.interval("ring", null, 4000);
var dialer = playSound.interval("dial", null, 4000);
var dialerEnabled = false;

Loading…
Cancel
Save