Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio files that have no tracks throw an error on media page #1871

Closed
wgilling opened this issue Jul 13, 2021 · 2 comments
Closed

Audio files that have no tracks throw an error on media page #1871

wgilling opened this issue Jul 13, 2021 · 2 comments

Comments

@wgilling
Copy link
Contributor

wgilling commented Jul 13, 2021

For items' media that are set to use the audio media type -- and the uploaded mp3 file entity has no tracks information, the media page for it throws a (Chrome | Inspect | Console) javascript console error:

drupal.js?v=9.2.0:16 Uncaught TypeError: Cannot set property 'oncuechange' of undefined
    at init (audio.js?v=1.x:24)
    at Object.attach (audio.js?v=1.x:37)
    at drupal.js?v=9.2.0:27
    at Array.forEach (<anonymous>)
    at Object.Drupal.attachBehaviors (drupal.js?v=9.2.0:24)
    at drupal.init.js?v=9.2.0:29
    at HTMLDocument.listener (drupal.init.js?v=9.2.0:17)

NOTE: The Format for the audio file must also be set to "Audio with Captions" for either Source or Default http://localhost:8000/admin/structure/media/manage/audio/display or http://localhost:8000/admin/structure/media/manage/audio/display/source... otherwise the audio.js file is not attached via the twig template.

This can be addressed in the islandora/modules/islandora_audio/js/audio.js file by checking that the textTracks exists before trying to set HTML for each currentCue it might have.

@wgilling
Copy link
Contributor Author

added additional info to specify the exact configuration that causes this error to happen.

@elizoller
Copy link
Member

fix was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants