19 lines
403 B
JavaScript
19 lines
403 B
JavaScript
|
/**
|
||
|
*
|
||
|
* @param {*} callback 回调
|
||
|
*/
|
||
|
function getLiveVideoList(callback){
|
||
|
fetch("/live/video/list")
|
||
|
.then(response => {
|
||
|
if (!response.ok) {
|
||
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
||
|
}
|
||
|
return response.json();
|
||
|
})
|
||
|
.then(data => {
|
||
|
callback.success(data);
|
||
|
})
|
||
|
.catch(error => {
|
||
|
callback.error(error);
|
||
|
});
|
||
|
}
|