Fix: TV screen power on and off effect for multiple videos

This commit is contained in:
Dejvino
2025-11-17 14:50:12 +01:00
parent 293834b704
commit 50d755793d
3 changed files with 19 additions and 9 deletions
+1 -5
View File
@@ -15,10 +15,7 @@ export function playVideoByIndex(index) {
if (index < 0 || index >= state.videoUrls.length) {
console.info('End of playlist reached. Reload tapes to start again.');
setScreenEffect(2, () => { // Power-down effect
state.screenLight.intensity = 0.0;
turnTvScreenOff();
});
turnTvScreenOff();
state.isVideoLoaded = false;
state.lastUpdateTime = -1; // force VCR to redraw
return;
@@ -44,7 +41,6 @@ export function playVideoByIndex(index) {
turnTvScreenOn();
// 3. Start playback and trigger the warm-up effect simultaneously
setScreenEffect(1); // Trigger warm-up
state.videoElement.play().then(() => {
state.isVideoLoaded = true;
// Use the defined base intensity for screen glow