Video is critical to user engagement and it is easy to embed Youtube videos in your app. This example plays in full screen mode when tapped.
Here is a link to the Google directions for creating a video or platlist embed:
https://support.google.com/youtube/answer/171780?hl=en
We will run through the basics here. Open your target video in Youtube and then tap the "Share" button under the video:
Then tap the “Embed” option:
"Embed" will create the HTML code you will need to paste into the “HTML Code” box of a platform HTML Action. Use the Copy button the copy the code, and create an HTML action on the platform and use the HTML from Youtube as the "HTML Code" in teh new action.
Note:
Before pasting the HTML code, there is one minor adjustment you might want to make. You will notice a height and width dimension in the code which is commonly 560 x 315. This is the default dimsnsion for a desktop computer. It sometimes looks good on mobile (try it), but you may want to adjust these dimensions for mobile. We recommend replacing the “560” with a “320” and the “315” with a “180”, so that the resulting HTML looks like this:
<iframe width="320" height="180" src="https://www.youtube.com/embed/BtQhtdml3dA?start=9" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Comments
0 comments
Please sign in to leave a comment.