> For the complete documentation index, see [llms.txt](https://glitch9.gitbook.io/native-media-player/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glitch9.gitbook.io/native-media-player/legacy-docs/legacy-documents/media-events.md).

# Media Events

## Media Event Listener

**Media Event Listener** receives native callbacks. A game object with **MediaEventListener.cs** must be in the scene for the plugin to work properly. The chart below explains how the callbacks work in order.

![Callback flowchart](https://blog.kakaocdn.net/dn/bkOhQ5/btrDVD63NQ4/ZSmQkl2JX8PW4UZxpObBA1/img.png)

{% hint style="danger" %}
Do not include more than one **MediaEventListener.cs** in a scene.
{% endhint %}

## **Adding callback events**

All media events can easily be added using MediaEventListener's custom inspector.

<figure><img src="https://1872171189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIwfDdduYNmq0pGIJU1RT%2Fuploads%2FYkNscUEubRSXMDmezMZd%2Fimage.png?alt=media&amp;token=d2dbfde5-1c70-4818-9833-493f8c3a3a9d" alt="" width="563"><figcaption><p>Add events to the inspector to use the callbacks </p></figcaption></figure>

## **API reference**

{% content-ref url="/pages/P32UJb0bC2SeqAyvPaHT" %}
[Broken mention](broken://pages/P32UJb0bC2SeqAyvPaHT)
{% endcontent-ref %}
