'React: How to autoplay video on all devices but prevent it from launching full-screen on iPhone
I have a React website that autoplays videos on desktop. However, autoplay causes it to not only autoplay, but launch full-screen autoplay on iPhone (I tried Safari and Chrome). In the JSX, I have <video loop muted autoPlay>
. I read online that I should add playsInline
for <video loop muted autoPlay playsInline>
. But the issue is still happening when I try to view the page on mobile. Instead of being able to scroll the page and peruse the content, it instantly launches autoplay. Does anyone have insight into a way to prevent it?
Thanks, -Justin
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|