Hide the browser's default placeholder image for videos

Source: https://stackoverflow.com/a/79058682
This commit is contained in:
Robin
2026-07-15 16:39:20 +02:00
parent 927cf68110
commit d33dedd038
4 changed files with 11 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import {
import { type ReactionOption } from "../reactions";
import { ReactionIndicator } from "../reactions/ReactionIndicator";
import { RTCConnectionStats } from "../RTCConnectionStats";
import videoPlaceholder from "../graphics/video-placeholder.gif";
interface Props extends ComponentProps<typeof animated.div> {
className?: string;
@@ -154,6 +155,9 @@ export const MediaView: FC<Props> = ({
tabIndex={-1}
disablePictureInPicture
data-testid="video"
// Set the placeholder to a small transparent image. (On Android web
// views the default poster image is particularly ugly.)
poster={videoPlaceholder}
/>
)}
</div>