diff --git a/doc-site/docs/demo/video-editor.tsx b/doc-site/docs/demo/video-editor.tsx index ae097e95..396e431d 100644 --- a/doc-site/docs/demo/video-editor.tsx +++ b/doc-site/docs/demo/video-editor.tsx @@ -30,7 +30,7 @@ const TimelineEditor = ({ timelineData: tlData, onPreviewTime, onOffsetChange, - onDuraionChange, + onDurationChange, onDeleteAction, timelineState, onSplitAction, @@ -39,7 +39,7 @@ const TimelineEditor = ({ timelineState: React.MutableRefObject; onPreviewTime: (time: number) => void; onOffsetChange: (action: TimelineAction) => void; - onDuraionChange: (args: { + onDurationChange: (args: { action: TimelineAction; start: number; end: number; @@ -109,7 +109,7 @@ const TimelineEditor = ({ }} onActionResizing={({ dir, action, start, end }) => { if (dir === 'left') return false; - return onDuraionChange({ action, start, end }); + return onDurationChange({ action, start, end }); }} onActionMoveEnd={({ action }) => { onOffsetChange(action); @@ -356,7 +356,7 @@ export default function App() { if (spr == null) return; spr.time.offset = action.start * 1e6; }} - onDuraionChange={({ action, start, end }) => { + onDurationChange={({ action, start, end }) => { const spr = actionSpriteMap.get(action); if (spr == null) return false; const duration = (end - start) * 1e6; diff --git a/packages/av-canvas/demo/video-editor.tsx b/packages/av-canvas/demo/video-editor.tsx index 0392dee8..281c009f 100644 --- a/packages/av-canvas/demo/video-editor.tsx +++ b/packages/av-canvas/demo/video-editor.tsx @@ -22,7 +22,7 @@ const TimelineEditor = ({ timelineData: tlData, onPreviewTime, onOffsetChange, - onDuraionChange, + onDurationChange, onDeleteAction, timelineState, onSplitAction, @@ -31,7 +31,7 @@ const TimelineEditor = ({ timelineState: React.MutableRefObject; onPreviewTime: (time: number) => void; onOffsetChange: (action: TimelineAction) => void; - onDuraionChange: (args: { + onDurationChange: (args: { action: TimelineAction; start: number; end: number; @@ -101,7 +101,7 @@ const TimelineEditor = ({ }} onActionResizing={({ dir, action, start, end }) => { if (dir === 'left') return false; - return onDuraionChange({ action, start, end }); + return onDurationChange({ action, start, end }); }} onActionMoveEnd={({ action }) => { onOffsetChange(action); @@ -319,7 +319,7 @@ function App() { if (spr == null) return; spr.time.offset = action.start * 1e6; }} - onDuraionChange={({ action, start, end }) => { + onDurationChange={({ action, start, end }) => { const spr = actionSpriteMap.get(action); if (spr == null) return false; const duration = (end - start) * 1e6; diff --git a/packages/av-cliper/src/combinator.ts b/packages/av-cliper/src/combinator.ts index bbfee096..4e9fb897 100644 --- a/packages/av-cliper/src/combinator.ts +++ b/packages/av-cliper/src/combinator.ts @@ -381,7 +381,7 @@ export class Combinator { ts += timeSlice; - await letEncoderCalmDown(remux.getEecodeQueueSize); + await letEncoderCalmDown(remux.getEncodeQueueSize); } }; diff --git a/packages/av-cliper/src/mp4-utils/index.ts b/packages/av-cliper/src/mp4-utils/index.ts index 2598de8d..dff45969 100644 --- a/packages/av-cliper/src/mp4-utils/index.ts +++ b/packages/av-cliper/src/mp4-utils/index.ts @@ -84,7 +84,7 @@ export function recodemux(opts: IRecodeMuxOpts): { /** * 返回队列长度(背压),用于控制生产视频的进度,队列过大会会占用大量显存 */ - getEecodeQueueSize: () => number; + getEncodeQueueSize: () => number; } { Log.info('recodemux opts:', opts); const mp4file = mp4box.createFile(); @@ -139,7 +139,7 @@ export function recodemux(opts: IRecodeMuxOpts): { aEncoder.encode(ad); ad.close(); }, - getEecodeQueueSize: () => + getEncodeQueueSize: () => vEncoder?.encodeQueueSize ?? aEncoder?.encodeQueueSize ?? 0, flush: async () => { await Promise.all([