Hello CEF Forums,
I am trying to create a lively updating <img> based on a backend that is a Resource Handler, the Resource Handler generates preview frames until the final frame is available in the form of PNGs. I can't go into the exact specifics on what the actual generator does since its under NDA.
In my current Resource Handler code, there is a request that starts the background process which the response is the final image or error (this has a delay due to the generation process), and there is another request that will return the most recent preview image or error.
In my JavaScript page, the first fetch request starts the generation process, then a small delay is placed (give some time for the handler to respond), then a loop of the preview fetch request starts, the loop being able to live update the img, as every request pulls a new frame. Once the first request completes, the loop stops and the final image is displayed.
The blurred out part here is the loop condition variable, its named after NDA stuff, sorry about that, the function PreviewLoopPost() returns false if the final scan has already been found.
With CEFSharp.WPF, using fetch, the code works as intended and the graphics do not hang or freeze. This follows the definition of fetch() which is meant to be asynchronous, using Promises for answers as they become available.
However in CEF with C++ my first request starts and immediately hangs until the final result is available, then after the final result is complete (the generation finishes), the secondary loop starts then immediately fails because the result has already been found.
It appears that fetch() in CEF is not asynchronous as it is supposed to, I ensured that all of my processes have the Resource Handler registered with the scheme and domain associated, and that they are all running (they don't crash).
Is there a setting I have to change to make fetch asynchronous, or is there something I am missing? Due to other factors I need to use CEF and not CEFSharp.
Any help is greatly appreciated.