Play one animation
Give the Masko player one animation's files and it loops it with its transparency, with no flash between loops and with the animation's own voice when it has one. Hosted links do not expire, so this needs no backend and no API key. Install the player for your platform first.
Get the files
Turn on hosting for the mascot, then copy the animation's links from Get Links in Studio or from the Get Links JSON. Put your mascot on your website shows each step.
| Platform | Files |
|---|---|
| Web and React | transparent_video_webm and transparent_video_mov (HEVC) |
| iPhone, iPad and Mac | transparent_video_av1 (stacked AV1), or transparent_video_mov (HEVC) |
| Android | transparent_video_av1 (stacked AV1) on Android 10 and later, else transparent_video_android (the stacked MP4) |
| React Native and Flutter | transparent_video_mov and transparent_video_android |
The stacked AV1 file is two to three times lighter than HEVC or the stacked MP4: pass its link in place of the HEVC file in Swift, or of the stacked MP4 in Kotlin. Phones before Android 10 have no AV1 decoder, so they need the stacked MP4. The Mobile filter in Get Links lists only the AV1 links. Animations made before October 27, 2026 have no AV1 file yet: the Settings tab shows how many files each size is missing, and Sync makes them.
Play it
import { mountMascot } from '@masko/player';
mountMascot(document.getElementById('mascot'), {
clip: { webm: 'https://assets.masko.ai/.../wave.webm', hevc: 'https://assets.masko.ai/.../wave.mov' }
});The player reads the file's length and loops it. A clip whose length cannot be read plays nothing and reports the error event with clip_failed. For visitors who turn off animations, pass autoPlay: !matchMedia('(prefers-reduced-motion: reduce)').matches on the web: the player then shows the first frame and waits.
Switch between animations
A new clip starts a new player, so the mascot can blink between two animations. To switch between animations, or to make the mascot react to your app, put them in a canvas and play its release: Play a canvas.
