There are some libraries that can manipulate the video element and create their own player to stream the video but since i can’t replace the video dome element with a player because i need the stereo functionality this is not a possible solution so i guess i’m requesting a feature if this is not supported currently? It would be really nice if this could be handled by babylon in the future to eliminate loading times of large vr videos.
The abstract answer is - we support any video that is supported in your browser. If your browser can play it in a video HTML element, Babylon should support it. If it does work in an HTML element, but doesn’t work in Bbylon, I will be very happy to check what happened.
If there is an external player that can decode the video, we can see if we can integrate it, but that would require changes in the video texture and the engine itself - and to be honest will not happen any time soon. The best would be if the custom player can stream to an Video HTML element, this way you can just use babylon as is.
This works flawlessly in vr and browser in mono, but when using a stereo video it doesn’t work until the video is completely loaded, any ideas why? all i changed was using a stereo video and changing the video mode videoDome.videoMode = BABYLON.VideoDome.MODE_SIDEBYSIDE;
I’ve set the videoMode to side by side and i’m loading a new video when pressing the “P” button
this works fine outside of vr but when entering vr it doesn’t work anymore, any ideas?
if I understated correctly, the issue is when changing the video source in the HLS class, right? it seems like there will be a need of replacing the underlying video texture, but i’ll debug that and see what can be done.
The line mediaElement.play() was missing, my bad.
after some further testing i can’t reproduce the issue, neither on the playground nor using the default babylon template, idk what’s wrong with my code i’ll try to remove all asynchronous loading if possible.
But also my served playlist doesn’t work where the public test stream does work so somehow i’m serving my playlist wrongfully and if i use the public test stream in my original code it also doesn’t stream which means my code is faulty too. My only hope is to remove asynchronicity if that does’t work i’ll try to create the project from the beginning
Just to check, it couldn’t possibly be that my video is stereo meaning the width and height causing issues? (2880x1440) My stream does Work outside of XR and in VLC Media player but when entering vr and loading my stream it doesn’t work so i guess it has to be smth about my stream
unless there is some limitation for video playback in XR that I am not aware of (not babylon, but WebXR itself), I can’t really think of a reason why the video will not play in VR mode. The flag is used as part of the rendering process, not as part of loading the video - we either split per eye or display a single image for both eyes. It also can’t really be the video’s dimensions. But I am open for everything!
If you can provide a simple reproduction that I can test with - video loaded, enter XR, video stops - I will be able to provide a more detailed answer
Thank you, just to clarify the issue is not that the video stops playing when entering vr it actually continues playing, the issue is when in XR and trying to start a different stream the video doesn’t start playing until all parts are available, but i’ll look into it on my side, since it works with the test streams on the playground it’s either my code or my server
After a week of testing i managed to replicate my issue in the Playground
How to replicate: (It’s important to clear the cache when trying what works and what doesn’t)
works
Open Playground > press “P” key > video loads as expected
Open Playground > press “P” key > video loads > enter XR > video continues loading and playing properly
doesn’t work
Open Playground > enter XR > press “P” key > video seems to load in network tab but doesn’t render
sorry for the ping @RaananW but since it’s been a week i’m afraid of being forgotten