The swiss army knife of lossless video/audio editing
Website: replace the YouTube embed with a scene change detection demo video (once it's uploaded), in the hero's window frame
Claude5861e6794fd2
diff --git a/website/src/components/Home.tsx b/website/src/components/Home.tsxindex aae87ad3..74fa2db0 100644--- a/website/src/components/Home.tsx+++ b/website/src/components/Home.tsx@@ -11,7 +11,8 @@ import msStoreBadge from '../../../ms-store-badge.svg?url';import snapStoreBadge from '../../../snap-store-black.svg?url';import logo from '../../../src/renderer/src/icon.svg?url';-import { background1, background2, generationLossOriginal, generationLossReencoded, heroVideo, tracksScreenshot } from '../images.ts';+import type { Video } from '../images.ts';+import { background1, background2, generationLossOriginal, generationLossReencoded, heroVideo, sceneChangesVideo, tracksScreenshot } from '../images.ts';import { authorUrl, donateUrl, githubUrl, socialLinks, storeUrls, supportEmail } from '../links.ts';import socialIconPaths from './socialIcons.ts';@@ -105,6 +106,32 @@ function Collapsible({ label, collapsedHeight, children }: { label: string, coll);}+// A silent, looping screen recording (see images.ts) in a plain window frame, not macOS-like, since the app also runs on Windows+// and Linux. The script in index.astro shows its pause button (a looping video must be pausable, WCAG 2.2.2), and plays it+// while it's on screen. With prefers-reduced-motion, only its poster is shown (home.css).+function FramedVideo({ video, label, posterAlt, priority }: { video: Video, label: string, posterAlt: string, priority?: boolean }) {+ return (+ <div className="framed-video">+ <div className="framed-video-title">+ <span className="framed-video-dots" aria-hidden="true"><i /><i /><i /></span>+ LosslessCut+ <button type="button" className="framed-video-pause" aria-label="Pause the video" hidden>+ <Pause className="pause" aria-hidden size={14} />+ <Play className="play" aria-hidden size={14} />+ </button>+ </div>+ {/* priority (the hero): starts playing right away, otherwise only when scrolled to */}+ <video poster={video.poster} autoPlay={priority} muted loop playsInline preload={priority ? 'metadata' : 'none'} width={1024} height={640} aria-label={label}>+ {/* with reduced motion, neither matches, so nothing is downloaded. Browsers that ignore media (before Chrome/Firefox+ 120) take the first one, and the script removes them with reduced motion */}+ <source src={video.src} type="video/mp4" media="(min-width: 701px) and (prefers-reduced-motion: no-preference)" />+ <source src={video.smallSrc} type="video/mp4" media="(prefers-reduced-motion: no-preference)" />+ </video>+ <img className="framed-video-poster" src={video.poster} alt={posterAlt} width={1024} height={640} {...(priority ? { fetchPriority: 'high' } : { loading: 'lazy' })} />+ </div>+ );+}+function FooterLink({ href, children }: { href: string, children: ReactNode }) {return <><a className="footer-link" href={href}>{children}</a>{' '}</>;}@@ -153,25 +180,7 @@ export default function Home({ stars }: { stars: number }) {</div><div className="hero-media">- <div className="hero-video">- <div className="hero-video-title">- <span className="hero-video-dots" aria-hidden="true"><i /><i /><i /></span>- LosslessCut- {/* a looping video must be pausable (WCAG 2.2.2). Shown by the script in index.astro */}- <button type="button" className="hero-video-pause" aria-label="Pause the video" hidden>- <Pause className="pause" aria-hidden size={14} />- <Play className="play" aria-hidden size={14} />- </button>- </div>- {/* with prefers-reduced-motion, the poster is shown instead (home.css), and the script stops the video */}- <video poster={heroVideo.poster} autoPlay muted loop playsInline preload="metadata" width={1024} height={640} aria-label="LosslessCut cutting a video into three segments">- {/* with reduced motion, neither matches, so nothing is downloaded. Browsers that ignore media (before Chrome/Firefox- 120) take the first one, and the script removes them with reduced motion */}- <source src={heroVideo.src} type="video/mp4" media="(min-width: 701px) and (prefers-reduced-motion: no-preference)" />- <source src={heroVideo.smallSrc} type="video/mp4" media="(prefers-reduced-motion: no-preference)" />- </video>- <img className="hero-video-poster" src={heroVideo.poster} alt="LosslessCut with a video opened" width={1024} height={640} fetchPriority="high" />- </div>+ <FramedVideo video={heroVideo} label="LosslessCut cutting a video into three segments" posterAlt="LosslessCut with a video opened" priority /></div></div></header>@@ -243,11 +252,16 @@ export default function Home({ stars }: { stars: number }) {<a className="button" href="/docs/features">See all features and use cases</a></WhiteSection>- <div className="padded" style={{ padding: '110px 30px 80px 30px' }}>- <iframe style={{ width: '480px', height: '450px', maxWidth: '100%', border: '0' }} src="https://www.youtube-nocookie.com/embed/GPHMN9Vp4CQ?disablekb=1&playsinline=1&rel=0&playlist=GPHMN9Vp4CQ&loop=1&version=3" allowFullScreen title="LosslessCut demo video" />+ {sceneChangesVideo != null && (+ <div className="padded demo-video">+ <FramedVideo video={sceneChangesVideo} label="LosslessCut detecting the scene changes of a movie and creating a segment for each scene" posterAlt="A movie opened in LosslessCut" />+ <p className="demo-video-credit">+ Tears of Steel (CC) Blender Foundation | <a href="https://mango.blender.org/">mango.blender.org</a>+ </p>- <h2 style={{ textAlign: 'center', marginTop: '40px', fontWeight: '200' }}>Lightning Fast! It's like Magic</h2>- </div>+ <h2 style={{ textAlign: 'center', marginTop: '40px', fontWeight: '200' }}>Lightning Fast! It's like Magic</h2>+ </div>+ )}<div id="download" className="download"><div className="download-inner">diff --git a/website/src/images.ts b/website/src/images.tsindex ba88f52a..dc7aa97f 100644--- a/website/src/images.ts+++ b/website/src/images.ts@@ -15,12 +15,18 @@ export const generationLossReencoded = withSrcSet('losslesscut/website/generatioexport const background1 = `${baseUrl}/dist/losslesscut/website/background-1000.jpg`;export const background2 = `${baseUrl}/dist/losslesscut/website/background2-1000.jpg`;-// The hero video (a silent 1024×640 loop, about 13 s), a smaller one for phones, and a still of its first frame-export const heroVideo = {+// Screen recordings (script/featureMedia.ts): 1024×640, silent, a smaller one for phones, and a still of the first frame+export interface Video { src: string, smallSrc: string, poster: string }++// About 13 s+export const heroVideo: Video = {src: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22-1000.mp4`,smallSrc: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22.mp4`,poster: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22-poster-1000.jpg`,};+// Creating segments from the scene changes of a Tears of Steel excerpt (CC BY: the homepage credits it). Not uploaded yet+export const sceneChangesVideo = undefined as Video | undefined;+// Social preview image (1200x630)export const ogImage = `${baseUrl}/dist/losslesscut/og-image-1000.jpg`;diff --git a/website/src/legal/privacy-policy.md b/website/src/legal/privacy-policy.mdindex 10f84bd0..b473a088 100644--- a/website/src/legal/privacy-policy.md+++ b/website/src/legal/privacy-policy.md@@ -29,7 +29,7 @@ If you got LosslessCut from an app store, that store's privacy policy covers you## This website-losslesscut.app is hosted by Cloudflare, which processes standard request logs. The homepage video is embedded from YouTube's privacy-enhanced mode, which sets no cookies until you play it. The translation page shows status badges loaded from Weblate. The site itself sets no cookies and runs no analytics.+losslesscut.app is hosted by Cloudflare, which processes standard request logs. The translation page shows status badges loaded from Weblate. The site itself sets no cookies and runs no analytics.## Your rights@@ -39,4 +39,4 @@ You can ask to see or delete log data about you. You can also complain to the NoLosslessCut is made by Mikael Finstad. For questions about this policy, email [[email protected]](mailto:[email protected]).-*Last updated: 21 October 2026*+*Last updated: 22 October 2026*diff --git a/website/src/pages/index.astro b/website/src/pages/index.astroindex e9165de1..c03d2d0d 100644--- a/website/src/pages/index.astro+++ b/website/src/pages/index.astro@@ -37,33 +37,43 @@ const description = 'LosslessCut - Official downloads - free or paid version. Ed<Home stars={stars} /><!-- is:inline: plain JS, not compiled by Vite, which would look for a tsconfig and find the app's (see tsconfig.json) --><script is:inline>- // The hero video's pause button (Home.tsx), and with prefers-reduced-motion, no video at all (only its poster, see home.css)- {- const heroVideo = document.querySelector('.hero-video video');- if (heroVideo) {- if (matchMedia('(prefers-reduced-motion: reduce)').matches) {- // and don't download it (in browsers that ignore the sources' media, see Home.tsx)- heroVideo.removeAttribute('autoplay');- heroVideo.pause();- heroVideo.preload = 'none';- heroVideo.querySelectorAll('source').forEach((source) => source.remove());- heroVideo.load();- } else {- const pauseButton = document.querySelector('.hero-video-pause');- pauseButton.hidden = false;- pauseButton.addEventListener('click', () => (heroVideo.paused ? heroVideo.play().catch(() => {}) : heroVideo.pause()));- const update = () => {- pauseButton.classList.toggle('paused', heroVideo.paused);- pauseButton.setAttribute('aria-label', heroVideo.paused ? 'Play the video' : 'Pause the video');- };- heroVideo.addEventListener('play', update);- heroVideo.addEventListener('pause', update);- update(); // e.g. if the browser didn't autoplay it- // no button for a video that can't play- heroVideo.querySelector('source:last-of-type')?.addEventListener('error', () => { pauseButton.hidden = true; });- }+ // The framed videos (<FramedVideo> in Home.tsx): their pause buttons, playing them only while they're on screen (the hero+ // also autoplays), and with prefers-reduced-motion, no video at all (only its poster, see home.css)+ document.querySelectorAll('.framed-video').forEach((frame) => {+ const video = frame.querySelector('video');+ const pauseButton = frame.querySelector('.framed-video-pause');+ if (matchMedia('(prefers-reduced-motion: reduce)').matches) {+ // and don't download it (in browsers that ignore the sources' media, see Home.tsx)+ video.removeAttribute('autoplay');+ video.pause();+ video.preload = 'none';+ video.querySelectorAll('source').forEach((source) => source.remove());+ video.load();+ return;}- }+ let pausedByUser = false;+ pauseButton.hidden = false;+ pauseButton.addEventListener('click', () => {+ pausedByUser = !video.paused;+ if (video.paused) video.play().catch(() => {});+ else video.pause();+ });+ const update = () => {+ pauseButton.classList.toggle('paused', video.paused);+ pauseButton.setAttribute('aria-label', video.paused ? 'Play the video' : 'Pause the video');+ };+ video.addEventListener('play', update);+ video.addEventListener('pause', update);+ update(); // e.g. if the browser didn't autoplay it+ // no button for a video that can't play+ video.querySelector('source:last-of-type')?.addEventListener('error', () => { pauseButton.hidden = true; });+ if ('IntersectionObserver' in window) {+ new IntersectionObserver(([{ isIntersecting }]) => {+ if (!isIntersecting) video.pause();+ else if (!pausedByUser) video.play().catch(() => {});+ }).observe(video);+ }+ });// On touch screens, draw each feature card's icon when the card reaches the middle of the screen (.draw in home.css), again// after it has left the screen, and when it's tapped. Cards that are on screen when scrolling stops without having passed thediff --git a/website/src/styles/home.css b/website/src/styles/home.cssindex c3c4cb53..ff218fac 100644--- a/website/src/styles/home.css+++ b/website/src/styles/home.css@@ -126,14 +126,28 @@ body {flex: 1 1 500px;max-width: 640px;}-/* the hero video (Home.tsx) in a plain window frame, not macOS-like, since the app also runs on Windows and Linux */-.hero-video {+/* <FramedVideo> in Home.tsx */+.demo-video {+ max-width: 720px;+ margin: 0 auto;+ padding: 110px 30px 80px;+}+.demo-video-credit {+ margin: 8px 0 0;+ text-align: center;+ font-size: 0.75em;+ opacity: 0.6;+}+.demo-video-credit a {+ color: inherit;+}+.framed-video {border-radius: 10px;overflow: hidden;border: 1px solid rgba(255, 255, 255, 0.12);box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);}-.hero-video-title {+.framed-video-title {position: relative;height: 28px;display: flex;@@ -143,19 +157,19 @@ body {color: rgba(255, 255, 255, 0.7);font: 13px system-ui, sans-serif;}-.hero-video-dots {+.framed-video-dots {position: absolute;left: 12px;display: flex;gap: 6px;}-.hero-video-dots i {+.framed-video-dots i {width: 10px;height: 10px;border-radius: 50%;background-color: rgba(255, 255, 255, 0.25);}-.hero-video-pause {+.framed-video-pause {position: absolute;right: 6px;display: grid;@@ -169,26 +183,26 @@ body {color: inherit;cursor: pointer;}-.hero-video-pause:hover {+.framed-video-pause:hover {background-color: rgba(255, 255, 255, 0.1);}-.hero-video-pause[hidden], .hero-video-pause:not(.paused) .play, .hero-video-pause.paused .pause {+.framed-video-pause[hidden], .framed-video-pause:not(.paused) .play, .framed-video-pause.paused .pause {display: none;}-.hero-video video, .hero-video-poster {+.framed-video video, .framed-video-poster {display: block;width: 100%;height: auto;aspect-ratio: 16 / 10;}-.hero-video-poster {+.framed-video-poster {display: none;}@media (prefers-reduced-motion: reduce) {- .hero-video video, .hero-video-pause {+ .framed-video video, .framed-video-pause {display: none;}- .hero-video-poster {+ .framed-video-poster {display: block;}}