The fullscreen event action is great, but is there any python function I'm missing that can toggle the session to be fullscreen?
I'm trying to toggle fullscreen based on lastActivity to make essentially a screensaver function for an industrial kiosk that also needs to interact with windows on occasion
The browser requires a manual action to "take-over" the browser as full-screen, otherwise there'd be no way to stop ads from hijacking your screen with their own scripting. The Fullscreen Action is tied to the actual manual browser Events. There is no way for us to provide a script function for full-screen functionality.
3 Likes
@cmallonee that makes total sense.
Thanks guys! I saw the toKiosk function but forgot it had to be running in workstation.
Alternatively I thought I could do this in an OnStartUp event and trigger a system.perspective.refresh but realized that too does not fire on a Refresh (for probably similar browser control conundrums) so I was at a loss on how to accomplish this.
I'll give it a whirl, thanks!
This worked perfectly, I use lastActivity & mouse movement as I saw lastActivity didn't update from just moving a moust.
Mouse movement was jarring so count up to 10 mousemove events before I exit Kiosk mode and that felt pretty smooth.
It grabs focus when in other applications, which might stink if someone is writing an e-mail on that machine (for some reason), but right now with my timeout of 10 minutes, if their e-mail is longer than that they deserve a toKiosk reminder that no-one wants to read all of that.
Thanks!!
Correct, Page onStartup fires once when a Tab is opened to a Perspective Project. "Page" startup is perhaps a bit misleading, but we didn't want to call it "Tab" onStartup because we felt this could be even more confusing. It does not execute on refresh because the tab will still use the same pageId value. It also does not execute during Page navigation calls because, again, the pageId will be the same. HTTP navigation DOES result in the Event firing again because the tab is navigating to a "new" URL, which results in the original page being closed down and a new page (and therefore a new pageId value) being made.
1 Like
Ah! Good workaround if I need to operate outside of Workstation, thanks!