Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
martinch wrote:Cheers Matt yeah no problem.
I will also submit an enhanced version of the "Sounds Hack / setTimeout" that I have experimented with. My idea is to play a constant tone during the dialling session at 100% volume which will force the ViCiDial heartbeat to keep ticking. To achieve this, I'm proposing the following;
- Using HTML5's audio "loop" functionality.
- Generate a small sound file in Audacity that produces a constant tone of 20Hz.
This will trick Chrome into thinking it's playing sound at full pelt...however, we as humans cannot hear frequencies below 20Hz, it's too low for our puny ears to discern even with Vulcan-like hearing. I understand the hearing frequency range is different in other animals though!
I've tested this on my instance of ViCiDial and it works a treat. Less inserts into the visibility log, less processing in JavaScript...overall less for ViCiDial to do in terms of processing. This will bolster the setTimeout method to make it bulletproof. I'll submit both proposals on Mantis for you to review and give your feedback on.
Cheers,
Martin.
mflorell wrote:Thank you very much Martin!
A new ticket in Mantis with some example code would be greatly appreciated.
heartbeat("dummy.php");
async function heartbeat(file) {
let x = await fetch(file);
// Generate the heartbeat
all_refresh();
// Recursively call the function (create a loop)
heartbeat(file);
}
mflorell wrote:Thank you very much for your Javascript-Throttling-Workaround hunting Martin!
=============================================
Chrome Counter Throttling Method (Fetch).
=============================================
Ticket Type: Add Feature.
Reporter: Martin McCarthy (martinch).
Impacted Users: ViCiDial agents using recent Google Chrome including Chromium based variants.
Priority: Medium.
Product(s) Affected: All ViCiDial versions (tested on 2.14b0.5).
Deadline: No firm deadline in place.
Time / Effort Estimate: 1 hour of development / 1 hour of QA testing.
=============================================
Description
=============================================
In the constant battle to counter Google's throttling methods in Chrome, I present the "Fetch" Agent Screen Timer. This method does not use a JavaScript timer (the very thing that Google is throttling) and uses a simple recursively looping function combined with a fetch request.
Tasks;
- Add a new option to system settings option Agent Screen Timer called "Fetch".
- Add conditional code based on new option to ViCiDial.
- Test.
If you have any queries, please reach out to me.
=============================================
End
=============================================
Users browsing this forum: No registered users and 25 guests