Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -40,18 +40,8 @@ interface VoiceBroadcastPlaybackBodyProps {
|
|||
playback: VoiceBroadcastPlayback;
|
||||
}
|
||||
|
||||
export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProps> = ({
|
||||
pip = false,
|
||||
playback,
|
||||
}) => {
|
||||
const {
|
||||
times,
|
||||
liveness,
|
||||
playbackState,
|
||||
room,
|
||||
sender,
|
||||
toggle,
|
||||
} = useVoiceBroadcastPlayback(playback);
|
||||
export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProps> = ({ pip = false, playback }) => {
|
||||
const { times, liveness, playbackState, room, sender, toggle } = useVoiceBroadcastPlayback(playback);
|
||||
|
||||
let controlIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
||||
let controlLabel: string;
|
||||
|
@ -75,12 +65,9 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
break;
|
||||
}
|
||||
|
||||
const control = <VoiceBroadcastControl
|
||||
className={className}
|
||||
label={controlLabel}
|
||||
icon={controlIcon}
|
||||
onClick={toggle}
|
||||
/>;
|
||||
const control = (
|
||||
<VoiceBroadcastControl className={className} label={controlLabel} icon={controlIcon} onClick={toggle} />
|
||||
);
|
||||
|
||||
let seekBackwardButton: ReactElement | null = null;
|
||||
let seekForwardButton: ReactElement | null = null;
|
||||
|
@ -90,21 +77,17 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
playback.skipTo(Math.max(0, times.position - SEEK_TIME));
|
||||
};
|
||||
|
||||
seekBackwardButton = <SeekButton
|
||||
icon={Back30sIcon}
|
||||
label={_t("30s backward")}
|
||||
onClick={onSeekBackwardButtonClick}
|
||||
/>;
|
||||
seekBackwardButton = (
|
||||
<SeekButton icon={Back30sIcon} label={_t("30s backward")} onClick={onSeekBackwardButtonClick} />
|
||||
);
|
||||
|
||||
const onSeekForwardButtonClick = () => {
|
||||
playback.skipTo(Math.min(times.duration, times.position + SEEK_TIME));
|
||||
};
|
||||
|
||||
seekForwardButton = <SeekButton
|
||||
icon={Forward30sIcon}
|
||||
label={_t("30s forward")}
|
||||
onClick={onSeekForwardButtonClick}
|
||||
/>;
|
||||
seekForwardButton = (
|
||||
<SeekButton icon={Forward30sIcon} label={_t("30s forward")} onClick={onSeekForwardButtonClick} />
|
||||
);
|
||||
}
|
||||
|
||||
const classes = classNames({
|
||||
|
@ -122,9 +105,9 @@ export const VoiceBroadcastPlaybackBody: React.FC<VoiceBroadcastPlaybackBodyProp
|
|||
showBuffering={playbackState === VoiceBroadcastPlaybackState.Buffering}
|
||||
/>
|
||||
<div className="mx_VoiceBroadcastBody_controls">
|
||||
{ seekBackwardButton }
|
||||
{ control }
|
||||
{ seekForwardButton }
|
||||
{seekBackwardButton}
|
||||
{control}
|
||||
{seekForwardButton}
|
||||
</div>
|
||||
<SeekBar playback={playback} />
|
||||
<div className="mx_VoiceBroadcastBody_timerow">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue