git ssb

16+

Dominic / patchbay



Tree: 1a2e89c1945e9b2330e4834a9e544adbc12b171d

Files: 1a2e89c1945e9b2330e4834a9e544adbc12b171d / modules / audio-mp3.js

1529 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 = []);
12
13exports.message_content = function(msg, sbot) {
14 if (msg.value.content.type !== 'audio-mp3')
15 return;
16
17 var v = msg.value.content;
18 return h('div',
19 h('h2', "(" + v.Track + ") " + v.Title),
20 // h('img', { "src" : "http://localhost:7777/" + encodeURIComponent(v.cover) }),
21 h('audio', {
22 "controls" : true,
23 "src" : "http://localhost:7777/" + encodeURIComponent(v.link)
24 }))
25 // h('dl',
26 // Object.keys(v).map(function(k) {
27 // return [
28 // h("dt", k),
29 // h("dd", v[k]),
30 // ]
31 // })))
32
33 // "Album": "the fall of",
34 // "Crc32": "038becab",
35 // "Creator": "bleupulp",
36 // "Format": "VBR MP3",
37 // "Height": "0",
38 // "Length": "375.23",
39 // "Md5": "2c517c8e813da5f940c8c7e77d4b7f3f",
40 // "Mtime": "1399498698",
41 // "Name": "2_bleupulp_-_clouds.mp3",
42 // "Sha1": "9f6a96a3d5571ed1ec2a7da38ffebdcd5f181482",
43 // "Size": "15009000",
44
45 // "Title": "clouds",
46 // "Track": "2",
47 // "Width": "0",
48
49}
50

Built with git-ssb-web