porkloin / gatsby-remark-audio

0 stars 3 forks source link

not playing audio under static folder #1

Open jesuissuyaa opened 4 years ago

jesuissuyaa commented 4 years ago

I placed my .wav file under /static/, and wrote the audio line as stated in the README. However, the audio is somehow not recognized by the plugin. The audio player shows 0:00 as the length of the music, and the play button is grayed out. On the other hand, when I put outside links (e.g. https://foo/bar.mp3) after audio:, the music plays fine.

How can I play audio files under my own project directory? Am I putting my files in the wrong place? Also, I am doing all of the above in localhost development; is this plugin only supposed to work after I build a page and not during development?

Thanks in advance.

jesuissuyaa commented 4 years ago

Was able to fix this by changing the markdown code from audio: /static/foo.wav to audio: /foo.wav

(location of audio file is still under static directory)