Update voice broadcast time display (#9646)
This commit is contained in:
parent
5f6b1dda8d
commit
70a7961681
8 changed files with 149 additions and 87 deletions
|
@ -46,10 +46,9 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
playback,
|
||||
}) => {
|
||||
const {
|
||||
duration,
|
||||
times,
|
||||
liveness,
|
||||
playbackState,
|
||||
position,
|
||||
room,
|
||||
sender,
|
||||
toggle,
|
||||
|
@ -94,7 +93,7 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
|
||||
if (playbackState !== VoiceBroadcastPlaybackState.Stopped) {
|
||||
const onSeekBackwardButtonClick = () => {
|
||||
playback.skipTo(Math.max(0, position - SEEK_TIME));
|
||||
playback.skipTo(Math.max(0, times.position - SEEK_TIME));
|
||||
};
|
||||
|
||||
seekBackwardButton = <SeekButton
|
||||
|
@ -104,7 +103,7 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
/>;
|
||||
|
||||
const onSeekForwardButtonClick = () => {
|
||||
playback.skipTo(Math.min(duration, position + SEEK_TIME));
|
||||
playback.skipTo(Math.min(times.duration, times.position + SEEK_TIME));
|
||||
};
|
||||
|
||||
seekForwardButton = <SeekButton
|
||||
|
@ -132,9 +131,10 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
{ control }
|
||||
{ seekForwardButton }
|
||||
</div>
|
||||
<SeekBar playback={playback} />
|
||||
<div className="mx_VoiceBroadcastBody_timerow">
|
||||
<SeekBar playback={playback} />
|
||||
<Clock seconds={duration} />
|
||||
<Clock seconds={times.position} />
|
||||
<Clock seconds={-times.timeLeft} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue