# PostMessage Control

In case, a Page uses the Embed Codes of nexxPLAY AND needs to control the Player through the SDK, a direct Communication is normally not possible due to Browser Restrictions.

Nevertheless, nexxPLAY exposes the **`_play.control`** Functionality also via the **PostMessage API**, so the most basic Controls of the Player are also available in an iFrame Context.

In order to use the **PostMessage API**, send an Object with “**`cmd`**” (and additionally “**param**” to the iFrame **contentWindow** in order to start the **`_play.control`** Functions of the JS SDK.

```javascript
let el = document.getElementById('playeriframe');
el.contentWindow.postMessage({cmd:'pause'},"*");
```

All Methods, referenced here

{% content-ref url="/pages/-M9Ff5c\_bjGXe44xg\_oO" %}
[Player Management](/javascript-sdk/player-management.md)
{% endcontent-ref %}

are available through this API - some may need the additional "**param**" Key to configure the return Values.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://play.docs.nexx.cloud/iframe-integration/postmessage-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
