# clanbite.playerMedia.dialog

Fires when the avatar or cover popup opens, so add-ons can add their own controls to it.

```php
wp.hooks.doAction( 'clanbite.playerMedia.dialog', Object context, string context.kind, HTMLElement context.dialog, HTMLElement context.extras, Function context.getPosition, Function context.setPosition )
```

## Parameters

- `$context` (Object) What is open.
- `$context.kind` (string) `avatar` or `cover`.
- `$context.dialog` (HTMLElement) The popup element.
- `$context.extras` (HTMLElement) An empty container for your controls.
- `$context.getPosition` (Function) Returns the current `{ x, y, zoom }`.
- `$context.setPosition` (Function) Sets the position (`{ x, y, zoom }`) and redraws the preview.

## Changelog

| Version | Description |
| --- | --- |
| 1.6.3 | Introduced |
