Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is happening when luminave is in the background #108

Closed
TimPietrusky opened this issue Jul 10, 2019 · 2 comments
Closed

Nothing is happening when luminave is in the background #108

TimPietrusky opened this issue Jul 10, 2019 · 2 comments
Assignees
Labels

Comments

@TimPietrusky
Copy link
Member

Issue description

When using luminave in the background (not the active tab, another window is maximized), nothing happens on Mac.

Steps to reproduce

  • Start luminave
  • Open another tab

Versions

  1. Browser: 75
  2. luminave: 3.1
@TimPietrusky TimPietrusky self-assigned this Jul 10, 2019
@TimPietrusky
Copy link
Member Author

TimPietrusky commented Jul 10, 2019

Idea: Chrome flags

@alexanderson1993 suggested to try these options in Chrome:

chrome://flags/#expensive-background-timer-throttling
chrome://flags/#stop-non-timers-in-background

Update: July 22nd, 2019

I tried both flags while having luminave in a background tab, which resulted in nothing = No lights were updated.

TimPietrusky added a commit that referenced this issue Aug 13, 2019
By using a Web Worker we can run our rAF in another thread which can still update the main-thread.

#108
@TimPietrusky TimPietrusky mentioned this issue Aug 13, 2019
TimPietrusky pushed a commit that referenced this issue Aug 13, 2019
# [3.3.0](v3.2.0...v3.3.0) (2019-08-13)

### Bug Fixes

* **Animations:** Update shake and dimmer animation ([f51e24d](f51e24d))

### Features

* **fixture:** Added "Stairville Wild Wash Pro 648 RGB" ([a865ded](a865ded))
* **Fixtures:** Adds an OppskPar fixture. ([ad24c70](ad24c70))
* **Param Transforms:** Adds the ability to transform parameter values based on the value of another parameter. ([32b9ced](32b9ced))
* **timeline:** Run in the background ([763a720](763a720)), closes [#108](#108)
@TimPietrusky
Copy link
Member Author

TimPietrusky commented Aug 13, 2019

The final solution (after trying Electron first, which also didn't work because of electron/electron#9567) was to move the playback-loop (rAF wrapped inside a setTimeout) from the timeline-manager into a Web Worker, which triggers the main-loop.

Behavior

MacOS

luminave can't be in a background tab, it must be active. You can open any other application in fullscreen.

Windows

luminave can be in a background tab or minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant