Skip to content

feat(web): implement xr 360 photo preview #14768 #17988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andreymaznyak
Copy link

@andreymaznyak andreymaznyak commented Apr 30, 2025

implement simple xr 360 preview
#14768

Description

I have a large library of 360 photos and videos from my Insta360 and drone, and I recently bought a Quest 3—because watching this kind of content in VR is truly an amazing experience.

I’m also experimenting with Apple Spatial Video and planning to implement rendering and playback in VR later on.

Starting small—for now, the Oculus browser doesn’t support proper 360 photo viewing, so I decided to implement this feature myself, since I have a lot of 360 photos.

I did some research on whether it’s possible to enable XR support using the PhotoSphereViewer library: mistic100/Photo-Sphere-Viewer#228 — unfortunately, PhotoSphereViewer doesn’t support VR.

Since we have the WebXR standard, I ended up creating a simple implementation for native 360 photo viewing using it.

Added support 360 video view

How Has This Been Tested?

I tested it in meta quest 3. Also you check toogle features with web xr polyfill, but it not working as needed. I put record of my quest screen.

Screenshots (if appropriate)

image

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

@alextran1502
Copy link
Contributor

Hello, do you mind including a sample asset in this PR?

@andreymaznyak
Copy link
Author

I'm just start working with it for fun. 😄 Work in progress.
Thank you for good open source project - i migrating my assets to immich ❤️

I record small video how it works.

https://www.youtube.com/watch?v=eeLxnJTiCZk

@DeltaTango69
Copy link

DeltaTango69 commented Apr 30, 2025

Nice, I have also an Insta and Quest3. If I have to wait if this will be implemented, or what can I do to use it? Will this also work for videos?

@andreymaznyak
Copy link
Author

Nice, I have also an Insta and Quest3. If I have to wait if this will be implemented, or what can I do to use it? Will this also work for videos?

I think, you can do it, if you want - you can checkout 😄 I check it only in photos. You can try to implement video support.

Do not forgot about web xr features works only with https - https://medium.com/@schezfaz/getting-started-with-webxr-development-for-the-oculus-browser-159339b2a7f3

And in the future, i think we should improve processing of insta360 files. Stack videos, and auto generate thumbs with instal360 sdk.

@andreymaznyak
Copy link
Author

Hello, do you mind including a sample asset in this PR?

Good news, i researched how to implement rendering apple spatial videos in immich.

This this feature request for parse metadata from apple spatial video

I make some research and create repository with example transcoding mv-hevc video and rendering it web xr.
Repository here

I think we can combine this features.

And i think you should find some VR gadget for testing it 😉

@andreymaznyak
Copy link
Author

I proceed work with implementation xr features, and research to showing apple spatial photos, results in same repository.

I think we are should create new feature flag and job for supporting web xr in immich. When flag is true, we should make preview photos for each eye for web xr view.

@andreymaznyak andreymaznyak force-pushed the support-web-xr-on-360-photos branch from 6710310 to f4fa201 Compare May 2, 2025 11:10
@andreymaznyak andreymaznyak marked this pull request as ready for review May 5, 2025 11:25
@andreymaznyak andreymaznyak force-pushed the support-web-xr-on-360-photos branch from 9323682 to 60d995f Compare May 5, 2025 11:25
@orrd
Copy link

orrd commented Jun 18, 2025

I would love to have the ability to view 360 photos with a Quest headset. Each time there is a new Immich release, I'm hoping they merged this pull request. Is there any reason they can't merge it as it is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants