I have a NodeJS app with Express and Babylon and i want the user to watch some high quality videos on a 180 stereoscopic video dome in VR.
The issue is that the video files seem to be loaded completely before they play which causes very long loading times so i tried to use the file system in nodejs to pass some partial video data to the video dome function
updateURL(). This seems to work fine in the browser but when going into VR mode (using WebXR API or an actual Headset) the video doesn’t seem to play until the entire video is available.
From my understanding the video dome is just an html video element so i’m confused as to what’s happening when entering VR.
This can’t be replicated on the Playground i believe, but i simplified the code and created a GitHub Repository.
To replicate: clone the repository, use
npm install and then
node app.js to run the local server and access it under localhost:
Thank you in advance!
You are totally right. This is a basic html video element. I’ll assign it to myself and run a few tests. It might be a limitation in your environment, because in a standard browser it doesn’t happen this way.
I’m sorry but what do you mean by this, meaning the VR Headset browser might be the issue?
I’ve tested my app on the Pico 4 and with the WebXR API extension in chrome and firefox with the same results unfortunately
I’m referring to what you wrote before:
HTML video should play correctly, whether in WebXR or not. What i said is that if it works in dektop mode or on a desktop browser, but doesn’t work in XR, it might be a limitation of the system or the environment in which you are testing.
Also - this might be an issue with the server implementation itself, especially if you can’t reproduce that in the playground. I am not going to debug server-side code, but will be very happy to test a playground.
Oh okay, i don’t really understand what limitation there could be on my end since it worked fine before implementing passing the video as HTTP 206 partial content and i’m not modifying the video element so i thought there might be a limitation in babylon not accepting partial content in vr or something which doesn’t make sense of course.
I still don’t understand how it can work fine outside of XR and not work in XR and of course i shouldn’t expect anyone to debug my backend code so i guess i should rather ask:
How can i prevent the videoDome from loading the entire video file when using
updateURL() and instead load the beginning first, maybe the first 10 seconds, and then the rest of the video?
Is this at all possible in Babylon alone?
Since this is a basic HTML element, anything that works in HTML should work in Babylon as well. Babylon doesn’t really do anything special with the video. So if it works with HTML video, it should work with babylon.
Is it reproduced on the playground? Can you provide a playground that doesn’t work? This way it will be much easier for me to find out what the issue is. If it is browser limitation, webxr issue, or a babylon bug that needs to be resolved.
Wild guess time. Might you need to deal with the layers WebXR feature, or at least turn it on?
I tried serving my videos as partial content with a PHP server instead of NextJS and it works fine now but thank you both for your help i just coulnd’t get it running with NodeJS
okay nevermind, the video stream works but the videoDome isn’t stereoscopic when accessing the video as 206 parts, when just using the path aka loading the entire video when the user starts the app it appears as stereo