From dab538085695a9a48e80ee7d792d4282479bf5e2 Mon Sep 17 00:00:00 2001 From: DmitrySychugov Date: Wed, 11 Jan 2023 14:25:54 +0500 Subject: [PATCH] Web: Components: fixed audio style --- .../viewer/sub-components/viewer-player.js | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/packages/components/viewer/sub-components/viewer-player.js b/packages/components/viewer/sub-components/viewer-player.js index 29d49239ca..7971659c63 100644 --- a/packages/components/viewer/sub-components/viewer-player.js +++ b/packages/components/viewer/sub-components/viewer-player.js @@ -88,6 +88,8 @@ const StyledVideoPlayer = styled.div` } .dropdown-speed { + ${(props) => + props.audio === "true" ? "margin-right: -10px" : "margin-right: 0px"}; padding-right: 10px; position: relative; display: inline-block; @@ -257,11 +259,15 @@ const StyledVideoControls = styled.div` ); .volume-container { display: flex; - margin-left: 6px; + margin-left: 10px; + ${(props) => console.log(props)} .icon-play { margin-right: 12px; } + .is-audio { + margin-right: 1px; + } svg { &:hover { cursor: pointer; @@ -269,6 +275,10 @@ const StyledVideoControls = styled.div` } } + .volume-container-audio { + margin-left: -2px; + } + ${isMobileOnly && css` height: 80px; @@ -786,7 +796,11 @@ translateX(${state.left !== null ? state.left + "px" : "auto"}) translateY(${ }px)`, }; return ( - +
{isMobileOnly && mobileDetails}
@@ -871,12 +885,11 @@ translateX(${state.left !== null ? state.left + "px" : "auto"}) translateY(${ ref={actionRef} >
-
+
{!state.isPlaying ? ( - + ) : ( )} @@ -887,7 +900,13 @@ translateX(${state.left !== null ? state.left + "px" : "auto"}) translateY(${ {!isMobileOnly && ( -
+
{state.isMuted ? ( ) : state.volume >= 50 ? (