git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 1a2e89c1945e9b2330e4834a9e544adbc12b171d

use blob_url plugin instead of hard coding the server

Dominic Tarr committed on 7/25/2016, 6:03:55 AM
Parent: ff26c80cfeeef42ea28f8dcf591948899991614e

Files changed

modules/music-release-cc.jschanged
modules/music-release-cc.jsView
@@ -8,25 +8,26 @@
88 var plugs = require('../plugs');
99 var message_link = plugs.first(exports.message_link = []);
1010 var message_confirm = plugs.first(exports.message_confirm = []);
1111 var sbot_links = plugs.first(exports.sbot_links = []);
12+var blob_url = plugs.first(exports.blob_url = []);
1213
1314 exports.message_content = function(msg, sbot) {
1415 if (msg.value.content.type !== 'music-release-cc')
1516 return;
1617
1718 var tracks = msg.value.content.tracks;
1819 return h('div',
19- h('img', { "src" : "http://localhost:7777/" + encodeURIComponent(msg.value.content.cover) }),
20+ h('img', { "src" : blob_url(msg.value.content.cover) }),
2021 h('h1', msg.value.content.title),
2122 h('ol',
2223 Object.keys(tracks).map(function(k) {
2324 var t = tracks[k];
2425 return h('li', t.fname,
2526 h("br"),
2627 h('audio', {
2728 "controls" : true,
28- "src" : "http://localhost:7777/" + encodeURIComponent(t.link)
29+ "src" : blob_url(t.link)
2930 }))
3031 })),
3132 h('p',
3233 "More info:", h('a', { href : msg.value.content.archivedotorg }, "archive.org"),
@@ -75,4 +76,5 @@
7576 // message_confirm(yup)
7677 // }}, 'yup')
7778
7879 // }
80+

Built with git-ssb-web