Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 95907a2b authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

How to add YouTube videos correctly?

This sections provides good reference on how to add a YouTube video correctly to both HTML and PDF versions of docs.
parent 40ce99cf
Branches
No related merge requests found
......@@ -298,6 +298,41 @@ label for this chapter. These are called the explicit links amd you can referenc
When rendered it becomes :ref:`rst-cheat-sheet`.
YouTube Videos
==============
This section shows you the typical way of adding a YouTube video to
docs.BeagleBoard.org in a way that you see on page playable embedded
YouTube video when you look at HTML version of the docs and only a
clicable thumnail linked to the YouTube video when you see the PDF.
.. callout::
.. code-block:: rst
.. only:: latex
.. image:: https://img.youtube.com/vi/<YouTube_video_ID>/maxresdefault.jpg <1>
:alt: BeagleConnect unboxing YouTube video
:width: 1280
:target: https://www.youtube.com/watch?v=<YouTube_video_ID> <2>
.. only:: html
.. raw:: html
<iframe style="display: block; margin: auto;" width="1280" height="720" style="align:center"
src="https://www.youtube.com/embed/<YouTube_video_ID>" <3>
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen>
</iframe>
.. annotations::
<1> <2> <3> Here you have to replace the <YouTube_video_ID> with your actual youtube ID.
More
====
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment