# AtloriaTourPlayer

**Kind:** Class

**Source:** [`atloria-monorepo/packages/tour-widget/src/player.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/tour-widget/src/player.ts#L56)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `start` | `start(flowOrId: string | CapturedFlow)` | `Promise<void>` |
| `stop` | `stop()` | `void` |
| `next` | `next()` | `void` |
| `back` | `back()` | `void` |
| `isActive` | `isActive()` | `boolean` |

## Where it refuses work

- `AtloriaTourPlayer` stops the work with an early return when `!this.flow`.
- `AtloriaTourPlayer` stops the work with an early return when `!res.ok`.
- `AtloriaTourPlayer` stops the work with an early return when `el instanceof HTMLElement`.
- `AtloriaTourPlayer` stops the work with an early return when `node instanceof HTMLElement`.
- `AtloriaTourPlayer` stops the work with an early return when `!this.active || this.loading || this.error`.
- `AtloriaTourPlayer` stops the work with an early return when `!tip`.

## When something fails

- `AtloriaTourPlayer` handles failure in 4 places: it discards it silently in 2, logs it and continues in 1, and turns it into a return value in 1.
