Sha256: df088d32afa1ea28ddce447ed9ac7ba6077bedb4aacb22265eab9dae07341c29

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

<% if display_media_download_link?(file_set: file_set) %>
  <div>
      <h2 class="sr-only"><%= t('hyrax.file_set.show.downloadable_content.heading') %></h2>
      <audio controls="controls" class="audiojs" style="width:100%" controlsList="nodownload" preload="auto">
        <source src="<%= hyrax.download_path(file_set, file: 'ogg', mime_type: 'audio/ogg') %>" type="audio/ogg" />
        <source src="<%= hyrax.download_path(file_set, file: 'mp3', mime_type: 'audio/mpeg') %>" type="audio/mpeg" />
        <%= t('hyrax.file_set.show.downloadable_content.audio_tag_not_supported') %>
      </audio>
      <%= link_to t('hyrax.file_set.show.downloadable_content.audio_link'),
                  hyrax.download_path(file_set),
                  data: { label: file_set.id.to_s, work_id: @presenter.id, collection_ids: @presenter.member_of_collection_ids },
                  target: :_blank,
                  id: "file_download" %>
    </div>
<% else %>
    <div>
      <audio controls="controls" class="audiojs" style="width:100%" controlsList="nodownload" preload="auto">
        <source src="<%= hyrax.download_path(file_set, file: 'ogg', mime_type: 'audio/ogg') %>" type="audio/ogg" />
        <source src="<%= hyrax.download_path(file_set, file: 'mp3', mime_type: 'audio/mpeg') %>" type="audio/mpeg" />
        <%= t('hyrax.file_set.show.downloadable_content.audio_tag_not_supported') %>
      </audio>
    </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hyrax-5.0.2 app/views/hyrax/file_sets/media_display/_audio.html.erb
hyrax-5.0.1 app/views/hyrax/file_sets/media_display/_audio.html.erb
hyrax-5.0.0 app/views/hyrax/file_sets/media_display/_audio.html.erb
hyrax-5.0.0.rc3 app/views/hyrax/file_sets/media_display/_audio.html.erb