mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
add mse
This commit is contained in:
1 parent
b74ff6052c
commit
495782f5c6
11 files changed
+504
-7
No files matched your search
@@ -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);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user