Skip to content

Commit

Permalink
Fix: pass media error object to error event (#3973)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored Dec 25, 2024
1 parent 404f7ea commit 422a99e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wavesurfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class WaveSurfer extends Player<WaveSurferEvents> {
}),

this.onMediaEvent('error', (err) => {
this.emit('error', err.error)
this.emit('error', (this.getMediaElement().error ?? new Error('Media error')) as Error)
}),
)
}
Expand Down

0 comments on commit 422a99e

Please sign in to comment.