-
-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52dbc9b
commit 97e1e29
Showing
4 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ dev dependencies: { | |
* @license For commercial or closed source, contact us at [email protected] or purchase directly via CodeCanyon | ||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.6.86 | ||
* @version 1.6.87 | ||
* | ||
*/ | ||
|
||
|
@@ -1478,7 +1478,7 @@ function startServer() { | |
|
||
const isPresenter = peer_token | ||
? is_presenter | ||
: await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
: isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
|
||
const peer = room.getPeer(socket.id); | ||
|
||
|
@@ -1859,7 +1859,7 @@ function startServer() { | |
break; | ||
case 'ejectAll': | ||
const { peer_name, peer_uuid } = data; | ||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
if (!isPresenter) return; | ||
break; | ||
case 'peerAudio': | ||
|
@@ -1881,7 +1881,7 @@ function startServer() { | |
|
||
const data = checkXSS(dataObject); | ||
|
||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
|
||
const room = getRoom(socket); | ||
|
||
|
@@ -1997,7 +1997,7 @@ function startServer() { | |
]; | ||
|
||
if (presenterActions.some((v) => data.action === v)) { | ||
const isPresenter = await isPeerPresenter( | ||
const isPresenter = isPeerPresenter( | ||
socket.room_id, | ||
socket.id, | ||
data.from_peer_name, | ||
|
@@ -2032,14 +2032,14 @@ function startServer() { | |
} | ||
}); | ||
|
||
socket.on('updateRoomModerator', async (dataObject) => { | ||
socket.on('updateRoomModerator', (dataObject) => { | ||
if (!roomExists(socket)) return; | ||
|
||
const data = checkXSS(dataObject); | ||
|
||
const room = getRoom(socket); | ||
|
||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
|
||
if (!isPresenter) return; | ||
|
||
|
@@ -2061,14 +2061,14 @@ function startServer() { | |
} | ||
}); | ||
|
||
socket.on('updateRoomModeratorALL', async (dataObject) => { | ||
socket.on('updateRoomModeratorALL', (dataObject) => { | ||
if (!roomExists(socket)) return; | ||
|
||
const data = checkXSS(dataObject); | ||
|
||
const room = getRoom(socket); | ||
|
||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, data.peer_name, data.peer_uuid); | ||
|
||
if (!isPresenter) return; | ||
|
||
|
@@ -2582,7 +2582,7 @@ function startServer() { | |
|
||
const data = checkXSS(dataObject); | ||
const { peer_name, peer_uuid, file } = data; | ||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
if (!isPresenter) return cb(false); | ||
|
||
const room = getRoom(socket); | ||
|
@@ -2626,7 +2626,7 @@ function startServer() { | |
|
||
const data = checkXSS(dataObject); | ||
const { peer_name, peer_uuid, inputVideoURL } = data; | ||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
if (!isPresenter) return cb(false); | ||
|
||
const room = getRoom(socket); | ||
|
@@ -2739,7 +2739,7 @@ function startServer() { | |
const { index, peer_name, peer_uuid } = checkXSS(data); | ||
|
||
// Disable for now... | ||
// const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
// const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
// if (!isPresenter) return; | ||
|
||
const room = getRoom(socket); | ||
|
@@ -2789,14 +2789,14 @@ function startServer() { | |
room.broadCast(socket.id, 'editorUpdate', data); | ||
}); | ||
|
||
socket.on('disconnect', async () => { | ||
socket.on('disconnect', () => { | ||
if (!roomExists(socket)) return; | ||
|
||
const { room, peer } = getRoomAndPeer(socket); | ||
|
||
const { peer_name, peer_uuid } = peer || {}; | ||
|
||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
|
||
log.debug('[Disconnect] - peer name', peer_name); | ||
|
||
|
@@ -2828,7 +2828,7 @@ function startServer() { | |
socket.room_id = null; | ||
}); | ||
|
||
socket.on('exitRoom', async (_, callback) => { | ||
socket.on('exitRoom', (_, callback) => { | ||
if (!roomExists(socket)) { | ||
return callback({ | ||
error: 'Not currently in a room', | ||
|
@@ -2839,7 +2839,7 @@ function startServer() { | |
|
||
const { peer_name, peer_uuid } = peer || {}; | ||
|
||
const isPresenter = await isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
const isPresenter = isPeerPresenter(socket.room_id, socket.id, peer_name, peer_uuid); | ||
|
||
log.debug('Exit room', peer_name); | ||
|
||
|
@@ -2984,7 +2984,7 @@ function startServer() { | |
return JSON.parse(JSON.stringify(value)); | ||
} | ||
|
||
async function isPeerPresenter(room_id, peer_id, peer_name, peer_uuid) { | ||
function isPeerPresenter(room_id, peer_id, peer_name, peer_uuid) { | ||
try { | ||
if ( | ||
config.presenters && | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h | |
* @license For commercial or closed source, contact us at [email protected] or purchase directly via CodeCanyon | ||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.6.86 | ||
* @version 1.6.87 | ||
* | ||
*/ | ||
|
||
|
@@ -4702,7 +4702,7 @@ function showAbout() { | |
imageUrl: image.about, | ||
customClass: { image: 'img-about' }, | ||
position: 'center', | ||
title: 'WebRTC SFU v1.6.86', | ||
title: 'WebRTC SFU v1.6.87', | ||
html: ` | ||
<br /> | ||
<div id="about"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* @license For commercial or closed source, contact us at [email protected] or purchase directly via CodeCanyon | ||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.6.86 | ||
* @version 1.6.87 | ||
* | ||
*/ | ||
|
||
|
@@ -1116,6 +1116,8 @@ class RoomClient { | |
} | ||
|
||
handleDisconnect() { | ||
window.localStorage.isReconnected = true; | ||
|
||
console.log('Disconnected. Attempting to reconnect...'); | ||
this.exit(true); | ||
|
||
|
@@ -1236,7 +1238,6 @@ class RoomClient { | |
|
||
ServerAway() { | ||
this.sound('alert'); | ||
window.localStorage.isReconnected = true; | ||
Swal.fire({ | ||
allowOutsideClick: false, | ||
allowEscapeKey: false, | ||
|