From dd7a6ecca0dfaf5bf30fc07120c5886f985766b9 Mon Sep 17 00:00:00 2001 From: Jared Stoffan Date: Thu, 2 May 2019 10:21:34 -0700 Subject: [PATCH] Fix: Center video element and maintain its size and ratio (#995) --- src/lib/viewers/media/Dash.scss | 2 ++ src/lib/viewers/media/MP4.scss | 2 ++ src/lib/viewers/media/_mediaBase.scss | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/viewers/media/Dash.scss b/src/lib/viewers/media/Dash.scss index af6d2c7cd..d43de8dbb 100644 --- a/src/lib/viewers/media/Dash.scss +++ b/src/lib/viewers/media/Dash.scss @@ -4,6 +4,8 @@ video { cursor: none; display: block; + margin-left: auto; + margin-right: auto; max-height: 100%; max-width: 100%; width: 100%; diff --git a/src/lib/viewers/media/MP4.scss b/src/lib/viewers/media/MP4.scss index e106e8fec..77a76d569 100644 --- a/src/lib/viewers/media/MP4.scss +++ b/src/lib/viewers/media/MP4.scss @@ -4,6 +4,8 @@ video { cursor: none; display: block; + margin-left: auto; + margin-right: auto; max-height: 100%; max-width: 100%; width: 100%; diff --git a/src/lib/viewers/media/_mediaBase.scss b/src/lib/viewers/media/_mediaBase.scss index df8e93394..5625ad2ed 100644 --- a/src/lib/viewers/media/_mediaBase.scss +++ b/src/lib/viewers/media/_mediaBase.scss @@ -24,8 +24,6 @@ } .bp-media-container { - display: flex; - justify-content: center; min-width: 300px; // Prevent media controls from overflowing on small screens outline: 0 none; position: relative;