Update Clyp embedding.

This commit is contained in:
ccd0 2017-07-14 23:43:33 -07:00
parent 6f9c6ec467
commit 785e3339d9

View File

@ -240,14 +240,10 @@ Embedding =
, ,
key: 'Clyp' key: 'Clyp'
regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/ regExp: /^\w+:\/\/(?:www\.)?clyp\.it\/(\w+)/
style: '' style: 'border: 0; width: 640px; height: 160px;'
el: (a) -> el: (a) ->
el = $.el 'audio', $.el 'iframe',
controls: true src: "https://clyp.it/#{a.dataset.uid}/widget"
preload: 'auto'
type = if el.canPlayType 'audio/ogg' then 'ogg' else 'mp3'
el.src = "https://clyp.it/#{a.dataset.uid}.#{type}"
el
, ,
key: 'Dailymotion' key: 'Dailymotion'
regExp: /^\w+:\/\/(?:(?:www\.)?dailymotion\.com\/(?:embed\/)?video|dai\.ly)\/([A-Za-z0-9]+)[^?]*(.*)/ regExp: /^\w+:\/\/(?:(?:www\.)?dailymotion\.com\/(?:embed\/)?video|dai\.ly)\/([A-Za-z0-9]+)[^?]*(.*)/