fix active stream fetch call on frontend

This commit is contained in:
Micha Albert 2024-08-02 16:22:22 +00:00
parent af2c6cdead
commit 5e4f0a03f0

View file

@ -23,8 +23,9 @@
const activeStreamResponse = await fetch(
"http://localhost:8000/api/v1/active_stream",
);
activeStream = (await activeStreamResponse.text()).replaceAll('"', "").split(",")[0];
activeStreamerName = (await activeStreamResponse.text()).replaceAll('"', "").split(",")[1];
const activeStreamResponseText = await activeStreamResponse.text()
activeStream = activeStreamResponseText.replaceAll('"', "").split(",")[0];
activeStreamerName = activeStreamResponseText.replaceAll('"', "").split(",")[1];
// if (oldActiveStream !== null && oldActiveStream !== activeStream) {
// window.location.reload();
// }
@ -110,7 +111,7 @@
autoplay
id={path.name}
bind:this={videos[path.name]}
class="max-h-[65vh] w-auto bg-red-500"
class="max-h-[65vh] w-auto"
></video>
{/if}
{/each}