feat: fix merge audio

This commit is contained in:
2026-02-27 13:42:14 +01:00
parent 582992551e
commit cdaf7b2727
5 changed files with 177 additions and 18 deletions
+3 -2
View File
@@ -12,6 +12,7 @@ const ffmpeg = require('fluent-ffmpeg')
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg')
const { Buffer } = require('node:buffer')
const { FieldValue } = require('firebase-admin/firestore')
const { REGION } = require('../index')
if (!admin.apps.length) admin.initializeApp()
ffmpeg.setFfmpegPath(ffmpegInstaller.path)
@@ -151,7 +152,7 @@ async function markPlaybackCompatibility({ projectId, initiatorUid = null }) {
}
exports.mergeVideoAndAudio = onCall(
{ timeoutSeconds: 540, memory: '1GiB' },
{ region: REGION, timeoutSeconds: 540, memory: '1GiB' },
async ({ data = {}, auth }) => {
const uid = auth?.uid
if (!uid) throw new HttpsError('unauthenticated', 'Authentification requise')
@@ -176,7 +177,7 @@ exports.mergeVideoAndAudio = onCall(
)
exports.reencodePlayback = onCall(
{ timeoutSeconds: 540, memory: '1GiB' },
{ region: REGION, timeoutSeconds: 540, memory: '1GiB' },
async ({ data = {}, auth }) => {
const uid = auth?.uid
if (!uid) throw new HttpsError('unauthenticated', 'Authentification requise')