ONE PLAYER FOR HTML5, YOUTUBE AND VIMEO — ZERO DEPENDENCIES
A lightweight JavaScript library for embeddable HTML5, YouTube, and Vimeo players with themeable panels and full lifecycle events
npm i @pardnchiu/flexplyr· Documentation
- One interface, four sources — A single
FPlyrclass auto-switches between HTML5 video/audio, YouTube, and Vimeo based on config, with no source-specific handling required by the caller. - Four built-in themed panels — Minimal, Classic, Retro, and Simple panel styles, with freely composable control buttons (play, progress, volume, rate, fullscreen).
- Zero dependencies, native-API driven — YouTube/Vimeo SDKs load on demand only when needed; everything else runs on native browser APIs for a tiny footprint.
- Full lifecycle events —
ready,playing,pause,end, anddestroyedcallbacks make it easy to hook into external logic. - Mobile-aware fullscreen handling — A dedicated fullscreen player instance handles
playsinlineand fullscreen state transitions on mobile devices.
graph TB
A[FPlyr Config] --> B[FPlyr Core]
B --> C[playerPanel Controls]
B --> D[Native / YouTube / Vimeo Source]
D --> E[when Lifecycle Events]
This project is licensed under the MIT LICENSE.
hi@pardn.io
https://www.linkedin.com/in/pardnchiu
©️ 2024 邱敬幃 Pardn Chiu
