mirror of
https://github.com/streamwall/streamwall.git
synced 2025-12-06 01:45:37 -05:00
Don't remove view from onscreen window when reloading
I'm observing that when a BrowserView is removed from the main window and added to the offscreenView, it loses visibility state and RAFs no longer execute. This prevents the subsequent video load from succeeding on some sites like Twitch. As a workaround, we'll no longer offscreen the view when reloading. This means the view may linger onscreen for a moment, and potentially if there are issues loading there might be glitches onscreen. I'd like to find a better solution for moving the view offscreen in the future and keeping it rendering. If this causes disruptive glitches, we could either: - Remove and recreate the view on reload (wasteful, ensures clean starts) - Size the view down to 1x1 pixels so it is barely visible (could this interfere with responsive designs?)
This commit is contained in:
@@ -23,10 +23,13 @@ const viewStateMachine = Machine(
|
||||
displaying: {
|
||||
id: 'displaying',
|
||||
initial: 'loading',
|
||||
entry: assign({
|
||||
pos: (context, event) => event.pos,
|
||||
content: (context, event) => event.content,
|
||||
}),
|
||||
entry: [
|
||||
assign({
|
||||
pos: (context, event) => event.pos,
|
||||
content: (context, event) => event.content,
|
||||
}),
|
||||
'offscreenView',
|
||||
],
|
||||
on: {
|
||||
DISPLAY: {
|
||||
actions: assign({
|
||||
@@ -57,7 +60,6 @@ const viewStateMachine = Machine(
|
||||
states: {
|
||||
loading: {
|
||||
initial: 'navigate',
|
||||
entry: 'offscreenView',
|
||||
states: {
|
||||
navigate: {
|
||||
invoke: {
|
||||
|
||||
Reference in New Issue
Block a user