1
0
Fork 0
peertube/shared/models/videos/video-file-metadata.ts
2020-06-23 16:00:49 +02:00

18 lines
539 B
TypeScript

import { FfprobeData } from 'fluent-ffmpeg'
import { DeepOmit } from '../../core-utils'
export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'>
export class VideoFileMetadata implements VideoFileMetadataModel {
streams: { [x: string]: any, [x: number]: any }[]
format: { [x: string]: any, [x: number]: any }
chapters: any[]
constructor (hash: Partial<VideoFileMetadataModel>) {
this.chapters = hash.chapters
this.format = hash.format
this.streams = hash.streams
delete this.format.filename
}
}