Button Audio Player with One Audio File
The audio player button I introduced in the following post uses two audio files in accordance with the developer's instruction. However, I feel that using only the .mp3 file might be enough (due to my laziness), and have no problems so far. So, I'd also like to share how I modified the JavaScript file so as not to cause errors. Remove or Comment Out Some Lines After downloading the fantastic JavaScript file from the developer's website, remove (or comment out) some lines as follows. // lines to remove or comment out // line 37 var setDir = './' ; // 音声ファイルがあるフォルダ(最後は[/]) // line 62 & 63 if( audio.canPlayType( 'audio/mp3' ) …