File size: 598 Bytes
846ea5b 63ac902 846ea5b 63ac902 846ea5b 63ac902 846ea5b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
"use server"
import { ClapProject } from "@aitube/clap"
import { exportClapToVideo as apiExportClapToVideo } from "@aitube/client"
import { getToken } from "./getToken"
export async function exportClapToVideo({
clap,
turbo = false,
}: {
clap: ClapProject
turbo?: boolean
}): Promise<string> {
// TODO: maybe we should return a blob instead,
// as this could be big eg. a few megabytes
// or maybe we should convert it to an object id
const dataUri: string = await apiExportClapToVideo({
clap,
format: "mp4",
turbo,
token: await getToken()
})
return dataUri
} |