Closed Willyxxx closed 3 years ago
this is new feature of Google chrome (also few other browsers), its decrease memory and cpu consumption by inactive tabs
yes in fact it does increase all interval to 1 sec or even 1 minutes in some cases. @Willyxxx you have to open in separate window
@Roukys opening in separate window dont fix this "option", at least for me
strange does seems to work for me, or chrome has found a way to detect window is not visible I don't know
So what you're telling me is that there is nothing to do and that I can quit the game ?
If you refer to the new feature that put tabs to sleep, I can only give help for MS Edge. There is the option under the system settings...
Settings and more > Settings > System > Save recourses
If this is enabled the browser put tabs to sleep to save memory. You can completely disable it or define sites to exclude.
Chrome should behave similarly.
I hope that helped :)
This script dealt with the same problem: https://github.com/ccloli/E-Hentai-Downloader/issues/65 Silent Music seems to work.
thanks @NinJaraya let me try that
i found solution for chrome in this github just disable this flag
chrome://flags
Throttle Javascript timers in background. When enabled, wake ups from DOM Timers are limited to 1 per minute in a page that has been hidden for 5 minutes. For additional details, see https://www.chromestatus.com/feature/4718288976216064. – Mac, Windows, Linux, Chrome OS, Android
if this flag set to default (Enabled), then after 5 min. timer dalay go up so we should just disable it
i found solution for chrome in this github just disable this flag
chrome://flags
Throttle Javascript timers in background. When enabled, wake ups from DOM Timers are limited to 1 per minute in a page that has been hidden for 5 minutes. For additional details, see https://www.chromestatus.com/feature/4718288976216064. – Mac, Windows, Linux, Chrome OS, Android
if this flag set to default (Enabled), then after 5 min. timer dalay go up so we should just disable it
Yes, it has already been noticed here: https://github.com/Roukys/HHauto/issues/178 But there is the issue of battery in notebooks. And the game already has its own music: Nutaku document.querySelector("#hh_bg_music")
<audio id="hh_bg_music" loop="true" volume="0.7">
<source src="https://hh.hh-content.com/pictures/audio/bg_music_2.ogg" type="audio/ogg">
<source src="https://hh.hh-content.com/pictures/audio/bg_music_2.mp3" type="audio/mpeg">
</audio>
Hentai Heroes document.querySelector("#hh_bg_music")
<audio id="hh_bg_music" loop="true" volume="0.7">
<source src="https://hh2.hh-content.com/pictures/audio/bg_music_2.ogg" type="audio/ogg">
<source src="https://hh2.hh-content.com/pictures/audio/bg_music_2.mp3" type="audio/mpeg">
</audio>
Just turn off the volume.
by Google Translate
if we disable fully you'll have perf issue,
I've implemented the silent volume in 5.4.18 lets try and see @Willyxxx @cossname @OldRon1977 @NinJaraya I'm taking returns ;)
@Roukys : I see at regulary basis the speaker icon at the tab, but no sound is played. Sofar I would say it works.
yes that should be the working way, however I don't know if that really fully prevent throttling ..
its working only with tabs, but im use different windows for each account
and you have the throttling issue ?
I must say, that even if it does not have any negative effect it bothers me to see the sound icon every few seconds in the tab header. Is there no other way?
only way found so far, but not sure if it works though
nah, im just disabled js throttling flag because im use edited stable version of script, and update it only when something big changed, new versions going throw test on alt accounts
So does this mean, we can delete this function from the code?
disabling it fully in a browser be careful if you use other sites ... advantage of this code is that I can make it only happen in active mode Or at least I think it is possible
has there been a fix for this script-wise without turning the flag off?
@dadanda normally yes I've added a blank music, you should see it appear on inactive tab, but for the moment no confirmation has been made that it does do the trick.
So I would propose to delete that workaround since it appears to not work.
Hmmm, I mean I do not experience issues with Harem, but I do experience it with Hentai. I just realized the Hentai tab has its tab audio muted. Maybe that's the issue on my end, will confirm with further testing.
confirmed it is not working as chrome is able t check if a real sound is playing. I've tried different thing but was not able to find a good workaround ( hey that's why I'm not a chrome developper ;)) Last test on my side seems to show that enabling HH sound plus a page refresher every 15min does seems to do the trick
So, I would say that the sound thing that's occasionally playing that's supposed to be blank is actually happening? Like I would on random, just hear the music of the games in the background when the sounds and music are supposed to be off. But I do not know whether it would actually do the trick on just making AutoSal work without having a tab refresher.
Edit: Nvm, there is music being played, as there is that speaker icon, but it's nothing. So I would say that's the blank. I think it causes the on and off of the sound and music, even in the settings, it's actually off.
Describe the bug When I'm leaving the page where the script is active and doing Auto Salary, the script stops until I come back on this page.