about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/video/index.js
diff options
context:
space:
mode:
authorfuyu <54523771+mfmfuyu@users.noreply.github.com>2020-10-30 21:09:20 +0900
committerThibaut Girka <thib@sitedethib.com>2020-11-03 17:37:53 +0100
commit37dfb9dddcc816744d1ab269dd879451addb1be4 (patch)
treef0b4945076cb063fb3b9f463dcc2ab7a0634645a /app/javascript/flavours/glitch/features/video/index.js
parent3b96141633421a0f80e8fb89cfeff549c9c3a3d1 (diff)
[Glitch] Fix wrong seek bar width on media player
Port 8d7fbe7dd9b0a64915a96d342579ab80951be840 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/video/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/video/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js
index 95bee1331..21d327823 100644
--- a/app/javascript/flavours/glitch/features/video/index.js
+++ b/app/javascript/flavours/glitch/features/video/index.js
@@ -211,7 +211,7 @@ class Video extends React.PureComponent {
   handleTimeUpdate = () => {
     this.setState({
       currentTime: this.video.currentTime,
-      duration: Math.floor(this.video.duration),
+      duration:this.video.duration,
     });
   }
 
@@ -568,7 +568,7 @@ class Video extends React.PureComponent {
                 <span className='video-player__time'>
                   <span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
                   <span className='video-player__time-sep'>/</span>
-                  <span className='video-player__time-total'>{formatTime(duration)}</span>
+                  <span className='video-player__time-total'>{formatTime(Math.floor(duration))}</span>
                 </span>
               )}