nexxPLAY
Search…
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.
1
let el = document.getElementById('playeriframe');
2
el.contentWindow.postMessage({cmd:'pause'},"*");
Copied!
All Methods, referenced here
are available through this API - some may need the additional "param" Key to configure the return Values.
Last modified 1yr ago
Copy link