index.ts
899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { defHttp } from '@/utils/http'
enum Api {
GET_VIDEO_LIST = '/video',
STREAMING_PLAY_GET_URL = '/video/url',
RTSP_CLOSEFLV = '/rtsp.closeFlv',
}
// 获取视频组件--->频流
export const getVideoList = (organizationId?: string) => {
return defHttp.get({
url: Api.GET_VIDEO_LIST,
params: {
organizationId,
page: 1,
pageSize: 100,
},
})
}
// 获取流媒体播放地址
export const getStreamingPlayUrl = (entityId: string) => {
return defHttp.get({
url: `${Api.STREAMING_PLAY_GET_URL}/${entityId}`,
})
}
export const getFlvPlayUrl = (url: string, browserId: string) => {
return `/api/yt/rtsp/openFlv?url=${encodeURIComponent(url)}&browserId=${browserId}`
}
export const closeFlvPlay = (url: string, browserId: string) => {
return defHttp.get({
url: `/rtsp/closeFlv?url=${encodeURIComponent(url)}&browserId=${browserId}`,
})
}