[mirotalksfu] - move full screen button

هذا الالتزام موجود في:
Miroslav Pejic
2024-09-25 14:19:55 +02:00
الأصل b554710ecc
التزام 209c6d984a
5 ملفات معدلة مع 45 إضافات و13 حذوفات

عرض الملف

@@ -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.5.72
* @version 1.5.73
*
*/
@@ -383,6 +383,7 @@ function refreshMainButtonsToolTipPlacement() {
setTippy('shareButton', 'Share room', placement);
setTippy('startRecButton', 'Start recording', placement);
setTippy('stopRecButton', 'Stop recording', placement);
setTippy('fullScreenButton', 'Toggle full screen', placement);
setTippy('emojiRoomButton', 'Toggle emoji reaction', placement);
setTippy('chatButton', 'Toggle the chat', placement);
setTippy('pollButton', 'Toggle the poll', placement);
@@ -391,6 +392,7 @@ function refreshMainButtonsToolTipPlacement() {
setTippy('whiteboardButton', 'Toggle the whiteboard', placement);
setTippy('snapshotRoomButton', 'Snapshot screen, window, or tab', placement);
setTippy('settingsButton', 'Toggle the settings', placement);
setTippy('restartICEButton', 'Restart ICE', placement);
setTippy('aboutButton', 'About this project', placement);
// Bottom buttons
@@ -1758,7 +1760,7 @@ function handleButtons() {
transcription.stop();
};
fullScreenButton.onclick = () => {
rc.toggleFullScreen();
rc.toggleRoomFullScreen();
};
recordingImage.onclick = () => {
isRecording ? stopRecButton.click() : startRecButton.click();
@@ -4456,7 +4458,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.5.72',
title: 'WebRTC SFU v1.5.73',
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.5.72
* @version 1.5.73
*
*/
@@ -29,6 +29,8 @@ const html = {
userHand: 'fas fa-hand-paper pulsate',
pip: 'fas fa-images',
fullScreen: 'fas fa-expand',
fullScreenOn: 'fas fa-compress-alt',
fullScreenOff: 'fas fa-expand-alt',
snapshot: 'fas fa-camera-retro',
sendFile: 'fas fa-upload',
sendMsg: 'fas fa-paper-plane',
@@ -255,6 +257,7 @@ class RoomClient {
this.isMySettingsOpen = false;
this._isConnected = false;
this.isDocumentOnFullScreen = false;
this.isVideoOnFullScreen = false;
this.isVideoFullScreenSupported = this.isFullScreenSupported();
this.isVideoPictureInPictureSupported = document.pictureInPictureEnabled;
@@ -3271,15 +3274,46 @@ class RoomClient {
// ####################################################
isFullScreenSupported() {
return (
const fsSupported = (
document.fullscreenEnabled ||
document.webkitFullscreenEnabled ||
document.mozFullScreenEnabled ||
document.msFullscreenEnabled
);
if (fsSupported){
this.handleFullScreenEvents()
}
return fsSupported;
}
handleFullScreenEvents(){
document.addEventListener('fullscreenchange', (e) => {
const fullscreenElement = document.fullscreenElement;
if (!fullscreenElement) {
const fullScreenIcon = this.getId('fullScreenIcon');
fullScreenIcon.className = html.fullScreenOff;
this.isDocumentOnFullScreen = false;
}
});
}
toggleRoomFullScreen() {
const fullScreenIcon = this.getId('fullScreenIcon');
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
fullScreenIcon.className = html.fullScreenOn;
this.isDocumentOnFullScreen = true;
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
fullScreenIcon.className = html.fullScreenOff;
this.isDocumentOnFullScreen = false;
}
}
}
toggleFullScreen(elem = null) {
if (this.isDocumentOnFullScreen) return;
const element = elem ? elem : document.documentElement;
const fullScreen = this.isFullScreen();
fullScreen ? this.goOutFullscreen(element) : this.goInFullscreen(element);

عرض الملف

@@ -181,6 +181,7 @@ access to use this app.
<button id="shareButton" class="hidden"><i class="fas fa-share-alt"></i></button>
<button id="startRecButton" class="hidden"><i class="fas fa-record-vinyl"></i></button>
<button id="stopRecButton" class="hidden"><i class="fas fa-record-vinyl cr"></i></button>
<button id="fullScreenButton" class="hidden"><i id="fullScreenIcon" class="fas fa-expand-alt"></i></button>
<button id="emojiRoomButton" class="hidden"><i class="fas fa-face-smile"></i></button>
<button id="chatButton" class="hidden"><i class="fas fa-comments"></i></button>
<button id="transcriptionButton" class="hidden"><i class="fas fa-closed-captioning"></i></button>
@@ -260,11 +261,6 @@ access to use this app.
<div class="tabActions">
<div id="tabRoom" class="tabcontent">
<button id="fullScreenButton" class="hidden btn-custom">
<i class="fas fa-expand-alt"></i>
<p>Full screen mode</p>
</button>
<br />
<button id="fileShareButton" class="hidden btn-custom">
<i class="fas fa-folder-open"></i>
<p>File sharing</p>