-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsample.ts
52 lines (47 loc) · 1.84 KB
/
sample.ts
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import type { TVideoProvider } from './types';
export const updateVideoStatus: TVideoProvider['updateVideoStatus'] = async (video) => {
return video
}
export const getVideoSearchResult: TVideoProvider['getVideoSearchResult'] = async (keyword) => {
return [
{ href: '', img: '', title: 'search 1', status: 'status 1' },
{ href: '', img: '', title: 'search 2', status: 'status 2' },
{ href: '', img: '', title: 'search 3', status: 'status 3' },
]
}
export const getHomeVideoList: TVideoProvider['getHomeVideoList'] = async () => {
return [
{
href: 'movie', title: 'movie', videos: [
{ href: '', img: '', title: 'movie 1', status: 'status 1' },
{ href: '', img: '', title: 'movie 2', status: 'status 2' },
{ href: '', img: '', title: 'movie 3', status: 'status 3' }
]
},
{
href: 'drama', title: 'drama', videos: [
{ href: '', img: '', title: 'drama 1', status: 'status 1' },
{ href: '', img: '', title: 'drama 2', status: 'status 2' },
]
}
]
};
export const getVideoCategory: TVideoProvider['getVideoCategory'] = getHomeVideoList
export const getVideoCategoryMore: TVideoProvider['getVideoCategoryMore'] = async (path, page) => {
return { href: path, title: '', videos: [] }
}
export const getVideoSources: TVideoProvider['getVideoSources'] = async (path) => {
return {
'source 1': [
{ href: '', ep: 'ep 1' },
{ href: '', ep: 'ep 2' },
{ href: '', ep: 'ep 3' },
],
'source 2': [
{ href: '', ep: 'ep 1' }
]
}
}
export const getVideoUrl: TVideoProvider['getVideoUrl'] = async (path: string) => {
return 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
}