# findPlayer

function in `@dioramajs/audio/beat`

```ts
import { findPlayer } from '@dioramajs/audio/beat'
```

The player: `for`, else the first audio or video of the closest container that holds one.

```ts
function findPlayer(element: Element, selector: string): HTMLMediaElement
```

| Parameter | Type | Description |
| --- | --- | --- |
| `element` | `Element` |  |
| `selector` | `string` |  |

Defined in [packages/audio/src/beat.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/audio/src/beat.ts#L101).
