Skip to content
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

Integrate into viewer #27

Open
skjnldsv opened this issue Sep 3, 2019 · 8 comments
Open

Integrate into viewer #27

skjnldsv opened this issue Sep 3, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Sep 3, 2019

Hey!

Awesome app :)
On 16 we integrated the new universal viewer https://github.com/nextcloud/viewer/
Ideally your ui should integrate itself into it.

Do you see any possible issues? Could we work towards this outcome?
Can I be any help? :)

@skjnldsv skjnldsv added the enhancement New feature or request label Sep 3, 2019
@R0Wi
Copy link
Member

R0Wi commented Sep 3, 2019

Hi @skjnldsv,

i would really appreciate a proper integration. At the moment i don't see any risks to do this. The only thing which has to be mentioned is that the app isn't just the viewer component. It has also a little serverside part, which (at the moment) checks if the clicked image is a "normal" image or a photosphere image. Even if the check is quite fast it needs a little time to determine which viewer to show. So i'd suggest to keep the integration configurable so that the user (nextcloud admin) can decide, if he want's that feature or not.

Regarding the integration i've taken a look into your documentation on "how to add your own file view" a few weeks ago. But i'm not quite familiar with Vue.js so maybe you could give a minimal example on how to hook into the file click event, if a "image/jpeg" has been clicked? This is the point where we have to hook into and check if the image is a pano or not :-)

Features like "switching between panorama images" (#11) aren't implemented yet. So the integration would initially just cover a handler for a click on an image.

@skjnldsv
Copy link
Member Author

skjnldsv commented Sep 4, 2019

Okay :)
Let's do it step by step! How do you detect if a file is a panorama? Size + ratio? Metadata?
Your app does some php it seems, why exactly is this needed?

@R0Wi
Copy link
Member

R0Wi commented Sep 4, 2019

So currently the app works like this:
it hooks into the clientside click event for the mimetype "image/jpeg". If an image is clicked, a serverside script is invoked, which reads the first few bytes of the image file and scans for the XMP-data tags (metadata for pano files). If it finds the data, the tag values are returned via json and the client invokes the panoviewer with this metadata. If not the defaultviewer is invoked.

@skjnldsv
Copy link
Member Author

skjnldsv commented Sep 9, 2019

Ah yes, we would need special hook since I'm guessing the mimetype is still set to image/jpg or whatever ?

@R0Wi
Copy link
Member

R0Wi commented Sep 9, 2019

Well as far as i know pano-images are just "normal" jpeg's with a bit of metadata at the beginning of the file. So yes the mime-type is "image/jpeg" which is listed in the files-view. Do you think we should introduce a special mime-type for pano-images so that its clear to divide normal jpeg's and panos on clientside?

@skjnldsv
Copy link
Member Author

skjnldsv commented Sep 9, 2019

Not sure we can trick dav into creating its own mimetype.
I think we should rather improve how we register files actions in viewer and files for such cases. I'm sure we will find other similar issues :)

@R0Wi
Copy link
Member

R0Wi commented Sep 9, 2019

I know about an app registering it's own mimetype (https://github.com/jhass/nextcloud-keeweb). But of course it would be nice if we find another solution for this. Maybe we could add an additional attribute to the javascript-file-object or something like this?

@SKB-CGN
Copy link

SKB-CGN commented Sep 23, 2022

This would be really great, if the viewer would change, when swiping through the pictures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants