07-18-2017 10:39 PM
I have a web app that uses ThreeJS. I am currently trying to include WebVR to be used with Gear VR.
I am aware that I need to link to that web app using the ovrweb protocol in order to open it in Gear VR. My problem is that it does not.
Whenever I use window.location.href = "ovrweb:http://my-app-url"
,
I am asked to attach the device to Gear VR. But once I do so, the
screen remains black. I noticed that the same thing happens whenever I
use some non-VR webpage as the URL (like ovrweb:https://www.google.com
).
However the ovrweb protocol works fine as expected with certain URLs - such as ovrweb:https://playcanv.as/p/VNTAx5Eu/
.
I am not sure what I am missing. My app has a VR button, on clicking which the display.requestPresent
API call gets fired & the screen splits into two (works in Chrome
Canary). Is that any list of requirements that my app needs to satisfy
to be recognized via ovrweb protocol? If so, what are those?
I went through the Oculus docs, but did not find anything that could help me. How do I make my app run via ovrweb protocol?
Update: I found that ThreeJS example links (such as https://threejs.org/examples/webvr_rollercoaster.html) are not working over ovrweb protocol either.
Solved! Go to Solution.
07-21-2017 11:57 PM
display.requestPresent( [ { source: canvas } ] )
.then(function() {
// Presenting to WebVR display
}, function(e) {
// On error
});
07-21-2017 11:57 PM
display.requestPresent( [ { source: canvas } ] )
.then(function() {
// Presenting to WebVR display
}, function(e) {
// On error
});