[mirotalksfu] - Optimize screen sharing video track

هذا الالتزام موجود في:
Miroslav Pejic
2025-01-20 01:16:52 +01:00
الأصل d0cd7d9a55
التزام 65b2085f34
4 ملفات معدلة مع 19 إضافات و5 حذوفات

عرض الملف

@@ -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.07
* @version 1.7.08
*
*/
@@ -4904,7 +4904,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.7.07',
title: 'WebRTC SFU v1.7.08',
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.07
* @version 1.7.08
*
*/
@@ -1472,6 +1472,20 @@ class RoomClient {
const track = audio ? stream.getAudioTracks()[0] : stream.getVideoTracks()[0];
if (screen) {
/*
track.contentHint helps optimize media tracks for specific use cases like `motion` or `detail`.
- `motion`: For high frame rate, suitable for dynamic content like video playback or game streaming.
- `detail`: For content requiring high fidelity, such as screen sharing with text, graphics, or fine details, prioritizing resolution over frame rate.
*/
if ('contentHint' in track) {
track.contentHint = 'detail';
console.info('Optimized video Track for screen sharing!');
} else {
console.warn('contentHint is not supported in this browser');
}
}
console.log(`${type} settings ->`, track.getSettings());
const params = {