File size: 288 Bytes
e4e0e54
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { promises as fs } from "node:fs"

import { Video } from "../types.mts"

export const readVideoMetadataFile = async (videoMetadataFilePath: string): Promise<Video> => {
  const video = JSON.parse(
    await fs.readFile(videoMetadataFilePath, 'utf8')
  ) as Video

  return video
}