immersive-web / webvr

Archival repository for the legacy WebVR Specification.
Other
13 stars 14 forks source link

Should `vrdisplayactivate` and `vrdisplayactivate` be consolidated to single event? #7

Open toji opened 6 years ago

toji commented 6 years ago

From @cvan on October 13, 2016 18:48

Per https://w3c.github.io/webvr/#window-vrdisplayactivate-event:

**onvrdisplayactivate**\ A user agent MAY dispatch this event type to indicate that something has occured which suggests the VRDisplay should be presented to. For example, if the VRDisplay is capable of detecting when the user has put it on, this event SHOULD fire when they do so with the reason "mounted".

Per https://w3c.github.io/webvr/#window-vrdisplaydeactivate-event:

onvrdisplaydeactivate A user agent MAY dispatch this event type to indicate that something has occured which suggests the VRDisplay should exit presentation. For example, if the VRDisplay is capable of detecting when the user has taken it off, this event SHOULD fire when they do so with the reason "unmounted".

À la vrdisplaypresentchange, perhaps there should instead be a single event called vrdisplaymountchange?

And, in the veins of #109, perhaps vrdisplaymounterror as well? Though, I'm not sure when that would be fire, to be honest. Maybe like if there's a VR display connected but it times out on mounting?

Copied from original issue: immersive-web/webxr#111