Skip to content

Commit

Permalink
Merge pull request #5550 from avalonmediasystem/playlist-item-title-fix
Browse files Browse the repository at this point in the history
Display correct playlist item title for restricted items
  • Loading branch information
cjcolvar authored Jan 10, 2024
2 parents 4b4bc7d + a0810c9 commit e5e6b74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
25 changes: 0 additions & 25 deletions app/assets/javascripts/refresh_token.js.coffee

This file was deleted.

9 changes: 4 additions & 5 deletions app/javascript/components/PlaylistRamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ const Ramp = ({
let player = document.getElementById('iiif-media-player');
if(player && player.player != undefined && !player.player.isDisposed()) {
let playerInst = player.player;
let canvasIndex = parseInt(player.dataset.canvasindex);
playerInst.on('loadedmetadata', () => {
let activeElements = document.getElementsByClassName('ramp--structured-nav__list-item');
if(activeElements != undefined && activeElements?.length > 0) {
setActiveItemTitle(activeElements[canvasIndex].textContent);
playerInst.ready(() => {
let activeElement = document.getElementsByClassName('ramp--structured-nav__list-item active');
if(activeElement != undefined && activeElement?.length > 0) {
setActiveItemTitle(activeElement[0].textContent);
}
});
}
Expand Down

0 comments on commit e5e6b74

Please sign in to comment.