File size: 564 Bytes
65d68f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { apiGet } from "@/lib/api/client";

export type PhysicsChapterVideoStatus = {
  chapterId: string;
  title: string | null;
  status: string;
  ready: boolean;
  qaPassed: boolean;
  audioPresent: boolean;
  resolution: { width?: number; height?: number } | null;
  durationSeconds: number | null;
  downloadUrl: string | null;
};

export function getPhysicsChapterVideoStatus(chapterId: string) {
  return apiGet<PhysicsChapterVideoStatus>(
    `/video/physics-curriculum/chapters/${encodeURIComponent(chapterId)}/video`,
    { cache: "no-store" },
  );
}