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>.
<bw-download-button> finds its nearest <bw-player-provider> ancestor. On click, it finds the current item’s MP3 audio and emits a PressedDownload event (built with newEvent) carrying the contentIndex and audioIndex. If the current item has no MP3, the click is a no-op.
These components expect the BeyondWords player to be available as a global BeyondWords (the player UMD script). Load it before the provider connects.

Reference