mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
* feat: Drops connection on prejoin screen. Refactors connection logic to reuse already existing logic from mobile. Connection is now established just before joining the room. Fixes some authentication logic with Login and Logout button in Profile tab. * squash: Drops createInitialLocalTracksAndConnect as it no longer connects. * squash: Shows an error on mobile and redirects to default. * squash: Fixes review comments. * squash: Fixes joining with prejoin disabled. * squash: Fixes adding initial local tracks. * squash: Fixes comments. * squash: Drop no longer used method. * squash: Fixes old web code imported into mobile builds. * squash: Drop unused prop. * squash: Drops recoverable flag on REDIRECT. * squash: Drops unused variable and fix connection access. * squash: Xmpp connect returns promise again. * squash: Execute xmpp connect and creating local tracks in parallel. * squash: Moves notification about problem jwt. * squash: Moves startConference to conference.js for the no prejoin case. And move the startConference in prejoin feature for the prejoin case. * squash: Fix passing filtered tracks when starting conference with no prejoin. * squash: Fix clearing listeners on connection established. Keeps mobile behaviour after merging web and mobile. * squash: Drops unused code.
60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
import $ from 'jquery';
|
|
|
|
/**
|
|
* Created by hristo on 12/22/14.
|
|
*/
|
|
const UIUtil = {
|
|
|
|
/**
|
|
* Escapes the given text.
|
|
*/
|
|
escapeHtml(unsafeText) {
|
|
return $('<div/>').text(unsafeText)
|
|
.html();
|
|
},
|
|
|
|
/**
|
|
* Inserts given child element as the first one into the container.
|
|
* @param container the container to which new child element will be added
|
|
* @param newChild the new element that will be inserted into the container
|
|
*/
|
|
prependChild(container, newChild) {
|
|
const firstChild = container.childNodes[0];
|
|
let result;
|
|
|
|
if (firstChild) {
|
|
result = container.insertBefore(newChild, firstChild);
|
|
} else {
|
|
result = container.appendChild(newChild);
|
|
}
|
|
|
|
return result;
|
|
},
|
|
|
|
/**
|
|
* Indicates if we're currently in full screen mode.
|
|
*
|
|
* @return {boolean} {true} to indicate that we're currently in full screen
|
|
* mode, {false} otherwise
|
|
*/
|
|
isFullScreen() {
|
|
return Boolean(document.fullscreenElement
|
|
|| document.mozFullScreenElement
|
|
|| document.webkitFullscreenElement
|
|
|| document.msFullscreenElement);
|
|
},
|
|
|
|
/**
|
|
* Checks if the given DOM element is currently visible. The offsetParent
|
|
* will be null if the "display" property of the element or any of its
|
|
* parent containers is set to "none". This method will NOT check the
|
|
* visibility property though.
|
|
* @param {el} The DOM element we'd like to check for visibility
|
|
*/
|
|
isVisible(el) {
|
|
return el.offsetParent !== null;
|
|
}
|
|
};
|
|
|
|
export default UIUtil;
|