Advanced player settings: Post message bridge


About

The Post message bridge plugin sends Kaltura player events, such as play, pause, and seek, to the web page that embeds the player. It uses window.postMessage to do this. Your page can then use the events, for example to send viewing data to your analytics or back-end systems.

Before you start, ask Kaltura Support to make the Post message bridge available on your player. After that, you can configure it, as described below.

Access the advanced settings

VOD Audio Reels

  1. Log in to your Rich Media CMS and click the Studio tab. 
  2. The Player Studio page displays. 

  3. Click the player you want to edit from the list (or use the search bar in the top right).
  4. If you haven't created a player yet, check out our article Create a player for guidance.

    The player settings display.

  5. Scroll to the bottom of the player settings and click Advanced Settings.
  6. The advanced settings editor opens.

Configure Post message bridge

You can turn on the Post message bridge plugin and set its options in the player’s Advanced settings.

Enable the plugin

  1. In the Advanced settings tab, hover over plugins.
  2. Select the green + icon.

  3. In the Key Name box, enter postMessageBridge.

  4. Select the green checkmark, or press Enter.

    The new plugin appears in the list, enabled and labeled null.

  5. Hover over the plugin name.
  6. Select the green edit icon.

    A box containing a null value appears.

  7. Replace null with {}.
  8. Select the second small green checkmark next to the {...}.

    The new plugin name is now followed by empty curly brackets ({}).

  9. Select Save at the top right before exiting.

Configure which events to send

Send all events

  1. Hover over postMessageBridge.
  2. Select the green + icon.

  3. In the Key Name box, enter sendAllEvents.

  4. Select the green checkmark, or press Enter.

    The new setting appears in the list, labeled null.

  5. Hover over sendAllEvents.
  6. Select the green edit icon.

    A box containing a null value appears.

  7. Replace null with true.
  8. Select the small green checkmark.

    The item is now labeled true.

    When sendAllEvents is true, the plugin sends all player events, including custom and ad events, to your web page.

  9. Select Save at the top right before exiting.

Select which events are forwarded (optional)

  1. If you added sendAllEvents, set it to false.
    1. Hover over sendAllEvents.
    2. Select the green edit icon.

      A box containing a true value appears.

    3. Replace true with false.
    4. Select the small green checkmark.

      The item is now labeled false.

    5. Select Save at the top right before exiting.
  2. Add eventsToSend and select events.
    1. Hover over postMessageBridge.
    2. Select the green + icon.

    3. In the Key Name box, enter eventsToSend.

    4. Select the green checkmark, or press Enter.

      The new setting appears in the list, labeled null.

    5. Hover over eventsToSend.
    6. Select the green edit icon.

      A box containing a null value appears.

    7. Enter event groups, event names, or both, separated by commas. This example adds one event group: playbackMilestones.

    8. Select the green checkmark, or press Enter.

      The events appear in the list.

    9. Select Save at the top right before exiting.

Supported event groups

  • core: Core playback events such as media_loaded, play, pause, resume, seek, ended
  • playbackMilestones: Milestone events such as play_reached_25, play_reached_50, play_reached_75, play_reached_90, play_reached_100
  • errorEvents: Error events such as error
  • adEvents: Ad events, such as ad_start, ad_complete, and ad_click, and any other ad events the player supports

Add optional context fields

You can add more information to every event message with the optional contextId and channel fields. The plugin adds these values to every event message unchanged. Your page can use them to sort or filter events.

"plugins": {
  "hostPageEventBridge": {
    "sendAllEvents": true,
    "contextId": "my-company-site-or-page-context",
    "channel": "company"
  }
}

  • contextId: A name you choose that identifies where the player is used, for example a site, page, or template.
  • channel: A name you choose to label these events, for example "company" if you use the plugin in more than one integration. Your page can use it to tell the events apart.

Event message example

Example event message.

{
  "source": "kaltura-player",
  "version": "1.1",
  "event": "play",
  "timestamp": "2026-02-26T12:34:56.789Z",
  "entryId": "1_abcd1234",
  "entryName": "Welcome to Kings",
  "playerId": "1234567",
  "partnerId": 123456,
  "sessionId": "sess_01",
  "isLive": false,
  "positionSeconds": 12.34,
  "durationSeconds": 300,
  "playbackRate": 1.0,
  "contextId": "prod:/content/site/page-x",
  "ad": null,
  "error": null
}

About the event message

  • source and version are always sent
  • Other fields are sent only when available (if a value is missing, that field is omitted)
  • event is the name of the event, based on your sendAllEvents or eventsToSend setting
  • entryName: The display name of the currently playing media entry. Empty string if unavailable.
Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In this article
Related articles
Back to top