# Quick start

Play an exported .rupaplay file in a page with one script line and one element.

Export your animation from Rupamotion as a **Player file** (a `.rupaplay` file) and put it next to your page. This
page is complete: save it, serve it, and the animation plays.

```html
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Rupamotion player</title>
		<script type="module" src="https://cdn.jsdelivr.net/npm/@rupamotion/player@0.1.0/dist/element.js"></script>
	</head>
	<body>
		<rupa-player src="/hero.rupaplay" cloak></rupa-player>
	</body>
</html>
```

The element loads the file, writes its markup and CSS, and mounts the player (`element.player`). `cloak` keeps the
root hidden until the CSS is installed. That is it: the animation plays. This one is a `.rupaplay` file loaded and
played by the player of this version:

## Need control?

The element's `player` is the player once the file is mounted. `rupaready` says it is mounted, `rupaerror` says the load
failed. Add a script after the element:

```html
<script type="module">
	const el = document.querySelector("rupa-player");
	el.addEventListener("rupaready", () => el.player.play());
	el.addEventListener("rupaerror", (event) => console.warn(event.detail.error.code));
</script>
```

See [Control playback](/guides/control/) for `play`, `pause`, `seek`, speed and states, and [Events](/guides/events/)
for what a player tells you.

## Next

- [Choose a way to use it](/guides/choose-a-way/)
- [Control playback](/guides/control/)
- [Your framework](/frameworks/html/)
