@arraypress/waveform-player 1.16.1 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -104,7 +104,7 @@ In zero-config markup, pass a gradient as a JSON array: `data-waveform-color='["
104
104
  <div data-waveform-player
105
105
  data-url="track.mp3"
106
106
  data-title="My Song"
107
- data-subtitle="Artist Name"
107
+ data-artist="Artist Name"
108
108
  data-waveform-style="mirror"
109
109
  data-bar-radius="3"
110
110
  data-show-playback-speed="true"
@@ -156,7 +156,7 @@ const player = new WaveformPlayer('#player', {
156
156
  | `audioMode` | `'self' \| 'external'`| `'self'` | Own the `<audio>`, or delegate (see below) |
157
157
  | `markers` | `WaveformMarker[]` | `[]` | Chapter markers |
158
158
  | `showControls` | `boolean` | `true` | Show the play/pause button |
159
- | `showInfo` | `boolean` | `true` | Show title/subtitle/time |
159
+ | `showInfo` | `boolean` | `true` | Show title/artist/time |
160
160
  | `showPlaybackSpeed` | `boolean` | `false` | Show the speed menu |
161
161
  | `showBPM` | `boolean` | `false` | Detect + display BPM |
162
162
  | `autoplay` | `boolean` | `false` | Play on load |
@@ -227,7 +227,7 @@ Set `audioMode: 'external'` and the player becomes a visualization-only surface:
227
227
  const player = new WaveformPlayer(el, { audioMode: 'external' });
228
228
 
229
229
  el.addEventListener('waveformplayer:request-play', (e) => {
230
- audio.src = e.detail.url; // e.detail = { url, title, subtitle, artist, artwork, id, player }
230
+ audio.src = e.detail.url; // e.detail = { url, title, artist, artwork, id, player }
231
231
  audio.play();
232
232
  });
233
233
  audio.addEventListener('timeupdate', () => player.setProgress(audio.currentTime, audio.duration));
@@ -237,7 +237,7 @@ audio.addEventListener('pause', () => player.setPlayingState(false));
237
237
 
238
238
  | Event | Detail |
239
239
  | ------------------------------ | --------------------------------------------------- |
240
- | `waveformplayer:request-play` | `{ url, title, subtitle, artist, artwork, id, player }` |
240
+ | `waveformplayer:request-play` | `{ url, title, artist, artwork, id, player }` |
241
241
  | `waveformplayer:request-pause` | Same shape |
242
242
  | `waveformplayer:request-seek` | Same shape + `{ percent: 0..1 }` |
243
243