diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 2089a12b..d50488ae 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -210,6 +210,14 @@ export function getEditorTools() { html: `
`, id: ([id]) => id, }, + cloudflareStream: { + regex: /https:\/\/customer-[a-z0-9]+\.cloudflarestream\.com\/([a-f0-9]{32})\/watch/, + embedUrl: + 'https://iframe.videodelivery.net/<%= remote_id %>', + html: ``, + }, codepen: true, aparat: { regex: /(?:http[s]?:\/\/)?(?:www.)?aparat\.com\/v\/([^\/\?\&]+)\/?/, diff --git a/lms/lms/utils.py b/lms/lms/utils.py index a735d1c6..c225d9de 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -181,6 +181,7 @@ def get_lesson_icon(body, content): if block.get("type") == "embed" and block.get("data").get("service") in [ "youtube", "vimeo", + "cloudflareStream", ]: return "icon-youtube"