git ssb

9+

cel / ssb-viewer



Commit 38c61a5069cfd7444fd36af69b49b22d92af5f4d

Support audio and video elements

cel committed on 9/10/2020, 2:31:58 AM
Parent: aa1697181e2065d65b336d19ad06501921b37c39

Files changed

render.jschanged
render.jsView
@@ -54,8 +54,20 @@
5454 return h('object',
5555 { type: 'image/svg+xml',
5656 data: href,
5757 alt: text }).outerHTML
58 + else if (/^video:/.test(text))
59 + return h('video', {
60 + controls: 'controls',
61 + src: this.opts.blob_base + href,
62 + title: title || undefined
63 + }).outerHTML
64 + else if (/^audio:/.test(text))
65 + return h('audio', {
66 + controls: 'controls',
67 + src: this.opts.blob_base + href,
68 + title: title || undefined
69 + }).outerHTML
5870 else
5971 return h('img',
6072 { src: this.opts.img_base + href,
6173 alt: text,

Built with git-ssb-web