From c9108fe3da89176674c78b151a00245fb77bd096 Mon Sep 17 00:00:00 2001 From: NikolayRechkin Date: Wed, 13 May 2020 10:18:28 +0300 Subject: [PATCH] web: common: MediaViewer. Fixed a styles --- .../src/components/MediaViewer/MediaViewer.stories.js | 1 + .../src/components/MediaViewer/sub-components/progress.js | 1 + .../components/MediaViewer/sub-components/video-viewer.js | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/ASC.Web.Common/src/components/MediaViewer/MediaViewer.stories.js b/web/ASC.Web.Common/src/components/MediaViewer/MediaViewer.stories.js index 4eb3c51a8e..cc80752a54 100644 --- a/web/ASC.Web.Common/src/components/MediaViewer/MediaViewer.stories.js +++ b/web/ASC.Web.Common/src/components/MediaViewer/MediaViewer.stories.js @@ -11,6 +11,7 @@ import Readme from './README.md'; var playlist = [ { id: 0, + fileId: 0, src: "", title: "" } diff --git a/web/ASC.Web.Common/src/components/MediaViewer/sub-components/progress.js b/web/ASC.Web.Common/src/components/MediaViewer/sub-components/progress.js index da44e981c8..8f06782aa5 100644 --- a/web/ASC.Web.Common/src/components/MediaViewer/sub-components/progress.js +++ b/web/ASC.Web.Common/src/components/MediaViewer/sub-components/progress.js @@ -13,6 +13,7 @@ const StyledProgress = styled.div` height:6px; background:rgba(200,200,200,0.2); margin:15px 0; + vertical-align: middle; } .fill{ cursor: pointer; diff --git a/web/ASC.Web.Common/src/components/MediaViewer/sub-components/video-viewer.js b/web/ASC.Web.Common/src/components/MediaViewer/sub-components/video-viewer.js index 4a57d93310..f862d8a00f 100644 --- a/web/ASC.Web.Common/src/components/MediaViewer/sub-components/video-viewer.js +++ b/web/ASC.Web.Common/src/components/MediaViewer/sub-components/video-viewer.js @@ -117,6 +117,7 @@ FullScreenBtn.propTypes = { const StyledValumeContainer = styled.div` display: inline-block; + vertical-align: top; line-height: 39px; position: relative; @@ -148,6 +149,7 @@ const StyledDuration = styled.div` margin: 5px; width: 60px; text-align: center; + vertical-align: top; border-radius: 2px; cursor: pointer; @@ -303,8 +305,10 @@ class VideoViewer extends Component { } handleSeekMouseUp = e => { - this.setState({ seeking: false }) - this.player.seekTo(parseFloat(e.target.value)) + if(!isNaN(parseFloat(e.target.value))){ + this.setState({ seeking: false }); + this.player.seekTo(parseFloat(e.target.value)); + } } handleProgress = state => {