diff --git a/app/javascript/mastodon/features/audio/index.js b/app/javascript/mastodon/features/audio/index.js
index 2992e36629b..434148e8e79 100644
--- a/app/javascript/mastodon/features/audio/index.js
+++ b/app/javascript/mastodon/features/audio/index.js
@@ -246,7 +246,7 @@ class Audio extends React.PureComponent {
handleTimeUpdate = () => {
this.setState({
currentTime: this.audio.currentTime,
- duration: Math.floor(this.audio.duration),
+ duration: this.audio.duration,
});
}
@@ -454,7 +454,7 @@ class Audio extends React.PureComponent {
{formatTime(Math.floor(currentTime))}
/
- {formatTime(this.state.duration || Math.floor(this.props.duration))}
+ {formatTime(Math.floor(this.state.duration || this.props.duration))}
diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js
index 642722193a7..229a9214084 100644
--- a/app/javascript/mastodon/features/video/index.js
+++ b/app/javascript/mastodon/features/video/index.js
@@ -198,7 +198,7 @@ class Video extends React.PureComponent {
handleTimeUpdate = () => {
this.setState({
currentTime: this.video.currentTime,
- duration: Math.floor(this.video.duration),
+ duration:this.video.duration,
});
}
@@ -551,7 +551,7 @@ class Video extends React.PureComponent {
{formatTime(Math.floor(currentTime))}
/
- {formatTime(duration)}
+ {formatTime(Math.floor(duration))}
)}