完善节目管理与回放播放体验

This commit is contained in:
admin committed 2026-08-17 09:59:04 +08:00
1 parent b265518084
commit a493ef2309
14 files changed
+446 -96

No files matched your search

+28 -3
View File
@@ -5,13 +5,23 @@ export interface StreamInfo {
title: string
description?: string
cover_url?: string
stream_key: string
stream_key?: string
status: string
scheduled_at?: string
started_at?: string
ended_at?: string
multicast_enabled: boolean
created_at: string
replay_file?: string
chapters: Chapter[]
transcode_profile: string
homepage_visible: boolean
remote_control_enabled: boolean
}
export interface Chapter {
title: string
time: number
}
export interface StreamCreateReq {
@@ -19,6 +29,11 @@ export interface StreamCreateReq {
description?: string
cover_url?: string
scheduled_at?: string
replay_file?: string
chapters?: Chapter[]
transcode_profile?: string
homepage_visible?: boolean
remote_control_enabled?: boolean
}
export interface WatchInfo {
@@ -29,6 +44,11 @@ export interface WatchInfo {
selected_node?: { id: string; name: string } | null
lines: LineInfo[]
qualities: QualityInfo[]
description?: string
scheduled_at?: string
replay_url?: string
chapters: Chapter[]
remote_control_enabled: boolean
}
export interface LineInfo {
@@ -54,8 +74,13 @@ export interface QualityInfo {
height: number
}
export async function fetchStreams(): Promise<StreamInfo[]> {
const { data } = await api.get('/streams')
export async function fetchStreams(admin = false): Promise<StreamInfo[]> {
const { data } = await api.get('/streams', { params: admin ? { admin: true } : undefined })
return data
}
export async function fetchMediaFiles(): Promise<string[]> {
const { data } = await api.get('/streams/media-files')
return data
}