Fix vocaroo embeds

This commit is contained in:
PinkCatGoodActually 2022-02-02 03:28:00 -06:00 committed by GitHub
parent e6c1f5502b
commit 0703782a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -486,13 +486,12 @@ Embedding =
regExp: /^\w+:\/\/(?:(?:www\.|old\.)?vocaroo\.com|voca\.ro)\/((?:i\/)?\w+)/
style: ''
el: (a) ->
el = $.el 'audio',
controls: true
preload: 'auto'
el.src = if /^i\//.test(a.dataset.uid)
"https://old.vocaroo.com/media_command.php?media=#{a.dataset.uid.replace('i/', '')}&command=download_mp3"
else
"https://media1.vocaroo.com/mp3/#{a.dataset.uid}"
el = $.el 'iframe'
el.width = 300
el.height = 60
el.setAttribute('frameborder', 0);
el.allow = "autoplay"
el.src = "https://vocaroo.com/embed/#{a.dataset.uid.replace(/^i\//, '')}?autoplay=0"
el
,
key: 'YouTube'