[mirotalksfu] - improvements
هذا الالتزام موجود في:
@@ -668,24 +668,27 @@ module.exports = class Room {
|
|||||||
|
|
||||||
const peer = this.getPeer(socket_id);
|
const peer = this.getPeer(socket_id);
|
||||||
|
|
||||||
|
const { peer_name, peer_info } = peer;
|
||||||
|
|
||||||
let peerProducer;
|
let peerProducer;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
peerProducer = await peer.createProducer(producerTransportId, rtpParameters, kind, type);
|
peerProducer = await peer.createProducer(producerTransportId, rtpParameters, kind, type);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`Error creating producer for peer with socket ID ${socket_id}`, error);
|
log.error(`Error creating producer for peer ${peer_name} with socket ID ${socket_id}`, error);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Error creating producer with transport ID ${producerTransportId} type ${type} for peer ${socket_id}`,
|
`Error creating producer for peer ${peer_name} with transport ID ${producerTransportId} type ${type} for peer ${socket_id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!peerProducer) {
|
if (!peerProducer) {
|
||||||
throw new Error(`Failed to create producer with ID ${producerTransportId} for peer ${socket_id}`);
|
throw new Error(
|
||||||
|
`Failed to create producer for peer ${peer_name} with ID ${producerTransportId} for peer ${socket_id}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { id } = peerProducer;
|
const { id } = peerProducer;
|
||||||
|
|
||||||
const { peer_name, peer_info } = peer;
|
|
||||||
|
|
||||||
this.broadCast(socket_id, 'newProducers', [
|
this.broadCast(socket_id, 'newProducers', [
|
||||||
{
|
{
|
||||||
producer_id: id,
|
producer_id: id,
|
||||||
@@ -723,25 +726,29 @@ module.exports = class Room {
|
|||||||
throw new Error(`Peer with socket ID ${socket_id} not found in the room`);
|
throw new Error(`Peer with socket ID ${socket_id} not found in the room`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.router.canConsume({ producerId, rtpCapabilities })) {
|
|
||||||
throw new Error(`Cannot consume producer with ID ${producerId} type ${type}, router validation failed`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const peer = this.getPeer(socket_id);
|
const peer = this.getPeer(socket_id);
|
||||||
|
|
||||||
|
const { peer_name } = peer;
|
||||||
|
|
||||||
|
if (!this.router.canConsume({ producerId, rtpCapabilities })) {
|
||||||
|
throw new Error(
|
||||||
|
`Cannot consume producer for peer ${peer_name} with ID ${producerId} type ${type}, router validation failed`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let peerConsumer;
|
let peerConsumer;
|
||||||
try {
|
try {
|
||||||
peerConsumer = await peer.createConsumer(consumer_transport_id, producerId, rtpCapabilities);
|
peerConsumer = await peer.createConsumer(consumer_transport_id, producerId, rtpCapabilities);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`Error creating consumer for peer with socket ID ${socket_id}`, error);
|
log.error(`Error creating consumer for peer with socket ID ${socket_id}`, error);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Failed to create consumer with transport ID ${consumer_transport_id} and producer ID ${producerId} type ${type} for peer ${socket_id}`,
|
`Failed to create consumer for peer ${peer_name} with transport ID ${consumer_transport_id} and producer ID ${producerId} type ${type} for peer ${socket_id}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!peerConsumer) {
|
if (!peerConsumer) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Consumer creation failed for transport ID ${consumer_transport_id} and producer ID ${producerId}`,
|
`Consumer creation failed for peer ${peer_name} with transport ID ${consumer_transport_id} and producer ID ${producerId}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ dev dependencies: {
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.7.71
|
* @version 1.7.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.7.71",
|
"version": "1.7.72",
|
||||||
"description": "WebRTC SFU browser-based video calls",
|
"description": "WebRTC SFU browser-based video calls",
|
||||||
"main": "Server.js",
|
"main": "Server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ let BRAND = {
|
|||||||
},
|
},
|
||||||
about: {
|
about: {
|
||||||
imageUrl: '../images/mirotalk-logo.gif',
|
imageUrl: '../images/mirotalk-logo.gif',
|
||||||
title: '<strong>WebRTC SFU v1.7.71</strong>',
|
title: '<strong>WebRTC SFU v1.7.72</strong>',
|
||||||
html: `
|
html: `
|
||||||
<button
|
<button
|
||||||
id="support-button"
|
id="support-button"
|
||||||
|
|||||||
@@ -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 license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.7.71
|
* @version 1.7.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -5272,7 +5272,7 @@ function showAbout() {
|
|||||||
position: 'center',
|
position: 'center',
|
||||||
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
|
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
|
||||||
customClass: { image: 'img-about' },
|
customClass: { image: 'img-about' },
|
||||||
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.7.71',
|
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.7.72',
|
||||||
html: `
|
html: `
|
||||||
<br />
|
<br />
|
||||||
<div id="about">
|
<div id="about">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.7.71
|
* @version 1.7.72
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -2662,7 +2662,7 @@ class RoomClient {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error in consume', error);
|
console.error('Error in consume', error);
|
||||||
|
|
||||||
popupHtmlMessage(null, image.network, 'Consume', error, 'center', '/', true);
|
popupHtmlMessage(null, image.network, 'Consume', error, 'center', false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم