{"action":"created","issue":{"url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/99","repository_url":"https://api.github.com/repos/borismus/webvr-boilerplate","labels_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/99/comments","events_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/99/events","html_url":"https://github.com/borismus/webvr-boilerplate/issues/99","id":125057748,"number":99,"title":"Hot updating of VR devices","user":{"login":"brianchirls","id":492291,"avatar_url":"https://avatars.githubusercontent.com/u/492291?v=3","gravatar_id":"","url":"https://api.github.com/users/brianchirls","html_url":"https://github.com/brianchirls","followers_url":"https://api.github.com/users/brianchirls/followers","following_url":"https://api.github.com/users/brianchirls/following{/other_user}","gists_url":"https://api.github.com/users/brianchirls/gists{/gist_id}","starred_url":"https://api.github.com/users/brianchirls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianchirls/subscriptions","organizations_url":"https://api.github.com/users/brianchirls/orgs","repos_url":"https://api.github.com/users/brianchirls/repos","events_url":"https://api.github.com/users/brianchirls/events{/privacy}","received_events_url":"https://api.github.com/users/brianchirls/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-05T21:42:14Z","updated_at":"2016-03-28T21:27:34Z","closed_at":"2016-03-28T21:27:34Z","body":"I wanted to discuss this topic here a bit before proposing any implementations, so we can agree on the best user experience...\r\n\r\nI was talking to some people at Mozilla on the WebVR slack the other day (@kearwood if I recall correctly) and they said Firefox will now report VR devices even as they are plugged in after starting the browser. And Chromium has been doing this for a while. I think we should support this for best user experience.\r\n\r\nThe first question is how to do it technically. For now, I think polling is the only way. Shouldn't be too resource-intensive to poll once every few seconds, and we could turn off polling while in VR mode. Eventually, I think the API will be extended to fire events when the equipment changes, but that could take a while, especially as updates to Chromium aren't coming every day. This would require changes to `VREffect` and `VRControls`. One of us could make a PR at three.js or fork them, which I'm considering anyway to get a quicker update.\r\n\r\nThe second question is what this looks like for the user. I think it would be helpful to indicate the change, and the name of the device that's currently in use. Not many people have multiple devices, but Chromium is still reporting the \"Mockulus Rift\" and it'd be nice to see confirmation that your device is working without having to check the console or jiggle it.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/comments/202587155","html_url":"https://github.com/borismus/webvr-boilerplate/issues/99#issuecomment-202587155","issue_url":"https://api.github.com/repos/borismus/webvr-boilerplate/issues/99","id":202587155,"user":{"login":"borismus","id":277632,"avatar_url":"https://avatars.githubusercontent.com/u/277632?v=3","gravatar_id":"","url":"https://api.github.com/users/borismus","html_url":"https://github.com/borismus","followers_url":"https://api.github.com/users/borismus/followers","following_url":"https://api.github.com/users/borismus/following{/other_user}","gists_url":"https://api.github.com/users/borismus/gists{/gist_id}","starred_url":"https://api.github.com/users/borismus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borismus/subscriptions","organizations_url":"https://api.github.com/users/borismus/orgs","repos_url":"https://api.github.com/users/borismus/repos","events_url":"https://api.github.com/users/borismus/events{/privacy}","received_events_url":"https://api.github.com/users/borismus/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T21:27:34Z","updated_at":"2016-03-28T21:27:34Z","body":"This should now be handled by WebVR 1.0 with the `onvrdisplayconnected` and `disconnected` events: https://mozvr.github.io/webvr-spec/"}}