2.2.8

pardnchiu/FlexPlyr

Last updated

NoteThis README was generated by SKILL, get the ZH version from here.



ONE PLAYER API FOR HTML5, YOUTUBE AND VIMEO


npmDownloadsLicense




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 FPlyr config 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]
  1. graph TB
  2. A[FPlyr Config] --> B[FPlyr Core]
  3. H[Head Assets Injected on Load] -.-> B
  4. B --> C[Source Dispatch]
  5. C --> D[HTML5 video / audio]
  6. C --> E[YouTube IFrame API]
  7. C --> F[Vimeo Player API]
  8. B --> G[playerPanel Controls]
  9. D & E & F --> I[State Handlers]
  10. I --> G
  11. I --> J[when Lifecycle Callbacks]

License


This project is licensed under the MIT LICENSE.

Author


Just open an issue to share an idea.
FlexPlyr contributors


©️ 2024 邱敬幃 Pardn Chiu
中文