Add .gitignore to exclude all node packages and lock files
This commit is contained in:
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
import { AudioSample, VideoSample } from 'mediabunny';
|
||||
export const addVideoSampleAndCloseFrame = async (frameToEncode, videoSampleSource) => {
|
||||
const sample = new VideoSample(frameToEncode);
|
||||
try {
|
||||
await videoSampleSource.add(sample);
|
||||
}
|
||||
finally {
|
||||
sample.close();
|
||||
frameToEncode.close();
|
||||
}
|
||||
};
|
||||
export const addAudioSample = async (audio, audioSampleSource) => {
|
||||
const sample = new AudioSample(audio);
|
||||
try {
|
||||
await audioSampleSource.add(sample);
|
||||
}
|
||||
finally {
|
||||
sample.close();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user