mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
12 lines
412 B
TypeScript
12 lines
412 B
TypeScript
import { extractVideoFrame } from './frame.ts';
|
|
|
|
const uri = new URL('./buckbunny.mp4', import.meta.url);
|
|
|
|
Deno.test('extractVideoFrame', async () => {
|
|
await using file = await Deno.open(uri);
|
|
|
|
const result = await extractVideoFrame(file.readable);
|
|
|
|
await Deno.mkdir(new URL('./tmp', import.meta.url), { recursive: true });
|
|
await Deno.writeFile(new URL('./tmp/poster.jpg', import.meta.url), result);
|
|
});
|