fix recording_url (#1818)
This commit is contained in:
@@ -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" />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user