Properties
Private
#audioFrameFinder
#audioFrameFinder: null | AudioFrameFinder = null
Private
#audioSamples
#audioSamples: ExtMP4Sample[] = []
Private
#decoderConf
#decoderConf: {
audio: null | AudioDecoderConfig;
video: null | VideoDecoderConfig;
} = ...
Type declaration
audio: null | AudioDecoderConfig
video: null | VideoDecoderConfig
Private
#destroyed
#destroyed: boolean = false
Private
#insId
#insId: number = ...
Private
#localFile
#localFile: OPFSFileWrap
Private
#log
#log: {
[k: string]: ((...args) => void);
} = ...
Type declaration
[k: string]: ((...args) => void)
- (...args): void
Returns void
Private
#meta
#meta: {
audioChanCount: number;
audioSampleRate: number;
duration: number;
height: number;
width: number;
} = ...
Type declaration
audioChanCount: number
audioSampleRate: number
duration: number
height: number
width: number
Private
#opts
#opts: MP4ClipOpts = ...
Private
#thumbAborter
#thumbAborter: AbortController = ...
Private
#videoFrameFinder
#videoFrameFinder: null | VideoFrameFinder = null
Private
#videoSamples
#videoSamples: ExtMP4Sample[] = []
Private
#volume
#volume: number = 1
ready
ready: Promise<IClipMeta>
tickInterceptor
tickInterceptor: (<T>(time,
tickRet) => Promise<T>) = ... Type declaration
- <T>(time, tickRet): Promise<T>
Type Parameters
- T extends {
audio: Float32Array[];
state: "done" | "success";
video?: VideoFrame;
}
Returns Promise<T>
MP4 素材,解析 MP4 文件,使用 MP4Clip.tick 按需解码指定时间的图像帧
可用于实现视频抽帧、生成缩略图、视频编辑等功能
Example
See