File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,17 @@ import hyparquetMp3 from './assets/hyparquet.mp3'
66export default function Welcome ( ) : ReactNode {
77 const audio = useRef < HTMLAudioElement > ( null )
88
9+ function playAudio ( ) {
10+ audio . current ?. play ( ) . catch ( ( ) => {
11+ console . warn ( 'Failed to play audio' )
12+ } )
13+ }
14+
915 return < div id = "welcome" >
1016 < h1 > hyparquet</ h1 >
1117 < sub > img
1218 /haɪ pɑːrˈkeɪ/
13- < img src = { audioSvg } alt = "play hyparquet pronunciation" height = "18" width = "18" onClick = { ( ) => { audio . current ?. play ( ) . catch ( ( ) => { return undefined } ) } } />
19+ < img src = { audioSvg } alt = "play hyparquet pronunciation" height = "18" width = "18" onClick = { playAudio } />
1420 </ sub >
1521 < audio ref = { audio } id = "audio" src = { hyparquetMp3 } > </ audio >
1622 < h2 > in-browser parquet file reader</ h2 >
You can’t perform that action at this time.
0 commit comments