ssửa lại chức năng frontend

This commit is contained in:
2026-04-28 15:58:39 +07:00
parent 81c727b7a6
commit ecd9845e14
8 changed files with 367 additions and 88 deletions
+3
View File
@@ -57,6 +57,7 @@ export function useWhepPlayer({
pc.oniceconnectionstatechange = null;
pc.close();
} catch {
// Ignore teardown errors when peer connection is already closed.
}
}
@@ -66,6 +67,7 @@ export function useWhepPlayer({
v.srcObject = null;
v.removeAttribute("src");
} catch {
// Ignore cleanup errors on detached video element.
}
}
@@ -73,6 +75,7 @@ export function useWhepPlayer({
try {
await fetch(sessionUrl, { method: "DELETE" });
} catch {
// Ignore best-effort WHEP session cleanup failures.
}
}
}, []);