+ const videoInfo: VideoDetails = await videoResponse.json()
+ let videoCaptions: VideoJSCaption[] = []
+ if (captionsResponse.ok) {
+ const { data } = (await captionsResponse.json()) as ResultList<VideoCaption>
+ videoCaptions = data.map(c => ({
+ label: c.language.label,
+ language: c.language.id,
+ src: window.location.origin + c.captionPath
+ }))
+ }