feat: enhance health checks in docker-compose and improve WebRTC stats collection

This commit is contained in:
2025-02-09 02:10:53 +01:00
parent be0e0f8153
commit 7b78f54510
6 changed files with 138 additions and 268 deletions

View File

@@ -79,19 +79,14 @@ if (window.location.protocol.startsWith("http")) {
// Handle stats messages.
window.addEventListener("message", async (message) => {
const { event, url, id, state, values, stats } = message.data;
const { event, data, stats } = message.data;
if (event === "webrtc-internal-exporter:ready") {
sendOptions();
} else if (event === "webrtc-internal-exporter:peer-connection-stats") {
try {
const response = await chrome.runtime.sendMessage({
event: "peer-connection-stats",
data: {
url,
id,
state,
values,
},
data: stats,
});
if (response.error) {
log(`error: ${response.error}`);
@@ -103,7 +98,7 @@ if (window.location.protocol.startsWith("http")) {
try {
const response = await chrome.runtime.sendMessage({
event: "peer-connections-stats",
data: stats,
data: data,
});
if (response.error) {
log(`error: ${response.error}`);