ssửa lại chức năng frontend
This commit is contained in:
@@ -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.
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user