@@ -135,18 +135,19 @@ export class Game {
135135
136136 this . #signals. run ( this . #runPixelBudget. bind ( this ) ) ;
137137
138- // Video is enabled on the grid or when this game is expanded.
139138 const videoEnabled = new Moq . Signals . Signal ( true ) ;
140- this . #signals. run ( this . #runVideoEnabled. bind ( this , videoEnabled ) ) ;
141-
142139 this . videoDecoder = new Watch . Video . Decoder ( this . videoSource , this . sync , { enabled : videoEnabled } ) ;
143140 this . #signals. cleanup ( ( ) => this . videoDecoder . close ( ) ) ;
144141
145142 // Renderer needs a canvas — created by the UI layer, set via `canvas`.
146143 this . videoRenderer = new Watch . Video . Renderer ( this . videoDecoder , { canvas : this . canvas } ) ;
147144 this . #signals. cleanup ( ( ) => this . videoRenderer . close ( ) ) ;
148145
149- // Audio pipeline — the emitter controls muted (volume) and paused (download).
146+ // Download on the grid or when expanded, but only while the tile is on-screen.
147+ // Reads the renderer's visibility, so it must run after the renderer exists.
148+ this . #signals. run ( this . #runVideoEnabled. bind ( this , videoEnabled ) ) ;
149+
150+ // Audio pipeline — the emitter stops the download when muted or paused.
150151 this . audioDecoder = new Watch . Audio . Decoder ( this . audioSource , this . sync ) ;
151152 this . #signals. cleanup ( ( ) => this . audioDecoder . close ( ) ) ;
152153
@@ -224,7 +225,9 @@ export class Game {
224225
225226 #runVideoEnabled( videoEnabled : Moq . Signals . Signal < boolean > , effect : Moq . Signals . Effect ) {
226227 const exp = effect . get ( this . expanded ) ;
227- videoEnabled . set ( exp === undefined || exp === this . sessionId ) ;
228+ const visible = effect . get ( this . videoRenderer . output . visible ) ;
229+ // On the grid or when expanded, but never download an off-screen tile.
230+ videoEnabled . set ( ( exp === undefined || exp === this . sessionId ) && visible ) ;
228231 }
229232
230233 #runAudioPaused( audioPaused : Moq . Signals . Signal < boolean > , effect : Moq . Signals . Effect ) {
0 commit comments