如何保持网页显示 [英] How to keep screen on with a webpage
本文介绍了如何保持网页显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Web应用程序,可将文本流式传输到网页,用于远程文本解释.我有什么解决办法可以让用户在访问网页时保持屏幕显示状态?
I have a web app that streams text to a webpages, used for remote text interpretation. I there any fix to keep the users screens on while they are on the webpage?
人们最关注的是iOS和Android之类的移动客户端,但OSX和Windows的关注程度较小
The concern is most for mobile clients like iOS and Android, but to a smaller extent OSX and Windows
推荐答案
有一个窍门:如果网页播放网络媒体文件,则设备将使屏幕保持打开状态.js库NoSleep.js依靠此技巧来提供您想要的内容.
There's a trick: if the web page plays a web media file, the device will keep the screen lightopened. A js library NoSleep.js relies on this trick to provide what you're looking for.
选中此 https://github.com/richtr/NoSleep.js
关于,塞德里克.
这篇关于如何保持网页显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文