diff --git a/modules/islandora_audio/js/audio.js b/modules/islandora_audio/js/audio.js index e7a57ea5..de0daec7 100644 --- a/modules/islandora_audio/js/audio.js +++ b/modules/islandora_audio/js/audio.js @@ -21,10 +21,12 @@ function init(context,settings){ if (!initialized){ initialized = true; - $('audio')[0].textTracks[0].oncuechange = function() { - var currentCue = this.activeCues[0].text; - $('#audioTrack').html(currentCue); - } + if ($('audio')[0].textTracks.length > 0) { + $('audio')[0].textTracks[0].oncuechange = function() { + var currentCue = this.activeCues[0].text; + $('#audioTrack').html(currentCue); + } + } } } Drupal.Audio = Drupal.Audio || {};