Skip to content

if the work has audio files show the player with links to play the files

Paul Mather requested to merge add_audio_player into dev

Created by: whunter

Default behavior is that if an image is set as the representative media for a work it will be rendered and the audio files will be listed below under "Items." Ico would like for the audio player to be rendered under the image if any audio files are present, even if image is set as representative media. This pull request does this. Javascript has also been added to control the player if there is more than one audio file attached. This will allow the user to change the audio file being played.


JIRA Ticket: (https://webapps.es.vt.edu/jira/browse/LIBTD-1462) ()

What does this Pull Request do? ()

Shows the audio player if audio files are attached to a work even if an image is set as the representative media.

What's the changes? ()

Shows the audio player if audio files are attached to a work even if an image is set as the representative media.

How should this be tested?

  • Create a work that has one or more audio files attached. Check that the audio for all files can be played. If there are multiple files this is done by clicking the filenames below the player. It should look like this if there are multiple audio files (just the player if just one audio file): (edit: Sorry, I added the download links after I took this screenshot)
screen shot 2018-08-01 at 2 50 45 pm
  • Create a work that has an image attached and set as representative media and one or more audio files attached. Check that any audio files can be played. It should look like this: (edit: Sorry, I added the download links after I took this screenshot)
screen shot 2018-08-01 at 2 51 52 pm
  • Check that audio files can be downloaded from the list below the audio player. (edit: Sorry, I added the download links after I took the above screenshots)

Additional Notes:

  • branch: add_audio_player

() Required fields

Merge request reports