prevent replay hover from restarting playback (#33364)
* prevent replay hover from restarting playback * Fix issue with hover, it's supposed to be a FileBody and not an actual video on replay * Add test for replay video on hover
This commit is contained in:
@@ -26,7 +26,7 @@ import { renderReplyTile } from "../../../events/EventTileFactory";
|
||||
import { type GetRelationsForEvent } from "../rooms/EventTile";
|
||||
import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
import { type IBodyProps } from "../messages/IBodyProps";
|
||||
import { FileBodyFactory, renderMBody } from "../messages/MBodyFactory";
|
||||
import { FileBodyFactory, VideoBodyFactory, renderMBody } from "../messages/MBodyFactory";
|
||||
|
||||
interface IProps {
|
||||
mxEvent: MatrixEvent;
|
||||
@@ -134,9 +134,9 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
||||
|
||||
const msgtypeOverrides: Record<string, React.ComponentType<IBodyProps>> = {
|
||||
[MsgType.Image]: MImageReplyBody,
|
||||
// Override audio and video body with file body. We also hide the download/decrypt button using CSS
|
||||
// Override audio body with file body. We also hide the download/decrypt button using CSS
|
||||
[MsgType.Audio]: isVoiceMessage(mxEvent) ? MVoiceMessageBody : ReplyTileFileBody,
|
||||
[MsgType.Video]: ReplyTileFileBody,
|
||||
[MsgType.Video]: VideoBodyFactory,
|
||||
};
|
||||
const evOverrides: Record<string, React.ComponentType<IBodyProps>> = {
|
||||
// Use MImageReplyBody so that the sticker isn't taking up a lot of space
|
||||
|
||||
Reference in New Issue
Block a user