[mirotalksfu] - fix
هذا الالتزام موجود في:
@@ -980,18 +980,19 @@ class RoomClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getReconnectDirectJoinURL() {
|
getReconnectDirectJoinURL() {
|
||||||
|
const { peer_audio, peer_video, peer_screen, peer_token } = this.peer_info;
|
||||||
const baseUrl = `${window.location.origin}/join`;
|
const baseUrl = `${window.location.origin}/join`;
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
room: this.room_id,
|
room: this.room_id,
|
||||||
roomPassword: this.RoomPassword,
|
roomPassword: this.RoomPassword,
|
||||||
name: this.peer_name,
|
name: this.peer_name,
|
||||||
audio: this.peer_info.peer_audio,
|
audio: peer_audio,
|
||||||
video: this.peer_info.peer_video,
|
video: peer_video,
|
||||||
screen: this.peer_info.peer_screen,
|
screen: peer_screen,
|
||||||
notify: 0,
|
notify: 0,
|
||||||
isPresenter: isPresenter,
|
isPresenter: isPresenter,
|
||||||
};
|
};
|
||||||
if (this.peer_info.peer_token) queryParams.token = this.peer_info.peer_token;
|
if (peer_token) queryParams.token = peer_token;
|
||||||
const url = `${baseUrl}?${Object.entries(queryParams)
|
const url = `${baseUrl}?${Object.entries(queryParams)
|
||||||
.map(([key, value]) => `${key}=${value}`)
|
.map(([key, value]) => `${key}=${value}`)
|
||||||
.join('&')}`;
|
.join('&')}`;
|
||||||
@@ -1288,7 +1289,7 @@ class RoomClient {
|
|||||||
au.parentNode.removeChild(au);
|
au.parentNode.removeChild(au);
|
||||||
console.log('[transportClose] audio-element-count', this.localAudioEl.childElementCount);
|
console.log('[transportClose] audio-element-count', this.localAudioEl.childElementCount);
|
||||||
}
|
}
|
||||||
this.producers.delete(producer.id);
|
this.closeProducer(type);
|
||||||
});
|
});
|
||||||
|
|
||||||
producer.on('close', () => {
|
producer.on('close', () => {
|
||||||
@@ -1310,7 +1311,7 @@ class RoomClient {
|
|||||||
au.parentNode.removeChild(au);
|
au.parentNode.removeChild(au);
|
||||||
console.log('[closingProducer] audio-element-count', this.localAudioEl.childElementCount);
|
console.log('[closingProducer] audio-element-count', this.localAudioEl.childElementCount);
|
||||||
}
|
}
|
||||||
this.producers.delete(producer.id);
|
this.closeProducer(type);
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -1994,7 +1995,7 @@ class RoomClient {
|
|||||||
});
|
});
|
||||||
sa.parentNode.removeChild(sa);
|
sa.parentNode.removeChild(sa);
|
||||||
console.log('[transportClose] audio-element-count', this.localAudioEl.childElementCount);
|
console.log('[transportClose] audio-element-count', this.localAudioEl.childElementCount);
|
||||||
this.producers.delete(producerSa.id);
|
this.closeProducer(mediaType.audioTab);
|
||||||
});
|
});
|
||||||
|
|
||||||
producerSa.on('close', () => {
|
producerSa.on('close', () => {
|
||||||
@@ -2004,7 +2005,7 @@ class RoomClient {
|
|||||||
});
|
});
|
||||||
sa.parentNode.removeChild(sa);
|
sa.parentNode.removeChild(sa);
|
||||||
console.log('[closingProducer] audio-element-count', this.localAudioEl.childElementCount);
|
console.log('[closingProducer] audio-element-count', this.localAudioEl.childElementCount);
|
||||||
this.producers.delete(producerSa.id);
|
this.closeProducer(mediaType.audioTab);
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Produce error:', err);
|
console.error('Produce error:', err);
|
||||||
@@ -2326,10 +2327,7 @@ class RoomClient {
|
|||||||
//console.log('setVideoOff', peer_info);
|
//console.log('setVideoOff', peer_info);
|
||||||
let d, vb, i, h, au, sf, sm, sv, gl, ban, ko, p, pm, pb, pv;
|
let d, vb, i, h, au, sf, sm, sv, gl, ban, ko, p, pm, pb, pv;
|
||||||
|
|
||||||
const peer_id = peer_info.peer_id;
|
const { peer_id, peer_name, peer_audio, peer_presenter } = peer_info;
|
||||||
const peer_name = peer_info.peer_name;
|
|
||||||
const peer_audio = peer_info.peer_audio;
|
|
||||||
const peer_presenter = peer_info.peer_presenter;
|
|
||||||
|
|
||||||
this.removeVideoOff(peer_id);
|
this.removeVideoOff(peer_id);
|
||||||
d = document.createElement('div');
|
d = document.createElement('div');
|
||||||
@@ -5953,7 +5951,8 @@ class RoomClient {
|
|||||||
break;
|
break;
|
||||||
case 'mute':
|
case 'mute':
|
||||||
if (peerActionAllowed) {
|
if (peerActionAllowed) {
|
||||||
this.closeProducer(mediaType.audio);
|
const producerExist = this.producerExist(mediaType.audio);
|
||||||
|
producerExist ? await this.pauseProducer(mediaType.audio) : this.closeProducer(mediaType.audio);
|
||||||
this.updatePeerInfo(this.peer_name, this.peer_id, 'audio', false);
|
this.updatePeerInfo(this.peer_name, this.peer_id, 'audio', false);
|
||||||
this.userLog(
|
this.userLog(
|
||||||
'warning',
|
'warning',
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم