This commit is contained in:
Harvey Zack committed 2018-10-12 16:58:58 +08:00
1 parent b74ff6052c
commit 495782f5c6
11 files changed
+504 -7

No files matched your search

+8
View File
@@ -9,3 +9,11 @@ export function errorHandle(condition, msg) {
export function clamp(num, a, b) {
return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
}
export function request(url) {
return fetch(url)
.then(response => response.arrayBuffer())
.catch(err => {
throw new ArtPlayerError(err.message);
});
}