fix recording_url (#1818)

This commit is contained in:
Ming Fang
2025-03-04 01:13:32 -05:00
committed by GitHub
parent b5ef95fddb
commit a5ecdd9d7d

View File

@@ -1,8 +1,12 @@
import { useWorkflowRunQuery } from "../hooks/useWorkflowRunQuery";
import { artifactApiBaseUrl } from "@/util/env";
function WorkflowRunRecording() {
const { data: workflowRun } = useWorkflowRunQuery();
const recordingURL = workflowRun?.recording_url;
let recordingURL = workflowRun?.recording_url;
if (recordingURL?.startsWith("file://")) {
recordingURL = `${artifactApiBaseUrl}/artifact/recording?path=${recordingURL.slice(7)}`;
}
return recordingURL ? (
<video src={recordingURL} controls className="w-full rounded-md" />
) : (