Skip to main content

Installation

Usage

Import the modules (each calls customElements.define), then use the elements. Nest the playlist inside a <bw-player-provider>.
<bw-playlist> finds its nearest <bw-player-provider> ancestor and maps over its content. It renders a button per item and marks the active one (contentIndex) with a now-playing icon. Pressing an item emits a PressedPlaylistItem event (built with newEvent) carrying its index.
The event is emitted rather than setting player.contentIndex directly. This lets the player handle ads and outros correctly when switching tracks.
These components expect the BeyondWords player to be available as a global BeyondWords (the player UMD script). Load it before the provider connects.

Reference