Skip to content

Master - #15

Merged
skerbis merged 5 commits into
mainfrom
master
Jul 29, 2026
Merged

Master#15
skerbis merged 5 commits into
mainfrom
master

Conversation

@skerbis

@skerbis skerbis commented Jul 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 29, 2026 15:52
@skerbis
skerbis merged commit d8248fe into main Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 using rex_escape().
                <div class="video-head">
                    <strong class="video-filename">' . $video['filename'] . '</strong>
                    ' . $statusBadge . '

assets/js/trimmer.js:342

  • Both rex:ready and $(document).ready() call initFfmpegTrimmer(). In REDAXO this typically causes a double initialization on first load (and can accumulate handlers across navigations). Prefer relying on rex:ready only, or make init idempotent.
    $(document).on('rex:ready', function () {
        initFfmpegTrimmer();
    });

    $(document).ready(function () {
        initFfmpegTrimmer();
    });

assets/js/script.js:485

  • Both rex:ready and $(document).ready() call initFfmpegConverter(), which binds event handlers each time. This can lead to duplicate click handlers and duplicated AJAX calls. Prefer relying on rex:ready only (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.

Comment thread assets/js/script.js
$button.attr('aria-expanded', !isVisible ? 'true' : 'false');
$button.text(!isVisible ? hideLabel : showLabel);
});
});
Comment thread assets/js/script.js
Comment on lines +82 to +87
if (label) {
$('#progress-text').html(label);
} else {
$('#progress-text').html(value + '%');
}
}
Comment thread assets/js/script.js
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 thread assets/js/trimmer.js
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 thread assets/css/style.css
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants