thay doi tinh nang chay trong mang noi bo
This commit is contained in:
@@ -147,7 +147,13 @@ export function useWhepPlayer({
|
||||
|
||||
const answerSdp = await res.text();
|
||||
const location = res.headers.get("location") || res.headers.get("Location");
|
||||
if (location) sessionUrlRef.current = location;
|
||||
if (location) {
|
||||
try {
|
||||
sessionUrlRef.current = new URL(location, whepUrl).toString();
|
||||
} catch {
|
||||
sessionUrlRef.current = location;
|
||||
}
|
||||
}
|
||||
|
||||
await pc.setRemoteDescription({ type: "answer", sdp: answerSdp });
|
||||
if (!disposed) setStatus("playing");
|
||||
|
||||
Reference in New Issue
Block a user