audio-player: formatting

This commit is contained in:
Trek H 2019-08-11 16:54:30 +09:30
parent dc72371e74
commit 1865ff9c79
1 changed files with 24 additions and 23 deletions

View File

@ -23,8 +23,10 @@ LICENSE
*/ */
window.onload = function () { window.onload = function () {
document.getElementById('input').addEventListener('change', processData)
}
document.getElementById('input').addEventListener('change', function () { function processData() {
const input = event.target.files[0] const input = event.target.files[0]
const reader = new FileReader() const reader = new FileReader()
@ -53,5 +55,4 @@ window.onload = function () {
reader.onerror = error => reject(error) reader.onerror = error => reject(error)
reader.readAsArrayBuffer(input) reader.readAsArrayBuffer(input)
})
} }