Repository navigation
Conversation
…ions # Conflicts: # package-lock.json # package.json
demiankatz
left a comment
There was a problem hiding this comment.
@K8Sewell, I played with our https://digital.library.villanova.edu/Item/vudl:829943/Manifest manifest on this branch a bit more and have a couple of comments:
1.) For some reason, loading the manifest intermittently fails. About 30% of the time, I see the "cannot load media" message (with the link to download), but the rest of the time it works normally.
2.) I think the caption control may need a little more thought -- I was convinced that captions were broken because when I set caption colors, the captions didn't come up -- but that's because I was setting the colors while captions were turned off! I wonder if we should disable the color options when captions are disabled to prevent this misconception....
I've started looking at the code a little bit, too -- so far I like what I see (though I'm afraid I can't promise to look thoroughly at this large volume of tests!). I'll review more files in more depth after we finish this part of the conversation. :-)
Thank you for taking an initial look. Yes, I know, :) fair few tests. I did adjust the color menu for the captions so that now it should be a little more obvious when the captions are off. Interested to know what you think! |
Thanks, @K8Sewell, this is definitely an improvement! One other detail we might want to think about (though there's no perfect answer, and I don't seriously object to how it behaves today) is the closing behavior of the caption controls. It feels just a little strange to me that the caption pop-up closes as soon as I choose something. If I want to change the captions and change the color, I have to open the control twice because it changes after each selection I make. Would it possibly be better to have the control toggle open and closed with the caption button, but stay open when selections are made? (As I said, I'm not sure I prefer it differently than it is currently implemented, but just raising the idea for consideration). |
demiankatz
left a comment
There was a problem hiding this comment.
I put a few more minutes into review here and chipped away at more files, though I still have about 50 to go. I'll try to find time for more later in the week. In the meantime, see below for a new question:
| // Collapsing: decided by the open class, which changes at once, as | ||
| // isExpanded only changes once the animation's finished (so is out of | ||
| // date for a toggle made while the panel's still opening or closing). | ||
| if (!this.$element.hasClass("open")) { |
There was a problem hiding this comment.
You've eliminated the vast majority of references to this.isExpanded. Is it possible/should we fully eliminate the property? (It probably is best to leave it as-is for release 2.5, but maybe more cleanup can be done in 3.0 -- if this is a good idea, maybe we should track it with an issue; I haven't investigated whether this is already changed by the UI work in progress).
Description of what you did:
Relevant Issue
#1926
PR Contents
90% of the files changed in this PR are the addition of test fixtures and tests. Most changes revolve around the AV Component and Media Element.
Draft Release Notes
Details
Audio and video
Both of UV's audio and video players (the AV extension, for manifests with ranges, and the MediaElement extension, for those without) now have captions, play streams more reliably, and have accessible controls. See Audio and Video for the details.
Captions
text/vtt) and SRT (text/srt) files, whether the manifest gives them as asupplementingannotation (IIIF Cookbook recipe 0219), including aChoiceof languages (recipe 0074), as arenderingof the canvas, or alongside the media in its painting annotation.captionStylesoption onavCenterPanelandmediaElementCenterPanel.localStorage(uv-caption-preferences), and carry over to other canvases and manifests.Streaming (HLS and MPEG-DASH)
Choiceof formats), both players try each in turn until one plays: HLS, then MPEG-DASH (except in Safari), then any other format, then a version with no format, then HLS by the other way (the browser's own player or hls.js).cdn.jsdelivr.net. If the page that hosts UV has already loaded its own copy (aswindow.Hlsorwindow.dashjs), UV uses that instead of loading its own; a page's own hls.js is tried first, even in Safari.hideMediaErroroption onmediaElementCenterPanelhides it, as the existing one does onavCenterPanel.Accessible controls
hideVolumeOnTouchDevicesoption hides it on touch devices. On iOS and iPadOS, which don't let pages set the volume, only the mute button is shown.Images with audio and video
Both players now choose the image shown with audio or video the same way: a
placeholderCanvasbefore the media plays (recipe 0013), anaccompanyingCanvaswhile it plays (recipe 0014), and otherwise athumbnail. AposterCanvas, from drafts of IIIF Presentation 3, is read as aplaceholderCanvas.Translations
The players' and the captions menu's text is translated into every language UV ships (cy-GB, en-GB, fr-FR, pl-PL and sv-SE). If you maintain your own build of UV with your own locale files, add the new keys from
src/locales/en-GB.jsonto them: a key a locale file doesn't have appears in the viewer as the key itself, e.g.$captionsOffinstead of "Off".Bugs fixed
#xywh=) was shown in the wrong place, in auto-advance playback#t=), e.g. a clip from 1.5 seconds into its file started at 1 second