immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
381 stars 84 forks source link

Fix a bug that end event isn't fired for immersive session #101

Closed takahirox closed 4 years ago

takahirox commented 4 years ago

The comment tn XRSession.end mentions

    // If this is an immersive session, trigger the platform to end, which
    // will call the `onPresentationEnd` handler, wrapping this up.

But end event is fired if session is not immersive. I speculate if (!this.immersive) should've been if (this.immersive).

This PR fixes this bug.

jsantell commented 4 years ago

This LGTM