34 lines
663 B
TypeScript
34 lines
663 B
TypeScript
import { Platforms } from "./settings"
|
|
|
|
export interface FetchParams {
|
|
baseUrl?: string
|
|
query?: string
|
|
}
|
|
|
|
export interface GalleryData {
|
|
videoUrl: string
|
|
imgUrl: string
|
|
text: string
|
|
platform: Platforms
|
|
}
|
|
|
|
export interface VideoSourceItem {
|
|
type: string,
|
|
src: string,
|
|
size: string
|
|
}
|
|
|
|
export interface VideoData {
|
|
hlsUrl?: string
|
|
srcSet?: VideoSourceItem[]
|
|
}
|
|
|
|
export interface MindGeekVideoSrcElem {
|
|
videoUrl: string
|
|
quality: string
|
|
}
|
|
|
|
export interface VideoAgent {
|
|
getGallery(params?: FetchParams): Promise<GalleryData[]>
|
|
getVideo(id: string, params?: FetchParams): Promise<[VideoData, GalleryData[]]>
|
|
} |