npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@playkit-js/post-message-bridge

v1.1.0

Published

Pre-configured (live working example) plugin template of kaltura-player-js according to kaltura-player-js specification

Readme

Build Status

playkit-js-post-message-bridge

playkit-js-post-message-bridge is a Kaltura Player plugin that bridges player events to parent windows via postMessage API. Designed for iframe embeds, it enables parent pages to receive real-time player events with rich contextual data.

Features

  • Automatic event bridging from iframe to parent window
  • Configurable event filtering by groups
  • Rich payload with player state and metadata

Configuration

Send All Events (Default)

const config = {
  plugins: {
    postMessageBridge: {
      sendAllEvents: true
    }
  }
};

Filter by Event Groups

const config = {
  plugins: {
    postMessageBridge: {
      sendAllEvents: false,
      eventsToSend: ['core', 'playbackMilestones'],
      channel: 'my-channel',      // Optional
      contextId: 'homepage'        // Optional
    }
  }
};

Available Event Groups

  • core: playerLoaded, play, pause, resume, seek, ended
  • playbackMilestones: play_reached_25, play_reached_50, play_reached_75, play_reached_90, play_reached_100
  • errorEvents: error
  • adEvents: ad_start, ad_complete, ad_click

Usage

Player Setup

<!--Kaltura player-->
<script type="text/javascript" src="/PATH/TO/FILE/kaltura-player.js"></script>
<!--Playkit banner-overlay plugin -->
<script type="text/javascript" src="/PATH/TO/FILE/playkit-post-mesage-bridge.js"></script>
<div id="player-placeholder" style="height:360px; width:640px">
  <script type="text/javascript">
    var playerContainer = document.querySelector("#player-placeholder");
    var config = {
     ...
     targetId: 'player-placeholder',
     plugins: {
      postMessageBridge: {
        sendAllEvents: false,
        eventsToSend: ['core', 'playbackMilestones']
      }
     },
    };
    var player = KalturaPlayer.setup(config);
    player.loadPlaylist(...);
  </script>
</div>

Parent Window Listener

window.addEventListener('message', (event) => {
  const data = event.data;

  if (data.source === 'kaltura-player') {
    console.log(`Event: ${data.event}`, {
      entryId: data.entryId,
      position: data.positionSeconds,
      duration: data.durationSeconds
    });
  }
});

Development

# Clone and install
git clone https://github.com/kaltura/playkit-js-post-message-bridge.git
cd playkit-js-post-message-bridge
npm install

# Development server (http://localhost:8000)
npm run dev

# Build
npm run build

# Test
npm test

# Pre-commit (type check, lint, docs)
npm run pre:commit

Demo

Live Demo

Compatibility

  • Requires Kaltura Player v3.17.0+
  • Only active in iframe context
  • Supports Chrome 39+, Firefox 41+, Safari 8+, Edge, IE11

License

AGPL-3.0 License