universalviewer
universalviewer copied to clipboard
Canvas renderings do not show as download links
UV version:
[email protected]
I'm submitting a:
- [X] bug report
- [ ] feature request => please use the user stories repo
- [ ] support request => Please do not submit support requests here, use stackoverflow
Current behavior:
The following manifest does not result in a "Download the mp3" link, see line 61: https://gist.github.com/hackmastera/043a5d88807e549c74723f3d75b332ac
Expected behavior:
Expect a download link for the rendering block.
Steps to reproduce:
Related code:
// insert any relevant code here
Other information:
May be related to https://github.com/UniversalViewer/universalviewer/issues/654?
@edsilv, as you may have seen, @hackmastera and I discussed this a bit on Slack; I'm wondering if this may be a problem specific to the AV component, with which I am not especially familiar.
also confirmed with this manifest https://iiif-commons.github.io/iiif-av-component/examples/data/bl/sounds-tests/C615_70.json
I noticed this whole section of logic has no equivalent and isn't called: https://github.com/UniversalViewer/universalviewer/blob/master/src/modules/uv-dialogues-module/DownloadDialogue.ts#L70-L85
There's similar code for Renderings which should be able to be adjusted, but I'm not familiar enough with the codebase to feel comfortable doing so: https://github.com/UniversalViewer/universalviewer/blob/master/src/extensions/uv-av-extension/DownloadDialogue.ts#L75-L83
Testing this locally and seeing this:

It's a problem with the logic here: https://github.com/UniversalViewer/universalviewer/blob/master/src/modules/uv-dialogues-module/DownloadDialogue.ts#L182-L185 where it's looking for a (non-existant) file extension.
We need to check if the canvas has renderings first and use getDownloadOptionsForRenderings I think: https://github.com/UniversalViewer/universalviewer/blob/master/src/modules/uv-dialogues-module/DownloadDialogue.ts#L143
I guess if the canvas has renderings it doesn't need to supply an "entire file as original" download option?
@edsilv, I'm not sure how the "Entire file" behavior should interact with renderings. On the OpenSeadragon side of things, UV adds "Entire image" download links independently of the renderings; I'm not sure if this behavior should be equivalent, or not.
"entire file" is controlled by disableMediaDownload (see http://universalviewer.io/context.json)
so it's independent of renderings at any level (canvas, range, manifest)
The downloads should be
Any renderings in the current view context, so union of rendering(s) on current canvas, range, sequence, manifest
Any additional downloads the UV can construct because there's an image service, like current view
For an MP3 there's no service. But, should the UV offer for download the content of the canvas? Canvas has an MP3 annotated on to it, so the UV plays it, but should it also surface that in the download menu?
(That's what you control through config)
Have added this to the next steering group call agenda. Looks like a good candidate for the next batch of Open Collective fixes.
All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.
looks like this was resolved in #673