ai-tube / src /lib /clap /emptyClap.ts
jbilcke-hf's picture
jbilcke-hf HF staff
working on some new features
3d4392e
raw history blame
No virus
353 Bytes
import { newClap } from "./newClap"
import { serializeClap } from "./serializeClap"
let globalState: {
blob?: Blob
} = {
blob: undefined
}
export async function getEmptyClap(): Promise<Blob> {
if (globalState.blob) { return globalState.blob }
const clap = newClap()
globalState.blob = await serializeClap(clap)
return globalState.blob
}