## class: `WyFileViewMedia`, `wy-file-view-media`

Media preview component for audio/video files.

Renders a <video> or <audio> element with fallbacks and loading UI.

**Used sub components:**

*   [`<wy-progress-circular>`](./ui/wy-progress-circular)
*   [`<wy-file-view-icon>`](./wy-file-view-icon)

### Fields

| Name   | Type                    | Default | Description                                                  | Inherited From |
| ------ | ----------------------- | ------- | ------------------------------------------------------------ | -------------- |
| `file` | `FileType \| undefined` |         | Source file.                                                 |                |
| `play` | `boolean`               | `false` | Toggles playback when the preview item is marked as current. |                |

### Events

| Name                  | Type                         | Description                            | Inherited From |
| --------------------- | ---------------------------- | -------------------------------------- | -------------- |
| `file-preview-loaded` | `FilePreviewLoadedEventType` | The file preview is considered loaded. |                |

### Attributes

| Name   | Field | Inherited From |
| ------ | ----- | -------------- |
| `play` | play  |                |

### CSS Parts

| Name                  | Description                                 |
| --------------------- | ------------------------------------------- |
| `wy-content-video`    | Video element container / element.          |
| `wy-content-audio`    | Audio element container / element.          |
| `wy-content-progress` | Progress indicator shown while media loads. |

<hr/>

## Exports

| Kind                        | Name                 | Declaration     | Module                               | Package |
| --------------------------- | -------------------- | --------------- | ------------------------------------ | ------- |
| `js`                        | `WyFileViewMedia`    | WyFileViewMedia | lib/components/wy-file-view-media.ts |         |
| `custom-element-definition` | `wy-file-view-media` | WyFileViewMedia | lib/components/wy-file-view-media.ts |         |
