Skip to content

Set Default Playback Settings & Triggers

Set how long, how many times and what starts it once, in the editor, and forget about it: the settings travel inside the file, every player reads them, and the animation plays correctly with no configuration on the page.

This page is the editor side: which control writes which value. To change any of it at runtime, from component props or the player API, see Playback settings & triggers. For the editor itself — every panel, tool and dialog — see the full editor manual.

These are settings of the whole document, not of an element, so the panel shows them when nothing is selected — deselect everything (click an empty part of the canvas), or select the root <svg> element. Everything here is written into the document’s animator block on save.

ControlWritesNotes
Durationtimeline.outTime − timeline.inTime (ms)the length of the content window — one pass plays from In to Out; keyframe times are absolute
In/Out Timetimeline.inTime / timeline.outTime (ms)the window’s start and end; each moves only its own end and Duration follows (typing Duration moves Out); the window is never shorter than 1 ms
Playback Durationtimeline.playbackSpeed (a factor, 1 = normal)how long one pass plays, with the speed beside it (2 = twice as fast); typing a duration writes the speed as duration / ms — the keyframe times stay as authored
Delaytimeline.delay (ms)wait before the first iteration starts
Loop · Iterationstimeline.iterationsa number, or “infinite” — in the Playback Loop section
Directiontimeline.iterationDirection“normal”, “reverse”, “alternate” (ping-pong), “alternateReverse” — in the Playback Loop section
Frame ratetimeline.frameRatea target rate for the frame-loop engine only; leave it unset to run uncapped

Engine writes timeline.engine, and decides how the animated attributes actually get updated in a browser:

  • Auto (default) — the browser’s own machinery (the Web Animations API; for a scroll-driven animation also its scroll timeline), falling back to the player’s frame loop by itself when the document animates something the browser cannot express.
  • Native — the browser only: Web Animations API, and the browser’s scroll timeline for a scroll-driven animation.
  • JS — the player’s own requestAnimationFrame loop (and its own scroll measurement); identical in every browser, honours frame rate.

Leave it on auto unless you need a guarantee. React Native ignores it — playback there is always native-driven.

Where it sits: for a Pixodesk JSON file, Engine is a section of its own, the dropdown in its title row. For a pre-rendered SVG with embedded JS it is a dropdown in the Runtime section, and each choice shows the size of the player it embeds in the file.

Loop, Iterations and Direction have their own Playback Loop section: the Loop checkbox sits in its title row, and the section opens only while Loop is ticked.

The Playback Preset dropdown sets the trigger lists, the actions, At end and Loop in one pick. Open it to see each preset playing in a small example, with what it does and where it is typically used.

PresetSetsTypical use
Loop when seenStart playback on Load · Loop · Out-of-View Pauseloaders, spinners, backgrounds
Play once when seenStart playback on Load · one iteration · At end Hold · Out-of-View Pauseintros, counters, charts
Replay each time seenas above, but Out-of-View Jump to startillustrations down a long page
Run alwaysStart playback on Load · Loop · Out-of-View Continueclocks and tickers
Hover: play / pauseStart playback on Hover in · Pause playback on Hover out · Loop · Out-of-View Continuecards and links
Hover: there and backStart playback on Hover in · one iteration · At end Animate to start · Out-of-View Continueicons that move and settle back
Hover: one nudgeStart playback on Hover in · Start playback Jump to start · one iteration · At end Jump to start · Out-of-View Continueplayful icons
Click: play / pauseStart playback on Click · Pause playback on Click · Loopplay / pause toggles
Manual: loopnothing in Start playback on · Loopbackground jobs, the current step of a progress list
Manual: oncenothing in Start playback on · one iteration · At end Holdsuccess and error ticks

A preset is not saved in the file — the dropdown recognises it from those settings, and shows Custom as soon as one of them no longer matches (a loop count such as 3× is Custom too). Settings a preset doesn’t name go back to their defaults; Direction, Duration, Delay and the in-view numbers are left as they are. In a CSS keyframes (no JS) file each preset is marked (CSS) or (JS), and picking a (JS) one switches the file type to CSS keyframes (JS-triggers).

A trigger lists which events start, stop and pause a playback of the animation (a playback is one go of it, from a start until it is stopped or has ended), and the editor works out what resumes it. The Action Triggers section writes timeline.actionTriggers:

ControlWritesOffersActs while the animation is…
Start playback onactionTriggers["playback.start"]Load · Hover in · Clickoff or finished — starts a playback, per Start playback below
Stop playback onactionTriggers["playback.stop"]Hover out · Clickplaying, paused or finished — stops the playback, per Stop playback below
Pause playback onactionTriggers["playback.pause"]Hover in · Hover out · Clickplaying — freezes the current frame
Resume playback onnothing — worked out (actionTriggers["playback.resume"] when a file names it)shown, not editedpaused — continues

Each list offers only the events that make sense for it — nothing starts on Hover out or stops on Load. Resume playback on follows the other lists: Hover out resumes what Hover in paused (and the other way round), a click resumes what a click paused, and the Start playback on events that do not also stop it resume it too. A new document plays on load. Ticking Hover in under Start playback on adds Hover out under Pause playback on for you — the usual pair, and yours to change. Click under both Start playback on and Pause playback on makes every click play or pause. Start playback on shows every choice; the other lists are dropdowns, and the × next to one empties it. Choose None (manual) under Start playback on and nothing starts the animation until your code calls playback.start().

Two lists that react to the same event at the same moment are marked in red: Stop playback on and Pause playback on both on Hover out (the pause wins), or Stop playback on on the event that resumes a pause (the resume wins).

To play an animation when it scrolls into view, leave Start playback on at “Load” and Out-of-View Action on “pause” (both are the defaults). The animation then waits until enough of it is on screen, plays, pauses when it scrolls away, and carries on when it comes back.

Out-of-View Action writes timeline.actions.outOfView — what happens while none of it is on screen: “pause” (the default; it resumes where it left off), “continue” (keep running, and start without waiting to be seen) or “jump to start” (back to the start, so it replays on the next entry).

In-View Threshold writes timeline.inViewThreshold — how much must be on screen before it may run, from 0 (any part) to 1 (all of it), 0.5 by default. In-View Delay writes timeline.inViewDebounce — how long that must hold, in milliseconds, so scrolling straight past starts nothing.

How a start, a stop and the end look. The Actions section writes the two playback actions into timeline.actions, beside the triggers — each the word of its choice ("playback.stop": "animateToStart") — and At end as the timeline key atEnd. The same words apply whoever asks for the start or the stop: the trigger, a component’s playback property, or playback.start() / playback.stop() from code.

Every choice names where it goes — the start or the end — and how: jump (at once) or animate (playing there). Arriving at the end, by itself or by a stop that goes there, runs At end. “The end” is the end of the current pass, so on a looping animation Stop playback Animate to end means “stop after this pass” — and the At end choice then shows for it too.

ControlWritesChoices
Start playbackactions["playback.start"]Continue (default — plays on from where it is; at the start or the end, a fresh playback) · Jump to start (from the beginning every time) · Jump to end (shows the end, no motion, then At end)
Stop playbackactions["playback.stop"]Jump to start (default — straight back) · Animate to start (plays back to it) · Jump to end (straight to the end of the pass) · Animate to end (plays on to the end of the pass — a heartbeat does not die mid-beat)
At endtimeline.atEndHold (default — keeps the last frame) · Jump to start · Animate to start

The SVG + CSS animation export comes in two flavours — the File Type choice in the Runtime section (and on the welcome screen and in the Export dialog): CSS keyframes (no JS) or CSS keyframes (JS-triggers). It decides how the trigger is implemented in the file:

  • With CSS keyframes (no JS), the file contains no script at all — pure CSS. “Load” works, and “Hover in” / “Hover out” work through CSS :hover (a hover out may pause or stop, not both, and only when “Hover in” plays it). “Click” and waiting until the animation is on screen cannot be done in pure CSS; a class cannot restart keyframes or play them backwards. In this mode the playback sections show what the file will actually do: every choice is marked (CSS) or (JS), and a setting pure CSS cannot honour is shown at the value the file falls back to. Picking a (JS) choice switches the file type to CSS keyframes (JS-triggers) for you — a message says so and the panel scrolls to the flashing choice — and the marks go away, everything works.
  • With CSS keyframes (JS-triggers), the export adds a few lines of inline script (no library), and the file behaves exactly as this panel says: every list, every action and the gate.

The JSON format and the SVG + JS animation export always honour the full setting. The Export dialog offers the same three File Type flavours, with the same marks and the same rule.

Timeline chooses what the playhead follows — it writes timeline.type:

  • Time (default) — the clock. The animation plays on its own once triggered.
  • Scroll (in development) — the page’s scroll position drives the playhead: scrolling down plays the animation forward, scrolling back up rewinds it, and it stays at whatever frame you stop on. Pinning and range options choose which part of the page’s scroll maps to the animation. The “Scroll” option is still in development: expect gaps and changes.

Which export formats keep the playback settings and triggers

Section titled “Which export formats keep the playback settings and triggers”

Not every export can carry every setting from this page. What each one keeps:

ExportKept in the file
Pixodesk JSONeverything
SVG + CSS animationtiming; “Load”, and “Hover in” / “Hover out” via CSS :hover. “Click” and the visibility gate fall back to “Load”; the play actions keep their defaults
SVG + CSS + JS triggerstiming, every list, every action and the gate — through a few inline lines of script (added by the editor app), no library
SVG + JS animationeverything

Choosing a format has the full comparison.