Using React? Everything here is also available as
React components. Use the React / HTML tabs
at the top of the Components section.
How it works
The kit is three layers on top of one engine. Stop at whichever layer gives you the control you need:- Player Provider:
<bw-player-provider>mounts the player JavaScript SDK (loaded as the globalBeyondWords), holds the instance, and shares it with the elements inside. This is the foundation everything else sits on. - Components: small, minimal custom elements like Play Pause Button and Progress Bar. You bring the styling.
- Examples: complete, pre-assembled players you drop in and tweak, like the Standard Player.
- It reads state from the player instance by extending
BwPlayerConsumer, which resolves the nearest provider and exposes the instance asthis._player. Elements stay in sync by listening for player events and updating their own markup. - It drives the player by emitting events built with
newEvent. This is the same path the standard player UI uses, so analytics, ads and segment logic stay correct. Simple state such asplaybackRatecan also be set directly on the instance.
Next steps
Setup
Install the elements and build your first player.
Components
Browse the minimal building blocks.
Theming
Restyle the elements to match your brand.
Examples
Drop in a complete, pre-built player.