feat: 新增流媒体推流统计卡片

This commit is contained in:
yangsy
2026-01-04 11:27:46 +08:00
parent 80e879e61f
commit 670054ca01
7 changed files with 169 additions and 3 deletions

View File

@@ -1,6 +1,16 @@
import { ndmClient, userClient, type MediaServerStatus, type Station } from '@/apis';
import { ndmClient, userClient, type MediaServerStatus, type SendRtpInfo, type Station } from '@/apis';
import { unwrapResponse } from '@/utils';
export const getAllPushApi = async (options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;
const prefix = stationCode ? `/${stationCode}` : '';
const endpoint = `${prefix}/api/ndm/ndmServiceAvailable/mediaServer/getAllPush`;
const resp = await client.get<SendRtpInfo[]>(endpoint, { signal });
const data = unwrapResponse(resp);
return data;
};
export const isMediaServerAliveApi = async (options?: { stationCode?: Station['code']; signal?: AbortSignal }) => {
const { stationCode, signal } = options ?? {};
const client = stationCode ? ndmClient : userClient;