File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,11 @@ const renderSpectrogram = async (data) => {
350
350
} )
351
351
const run = async ( ) => {
352
352
// Load waveform from url
353
- const waveform = await loadWaveForm ( document . head . baseURI + 'examples/assets/0802/Truck_driving_by-Jason_Baker-2112866529_edit.wav' )
353
+ const waveform = await loadWaveForm (
354
+ new URL ( document . head . baseURI ) . origin +
355
+ new URL ( document . head . baseURI ) . pathname +
356
+ 'examples/assets/0802/Truck_driving_by-Jason_Baker-2112866529_edit.wav' ,
357
+ )
354
358
// Process the loaded wave form to prepare it for being added to the chart
355
359
const processed = await processWaveForm ( waveform )
356
360
// Create a dashboard from the processed waveform data
@@ -368,7 +372,10 @@ const renderSpectrogram = async (data) => {
368
372
369
373
const resumeImg = document . createElement ( 'img' )
370
374
resumeImg . crossOrigin = ''
371
- resumeImg . src = document . head . baseURI + 'examples/assets/0802/play_circle_outline-24px.svg'
375
+ resumeImg . src =
376
+ new URL ( document . head . baseURI ) . origin +
377
+ new URL ( document . head . baseURI ) . pathname +
378
+ 'examples/assets/0802/play_circle_outline-24px.svg'
372
379
resumeImg . style . width = '100%'
373
380
resumeImg . style . height = '100%'
374
381
You can’t perform that action at this time.
0 commit comments