+ {ASSETS.length === 0 ? (
+
No assets in library.
+ ) : ASSETS.slice(0, 12).map(a => (
-
+
-
{a.name}
-
{a.duration}
+
{a.name}
+
{a.duration}
))}
@@ -42,18 +42,18 @@ function Editor() {
-
+
{!playing && (
)}
-
00:00:08:06
+
{msToTimecode ? msToTimecode(currentMs) : '00:00:00:00'}
-
+
@@ -63,8 +63,8 @@ function Editor() {
);
}
@@ -90,95 +90,41 @@ function Editor() {
function InspGroup({ title, children }) {
return (
-
{label}
-
{value}
+
+ {label}
+ {value}
);
}
-function EditorTimeline({ currentMs }) {
- const v1Clips = [
- { id: "v1a", start: 0, len: 12, color: "#5B7CFA", label: "Stage_Cam_A" },
- { id: "v1b", start: 12, len: 8, color: "#5B7CFA", label: "Drone_Aerial" },
- { id: "v1c", start: 20, len: 18, color: "#5B7CFA", label: "Wide_Cam_B" },
- { id: "v1d", start: 38, len: 10, color: "#5B7CFA", label: "Trophy" },
- ];
- const v2Clips = [
- { id: "v2a", start: 6, len: 4, color: "#B57CFA", label: "Lower3rd" },
- { id: "v2b", start: 32, len: 4, color: "#B57CFA", label: "Sponsor" },
- ];
- const a1Clips = [
- { id: "a1a", start: 0, len: 48, color: "#2DD4A8", label: "FOH Mix", audio: true },
- ];
- const a2Clips = [
- { id: "a2a", start: 12, len: 6, color: "#F5A623", label: "VO", audio: true },
- ];
- const total = 60;
- const playheadPct = ((currentMs / 1000) / total) * 100;
-
+function EditorTimeline({ currentMs, total = 60, clips = [] }) {
+ const playheadPct = total > 0 ? ((currentMs / 1000) / total) * 100 : 0;
return (
-
Timeline · 1m total
+
Timeline
-
-
-
-
{Array.from({ length: 13 }).map((_, i) => (
- {i % 2 === 0 && {`00:${String(i * 5).padStart(2, "0")}`}}
+ {i % 2 === 0 && {`00:${String(i * 5).padStart(2, '0')}`}}
))}
-
-
-
-
+ {clips.length === 0 && (
+
Drop assets from the bin to build a sequence.
+ )}
);
}
-function TimelineTrack({ label, clips, total, hasFilm, audio }) {
- return (
-
-
{label}
-
- {clips.map(c => {
- const left = (c.start / total) * 100;
- const width = (c.len / total) * 100;
- return (
-
-
{c.label}
- {hasFilm && (
-
- {Array.from({ length: 8 }).map((_, i) => (
-
- ))}
-
- )}
- {audio && (
-
-
-
- )}
-
- );
- })}
-
-
- );
-}
-
window.Editor = Editor;