Skip to content

Commit bd7a202

Browse files
arraypressclaude
andcommitted
feat(i18n): forward new localizable player options
Wire the five new core options through to the underlying player: seekValueText, playPauseLabel, speedLabel, artworkAlt, unknownTrackText (each also emitted as its data-* attribute in the Astro wrappers). Prop types are Omit<WaveformPlayerOptions>-derived, so they pick these up automatically once the core is republished with the updated index.d.ts (the keys landed after core 1.19.3 was published). Runtime forwarding here is correct and version-independent; strict typecheck turns green after the core republish + dep bump. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 72f1dc9 commit bd7a202

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/WaveformPlayer.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ function buildLibraryOptions(props: WaveformPlayerProps): Record<string, unknown
116116
/* Accessibility */
117117
if (props.accessibleSeek !== undefined) opts.accessibleSeek = props.accessibleSeek;
118118
if (props.seekLabel !== undefined) opts.seekLabel = props.seekLabel;
119+
if (props.seekValueText !== undefined) opts.seekValueText = props.seekValueText;
120+
if (props.playPauseLabel !== undefined) opts.playPauseLabel = props.playPauseLabel;
121+
if (props.speedLabel !== undefined) opts.speedLabel = props.speedLabel;
119122

120123
/* Error UI */
121124
if (props.errorText !== undefined) opts.errorText = props.errorText;
@@ -128,7 +131,9 @@ function buildLibraryOptions(props: WaveformPlayerProps): Record<string, unknown
128131
if (props.title !== undefined) opts.title = props.title;
129132
if (props.artist !== undefined) opts.artist = props.artist;
130133
if (props.artwork !== undefined) opts.artwork = props.artwork;
134+
if (props.artworkAlt !== undefined) opts.artworkAlt = props.artworkAlt;
131135
if (props.album !== undefined) opts.album = props.album;
136+
if (props.unknownTrackText !== undefined) opts.unknownTrackText = props.unknownTrackText;
132137

133138
/* Behaviour */
134139
if (props.autoplay !== undefined) opts.autoplay = props.autoplay;
@@ -314,13 +319,18 @@ export const WaveformPlayer = forwardRef<WaveformPlayerHandle, WaveformPlayerPro
314319
props.buttonSize,
315320
props.accessibleSeek,
316321
props.seekLabel,
322+
props.seekValueText,
323+
props.playPauseLabel,
324+
props.speedLabel,
317325
props.errorText,
318326
props.markers,
319327
props.showMarkers,
320328
props.title,
321329
props.artist,
322330
props.artwork,
331+
props.artworkAlt,
323332
props.album,
333+
props.unknownTrackText,
324334
props.autoplay,
325335
props.singlePlay,
326336
props.playOnSeek,

0 commit comments

Comments
 (0)