This commit is contained in:
eric
2026-03-29 01:54:10 -05:00
parent 784a4468b8
commit c3ee09674f
13 changed files with 4347 additions and 70 deletions

View File

@@ -3,6 +3,8 @@
import { Cable, Copy, Monitor, Radio } from "lucide-react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import type { PortalNavTarget } from "@/components/live-product/LivePipelineStrip";
import { LivePipelineStrip } from "@/components/live-product/LivePipelineStrip";
import { LiveProcessLiveLogCard } from "@/components/live-product/LiveProcessLiveLogCard";
type ProcessEntry = { pm2: string; script: string; label: string };
@@ -57,6 +59,7 @@ type Props = {
onSaveUrlConfig: (content?: string) => void | Promise<void>;
onCopy: (text: string) => void;
fetchJson: <T,>(path: string, init?: RequestInit) => Promise<T>;
onNavigate?: (target: PortalNavTarget) => void;
};
export function LiveTiktokHdmiView({
@@ -71,6 +74,7 @@ export function LiveTiktokHdmiView({
onSaveUrlConfig,
onCopy,
fetchJson,
onNavigate,
}: Props) {
const tkEntries = useMemo(() => entries.filter(isTiktokProcess), [entries]);
const processOptions = tkEntries.length ? tkEntries : entries;
@@ -179,6 +183,41 @@ export function LiveTiktokHdmiView({
return (
<div className="mx-auto max-w-4xl space-y-6">
{onNavigate ? (
<LivePipelineStrip
t={t}
title={t("TikTok HDMI 硬件链路", "TikTok HDMI hardware chain")}
subtitle={t(
"从板端编码到采集卡再到安卓;与「网络」页顶卡相同的箭头风格。",
"Encode → HDMI → capture → Android; same arrow style as Network header.",
)}
onNavigate={onNavigate}
steps={[
{
label: "FFmpeg",
sub: t("采集 / 推流", "Capture"),
gradient: "from-cyan-400 to-blue-500",
target: "live_tiktok",
},
{
label: "HDMI",
sub: t("板载输出", "SoC out"),
gradient: "from-violet-500 to-fuchsia-500",
},
{
label: t("采集卡", "Capture card"),
sub: "USB / PCIe",
gradient: "from-emerald-400 to-teal-500",
},
{
label: "Android",
sub: t("AOSP / 手机", "AOSP"),
gradient: "from-amber-400 to-orange-500",
target: "android",
},
]}
/>
) : null}
<div className="rounded-2xl border border-cyan-500/25 bg-gradient-to-br from-cyan-500/[0.14] via-zinc-950/80 to-fuchsia-500/10 p-6 shadow-xl shadow-cyan-900/10">
<div className="flex flex-wrap items-start gap-4">
<div className="flex items-center gap-3">