Browse Source

Check if the cue has changed before updating the HTML.

pull/853/head
Jordan Dukart 4 years ago
parent
commit
0edff14b2c
  1. 2
      modules/islandora_audio/js/audio.js

2
modules/islandora_audio/js/audio.js

@ -23,8 +23,10 @@
initialized = true; initialized = true;
if ($('audio')[0].textTracks.length > 0) { if ($('audio')[0].textTracks.length > 0) {
$('audio')[0].textTracks[0].oncuechange = function() { $('audio')[0].textTracks[0].oncuechange = function() {
if (this.activeCues.length > 0) {
var currentCue = this.activeCues[0].text; var currentCue = this.activeCues[0].text;
$('#audioTrack').html(currentCue); $('#audioTrack').html(currentCue);
}
} }
} }
} }

Loading…
Cancel
Save