From 7724f79cc04ab530e07940eb571ddbe79fdf8e80 Mon Sep 17 00:00:00 2001 From: Roberto Hernandez Date: Mon, 19 Aug 2024 10:01:03 -0600 Subject: [PATCH] feat(emulsif-246): restructure video data files for SDC support --- .../videos/video-embed.component.yml | 21 +++++++++++++++++ src/components/videos/video-embed.yml | 2 -- .../videos/video-html5.component.yml | 23 +++++++++++++++++++ src/components/videos/video-html5.yml | 5 ---- 4 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 src/components/videos/video-embed.component.yml delete mode 100644 src/components/videos/video-embed.yml create mode 100644 src/components/videos/video-html5.component.yml delete mode 100644 src/components/videos/video-html5.yml diff --git a/src/components/videos/video-embed.component.yml b/src/components/videos/video-embed.component.yml new file mode 100644 index 00000000..44f1b256 --- /dev/null +++ b/src/components/videos/video-embed.component.yml @@ -0,0 +1,21 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: Video Embed +group: Components +status: stable +props: + type: object + required: + - video__type + - video_content + properties: + video__type: + type: string + title: Video Type + description: 'Specifies the type of video to embed. Possible values: embed, html5' + data: 'embed' + video_content: + type: string + title: Video Content + description: 'Directly specifies the HTML content for embed videos' + data: "" diff --git a/src/components/videos/video-embed.yml b/src/components/videos/video-embed.yml deleted file mode 100644 index e95c955e..00000000 --- a/src/components/videos/video-embed.yml +++ /dev/null @@ -1,2 +0,0 @@ -video__type: 'embed' -video_content: "" diff --git a/src/components/videos/video-html5.component.yml b/src/components/videos/video-html5.component.yml new file mode 100644 index 00000000..3d805f86 --- /dev/null +++ b/src/components/videos/video-html5.component.yml @@ -0,0 +1,23 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: Video HTML5 +group: Components +status: stable +props: + type: object + required: + - video__type + - video__urls + properties: + video__type: + type: string + title: Video Type + description: 'Specifies the type of video to embed. Possible values: embed, html5' + data: 'html5' + video__urls: + type: array + title: Video URLs + description: 'List of video URLs for HTML5 videos' + data: + - 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4' + - 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-webm-file.webm' diff --git a/src/components/videos/video-html5.yml b/src/components/videos/video-html5.yml deleted file mode 100644 index b49d5e03..00000000 --- a/src/components/videos/video-html5.yml +++ /dev/null @@ -1,5 +0,0 @@ -video__type: 'html5' -# Add remote or locally hosted MP4, WebM, or OGG files. -video__urls: - - 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4' - - 'https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-webm-file.webm'