зеркало из https://github.com/nextcloud/spreed.git
Re-join call if connection to MCU is interrupted.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
This commit is contained in:
Родитель
0531924a44
Коммит
314b450774
|
@ -184,6 +184,12 @@
|
|||
this.currentRoomToken = token;
|
||||
this._trigger('joinRoom', [token]);
|
||||
this._runPendingChatRequests();
|
||||
if (this.currentCallToken === token) {
|
||||
// We were in this call before, join again.
|
||||
this.joinCall(token);
|
||||
} else {
|
||||
this.currentCallToken = null;
|
||||
}
|
||||
this._joinRoomSuccess(token, result.ocs.data.sessionId);
|
||||
}.bind(this),
|
||||
error: function (result) {
|
||||
|
@ -258,6 +264,13 @@
|
|||
this.currentCallToken = token;
|
||||
this._trigger('joinCall', [token]);
|
||||
this._joinCallSuccess(token);
|
||||
if (callback) {
|
||||
// We send an empty call description to simplewebrtc since
|
||||
// usersChanged (webrtc.js) will create/remove peer connections
|
||||
// with call participants
|
||||
var callDescription = {'clients': {}};
|
||||
callback('', callDescription);
|
||||
}
|
||||
}.bind(this),
|
||||
error: function () {
|
||||
// Room not found or maintenance mode
|
||||
|
@ -270,7 +283,7 @@
|
|||
// Override in subclasses if necessary.
|
||||
};
|
||||
|
||||
OCA.Talk.Signaling.Base.prototype.leaveCall = function(token) {
|
||||
OCA.Talk.Signaling.Base.prototype.leaveCall = function(token, keepToken) {
|
||||
|
||||
if (!token) {
|
||||
return;
|
||||
|
@ -284,7 +297,7 @@
|
|||
this._trigger('leaveCall', [token]);
|
||||
this._leaveCallSuccess(token);
|
||||
// We left the current call.
|
||||
if (token === this.currentCallToken) {
|
||||
if (!keepToken && token === this.currentCallToken) {
|
||||
this.currentCallToken = null;
|
||||
}
|
||||
}.bind(this)
|
||||
|
@ -816,6 +829,10 @@
|
|||
|
||||
this._forceReconnect = false;
|
||||
if (newSession) {
|
||||
if (this.currentCallToken) {
|
||||
// Mark this session as "no longer in the call".
|
||||
this.leaveCall(this.currentCallToken, true);
|
||||
}
|
||||
this.sendBye();
|
||||
}
|
||||
if (this.socket) {
|
||||
|
|
|
@ -906,6 +906,8 @@ var spreedPeerConnectionTable = [];
|
|||
ownPeer = null;
|
||||
}
|
||||
usersChanged(signaling, [], previousUsersInRoom);
|
||||
usersInCallMapping = {};
|
||||
previousUsersInRoom = [];
|
||||
// Reconnects with a new session id will trigger "usersChanged"
|
||||
// with the users in the room and that will re-establish the
|
||||
// peerconnection streams.
|
||||
|
|
Загрузка…
Ссылка в новой задаче