Upgrade Notes - samvera-labs/ramp GitHub Wiki
Upgrading from v2.0.0 to v3.0.0
This upgrade carries a lot of new components and changes to the player and is backward compatible with v2.0.0 while there are some new props added to the existing components to make them more customizable.
This version bump doesn't require any new dependencies to be installed. But v3.0.0 doesn't require to install yarn add videojs-hotkeys as a peer dependency. This functionality is built into the Ramp code from v3.0.0, thus after installing v3.0.0 run;
yarn remove videojs-hotkeys
New components
- AutoAdvanceToggle component: related documentation
- MetadataDisplay component: related documentation
- MarkersDisplay component: related documentation
- SupplementalFiles component: related documentation
Changes to existing components
-
IIIFPlayer component:
Props:
- 3 new props added to it; they are
customErrorMessage,startCanvasId, andstartCanvasTime. These are explained in detail in the documentation here.
- 3 new props added to it; they are
-
MediaPlayer component:
Props:
- One new prop for disabling
Picture-In-Picturein the player calledenablePIP, this prop has a default value offalse.
** CHANGED DEFAULT BEHAVIOR: This prop changes the default behavior of
v2.0.0, which hadPicture-In-Pictureenabled by DEFAULT. - One new prop for disabling
-
Transcript component:
Props:
- One new prop for providing a
manifestUrl, which is the same Manifest url given to IIIFPlayer component. The component will parse thesupplementingannotation for each Canvas in the Manifest and generate a transcripts list. More information is available in the documentation.
Functionality changes:
- Transcripts component used to always auto-scroll with playback when there are transcripts with time information. In
v3.0.0the auto-scrolling can be turned on/off using the check box in the component. This is only available with transcripts with time information (e.g. WebVTT) - Indicates
machine generatedtranscripts in the component. More information can be found in the documentation.
- One new prop for providing a
-
StructuredNavigation component:
UI changes:
-
In v3.0.0 the component has a new look and feel. In the new look it indicates each root-level Range explicitly, displays time information, and displays a
Scroll to see moremessage on the bottom of the component when there are long structures.Example from the IIIF Cookbook's Table of Content for A/V Content recipe;
In v2.0.0: In v3.0.0:
-
Upgrading from 3.0.0 to 3.1.2
This upgrade includes the following changes to the existing components;
-
MetadataDisplay component:
- Supports
Nullvalues for metadata fields
- Supports
-
MediaPlayer component:
- Removed Video.js handling of any captions embedded into HLS manifests only supporting captions/subtitles via IIIF Annotations with
supplementingmotivation (related issue) - Minor bug fixes related to Canvas transitions, and styling
- Removed Video.js handling of any captions embedded into HLS manifests only supporting captions/subtitles via IIIF Annotations with
-
StructuredNavigation component:
- Minor bug fixes to improve usability
- Removed strict filtering when marking structure items with media fragments (related issue)
-
Transcript component:
New Feature:
Added support for displaying SRT files with playback synchronization
Upgrading from 3.1.2 to 3.2.0
This upgrade includes a version bump to Video.js from 7.21.3 to 8.10.0, which was waiting on a Video.js upgrade to @silvermine/videojs-quality-selector, a plugin Ramp uses. To install the new Video.js version, run the relevant command based on the package manager used in your application;
yarn add [email protected] OR npm install [email protected]
This upgrade includes the following changes to the existing components;
-
IIIFPlayer component:
Props:
- One new prop called
emptyManifestMessageto provide a customized message to display when a given IIIF Manifest is empty. More information can be found under the component's documentation
- One new prop called
-
MediaPlayer component:
Props:
- This component has 3 new props in this version, and they are
enablePlaybackRate,enableTitleLink, andwithCredentialsall of which are optional props. More information can be found under the component's documentation
Functionality changes:
- For inaccessible/empty items the player now displays
previous/nextbuttons to navigate through canvases along with a given message. More information can be found under the component's documentation
- This component has 3 new props in this version, and they are
-
MetadataDisplay component:
Functionality change:
- Added support to display both
rightsandrequiredStatementproperties under both Manifest and Canvas. They are displayed after the respective metadata block in the same component (related issue)
- Added support to display both
-
Transcript component:
New Feature:
A search within feature for all supported transcript file types was added to the Transcript component. More information can be found under the component's documentation
Upgrading from 3.2.0 to 3.3.0
This upgrade includes a version bump to react and react-dom libraries from 17.0.1 to 18.3.1, and major code refactor to the state management portion of the code.
None of these changes break the general functionalities and the user interface of the components.
Important: The component library can still be used with React 17. However, if you choose to upgrade to React 18; both react and react-dom need to be updated simultaneously to the same version.
To upgrade ReactJS in your application, please follow the instructions on the ReactJS' official upgrade guide.
This upgrade includes the following changes to the existing component(s);
-
StructuredNavigation component:
Props:
- This component has 2 new props in this version, and they are
showAllSectionsButton, andsectionsHeadingall of which are optional props. More information can be found in the component's documentation
Functionality and UI changes:
- Carries a new button for each section in structures to easily collapse and expand the structural content within the section
- A new button on top of the component to collapse and expand all collapsible structural content within structures, which can be enabled via
showAllSectionsButtonprop in the component.
- This component has 2 new props in this version, and they are
Upgrading from 3.3.0 to 4.0.0
Bug fixes
- Avoid parsing Range resources with
behavior="thumbnail-nav"(https://github.com/samvera-labs/ramp/issues/718) - Fix control bar width on text zoom on iPad devices (https://github.com/samvera-labs/ramp/issues/723)
- Text zoom not uniform across Ramp components (https://github.com/samvera-labs/ramp/issues/724)
- Turn ON
nativeTextTracksonly for browsers in devices using native iOS player (https://github.com/samvera-labs/ramp/issues/727) - Retain initial seek/scrub timestamp before playback in Safari browsers (https://github.com/samvera-labs/ramp/issues/728)
- Alignment issues causing visual artifacts for video player (https://github.com/samvera-labs/ramp/issues/734)
- Scroll to active structure section on playback (https://github.com/samvera-labs/ramp/issues/746)
- Display line breaks within cues in transcript component (https://github.com/samvera-labs/ramp/issues/750)
- Parse line breaks within cues in WebVTT and SRT files for transcripts (https://github.com/samvera-labs/ramp/pull/755)
- Check player is not null before player.trigger('resize') (https://github.com/samvera-labs/ramp/pull/760)
- Use showNotes prop in transcript search to filter cues (https://github.com/samvera-labs/ramp/pull/773)
- Structure links in later sections re-setting playhead on Canvas change (https://github.com/avalonmediasystem/avalon/issues/6264)
Accessibility fixes
- Implement keyboard accessibility for;
AutoAdvanceTogglecomponent. More information can be found in the documentation (related issue).StructuredNavigationcomponent. More information can be found in the documentation (related issue).- Use
aria-*values for announcing player updates for screen readers (https://github.com/samvera-labs/ramp/pull/780) - Change anchor tags used in structure links (https://github.com/samvera-labs/ramp/issues/767)
- Use
Transcriptcomponent. More information can be found in the documentation (related issue).
Feature changes
-
MarkersDisplay component:
- This component has 2 new props in this version, and they are
displayMotivations, andshowMoreSettingsall of which are optional props. More information can be found in the component's documentation - Supports the display of annotations with
commenting,supplementing,taggingmotivations in addition tohighlightingannotations. More information in the component's documentation page NEW❗ - BREAKING CHANGE💥 Renamed the component from
MarkersDisplaytoAnnotations
- This component has 2 new props in this version, and they are
Upgrading from 4.0.0 to 4.0.1 -> 4.0.2
Feature changes
-
Transcript component:
- 1 new prop added to turn ON/OFF display of metadata block at the top of a WEBVTT file in the component. More information can be found in the documentation
Bug Fixes
- Round time to milliseconds for accurate time calculations by @Dananji in https://github.com/samvera-labs/ramp/pull/835
- Remove timespan sorting in structured nav by @Dananji in https://github.com/samvera-labs/ramp/pull/842
- Scope and fix SVG CSS by @Dananji in https://github.com/samvera-labs/ramp/pull/843
- Change WebVTT validation to allow files with embedded metadata by @Dananji in https://github.com/samvera-labs/ramp/pull/844
- Browser determined download for files tab by @cjcolvar in https://github.com/samvera-labs/ramp/pull/849
- Remove untimed search hits and preserve inline styling for search within by @Dananji in https://github.com/samvera-labs/ramp/pull/852
- Fix shift+tab behavior in annotations and transcript components by @masaball in https://github.com/samvera-labs/ramp/pull/856
Accessibility Fixes
- Implement sectioning elements/landmark roles for page navigation by @Dananji in https://github.com/samvera-labs/ramp/pull/827
- Fix a11y issues around structure and markers form by @Dananji in https://github.com/samvera-labs/ramp/pull/834
- Fix voiceover and a11y for cues in transcripts & annotations by @Dananji in https://github.com/samvera-labs/ramp/pull/859 -> 4.0.2
Upgrading from 4.0.x to 5.0.0
This upgrade includes breaking changes to React version requirements, the build system, and VideoJS dependency management.
Breaking Changes💥
-
React 19 required: This version drops support for React 17 and React 18. Both
reactandreact-dommust be upgraded to^19.0.0before installing@samvera/[email protected]. To upgrade ReactJS in your application, please follow the instructions on the ReactJS official upgrade guide (related issue) -
VideoJS is now bundled:
video.jsis no longer a peer dependency — it is bundled directly into the library. After upgrading, remove it from your application dependencies:yarn remove video.js npm uninstall video.js -
Build system migrated to Vite: The library is now built using Vite in library mode (previously Rollup). This makes no difference to consumers as the bundle output filenames remain the same (
ramp.esm.js,ramp.cjs.js,ramp.umd.js,ramp.css) (related issue)
New Features
- Add show more/less functionality to transcript cues (related issue)
- Add fallback strategy for source selection (related issue)
- Display player controls in error state (related issue)
- Sort markers chronologically on load and updates (related issue)
- Auto-enable forced text tracks (captions). Read more in documentation (related issue)
Bug Fixes
- Fix search highlights for searches with punctuation in untimed transcripts (related issue)
- Disregard clicked timespan when highlighting timespans (related issue)
- Set player time accurately when switching between canvases (related issue)
- Display inline supplementing annotations in the Transcript component (related issue)
- Change language in collapse/expand button and heading in structure nav (related issue)
- Fix structure nav for multi-sectioned IA manifests (related issue)
- Fix indefinite loading spinner in transcripts tab (related issue)
- Fix missing label parsing in annotations (related issue)
- Fix MIME type for resources (related issue)
- Fix transcript/annotation sync with playback for multi-source Canvas (related issue)
- Fix caption synchronization for multi-source canvases across all browsers (related issue)
- Fix close/expand behavior for cookbook ToC recipes (https://github.com/samvera-labs/ramp/pull/865)
Improvements
- Remove deprecation warnings in build logs (https://github.com/samvera-labs/ramp/pull/866)
- Adjust the big-play-button sizing in video player (related issue)
- Fix layout shift for vertical scrollbar appearance (related issue)
- Change markers table to a table layout (related issue)
- Test on latest node versions by @cjcolvar in https://github.com/samvera-labs/ramp/pull/909
- Replace
sanitize-htmlwithdompurifyfor HTML sanitization (related issue)