# RupaPlayerProps

The props of `<RupaPlayer>`: the file's, and any prop of the `div` it renders (`className`, `style`, `id`, …).
A change of `src`, `markup`, `integrity` or `cloak` destroys the player and loads again.

## Extends

- `Omit`<`HTMLAttributes`<`HTMLDivElement`>, `"onError"`>

## Properties

### cloak?

> `readonly` `optional` **cloak?**: `boolean`

Hides the `div` until the file's CSS is installed, or the load failed.

***

### integrity?

> `readonly` `optional` **integrity?**: `string`

The file's `sha256-<base64>` hash, checked before the file is read.

***

### markup?

> `readonly` `optional` **markup?**: [`MarkupChoice`](/reference/api/rupamotion/player/file/type-aliases/markupchoice/)

`keep` (default): the children are the markup (written in JSX or rendered on the server) and stay React's. `auto`,
`replace`: the file's markup is written into the `div` and the children are not rendered (React never touches
what the player wrote; the development build warns when children are given).

***

### onError?

> `readonly` `optional` **onError?**: (`error`) => `void`

Called with the load's error (`error.code`, see `FileErrorCode`); the `div` is left as it was. One that throws is
reported to the page (`reportError`).

#### Parameters

##### error

[`FileError`](/reference/api/rupamotion/player/file/interfaces/fileerror/)

#### Returns

`void`

***

### onReady?

> `readonly` `optional` **onReady?**: (`player`) => `void`

Called with the player once the file is mounted (the latest `onReady` rendered is the one called). One that
throws is reported to the page (`reportError`).

#### Parameters

##### player

[`Player`](/reference/api/rupamotion/player/interfaces/player/)

#### Returns

`void`

***

### src

> `readonly` **src**: [`FileSource`](/reference/api/rupamotion/player/file/type-aliases/filesource/)

The `.rupaplay` file: a URL (a `URL` is compared by its `href`, so one made at each render loads once), or what
`mountFile` takes (a `Blob`, bytes, a `Response`, a file already parsed).
