Comment on page
3. Video isn't working
This article will explain how to show a Youtube video (or any other external video) in your bot.
Let's say, you have a great Youtube tutorial that you want to show to your users. But when you try and add this to 'Media' in a Bot message, you see the following video:
Not exactly what we are looking for, so let's fix that!
First, you need to copy the embed code. Go to your Youtube video and right-click on it, then choose 'Copy embed code' like in the screenshot below:
Click on the 4th option to copy the embed code
Once you've copied the code, go back to the platform and create an action dialog. In that dialog, click on
IFrameto create an Iframe.
CLick on IFrame to create an IFrame
In the IFrame, past the
srcpart of the previously embedded URL in the Source Input Box. For the video above, we need to change this:
<iframe width="1280" height="786" src="https://www.youtube.com/embed/yaYzSQn9rL4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Add this link to the Action dialog and set a height that works for you. Let's start with 200 and see how that looks:
Your bot will now display the video like this:
Looks a lot better!