Skip to content

Deferred player initialisation

Choose a tag to compare

@alphanull alphanull released this 29 Oct 16:51
· 3 commits to master since this release
08727e4

[1.2.1] - 2025-10-29

Added

  • The player can now be initialized only if it is actually visible in the viewport (using Intersection Observer on the target element). Use the config player.initOnIntersection and set it to true (or specify a specific observer config) to enable this feature. This is especially useful if you have several players below the fold and want to avoid impact on page load.
  • In addition, the player initialization can also be deferred using the new player.initOnIdle config option. In this case, the player will be initialized using the window.requestIdleCallback() method (not available in Safari, using rAF fallback in this case).
  • Both methods can also be combined. In this case, the first trigger "wins", and the player will be initialized only once.

Fixed

  • Some minor typos in the docs