refactor(web): match the media player stand-in to the pipeline's props

The pipeline workstream's MediaPlayer takes artifactId, kind, name, poster
and size, without a MIME type; the card and the stand-in now use exactly
that, so its file replaces the stand-in without other changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
This commit is contained in:
Claude 2026-10-03 14:24:03 +00:00
parent f9ffa5a961
commit 97c7fd3a34
No known key found for this signature in database
2 changed files with 5 additions and 10 deletions

View File

@ -277,7 +277,6 @@ export function MediaCardView({
<MediaPlayer
artifactId={output.artifactId}
kind={output.kind}
mimeType={output.mimeType}
name={output.name}
posterArtifactId={output.posterArtifactId}
width={output.width}

View File

@ -1,20 +1,16 @@
// Stand-in for B1's media player; replaced by B1's component when its branch is merged.
// Stand-in for the pipeline workstream's media player (same props); its file replaces this one.
import { artifactUrl } from "../../lib/artifact-url";
export function MediaPlayer({
artifactId,
kind,
name,
posterArtifactId,
}: {
export type MediaPlayerProps = {
artifactId: string;
kind: "video" | "audio";
mimeType: string;
name: string;
posterArtifactId?: string;
width?: number;
height?: number;
}) {
};
export function MediaPlayer({ artifactId, kind, name, posterArtifactId }: MediaPlayerProps) {
if (kind === "audio") {
// biome-ignore lint/a11y/useMediaCaption: generated media has no caption track yet.
return <audio controls preload="metadata" src={artifactUrl(artifactId)} aria-label={name} />;