How to Add a Demo Video to Your App Landing Page
Published · Updated
For a narrated product demo, start with a click-to-play player, a useful poster, and captions. Load video data when the visitor asks to watch. Use autoplay only when motion is necessary to explain something immediately, and keep a manual playback option.
Show a specific task
Choose one task the demo should explain, such as importing a file or completing a booking. Remove recording setup and pauses. Put the outcome in the text beside the player so the page still explains the feature when someone cannot watch.
A full walkthrough can sit farther down the page or on a separate viewing page. The hero does not need to carry the entire tutorial.
Add a click-to-play demo
<video controls playsinline preload="none"
poster="/media/demo-poster.webp"
width="1280" height="720"
style="display:block;width:100%;height:auto">
<source src="/media/demo.mp4" type="video/mp4" />
<track kind="captions" src="/media/demo.en.vtt"
srclang="en" label="English" />
</video>
Replace the paths with your files and match the dimensions to the video. Native controls provide playback and caption controls. playsinline requests inline playback where supported. preload="none" asks the browser to defer video data; it is a hint, so verify the requests on your deployed page. The MDN video reference documents these attributes.
Use the caption guide to write and check the VTT file. Add another video source if testing shows a benefit; see WebM vs MP4.
Keep the preview useful
Choose a frame showing the feature in a readable state. Avoid an opening fade or a tiny title card. The poster guide covers extraction and display.
The poster and the player’s dimensions solve different problems: the poster provides an image before playback, while width and height help reserve layout space. A missing poster does not automatically cause layout shift.
If the demo must start automatically
Muted video is more likely to be allowed to autoplay than video with sound, but user settings and browser policy can still block it. Keep a visible play control and handle any rejected play() Promise. Do not put instructions exclusively in an autoplay sequence.
For ongoing loops, provide pause controls and honor reduced-motion preferences. W3C’s Pause, Stop, Hide guidance describes the requirement for automatically moving content alongside other content. Prefer the click-to-play example above if you do not need to implement those behaviors.
Measure before changing loading priorities
Run Lighthouse and inspect the browser’s Network panel on the public page. Record the device, network settings, and cache state so comparisons use the same conditions. Check what downloads before play, whether the layout moves, and how quickly the preview appears.
A large visible poster can be an LCP candidate. Preloading it may help when it is the LCP element, but can compete with more important requests otherwise. The web.dev video performance guide explains that tradeoff. Measure your page before assigning high priority to the poster.