Adding Video to Mobile Flows

Videos can be added to mobile flows by using the video content block. This content block will allow you to 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. With that step selected, hover over the area where you'd like to add the video block and select the green + button. 
The content block selector will display, select the video option.
A new video block will be added in the selected area with a default video.
Select the new video block, in the sidebar there will be an "Embed code" section with the embed code for the example video. Replace the sample embed code with the embed code for your video, adjust the spacing as needed and you're good to go!

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 flow 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.

Sample

<div id="player"></div>
<script>
  var tag = document.createElement('script');
  tag.src = "https://www.youtube.com/{{yourVideoID}}";
  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>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.