-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from emulsify-ds/emulsif-246-convert-videos-t…
…o-support-sdc EMULSIF-246: Convert Videos to support SDC
- Loading branch information
Showing
5 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: "<iframe title='Test Video' width='854' height='480' frameborder='0' allowfullscreen='allowfullscreen' src='https://www.youtube.com/embed/YRnVnlhjOBs?autoplay=0&start=0'></iframe>" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import video from './video.twig'; | ||
|
||
import videoEmbedData from './video-embed.yml'; | ||
import videoHTML5Data from './video-html5.yml'; | ||
import { props as videoEmbedProps } from './video-embed.component.yml'; | ||
import { props as videoHTML5Props } from './video-html5.component.yml'; | ||
|
||
import { mapDataToTwig } from '../../util/dataTransformers'; | ||
import './video-embed'; | ||
|
||
/** | ||
* Storybook Definition. | ||
*/ | ||
export default { title: 'Components/Media' }; | ||
|
||
const videoEmbedData = mapDataToTwig(videoEmbedProps.properties); | ||
const videoHTML5Data = mapDataToTwig(videoHTML5Props.properties); | ||
|
||
export const videoEmbed = () => video(videoEmbedData); | ||
export const videoHtml5 = () => video(videoHTML5Data); |