Disable video Picture-in-Picture for stickers and gifs (#1981)
This commit is contained in:
parent
0b3db96ea2
commit
49e7c15b2e
@ -151,6 +151,7 @@ const Avatar: FC<OwnProps> = ({
|
||||
className={buildClassName(cn.media, 'avatar-media', transitionClassNames)}
|
||||
muted
|
||||
autoPlay
|
||||
disablePictureInPicture
|
||||
loop={!noLoop}
|
||||
playsInline
|
||||
/>
|
||||
|
||||
@ -182,6 +182,7 @@ const GifButton: FC<OwnProps> = ({
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
disablePictureInPicture
|
||||
playsInline
|
||||
preload="none"
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
|
||||
@ -107,6 +107,7 @@ const ProfilePhoto: FC<OwnProps> = ({
|
||||
src={imageSrc}
|
||||
className="avatar-media"
|
||||
muted
|
||||
disablePictureInPicture
|
||||
autoPlay={!notActive}
|
||||
loop
|
||||
playsInline
|
||||
|
||||
@ -272,6 +272,7 @@ const StickerButton = <T extends number | ApiSticker | ApiBotInlineMediaResult |
|
||||
autoPlay={canVideoPlay}
|
||||
loop
|
||||
playsInline
|
||||
disablePictureInPicture
|
||||
muted
|
||||
/>
|
||||
)}
|
||||
|
||||
@ -50,6 +50,7 @@ const PremiumFeaturePreviewVideo: FC<OwnProps> = ({
|
||||
)}
|
||||
src={mediaData}
|
||||
autoPlay
|
||||
disablePictureInPicture
|
||||
playsInline
|
||||
muted
|
||||
loop
|
||||
|
||||
@ -563,6 +563,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
|
||||
src={botInfoGifUrl}
|
||||
loop
|
||||
autoPlay
|
||||
disablePictureInPicture
|
||||
muted
|
||||
playsInline
|
||||
/>
|
||||
|
||||
@ -264,7 +264,7 @@ const AttachmentModal: FC<OwnProps> = ({
|
||||
{renderingAttachments.map((attachment) => (
|
||||
attachment.mimeType.startsWith('image/')
|
||||
? <img src={attachment.blobUrl} alt="" />
|
||||
: <video src={attachment.blobUrl} autoPlay muted loop />
|
||||
: <video src={attachment.blobUrl} autoPlay muted loop disablePictureInPicture />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@ -34,7 +34,7 @@ const StickerSetCover: FC<OwnProps> = ({ stickerSet, observeIntersection }) => {
|
||||
<div ref={ref} className="sticker-set-cover">
|
||||
{firstLetters}
|
||||
{isVideo ? (
|
||||
<video src={mediaData} className={transitionClassNames} loop autoPlay />
|
||||
<video src={mediaData} className={transitionClassNames} loop autoPlay disablePictureInPicture />
|
||||
) : (
|
||||
<img src={mediaData} className={transitionClassNames} alt="" />
|
||||
)}
|
||||
|
||||
@ -68,6 +68,7 @@ const Game: FC<OwnProps> = ({
|
||||
className="preview-content"
|
||||
playsInline
|
||||
muted
|
||||
disablePictureInPicture
|
||||
autoPlay
|
||||
loop
|
||||
src={videoBlobUrl}
|
||||
|
||||
@ -218,6 +218,7 @@ const RoundVideo: FC<OwnProps> = ({
|
||||
width={ROUND_VIDEO_DIMENSIONS_PX}
|
||||
height={ROUND_VIDEO_DIMENSIONS_PX}
|
||||
autoPlay
|
||||
disablePictureInPicture
|
||||
muted={!isActivated}
|
||||
loop={!isActivated}
|
||||
playsInline
|
||||
|
||||
@ -167,6 +167,7 @@ const Sticker: FC<OwnProps> = ({
|
||||
height={height}
|
||||
autoPlay={shouldPlay}
|
||||
playsInline
|
||||
disablePictureInPicture
|
||||
loop={shouldLoop}
|
||||
muted
|
||||
/>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<video src="./nojs.mp4" class="nojs-video" muted loop autoplay playsinline></video>
|
||||
<video src="./nojs.mp4" class="nojs-video" muted loop autoplay playsinline disablePictureInPicture></video>
|
||||
<h1>Telegram Web</h1>
|
||||
<p>Please, enable JavaScript to open the app.</p>
|
||||
</noscript>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user