- )}
- {/* Invisible selectable text overlay, transformed to match the Konva
- stage. It sits ON TOP of the page canvas so the native selection
- highlight is visible; pointer events are enabled only when not
- drawing, so drags reach the stage below in draw mode. */}
-
{
- // The container is user-select:none, so Chromium no longer
- // clears the selection when clicking empty space (only text
- // spans move the caret). Restore the expected behavior: a
- // press on the container/br (not a text span) deselects.
- if (e.target instanceof HTMLElement && e.target.tagName !== 'SPAN') {
- window.getSelection()?.removeAllRanges()
- }
- }}
- style={{
- transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom})`,
- transformOrigin: '0 0',
- pointerEvents: isDrawing ? 'none' : 'auto',
- }}
+
+ {loading ? (
+
+ ) : error ? (
+
+ {error}
+
+ ) : (
+
-
+ )}
+ {/* Invisible selectable text overlay, transformed to match the Konva
+ stage. It sits ON TOP of the page canvas so the native selection
+ highlight is visible; pointer events are enabled only when not
+ drawing, so drags reach the stage below in draw mode. */}
+
{
+ // The container is user-select:none, so Chromium no longer
+ // clears the selection when clicking empty space (only text
+ // spans move the caret). Restore the expected behavior: a
+ // press on the container/br (not a text span) deselects.
+ if (e.target instanceof HTMLElement && e.target.tagName !== 'SPAN') {
+ window.getSelection()?.removeAllRanges()
+ }
+ }}
+ style={{
+ transform: `translate(${pan.x}px, ${pan.y}px) scale(${zoom})`,
+ transformOrigin: '0 0',
+ pointerEvents: isDrawing ? 'none' : 'auto',
+ }}
+ />
(
(
- {
- file: data,
- onPlay,
- onPause,
- onTimeUpdate,
- annotations,
- startTime,
- shareId,
- children,
- allowDownload,
- },
+ { file: data, onPlay, onPause, onTimeUpdate, annotations, startTime, shareId, allowDownload },
ref,
) => {
const localPlayerRef = useRef(null)
@@ -632,69 +622,64 @@ const VideoViewer = React.forwardRef(
onMouseMove={handleMouseMove}
onMouseLeave={handleMouseLeave}
>
-
- {/* Render Carousel/Sidebar here if not fullscreen */}
- {!state.isFullScreen && children}
+ {/* Video Area */}
+
+ {/* Hidden VideoJS container */}
+
- {/* Video Area */}
-
- {/* Hidden VideoJS container */}
-
+ {isAudio ? (
+
+ ) : (
+ /* Drawing Canvas (Visible) */
+ videoHtmlEl &&
+ containerSize.width > 0 && (
+
+ )
+ )}
- {isAudio ? (
-
-
+ {/* Big Play Button Overlay (when paused) */}
+ {!state.isPlaying && !isDrawing && (
+
+
- ) : (
- /* Drawing Canvas (Visible) */
- videoHtmlEl &&
- containerSize.width > 0 && (
-
- )
- )}
-
- {/* Big Play Button Overlay (when paused) */}
- {!state.isPlaying && !isDrawing && (
-
- )}
-
+
+ )}