@bililive-tools/douyin-recorder
Version:
@bililive-tools douyin recorder implemention
34 lines (33 loc) • 838 B
TypeScript
export type APIType = "web" | "webHTML" | "mobile" | "userHTML" | "balance" | "random";
export type RealAPIType = Exclude<APIType, "balance" | "random">;
export interface APIEndpoint {
name: APIType;
priority: number;
weight: number;
}
export interface APIEndpointStatus {
endpoint: APIEndpoint;
failureCount: number;
lastFailureTime: number;
isBlocked: boolean;
nextRetryTime: number;
}
export interface LoadBalancerConfig {
maxFailures: number;
blockDuration: number;
retryMultiplier: number;
healthCheckInterval: number;
}
export interface RoomInfo {
living: boolean;
nickname: string;
sec_uid: string;
avatar: string;
api: RealAPIType;
room: {
title: string;
cover: string;
id_str: string;
stream_url: any | null;
} | null;
}