construct media-tags with hyperscript instead of HTML

pull/1/head
ansuz 3 years ago
parent e143873a20
commit 92c814e49d

@ -1045,8 +1045,10 @@ define([
var privateDat = common.getMetadataMgr().getPrivateData(); var privateDat = common.getMetadataMgr().getPrivateData();
var origin = privateDat.fileHost || privateDat.origin; var origin = privateDat.fileHost || privateDat.origin;
var src = data.src = data.src.slice(0,1) === '/' ? origin + data.src : data.src; var src = data.src = data.src.slice(0,1) === '/' ? origin + data.src : data.src;
cfg.embed($('<media-tag src="' + src + cfg.embed(h('media-tag', {
'" data-crypto-key="cryptpad:' + data.key + '"></media-tag>'), data); src: src,
'data-crypto-key': 'cryptpad:' + data.key,
}), data);
}); });
} }

Loading…
Cancel
Save