Skip to content

Commit

Permalink
Merge pull request #231 from Yukiniro/ya0fyass
Browse files Browse the repository at this point in the history
types: fix some wrong spell
  • Loading branch information
hughfenghen authored Aug 13, 2024
2 parents b34f94c + 10720b3 commit 4ef84d9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions doc-site/docs/demo/video-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const TimelineEditor = ({
timelineData: tlData,
onPreviewTime,
onOffsetChange,
onDuraionChange,
onDurationChange,
onDeleteAction,
timelineState,
onSplitAction,
Expand All @@ -39,7 +39,7 @@ const TimelineEditor = ({
timelineState: React.MutableRefObject<TimelineState | undefined>;
onPreviewTime: (time: number) => void;
onOffsetChange: (action: TimelineAction) => void;
onDuraionChange: (args: {
onDurationChange: (args: {
action: TimelineAction;
start: number;
end: number;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions packages/av-canvas/demo/video-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TimelineEditor = ({
timelineData: tlData,
onPreviewTime,
onOffsetChange,
onDuraionChange,
onDurationChange,
onDeleteAction,
timelineState,
onSplitAction,
Expand All @@ -31,7 +31,7 @@ const TimelineEditor = ({
timelineState: React.MutableRefObject<TimelineState | undefined>;
onPreviewTime: (time: number) => void;
onOffsetChange: (action: TimelineAction) => void;
onDuraionChange: (args: {
onDurationChange: (args: {
action: TimelineAction;
start: number;
end: number;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/av-cliper/src/combinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class Combinator {

ts += timeSlice;

await letEncoderCalmDown(remux.getEecodeQueueSize);
await letEncoderCalmDown(remux.getEncodeQueueSize);
}
};

Expand Down
4 changes: 2 additions & 2 deletions packages/av-cliper/src/mp4-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function recodemux(opts: IRecodeMuxOpts): {
/**
* 返回队列长度(背压),用于控制生产视频的进度,队列过大会会占用大量显存
*/
getEecodeQueueSize: () => number;
getEncodeQueueSize: () => number;
} {
Log.info('recodemux opts:', opts);
const mp4file = mp4box.createFile();
Expand Down Expand Up @@ -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([
Expand Down

0 comments on commit 4ef84d9

Please sign in to comment.