- Preview
- Code
Installation
Usage
Import the modules (each callscustomElements.define), then use the elements. Nest the indicator inside a <bw-player-provider>.
<bw-time-indicator> finds its nearest
<bw-player-provider> ancestor and reads
currentTime and duration from it, updating on every player event. It
renders the raw values as {currentTime} / {duration}. Wrap them in your own
formatter (e.g. mm:ss) for a friendlier display.