From 85e7eb35469a2614adb8b92e35d4da3ad8dd96e1 Mon Sep 17 00:00:00 2001 From: ct Date: Sun, 15 Jun 2025 18:32:05 +0800 Subject: [PATCH] Update --- .../canvas/video-editor-commentary.jsx | 574 ++++++++++++++++++ 1 file changed, 574 insertions(+) create mode 100644 resources/js/modules/editor/partials/canvas/video-editor-commentary.jsx diff --git a/resources/js/modules/editor/partials/canvas/video-editor-commentary.jsx b/resources/js/modules/editor/partials/canvas/video-editor-commentary.jsx new file mode 100644 index 0000000..b611827 --- /dev/null +++ b/resources/js/modules/editor/partials/canvas/video-editor-commentary.jsx @@ -0,0 +1,574 @@ +// TODO: I moved the sample timeline data to a dedicated file, and delayed the loading to 1 sec with useEffect. as such, alot of the ogics are broken. I need to make sure the delayed timeline should work like normal + +/** + * ======================================== + * VIDEO EDITOR SYSTEM ARCHITECTURE OVERVIEW + * ======================================== + * + * This VideoEditor component is the core orchestrator of a multi-video timeline editing system. + * It manages synchronized playback of multiple video elements with precise timing control. + * + * SYSTEM FLOW: + * + * 1. INITIALIZATION PHASE: + * - Loads timeline data (delayed by 1s to simulate async loading) + * - Creates HTML video elements for each timeline video with multiple source formats + * - Loads poster images and calculates optimal scaling/positioning for canvas + * - Sets up cross-component event communication via MittContext + * + * 2. VIDEO SETUP PHASE: + * - For each video: creates