Mfuns-cn / videoType

Get video size, duration and type from url or File

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VideoType

Get video size, duration and type from url or File

need fetch api support

Usage

import { getVideoType, getVideoDuration, getVideoSize } from 'videotype'

const type = await getVideoType('https://media.w3.org/2010/05/sintel/trailer.mp4')
const duraction = await getVideoDuration('https://media.w3.org/2010/05/sintel/trailer.mp4')
const size = await getVideoSize('https://media.w3.org/2010/05/sintel/trailer.mp4')

About

Get video size, duration and type from url or File

License:MIT License


Languages

Language:TypeScript 100.0%