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

App is crashing when deactivating the fullscreen-mode #5

Open
TimPietrusky opened this issue Feb 28, 2021 · 4 comments
Open

App is crashing when deactivating the fullscreen-mode #5

TimPietrusky opened this issue Feb 28, 2021 · 4 comments

Comments

@TimPietrusky
Copy link

TimPietrusky commented Feb 28, 2021

I want to use a small browser-window as my computer is not very good in terms of GPU. When I reduce the size of my browser, the app still enforces a full-screen layout. Once the full-screen is deactivated, the app is crashing:

Screenshot 2021-02-28 at 23 30 29

In the dev console I see this error:

Uncaught (in promise) Error: The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.
    at fromPixels_ (main.js:1476)
    at Object.fromPixels (main.js:1476)
    at main.js:1111
    at main.js:1476
    at t.scopedRun (main.js:1476)
    at t.tidy (main.js:1476)
    at Ze (main.js:1476)
    at FaceMesh.estimateFaces (main.js:1111)
    at updateFaceMesh (main.js:111048)
    at animate (main.js:111254)
@funwithtriangles
Copy link
Owner

Hmm, that's a pain! As a workaround, you can have the inspector open and resize the viewport, then it won't go completely full screen. That error is actually due to the preview video looping. Not sure why it was happening and I never got round to cleaning that up!

@funwithtriangles
Copy link
Owner

@TimPietrusky do let me know if you come up with an elegant solution to this issue for low powered machines (with large screens)

@TimPietrusky
Copy link
Author

TimPietrusky commented Mar 27, 2021

@funwithtriangles when using Chrome there are two more things that can be done in order to get rid of this:

  • chrome://flags/ > Override software rendering list: Enabled
  • Settings > Use hardware acceleration when available: Yes

Then it was also working for me on a computer without a good GPU.

Maybe you want to add this to the docs?

Also why do you force the user to use a full-screen application?

@funwithtriangles
Copy link
Owner

It's a shame this can't be achieved without Chrome flags :/

I'm forcing full-screen mainly out of the assumption most people would want it and can always escape to go back. I think this is still the best approach for mobile (where you can't have different sized windows anyway) but perhaps it can be an option for desktop. It's a trade off though between more UI / more choice.

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

No branches or pull requests

2 participants