Play a sequence of full-page Svelte components (called frames) in an interval. The resulting "video" is called a reel. Instead of documents slides like Powerpoint, or video frames like .mp4 clips, the Svelte Frame Orchestrator plays web components.
Open a terminal on svelte-frame-orchestrator
npm install
npm run dev
Head to src/App.svelte
to setup frames and audio
The easiest way is directly replace public/jingle.mp3
with an audio file of the same filename and extension type, but you can also define a different title:
public
directory let audioPath = '/jingle.mp3'
jingle.mp3
with your audio's filenameHead to src/App.svelte and locate the reel array variable
/*=============================================
reel
Defines the sequence of frames and duration they stay on screen
Frame attributes:
. component: .svelte component - component name to load into window
. duration: integer - time to display component in milliseconds
===============================================*/
let reel = [
// Every row below is a 'frame', a single entry played on the resulting video reel
{ component: SummonBison, duration: 4000 },
{ component: SummonHippo, duration: 4000 },
{ component: BisonHippo, duration: 2000 },
{ component: FourGrid, duration: 1000 },
... entries omitted ...
{ component: CasuallyRoadshow, duration: 11000 }
]
Explanation: The first frame displays a specific component lasting for 4 seconds. Then, it's instantly replaced with the second frame that features a different component that lasts for 4 seconds. It is then replaced by the third frame lasting 2 seconds, then the fourth lasting 1 second. Similar behavior shall continue until the last frame which lasts 11 seconds.
Presently, the Orchestrator is loaded with 16 sample frames that makes up the Casually CSS Teaser. The sample reel can be played as is. To create your own reel, do the following:
reel
array to start freshlet reel = []
reel
array for every frame to be played{component: ImportedComponentName, duration: 1000}
{component: ImportedComponentName, end: 5000}
As best practice, choose ONE of either attribute options and apply it consistently to all entries