🎥 Make videos programmatically with React
ignore mp4box types
Jonny Burger27e01c8c38a0
diff --git a/packages/browser-renderer/src/types/mp4box.d.ts b/packages/browser-renderer/src/types/mp4box.d.tsindex f25a13dc31..f378615bc1 100644--- a/packages/browser-renderer/src/types/mp4box.d.ts+++ b/packages/browser-renderer/src/types/mp4box.d.ts@@ -1,3 +1,4 @@+/* eslint-disable @typescript-eslint/no-use-before-define */// https://github.com/gpac/mp4box.js/issues/233declare module 'mp4box' {@@ -454,20 +455,6 @@ declare module 'mp4box' {writeHeader(stream: any): void;}- export class HintSampleEntry extends SampleEntry {- constructor(type: any, size: any);- }-- export class MetadataSampleEntry extends SampleEntry {- constructor(type: any, size: any);-- isMetadata(): any;- }-- export class OpusSampleEntry extends SampleEntry {- constructor(size: any);- }-export class SampleEntry extends Box {constructor(type: any, size: any, hdr_size: any, start: any);@@ -491,6 +478,20 @@ declare module 'mp4box' {writeHeader(stream: any): void;}+ export class HintSampleEntry extends SampleEntry {+ constructor(type: any, size: any);+ }++ export class MetadataSampleEntry extends SampleEntry {+ constructor(type: any, size: any);++ isMetadata(): any;+ }++ export class OpusSampleEntry extends SampleEntry {+ constructor(size: any);+ }+export class SampleGroupEntry {constructor(type: any);diff --git a/packages/docs/docs/media-parser/parse-media.mdx b/packages/docs/docs/media-parser/parse-media.mdxindex 2335dd06e6..fb1d734afc 100644--- a/packages/docs/docs/media-parser/parse-media.mdx+++ b/packages/docs/docs/media-parser/parse-media.mdx@@ -68,7 +68,9 @@ Possible fields are:_`{width: number, height: number}`_-The dimensions of the video.+The dimensions of the video.+Any rotation is already applied - the dimensions are like a media player would show them.+Use `unrotatedDimensions` to get the dimensions before rotation.#### `durationInSeconds`@@ -98,6 +100,23 @@ The audio codec of the file.If multiple audio tracks are present, this will be the first audio track.One of `'aac'`, `'mp3'`, `'aiff'`, `'opus'`, `'pcm'`, `'unknown'` (audio is there but not recognized) or `null` (in case of no audio detected).+#### `tracks`++Returns two arrays `videoTracks` and `audioTracks`.+The data structure of them is not yet stable.++#### `unrotatedDimensions`++_`{width: number, height: number}`_++The dimensions of the video before rotation.++#### `rotation`++_number_++The rotation of the video in degrees (e.g. `-90` for a 90° counter-clockwise rotation).+### `reader`A reader interface.