docs tweaks

This commit is contained in:
MinamiFunakoshiTR 2025-08-07 08:53:28 -04:00
parent d8bd9dfcad
commit 754061bccb
Failed to extract signature
2 changed files with 6 additions and 3 deletions

View file

@ -409,7 +409,9 @@ scrollerVideo.setVideoPercentage(
> **Note**: When using these methods, it's recommended to set `trackScroll` to `false` to avoid video playback on scroll and pass functions to the `onReady` prop to ensure that the video is ready before calling any methods on it.
Here is a [demo](?path=/story/components-graphics-scrollervideo--advanced) that uses `ScrollerVideo` with `ScrollerBase` to make the video jump to the start or the end of the video depending on what step of the scroller the user is on.
Here is a demo that uses `ScrollerVideo` with `ScrollerBase` to make the video jump to the start or the end of the video depending on what step of the scroller the user is on.
[Demo](?path=/story/components-graphics-scrollervideo--advanced)
```svelte
<script lang="ts">

View file

@ -3,7 +3,6 @@
import ScrollerVideoForeground from '../ScrollerVideoForeground.svelte';
import Goldengate from '../videos/goldengate.mp4';
import BodyText from '../../BodyText/BodyText.svelte';
import Block from '../../Block/Block.svelte';
import type { ContainerWidth } from '../../@types/global';
@ -44,6 +43,8 @@
],
};
const openerText =
'**In embedded mode, `ScrollerVideo` behaves like a normal video player, autoplaying the video when the user scrolls onto it.**';
const dummyText =
'Reprehenderit hamburger pork bresaola, dolore chuck sirloin landjaeger ham hock tempor meatball alcatra nostrud pork belly. Culpa pork belly doner ea jowl, elit deserunt leberkas cow shoulder ham hock dolore.';
const scrollerVideoBlock = content.blocks[0];
@ -51,7 +52,7 @@
let embedded = $state(true);
</script>
<BodyText text={dummyText} />
<BodyText text={openerText} />
<BodyText text={dummyText} />
<BodyText text={dummyText} />
<BodyText text={dummyText} />