[mirotalksfu] - keep aspect ratio settings
هذا الالتزام موجود في:
@@ -79,7 +79,7 @@ let BRAND = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: '<strong>WebRTC SFU v2.0.11</strong>',
|
||||
title: '<strong>WebRTC SFU v2.0.12</strong>',
|
||||
html: `
|
||||
<button
|
||||
id="support-button"
|
||||
|
||||
@@ -34,6 +34,7 @@ class LocalStorage {
|
||||
dominant_speaker_focus: false, // Focus on dominant speaker
|
||||
mic_noise_suppression: true, // Noise suppression using RNNoise
|
||||
video_fps: 0, // default 1280x768 30fps
|
||||
aspect_ratio: 0, // default (adaptive)
|
||||
screen_optimization: 1, // default detail (1): For high fidelity (screen sharing with text/graphics) || motion (2): For high frame rate (video playback, game streaming)
|
||||
screen_fps: 3, // default 1920x1080 15fps
|
||||
broadcasting: false, // default false (one to many a/v streaming)
|
||||
|
||||
@@ -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 2.0.11
|
||||
* @version 2.0.12
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -2858,7 +2858,9 @@ function handleSelects() {
|
||||
e.target.blur();
|
||||
};
|
||||
BtnAspectRatio.onchange = () => {
|
||||
setAspectRatio(BtnAspectRatio.value);
|
||||
adaptAspectRatio(videoMediaContainer.childElementCount);
|
||||
localStorageSettings.aspect_ratio = BtnAspectRatio.selectedIndex;
|
||||
lS.setSettings(localStorageSettings);
|
||||
};
|
||||
BtnVideoObjectFit.onchange = () => {
|
||||
rc.handleVideoObjectFit(BtnVideoObjectFit.value);
|
||||
@@ -3530,6 +3532,7 @@ function loadSettingsFromLocalStorage() {
|
||||
screenOptimization.selectedIndex = localStorageSettings.screen_optimization;
|
||||
videoFps.selectedIndex = localStorageSettings.video_fps;
|
||||
screenFps.selectedIndex = localStorageSettings.screen_fps;
|
||||
BtnAspectRatio.selectedIndex = localStorageSettings.aspect_ratio;
|
||||
BtnVideoObjectFit.selectedIndex = localStorageSettings.video_obj_fit;
|
||||
BtnVideoControls.selectedIndex = localStorageSettings.video_controls;
|
||||
BtnsBarPosition.selectedIndex = localStorageSettings.buttons_bar;
|
||||
@@ -5307,6 +5310,11 @@ function handleAspectRatio() {
|
||||
}
|
||||
|
||||
function adaptAspectRatio(participantsCount) {
|
||||
if (BtnAspectRatio.selectedIndex !== 0) {
|
||||
// User preferred aspect ratio
|
||||
setAspectRatio(BtnAspectRatio.selectedIndex);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
['0:0', '4:3', '16:9', '1:1', '1:2'];
|
||||
*/
|
||||
@@ -5361,8 +5369,9 @@ function adaptAspectRatio(participantsCount) {
|
||||
desktop = 1; // (4:3)
|
||||
mobile = 3; // (1:1)
|
||||
}
|
||||
BtnAspectRatio.selectedIndex = isMobileDevice ? mobile : desktop;
|
||||
setAspectRatio(BtnAspectRatio.selectedIndex);
|
||||
|
||||
const aspectRatio = isMobileDevice ? mobile : desktop;
|
||||
setAspectRatio(aspectRatio);
|
||||
}
|
||||
|
||||
// ####################################################
|
||||
@@ -5765,7 +5774,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 v2.0.11',
|
||||
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v2.0.12',
|
||||
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 2.0.11
|
||||
* @version 2.0.12
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم