import { test } from 'vitest'; import { AudioSample, VideoSample } from '../../src/sample.js'; test('VideoSample creation from bytes', async () => { const bytes = new Uint8Array(1024); const sample = new VideoSample(bytes, { codedWidth: 1280, codedHeight: 720, format: 'RGBA', timestamp: 0, }); sample.close(); }); test('AudioSample creation from bytes', async () => { const bytes = new Uint8Array(1024); const sample = new AudioSample({ data: bytes, numberOfChannels: 2, format: 's16', sampleRate: 48000, timestamp: 0, }); sample.close(); });