User:TheDJ/panoviewer
Appearance
My attempt at converting the panoviewer toolforge tool by Dschwen into an extension which can be embedded into wiki pages.
Dutch 2023 hackathon
[edit]- Updated the extension (hook handlers, updated dependencies etc)
- Moved the projections patch into the extension. This should be more maintainable.
- I'm considering renaming the extension from PanoViewer to MediaProjections. This because panoviewer seems very much focused on 1 style of projections, and I think that with the projection classes in the project, it's better to have a tad more generic name.
- Still have to work on the magicword parsing for panorama's
- It seems that stereoscopy (VR) is actually harder now than in 2019, the libraries are all very unstable honestly. Might not be possible to add this any time soon.
Dutch 2022 hackathon
[edit]Step 1
[edit]- Create an extension for panoviewer which adds the JS modules to the relevant pages.
- I had started this project before Covid, but had never published it.
- Cleaned up and now available on the WM gitlab.
- Repo: https://gitlab.wikimedia.org/hartman/panoviewer
Step 2
[edit]- Allow mediahandlers in core to know about projections and stereoscopy formats
- Add an attribute to the thumbnails used in wiki pages
data-file-projection
for a panoramadata-file-stereo
for a stereoscopy thumbnail
- Patch for core: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/856040
<figure>
<a href="/wiki/index.php/File:Testpano.jpg">
<img src="/wiki/images/thumb/1/10/Testpano.jpg/300px-Testpano.jpg"
data-file-projection="cylindrical"
width="300"
height="71" />
</a>
<figcaption>Thumbnail of iPhone Panorama photo</figcaption>
</figure>
<figure>
<a href="/wiki/index.php/File:Curtin01.jps">
<img src="/wiki/images/thumb/7/7b/Curtin01.jps/300px-Curtin01.jps.jpg"
data-file-stereo="parallel_lr"
width="300"
height="113" />
</a>
<figcaption>Thumbnail with left right stereoscopy</figcaption>
</figure>
Step 3
[edit]Bring it together and have Panoviewer read the metadata on a wikipage and allow a user to load and open the interactive widget
- Demo video: https://www.youtube.com/watch?v=8547hM-AIq0
Lessons learned
[edit]- MediaHandling of core is file extension based, not capability based. We should really split MediaRendering off from MediaHandler, so that the handler can use a renderer conditional on the metadata of the file.
- MultimediaViewer is also file extension based. It cannot have multiple handlers for 1 file type either.
- This does not do tile rendering for very high resolution panoramas. This is a sad limitation.
- Thumbnailing for these kinds of resources is hard as you need to warp them and read lots of metadata interpretation. So for now the thumbnails remain the warped originals.
- Idea (very long term) by Ladsgroup. Create a new webp/avif file format with low and high resolutions thumbnails and tiles for the high resolution projected image. Then the thumbnailer won't have to do warping, and we can stream the tiles without having a server to do tiling and serve up the tiling
- Standards and naming for all these projections and stereoscopy is all over the place. Hard to figure out.
- There are a lot of experimental libraries for all kinds of things on the web, but few that handle almost all of the formats.
Thank you
[edit]See also:
[edit]- phab:T138933, phab:T70719, phab:T151451, phab:T150624, phab:T150640
- Patch to add 360 video to TimedMediaHandler: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TimedMediaHandler/+/787066
- Demo video: https://twitter.com/dj_hartman/status/1520527888365330436