Skip to content

Commit c7da36f

Browse files
committed
chore: update editor demo
1 parent ce36f14 commit c7da36f

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

packages/av-canvas/demo/video-editor.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
TimelineRow,
1212
TimelineState,
1313
} from '@xzdarcy/react-timeline-editor';
14-
import { file, write } from 'opfs-tools';
1514
import React, { useEffect, useRef, useState } from 'react';
1615
import { createRoot } from 'react-dom/client';
1716
import { AVCanvas } from '../src';
@@ -185,16 +184,16 @@ function App() {
185184
// })();
186185

187186
// 模拟添加 60个素材,验证内存占用
188-
(async () => {
189-
const f = file('/test-1.mp4');
190-
await write(f, (await fetch('./video/incorrect-frame-type.mp4')).body!);
191-
for (let i = 0; i < 60; i++) {
192-
const spr = new VisibleSprite(new MP4Clip(f));
193-
await spr.ready;
194-
await cvs.addSprite(spr);
195-
addSprite2Track('1-video', spr, '视频');
196-
}
197-
})();
187+
// (async () => {
188+
// const f = file('/test-1.mp4');
189+
// await write(f, (await fetch('./video/incorrect-frame-type.mp4')).body!);
190+
// for (let i = 0; i < 60; i++) {
191+
// const spr = new VisibleSprite(new MP4Clip(f));
192+
// await spr.ready;
193+
// await cvs.addSprite(spr);
194+
// addSprite2Track('1-video', spr, '视频');
195+
// }
196+
// })();
198197

199198
return () => {
200199
cvs.destroy();

0 commit comments

Comments
 (0)