Skip to content

Commit

Permalink
Populate recordingURL when source playback is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 committed Aug 16, 2023
1 parent d346aa7 commit 60a30e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/api/src/controllers/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,14 @@ async function getRecordingUrls(
// Recording V2
if (session.version === "v2") {
const asset = await db.asset.getBySessionId(session.id);
if (!asset || ["waiting", "processing"].includes(asset.status?.phase)) {
if (!asset) {
// Recording processing in progress
return;
}
const assetWithPlayback = await withPlaybackUrls(config, ingest, asset);
if (!assetWithPlayback.playbackUrl) {
return;
}
return {
recordingUrl: assetWithPlayback.playbackUrl,
mp4Url: assetWithPlayback.downloadUrl,
Expand Down

0 comments on commit 60a30e7

Please sign in to comment.