Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(window.loaded): Add new metric. (#14965)

Hristo Terezov4d79bbb5d88f
diff --git a/index.html b/index.html
index 6bc715bcfd..bd30c55d5e 100644
--- a/index.html
+++ b/index.html
@@ -69,6 +69,11 @@
window.indexLoadedTime = window.performance.now();
console.log("(TIME) index.html loaded:\t", indexLoadedTime);
+ window.addEventListener('load', function() {
+ window.loadedEventTime = window.performance.now();
+ console.log("(TIME) window loaded event:\t", loadedEventTime);
+ });
+
// XXX the code below listeners for errors and displays an error message
// in the document body when any of the required files fails to load.
// The intention is to prevent from displaying broken page.
diff --git a/react/index.web.js b/react/index.web.js
index 301826515d..1f9da2b6a4 100644
--- a/react/index.web.js
+++ b/react/index.web.js
@@ -51,6 +51,10 @@ globalNS.connectionTimes = {
'index.loaded': window.indexLoadedTime
};
+window.addEventListener('load', () => {
+ globalNS.connectionTimes['window.loaded'] = window.loadedEventTime;
+});
+
document.addEventListener('DOMContentLoaded', () => {
const now = window.performance.now();