Skip to main content

Installation

Usage

Import the modules (each calls customElements.define), then use the elements. Nest the button inside a <bw-player-provider>.
The button reads playbackState from the surrounding <bw-player-provider>. On click, it emits a PressedPlay / PressedPause event built with newEvent.
These components expect the BeyondWords player to be available as a global BeyondWords (the player UMD script). Load it before the provider connects.

Reference