1.0.4 • Published 2 years ago

@nangu/mp4-scan v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@nangu/mp4-scan

Utility to scan an mp4 file and check whether it supports progressive download and playback or not.

It downloads the first 1kB of the MP4 file using a Range request and looks for MP4 moov box header atom in there. If moov atom is present, the MP4 can be played back progressively.

Intended for web environment. Not tested in node.js environment.

import { supportsProgressiveDownload } from '@nangu/mp4-scan'

const result = await supportsProgressiveDownload('https://cdn.myweb.com/myvideo.mp4')

// result === true or false

Known issues:

  • extended box size is not supported (this should be present only in videos larger than 4GB)

Sources of inspiration:

Changelog

1.0.4

  • patch: Added TypeScript typings

1.0.3

  • patch: Added TypeScript typings

1.0.2

  • patch: Added TypeScript typings

1.0.1

  • patch: Made NPM package public

1.0.0

  • major: Added functions supportsProgressiveDownload and parseMp4Boxes
1.0.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago