[mirotalksfu] - #194 Improvements
هذا الالتزام موجود في:
@@ -64,7 +64,7 @@ let BRAND = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: '<strong>WebRTC SFU v1.7.56</strong>',
|
||||
title: '<strong>WebRTC SFU v1.7.57</strong>',
|
||||
html: `
|
||||
<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 CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.7.56
|
||||
* @version 1.7.57
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -5270,7 +5270,7 @@ function showAbout() {
|
||||
position: 'center',
|
||||
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
|
||||
customClass: { image: 'img-about' },
|
||||
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.7.56',
|
||||
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.7.57',
|
||||
html: `
|
||||
<br />
|
||||
<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 CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.7.56
|
||||
* @version 1.7.57
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -86,8 +86,16 @@ class VirtualBackground {
|
||||
console.error('❌ Frame processing error:', error);
|
||||
} finally {
|
||||
// Close frames after processing to release resources
|
||||
videoFrame?.close();
|
||||
imageBitmap?.close();
|
||||
this.closeFrames(videoFrame, imageBitmap);
|
||||
}
|
||||
}
|
||||
|
||||
closeFrames(videoFrame, imageBitmap) {
|
||||
if (videoFrame && !videoFrame.closed) {
|
||||
videoFrame.close();
|
||||
}
|
||||
if (imageBitmap && !imageBitmap.closed) {
|
||||
imageBitmap.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +111,7 @@ class VirtualBackground {
|
||||
transform: async (videoFrame, controller) => {
|
||||
if (!this.segmentation || !this.initialized) {
|
||||
console.warn('⚠️ Segmentation is not initialized, skipping frame.');
|
||||
videoFrame?.close();
|
||||
this.closeFrames(videoFrame);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -113,7 +121,7 @@ class VirtualBackground {
|
||||
|
||||
if (!imageBitmap) {
|
||||
console.warn('⚠️ Failed to create imageBitmap, skipping frame.');
|
||||
videoFrame?.close();
|
||||
this.closeFrames(videoFrame);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -150,7 +158,7 @@ class VirtualBackground {
|
||||
console.error('❌ Frame transformation error:', error);
|
||||
} finally {
|
||||
// Close the video frame after processing
|
||||
videoFrame?.close();
|
||||
this.closeFrames(videoFrame);
|
||||
}
|
||||
},
|
||||
flush: () => this.cleanPendingFrames(), // Clean up any pending frames when the stream ends
|
||||
@@ -174,8 +182,7 @@ class VirtualBackground {
|
||||
// Close all pending frames to release resources
|
||||
while (this.pendingFrames.length) {
|
||||
const { videoFrame, imageBitmap } = this.pendingFrames.pop();
|
||||
videoFrame?.close();
|
||||
imageBitmap?.close();
|
||||
this.closeFrames(videoFrame, imageBitmap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم