diff --git a/client/src/components/content-blocks/VideoBlock.vue b/client/src/components/content-blocks/VideoBlock.vue
index 971b88aa..bf6b3e19 100644
--- a/client/src/components/content-blocks/VideoBlock.vue
+++ b/client/src/components/content-blocks/VideoBlock.vue
@@ -2,20 +2,24 @@
+
+
+
+
diff --git a/client/src/helpers/video.js b/client/src/helpers/video.js
index 39d3ba9a..b758efed 100644
--- a/client/src/helpers/video.js
+++ b/client/src/helpers/video.js
@@ -1,5 +1,6 @@
const YOUTUBE = /^(?:https:\/\/)?(?:www.)?(?:youtube.com\/watch\?v=|youtu.be\/)([a-zA-Z0-9_-]{11})(?:.+)?$/;
const VIMEO = /^(?:https:\/\/)?(?:www.)?vimeo.com\/([a-zA-Z0-9]*)$/;
+const SRF = /^(?:https:\/\/)?(?:www.)?srf.ch\/(?:[\w/-]*)[?&]id=([\w-]+)(?:[&\w=-]*)$/;
export function isYoutubeUrl(url) {
return YOUTUBE.test(url);
@@ -9,11 +10,17 @@ export function isVimeoUrl(url) {
return VIMEO.test(url);
}
+export function isSrfUrl(url) {
+ return SRF.test(url);
+}
+
export function getVideoId(url) {
if (isYoutubeUrl(url)) {
return YOUTUBE.exec(url)[1];
} else if (isVimeoUrl(url)) {
return VIMEO.exec(url)[1];
+ } else if (isSrfUrl(url)) {
+ return SRF.exec(url)[1];
} else {
return '';
}