wrtc.onVisible() is called when your web page becomes visible or hidden.
You can use this event to put parts of your code to sleep while your web page is hidden, then wake up when page becomes visible again.
When web page becomes visible or hidden.
"Hidden" meaning if web browser is minimised or displays another tab. On Windows if your web page merely is behind another window it still counts as "visible". This behaviour might differ in other operating systems.
wrtc.onVisible(arg)
You can check document.hidden anywhere in your code to see if your web page is currently hidden (true) or visible (false).