How to export VR project to HTML5?

I have a sample VR project and I want to export it in HTML5.

I have HTC Vive headset and the VR preview works fine. I enabled the “Start in VR” flag under Project Settings, but when I package project and open it in Firefox Nightly it starts in plain 3D mode and not works on my headset.

What did I forget?

(Other HTML5 projects built with other frameworks (like A-Frame) work well.)

I believe at the moment there is no WebVR support for HTML5. There was a prototype a long time ago, but it was based on WebVR 1.0, and not the current WebVR 1.1. Hopefully WebVR 1.1 support might come in soon.