SeonHyungJo / Tip-Note

:round_pushpin: 개발을 하면서 느끼고 알게된 Tip:round_pushpin:
7 stars 0 forks source link

Chrome에서는 Video을 autoplay하기 위해서는 muted 설정이 필요하다. #71

Open SeonHyungJo opened 4 years ago

SeonHyungJo commented 4 years ago
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <video src="비디오 주소.mp4" type="video/mp4" autoplay muted></video>
</body>
</html>

다른 모던 브라우저에서는 autoplay 속성만 주어도 자동 재생이 된다. 그러나 크롬에서는 그렇지 않다. autoplay만 있어도 되는 줄 알았는데 정책상 muted도 있어야 한단다...

Reference