diff --git a/client/src/templates/Challenges/video/Show.js b/client/src/templates/Challenges/video/Show.js index 117dca9fe7..f6cee59923 100644 --- a/client/src/templates/Challenges/video/Show.js +++ b/client/src/templates/Challenges/video/Show.js @@ -178,11 +178,12 @@ export class Project extends Component { - - - - {blockNameTitle} - + + + {blockNameTitle} + + +
{!this.state.videoIsLoaded ? (
@@ -200,8 +201,8 @@ export class Project extends Component { playerVars: { rel: 0 }, - width: '960px', - height: '540px' + width: 'auto', + height: 'auto' }} videoId={videoId} /> @@ -220,6 +221,8 @@ export class Project extends Component { .
+ + diff --git a/client/src/templates/Challenges/video/show.css b/client/src/templates/Challenges/video/show.css index 1bcba30563..3c1cabbec4 100644 --- a/client/src/templates/Challenges/video/show.css +++ b/client/src/templates/Challenges/video/show.css @@ -1,9 +1,18 @@ .video-wrapper { - display: flex; - flex-direction: column; - justify-content: space-evenly; - align-items: center; - padding: 20px 0; + position: relative; + padding-bottom: 56.25%; + height: 0; + overflow: hidden; + max-width: 100%; +} +.video-wrapper iframe, +.video-wrapper object, +.video-wrapper embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } .video-placeholder-loader {