diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 7339f3dd..f2c24ce2 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -258,6 +258,14 @@ export function getEditorTools() { };" frameborder="0" allowfullscreen>`, 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 83e219ec..a069acb7 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"