-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add wake-lock #413
Add wake-lock #413
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good work, but I think nosleep.min.js
file should be added to the service worker, so the browser doesn't need to fetch it every time Snapdrop loads.
Afaik the service worker is in a different thread than the webpage. So if we would add it, it would stop the service worker's thread from going to sleep and not the webpage's one. But I'm not sure, correct me if I'm wrong. |
Sorry about my bad explain. P.S.: to explain me more, let me saying this... I didn't intended to add the script into the service worker but just add it's file entry, as other files below. I don't know if I'm explaining... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @Myzel394, now it's perfect!
@RobinLinus, could you approve these changes? Thanks!
@RobinLinus Could you take a look at this PR please? |
Have you tested your code? It does not work for me. The Documentation reads:
I guess you would have to call it on click / touch events. That would mean, only the sending part could successfully enable this with the current implementation. I plan to change this with #560 |
@schlagmichdoch If I remember correctly it worked for me on Android using Firefox, Brave and Chrome |
@Myzel394 I tested on iOS only, but nice that it works on Android! |
@schlagmichdoch yes iOS is always a pain in the ass. Could you show how you added the click handler? I'm personally not going to spend any time on Apple. Wenn du anders denkst, na dann schlag mich doch :D |
Very good, seems like @RobinLinus isn't maintaining this project anymore, so I'd suggest to move over to your implementation instead. |
closes #412