nexxPLAY
  • Introduction
  • Javascript SDK
    • Basic Integration
    • Advanced Integration
    • Player Configuration
    • Player Management
    • Playback Control
  • iFrame Integration
    • Embed Codes
    • PostMessage Control
  • native Players
    • nexxPLAY for iOS
    • nexxPLAY for Android
    • nexxPLAY for Flutter
  • Platform Plugins
    • Google AMP
    • Wordpress Plugin
    • React Plugin
  • Integration Enhancements
    • Player UI
    • Audio Player
    • Player DataMode
    • Player Events
    • SDK Override Options
    • VAST Macros
    • GET Parameters
  • Widgets
    • Javascript SDK
    • iFrame Integration
    • Widgets for native Apps
      • iOS Widget
      • Android Widget
      • Android TV Channel
      • Windows 10 LiveTile
    • Widget React Plugin
    • Widget Override Options
  • more Integrations
    • WebViews
    • oEmbed Discovery
    • WebComponent
    • Preview Links
    • Cover Service
    • Reporting for external Players
  • Addons
  • Security and Accessibility
    • Data Protection and Security
    • GDPR and TCF 2.0
    • Accessibility and WCAG
  • Compatibility
  • Changelog
Powered by GitBook
On this page
  1. iFrame Integration

PostMessage Control

PreviousEmbed CodesNextnative Players

Last updated 4 years ago

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.

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

All Methods, referenced here

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

Player Management