Skip to content

Commit

Permalink
Check if the cue has changed before updating the HTML. (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordandukart authored Oct 28, 2021
1 parent 01f22b7 commit adbfea7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/islandora_audio/js/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
initialized = true;
if ($('audio')[0].textTracks.length > 0) {
$('audio')[0].textTracks[0].oncuechange = function() {
if (this.activeCues.length > 0) {
var currentCue = this.activeCues[0].text;
$('#audioTrack').html(currentCue);
}
}
}
}
Expand Down

0 comments on commit adbfea7

Please sign in to comment.