{#await load_defer}
{:then} {#if stream.state === "live"} {:else if stream.state === "archived" } {#if show_free_archived(stream)} {:else if stream.poster } {:else} {/if} {:else if stream.state === "finished"} {:else if stream.state === "pending"} {:else} {/if} Zed A. Shaw { stream.title } {#if $user.admin} {#if stream.state === "live"} change_video_state() }> {:else if stream.state === "pending"} change_video_state() }> {:else if stream.state === "ready"} change_video_state() }> {:else} Finished {/if} {:else} {/if}
{#if stream.state === "pending"} This live stream starts at { stream.starts_on }. Come back then, and hit refresh. {:else if stream.state === "ready"} The show is about to start. Your page might refresh when it does, but if the video doesn't start on its own hit refresh. {:else if stream.state === "finished"} This live stream has ended. It will be posted for later viewing after editing, probably in a few days. {:else if stream.state === "archived"} {#if $user.authenticated} I hope you enjoyed the stream. If you find a mistake or a problem with the video then please tell me in the chat. {:else if show_free_archived(stream) } If you enjoyed this free livestream and would like to learn more JavaScript, then register today to get even more livestreams and an entire course in JavaScript. {:else} This live stream is for members only. If you want to learn JavaScript, then register today and enjoy all livestreams plus all modules. {/if} {/if}
{#if ["pending", "finished", "archived"].includes(stream.state)} {#await past_defer then streams} {#each streams as archived} {#if archived.id !== stream.id} {#if archived.poster} {:else} {/if} { archived.title }
{ formatDistanceToNow(parseISO(archived.starts_on), {addSuffix: true}) }
{/if} {/each} {/await}
{:else} {/if} {/await}