diff --git a/netlify.toml b/netlify.toml index e7a1593..de5ebc3 100644 --- a/netlify.toml +++ b/netlify.toml @@ -4,3 +4,24 @@ [build.environment] NODE_VERSION = "22" + +# Media in public/ keeps its filename, so cache for 30 days rather than a year. +[[headers]] + for = "/videos/*" + [headers.values] + Cache-Control = "public, max-age=2592000" + +[[headers]] + for = "/images/*" + [headers.values] + Cache-Control = "public, max-age=2592000" + +[[headers]] + for = "/hologram/*" + [headers.values] + Cache-Control = "public, max-age=2592000" + +[[headers]] + for = "/svg/*" + [headers.values] + Cache-Control = "public, max-age=2592000" diff --git a/package.json b/package.json index 502a706..f6aa351 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "clsx": "^2.1.1", "focus-trap-react": "^12.0.3", "graphql": "^16.15.0", + "hls.js": "^1.7.4", "next": "16.4.6", "nodemailer": "^10.5.0", "papaparse": "^5.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5700501..9dc077d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -187,6 +187,9 @@ importers: graphql: specifier: ^16.15.0 version: 16.15.0 + hls.js: + specifier: ^1.7.4 + version: 1.7.4 next: specifier: 16.4.6 version: 16.4.6(@babel/core@7.29.13)(@types/node@26.6.6)(babel-plugin-macros@3.1.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(sass@1.77.4) @@ -2573,6 +2576,9 @@ packages: hermes-parser@0.25.1: resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==} + hls.js@1.7.4: + resolution: {integrity: sha512-3GlxGdPvT2YHvQYOt+yOzT/DEior/qJVNIylHA77kgeoBTdQQqi70GwefNEUmHQeNGyjC8U62+bruqW/Tpm+tg==} + hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -6265,6 +6271,8 @@ snapshots: dependencies: hermes-estree: 0.25.1 + hls.js@1.7.4: {} + hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 diff --git a/public/hologram/hologram_light1.png b/public/hologram/hologram_light1.png deleted file mode 100644 index c7d33c7..0000000 Binary files a/public/hologram/hologram_light1.png and /dev/null differ diff --git a/public/hologram/hologram_light1.webp b/public/hologram/hologram_light1.webp new file mode 100644 index 0000000..d2eb3eb Binary files /dev/null and b/public/hologram/hologram_light1.webp differ diff --git a/public/hologram/hologram_light2.png b/public/hologram/hologram_light2.png deleted file mode 100644 index c02ac2a..0000000 Binary files a/public/hologram/hologram_light2.png and /dev/null differ diff --git a/public/hologram/hologram_light2.webp b/public/hologram/hologram_light2.webp new file mode 100644 index 0000000..9387087 Binary files /dev/null and b/public/hologram/hologram_light2.webp differ diff --git a/public/hologram/hologram_light3.png b/public/hologram/hologram_light3.png deleted file mode 100644 index e6f89ea..0000000 Binary files a/public/hologram/hologram_light3.png and /dev/null differ diff --git a/public/hologram/hologram_light3.webp b/public/hologram/hologram_light3.webp new file mode 100644 index 0000000..cda8998 Binary files /dev/null and b/public/hologram/hologram_light3.webp differ diff --git a/public/hologram/hologram_nolight.png b/public/hologram/hologram_nolight.png deleted file mode 100644 index b6b2fa9..0000000 Binary files a/public/hologram/hologram_nolight.png and /dev/null differ diff --git a/public/hologram/hologram_nolight.webp b/public/hologram/hologram_nolight.webp new file mode 100644 index 0000000..2988850 Binary files /dev/null and b/public/hologram/hologram_nolight.webp differ diff --git a/public/images/home.jpg b/public/images/home.jpg new file mode 100644 index 0000000..d82cfee Binary files /dev/null and b/public/images/home.jpg differ diff --git a/public/images/home.png b/public/images/home.png deleted file mode 100644 index 0e06bc3..0000000 Binary files a/public/images/home.png and /dev/null differ diff --git a/public/videos/hls/1080p/init_2.mp4 b/public/videos/hls/1080p/init_2.mp4 new file mode 100644 index 0000000..99bdebe Binary files /dev/null and b/public/videos/hls/1080p/init_2.mp4 differ diff --git a/public/videos/hls/1080p/playlist.m3u8 b/public/videos/hls/1080p/playlist.m3u8 new file mode 100644 index 0000000..ba03cc3 --- /dev/null +++ b/public/videos/hls/1080p/playlist.m3u8 @@ -0,0 +1,78 @@ +#EXTM3U +#EXT-X-VERSION:7 +#EXT-X-TARGETDURATION:2 +#EXT-X-MEDIA-SEQUENCE:0 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-INDEPENDENT-SEGMENTS +#EXT-X-MAP:URI="init_2.mp4" +#EXTINF:2.000000, +segment-000.m4s +#EXTINF:2.000000, +segment-001.m4s +#EXTINF:2.000000, +segment-002.m4s +#EXTINF:2.000000, +segment-003.m4s +#EXTINF:2.000000, +segment-004.m4s +#EXTINF:2.000000, +segment-005.m4s +#EXTINF:2.000000, +segment-006.m4s +#EXTINF:2.000000, +segment-007.m4s +#EXTINF:2.000000, +segment-008.m4s +#EXTINF:2.000000, +segment-009.m4s +#EXTINF:2.000000, +segment-010.m4s +#EXTINF:2.000000, +segment-011.m4s +#EXTINF:2.000000, +segment-012.m4s +#EXTINF:2.000000, +segment-013.m4s +#EXTINF:2.000000, +segment-014.m4s +#EXTINF:2.000000, +segment-015.m4s +#EXTINF:2.000000, +segment-016.m4s +#EXTINF:2.000000, +segment-017.m4s +#EXTINF:2.000000, +segment-018.m4s +#EXTINF:2.000000, +segment-019.m4s +#EXTINF:2.000000, +segment-020.m4s +#EXTINF:2.000000, +segment-021.m4s +#EXTINF:2.000000, +segment-022.m4s +#EXTINF:2.000000, +segment-023.m4s +#EXTINF:2.000000, +segment-024.m4s +#EXTINF:2.000000, +segment-025.m4s +#EXTINF:2.000000, +segment-026.m4s +#EXTINF:2.000000, +segment-027.m4s +#EXTINF:2.000000, +segment-028.m4s +#EXTINF:2.000000, +segment-029.m4s +#EXTINF:2.000000, +segment-030.m4s +#EXTINF:2.000000, +segment-031.m4s +#EXTINF:2.000000, +segment-032.m4s +#EXTINF:2.000000, +segment-033.m4s +#EXTINF:0.041667, +segment-034.m4s +#EXT-X-ENDLIST diff --git a/public/videos/hls/1080p/segment-000.m4s b/public/videos/hls/1080p/segment-000.m4s new file mode 100644 index 0000000..db16788 Binary files /dev/null and b/public/videos/hls/1080p/segment-000.m4s differ diff --git a/public/videos/hls/1080p/segment-001.m4s b/public/videos/hls/1080p/segment-001.m4s new file mode 100644 index 0000000..49e1baf Binary files /dev/null and b/public/videos/hls/1080p/segment-001.m4s differ diff --git a/public/videos/hls/1080p/segment-002.m4s b/public/videos/hls/1080p/segment-002.m4s new file mode 100644 index 0000000..bd9e3bf Binary files /dev/null and b/public/videos/hls/1080p/segment-002.m4s differ diff --git a/public/videos/hls/1080p/segment-003.m4s b/public/videos/hls/1080p/segment-003.m4s new file mode 100644 index 0000000..c1ca3c8 Binary files /dev/null and b/public/videos/hls/1080p/segment-003.m4s differ diff --git a/public/videos/hls/1080p/segment-004.m4s b/public/videos/hls/1080p/segment-004.m4s new file mode 100644 index 0000000..4374a96 Binary files /dev/null and b/public/videos/hls/1080p/segment-004.m4s differ diff --git a/public/videos/hls/1080p/segment-005.m4s b/public/videos/hls/1080p/segment-005.m4s new file mode 100644 index 0000000..38e58e4 Binary files /dev/null and b/public/videos/hls/1080p/segment-005.m4s differ diff --git a/public/videos/hls/1080p/segment-006.m4s b/public/videos/hls/1080p/segment-006.m4s new file mode 100644 index 0000000..6fcf7a2 Binary files /dev/null and b/public/videos/hls/1080p/segment-006.m4s differ diff --git a/public/videos/hls/1080p/segment-007.m4s b/public/videos/hls/1080p/segment-007.m4s new file mode 100644 index 0000000..a3af187 Binary files /dev/null and b/public/videos/hls/1080p/segment-007.m4s differ diff --git a/public/videos/hls/1080p/segment-008.m4s b/public/videos/hls/1080p/segment-008.m4s new file mode 100644 index 0000000..829d2e6 Binary files /dev/null and b/public/videos/hls/1080p/segment-008.m4s differ diff --git a/public/videos/hls/1080p/segment-009.m4s b/public/videos/hls/1080p/segment-009.m4s new file mode 100644 index 0000000..4ac48cd Binary files /dev/null and b/public/videos/hls/1080p/segment-009.m4s differ diff --git a/public/videos/hls/1080p/segment-010.m4s b/public/videos/hls/1080p/segment-010.m4s new file mode 100644 index 0000000..a336453 Binary files /dev/null and b/public/videos/hls/1080p/segment-010.m4s differ diff --git a/public/videos/hls/1080p/segment-011.m4s b/public/videos/hls/1080p/segment-011.m4s new file mode 100644 index 0000000..77bd26f Binary files /dev/null and b/public/videos/hls/1080p/segment-011.m4s differ diff --git a/public/videos/hls/1080p/segment-012.m4s b/public/videos/hls/1080p/segment-012.m4s new file mode 100644 index 0000000..44aa244 Binary files /dev/null and b/public/videos/hls/1080p/segment-012.m4s differ diff --git a/public/videos/hls/1080p/segment-013.m4s b/public/videos/hls/1080p/segment-013.m4s new file mode 100644 index 0000000..788bfa7 Binary files /dev/null and b/public/videos/hls/1080p/segment-013.m4s differ diff --git a/public/videos/hls/1080p/segment-014.m4s b/public/videos/hls/1080p/segment-014.m4s new file mode 100644 index 0000000..cd5aced Binary files /dev/null and b/public/videos/hls/1080p/segment-014.m4s differ diff --git a/public/videos/hls/1080p/segment-015.m4s b/public/videos/hls/1080p/segment-015.m4s new file mode 100644 index 0000000..bc4b3a7 Binary files /dev/null and b/public/videos/hls/1080p/segment-015.m4s differ diff --git a/public/videos/hls/1080p/segment-016.m4s b/public/videos/hls/1080p/segment-016.m4s new file mode 100644 index 0000000..2ccb80b Binary files /dev/null and b/public/videos/hls/1080p/segment-016.m4s differ diff --git a/public/videos/hls/1080p/segment-017.m4s b/public/videos/hls/1080p/segment-017.m4s new file mode 100644 index 0000000..6cc237f Binary files /dev/null and b/public/videos/hls/1080p/segment-017.m4s differ diff --git a/public/videos/hls/1080p/segment-018.m4s b/public/videos/hls/1080p/segment-018.m4s new file mode 100644 index 0000000..61ec76e Binary files /dev/null and b/public/videos/hls/1080p/segment-018.m4s differ diff --git a/public/videos/hls/1080p/segment-019.m4s b/public/videos/hls/1080p/segment-019.m4s new file mode 100644 index 0000000..38c413c Binary files /dev/null and b/public/videos/hls/1080p/segment-019.m4s differ diff --git a/public/videos/hls/1080p/segment-020.m4s b/public/videos/hls/1080p/segment-020.m4s new file mode 100644 index 0000000..5417386 Binary files /dev/null and b/public/videos/hls/1080p/segment-020.m4s differ diff --git a/public/videos/hls/1080p/segment-021.m4s b/public/videos/hls/1080p/segment-021.m4s new file mode 100644 index 0000000..1728437 Binary files /dev/null and b/public/videos/hls/1080p/segment-021.m4s differ diff --git a/public/videos/hls/1080p/segment-022.m4s b/public/videos/hls/1080p/segment-022.m4s new file mode 100644 index 0000000..8e2d283 Binary files /dev/null and b/public/videos/hls/1080p/segment-022.m4s differ diff --git a/public/videos/hls/1080p/segment-023.m4s b/public/videos/hls/1080p/segment-023.m4s new file mode 100644 index 0000000..9e6aa3c Binary files /dev/null and b/public/videos/hls/1080p/segment-023.m4s differ diff --git a/public/videos/hls/1080p/segment-024.m4s b/public/videos/hls/1080p/segment-024.m4s new file mode 100644 index 0000000..c1a36e5 Binary files /dev/null and b/public/videos/hls/1080p/segment-024.m4s differ diff --git a/public/videos/hls/1080p/segment-025.m4s b/public/videos/hls/1080p/segment-025.m4s new file mode 100644 index 0000000..3158f5c Binary files /dev/null and b/public/videos/hls/1080p/segment-025.m4s differ diff --git a/public/videos/hls/1080p/segment-026.m4s b/public/videos/hls/1080p/segment-026.m4s new file mode 100644 index 0000000..ea96a9a Binary files /dev/null and b/public/videos/hls/1080p/segment-026.m4s differ diff --git a/public/videos/hls/1080p/segment-027.m4s b/public/videos/hls/1080p/segment-027.m4s new file mode 100644 index 0000000..e401046 Binary files /dev/null and b/public/videos/hls/1080p/segment-027.m4s differ diff --git a/public/videos/hls/1080p/segment-028.m4s b/public/videos/hls/1080p/segment-028.m4s new file mode 100644 index 0000000..957829a Binary files /dev/null and b/public/videos/hls/1080p/segment-028.m4s differ diff --git a/public/videos/hls/1080p/segment-029.m4s b/public/videos/hls/1080p/segment-029.m4s new file mode 100644 index 0000000..bc0f143 Binary files /dev/null and b/public/videos/hls/1080p/segment-029.m4s differ diff --git a/public/videos/hls/1080p/segment-030.m4s b/public/videos/hls/1080p/segment-030.m4s new file mode 100644 index 0000000..effa7e7 Binary files /dev/null and b/public/videos/hls/1080p/segment-030.m4s differ diff --git a/public/videos/hls/1080p/segment-031.m4s b/public/videos/hls/1080p/segment-031.m4s new file mode 100644 index 0000000..d75d840 Binary files /dev/null and b/public/videos/hls/1080p/segment-031.m4s differ diff --git a/public/videos/hls/1080p/segment-032.m4s b/public/videos/hls/1080p/segment-032.m4s new file mode 100644 index 0000000..3b3ce1a Binary files /dev/null and b/public/videos/hls/1080p/segment-032.m4s differ diff --git a/public/videos/hls/1080p/segment-033.m4s b/public/videos/hls/1080p/segment-033.m4s new file mode 100644 index 0000000..3b1dd30 Binary files /dev/null and b/public/videos/hls/1080p/segment-033.m4s differ diff --git a/public/videos/hls/1080p/segment-034.m4s b/public/videos/hls/1080p/segment-034.m4s new file mode 100644 index 0000000..d39a064 Binary files /dev/null and b/public/videos/hls/1080p/segment-034.m4s differ diff --git a/public/videos/hls/480p/init_0.mp4 b/public/videos/hls/480p/init_0.mp4 new file mode 100644 index 0000000..50e692e Binary files /dev/null and b/public/videos/hls/480p/init_0.mp4 differ diff --git a/public/videos/hls/480p/playlist.m3u8 b/public/videos/hls/480p/playlist.m3u8 new file mode 100644 index 0000000..0bc062b --- /dev/null +++ b/public/videos/hls/480p/playlist.m3u8 @@ -0,0 +1,78 @@ +#EXTM3U +#EXT-X-VERSION:7 +#EXT-X-TARGETDURATION:2 +#EXT-X-MEDIA-SEQUENCE:0 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-INDEPENDENT-SEGMENTS +#EXT-X-MAP:URI="init_0.mp4" +#EXTINF:2.000000, +segment-000.m4s +#EXTINF:2.000000, +segment-001.m4s +#EXTINF:2.000000, +segment-002.m4s +#EXTINF:2.000000, +segment-003.m4s +#EXTINF:2.000000, +segment-004.m4s +#EXTINF:2.000000, +segment-005.m4s +#EXTINF:2.000000, +segment-006.m4s +#EXTINF:2.000000, +segment-007.m4s +#EXTINF:2.000000, +segment-008.m4s +#EXTINF:2.000000, +segment-009.m4s +#EXTINF:2.000000, +segment-010.m4s +#EXTINF:2.000000, +segment-011.m4s +#EXTINF:2.000000, +segment-012.m4s +#EXTINF:2.000000, +segment-013.m4s +#EXTINF:2.000000, +segment-014.m4s +#EXTINF:2.000000, +segment-015.m4s +#EXTINF:2.000000, +segment-016.m4s +#EXTINF:2.000000, +segment-017.m4s +#EXTINF:2.000000, +segment-018.m4s +#EXTINF:2.000000, +segment-019.m4s +#EXTINF:2.000000, +segment-020.m4s +#EXTINF:2.000000, +segment-021.m4s +#EXTINF:2.000000, +segment-022.m4s +#EXTINF:2.000000, +segment-023.m4s +#EXTINF:2.000000, +segment-024.m4s +#EXTINF:2.000000, +segment-025.m4s +#EXTINF:2.000000, +segment-026.m4s +#EXTINF:2.000000, +segment-027.m4s +#EXTINF:2.000000, +segment-028.m4s +#EXTINF:2.000000, +segment-029.m4s +#EXTINF:2.000000, +segment-030.m4s +#EXTINF:2.000000, +segment-031.m4s +#EXTINF:2.000000, +segment-032.m4s +#EXTINF:2.000000, +segment-033.m4s +#EXTINF:0.041667, +segment-034.m4s +#EXT-X-ENDLIST diff --git a/public/videos/hls/480p/segment-000.m4s b/public/videos/hls/480p/segment-000.m4s new file mode 100644 index 0000000..3734887 Binary files /dev/null and b/public/videos/hls/480p/segment-000.m4s differ diff --git a/public/videos/hls/480p/segment-001.m4s b/public/videos/hls/480p/segment-001.m4s new file mode 100644 index 0000000..5cbab3c Binary files /dev/null and b/public/videos/hls/480p/segment-001.m4s differ diff --git a/public/videos/hls/480p/segment-002.m4s b/public/videos/hls/480p/segment-002.m4s new file mode 100644 index 0000000..f4c3f29 Binary files /dev/null and b/public/videos/hls/480p/segment-002.m4s differ diff --git a/public/videos/hls/480p/segment-003.m4s b/public/videos/hls/480p/segment-003.m4s new file mode 100644 index 0000000..b3b5d83 Binary files /dev/null and b/public/videos/hls/480p/segment-003.m4s differ diff --git a/public/videos/hls/480p/segment-004.m4s b/public/videos/hls/480p/segment-004.m4s new file mode 100644 index 0000000..b00ad87 Binary files /dev/null and b/public/videos/hls/480p/segment-004.m4s differ diff --git a/public/videos/hls/480p/segment-005.m4s b/public/videos/hls/480p/segment-005.m4s new file mode 100644 index 0000000..a199a32 Binary files /dev/null and b/public/videos/hls/480p/segment-005.m4s differ diff --git a/public/videos/hls/480p/segment-006.m4s b/public/videos/hls/480p/segment-006.m4s new file mode 100644 index 0000000..ef0769a Binary files /dev/null and b/public/videos/hls/480p/segment-006.m4s differ diff --git a/public/videos/hls/480p/segment-007.m4s b/public/videos/hls/480p/segment-007.m4s new file mode 100644 index 0000000..591c681 Binary files /dev/null and b/public/videos/hls/480p/segment-007.m4s differ diff --git a/public/videos/hls/480p/segment-008.m4s b/public/videos/hls/480p/segment-008.m4s new file mode 100644 index 0000000..c9fe8b8 Binary files /dev/null and b/public/videos/hls/480p/segment-008.m4s differ diff --git a/public/videos/hls/480p/segment-009.m4s b/public/videos/hls/480p/segment-009.m4s new file mode 100644 index 0000000..c3d5599 Binary files /dev/null and b/public/videos/hls/480p/segment-009.m4s differ diff --git a/public/videos/hls/480p/segment-010.m4s b/public/videos/hls/480p/segment-010.m4s new file mode 100644 index 0000000..91e3581 Binary files /dev/null and b/public/videos/hls/480p/segment-010.m4s differ diff --git a/public/videos/hls/480p/segment-011.m4s b/public/videos/hls/480p/segment-011.m4s new file mode 100644 index 0000000..a733d0b Binary files /dev/null and b/public/videos/hls/480p/segment-011.m4s differ diff --git a/public/videos/hls/480p/segment-012.m4s b/public/videos/hls/480p/segment-012.m4s new file mode 100644 index 0000000..52cd793 Binary files /dev/null and b/public/videos/hls/480p/segment-012.m4s differ diff --git a/public/videos/hls/480p/segment-013.m4s b/public/videos/hls/480p/segment-013.m4s new file mode 100644 index 0000000..2288f8c Binary files /dev/null and b/public/videos/hls/480p/segment-013.m4s differ diff --git a/public/videos/hls/480p/segment-014.m4s b/public/videos/hls/480p/segment-014.m4s new file mode 100644 index 0000000..a337ffc Binary files /dev/null and b/public/videos/hls/480p/segment-014.m4s differ diff --git a/public/videos/hls/480p/segment-015.m4s b/public/videos/hls/480p/segment-015.m4s new file mode 100644 index 0000000..7aac364 Binary files /dev/null and b/public/videos/hls/480p/segment-015.m4s differ diff --git a/public/videos/hls/480p/segment-016.m4s b/public/videos/hls/480p/segment-016.m4s new file mode 100644 index 0000000..8860ded Binary files /dev/null and b/public/videos/hls/480p/segment-016.m4s differ diff --git a/public/videos/hls/480p/segment-017.m4s b/public/videos/hls/480p/segment-017.m4s new file mode 100644 index 0000000..76a251a Binary files /dev/null and b/public/videos/hls/480p/segment-017.m4s differ diff --git a/public/videos/hls/480p/segment-018.m4s b/public/videos/hls/480p/segment-018.m4s new file mode 100644 index 0000000..d671c27 Binary files /dev/null and b/public/videos/hls/480p/segment-018.m4s differ diff --git a/public/videos/hls/480p/segment-019.m4s b/public/videos/hls/480p/segment-019.m4s new file mode 100644 index 0000000..759daa2 Binary files /dev/null and b/public/videos/hls/480p/segment-019.m4s differ diff --git a/public/videos/hls/480p/segment-020.m4s b/public/videos/hls/480p/segment-020.m4s new file mode 100644 index 0000000..b43f57a Binary files /dev/null and b/public/videos/hls/480p/segment-020.m4s differ diff --git a/public/videos/hls/480p/segment-021.m4s b/public/videos/hls/480p/segment-021.m4s new file mode 100644 index 0000000..b486028 Binary files /dev/null and b/public/videos/hls/480p/segment-021.m4s differ diff --git a/public/videos/hls/480p/segment-022.m4s b/public/videos/hls/480p/segment-022.m4s new file mode 100644 index 0000000..7d4bfbd Binary files /dev/null and b/public/videos/hls/480p/segment-022.m4s differ diff --git a/public/videos/hls/480p/segment-023.m4s b/public/videos/hls/480p/segment-023.m4s new file mode 100644 index 0000000..c4864f1 Binary files /dev/null and b/public/videos/hls/480p/segment-023.m4s differ diff --git a/public/videos/hls/480p/segment-024.m4s b/public/videos/hls/480p/segment-024.m4s new file mode 100644 index 0000000..f5b1a68 Binary files /dev/null and b/public/videos/hls/480p/segment-024.m4s differ diff --git a/public/videos/hls/480p/segment-025.m4s b/public/videos/hls/480p/segment-025.m4s new file mode 100644 index 0000000..816760f Binary files /dev/null and b/public/videos/hls/480p/segment-025.m4s differ diff --git a/public/videos/hls/480p/segment-026.m4s b/public/videos/hls/480p/segment-026.m4s new file mode 100644 index 0000000..df9afc8 Binary files /dev/null and b/public/videos/hls/480p/segment-026.m4s differ diff --git a/public/videos/hls/480p/segment-027.m4s b/public/videos/hls/480p/segment-027.m4s new file mode 100644 index 0000000..b907a71 Binary files /dev/null and b/public/videos/hls/480p/segment-027.m4s differ diff --git a/public/videos/hls/480p/segment-028.m4s b/public/videos/hls/480p/segment-028.m4s new file mode 100644 index 0000000..094318b Binary files /dev/null and b/public/videos/hls/480p/segment-028.m4s differ diff --git a/public/videos/hls/480p/segment-029.m4s b/public/videos/hls/480p/segment-029.m4s new file mode 100644 index 0000000..5e43177 Binary files /dev/null and b/public/videos/hls/480p/segment-029.m4s differ diff --git a/public/videos/hls/480p/segment-030.m4s b/public/videos/hls/480p/segment-030.m4s new file mode 100644 index 0000000..83a7fa8 Binary files /dev/null and b/public/videos/hls/480p/segment-030.m4s differ diff --git a/public/videos/hls/480p/segment-031.m4s b/public/videos/hls/480p/segment-031.m4s new file mode 100644 index 0000000..b4d890f Binary files /dev/null and b/public/videos/hls/480p/segment-031.m4s differ diff --git a/public/videos/hls/480p/segment-032.m4s b/public/videos/hls/480p/segment-032.m4s new file mode 100644 index 0000000..010d7bf Binary files /dev/null and b/public/videos/hls/480p/segment-032.m4s differ diff --git a/public/videos/hls/480p/segment-033.m4s b/public/videos/hls/480p/segment-033.m4s new file mode 100644 index 0000000..ebcc1cf Binary files /dev/null and b/public/videos/hls/480p/segment-033.m4s differ diff --git a/public/videos/hls/480p/segment-034.m4s b/public/videos/hls/480p/segment-034.m4s new file mode 100644 index 0000000..76b39ae Binary files /dev/null and b/public/videos/hls/480p/segment-034.m4s differ diff --git a/public/videos/hls/720p/init_1.mp4 b/public/videos/hls/720p/init_1.mp4 new file mode 100644 index 0000000..8c4e8d9 Binary files /dev/null and b/public/videos/hls/720p/init_1.mp4 differ diff --git a/public/videos/hls/720p/playlist.m3u8 b/public/videos/hls/720p/playlist.m3u8 new file mode 100644 index 0000000..3241d2a --- /dev/null +++ b/public/videos/hls/720p/playlist.m3u8 @@ -0,0 +1,78 @@ +#EXTM3U +#EXT-X-VERSION:7 +#EXT-X-TARGETDURATION:2 +#EXT-X-MEDIA-SEQUENCE:0 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-INDEPENDENT-SEGMENTS +#EXT-X-MAP:URI="init_1.mp4" +#EXTINF:2.000000, +segment-000.m4s +#EXTINF:2.000000, +segment-001.m4s +#EXTINF:2.000000, +segment-002.m4s +#EXTINF:2.000000, +segment-003.m4s +#EXTINF:2.000000, +segment-004.m4s +#EXTINF:2.000000, +segment-005.m4s +#EXTINF:2.000000, +segment-006.m4s +#EXTINF:2.000000, +segment-007.m4s +#EXTINF:2.000000, +segment-008.m4s +#EXTINF:2.000000, +segment-009.m4s +#EXTINF:2.000000, +segment-010.m4s +#EXTINF:2.000000, +segment-011.m4s +#EXTINF:2.000000, +segment-012.m4s +#EXTINF:2.000000, +segment-013.m4s +#EXTINF:2.000000, +segment-014.m4s +#EXTINF:2.000000, +segment-015.m4s +#EXTINF:2.000000, +segment-016.m4s +#EXTINF:2.000000, +segment-017.m4s +#EXTINF:2.000000, +segment-018.m4s +#EXTINF:2.000000, +segment-019.m4s +#EXTINF:2.000000, +segment-020.m4s +#EXTINF:2.000000, +segment-021.m4s +#EXTINF:2.000000, +segment-022.m4s +#EXTINF:2.000000, +segment-023.m4s +#EXTINF:2.000000, +segment-024.m4s +#EXTINF:2.000000, +segment-025.m4s +#EXTINF:2.000000, +segment-026.m4s +#EXTINF:2.000000, +segment-027.m4s +#EXTINF:2.000000, +segment-028.m4s +#EXTINF:2.000000, +segment-029.m4s +#EXTINF:2.000000, +segment-030.m4s +#EXTINF:2.000000, +segment-031.m4s +#EXTINF:2.000000, +segment-032.m4s +#EXTINF:2.000000, +segment-033.m4s +#EXTINF:0.041667, +segment-034.m4s +#EXT-X-ENDLIST diff --git a/public/videos/hls/720p/segment-000.m4s b/public/videos/hls/720p/segment-000.m4s new file mode 100644 index 0000000..cf6442b Binary files /dev/null and b/public/videos/hls/720p/segment-000.m4s differ diff --git a/public/videos/hls/720p/segment-001.m4s b/public/videos/hls/720p/segment-001.m4s new file mode 100644 index 0000000..83673e4 Binary files /dev/null and b/public/videos/hls/720p/segment-001.m4s differ diff --git a/public/videos/hls/720p/segment-002.m4s b/public/videos/hls/720p/segment-002.m4s new file mode 100644 index 0000000..8385757 Binary files /dev/null and b/public/videos/hls/720p/segment-002.m4s differ diff --git a/public/videos/hls/720p/segment-003.m4s b/public/videos/hls/720p/segment-003.m4s new file mode 100644 index 0000000..65de39e Binary files /dev/null and b/public/videos/hls/720p/segment-003.m4s differ diff --git a/public/videos/hls/720p/segment-004.m4s b/public/videos/hls/720p/segment-004.m4s new file mode 100644 index 0000000..1c03136 Binary files /dev/null and b/public/videos/hls/720p/segment-004.m4s differ diff --git a/public/videos/hls/720p/segment-005.m4s b/public/videos/hls/720p/segment-005.m4s new file mode 100644 index 0000000..3d07e91 Binary files /dev/null and b/public/videos/hls/720p/segment-005.m4s differ diff --git a/public/videos/hls/720p/segment-006.m4s b/public/videos/hls/720p/segment-006.m4s new file mode 100644 index 0000000..67dbc05 Binary files /dev/null and b/public/videos/hls/720p/segment-006.m4s differ diff --git a/public/videos/hls/720p/segment-007.m4s b/public/videos/hls/720p/segment-007.m4s new file mode 100644 index 0000000..8ae5b99 Binary files /dev/null and b/public/videos/hls/720p/segment-007.m4s differ diff --git a/public/videos/hls/720p/segment-008.m4s b/public/videos/hls/720p/segment-008.m4s new file mode 100644 index 0000000..6014d9b Binary files /dev/null and b/public/videos/hls/720p/segment-008.m4s differ diff --git a/public/videos/hls/720p/segment-009.m4s b/public/videos/hls/720p/segment-009.m4s new file mode 100644 index 0000000..f5a0c04 Binary files /dev/null and b/public/videos/hls/720p/segment-009.m4s differ diff --git a/public/videos/hls/720p/segment-010.m4s b/public/videos/hls/720p/segment-010.m4s new file mode 100644 index 0000000..66ed342 Binary files /dev/null and b/public/videos/hls/720p/segment-010.m4s differ diff --git a/public/videos/hls/720p/segment-011.m4s b/public/videos/hls/720p/segment-011.m4s new file mode 100644 index 0000000..1d5979f Binary files /dev/null and b/public/videos/hls/720p/segment-011.m4s differ diff --git a/public/videos/hls/720p/segment-012.m4s b/public/videos/hls/720p/segment-012.m4s new file mode 100644 index 0000000..92dfcaa Binary files /dev/null and b/public/videos/hls/720p/segment-012.m4s differ diff --git a/public/videos/hls/720p/segment-013.m4s b/public/videos/hls/720p/segment-013.m4s new file mode 100644 index 0000000..7d5d28a Binary files /dev/null and b/public/videos/hls/720p/segment-013.m4s differ diff --git a/public/videos/hls/720p/segment-014.m4s b/public/videos/hls/720p/segment-014.m4s new file mode 100644 index 0000000..6984036 Binary files /dev/null and b/public/videos/hls/720p/segment-014.m4s differ diff --git a/public/videos/hls/720p/segment-015.m4s b/public/videos/hls/720p/segment-015.m4s new file mode 100644 index 0000000..26ba3ef Binary files /dev/null and b/public/videos/hls/720p/segment-015.m4s differ diff --git a/public/videos/hls/720p/segment-016.m4s b/public/videos/hls/720p/segment-016.m4s new file mode 100644 index 0000000..5a1c882 Binary files /dev/null and b/public/videos/hls/720p/segment-016.m4s differ diff --git a/public/videos/hls/720p/segment-017.m4s b/public/videos/hls/720p/segment-017.m4s new file mode 100644 index 0000000..e5932e4 Binary files /dev/null and b/public/videos/hls/720p/segment-017.m4s differ diff --git a/public/videos/hls/720p/segment-018.m4s b/public/videos/hls/720p/segment-018.m4s new file mode 100644 index 0000000..595274f Binary files /dev/null and b/public/videos/hls/720p/segment-018.m4s differ diff --git a/public/videos/hls/720p/segment-019.m4s b/public/videos/hls/720p/segment-019.m4s new file mode 100644 index 0000000..3f43a39 Binary files /dev/null and b/public/videos/hls/720p/segment-019.m4s differ diff --git a/public/videos/hls/720p/segment-020.m4s b/public/videos/hls/720p/segment-020.m4s new file mode 100644 index 0000000..d9015d9 Binary files /dev/null and b/public/videos/hls/720p/segment-020.m4s differ diff --git a/public/videos/hls/720p/segment-021.m4s b/public/videos/hls/720p/segment-021.m4s new file mode 100644 index 0000000..11997aa Binary files /dev/null and b/public/videos/hls/720p/segment-021.m4s differ diff --git a/public/videos/hls/720p/segment-022.m4s b/public/videos/hls/720p/segment-022.m4s new file mode 100644 index 0000000..5dc4c10 Binary files /dev/null and b/public/videos/hls/720p/segment-022.m4s differ diff --git a/public/videos/hls/720p/segment-023.m4s b/public/videos/hls/720p/segment-023.m4s new file mode 100644 index 0000000..5563654 Binary files /dev/null and b/public/videos/hls/720p/segment-023.m4s differ diff --git a/public/videos/hls/720p/segment-024.m4s b/public/videos/hls/720p/segment-024.m4s new file mode 100644 index 0000000..14e9823 Binary files /dev/null and b/public/videos/hls/720p/segment-024.m4s differ diff --git a/public/videos/hls/720p/segment-025.m4s b/public/videos/hls/720p/segment-025.m4s new file mode 100644 index 0000000..ca9d870 Binary files /dev/null and b/public/videos/hls/720p/segment-025.m4s differ diff --git a/public/videos/hls/720p/segment-026.m4s b/public/videos/hls/720p/segment-026.m4s new file mode 100644 index 0000000..66ed92f Binary files /dev/null and b/public/videos/hls/720p/segment-026.m4s differ diff --git a/public/videos/hls/720p/segment-027.m4s b/public/videos/hls/720p/segment-027.m4s new file mode 100644 index 0000000..dfd1c00 Binary files /dev/null and b/public/videos/hls/720p/segment-027.m4s differ diff --git a/public/videos/hls/720p/segment-028.m4s b/public/videos/hls/720p/segment-028.m4s new file mode 100644 index 0000000..4a1aca4 Binary files /dev/null and b/public/videos/hls/720p/segment-028.m4s differ diff --git a/public/videos/hls/720p/segment-029.m4s b/public/videos/hls/720p/segment-029.m4s new file mode 100644 index 0000000..1472380 Binary files /dev/null and b/public/videos/hls/720p/segment-029.m4s differ diff --git a/public/videos/hls/720p/segment-030.m4s b/public/videos/hls/720p/segment-030.m4s new file mode 100644 index 0000000..9b765c3 Binary files /dev/null and b/public/videos/hls/720p/segment-030.m4s differ diff --git a/public/videos/hls/720p/segment-031.m4s b/public/videos/hls/720p/segment-031.m4s new file mode 100644 index 0000000..5d5823a Binary files /dev/null and b/public/videos/hls/720p/segment-031.m4s differ diff --git a/public/videos/hls/720p/segment-032.m4s b/public/videos/hls/720p/segment-032.m4s new file mode 100644 index 0000000..00fc22a Binary files /dev/null and b/public/videos/hls/720p/segment-032.m4s differ diff --git a/public/videos/hls/720p/segment-033.m4s b/public/videos/hls/720p/segment-033.m4s new file mode 100644 index 0000000..a02bddc Binary files /dev/null and b/public/videos/hls/720p/segment-033.m4s differ diff --git a/public/videos/hls/720p/segment-034.m4s b/public/videos/hls/720p/segment-034.m4s new file mode 100644 index 0000000..6fd82b0 Binary files /dev/null and b/public/videos/hls/720p/segment-034.m4s differ diff --git a/public/videos/hls/master.m3u8 b/public/videos/hls/master.m3u8 new file mode 100644 index 0000000..95ad6b6 --- /dev/null +++ b/public/videos/hls/master.m3u8 @@ -0,0 +1,11 @@ +#EXTM3U +#EXT-X-VERSION:7 +#EXT-X-STREAM-INF:BANDWIDTH=1334156,AVERAGE-BANDWIDTH=898270,RESOLUTION=1126x480,CODECS="avc1.64001f,mp4a.40.2" +480p/playlist.m3u8 + +#EXT-X-STREAM-INF:BANDWIDTH=2561824,AVERAGE-BANDWIDTH=1704243,RESOLUTION=1690x720,CODECS="avc1.640028,mp4a.40.2" +720p/playlist.m3u8 + +#EXT-X-STREAM-INF:BANDWIDTH=4022864,AVERAGE-BANDWIDTH=2787603,RESOLUTION=1920x818,CODECS="avc1.640028,mp4a.40.2" +1080p/playlist.m3u8 + diff --git a/scripts/encode-teaser-hls.sh b/scripts/encode-teaser-hls.sh new file mode 100755 index 0000000..aba625f --- /dev/null +++ b/scripts/encode-teaser-hls.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Encodes the teaser master into an HLS ladder (480p, 720p, 1080p) in public/videos/hls. +# The 34 MB master is no longer in the tree: #45 (b7ba479) replaced public/videos/teaser.mp4 +# with the H.264 fallback, so the master is read from the commit before it to avoid a second +# generation of compression. +set -euo pipefail + +cd "$(dirname "$0")/.." +src=$(mktemp) +trap 'rm -f "$src"' EXIT +git show b7ba479^:public/videos/teaser.mp4 >"$src" +out=public/videos/hls + +rm -rf "$out" +mkdir -p "$out" + +# 24 fps with a keyframe every 2 s, so every rung switches on segment boundaries. +ffmpeg -hide_banner -y -i "$src" \ + -filter_complex "[0:v]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,split=3[v1][v2][v3];[v1]scale=-2:480[o1];[v2]scale=-2:720[o2];[v3]copy[o3]" \ + -map "[o1]" -map 0:a -map "[o2]" -map 0:a -map "[o3]" -map 0:a \ + -c:v libx264 -preset slow -profile:v high -pix_fmt yuv420p \ + -r 24 -g 48 -keyint_min 48 -sc_threshold 0 \ + -b:v:0 900k -maxrate:v:0 1000k -bufsize:v:0 2000k \ + -b:v:1 1800k -maxrate:v:1 2000k -bufsize:v:1 4000k \ + -b:v:2 3000k -maxrate:v:2 3300k -bufsize:v:2 6600k \ + -c:a aac -b:a 96k -ac 2 \ + -f hls -hls_time 2 -hls_playlist_type vod \ + -hls_segment_type fmp4 -hls_flags independent_segments \ + -hls_fmp4_init_filename init.mp4 \ + -hls_segment_filename "$out/%v/segment-%03d.m4s" \ + -master_pl_name master.m3u8 \ + -var_stream_map "v:0,a:0,name:480p v:1,a:1,name:720p v:2,a:2,name:1080p" \ + "$out/%v/playlist.m3u8" diff --git a/src/app/(frontend)/_components/HomeClient.tsx b/src/app/(frontend)/_components/HomeClient.tsx index 269f4c0..c43e85c 100644 --- a/src/app/(frontend)/_components/HomeClient.tsx +++ b/src/app/(frontend)/_components/HomeClient.tsx @@ -3,10 +3,16 @@ import { useRef, useState, useEffect } from "react"; import { useLanguage } from "@/context/LanguageContext"; import { FaVolumeMute, FaVolumeUp, FaPause, FaPlay } from "react-icons/fa"; -import SpinningLogo from "./SpinningLogo"; +import dynamic from "next/dynamic"; import Image from "next/image"; import StaticLogo from "./StaticLogo"; +import useHlsVideo, { HLS_SRC, HLS_TYPE } from "./useHlsVideo"; import useIsMounted from "@/utils/useIsMounted"; +import useMediaQuery from "@/utils/useMediaQuery"; +import usePrefersReducedMotion from "@/utils/usePrefersReducedMotion"; + +const LOGO_DELAY_MS = 6000; +const SpinningLogo = dynamic(() => import("./SpinningLogo"), { ssr: false }); export default function HomeClient() { const videoRef = useRef(null); @@ -14,6 +20,16 @@ export default function HomeClient() { const [play, setPlay] = useState(true); const isLoaded = useIsMounted(); const { isFrench } = useLanguage(); + const playback = useHlsVideo(videoRef, isLoaded); + const prefersReducedMotion = usePrefersReducedMotion(); + const isDesktop = useMediaQuery("(min-width: 48rem)"); + const [logoReady, setLogoReady] = useState(false); + + // The logo waits for the video so its code and textures don't compete for bandwidth. + useEffect(() => { + const timer = window.setTimeout(() => setLogoReady(true), LOGO_DELAY_MS); + return () => window.clearTimeout(timer); + }, []); useEffect(() => { document.title = `${isFrench ? "Accueil" : "Home"} | Clark's Bowling Club`; @@ -59,7 +75,9 @@ export default function HomeClient() { {/* Background video */}
Band performing on stage - + {logoReady && isDesktop && !prefersReducedMotion && }
diff --git a/src/app/(frontend)/_components/SpinningLogo.tsx b/src/app/(frontend)/_components/SpinningLogo.tsx index 9626321..8ed8777 100644 --- a/src/app/(frontend)/_components/SpinningLogo.tsx +++ b/src/app/(frontend)/_components/SpinningLogo.tsx @@ -12,14 +12,15 @@ export default function SpinningLogo() { let height = window.innerHeight - headerHeight - footerHeight; let width = window.innerWidth; - window.addEventListener("resize", () => { + const handleResize = () => { width = window.innerWidth; height = window.innerHeight - headerHeight - footerHeight; camera.aspect = width / height; camera.updateProjectionMatrix(); renderer.setSize(width, height); renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); - }); + }; + window.addEventListener("resize", handleResize); const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000); camera.position.set(0, 0, 5); @@ -50,11 +51,12 @@ export default function SpinningLogo() { x: 0, y: 0, }; - window.addEventListener("mousemove", (event) => { + const handleMouseMove = (event: MouseEvent) => { const { clientX, clientY } = event; cursor.x = -(clientX / width - 0.5); cursor.y = clientY / height - 0.5; - }); + }; + window.addEventListener("mousemove", handleMouseMove); const ambientLight = new THREE.AmbientLight(0xfebc12, 0.5); scene.add(ambientLight); @@ -121,11 +123,11 @@ export default function SpinningLogo() { scene.add(tube); const textureLoader = new THREE.TextureLoader(); - const baseTexture = textureLoader.load("/hologram/hologram_nolight.png"); + const baseTexture = textureLoader.load("/hologram/hologram_nolight.webp"); const lightTextures = [ - textureLoader.load("/hologram/hologram_light1.png"), - textureLoader.load("/hologram/hologram_light2.png"), - textureLoader.load("/hologram/hologram_light3.png"), + textureLoader.load("/hologram/hologram_light1.webp"), + textureLoader.load("/hologram/hologram_light2.webp"), + textureLoader.load("/hologram/hologram_light3.webp"), ]; const planeGeometry = new THREE.PlaneGeometry(radius * 2.5, radius * 1.5); @@ -154,16 +156,16 @@ export default function SpinningLogo() { scene.add(mesh); }); + let flickerTimeout: number | undefined; function flickerLights() { logoMaterials.slice(1).forEach((material) => { material.opacity = Math.random() > 0.5 ? 1 : 0; }); - setTimeout(flickerLights, Math.random() * 500); + flickerTimeout = window.setTimeout(flickerLights, Math.random() * 500); } - flickerLights(); - + let frame = 0; const animate = function () { camera.position.x = cursor.x * 2; camera.position.y = cursor.y * 2; @@ -171,10 +173,30 @@ export default function SpinningLogo() { tubeMaterial.opacity = 0.5 + Math.random() * 0.25; renderer.render(scene, camera); - requestAnimationFrame(animate); + frame = requestAnimationFrame(animate); }; - animate(); + const start = () => { + flickerLights(); + animate(); + }; + const stop = () => { + cancelAnimationFrame(frame); + clearTimeout(flickerTimeout); + }; + const handleVisibility = () => (document.hidden ? stop() : start()); + document.addEventListener("visibilitychange", handleVisibility); + handleVisibility(); + + return () => { + stop(); + document.removeEventListener("visibilitychange", handleVisibility); + window.removeEventListener("resize", handleResize); + window.removeEventListener("resize", setRendererSize); + window.removeEventListener("mousemove", handleMouseMove); + renderer.domElement.remove(); + renderer.dispose(); + }; }, []); return ( diff --git a/src/app/(frontend)/_components/StaticLogo.tsx b/src/app/(frontend)/_components/StaticLogo.tsx index 2326d4f..e1fc4ed 100644 --- a/src/app/(frontend)/_components/StaticLogo.tsx +++ b/src/app/(frontend)/_components/StaticLogo.tsx @@ -2,10 +2,10 @@ import Image from "next/image"; export default function StaticLogo() { const imgUrls = [ - "/hologram/hologram_light1.png", - "/hologram/hologram_light2.png", - "/hologram/hologram_light3.png", - "/hologram/hologram_nolight.png", + "/hologram/hologram_light1.webp", + "/hologram/hologram_light2.webp", + "/hologram/hologram_light3.webp", + "/hologram/hologram_nolight.webp", ]; return ( diff --git a/src/app/(frontend)/_components/useHlsVideo.ts b/src/app/(frontend)/_components/useHlsVideo.ts new file mode 100644 index 0000000..1a9d494 --- /dev/null +++ b/src/app/(frontend)/_components/useHlsVideo.ts @@ -0,0 +1,56 @@ +import { RefObject, useEffect, useMemo, useState } from "react"; + +export const HLS_SRC = "/videos/hls/master.m3u8"; +export const HLS_TYPE = "application/vnd.apple.mpegurl"; + +export type Playback = "native" | "hlsjs" | "file"; + +function detectPlayback(): Playback { + if (document.createElement("video").canPlayType(HLS_TYPE)) return "native"; + return "MediaSource" in window ? "hlsjs" : "file"; +} + +/** + * Picks how the video plays: native HLS (Safari, iOS), hls.js (loaded only + * when native HLS is missing) or the plain MP4 files if HLS is unavailable. + * Call with `enabled` once the video element can be rendered on the client. + */ +export default function useHlsVideo( + videoRef: RefObject, + enabled: boolean +): Playback { + const [failed, setFailed] = useState(false); + const playback = useMemo( + () => (enabled && !failed ? detectPlayback() : "file"), + [enabled, failed] + ); + + useEffect(() => { + if (playback !== "hlsjs") return; + let cancelled = false; + let destroy: (() => void) | undefined; + + import("hls.js").then(({ default: Hls }) => { + const video = videoRef.current; + if (cancelled || !video) return; + if (!Hls.isSupported()) { + setFailed(true); + return; + } + const hls = new Hls({ enableWorker: false }); + hls.on(Hls.Events.ERROR, (_event, data) => { + if (data.fatal) setFailed(true); + }); + hls.loadSource(HLS_SRC); + hls.attachMedia(video); + destroy = () => hls.destroy(); + }); + + return () => { + cancelled = true; + destroy?.(); + }; + }, [playback, videoRef]); + + return playback; +} diff --git a/src/app/(frontend)/layout.tsx b/src/app/(frontend)/layout.tsx index fba5c41..9d22d00 100644 --- a/src/app/(frontend)/layout.tsx +++ b/src/app/(frontend)/layout.tsx @@ -16,7 +16,7 @@ const damion = Damion({ }); const jost = Jost({ - weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"], + weight: ["400", "500", "600", "700"], subsets: ["latin"], variable: "--next-font-jost", display: "swap", diff --git a/src/app/(frontend)/music/_components/Bandcamp.tsx b/src/app/(frontend)/music/_components/Bandcamp.tsx index cdbe7cb..6b9f972 100644 --- a/src/app/(frontend)/music/_components/Bandcamp.tsx +++ b/src/app/(frontend)/music/_components/Bandcamp.tsx @@ -9,6 +9,7 @@ export default function Bandcamp({ src, href, title }: IFrameProps) {