-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video elements need the playsinline attribute to autoplay on iOS #8198
Comments
There appear to be one or two previous threads related to this issue, but they seem to be old and closed and don't suggest fixes: The quickest fix would just be to add the playsinline attribute to background videos by default. That would be a lot simpler than the alternatives. I've submitted that change below. |
This issue has been resolved in Elementor v2.6.0 Feel free to update Thanks! |
Hello , html "video" element, playsinline has not been added. at least now I'm using elementor 2.6.0. |
@ayhanmalkoc - Do you have a link to the page by chance? I only added it to the background videos, so it's possible that some other part of the code is missing it. |
Hi, I'm checking the background video but no code has been added. widget added to manual for video.php. `/**
}` |
@Pikamander2 Is there a reason this is only added to the background video and not at the same time to the video element itself? |
@ruihildt - Mostly it was because that's all I needed to fix a bug on a client's website. The playsinline attribute might belong elsewhere as well, but that was enough to fix our immediate issue. That said, according to the MDN page: playsinline: A Boolean attribute indicating that the video is to be played "inline", that is within the element's playback area. Note that the absence of this attribute does not imply that the video will always be played in fullscreen. So I'm not sure that it would appropriate to add it to all of Elementor's videos. It would be nice to have it as a dropdown option, though. You could try submitting a feature request with your use case in a separate issue. |
Hi @shilo-ey ! Thanks for your response on this. May I ask in what way this has been resolved? My video widget code in the inspector literally says
And there is no control in widget settings to adjust. Thanks again. |
Same problem here. |
Prerequisites
Description
Videos won't autoplay on iOS due to the
video
elements not having theplaysinline
attribute.There doesn't appear to be an easy way for the user to add it either.
For that reason, one of the following options would be helpful:
Adding the
playsinline
attribute to the videos by defaultAdding a checkbox to let the user toggle whether the video has the
playsinline
attributeAllowing the user to add custom attributes to the videos (and perhaps other elements as well)
Steps to reproduce
Create an autoplaying video with Elementor
Try it on iOS
Note that it doesn't autoplay due to Apple's strict rules.
Isolating the problem
Environment
It happens on any environment.
The text was updated successfully, but these errors were encountered: