Skip to content

Light version: pages open quickly, without the 3D graphics. You are seeing the light version because the 3D graphics would be slow on this device. The content is the same.

Turn on 3D

Preparing the graphics. This can take a moment on the first visit.

Henry Lõiv

Web design & development

Quick Answer

Why won’t a video autoplay on iPhone?

Development 1 min read

Autoplay is browser-permitted behavior, not a guarantee. Muted video or video without an audio track is generally easier to autoplay than audible media. playsinline also matters for inline playback on iPhone. 12

Start with simple markup

<video autoplay muted playsinline controls preload="metadata"
       poster="/media/preview.jpg">
  <source src="/media/demo.mp4" type="video/mp4">
</video>

Replace the example assets with your own. Controls provide a manual-play option. A decorative background and an informative video may need different control designs, but neither should depend on an unhandled autoplay assumption.

When starting playback in JavaScript, handle rejection of the promise returned by video.play() and show a visible play button. Do not hide the interface while assuming playback must begin. 1

Check more than autoplay

If tapping play fails too, inspect the media request and supported encoding. A missing file will not start working because you added muted.

Test on a real iPhone with relevant browser and device settings. User preferences and power-saving behavior can affect the result, so retain a fallback.

Important information should not exist only inside automatically playing media. Provide a text alternative where needed and appropriate captions for meaningful video content.

Related reading

Frontend development

Sources

  1. MDN: autoplay restrictions and fallbacks
  2. WebKit: inline video and autoplay policies

Fact checked:

Let’s talk about your project

Tell me about your project

Tell me what you’d like to build or improve. You don’t need a finished brief — we’ll work out the scope and next steps together.

01 How can I help?
02 How many pages do you need?
03 Which extras do you need? Choose all that apply
04 When does it need to be ready?
05 Project details
06 Your contact details

Enquiry received

Thank you!

Your enquiry has been received. I usually reply by email within 2 working days.