I've a small Extension which keeps checking for some data on a website.
On specific event it plays a sound file using:
document.getElementById("audio-beep1").play();
However practically this page isn't the foreground page since I'll be working on some other tab so this sound does not play even though event is detected.
So as I click this tab - sound plays.
Is there any way the sound will play on event even if the tab isn't the foreground one?
Google added an update in the past ~6 months or so, a The Great Suspender knockoff called "Tab Freezing" and "Tab Discarding."
That's why you can't play audio in a background tab. Google has suspended the tab without telling you. It's also why the second you click the tab, it starts playing the audio -- the tab is unfrozen, and re-loaded. This is proving to be a nightmare for one of my clients, as they use Incontact MAX, and if Chrome gets a chance, it simply wrecks the VOIP system.
I do not have a solution for you. Google, in their great and unending wisdom, decided this feature does not need any ability to be configured, disabled, or anything of the sort. Nor did they ask you if you wanted this function to be enabled. Truth be told, they appear to be very embarrassed about the unholy amounts of RAM that Chrome uses, and this is their kludge filled workaround.
(You were once able to disable this feature in chrome://flags but they have removed it from said window, and did not add it to the settings menu.)
And no, telling Chrome not to auto discard in chrome://discards does not actually stop it from doing this.
One suggestion I've heard is looping an audio file that is either not making any noise or so quiet it cannot be heard -- like a 1 second loop of dead air. This might trick Chrome into not freezing or discarding the tab, as it's actively playing audio. No idea if this will work. Another I'm planning to test out is using The Great Suspender on the background tab, and seeing if that prevents Google's thing from working.
Playing sound may do the trick, as tab playing sound is an active tab - but it's an ugly hack and consumes resources unnecessary.
Apparently as of now (12.07.2021) you can Disable tab freezing by this setting: chrome://flags/#calculate-native-win-occlusion
Set it to Disabled and tabs freezing should not happen any more. Here is a source
Related
I'm using Godot_v3.2.1-stable_win64.exe(current Godot version) on my Windows 10. When running a project everything seems to work fine but when using the actual IDE of the Godot engine it seems like the IDE screen doesn't update fluidly on every mouse interaction but like only every 5 seconds instead (as like FPS would be low).
So mostly on hovering or clicking something it would light up or be triggered after you clicked on some other thing elsewhere (which is stupid of course).
This makes it even impossible to hit a button sometimes in the IDE.
E.g. when renaming a file a Window/Box for renaming pops up but you do not see it, because the IDE screen isn't updated. So if you don't blindly click on the box (which you don't see) the option for renaming is lost, because the box closes when clicking anywhere else. See what I mean?
Thank you for listening. Have a great day.
This is a known issue. Try updating your graphics driver to the latest version provided by Intel (not your OEM).
I have been trying to build a TV application, using an SD.
I have got features like image gallery, video player running,
However, I also wanted to add a virtual on-screen keyboard that works with up-down left-right arrow keys. Can somebody help me with how to get started?
When I wanted to do this with my Vestel (Polaroid Branded) smart TV, which uses "Opera for TV devices" as it's HbbTV browser, I found that I didn't need to.
I simply just used HTML text fields and input types where needed, and as soon as I clicked into them, the browser/OS kernel popped up an onscreen keyboard that was built in for me.
However, I did do some research to see if I needed it, and on some devices you do, whilst I never actually implemented it (My app was just for my own use) the "BBC Television Application Layer" (TAL for short) : https://github.com/bbc/tal had pretty good keyboard support.
Another one that might be worth looking at is "Mautilus SDK" : https://github.com/mautilus/sdk
Be aware though, both are horribly convoluted and use quite complex code where it's really not needed.
Every now and then (and sufficiently often to be bothered by), I get stuck in a modal window when e.g. creating a new filter, task, appointment etc. The window is movable but I can't close it by pressing the red X in the corner, save-and-close-it nor F4 it. The window lives and the buttons react visually but the frame doesn't close.
My best solution this far is to kill the process and log in again. That makes me sad...
I suspect that the behavior might have to do with my system configuration: I'm on Win8 with IE10 (set to compatibility mode) powered by CRM Dynamics 2011 in the cloud.
Can someone confirm the behavior?
Any hits on how to deal with it (other than installing IE9)?
(Before I'd set the compatibility mode on, I experienced some funny effects such as the "Get started"-section rolling and getting wider and wider like some cool jQuery-effect. Now it's under control, though.)
Maybe not a solution, but have you changed your IE settings to force new popups to open as a new tab, instead of a new window? I've never experienced the issue you describe, but it may allow you to close it, since it is a tab, and not a window...
I'm working on a I/O verification tool based on Linux in a game project. It is written in C++, and,since using the same I/O module as our game, it's based on OIS 1.2. Thus, though all I need is to print users' inputs on the console, I still need to create a window for OIS.
So here comes my question: How can I create a mapped window while it is still invisible and processes keyboard events?
I can't unmapped the window in that it won't process any keyboard event anymore. I also can't find function for show/hide a window.(maybe I search through a wrong diretion...)
My little tool works fine now except there is a stupid top-level empty window which needs to be focused for processing keyboard events...
Any advise is welcomed.
Thanks!!!
After reading this post: Linux/X11 input library without creating a window,
I realized my problem was that I misunderstood the philosophy of X11. All I need to do is simply pass the root window handle to OIS, and set the x11_grabkeyboard flag as true. The only drawback is maybe I can hardly debug my program with gdb since the keyboard is grabbed...
Though my situation is solved, there is one thing left.
Every article I read said an InputOnly window won't be visible and is capable for handling input events, while my InputOnly window is absolutely visible after mapped...
Maybe it's my Linux, or again, a misunderstanding...
A bit of an odd (challenging?) question. Is it possible to programmatically access the tabs of an open browser from a external application? I realize that's a vague question, but hear me out:
What I'm trying to create is a "Gmail Chat Notifier" application that flashes a notification icon in the Windows system tray when an unanswered chat message exists. Right now, as far as I can tell, the only built-in Gmail chat notifications are:
Enable sounds (which I don't prefer)
Watch the window/tab/page title for the alternating flashing "Gmail" / "Blah says..." message.
The problem with #2 is: When the browser window is minimized, and when the Gmail tab isn't the active tab in the browser, the window title doesn't change and I don't notice new chat messages.
So I'd like to create an application that watches the tab titles for me. (All of the tab titles, not just the window title, which is only the active tab title.) I created a proof-of-concept C# application to detect unanswered chat messages by enumerating the active Windows processes and watching for the flashing "Blah says..." in the window title:
Process[] procs = Process.GetProcesses();
IntPtr hWnd;
foreach (Process proc in procs)
if ((hWnd = proc.MainWindowHandle) != IntPtr.Zero)
if (proc.MainWindowTitle.IndexOf(" says… ") >= 0)
...
But the obvious problem with this is that it won't work when the Gmail tab isn't the active/focused tab (since it only looks at window titles). So I need something that can dig deeper and look at the tab titles.
I'm open to anything. What I had been thinking might work is finding a way to enumerate the browser's tabs somehow (MDI child windows? * fingers crossed *), but maybe that's not even close to possible :) I'm also open to other solutions too if there's a way to do this with, say, Firefox plugins or something (but it'd be nice to integrate with the Windows system tray, and not just exist in the browser sandbox).
Can anyone help get me started? Thanks much in advance.
It's not possible in general. Browser tabs need not be MDI child windows (in fact, they almost certainly aren't). You do not know the window tree of an arbitrary browser, so you can't parse that and figure out the tabs (and even if you knew it for a specific browser, it's definitely an implementation detail that is likely to change even between minor releases). In fact, you do not know if the browser is even using separate Win32 window handles for tabs, as it may just have one handle for its main window, and draw everything inside by itself (e.g. Qt and WPF applications do that, and I believe that Opera in particular does that, and probably so does Safari).
Any solution to this will have to be browser-specific. You can probably write corresponding plugins for IE and Firefox to communicate that info to your application (though Firefox plugins are sandboxed, so I'm not sure if they are even able to do IPC). I don't see any options for Opera, Safari or Chrome.