git ssb

16+

Dominic / patchbay



Tree: 7da1b2adbfa620cd35e8dcf31baf0f7d82bc9874

Files: 7da1b2adbfa620cd35e8dcf31baf0f7d82bc9874 / modules_extra / audio-mp3.js

1507 bytesRaw
1var markdown = require('ssb-markdown');
2var h = require('hyperscript');
3var u = require('../util');
4var ref = require('ssb-ref');
5
6//render a message
7
8var plugs = require('../plugs');
9var message_link = plugs.first(exports.message_link = []);
10var message_confirm = plugs.first(exports.message_confirm = []);
11var sbot_links = plugs.first(exports.sbot_links = []);
12var blob_url = plugs.first(exports.blob_url = []);
13
14exports.message_content = function(msg, sbot) {
15 if (msg.value.content.type !== 'audio-mp3')
16 return;
17
18 var v = msg.value.content;
19 return h('div',
20 h('h2', "(" + v.Track + ") " + v.Title),
21 // h('img', { "src" : blob_url(v.cover) }),
22 h('audio', {
23 "controls" : true,
24 "src" : blob_url(v.link)
25 }))
26 // h('dl',
27 // Object.keys(v).map(function(k) {
28 // return [
29 // h("dt", k),
30 // h("dd", v[k]),
31 // ]
32 // })))
33
34 // "Album": "the fall of",
35 // "Crc32": "038becab",
36 // "Creator": "bleupulp",
37 // "Format": "VBR MP3",
38 // "Height": "0",
39 // "Length": "375.23",
40 // "Md5": "2c517c8e813da5f940c8c7e77d4b7f3f",
41 // "Mtime": "1399498698",
42 // "Name": "2_bleupulp_-_clouds.mp3",
43 // "Sha1": "9f6a96a3d5571ed1ec2a7da38ffebdcd5f181482",
44 // "Size": "15009000",
45
46 // "Title": "clouds",
47 // "Track": "2",
48 // "Width": "0",
49
50}
51
52

Built with git-ssb-web