简体   繁体   English

检测显示器是否从IE Kiosk模式启动

[英]Detect if monitor is powered on from IE Kiosk mode

I developed a web app to display a slideshow, and want to display it on my secondary monitor (Connected via HDMI) with IE's Kiosk mode on Windows 10. Because of CPU and other resources on the shared server, I want to pause the slideshow when the monitor is powered off. 我开发了一个Web应用程序来显示幻灯片,并希望在Windows 10上使用IE的Kiosk模式在我的辅助显示器(通过HDMI连接)上显示它。由于共享服务器上的CPU和其他资源,我想暂停幻灯片放映时显示器已关闭。 (And therefore nobody is seeing it) (因此没有人看到它)

Is there a way to detect connected displays from Internet Explorer? 有没有办法从Internet Explorer检测连接的显示器? Since this is a one-pc kiosk setup, add-ons, etc. are accepted. 由于这是一个单独的自助服务终端设置,因此可以使用附加组件等。 Triggering javascript/jquery events would be ideal. 触发javascript / jquery事件将是理想的。 Thank you! 谢谢!

No, there is no reliable way to detect if a second monitor is physically switched off but still connected via the cable. 不,没有可靠的方法来检测第二台显示器是否已物理关闭但仍然通过电缆连接。

I have to ask though: why do you need to physically switch the second monitor off? 我不得不问:为什么你需要关闭第二台显示器?

As an alternative could you not: 作为替代方案你不能:

  • Have the slideshow stop after a timed duration unless it receives an input? 除非收到输入,否则幻灯片播放会在一段时间后停止播放?
  • Have the slideshow only on display at certain times of the day? 仅在一天的特定时间显示幻灯片吗?
  • Accept events from, say, a node server to control when to and not show the slideshow? 接受来自节点服务器的事件,以控制何时显示幻灯片?

Having said that these threads could provided you, albeit unreliably apparently, what you need: 话虽如此,这些线程可以为您提供您所需要的,尽管显然不可靠:

You can't do in javascript. 你不能用javascript做。 Why not try some asp component. 为什么不尝试一些asp组件。

http://msdn.microsoft.com/en-us/library/windows/desktop/dd162617%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/dd162617%28v=vs.85%29.aspx

You could potentially write a command line program that sits on a particular port, continuously checks for that locally and then use HTML5 WebSockets in IE to communicate with it? 您可以编写一个位于特定端口上的命令行程序,在本地连续检查该程序,然后在IE中使用HTML5 WebSockets与之通信?

ie C# PowerModeChangedEvent 即C#PowerModeChangedEvent

SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler( SystemEvents_PowerModeChanged );

I don't think so.... 我不这么认为......

CPU cycles are paused when the client computer is put into Sleep mode. 当客户端计算机进入睡眠模式时,CPU周期暂停。 (win+L) (赢+ L)

Start>Control Panel>Power 开始>控制面板>电源

configures how the monitor(s) behave when the client is powered down or put to sleep mode. 配置客户端断电或进入睡眠模式时监视器的行为方式。

the screen object in js returns the metic values (height/width) of the screen object but not its powered state. js中的屏幕对象返回屏幕对象的metic值(高度/宽度),但不返回其供电状态。

the impact of wasted CPU cycles on a powered down secondary monitor should be un-noticable.... 浪费的CPU周期对断电的辅助监视器的影响应该是不明显的....

probably you have not selected the option to "Use software rendering instead of GPU rendering" on the Advance tab of internet options.... 可能你没有在互联网选项的高级选项卡上选择“使用软件渲染而不是GPU渲染”选项....

You will notice that your CPU on your desktop will throttle up and the cooling fan will race if you haven't set the above setting when running graphic intensive web pages or canvas scripts. 如果在运行图形密集型网页或画布脚本时未设置上述设置,您会注意到桌面上的CPU将耗尽并且冷却风扇将会激活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM