This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#81 add video issue doc in live-design-demo section
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
web/components/landingpage/motion/live-design-demo/ios-15-safari-video-issue.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Why use html5 video instead of react-player in this place? | ||
|
||
_This document is explaining how to use pure HTML5 video instead of react-player, which is the video player used in the project only in the live-design-demo section._ | ||
|
||
While updating to ios 15 version, some video stuttering in safari was found. For example, let's say you are using the tag below. | ||
|
||
```typescript | ||
<ReactPlayer | ||
url={require("public/videos/video.mp4")} | ||
loop | ||
playing | ||
muted | ||
playsinline | ||
config={{ | ||
file: { | ||
attributes: { | ||
preload: "auto", | ||
}, | ||
}, | ||
}} | ||
/> | ||
``` | ||
|
||
All use the same code as in the example, except for the url, but it has been confirmed that the problem occurs only in the specific location _(the video play only when the video is not visible on the screen)_. | ||
|
||
I've tried several tests, such as changing the parent's position, but it's still there. But when I used the video tag in pure html5 there was no problem. | ||
Below is an example used. | ||
|
||
```typescript | ||
<video | ||
src={require("public/videos/video.mp4")} | ||
autoPlay | ||
muted | ||
loop | ||
playsInline | ||
preload="auto" | ||
/> | ||
``` | ||
|
||
So, until the video problem is stable in ios 15 safari, the problematic video from `live-design-demo` is replaced with pure html5 `video` tag. | ||
|
||
<!-- | ||
๊ทธ๋ฆฌํ์ฌ ios 15 safari์์ ๋น๋์ค ๋ฌธ์ ๊ฐ ์์ ๋๊ธฐ ์ ๊น์ง๋ ๋ฌธ์ ๊ฐ ์๋ live-design-demo ์ ๋น๋์ค๋ ์์ html5 ๋น๋์ค ํ๊ทธ๋ก ๋์นํฉ๋๋ค. --> |