1

before I add controls=0 and pointer-events It works on mobile. then I delete controls and pointer-events it still not autoplay on mobile anyway


<div class="vimeo-wrapper display-xs-none">
        <div class="plyr__video-embed" id="player">
          <iframe style="pointer-events: none"
              src="https://www.youtube.com/embed/{{ page.video_header }}?origin=https://plyr.io&amp;autoplay=1&amp;loop=1&amp;mute=1&amp;controls=0&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1&amp;playlist={{ page.video_header }}"
              allowfullscreen
              allowtransparency
              allow="autoplay"
          ></iframe>
        </div>
</div>
  • Remove display-xs-none this class – Revti Shah Dec 26 '19 at 06:53
  • Does this answer your question? [Youtube embedded video: autoplay feature not working in iphone](https://stackoverflow.com/questions/8141652/youtube-embedded-video-autoplay-feature-not-working-in-iphone) – Ali Sheikhpour Dec 26 '19 at 06:55

1 Answers1

0

display-xs-none means: for extra-small display, display equals none. XS is anything less than 576px, so that includes your mobile. Remove that line, and it should work.

Simcha
  • 99
  • 1
  • 12
  • autoplay is problematic for mobile devices. Does this help? https://stackoverflow.com/questions/42160528/html5-autoplay-video-in-mobile-device – Simcha Dec 26 '19 at 07:56