Skip to content

Commit 697685e

Browse files
committed
mp3 files render in an audio tag that has controls
1 parent c1e77b2 commit 697685e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/assets/javascripts/attachinary.js.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<li>
1313
<% if(files[i].resource_type == "raw") { %>
1414
<div class="raw-file"></div>
15+
<% } else if (files[i].format == "mp3") { %>
16+
<audio src="<%= $.cloudinary.url(files[i].public_id, { "version": files[i].version, "resource_type": 'video', "format": 'mp3'}) %>" controls />
1517
<% } else { %>
1618
<img
1719
src="<%= $.cloudinary.url(files[i].public_id, { "version": files[i].version, "format": 'jpg', "crop": 'fill', "width": 75, "height": 75 }) %>"

0 commit comments

Comments
 (0)