29 Commits

Author SHA1 Message Date
Yiannis Christodoulou
7343817393 Update chapter handling for empty state and default segment
Simplifies logic in TimelineControls to use clipSegments.length for button and modal text, instead of filtering for titled chapters. In useVideoChapters, ensures a default segment spanning the entire video is created when no chapters exist, improving initial state handling and Safari compatibility.
2025-10-19 20:08:53 +03:00
Yiannis Christodoulou
67ba1cd467 Refactor audio poster handling and Vite config
Audio poster image is now imported as a module and referenced via AUDIO_POSTER_URL in both chapters-editor and video-editor players. Removed custom file copy plugin from Vite config, updated asset handling to use Vite's asset import and output options, and added type declarations for image modules.
2025-10-19 14:23:17 +03:00
Yiannis Christodoulou
95cb6904ce poster image fix 2025-10-19 14:19:13 +03:00
Yiannis Christodoulou
54e2f1d7e4 Add audio poster support for audio files in video players
Introduces an audio-poster.jpg image and updates both chapters and video editor React video player components to display a poster image for audio files when no poster is provided. Also adds a posterUrl field to MEDIA_DATA and ensures fallback logic for poster images is consistent across iOS and standard video players.
2025-10-19 13:56:17 +03:00
Yiannis Christodoulou
03872d0b25 Support empty chapters state in editor
Allows users to clear all chapters, sending an empty array to the backend. Removes default segment creation when no chapters exist, updates UI and modal messaging for empty state, and ensures backend receives empty chapters when appropriate.
2025-10-19 12:40:12 +03:00
Yiannis Christodoulou
4772c11305 fix Format segments data for API request - use ref to get latest segments and sort by start time 2025-10-16 18:38:46 +03:00
Yiannis Christodoulou
5a282c7cd2 Improve Safari audio/video initialization and fallbacks
Adds Safari-specific detection and initialization logic to better support audio and video playback, especially for cases where metadata is not loaded as expected. Implements fallback event listeners, user interaction triggers, and exposes an initialization helper to ensure the editor works reliably on Safari and iOS devices.
2025-10-16 16:12:35 +03:00
Yiannis Christodoulou
085e944861 ChapterEditor: Add keyboard shortcuts for video playback controls
Implemented keyboard shortcuts for play/pause (Space), jump backward (ArrowLeft), and jump forward (ArrowRight) in the chapters editor. Shortcuts are disabled when typing in input fields to prevent interference with text entry.
2025-10-16 14:59:32 +03:00
Yiannis Christodoulou
6b68e6537f Chapter Editor: Show placeholder for default chapter titles
When a segment's chapter title is a default generated name (e.g., 'Chapter 1'), the editing field now displays an empty string to trigger the placeholder, improving the user experience for custom title entry.
2025-10-16 14:28:15 +03:00
Yiannis Christodoulou
d9aee11d44 fix: Edit: Chapter: When undoing / redoing edits, the edits are not saved 2025-10-13 01:49:53 +03:00
Yiannis Christodoulou
bd786c0fe6 Generate chapter names based on segment order
Introduces a helper function to assign chapter titles like 'Chapter 1', 'Chapter 2', etc., based on the chronological position of each segment. Updates all segment creation and splitting logic in TimelineControls and useVideoChapters to use this naming convention for improved clarity and consistency.
2025-10-13 01:45:18 +03:00
Yiannis Christodoulou
e06115b8ee fix: Chapters: If adding a chapter between two existing chapters, the order of the chapters are wrong in the editor timeline, and in the player chapter view 2025-10-13 01:40:03 +03:00
Yiannis Christodoulou
f67021b17b fix: Chapters: Play should not stop at the end of a chapter or a cutaway area, but should just continue play through. 2025-10-13 01:35:12 +03:00
Yiannis Christodoulou
ee7fb7950c Chapters: Play Preview should not be included for the chapter editor - only Play is needed 2025-10-13 01:24:20 +03:00
Yiannis Christodoulou
fb373f3c2c fix: Chapters: The default text in a new chapter’s text field is “segment”. Change to (e.g.): “Add Chapter Text” 2025-10-12 21:37:29 +03:00
Yiannis Christodoulou
0fccefeec6 Refine tooltip and chapter input styles in timeline
Adjusted the tooltip position transition endpoint for better placement. Updated the chapter input to use a textarea selector, set fixed height constraints, and improved focus and placeholder styles for consistency. CSS and static assets updated to reflect these changes.
2025-10-12 21:34:48 +03:00
Yiannis Christodoulou
119dc966fa update readme files (video/chapters editors) 2025-10-03 11:24:33 +03:00
Yiannis Christodoulou
bd12266054 cleanup console logs from chapters editor 2025-10-03 11:24:32 +03:00
Yiannis Christodoulou
f2edcbb41e fix: After saving chapters disable the countdown and display a message instead 2025-10-03 11:24:32 +03:00
Yiannis Christodoulou
975d56e868 fix: Add margin to chapter's editor icons 2025-10-03 11:24:32 +03:00
Yiannis Christodoulou
e29d364fd3 feat: Fix chapters (rename text/name to chapterTitle) and fetch/post the correct object 2025-10-03 11:24:29 +03:00
Yiannis Christodoulou
c5edfbefb6 stye: Fix the width of close modal button 2025-10-03 11:24:29 +03:00
Yiannis Christodoulou
2c6484b6ca chore: Replace segments string with chapters 2025-10-03 11:24:28 +03:00
Markos Gogoulos
e34bd55e7a wtv 2025-10-03 11:24:27 +03:00
Yiannis Christodoulou
6eab5bf7b7 fix: Change endpoint save_chapters to chapters [POST] 2025-10-03 11:24:26 +03:00
Yiannis Christodoulou
f472f94095 feat: Auto save functionality in both editors (video-editor, chapters-editor) 2025-10-03 11:24:25 +03:00
Yiannis Christodoulou
32af52ccda chore: Disable the unload page warning 2025-10-03 11:24:25 +03:00
Yiannis Christodoulou
8df5ea880c feat: Chapter editor main functionality and styling 2025-10-03 11:24:25 +03:00
Yiannis Christodoulou
8a87aad647 feat: Chapters Editor (init) [copy from video editor] 2025-10-03 11:24:25 +03:00