- 顶部展示语音运行时状态:状态标签、LiveKit 版本、下载进度,未就绪时每 5 秒轮询 - 部署失败或不支持平台时提供重新部署入口 - 语音库配置弹窗:启用开关、目录、镜像地址、公网地址、监听地址、信令与媒体端口、启动超时、外部 IP 与节点 IP - 语音日志弹窗:增量拉取、自动刷新开关、手动刷新、最多保留 2000 条 - 房间语音容量设置:参与人数与旁听人数上限 - 补充语音相关 API 与类型定义 - 中英文各补 26 个文案
This commit is contained in:
1 parent
ac38c98203
commit
667c1a0900
4 files changed
+603
-4
No files matched your search
@@ -2252,3 +2252,118 @@ export function skinSiteChatAuditList(
|
||||
): Promise<SkinSiteResponse<SkinSiteChatAuditInfo[]>> {
|
||||
return skinSiteRequest<SkinSiteChatAuditInfo[]>('chat/rooms/' + roomId + '/audit')
|
||||
}
|
||||
|
||||
export type SkinSiteChatVoiceRuntimeState =
|
||||
| 'DISABLED'
|
||||
| 'NOT_INSTALLED'
|
||||
| 'DOWNLOADING'
|
||||
| 'VERIFYING'
|
||||
| 'EXTRACTING'
|
||||
| 'STARTING'
|
||||
| 'READY'
|
||||
| 'FAILED'
|
||||
| 'UNSUPPORTED_PLATFORM'
|
||||
|
||||
export interface SkinSiteChatVoiceRuntimeInfo {
|
||||
state: SkinSiteChatVoiceRuntimeState
|
||||
version: string
|
||||
progress?: number | null
|
||||
message?: string | null
|
||||
retryCount: number
|
||||
publicUrl?: string | null
|
||||
}
|
||||
|
||||
export interface SkinSiteChatVoiceGlobalConfig {
|
||||
enabled: boolean
|
||||
runtimePath: string
|
||||
mirrorBaseUrl: string
|
||||
publicUrl: string
|
||||
bindAddress: string
|
||||
signalPort: number
|
||||
rtcTcpPort: number
|
||||
rtcUdpPort: number
|
||||
startupTimeoutSeconds: number
|
||||
useExternalIp: boolean
|
||||
nodeIp: string
|
||||
}
|
||||
|
||||
export interface SkinSiteChatVoiceGlobalConfigUpdateResult {
|
||||
config: SkinSiteChatVoiceGlobalConfig
|
||||
runtime: SkinSiteChatVoiceRuntimeInfo
|
||||
restarted: boolean
|
||||
}
|
||||
|
||||
export interface SkinSiteChatVoiceLogEntry {
|
||||
id: number
|
||||
timestamp: number
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface SkinSiteChatVoiceLogPage {
|
||||
entries: SkinSiteChatVoiceLogEntry[]
|
||||
latestId: number
|
||||
}
|
||||
|
||||
export interface SkinSiteChatVoiceRoomInfo {
|
||||
roomId: number
|
||||
enabled: boolean
|
||||
available: boolean
|
||||
publisherLimit: number
|
||||
participantLimit: number
|
||||
listenerLimit: number
|
||||
participantCount: number
|
||||
publisherCount: number
|
||||
listenerCount: number
|
||||
joined: boolean
|
||||
observer: boolean
|
||||
muted: boolean
|
||||
bannedUntil?: number | null
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceRuntime(): Promise<
|
||||
SkinSiteResponse<SkinSiteChatVoiceRuntimeInfo>
|
||||
> {
|
||||
return skinSiteRequest<SkinSiteChatVoiceRuntimeInfo>('chat/voice/admin/runtime')
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceRuntimeRetry(): Promise<
|
||||
SkinSiteResponse<SkinSiteChatVoiceRuntimeInfo>
|
||||
> {
|
||||
return skinSiteRequest<SkinSiteChatVoiceRuntimeInfo>('chat/voice/admin/runtime/retry', {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceConfig(): Promise<
|
||||
SkinSiteResponse<SkinSiteChatVoiceGlobalConfig>
|
||||
> {
|
||||
return skinSiteRequest<SkinSiteChatVoiceGlobalConfig>('chat/voice/admin/config')
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceConfigUpdate(
|
||||
data: SkinSiteChatVoiceGlobalConfig,
|
||||
): Promise<SkinSiteResponse<SkinSiteChatVoiceGlobalConfigUpdateResult>> {
|
||||
return skinSiteRequest<SkinSiteChatVoiceGlobalConfigUpdateResult>(
|
||||
'chat/voice/admin/config',
|
||||
{ method: 'PUT', body: data },
|
||||
)
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceLogs(
|
||||
after?: number,
|
||||
limit = 300,
|
||||
): Promise<SkinSiteResponse<SkinSiteChatVoiceLogPage>> {
|
||||
const query = new URLSearchParams({ limit: String(limit) })
|
||||
if (after !== undefined) query.set('after', String(after))
|
||||
return skinSiteRequest<SkinSiteChatVoiceLogPage>('chat/voice/admin/logs?' + query.toString())
|
||||
}
|
||||
|
||||
export function skinSiteChatVoiceCapacityUpdate(
|
||||
roomId: number,
|
||||
data: { participantLimit: number; listenerLimit: number },
|
||||
): Promise<SkinSiteResponse<SkinSiteChatVoiceRoomInfo>> {
|
||||
return skinSiteRequest<SkinSiteChatVoiceRoomInfo>(
|
||||
'chat/admin/rooms/' + roomId + '/voice/capacity',
|
||||
{ method: 'PUT', body: data },
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user