English | [中文](./README.zh-CN.md) # foo_ui_webview2 [![Docs](https://img.shields.io/badge/docs-online-brightgreen)](https://nereafantasia.github.io/foo_ui_webview2/) [![License](https://img.shields.io/badge/license-GPL--3.0%20%7C%20MIT-blue)](LICENSE) [![npm: foo-webview-sdk](https://img.shields.io/npm/v/foo-webview-sdk?label=foo-webview-sdk)](https://www.npmjs.com/package/foo-webview-sdk) [![npm: foo-ui-webview2-mcp](https://img.shields.io/npm/v/foo-ui-webview2-mcp?label=foo-ui-webview2-mcp)](https://www.npmjs.com/package/foo-ui-webview2-mcp) [![CI](https://github.com/NereaFantasia/foo_ui_webview2/actions/workflows/ci.yml/badge.svg)](https://github.com/NereaFantasia/foo_ui_webview2/actions/workflows/ci.yml) [![Release](https://img.shields.io/github/v/release/NereaFantasia/foo_ui_webview2)](https://github.com/NereaFantasia/foo_ui_webview2/releases) [![CodeQL](https://github.com/NereaFantasia/foo_ui_webview2/actions/workflows/codeql.yml/badge.svg)](https://github.com/NereaFantasia/foo_ui_webview2/actions/workflows/codeql.yml) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/NereaFantasia/foo_ui_webview2) **Documentation**: https://nereafantasia.github.io/foo_ui_webview2/ (English and Chinese) A modern UI component for foobar2000 built on WebView2 (C++ DLL). It turns the entire foobar2000 window into a WebView2 canvas, letting you build the interface with modern web technologies while keeping native Windows 11 visual effects (Mica/Acrylic). - License: GPL-3.0-or-later (main component) / MIT (`sdk/`, `mcp/`) --- ## Features - Full WebView2 UI — the entire client area is rendered by WebView2; build it with plain HTML/CSS/JS or any framework (Vue, React, …) - Runs three ways — standalone full-UI replacement, DUI panel, or CUI panel - Native Windows 11 effects — Mica / Acrylic / Tabbed backgrounds - Extended title bar into the client area — custom title bar content, Snap Layout support - Bidirectional C++ / JS bridge (BridgeCore) — player state and events pushed to your UI in real time - 400+ methods in 40+ namespaces, and 100+ events - Multi-window system — popup windows, cross-window messaging, async close handling - Web Components library (fb-* elements) and a typed TypeScript SDK on npm - SMP compatibility layer — Spider Monkey Panel knowledge and much existing code carry over - MCP Server — AI agent integration via CDP - Plugin extension system (PluginRegistry) — other components can expose APIs to your UI --- ## Why foo_ui_webview2? foobar2000 already has excellent customization stacks; this component occupies a different spot in the trade-off space: | | foo_ui_webview2 | JS panel hosts (JSplitter / SMP) | WebView panel components (foo_uie_webview / foo_webview2) | | --- | --- | --- | --- | | UI technology | Web platform — HTML/CSS/JS, any framework, Chromium DevTools | JavaScript over GDI/GDI+ drawing callbacks | Web platform | | Runs as | Standalone full UI, DUI/CUI panel, popup windows | Panel / splitter inside DUI or CUI | Panel inside DUI or CUI | | Player integration | Built-in bridge — playback, playlists, media library, metadata, artwork, queue, config, and more in one component | Mature, battle-tested script API with a large existing theme ecosystem | Host-object API centered on the panel and rendering | | Native windowing | Fullscreen, Mica/Acrylic, custom caption, multi-window (standalone mode) | Managed by the host UI | Managed by the host UI | | Skill / code reuse | Web skills; SMP knowledge via the compatibility layer | Existing SMP / JScript scripts and skills | Web skills | | AI tooling | MCP server included | — | — | These stacks compose rather than exclude each other: this component itself runs as a CUI/DUI panel next to your existing layout, and other foobar2000 components can register APIs into its bridge through PluginRegistry. --- ## Quick start (30 seconds) 1. Install the `.fb2k-component` package, then pick `Webview2 UI` under `File → Preferences → Display → Default User Interface` ([installation guide](https://nereafantasia.github.io/foo_ui_webview2/how-to/install)). 2. Save this as `\webview-ui\default\index.html` (create the folders if needed): ```html My foobar2000 UI

Waiting for playback...

``` 3. Restart foobar2000. No SDK files, no Node.js, no build step — the `fb2k` bridge is injected natively by the component. Until you deploy a template, the component shows a built-in test page with clickable API demos, so a fresh install is never a blank window. ## Templates & themes Default theme: The component ships without a built-in frontend. Place your WebUI under your foobar2000 **profile** directory at `webview-ui\