LectureVideo
Defined in: v1/schemas.ts:697
…
Finding the video_id — use CoursesAPI.getLecture to fetch the
lecture and find the attachment where kind === 'video'. The attachment.id
is the video_id to pass to CoursesAPI.getVideo.
Example
Section titled “Example”// Find the video_id from a lecture's attachmentsconst { lecture } = await coursesAPI.getLecture(1886748, 42809204);const videoAttachment = lecture.attachments?.find(a => a.kind === 'video');if (videoAttachment) { const { video } = await coursesAPI.getVideo(1886748, 42809204, videoAttachment.id); console.log(`Stream: ${video.video_asset?.url}`);}Extends
Section titled “Extends”output<typeofLectureVideoSchema>
Properties
Section titled “Properties”id:
number
Defined in: v1/schemas.ts:674
Inherited from
Section titled “Inherited from”z.infer.id
media_duration?
Section titled “media_duration?”
optionalmedia_duration?:number|null
Defined in: v1/schemas.ts:678
Inherited from
Section titled “Inherited from”z.infer.media_duration
media_type?
Section titled “media_type?”
optionalmedia_type?:string
Defined in: v1/schemas.ts:677
Inherited from
Section titled “Inherited from”z.infer.media_type
status?
Section titled “status?”
optionalstatus?:string
Defined in: v1/schemas.ts:675
Inherited from
Section titled “Inherited from”z.infer.status
url_thumbnail?
Section titled “url_thumbnail?”
optionalurl_thumbnail?:string|null
Defined in: v1/schemas.ts:676
Inherited from
Section titled “Inherited from”z.infer.url_thumbnail
video_asset?
Section titled “video_asset?”
optionalvideo_asset?: {content_type?:string|null;url?:string|null; }
Defined in: v1/schemas.ts:679
content_type?
Section titled “content_type?”
optionalcontent_type?:string|null
optionalurl?:string|null
Inherited from
Section titled “Inherited from”z.infer.video_asset