Player Overview
What the PanelWave Player is — an MIT-licensed Angular library that renders interactive graphic novels from PanelWave manifests.
@panelwave/player is the open-source player of the PanelWave ecosystem: an MIT-licensed Angular library (Angular 21 or 22 from player 2.0.0, Angular 20 with the 1.x releases — see Installation) that renders interactive graphic novels from a PanelWave manifest (panelwave.json). You embed it in your own Angular application; it takes care of rendering, navigation, localization, and reader controls. Not on Angular? The host SDK shows a work in any page or app in a frame, with one PanelWave.mount() call.
npm
npm install @panelwave/player
Live demo
A published work, read by the player in the public reader.
Source
MIT-licensed, issues and pull requests welcome.
The player renders whatever a valid manifest describes — it contains no authoring features. Works are created with the PanelWave CMS or any tool that produces a manifest conforming to the PanelWave Schema.
What it renders
A PanelWave work is a set of chapters whose panels are nodes in a directed graph. The player walks that graph, evaluating JSON Logic conditions on edges, and renders each panel from its layers:
- Image layers — the artwork itself, with lazy loading and caching.
- Video layers — video panels with play modes (
once, loop, pingpong), start triggers (on-view, on click, …), and page-view sequencing. - Text and plugin layers — text content and sandboxed iframe extensions.
- Speech bubbles — rendered by the
ComicBalloonSVG engine with configurable balloon types, tails, and a styling cascade (work defaults → character override → per-bubble override). - Panel borders — the line around every panel, set for the work and per panel (format 1.14, from player 2.3.0).
Panels can be read one at a time (panel view) or composed into comic pages (page view) when the manifest defines page layouts.
Feature summary
All of the following is implemented in the library source (projects/player/src/lib):
| Area | What you get |
|---|---|
| Navigation | Graph traversal with conditional edges and edge priorities (FlowEngineService), reading order for chapters without edges, panel, page (one page sequence per output format, picked for the screen) and canvas view, an optional cover before the first panel, a branch chooser for panels with several outgoing paths, keyboard and swipe input, autoplay with per-panel durations and video-aware advance |
| Localization | LocalizedString resolution with fallback chains, per-locale asset variants, runtime language switching, translated player UI via @ngx-translate |
| Variables | Five scopes (global, chapter, page, session, persistent), typed definitions, mutations, JSON Logic context building; persistent scope survives reloads via localStorage |
| Media | WebAudio mixer with four buses (ambient, music, voiceover, sfx), video controller with a single-active-video policy and stall watchdogs, LRU image cache, lookahead preloading |
| Monetization | Manifest paywall rules evaluated against an entitlement snapshot you supply (or fetch from your endpoint), work, chapter, panel and extras scopes, a paywall overlay with Buy / Subscribe options derived from the rule, in-player age gate, free-preview panels, lock placeholders for gated and server-stripped (x-locked) panels — checkout stays in your app |
| Analytics | Consent-aware TrackingService with event whitelisting, batching, and a configurable endpoint — driven by the manifest's tracking section |
| Embedding | A two-way bridge for iframe hosts (PlayerEmbedBridge, embed protocol 4: MessagePort handshake for web and app hosts, privacy mode, reading positions, purchase UI policy), a chapterScope that plays a single chapter, and the dependency-free host SDK panelwave-embed.js 2.0 — PanelWave.mount() or placeholders on any page — see Host SDK (since 2.4.0) and Embed chapters (since 1.9.0) |
| Extensibility | Plugin system: sandboxed iframe plugins with a capability model and a postMessage protocol, plus plugin layers inside panels |
| Accessibility | Keyboard navigation (Escape closes the open dialog), ARIA labels and roles throughout the UI, reduced motion from the OS setting, the reader's own setting or the host input, focus management in modals; an automated axe sweep covers every dialog, overlay and view |
| UI chrome | Toolbar (incl. like and bookmark), table of contents, settings modal, language modal, character roster, extras viewer, thumbnail strip, share modal, comments drawer, branch chooser — UI text in English and German; all icons are inlined Lucide SVGs (pw-icon), so the player adds no icon-library dependency |
The main component
The component you embed is PlayerShellComponent (selector pw-player-shell). It orchestrates all services and child components:
<pw-player-shell
manifestUrl="/stories/my-story/panelwave.json"
locale="en-US"
[showToolbar]="true"
(ready)="onReady()"
(panelChange)="onPanelChange($event)">
</pw-player-shell>
See Quickstart: Embed the Player for a complete working example and Inputs & Outputs for the full API.
The public API also exports a PlayerComponent with selector pw-player — it is a legacy stub and renders nothing useful. Always use pw-player-shell.
Where it's used
- Standalone reader sites — any Angular application on a supported version that loads a published manifest and embeds
pw-player-shell. - Self-hosted single works — the ready-made standalone package: one work next to an
index.htmlthat opens from disk or any static web space, no Angular project needed. - The demo application — ships in the same repository (
projects/demo), is the reference integration, and runs live at panelwave.github.io/player. See Demo App. - PanelWave CMS preview — the CMS uses the player for its preview environment so that what creators see is exactly what readers get. Rendering behavior lives in the player, not in a CMS fork.
- read.panelwave.org — where published works are read. Its frontend is the reader app in the same repository (
projects/reader), a full-windowpw-player-shell; see Development.
Project status
The library is released: it is on npm as @panelwave/player (current release 2.4.0), and new versions are published from the public GitHub repository by its release workflow. Release 2.4.0 reads every format up to 1.15 — see Versioning → Current releases for what each release added. Every change runs through lint, the unit suite, a Playwright end-to-end suite (desktop and mobile) and a bundle-size budget of 180 KB minified + gzipped (about 167 KB today) — see Development & Contributing.
A few surfaces are still deliberately thin, and the pages in this section say so where it matters: the comments drawer and share modal are UI only (persistence is the host's job), and the manga-mode and high-contrast settings are stored but not yet applied.
Explore this section
Installation
Peer dependencies, required providers, and app setup.
Quickstart: Embed
A minimal working embed with a real manifest.
Reader Interface
What readers see: viewport, toolbar, modals, input.
Inputs & Outputs
The complete pw-player-shell API reference.
Paywall & Entitlement
Tell the player what the reader owns; handle checkout in your app.
Plugins
Extend the player with sandboxed iframe plugins.
Demo App
Try manifests, device frames and dev tools in the browser.
For contributor-oriented material (services, components, data flow), start at Player Architecture.