aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 82395af..3de96c7 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -286,9 +286,10 @@ RenderMsg.prototype.message = function (cb) {
case 'ssb-dns': return this.dns(cb)
case 'gathering': return this.gathering(cb)
case 'micro': return this.micro(cb)
+ case 'audio': return this.audio(cb)
case 'ferment/audio':
case 'robeson/audio':
- return this.audio(cb)
+ return this.fermentAudio(cb)
case 'ferment/repost':
case 'robeson/repost':
return this.repost(cb)
@@ -1123,6 +1124,15 @@ function formatDuration(s) {
}
RenderMsg.prototype.audio = function (cb) {
+ this.wrapMini([
+ h('a', {href: this.toUrl(this.c.blob)}, 'audio'),
+ isFinite(this.c.format) ? ' (' + this.c.format + ')' : '',
+ isFinite(this.c.duration) ? ' (' + formatDuration(this.c.duration) + ')' : '',
+ isFinite(this.c.size) ? ' [' + this.render.formatSize(this.c.size) + ']' : '',
+ ], cb)
+}
+
+RenderMsg.prototype.fermentAudio = function (cb) {
// fileName, fallbackFileName, overview
this.wrap(h('table', h('tr',
h('td',