Skip to content

Commit

Permalink
mp3 files render in an audio tag that has controls
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Loseke committed Nov 21, 2016
1 parent c1e77b2 commit 697685e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/assets/javascripts/attachinary.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<li>
<% if(files[i].resource_type == "raw") { %>
<div class="raw-file"></div>
<% } else if (files[i].format == "mp3") { %>
<audio src="<%= $.cloudinary.url(files[i].public_id, { "version": files[i].version, "resource_type": 'video', "format": 'mp3'}) %>" controls />
<% } else { %>
<img
src="<%= $.cloudinary.url(files[i].public_id, { "version": files[i].version, "format": 'jpg', "crop": 'fill', "width": 75, "height": 75 }) %>"
Expand Down

0 comments on commit 697685e

Please sign in to comment.