[mirotak] - fix: prevent query params (audio, video, screen) from bypassing disabled button config
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
# ====================================================
|
# ====================================================
|
||||||
# MiroTalk P2P v.1.7.83 - Environment Configuration
|
# MiroTalk P2P v.1.7.84 - Environment Configuration
|
||||||
# ====================================================
|
# ====================================================
|
||||||
|
|
||||||
# App environment
|
# App environment
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* ==============================================
|
* ==============================================
|
||||||
* MiroTalk P2P v.1.7.83 - Configuration File
|
* MiroTalk P2P v.1.7.84 - Configuration File
|
||||||
* ==============================================
|
* ==============================================
|
||||||
*
|
*
|
||||||
* This file is the central configuration source.
|
* This file is the central configuration source.
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ dependencies: {
|
|||||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.7.83
|
* @version 1.7.84
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalk",
|
"name": "mirotalk",
|
||||||
"version": "1.7.83",
|
"version": "1.7.84",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mirotalk",
|
"name": "mirotalk",
|
||||||
"version": "1.7.83",
|
"version": "1.7.84",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mattermost/client": "11.5.0",
|
"@mattermost/client": "11.5.0",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalk",
|
"name": "mirotalk",
|
||||||
"version": "1.7.83",
|
"version": "1.7.84",
|
||||||
"description": "A free WebRTC browser-based video call",
|
"description": "A free WebRTC browser-based video call",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ let brand = {
|
|||||||
},
|
},
|
||||||
about: {
|
about: {
|
||||||
imageUrl: '../images/mirotalk-logo.gif',
|
imageUrl: '../images/mirotalk-logo.gif',
|
||||||
title: 'WebRTC P2P v1.7.83',
|
title: 'WebRTC P2P v1.7.84',
|
||||||
html: `
|
html: `
|
||||||
<button
|
<button
|
||||||
id="support-button"
|
id="support-button"
|
||||||
|
|||||||
+22
-5
@@ -15,7 +15,7 @@
|
|||||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.7.83
|
* @version 1.7.84
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -1632,6 +1632,23 @@ function handleButtonsRule() {
|
|||||||
{ element: captionMaxBtn, display: !isMobileDevice && buttons.caption.showMaxBtn },
|
{ element: captionMaxBtn, display: !isMobileDevice && buttons.caption.showMaxBtn },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Hide settings tabs when corresponding main buttons are disabled
|
||||||
|
if (!buttons.main.showVideoBtn) {
|
||||||
|
displayElements([
|
||||||
|
{ element: tabVideoBtn, display: false },
|
||||||
|
{ element: videoDropdown, display: false },
|
||||||
|
{ element: getId('videoSourceDiv'), display: false },
|
||||||
|
{ element: getId('videoFitDiv'), display: false },
|
||||||
|
{ element: videoFpsDiv, display: false },
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if (!buttons.main.showAudioBtn) {
|
||||||
|
displayElements([
|
||||||
|
{ element: tabAudioBtn, display: false },
|
||||||
|
{ element: audioDropdown, display: false },
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// Settings buttons
|
// Settings buttons
|
||||||
displayElements([
|
displayElements([
|
||||||
{ element: activeRoomsBtn, display: buttons.settings.showActiveRoomsBtn },
|
{ element: activeRoomsBtn, display: buttons.settings.showActiveRoomsBtn },
|
||||||
@@ -2281,14 +2298,14 @@ function checkPeerAudioVideo() {
|
|||||||
let video = getQueryParam('video');
|
let video = getQueryParam('video');
|
||||||
if (audio) {
|
if (audio) {
|
||||||
audio = audio.toLowerCase();
|
audio = audio.toLowerCase();
|
||||||
let queryPeerAudio = useAudio ? audio === '1' || audio === 'true' : false;
|
let queryPeerAudio = useAudio && buttons.main.showAudioBtn ? audio === '1' || audio === 'true' : false;
|
||||||
if (queryPeerAudio != null) handleAudio(audioBtn, false, queryPeerAudio);
|
if (queryPeerAudio != null) handleAudio(audioBtn, false, queryPeerAudio);
|
||||||
//elemDisplay(tabAudioBtn, queryPeerAudio);
|
//elemDisplay(tabAudioBtn, queryPeerAudio);
|
||||||
console.log('Direct join', { audio: queryPeerAudio });
|
console.log('Direct join', { audio: queryPeerAudio });
|
||||||
}
|
}
|
||||||
if (video) {
|
if (video) {
|
||||||
video = video.toLowerCase();
|
video = video.toLowerCase();
|
||||||
let queryPeerVideo = useVideo ? video === '1' || video === 'true' : false;
|
let queryPeerVideo = useVideo && buttons.main.showVideoBtn ? video === '1' || video === 'true' : false;
|
||||||
if (queryPeerVideo != null) handleVideo(videoBtn, false, queryPeerVideo);
|
if (queryPeerVideo != null) handleVideo(videoBtn, false, queryPeerVideo);
|
||||||
//elemDisplay(tabVideoBtn, queryPeerVideo);
|
//elemDisplay(tabVideoBtn, queryPeerVideo);
|
||||||
console.log('Direct join', { video: queryPeerVideo });
|
console.log('Direct join', { video: queryPeerVideo });
|
||||||
@@ -4146,7 +4163,7 @@ async function loadLocalMedia(stream, kind) {
|
|||||||
* Check if screen is shared on join room
|
* Check if screen is shared on join room
|
||||||
*/
|
*/
|
||||||
function checkShareScreen() {
|
function checkShareScreen() {
|
||||||
if (!isMobileDevice && isScreenEnabled && isScreenSharingSupported) {
|
if (!isMobileDevice && isScreenEnabled && isScreenSharingSupported && buttons.main.showScreenBtn) {
|
||||||
playSound('newMessage');
|
playSound('newMessage');
|
||||||
// screenShareBtn.click(); // Chrome - Opera - Edge - Brave
|
// screenShareBtn.click(); // Chrome - Opera - Edge - Brave
|
||||||
// handle error: getDisplayMedia requires transient activation from a user gesture on Safari - FireFox
|
// handle error: getDisplayMedia requires transient activation from a user gesture on Safari - FireFox
|
||||||
@@ -14599,7 +14616,7 @@ function showAbout() {
|
|||||||
Swal.fire({
|
Swal.fire({
|
||||||
background: swBg,
|
background: swBg,
|
||||||
position: 'center',
|
position: 'center',
|
||||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.7.83',
|
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.7.84',
|
||||||
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
||||||
customClass: { image: 'img-about' },
|
customClass: { image: 'img-about' },
|
||||||
html: `
|
html: `
|
||||||
|
|||||||
Reference in New Issue
Block a user