You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the record plugin in firefox a continuous stream of erros occur in the developer tools console. This slows down drawing, making it lumpy. I expect the impact is minimal if dev tools are closed
Invalid URI. Load of media resource failed.
This error is not seen in the examples webpages as the iframe seems to lose the error. I converted the record.js example into a html page and served that from the waversurfer source and it is reproducable.
I can't find much info but it seems at some point Firefox devs decided to generate errors for setting invalid player media src values. the wavesurfer record plug triggers this by setting the player.js audio elements src property to an empty string which is invalid.
The code is in plugins/record.js renderMicStream -> drawWaveform
But the error will still occur if media.src was already set and so is reset to ''. However that seems to be a workaround for a browser bug, which may have been fixed.
This daft behaviour by Firefox as getSrc() returns '' but setSrc of '' logs an error.
Happy to provide a PR
Environment
Browser: Firefox - no prob in Chrome or Edge (on Windows)
Minimal code snippet
The Record.js example converted to a HTML page and using npx server .
Expected result
No stream of errors
Obtained result
Stream of errors
Screenshots
The text was updated successfully, but these errors were encountered:
SteveALee
changed the title
Recorder plugin in Firefox generates continuoues errors
Recorder plugin in Firefox generates continuous errors
Feb 21, 2025
Bug description
When using the record plugin in firefox a continuous stream of erros occur in the developer tools console. This slows down drawing, making it lumpy. I expect the impact is minimal if dev tools are closed
Invalid URI. Load of media resource failed.
This error is not seen in the examples webpages as the iframe seems to lose the error. I converted the record.js example into a html page and served that from the waversurfer source and it is reproducable.
I can't find much info but it seems at some point Firefox devs decided to generate errors for setting invalid player media src values. the wavesurfer record plug triggers this by setting the
player.js
audio elements src property to an empty string which is invalid.The code is in
plugins/record.js
renderMicStream -> drawWaveformTo work around I don't set
media.src
in player.js ifnewsrc
is falsey. ieBut the error will still occur if media.src was already set and so is reset to ''. However that seems to be a workaround for a browser bug, which may have been fixed.
This daft behaviour by Firefox as getSrc() returns '' but setSrc of '' logs an error.
Happy to provide a PR
Environment
Minimal code snippet
The Record.js example converted to a HTML page and using
npx server .
Expected result
No stream of errors
Obtained result
Stream of errors
Screenshots
The text was updated successfully, but these errors were encountered: