Playlist-video blend/opacity/fit controls + export/import playlist to file
- Blend mode, opacity and fit for videos played from the playlist (mix with visuals). - Save/Load buttons to export/import a playlist (with scenes/cues) to a JSON file via native dialogs; the playlist already auto-persists between sessions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0f0accc67d
commit
50b4223100
5 files changed
+89
-10
No files matched your search
+9
-1
@@ -95,7 +95,12 @@ function composeFrame() {
|
||||
}
|
||||
|
||||
if (trackVideo.classList.contains('show') && trackVideo.readyState >= 2 && trackVideo.videoWidth) {
|
||||
try { drawMediaFit(recCtx, trackVideo, W, H, 'contain'); } catch (e) {}
|
||||
recCtx.globalAlpha = parseFloat(getComputedStyle(trackVideo).opacity) || 1;
|
||||
const bm = trackVideo.style.mixBlendMode;
|
||||
recCtx.globalCompositeOperation = (bm && bm !== 'normal') ? bm : 'source-over';
|
||||
try { drawMediaFit(recCtx, trackVideo, W, H, trackVideo.style.objectFit || 'contain'); } catch (e) {}
|
||||
recCtx.globalAlpha = 1;
|
||||
recCtx.globalCompositeOperation = 'source-over';
|
||||
}
|
||||
|
||||
for (const im of images) {
|
||||
@@ -356,6 +361,9 @@ djv.onControl(async (m) => {
|
||||
case 'videoOpacity': bgVideo.style.opacity = m.value; break;
|
||||
case 'videoFit': bgVideo.style.objectFit = m.value; break;
|
||||
case 'videoBlend': bgVideo.style.mixBlendMode = m.value; break;
|
||||
case 'trackVideoBlend': trackVideo.style.mixBlendMode = m.value; break;
|
||||
case 'trackVideoOpacity': trackVideo.style.opacity = m.value; break;
|
||||
case 'trackVideoFit': trackVideo.style.objectFit = m.value; break;
|
||||
|
||||
case 'sceneImage':
|
||||
if (m.path) { sceneImage.src = toFileURL(m.path); sceneImage.classList.add('show'); hideHint(); }
|
||||
|
||||
Reference in new issue
Block a user