[Glitch] Fix wrong seek bar width on media player
Port 8d7fbe7dd9
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
3b96141633
commit
37dfb9dddc
|
@ -252,7 +252,7 @@ class Audio extends React.PureComponent {
|
||||||
handleTimeUpdate = () => {
|
handleTimeUpdate = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentTime: this.audio.currentTime,
|
currentTime: this.audio.currentTime,
|
||||||
duration: Math.floor(this.audio.duration),
|
duration: this.audio.duration,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ class Audio extends React.PureComponent {
|
||||||
<span className='video-player__time'>
|
<span className='video-player__time'>
|
||||||
<span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
|
<span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
|
||||||
<span className='video-player__time-sep'>/</span>
|
<span className='video-player__time-sep'>/</span>
|
||||||
<span className='video-player__time-total'>{formatTime(this.state.duration || Math.floor(this.props.duration))}</span>
|
<span className='video-player__time-total'>{formatTime(Math.floor(this.state.duration || this.props.duration))}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ class Video extends React.PureComponent {
|
||||||
handleTimeUpdate = () => {
|
handleTimeUpdate = () => {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentTime: this.video.currentTime,
|
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'>
|
||||||
<span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
|
<span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
|
||||||
<span className='video-player__time-sep'>/</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>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue