Revert "Various fixes for iOS (#1445)"
This reverts commit c06e0ecc797658dbc20371dd7efc68895d6d4900.
This commit is contained in:
parent
60636a22de
commit
a2f11c0468
@ -86,11 +86,8 @@ const VideoPlayer: FC<OwnProps> = ({
|
|||||||
videoRef.current!.pause();
|
videoRef.current!.pause();
|
||||||
setIsPlayed(false);
|
setIsPlayed(false);
|
||||||
} else {
|
} else {
|
||||||
safePlay(videoRef.current!);
|
videoRef.current!.play();
|
||||||
setIsPlayed(true);
|
setIsPlayed(true);
|
||||||
if (IS_SINGLE_COLUMN_LAYOUT) {
|
|
||||||
setIsControlsVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, [isPlayed]);
|
}, [isPlayed]);
|
||||||
|
|
||||||
@ -111,7 +108,6 @@ const VideoPlayer: FC<OwnProps> = ({
|
|||||||
const handleEnded = useCallback(() => {
|
const handleEnded = useCallback(() => {
|
||||||
setCurrentTime(0);
|
setCurrentTime(0);
|
||||||
setIsPlayed(false);
|
setIsPlayed(false);
|
||||||
setIsControlsVisible(true);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleFullscreenChange = useCallback(() => {
|
const handleFullscreenChange = useCallback(() => {
|
||||||
@ -129,10 +125,6 @@ const VideoPlayer: FC<OwnProps> = ({
|
|||||||
const toggleControls = useCallback((e: React.MouseEvent<HTMLDivElement>) => {
|
const toggleControls = useCallback((e: React.MouseEvent<HTMLDivElement>) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setIsControlsVisible(!isControlsVisible);
|
setIsControlsVisible(!isControlsVisible);
|
||||||
if (!isControlsVisible) {
|
|
||||||
videoRef.current!.pause();
|
|
||||||
setIsPlayed(false);
|
|
||||||
}
|
|
||||||
}, [isControlsVisible]);
|
}, [isControlsVisible]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -157,8 +149,8 @@ const VideoPlayer: FC<OwnProps> = ({
|
|||||||
<div
|
<div
|
||||||
className="VideoPlayer"
|
className="VideoPlayer"
|
||||||
onClick={!isGif && IS_SINGLE_COLUMN_LAYOUT ? toggleControls : undefined}
|
onClick={!isGif && IS_SINGLE_COLUMN_LAYOUT ? toggleControls : undefined}
|
||||||
onMouseOver={!isGif && !IS_TOUCH_ENV ? handleMouseOver : undefined}
|
onMouseOver={!isGif ? handleMouseOver : undefined}
|
||||||
onMouseOut={!isGif && !IS_TOUCH_ENV ? handleMouseOut : undefined}
|
onMouseOut={!isGif ? handleMouseOut : undefined}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -210,7 +202,7 @@ const VideoPlayer: FC<OwnProps> = ({
|
|||||||
isFullscreen={isFullscreen}
|
isFullscreen={isFullscreen}
|
||||||
fileSize={fileSize}
|
fileSize={fileSize}
|
||||||
duration={videoRef.current ? videoRef.current.duration : 0}
|
duration={videoRef.current ? videoRef.current.duration : 0}
|
||||||
isForceVisible={isControlsVisible}
|
isForceVisible={!isPlayed || isControlsVisible}
|
||||||
isForceMobileVersion={posterSize && posterSize.width < MOBILE_VERSION_CONTROL_WIDTH}
|
isForceMobileVersion={posterSize && posterSize.width < MOBILE_VERSION_CONTROL_WIDTH}
|
||||||
onSeek={handleSeek}
|
onSeek={handleSeek}
|
||||||
onChangeFullscreen={handleFullscreenChange}
|
onChangeFullscreen={handleFullscreenChange}
|
||||||
|
|||||||
@ -79,6 +79,12 @@
|
|||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
margin-bottom: 4.25rem;
|
margin-bottom: 4.25rem;
|
||||||
|
|
||||||
|
@supports (padding-bottom: env(safe-area-inset-bottom)) {
|
||||||
|
body:not(.keyboard-visible) & {
|
||||||
|
margin-bottom: calc(4.25rem + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.ActionMessage {
|
&.ActionMessage {
|
||||||
@ -87,16 +93,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
&.type-pinned .last-in-list {
|
|
||||||
@supports (padding-bottom: env(safe-area-inset-bottom)) {
|
|
||||||
body:not(.keyboard-visible) & {
|
|
||||||
margin-bottom: calc(4.25rem + env(safe-area-inset-bottom));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.Message,
|
.Message,
|
||||||
.ActionMessage {
|
.ActionMessage {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@ -19,9 +19,6 @@
|
|||||||
|
|
||||||
.no-composer & {
|
.no-composer & {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@media (max-width: 600px) {
|
|
||||||
width: calc(100% - 1rem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 601px) {
|
@media (min-width: 601px) {
|
||||||
|
|||||||
@ -125,17 +125,15 @@ body.cursor-grabbing, body.cursor-grabbing * {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 601px) {
|
.custom-scroll {
|
||||||
.custom-scroll {
|
&::-webkit-scrollbar {
|
||||||
&::-webkit-scrollbar {
|
width: .375rem;
|
||||||
width: .375rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.custom-scroll-x {
|
.custom-scroll-x {
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
height: .35rem;
|
height: .35rem;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user