diff --git a/src/components/Scroller/Scroller.mdx b/src/components/Scroller/Scroller.mdx
index 54994565..2b64a144 100644
--- a/src/components/Scroller/Scroller.mdx
+++ b/src/components/Scroller/Scroller.mdx
@@ -72,7 +72,7 @@ In your graphics kit project, import your ai2svelte graphics in `App.svelte` and
```
-Then add the following structure to your ArchieML Doc, making sure that the names of your charts in the `aiCharts` object match the names of each step's `background` in the ArchieML doc:
+Then add the following structure to your ArchieML doc, making sure that the names of your charts in the `aiCharts` object match the names of each step's `background` in the ArchieML doc:
```yaml
# ArchieML doc
@@ -217,7 +217,7 @@ In your graphics kit project's `App.svelte`, import your custom foregroud compon
```
-Then add the following structure to your ArchieML Doc, making sure that the names of your charts in the `aiCharts` and `foregroundComponents` objects match the names of each step's `background` and `foreground` in the ArchieML doc:
+Then add the following structure to your ArchieML doc, making sure that the names of your charts in the `aiCharts` and `foregroundComponents` objects match the names of each step's `background` and `foreground` in the ArchieML doc:
```yaml
# ArchieML doc
diff --git a/src/components/ScrollyVideo/ScrollyVideo.mdx b/src/components/ScrollyVideo/ScrollyVideo.mdx
index ba3f3a7a..6fd66e92 100644
--- a/src/components/ScrollyVideo/ScrollyVideo.mdx
+++ b/src/components/ScrollyVideo/ScrollyVideo.mdx
@@ -1,7 +1,7 @@
import { Meta } from '@storybook/blocks';
import * as ScrollyVideoStories from './ScrollyVideo.stories.svelte';
-
+
# ScrollyVideo
@@ -116,11 +116,184 @@ The `autoplay` option combines the autoplay and scrollytelling experience. If se
/>
```
-## Using with ScrollerBase
+## Time-based foregrounds with ArchieML
-The `ScrollyVideo` component can also be used inside the `ScrollerBase` component to create a scroller-based layout. This allows for more complex interactions and layouts, such as combining ai2svelte components with scrolly video content.
+The `ScrollyVideo` component can also be used to display foregrounds, such as headlines, blurbs, or ai2svelte components, at specific times in the video. To do so, use the `Foreground` component.
-[Demo](?path=/story/components-graphics-scrollyvideo--inside-scroller-base)
+With the graphics kit, you'll likely get your text and prop values from an ArchieML doc...
+
+
+```yaml
+# ArchieML doc
+[blocks]
+ type: scrolly-video
+ src: videos/alps.mp4
+ height: 800svh
+
+ # Array of foregrounds
+ [.foregrounds]
+ startTime: 3
+ endTime: 7
+ text: #### The Alps\n\nThe Alps stretch across eight countries: France, Switzerland, Italy, Monaco, Liechtenstein, Austria, Germany, and Slovenia, covering about 1,200 kilometers (750 miles).
+ :end
+
+ startTime: 9
+ endTime: 12
+ text: Mont Blanc, standing at 4,809 meters (15,777 feet), is the highest peak in the Alps and Western Europe, though there's ongoing debate between France and Italy about exactly where the summit lies.
+ :end
+
+ startTime: 16
+ endTime: 20
+ text: #### History\n\nThe Alps were formed around **65 million years** ago when the African and Eurasian tectonic plates collided, pushing the land upward.Over 14 million people live in the Alpine region, with tourism supporting approximately 120 million visitors annually.
+ :end
+ []
+[]
+```
+
+... which you'll parse out of a ArchieML block object before passing to the `ScrollyVideo` and `Foreground` components.
+
+```svelte
+
+
+{#if block.type == 'scrolly-video'}
+
+
+
+
+ {#each block.foregrounds as foreground}
+
+ {/each}
+
+{/if}
+
+
+```
+
+
+## Time based Foregrounds
+
+The `ScrollyVideo` component can also be used to display different foregrounds based on the current time in the video. This is useful for creating interactive experiences where the content changes as the video progresses. To throw off some ideas, one could add `Headline`, `GraphicBlock`, `FeaturePhoto` or any other component to the foreground based on the current time in the video. This can be achieved by adding `Foreground` components, along with their **startTime** and **endTime**, as a child to the main `ScrollyVideo` component.
+
+[Demo](?path=/story/components-graphics-scrollyvideo--time-based-foregrounds)
+
+```svelte
+
+
+
+
+{#snippet ScrollForeground()}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{/snippet}
+
+{#snippet ScrollVideo(height: string, VideoSrc: string)}
+
+ {@render ScrollForeground()}
+
+{/snippet}
+
+{#if width < 600}
+ {@render ScrollVideo('800svh', `${assets}/videos/sm.mp4`)}
+{:else if width < 1200}
+ {@render ScrollVideo('800svh', `${assets}/videos/md.mp4`)}
+{:else}
+ {@render ScrollVideo('800svh', `${assets}/videos/lg.mp4`)}
+{/if}
+
+
+```
+
+
+## Using with `ScrollerBase`
+
+The `ScrollyVideo` component can be used inside the [ScrollerBase](?path=/story/components-graphics-scrollerbase--docs) component to add foreground content. This allows for more complex interactions and layouts, such as adding ai2svelte components in the foreground.
+
+[Demo](?path=/story/components-graphics-scrollyvideo--scroller-base)
```svelte
-
-
-
-{#snippet ScrollForeground()}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{/snippet}
-
-{#snippet ScrollVideo(height: string, VideoSrc: string)}
-
- {@render ScrollForeground()}
-
-{/snippet}
-
-{#if width < 600}
- {@render ScrollVideo('800svh', `${assets}/videos/sm.mp4`)}
-{:else if width < 1200}
- {@render ScrollVideo('800svh', `${assets}/videos/md.mp4`)}
-{:else}
- {@render ScrollVideo('800svh', `${assets}/videos/lg.mp4`)}
-{/if}
-
-
-```
-
-## With Captions
-
-The `ScrollyVideo` component can also be used to display captions at specific times in the video. This is useful for providing additional context or information to the viewer. To add captions, you can use the `Foreground` component and pass on the caption as **text** prop.
-
-To quickly set it up using ArchieML, you can use the following format on your RNGS doc or Google doc:
-
-```yaml
-# ArchieML doc
-[blocks]
-
- type: scrolly-video
- id: alps-scrolly
- src: videos/alps.mp4
- height: 800svh
-
- # Array of foregrounds
- [.foregrounds]
- startTime: 3
- endTime: 7
- text: "#### The Alps\n\nThe Alps stretch across eight countries: France, Switzerland, Italy, Monaco, Liechtenstein, Austria, Germany, and Slovenia, covering about 1,200 kilometers (750 miles)."
- :end
-
- startTime: 9
- endTime: 12
- text: "Mont Blanc, standing at 4,809 meters (15,777 feet), is the highest peak in the Alps and Western Europe, though there's ongoing debate between France and Italy about exactly where the summit lies."
- :end
-
- startTime: 16
- endTime: 20
- text: "#### History\n\nThe Alps were formed around **65 million years** ago when the African and Eurasian tectonic plates collided, pushing the land upward.Over 14 million people live in the Alpine region, with tourism supporting approximately 120 million visitors annually."
- :end
- []
- :end
-
-[]
-```
-
-Then add the following code to your App.svelte or the component where you want to display the scrolly video:
-
-```svelte
-
-
-{#if block.type == 'scrolly-video'}
-
-
-
-
- {#each block.foregrounds as caption}
-
- {/each}
-
-{/if}
-
-
-```
-
## Advanced usecases
For advanced use cases such as looping a particular section of the video, or jumping to a specific time in the video, you can bind `scrollyVideo` prop and take benefits of methods such as `setVideoPercentage` or bindable methods such as `onReady` and `onChange`. This allows for fine-grained control over the video playback and interaction with the scroll position.
diff --git a/src/components/ScrollyVideo/ScrollyVideo.stories.svelte b/src/components/ScrollyVideo/ScrollyVideo.stories.svelte
index 22d51dc7..be8cdbb3 100644
--- a/src/components/ScrollyVideo/ScrollyVideo.stories.svelte
+++ b/src/components/ScrollyVideo/ScrollyVideo.stories.svelte
@@ -3,7 +3,7 @@
import ScrollyVideo from './ScrollyVideo.svelte';
import WithScrollerBase from './demo/WithScrollerBase.svelte';
import WithTimeline from './demo/WithTimeline.svelte';
- import BasicTextBoxes from './demo/BasicTextBoxes.svelte';
+ import WithTextForegrounds from './demo/WithTextForegrounds.svelte';
const { Story } = defineMeta({
title: 'Components/Graphics/ScrollyVideo',
@@ -194,5 +194,5 @@
-
+
diff --git a/src/components/ScrollyVideo/Foreground.svelte b/src/components/ScrollyVideo/ScrollyVideoForeground.svelte
similarity index 100%
rename from src/components/ScrollyVideo/Foreground.svelte
rename to src/components/ScrollyVideo/ScrollyVideoForeground.svelte
diff --git a/src/components/ScrollyVideo/demo/BasicTextBoxes.svelte b/src/components/ScrollyVideo/demo/WithTextForegrounds.svelte
similarity index 85%
rename from src/components/ScrollyVideo/demo/BasicTextBoxes.svelte
rename to src/components/ScrollyVideo/demo/WithTextForegrounds.svelte
index 7d769fba..14497d91 100644
--- a/src/components/ScrollyVideo/demo/BasicTextBoxes.svelte
+++ b/src/components/ScrollyVideo/demo/WithTextForegrounds.svelte
@@ -1,6 +1,6 @@
@@ -12,7 +12,7 @@
useWebCodecs={true}
showDebugInfo
>
-
+
-
-
+
-
+
-
+
+ >