Giter VIP home page Giter VIP logo

Comments (5)

mithrendal avatar mithrendal commented on June 2, 2024

Some apps manage to stay always on by themselves, e.g. Netflix, thanks God, does not off the phone every 30 seconds while watching a video :)

are these PWAs?

maybe we have to study this article
https://developer.chrome.com/blog/page-lifecycle-api/

from vamigaweb.

Vweber73 avatar Vweber73 commented on June 2, 2024

Oops you're right, Netflix is a full apo, not a PWA, and I have no idea on the restrictions on PWA... But I could see that Wakey manages to keep vAmigaWeb alive. Keep Alive ! does not, but it was last updated in 2017, some changes must have changed deeply in Android since then...

from vamigaweb.

mithrendal avatar mithrendal commented on June 2, 2024

I found a way to prevent auto off

https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API

from vamigaweb.

mithrendal avatar mithrendal commented on June 2, 2024
image

added the wake lock setting, it is a persistant setting. When emulation is running it prevents the device from dimming or shutting the screen off. On the other hand - when emulation is paused then OS is allowed to dim or shut off the screen for energy saving. When wake lock setting is off then it is up to the underlying system.

Tested in chrome for mac where it is fully working ... On safari 16 it is only partially supported ... see safari 17 changelog which is currently in beta will fix this. It will come out somewhen in september/october when apple brings the new phones

Safari 17 Beta Release Notes
----------------------------
...
* Fixed Wake Lock permission denied after visibilitychange. (108279602)
* Fixed Wake Lock API for web apps saved to the home screen. (107284303)
...

Wake lock was just recently added in safari 16.4, it works in vAmigaWeb when started directly under Safari somehow ... when restoring wake lock from cold start or when restoring the wake lock when switching back from other tabs / apps will often fail due to a denied permission (see above safari 17 bugfix)
When vAmigaWeb is saved to homescreen as PWA then safari 16 currently completely ignores the wake lock… see bugfix coming in safari 17 above.

We leave this issue open in case someone stumbles over the buggy safari 16 behaviour…

from vamigaweb.

mithrendal avatar mithrendal commented on June 2, 2024

vAmigaWeb fully supports wake lock now

from vamigaweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.