Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
79bc95a4
Commit
79bc95a4
authored
Oct 20, 2020
by
seotts
Committed by
Karishma Chadha
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to display YouTube in addition to Wistia
parent
5e1739f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/components/video/video.jsx
src/components/video/video.jsx
+6
-1
No files found.
src/components/video/video.jsx
View file @
79bc95a4
...
@@ -13,7 +13,10 @@ const Video = props => (
...
@@ -13,7 +13,10 @@ const Video = props => (
frameBorder=
"0"
// deprecated attribute
frameBorder=
"0"
// deprecated attribute
height=
{
props
.
height
}
height=
{
props
.
height
}
scrolling=
"no"
// deprecated attribute
scrolling=
"no"
// deprecated attribute
src=
{
`https://fast.wistia.net/embed/iframe/${props.videoId}?seo=false&videoFoam=true`
}
src=
{
props
.
isYouTube
?
`https://www.youtube.com/embed/${props.videoId}?autoplay=1`
:
`https://fast.wistia.net/embed/iframe/${props.videoId}?seo=false&videoFoam=true`
}
title=
{
props
.
title
}
title=
{
props
.
title
}
width=
{
props
.
width
}
width=
{
props
.
width
}
/>
/>
...
@@ -25,6 +28,7 @@ const Video = props => (
...
@@ -25,6 +28,7 @@ const Video = props => (
);
);
Video
.
defaultProps
=
{
Video
.
defaultProps
=
{
height
:
'
225
'
,
height
:
'
225
'
,
isYouTube
:
false
,
title
:
''
,
title
:
''
,
width
:
'
400
'
width
:
'
400
'
};
};
...
@@ -32,6 +36,7 @@ Video.defaultProps = {
...
@@ -32,6 +36,7 @@ Video.defaultProps = {
Video
.
propTypes
=
{
Video
.
propTypes
=
{
className
:
PropTypes
.
string
,
className
:
PropTypes
.
string
,
height
:
PropTypes
.
string
.
isRequired
,
height
:
PropTypes
.
string
.
isRequired
,
isYouTube
:
PropTypes
.
bool
,
title
:
PropTypes
.
string
.
isRequired
,
title
:
PropTypes
.
string
.
isRequired
,
videoId
:
PropTypes
.
string
.
isRequired
,
videoId
:
PropTypes
.
string
.
isRequired
,
width
:
PropTypes
.
string
.
isRequired
width
:
PropTypes
.
string
.
isRequired
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment