feat(stream): add streaming endpoint and indicator

This commit is contained in:
2026-06-20 16:21:18 +01:00
parent 2b1f8ce710
commit a0efa3eb8c
9 changed files with 82 additions and 12 deletions

View File

@@ -295,6 +295,13 @@ const deleteClip = async (id: number): Promise<void> => {
}
};
const getStreamStatus = async (): Promise<boolean> => {
const response = await fetch(API_URL + '/api/v1/stream/current', { credentials: 'include' });
if (!response.ok) return false;
const result: APIResponse = await response.json();
return result.status === 'success' && result.data?.isStreaming === true;
};
const isThumbnailAvailable = async (id: number): Promise<boolean> => {
const response = await fetch(API_URL + `/api/v1/download/thumbnail/${id}`, {credentials: "include"});
return response.ok;
@@ -305,6 +312,7 @@ const isThumbnailAvailable = async (id: number): Promise<boolean> => {
export {
login,
logout,
getStreamStatus,
uploadFile,
editFile,
processFile,