Add Videos to Mobile Flows
Learn how to quickly add videos to your mobile Flows.
Table of Contents
Videos can be added to mobile Flows by using the Video content block. This content block lets you take a video from an existing source like Wistia, YouTube, Vimeo, or other hosting service and embed the video into a mobile Flow.
If you're looking for instructions for web flows reference Embed a Video in a Flow.
How to add videos
- When building a mobile Flow, add or select the step.
- Hover over the area where you want the video and click the green + button. The content block selector appears.
- Select the Video option. A new Video block is added with a default sample video.
- Select the new Video block. In the sidebar, find the Embed code section.
- Replace the sample embed code with the embed code for your video (see the provider steps below), then adjust the spacing as needed.
Wistia
https://wistia.com/support/embed-and-share/media-on-your-website
- In Wistia select the video that you'd like to embed.
- Select Embed & Share, Inline Embed should be selected and there will be an option to adjust the settings as needed.
- Copy the code from the Embed Code section.
- Go to the video block that you're currently working on in the Appcues Mobile Builder and paste the code into the Embed code section.
Sample
<script src="https://fast.wistia.com/embed/medias/qjd52litzy.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div style="padding:56.25% 0 0 0;position:relative;"><div style="height:100%;left:0;position:absolute;top:0;width:100%;"><div style="height:100%;position:relative;width:100%"><div style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/qjd52litzy/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /></div></div></div></div>
Youtube
https://support.google.com/youtube/answer/171780?hl=en
With YouTube we'll use a custom option so you have a few more controls over the behavior.
- In YouTube navigate to the video you want to use.
- Select Share a URL like 'https://youtu.be/EXfcMeYp1_I' will be displayed, in this case 'EXfcMeYp1_I' will be your video ID.
- Go to Appcues and select the video block that you're working on and copy the Sample code below into the Embed Code section.
- Replace {{yourVideoID}} in the sample code with the video ID from YouTube.
- The playerVars defined in the script below (line 13) can be customized to control different aspects of how the video is presented, such as autoplay, looping, and whether player controls are visible. See https://developers.google.com/youtube/player_parameters#Parameters for more details on supported options.
Sample
<div id="player"></div>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
width: '100%',
height: '100%',
videoId: '{{yourVideoID}}',
playerVars: { 'autoplay': 1, 'playsinline': 1, 'loop': 1, 'controls': 0, 'showinfo': 0 },
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerReady(event) {
event.target.playVideo();
}
function onPlayerStateChange(event) {
if (event.data === YT.PlayerState.ENDED) {
player.playVideo();
}
}
</script>
Vimeo
https://vimeo.com/blog/post/how-to-embed-videos/
- In Vimeo navigate to the video that you'd like to share.
- Select the Share icon, select the Embed icon and click the Copy button.
- Go to Appcues and select the video block that you're working with and paste the copied code into the Embed code section.
Sample
<div style="padding:56% 0 0 0;position:relative;"> <iframe src="https://player.vimeo.com/video/755133283?h=a09367476d&badge=0&autopause=0&player_id=0&app_id=58479" width="100%" height="100%" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="How to build mobile app onboarding flows without code with Sam Stuckless.mp4"></iframe> </div><script src="https://player.vimeo.com/api/player.js" width="100%" height="100%"></script>
Confirm it worked
- The Video block shows your video in the builder preview panel.
- Preview the Flow on a device and confirm the video loads and plays.
If the video doesn’t play on your device
- Confirm you pasted the full embed code from your provider, not just the share URL.
- For YouTube, confirm you replaced {{yourVideoID}} with your actual video ID.
- Confirm the device has network access — embedded videos stream from the hosting provider.
Still stuck?
Collect the video provider, the exact embed code you pasted, and a screen recording of the Flow on the device, then contact support.