git ssb

16+

Dominic / patchbay



Tree: a2b4868abcd60a593d913223d3af542f4c8e95b2

Files: a2b4868abcd60a593d913223d3af542f4c8e95b2 / modules / meta-image.js

1392 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 !== 'meta-image')
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.link) }))
22
23 // h('dl',
24 // Object.keys(v).map(function(k) {
25 // return [
26 // h("dt", k),
27 // h("dd", v[k]),
28 // ]
29 // })))
30
31 // "Album": "the fall of",
32 // "Crc32": "038becab",
33 // "Creator": "bleupulp",
34 // "Format": "VBR MP3",
35 // "Height": "0",
36 // "Length": "375.23",
37 // "Md5": "2c517c8e813da5f940c8c7e77d4b7f3f",
38 // "Mtime": "1399498698",
39 // "Name": "2_bleupulp_-_clouds.mp3",
40 // "Sha1": "9f6a96a3d5571ed1ec2a7da38ffebdcd5f181482",
41 // "Size": "15009000",
42
43 // "Title": "clouds",
44 // "Track": "2",
45 // "Width": "0",
46
47}
48
49

Built with git-ssb-web