WebVR enumeration promises are not resolved when a session is restored
Categories
(Core :: WebVR, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: mortimergoro, Assigned: mortimergoro)
Details
Attachments
(2 files)
STR using Firefox Reality and Oculus Quest/Go:
- Open WebVR sample
- The EnterVR button is visible
- Click on the home button
- Quit FxR and reopen it again
- The session is restored and the EnterVR button is not visible
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
After some research I found this happens because vmp->GetVRActiveStatus() always returns false in VRManager.cpp after a session is restored. This causes the navigatio.getVRDisplays() promises to never be resolved.
VRActiveStatus is set true/false in nsGlobalWindowOuter::SetIsBackground but there is a race condition where the SetIsBackground method can be called before VREventObserver is created, so background active status changes are not sent correctly in that case.
I also found that VRManager::Shutdown() method is called after the FxR app goes to foreground due to the inactivity timer.
| Assignee | ||
Comment 2•6 years ago
|
||
Notify VRActiveStatus after a the VREventObserver is created to prevent the VRManagerParent::GetVRActiveStatus race condition.
Call VRManager::Shutdown() when the app goes to background instead of calling it in the foreground event due to the inactivity timer.
Comment 4•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 5•6 years ago
|
||
I found a regression due to calling VRManager::Shutdown() when the app goes to background. I'll remove that call for now, the restore problem is fixed with the VREventObserver fix.
| Assignee | ||
Comment 6•6 years ago
|
||
Do not call VRManager::Shutdown immediately when the app is paused.
Updated•6 years ago
|
Comment 8•6 years ago
|
||
| bugherder | ||
Description
•