0
  1. For cobalt which support preload
  2. we send preload cmd to make cobalt preload
  3. and make it backgm after the preload is finished. But how to know the preload task has been finished ?

Once I add my code at https://cobalt.googlesource.com/cobalt/+/release_11/src/cobalt/base/wrap_main_starboard.h#55

I know this is not a good choice, So how can I get the information the preload task has been finished at the starboard layer.

The cobalt version is release 11.153

Thank you.

Devin
  • 1
  • 2

1 Answers1

0

unfortunately there is no way to do this, you will need to measure the amount of time it usually takes in order to determine how long you should wait. You are welcome to leave Cobalt in the preload state indefinitely if it's okay on your platform that some occasional idle JavaScript may in the background. Note that if you were to send the suspend signal too early, while the web app was still loading, it should not cause an issue when Cobalt is resumed later, it will just finish completing the initialization logic at that time.

For more information about preload, see https://cobalt.googlesource.com/cobalt/+/release_11/src/cobalt/doc/lifecycle.md#preloading .

Andrew Top
  • 2,517
  • 1
  • 17
  • 10