pardnchiu/FlexPlyr
Last updated
NoteThis README was generated by SKILL, get the ZH version from here.
WarningArchived on 2026-10-30. FlexPlyr is no longer maintained. The final release isv2.2.9;npm i @pardnchiu/flexplyrand the jsDelivr build remain available, but no new features, bug fixes, or security updates will be published, and issues and pull requests are no longer accepted.
ONE PLAYER API FOR HTML5, YOUTUBE AND VIMEO
A JavaScript player library with unified HTML5/YouTube/Vimeo sources, themed control panels, and lifecycle events
Table of Contents
Features
npm i @pardnchiu/flexplyr · Documentation- Four sources, one interface — A single
FPlyrconfig object drives HTML5 video, audio, YouTube, and Vimeo, so play, pause, volume, and speed behave identically for the caller. - Four composable panel themes — Minimal, Classic, Retro, and Simple panels ship built in, and eight control items can be picked and ordered freely.
- One script tag to go live — On load it injects the stylesheet, Material Symbols icons, and the YouTube/Vimeo SDKs, so no build step or extra includes are needed.
- Full lifecycle events — Five callbacks (
ready,playing,pause,end,destroyed) make it easy to hook in external logic and clean up resources. - Synced mobile fullscreen — A hidden dedicated fullscreen player takes over on mobile and syncs progress, volume, and speed on entry and exit.
Architecture
Full Architecture
graph TB
A[FPlyr Config] --> B[FPlyr Core]
H[Head Assets Injected on Load] -.-> B
B --> C[Source Dispatch]
C --> D[HTML5 video / audio]
C --> E[YouTube IFrame API]
C --> F[Vimeo Player API]
B --> G[playerPanel Controls]
D & E & F --> I[State Handlers]
I --> G
I --> J[when Lifecycle Callbacks]- graph TB
- A[FPlyr Config] --> B[FPlyr Core]
- H[Head Assets Injected on Load] -.-> B
- B --> C[Source Dispatch]
- C --> D[HTML5 video / audio]
- C --> E[YouTube IFrame API]
- C --> F[Vimeo Player API]
- B --> G[playerPanel Controls]
- D & E & F --> I[State Handlers]
- I --> G
- I --> J[when Lifecycle Callbacks]
License
This project is licensed under the MIT LICENSE.
Author
Just open an issue to share an idea.
©️ 2024 邱敬幃 Pardn Chiu