turn off autoplay for mediacru.sh embedded videos, add controls
This commit is contained in:
parent
95dc46bc1a
commit
ea37d4fa42
@ -295,7 +295,7 @@ Linkify =
|
|||||||
return div.textContent = "ERROR: Not a valid filetype" unless embed
|
return div.textContent = "ERROR: Not a valid filetype" unless embed
|
||||||
switch embed.type
|
switch embed.type
|
||||||
when 'video/mp4', 'video/webm', 'video/ogv'
|
when 'video/mp4', 'video/webm', 'video/ogv'
|
||||||
$.extend el, <%= html('<video autoplay loop><source type="video/mp4"><source type="video/webm"></video>') %>
|
$.extend el, <%= html('<video controls loop><source type="video/mp4"><source type="video/webm"></video>') %>
|
||||||
for ext, i in ['mp4', 'webm']
|
for ext, i in ['mp4', 'webm']
|
||||||
el.firstChild.children[i].src = "https://mediacru.sh/#{a.dataset.uid}.#{ext}"
|
el.firstChild.children[i].src = "https://mediacru.sh/#{a.dataset.uid}.#{ext}"
|
||||||
when 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg'
|
when 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user