Status media attachments refactor (#39601)

This commit is contained in:
Echo authored and GitHub committed 2026-06-25 16:34:11 +00:00
1 parent e4e19ba264
commit 3f98bee57f
11 files changed
+494 -88

No files matched your search

@@ -7,6 +7,7 @@ import classNames from 'classnames';
import { useSpring, animated, config } from '@react-spring/web';
import { throttle } from 'lodash';
import type { DeployPictureInPictureCallback } from '@/mastodon/actions/picture_in_picture';
import Forward5Icon from '@/material-icons/400-24px/forward_5-fill.svg?react';
import FullscreenIcon from '@/material-icons/400-24px/fullscreen.svg?react';
import FullscreenExitIcon from '@/material-icons/400-24px/fullscreen_exit.svg?react';
@@ -174,15 +175,7 @@ export const Video: React.FC<{
alwaysVisible?: boolean;
visible?: boolean;
onToggleVisibility?: () => void;
deployPictureInPicture?: (
type: string,
mediaProps: {
src: string;
muted: boolean;
volume: number;
currentTime: number;
},
) => void;
deployPictureInPicture?: DeployPictureInPictureCallback;
blurhash?: string;
startPlaying?: boolean;
startTime?: number;
@@ -241,7 +234,7 @@ export const Video: React.FC<{
(c: HTMLVideoElement | null) => {
if (videoRef.current && !videoRef.current.paused && c === null) {
deployPictureInPicture?.('video', {
src: src,
src,
currentTime: videoRef.current.currentTime,
muted: videoRef.current.muted,
volume: videoRef.current.volume,