Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bumps the REDAXO “FFmpeg Video Tools” add-on to v4.1.0 and modernizes the backend UI for converting and trimming videos, introducing per-item conversion controls/status and richer preview/trim interactions.
Changes:
- Reworks the video converter list UI to a column-based layout with per-video “convert” actions, inline status (donut + optional log), and a preview modal for original/web variants.
- Updates the trimmer UI with an in-player HUD (scrubber, quick seek, mark start/end, selection playback, loop toggle) and moves logic into dedicated trimmer assets.
- Adds cache-busting for assets via
filemtime()query params and updates docs/lang/versioning (README, package.yml, changelog, i18n keys).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates version and documents new converter/trimmer UX features. |
| pages/mediapool.ffmpeg.trimmer.php | Trimmer markup refactor (HUD controls, modal loop toggle, JS context div). |
| pages/mediapool.ffmpeg.main.php | Converter UI refactor (new list structure, actions, preview modal, inline status). |
| package.yml | Version bump to 4.1.0. |
| lang/en_gb.lang | Adds i18n keys for preview/status/UI labels. |
| lang/de_de.lang | Adds i18n keys for preview/status/UI labels. |
| CHANGELOG.md | Adds 4.1.0 release notes. |
| boot.php | Adds cache-busting and registers new trimmer JS/CSS assets. |
| assets/js/trimmer.js | New trimmer behavior (HUD sync, selection playback, modal preview). |
| assets/js/script.js | Updates converter JS for per-item actions, inline status, and preview modal. |
| assets/css/trimmer.css | New trimmer-specific styling with theme support. |
| assets/css/style.css | New converter UI styling (layout, donut progress, modal player). |
Comments suppressed due to low confidence (3)
pages/mediapool.ffmpeg.main.php:123
$video['filename']is inserted into the HTML without escaping in the list UI. Even if filenames are usually safe, escaping here prevents backend XSS and keeps output consistent with other attributes already usingrex_escape().
<div class="video-head">
<strong class="video-filename">' . $video['filename'] . '</strong>
' . $statusBadge . '
assets/js/trimmer.js:342
- Both
rex:readyand$(document).ready()callinitFfmpegTrimmer(). In REDAXO this typically causes a double initialization on first load (and can accumulate handlers across navigations). Prefer relying onrex:readyonly, or make init idempotent.
$(document).on('rex:ready', function () {
initFfmpegTrimmer();
});
$(document).ready(function () {
initFfmpegTrimmer();
});
assets/js/script.js:485
- Both
rex:readyand$(document).ready()callinitFfmpegConverter(), which binds event handlers each time. This can lead to duplicate click handlers and duplicated AJAX calls. Prefer relying onrex:readyonly (or guard/namespace handlers).
$(document).on('rex:ready', function () {
initFfmpegConverter();
});
$(document).ready(function () {
initFfmpegConverter();
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $button.attr('aria-expanded', !isVisible ? 'true' : 'false'); | ||
| $button.text(!isVisible ? hideLabel : showLabel); | ||
| }); | ||
| }); |
Comment on lines
+82
to
+87
| if (label) { | ||
| $('#progress-text').html(label); | ||
| } else { | ||
| $('#progress-text').html(value + '%'); | ||
| } | ||
| } |
Comment on lines
+19
to
+21
| function getCurrentVideoItem() { | ||
| return $('.video-item[data-video-item="' + currentVideoName + '"]').first(); | ||
| } |
Comment on lines
98
to
100
| if (!empty($video['title'])) { | ||
| $videoTitle = '<div class="video-title">' . $video['title'] . '</div>'; | ||
| } |
Comment on lines
+161
to
+176
| <div class="trimmer-video-hud" aria-label="Video-Steuerung"> | ||
| <div class="trimmer-video-hud-top"> | ||
| <span class="trimmer-time-chip">Start <strong id="trimmer-chip-start">0.0s</strong></span> | ||
| <span class="trimmer-time-chip">Jetzt <strong id="trimmer-chip-current">0.0s</strong></span> | ||
| <span class="trimmer-time-chip">Ende <strong id="trimmer-chip-end">0.0s</strong></span> | ||
| </div> | ||
| <input id="trimmer-scrubber" class="trimmer-scrubber" type="range" min="0" max="0" step="0.1" value="0" aria-label="Video Position"> | ||
| <div class="trimmer-video-hud-controls btn-group" role="group" aria-label="Trimmer Schnellsteuerung"> | ||
| <button type="button" class="btn btn-default btn-sm trimmer-video-control" data-action="seek" data-seconds="-5" title="5 Sekunden zurück">-5s</button> | ||
| <button type="button" class="btn btn-default btn-sm trimmer-video-control" data-action="seek" data-seconds="-1" title="1 Sekunde zurück">-1s</button> | ||
| <button type="button" class="btn btn-primary btn-sm trimmer-video-control" data-action="toggle-play" title="Abspielen/Pausieren">Play/Pause</button> | ||
| <button type="button" class="btn btn-default btn-sm trimmer-video-control" data-action="seek" data-seconds="1" title="1 Sekunde vor">+1s</button> | ||
| <button type="button" class="btn btn-default btn-sm trimmer-video-control" data-action="seek" data-seconds="5" title="5 Sekunden vor">+5s</button> | ||
| <button type="button" class="btn btn-info btn-sm trimmer-video-control" data-action="mark-start" title="Startzeit setzen">Start setzen</button> | ||
| <button type="button" class="btn btn-info btn-sm trimmer-video-control" data-action="mark-end" title="Endzeit setzen">Ende setzen</button> | ||
| <button type="button" class="btn btn-success btn-sm trimmer-video-control" data-action="play-selection" title="Ausgewählten Bereich abspielen">Bereich testen</button> |
Comment on lines
+175
to
+186
| $(document).on('click', '.trimmer-set-current', function () { | ||
| var target = $(this).data('target'); | ||
| setCurrentTime(String(target)); | ||
| }); | ||
|
|
||
| $('#start_time, #end_time').on('input change', function () { | ||
| updateDurationHint(); | ||
| updateVideoHud(); | ||
| }); | ||
|
|
||
| $(document).on('click', '.trimmer-video-control', function () { | ||
| var action = String($(this).data('action') || ''); |
Comment on lines
+202
to
212
| .ffmpeg-converter-ui .video-file-date { | ||
| margin: 2px 0 0; | ||
| padding: 0 14px; | ||
| color: var(--ffmpeg-muted); | ||
| font-size: 11px; | ||
| line-height: 1.2; | ||
| opacity: 0.78; | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 6px; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.