Video: Prefer element over server duration (#1294)
This commit is contained in:
parent
a2e0eff496
commit
d293818acc
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user