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

@adobe/vega-aepmedia

v1.0.1

Published

Adobe Experience Platform Media Analytics SDK.

Downloads

51

Readme

Adobe Experience Platform Vega SDK — Media API Reference

This document describes the public APIs provided by @adobe/vega-aepmedia (Adobe Experience Platform Media Analytics) for Amazon Vega (Kepler) React Native apps. The Media package depends on @adobe/vega-aepcore and registers a Media extension that works with the core SDK’s event hub and Edge pipeline.

IMPORTANT

  • Initialize @adobe/vega-aepcore with Media.EXTENSION before using media APIs.
  • A media session must be started with createMediaSession before sendMediaEvent.

Contents


Installation

Add the core and media packages to your app (versions should stay aligned per your release):

yarn add @adobe/vega-aepcore @adobe/vega-aepmedia

Register the Media extension

Pass Media.EXTENSION in the extensions array when calling AEPSDK.initialize from @adobe/vega-aepcore.

Example

import { AEPSDK, LogLevel } from '@adobe/vega-aepcore';
import { Media } from '@adobe/vega-aepmedia';

await AEPSDK.initialize({
  config: {
    'edge.configId': '<YOUR_DATASTREAM_ID>',
  },
  logLevel: LogLevel.VERBOSE,
  extensions: [Media.EXTENSION],
});

Media APIs

Media.EXTENSION

The Extension instance used to register the Media component with the core SDK. Pass it only to AEPSDK.initialize({ extensions: [...] }).

Syntax

readonly EXTENSION: Extension;

createMediaSession

Creates a new media session using XDM data whose event type is media.sessionStart. Invalid or incomplete XDM may be rejected internally (check SDK logs).

The implementation validates XDM via MediaAPIHelper, assigns a default playerId, and dispatches a createMediaSession event on the core event hub.

Syntax

createMediaSession(data: Record<string, unknown>): void;

Parameters

  • data: Object containing XDM for media.sessionStart, typically including mediaCollection with sessionDetails. Session start flows are described in Adobe’s Media Edge documentation (see Further reading).

NOTE sessionDetails must satisfy the session details field group requirements for your implementation.

Example

import { Media } from '@adobe/vega-aepmedia';

const sessionStartXDM = {
  xdm: {
    eventType: 'media.sessionStart',
    mediaCollection: {
      playhead: 0,
      sessionDetails: {
        streamType: 'video',
        friendlyName: 'Name of the media',
        hasResume: false,
        name: 'CONTENT_ID',
        length: 100,
        contentType: 'vod',
        channel: 'SampleChannel',
        playerName: 'SamplePlayer',
      },
    },
  },
};

Media.createMediaSession(sessionStartXDM);

sendMediaEvent

Sends a media lifecycle or analytics event (play, pause, ping, ad events, session end, etc.) for the active session. createMediaSession must have been called successfully first.

Syntax

sendMediaEvent(data: Record<string, unknown>): void;

Parameters

  • data: XDM payload for the event (e.g. eventType: media.play, media.ping, media.sessionEnd, …) with mediaCollection including playhead where required by the event type.

Example — media.play

import { Media } from '@adobe/vega-aepmedia';

const playhead = 0; // integer, non-negative

const playXDM = {
  xdm: {
    eventType: 'media.play',
    mediaCollection: {
      playhead,
    },
  },
};

Media.sendMediaEvent(playXDM);

Example — media.ping

const pingXDM = {
  xdm: {
    eventType: 'media.ping',
    mediaCollection: {
      playhead: currentPlayhead,
    },
  },
};

Media.sendMediaEvent(pingXDM);

Session and playback notes

  • Active session: Use sendMediaEvent only after a session has been started with createMediaSession.
  • Single session: Only one media session should be active at a time. To start another session, end the current one with the appropriate session-complete / session-end events per Media Edge API guidance.
  • Pings: During playback, send media.ping at the required cadence with an up-to-date playhead so the server can track progress reliably.
  • Playhead: Use a non-negative integer for playhead where applicable; invalid values may be treated as errors.

Further reading