mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 22:44:08 -04:00
Don't play an engaged tone if we hang up locally.
This commit is contained in:
parent
a75f8686ba
commit
253c327252
3 changed files with 18 additions and 5 deletions
|
@ -58,12 +58,13 @@ angular.module('MatrixCall', [])
|
|||
this.didConnect = false;
|
||||
}
|
||||
|
||||
MatrixCall.prototype.placeCall = function() {
|
||||
MatrixCall.prototype.placeCall = function(config) {
|
||||
self = this;
|
||||
matrixPhoneService.callPlaced(this);
|
||||
navigator.getUserMedia({audio: true, video: false}, function(s) { self.gotUserMediaForInvite(s); }, function(e) { self.getUserMediaFailed(e); });
|
||||
self.state = 'wait_local_media';
|
||||
navigator.getUserMedia({audio: config.audio, video: config.video}, function(s) { self.gotUserMediaForInvite(s); }, function(e) { self.getUserMediaFailed(e); });
|
||||
this.state = 'wait_local_media';
|
||||
this.direction = 'outbound';
|
||||
this.config = config;
|
||||
};
|
||||
|
||||
MatrixCall.prototype.initWithInvite = function(msg) {
|
||||
|
@ -105,6 +106,8 @@ angular.module('MatrixCall', [])
|
|||
this.stopAllMedia();
|
||||
this.peerConn.close();
|
||||
|
||||
this.hangupParty = 'local';
|
||||
|
||||
var content = {
|
||||
version: 0,
|
||||
call_id: this.call_id,
|
||||
|
@ -285,6 +288,7 @@ angular.module('MatrixCall', [])
|
|||
self = this;
|
||||
$rootScope.$apply(function() {
|
||||
self.state = 'ended';
|
||||
this.hangupParty = 'remote';
|
||||
self.stopAllMedia();
|
||||
this.peerConn.close();
|
||||
self.onHangup();
|
||||
|
@ -300,6 +304,7 @@ angular.module('MatrixCall', [])
|
|||
|
||||
MatrixCall.prototype.onHangupReceived = function() {
|
||||
this.state = 'ended';
|
||||
this.hangupParty = 'remote';
|
||||
this.stopAllMedia();
|
||||
this.peerConn.close();
|
||||
this.onHangup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue