2.2.8

Deprecations

Last updated


This page lists the options and globals scheduled for removal in 3.x, their replacements, and the legacy package names that are already gone.

Options Scheduled for Removal in 3.x


Since 2.1.0, these top-level fields are replaced by option and when; they still work today:
LegacyReplacementNotes
typeoption.panelTypeoption.panelType wins
paneloption.panelItemoption.panelItem wins
volumeoption.volumeoption.volume is written when volume is passed with it, see Configuration
muteoption.muteWritten the same way; the player starts unmuted when the volume is above 0
eventwhenwhen wins

Globals Scheduled for Removal in 3.x


Legacy nameReplacementWhere
PDPlayerFPlyrGlobal from dist/FlexPlyr.js
playerFPlyrNamed export of dist/FlexPlyr.esm.js

Example


Legacy fields are still mapped onto the new ones:
  1. <div style="max-width: 480px; aspect-ratio: 16 / 9"><div id="player"></div></div>
  2. <script>
  3. const player = new PDPlayer({
  4. id: "player",
  5. video: "https://cdn.pixabay.com/video/2023/11/28/191159-889246512_tiny.mp4",
  6. type: "retro",
  7. panel: ["play", "progress", "full"],
  8. event: { ready: () => console.log("legacy event.ready fired") },
  9. });
  10. console.log("PDPlayer === FPlyr:", PDPlayer === FPlyr);
  11. console.log("panelType:", player.option.panelType);
  12. console.log("panelItem:", player.option.panelItem.join(","));
  13. </script>
Live preview · @pardnchiu/flexplyr@2.2.9

Removed


ItemRemoved inReplacement
npm package pdplayerkitRemoved in 2.2.6@pardnchiu/flexplyr
dist/PDPlayerKit.jsRemoved in 2.2.6dist/FlexPlyr.js
dist/PDPlayerKit.module.jsRemoved in 2.2.6dist/FlexPlyr.esm.js


中文