+ const videos = formattedVideoFiles.map(videoFile => {
+ const result = {
+ type: 'video/mp4',
+ medium: 'video',
+ height: videoFile.resolution.label.replace('p', ''),
+ fileSize: videoFile.size,
+ url: videoFile.fileUrl,
+ framerate: videoFile.fps,
+ duration: video.duration
+ }
+
+ if (video.language) Object.assign(result, { lang: video.language })
+
+ return result
+ })
+
+ const categories: { value: number, label: string }[] = []
+ if (video.category) {
+ categories.push({
+ value: video.category,
+ label: VideoModel.getCategoryLabel(video.category)
+ })
+ }
+