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();
|
||||
setIsPlayed(false);
|
||||
} else {
|
||||
safePlay(videoRef.current!);
|
||||
videoRef.current!.play();
|
||||
setIsPlayed(true);
|
||||
if (IS_SINGLE_COLUMN_LAYOUT) {
|
||||
setIsControlsVisible(false);
|
||||
}
|
||||
}
|
||||
}, [isPlayed]);
|
||||
|
||||
@ -111,7 +108,6 @@ const VideoPlayer: FC<OwnProps> = ({
|
||||
const handleEnded = useCallback(() => {
|
||||
setCurrentTime(0);
|
||||
setIsPlayed(false);
|
||||
setIsControlsVisible(true);
|
||||
}, []);
|
||||
|
||||
const handleFullscreenChange = useCallback(() => {
|
||||
@ -129,10 +125,6 @@ const VideoPlayer: FC<OwnProps> = ({
|
||||
const toggleControls = useCallback((e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.stopPropagation();
|
||||
setIsControlsVisible(!isControlsVisible);
|
||||
if (!isControlsVisible) {
|
||||
videoRef.current!.pause();
|
||||
setIsPlayed(false);
|
||||
}
|
||||
}, [isControlsVisible]);
|
||||
|
||||
useEffect(() => {
|
||||
@ -157,8 +149,8 @@ const VideoPlayer: FC<OwnProps> = ({
|
||||
<div
|
||||
className="VideoPlayer"
|
||||
onClick={!isGif && IS_SINGLE_COLUMN_LAYOUT ? toggleControls : undefined}
|
||||
onMouseOver={!isGif && !IS_TOUCH_ENV ? handleMouseOver : undefined}
|
||||
onMouseOut={!isGif && !IS_TOUCH_ENV ? handleMouseOut : undefined}
|
||||
onMouseOver={!isGif ? handleMouseOver : undefined}
|
||||
onMouseOut={!isGif ? handleMouseOut : undefined}
|
||||
>
|
||||
<div
|
||||
// @ts-ignore
|
||||
@ -210,7 +202,7 @@ const VideoPlayer: FC<OwnProps> = ({
|
||||
isFullscreen={isFullscreen}
|
||||
fileSize={fileSize}
|
||||
duration={videoRef.current ? videoRef.current.duration : 0}
|
||||
isForceVisible={isControlsVisible}
|
||||
isForceVisible={!isPlayed || isControlsVisible}
|
||||
isForceMobileVersion={posterSize && posterSize.width < MOBILE_VERSION_CONTROL_WIDTH}
|
||||
onSeek={handleSeek}
|
||||
onChangeFullscreen={handleFullscreenChange}
|
||||
|
||||
@ -79,6 +79,12 @@
|
||||
|
||||
@media (max-width: 600px) {
|
||||
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 {
|
||||
@ -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,
|
||||
.ActionMessage {
|
||||
position: relative;
|
||||
|
||||
@ -19,9 +19,6 @@
|
||||
|
||||
.no-composer & {
|
||||
width: 100%;
|
||||
@media (max-width: 600px) {
|
||||
width: calc(100% - 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 601px) {
|
||||
|
||||
@ -125,17 +125,15 @@ body.cursor-grabbing, body.cursor-grabbing * {
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 601px) {
|
||||
.custom-scroll {
|
||||
&::-webkit-scrollbar {
|
||||
width: .375rem;
|
||||
}
|
||||
.custom-scroll {
|
||||
&::-webkit-scrollbar {
|
||||
width: .375rem;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-scroll-x {
|
||||
&::-webkit-scrollbar {
|
||||
height: .35rem;
|
||||
}
|
||||
.custom-scroll-x {
|
||||
&::-webkit-scrollbar {
|
||||
height: .35rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user