aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/js/killy/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/js/killy/index.js')
-rw-r--r--juick-www/src/main/js/killy/index.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/juick-www/src/main/js/killy/index.js b/juick-www/src/main/js/killy/index.js
index f7eb6e5a..391ce3b6 100644
--- a/juick-www/src/main/js/killy/index.js
+++ b/juick-www/src/main/js/killy/index.js
@@ -86,6 +86,30 @@ function getEmbedableLinkTypes() {
aNode2.appendChild(imgNode);
return wrapIntoTag(aNode2, 'div');
}
+ },
+ {
+ name: 'Webm and mp4 video',
+ id: 'embed_webm_and_mp4_videos',
+ ctsDefault: false,
+ re: /\.(webm|mp4)(?:\?[\w&;\?=]*)?$/i,
+ makeNode: function(aNode) {
+ let video = document.createElement('video');
+ video.src = aNode.href;
+ video.setAttribute('controls', '');
+ return wrapIntoTag(video, 'div', 'video');
+ }
+ },
+ {
+ name: 'Mp3 and ogg audio',
+ id: 'embed_sound_files',
+ ctsDefault: false,
+ re: /\.(mp3|ogg)(?:\?[\w&;\?=]*)?$/i,
+ makeNode: function(aNode) {
+ let audio = document.createElement('audio');
+ audio.src = aNode.href;
+ audio.setAttribute('controls', '');
+ return wrapIntoTag(audio, 'div', 'audio');
+ }
}
]
}