File tree Expand file tree Collapse file tree
docs/.vitepress/theme/live Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import Footer from '@components/oss/Footer.vue'
1414 <Timer at="2026-03-19T15:00 :00 .000Z " />
1515 </template >
1616 <template #timeout >
17- <VideoIframe />
17+ <VideoIframe at="2026-03-19T15: 00 : 00 . 000Z " />
1818 </template >
1919 </TimeoutSwitcher >
2020 <Events />
Original file line number Diff line number Diff line change 1+ <script setup>
2+ import { computed } from ' vue'
3+
4+ const props = defineProps ({
5+ at: {
6+ type: String ,
7+ required: true ,
8+ },
9+ })
10+
11+ const iframeSrc = computed (() => {
12+ const totalLength = 39 * 60 + 15 // 39 minutes and 15 seconds
13+ const atTime = new Date (props .at ).getTime ()
14+ const now = Date .now ()
15+ const elapsedSeconds = Math .max (0 , Math .floor ((now - atTime) / 1000 ))
16+
17+ const params = new URLSearchParams ({
18+ si: ' hhgR4fwkRw9zQ0yx' ,
19+ controls: ' 0' ,
20+ start: elapsedSeconds > totalLength ? 0 : String (elapsedSeconds),
21+ disablekb: ' 1' ,
22+ rel: ' 0' ,
23+ autoplay: ' 1' ,
24+ })
25+
26+ return ` https://www.youtube-nocookie.com/embed/bmWQqAKLgT4?${ params .toString ()} `
27+ })
28+ </script >
29+
130<template >
231 <div class =" wrapper wrapper--ticks w-full border-nickel border-t md:divide-x" >
332 <iframe
433 width =" 560"
534 height =" 315"
635 class =" w-full h-auto max-h-[calc(100vh-5rem-var(--vp-banner-height,0px))] aspect-video"
7- src =" https://www.youtube-nocookie.com/embed/bmWQqAKLgT4?si=hhgR4fwkRw9zQ0yx & amp ; controls=0 & amp ; start=0 & amp ; disablekb=1 & amp ; rel=0 & amp ; autoplay=1 "
36+ : src =" iframeSrc "
837 title =" YouTube video player"
938 frameborder =" 0"
1039 allow ="
You can’t perform that action at this time.
0 commit comments