# 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="../javascript-sdk/player-management" %}
[player-management](https://play.docs.nexx.cloud/javascript-sdk/player-management)
{% endcontent-ref %}

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