Skip to content

Commit

Permalink
Playlist canvas metadata (#5545)
Browse files Browse the repository at this point in the history
* Use start canvas and time props in Ramp for sections and custom start times

* Display Canvas metadata for playlist items
  • Loading branch information
Dananji authored Jan 4, 2024
1 parent 68175ad commit 948447e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/ramp_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ function collapseMoreDetails() {
*/
function disableEnableCurrentTrack(activeTrack, currentTime, isSeeked, sectionTitle) {
let title = sectionTitle;
// Return when add to playlist panel is not expanded
if($('#addToPlaylistPanel.show').length === 0) {
return;
}
if(activeTrack != undefined) {
streamId = activeTrack.streamId;
let { label, times, sectionLabel } = activeTrack;
Expand Down
5 changes: 3 additions & 2 deletions app/javascript/components/PlaylistRamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
IIIFPlayer,
MediaPlayer,
StructuredNavigation,
MetadataDisplay,
AutoAdvanceToggle,
MarkersDisplay
} from "@samvera/ramp";
Expand Down Expand Up @@ -99,8 +100,8 @@ const Ramp = ({
</Card>
<Card>
<Accordion.Collapse eventKey="1">
<Card.Body>

<Card.Body className="p-3">
<MetadataDisplay displayOnlyCanvasMetadata={true} showHeading={false} />
</Card.Body>
</Accordion.Collapse>
<Accordion.Toggle as={Card.Header} variant="link" eventKey="1" className="ramp--playlist-accordion-header">
Expand Down

0 comments on commit 948447e

Please sign in to comment.