Fix: TV screen power on and off effect for multiple videos
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user