DEV/Web

[Chrome] ํฌ๋กฌ์—์„œ video ํƒœ๊ทธ์™€ ๊ด€๋ จ๋œ ์ด์Šˆ๋“ค

zineeworld 2018. 12. 19. 18:56

โœ๐Ÿป ํฌ๋กฌ์—์„œ video ํƒœ๊ทธ ์“ธ ๋•Œ๋Š” playsinline ํ•„์ˆ˜!! (ํŠนํžˆ autoplay ์ผ ๋• muted)

์–ด๋–ค ์ƒํ™ฉ์—์„œ๋ผ๋„ ์‚ฌ์šฉ์ž๊ฐ€ ์˜ˆ์ธกํ•˜๊ธฐ ์ „์— ๋™์˜์ƒ์ด ์žฌ์ƒ๋˜๋Š” ๊ฑด ์ ‘๊ทผ์„ฑ ์ธก๋ฉด์—์„œ ์ข‹์ง€ ์•Š๋‹ค.

๋”ฐ๋ผ์„œ autoplay๊ฐ€ ์ œ๋Œ€๋กœ ๊ตฌํ˜„๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ๋‹ค. ์ฐจ์„ ์ฑ…์œผ๋กœ ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋™์˜์ƒ ์ž๋™ ์žฌ์ƒ์„ ํ—ˆ์šฉํ•œ๋‹ค๋ฉด, ๋ฐ˜๋“œ์‹œ ์†Œ๋ฆฌ๋Š” ์ œ๊ฑฐ๋œ ์ƒํƒœ์—ฌ์•ผ ํ•œ๋‹ค.

<video autoplay loop muted playsinline poster="{url}">
  <source src="{url}" type="video/mp4">
</video>

https://stackoverflow.com/questions/51083662/video-not-playing-in-chrome-unless-developer-tools-window-open

https://stackoverflow.com/questions/43570460/html5-video-autoplay-on-iphone

 

 

 

๋ฐ˜์‘ํ˜•