Video: Prefer element over server duration (#1294)

This commit is contained in:
Alexander Zinchuk 2021-07-19 03:34:15 +03:00
parent a2e0eff496
commit d293818acc

View File

@ -98,7 +98,7 @@ const Video: FC<OwnProps> = ({
setPlayProgress(Math.max(0, e.currentTarget.currentTime - 1));
}, []);
const duration = video.duration || (videoRef.current && videoRef.current.duration) || 0;
const duration = (videoRef.current && videoRef.current.duration) || video.duration || 0;
const isOwn = isOwnMessage(message);
const isForwarded = isForwardedMessage(message);