|
@@ -75,8 +75,12 @@ export default function ReviewPage() {
|
|
|
const diffFrames = Math.abs(dur1 - dur2) * fps;
|
|
const diffFrames = Math.abs(dur1 - dur2) * fps;
|
|
|
if (diffFrames > 5) {
|
|
if (diffFrames > 5) {
|
|
|
setCompareMismatch(
|
|
setCompareMismatch(
|
|
|
- `Videos differ by ${Math.round(diffFrames)} frames. Playback may be out of sync.`
|
|
|
|
|
|
|
+ `Videos differ by ${Math.round(diffFrames)} frames. Cannot compare — timing mismatch.`
|
|
|
);
|
|
);
|
|
|
|
|
+ // Show mismatch banner but don't enter compare mode
|
|
|
|
|
+ setCompareAsset(compareAssetArg);
|
|
|
|
|
+ setCompareMode(true);
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
setCompareAsset(compareAssetArg);
|
|
setCompareAsset(compareAssetArg);
|
|
|
setCompareMode(true);
|
|
setCompareMode(true);
|
|
@@ -580,25 +584,27 @@ export default function ReviewPage() {
|
|
|
src={videoUrl}
|
|
src={videoUrl}
|
|
|
mimeType={asset.mimeType}
|
|
mimeType={asset.mimeType}
|
|
|
fps={fps}
|
|
fps={fps}
|
|
|
- comments={[]}
|
|
|
|
|
- visibleAnnotations={[]}
|
|
|
|
|
- drawMode={false}
|
|
|
|
|
|
|
+ comments={allComments}
|
|
|
|
|
+ visibleAnnotations={visibleAnnotations}
|
|
|
|
|
+ drawMode={drawMode}
|
|
|
drawTool={drawTool}
|
|
drawTool={drawTool}
|
|
|
drawColor={drawColor}
|
|
drawColor={drawColor}
|
|
|
- onDrawModeChange={() => {}}
|
|
|
|
|
- onDrawToolChange={() => {}}
|
|
|
|
|
- onDrawColorChange={() => {}}
|
|
|
|
|
- pendingStrokes={[]}
|
|
|
|
|
- onStrokeComplete={() => {}}
|
|
|
|
|
|
|
+ onDrawModeChange={setDrawMode}
|
|
|
|
|
+ onDrawToolChange={setDrawTool}
|
|
|
|
|
+ onDrawColorChange={setDrawColor}
|
|
|
|
|
+ pendingStrokes={pendingStrokes}
|
|
|
|
|
+ onStrokeComplete={handleStrokeComplete}
|
|
|
onTimeUpdate={handleTimeUpdate}
|
|
onTimeUpdate={handleTimeUpdate}
|
|
|
- onCommentClick={() => {}}
|
|
|
|
|
|
|
+ onCommentClick={handleCommentSeek}
|
|
|
|
|
+ onPlayingChange={setPlaying}
|
|
|
|
|
+ onTimelineSeek={handleTimeUpdate}
|
|
|
externalCurrentTime={currentTime}
|
|
externalCurrentTime={currentTime}
|
|
|
externalPlaying={playing}
|
|
externalPlaying={playing}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- {/* Compare video */}
|
|
|
|
|
- {compareAsset && (
|
|
|
|
|
|
|
+ {/* Compare video — only show when durations match */}
|
|
|
|
|
+ {compareAsset && !compareMismatch && (
|
|
|
<div className="flex-1 min-w-0">
|
|
<div className="flex-1 min-w-0">
|
|
|
<div className="text-xs mb-1 px-1 truncate" style={{ color: 'rgba(255,255,255,0.5)' }}>
|
|
<div className="text-xs mb-1 px-1 truncate" style={{ color: 'rgba(255,255,255,0.5)' }}>
|
|
|
{compareAsset.title}
|
|
{compareAsset.title}
|
|
@@ -650,12 +656,19 @@ export default function ReviewPage() {
|
|
|
|
|
|
|
|
{/* ── Compare mismatch warning ─────────────────────────── */}
|
|
{/* ── Compare mismatch warning ─────────────────────────── */}
|
|
|
{compareMode && compareMismatch && (
|
|
{compareMode && compareMismatch && (
|
|
|
- <div className="rounded-xl px-4 py-3 text-xs flex items-center gap-2"
|
|
|
|
|
|
|
+ <div className="rounded-xl px-4 py-3 text-xs flex items-center gap-3"
|
|
|
style={{ background: 'rgba(251,191,36,0.10)', border: '1px solid rgba(251,191,36,0.25)', color: '#FCD34D' }}>
|
|
style={{ background: 'rgba(251,191,36,0.10)', border: '1px solid rgba(251,191,36,0.25)', color: '#FCD34D' }}>
|
|
|
<svg className="w-4 h-4 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
<svg className="w-4 h-4 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M12 9v3.75m-9.303 3.376c.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
|
|
<path strokeLinecap="round" strokeLinejoin="round" d="M12 9v3.75m-9.303 3.376c.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
|
|
|
</svg>
|
|
</svg>
|
|
|
- {compareMismatch}
|
|
|
|
|
|
|
+ <span className="flex-1">{compareMismatch}</span>
|
|
|
|
|
+ <button
|
|
|
|
|
+ onClick={handleExitCompare}
|
|
|
|
|
+ className="shrink-0 px-2 py-1 rounded-md transition-colors"
|
|
|
|
|
+ style={{ background: 'rgba(251,191,36,0.15)', color: '#FCD34D' }}
|
|
|
|
|
+ >
|
|
|
|
|
+ Cancel
|
|
|
|
|
+ </button>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
|
|
|
|