0

I am integrating youtube on cobalt 11. And now I'm testing the application lifecycle test.

  1. I send the suspend event when I push the menu button (youtube goes to background)
  2. I send the unpause event when I switch back to youtube. (youtube comes to foreground)
  3. I send the deepLinke event after the unpause event

Sequence of events:

  1. window.onfocus
  2. window.onblur
  3. ....................?launch=remote
  4. window.onfocus
  5. ..................:visible
  6. onvisibilityChange:hidden
  7. window.onblur
  8. visible

When onvisibilityChange:hidden, youtube goes to the background; is that right? This makes the screen turn black.

And why 1. window.onfocus and 2. window.onblur occur again after youtube has already resumed?

trincot
  • 317,000
  • 35
  • 244
  • 286
  • 1
    It is very unclear what you're asking. Have you checked the Stack Overflow guide on [how to ask a good question](https://stackoverflow.com/help/how-to-ask)? – Nino Filiu Dec 24 '18 at 13:33
  • The application lifecycle test Expect the logs like above 1 - 8: I send the event:suspend,unpause,deeplink,pause,unpause, as a senquence. But I find 2 problem – Bill Wu Dec 25 '18 at 07:48
  • The application lifecycle test Expect the logs like above 1 - 8: I send the event:suspend,unpause,deeplink,pause,unpause, as a senquence. But I find 2 problem 1.youtube go to background when we push the menu button on remote control,it is not a good experience. 2.Why the logs window.onfocus, window.onblur after launch mode are needed.?Is it a Extra print? – Bill Wu Dec 25 '18 at 07:55
  • I got the meaning of this test-case. – Bill Wu Dec 26 '18 at 06:04

1 Answers1

0

If you send the kSbEventTypeSuspend event, then Cobalt will assume that it is hidden and stop rendering to the display. If Cobalt is meant to remain visible, then do not send the kSbEventTypeSuspend event, instead you can send the kSbEventTypePause event. See the Cobalt lifecycle document for more information: https://cobalt.googlesource.com/cobalt/+/release_11/src/cobalt/doc/lifecycle.md .

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