Add voice broadcast playback seekbar (#9529)
This commit is contained in:
parent
04bc8fb71c
commit
66d0b318bc
10 changed files with 339 additions and 70 deletions
|
@ -28,6 +28,7 @@ import { Icon as PlayIcon } from "../../../../res/img/element-icons/play.svg";
|
|||
import { Icon as PauseIcon } from "../../../../res/img/element-icons/pause.svg";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import Clock from "../../../components/views/audio_messages/Clock";
|
||||
import SeekBar from "../../../components/views/audio_messages/SeekBar";
|
||||
|
||||
interface VoiceBroadcastPlaybackBodyProps {
|
||||
playback: VoiceBroadcastPlayback;
|
||||
|
@ -37,7 +38,7 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
playback,
|
||||
}) => {
|
||||
const {
|
||||
length,
|
||||
duration,
|
||||
live,
|
||||
room,
|
||||
sender,
|
||||
|
@ -75,8 +76,6 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
/>;
|
||||
}
|
||||
|
||||
const lengthSeconds = Math.round(length / 1000);
|
||||
|
||||
return (
|
||||
<div className="mx_VoiceBroadcastBody">
|
||||
<VoiceBroadcastHeader
|
||||
|
@ -89,7 +88,8 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
{ control }
|
||||
</div>
|
||||
<div className="mx_VoiceBroadcastBody_timerow">
|
||||
<Clock seconds={lengthSeconds} />
|
||||
<SeekBar playback={playback} />
|
||||
<Clock seconds={duration} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue