We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In my renderer I'm trying to load an audio file placed in static/audio/sound.mp3, but it gives me file 404 not found.
renderer
static/audio/sound.mp3
const mp3 = path.join(__static, "/audio/sound.mp3"); const audio = new Audio(mp3); audio.play();
following the docs i used the __static variable but it's still not working. I also tried with images and it still not working.
__static
The text was updated successfully, but these errors were encountered:
the problem was that, when linking to static files don't use relative paths or absolute paths. just server from the current dir.
const mp3 = "audio/sound.mp3" const audio = new Audio(mp3); audio.play();
I think this should be mentioned in the docs
Sorry, something went wrong.
No branches or pull requests
In my
renderer
I'm trying to load an audio file placed instatic/audio/sound.mp3
, but it gives me file 404 not found.following the docs i used the
__static
variable but it's still not working.I also tried with images and it still not working.
The text was updated successfully, but these errors were encountered: