mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Use audio.ended in MessageAudio.tsx
This commit is contained in:
@@ -180,7 +180,9 @@ export const MessageAudio: React.FC<Props> = (props: Props) => {
|
||||
activeAudioID === id && activeAudioContext === renderingContext;
|
||||
|
||||
const waveformRef = useRef<HTMLDivElement | null>(null);
|
||||
const [isPlaying, setIsPlaying] = useState(isActive && !audio.paused);
|
||||
const [isPlaying, setIsPlaying] = useState(
|
||||
isActive && !(audio.paused || audio.ended)
|
||||
);
|
||||
const [currentTime, setCurrentTime] = useState(
|
||||
isActive ? audio.currentTime : 0
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user