Problems with WebVR 360 video, getting Display parameters error

Hi everyone!

I’m currently making a 360 video in Web VR. I’m having problems with a “Failed to recalculate device parameters” error. It works on desktop / laptop but not on my android device, even though the tutorial video works on it (I tried copying it to get it to work).

Does anyone know what it could be? (I’m completely new in PlayCanvas, and normally a C# Unity developer).

(It takes a bit to load)

Link to published video: https://playcanv.as/p/IcZqomSF/

Link to Project : https://playcanvas.com/project/531079/overview/testingwebvr

I really hope someone knows what to do, and would really appreciate the help <3

Sinceresly

Nikolaj

I’m having the exact same problem and also looking for help.

I’m using Chrome on Ubuntu to test, with the mobile mode switched on.

The video works fine after pressing play. But clicking on the mask to enable VR mode does not work.

The VR windows appear, but just show the background colour of the camera entity.

In the inspector, here’s the error

screen.orientation.lock() failed due to
	console.error	   @ launch.js:7513
	(anonymous)        @ webvr-polyfill.bad0c71.js:646
	Promise rejected (async)
	onFullscreenChange @ webvr-polyfill.bad0c71.js:645
	fullscreenchange   @ playcanvas-stable.dbg.js:120

256 [.Offscreen-For-WebGL-0xa793e854800]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0

WebGL: too many errors, no more errors will be reported to the console for this context.

I forked the WebVR 360 video project (https://playcanvas.com/project/434444/overview/webvr-360-video) and just swapped out the video url. This project worked for a day but now fails too (which is a relief in a way!).

The URL to the project is below, but as it’s a private project I assume only admins can see it.

https://playcanvas.com/project/531123/

Thanks for any help.

Mei

Edit: I’ve found a new project that looks identical to what I forked: https://playcanvas.com/project/443080/overview/360-vr-video I’m using a fork of this now which allows me to view the video on my Samsung S3, but the webvr still fails and shows the video background colour. At least I’m a step nearer…

1 Like

I’m using the Chrome inspector to remotely debug off my Samsung S3. The video plays fine, but still problems when I jump into WebVR mode.

I think that I’ve tracked it down to this error message:

Uncaught (in promise) DOMException: Failed to load because no supported source was found.
Promise (async)		
AndroidWakeLock.request     @	webvr-polyfill.bad0c71.js:6069
(anonymous) 	            @	webvr-polyfill.bad0c71.js:682
VRDisplay.requestPresent	@	webvr-polyfill.bad0c71.js:588
requestPresent              @	playcanvas-stable.dbg.js:19536
enterVr                     @	playcanvas-stable.dbg.js:22302
onEnterVrPressedEvent	    @	web-vr-ui.js?id=10860562:71

The AndroidWakeLock.request references this piece of code

// webvr-polyfill.bad0c71.js, line 6053 
/**
 * Android and iOS compatible wakelock implementation.
 *
 * Refactored thanks to dkovalev@.
 */
function AndroidWakeLock() {
  var video = document.createElement('video');

  video.addEventListener('ended', function() {
    video.play();
  });

  this.request = function() {
    if (video.paused) {
      // Base64 version of videos_src/no-sleep-120s.mp4.
      video.src = Util.base64('video/mp4', 'AAAA...base64 encoded string...');
      video.play();
    }
  };

  this.release = function() {
    video.pause();
    video.src = '';
  };
}

While the screen shows the two VR windows with the video’s default background, I can still hear the audio so I assume the video is playing somewhere.

Mei

1 Like