소스 검색

Remote audio load handles errors properly

tags/v0.1.0
Fen Dweller 6 년 전
부모
커밋
69a19430e7
No known key found for this signature in database GPG 키 ID: E80B35A6F11C3656
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      audio.js

+ 7
- 1
audio.js 파일 보기

@@ -60,7 +60,13 @@ function loadRemoteAudio(name) {

xhr.open("GET", audioBaseUrl + name, true);
xhr.responseType = "arraybuffer";
xhr.onload = (xhr) => cacheAndParse(name, xhr.data);
xhr.onload = (xhr) => {
if (xhr.status == 200)
cacheAndParse(name, xhr.data);
else
console.log("Couldn't load " + name);
}
xhr.onerror = (xhr) => console.log("Couldn't load " + name);
xhr.send();
}



불러오는 중...
취소
저장