Commit 79bc95a4 authored by seotts's avatar seotts Committed by Karishma Chadha

Add ability to display YouTube in addition to Wistia

parent 5e1739f7
......@@ -13,7 +13,10 @@ const Video = props => (
frameBorder="0" // deprecated attribute
height={props.height}
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}
width={props.width}
/>
......@@ -25,6 +28,7 @@ const Video = props => (
);
Video.defaultProps = {
height: '225',
isYouTube: false,
title: '',
width: '400'
};
......@@ -32,6 +36,7 @@ Video.defaultProps = {
Video.propTypes = {
className: PropTypes.string,
height: PropTypes.string.isRequired,
isYouTube: PropTypes.bool,
title: PropTypes.string.isRequired,
videoId: PropTypes.string.isRequired,
width: PropTypes.string.isRequired
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment