-
Notifications
You must be signed in to change notification settings - Fork 379
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
Not working in iOS 13.4 #85
Comments
Has anyone else confirmed this issue? As far as I know iOS 13.4 will be officially released in 2 days. |
Just updated to iOS 13.4 |
push |
I found out, that it is an iOS Problem, not a NoSleep.js problem: https://discussions.apple.com/thread/251215369 iOS 13.4 has the problem, that videos are not shown - and that's how NoSleep.js works. |
Just updated to 13.4.1 and the problem persists on my iPhone 8 |
This solution worked for me -- I haven't implemented it in the context of nosleep.js, but this is the technique, in case anyone would like to update the library to fix this problem: Play a video that has an audio track. Make sure it's in the DOM and on-screen. (Covered by something else is fine.) Set up a callback when the video is paused -- this will trigger when the video reaches its end. When it's triggered, set the time to 0 and call play() on the video again. Where that went wrong -- after a few minutes, the playhead would stop advancing; it would just stay at 0. If you asked the video player what it was up to, it would say that it was playing, not paused, not completed, not seeking, no errors. But its current time was always 0. And then the phone would fall asleep. So, every few moments (as long as "every few moments" is not an even multiple or divisor of the length of the video), check to see what the video's current time is, and store that time for the next check. If the video's current time is the same as what it was during the previous check, nudge the playhead forward slightly and call play() on the video again. |
I seem to have the same problem on iOS 13.4.1 on my iPhone X. Nor my implementation nor the demo works anymore. |
Same problem on iPhone 8 Plus after upgrade to iOS 13.4.1. Nosleep was working in Chrome on 13.4. |
It was also failing for me on iOS 13.4.1 and 13.5. |
Probably causes other playbacks (e.g. music playing in different app) to pause and playback keyboard buttons will fire events on that "video". Disclaimer: Not tested, but I observed that behavior in another context before. |
That solution doesn't work for me -- my site uses speechSynthesis, and when I try removing the video.setAttribute line, the audio quits. |
This issue has been fixed based on this discussion with the solution provided in #92. NoSleep.js has now be updated to v0.10.0 which includes this update. |
Im running the 13.4 beta and since the 2nd and now 3rd beta for 13.4 Ive notice noSleep.js is no longer keeping my iPhone awake. Either in my own app or when I go to the test page.
I wonder if anyone else is experiencing this too?
The text was updated successfully, but these errors were encountered: