diff --git a/boards/beagleconnect/freedom/02-quick-start.rst b/boards/beagleconnect/freedom/02-quick-start.rst index 6fa46260278d6338a3ebc6fb48ff8916153b57b9..886fe178e343922fd1e8b404931173624bd03aff 100644 --- a/boards/beagleconnect/freedom/02-quick-start.rst +++ b/boards/beagleconnect/freedom/02-quick-start.rst @@ -15,25 +15,10 @@ What's included in the box? Image with what's inside the box and a better description. -.. only:: latex - - .. image:: https://img.youtube.com/vi/bJYZ6PTiV9g/maxresdefault.jpg - :alt: BeagleConnect unboxing YouTube video - :width: 1280 - :target: https://www.youtube.com/watch?v=bJYZ6PTiV9g - -.. only:: html - - .. raw:: html - - <iframe style="display: block; margin: auto;" width="1280" height="720" style="align:center" - src="https://www.youtube.com/embed/bJYZ6PTiV9g" - title="YouTube video player" - frameborder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowfullscreen> - </iframe> - +.. youtube:: bJYZ6PTiV9g + :align: center + :width: 1280 + :height: 720 Attaching antenna ****************** diff --git a/boards/beagleplay/02-quick-start.rst b/boards/beagleplay/02-quick-start.rst index 990a37c74d4ab8e95e9b18bfeff40915cf14f305..b9820b520378eda261c482e16b95b0dcfa1ade7f 100644 --- a/boards/beagleplay/02-quick-start.rst +++ b/boards/beagleplay/02-quick-start.rst @@ -24,24 +24,10 @@ Attaching antennas You can watch this video to see how to attach the attennas. -.. only:: latex - - .. image:: images/attach-antennas.* - :alt: YouTube video of BeaglePlay antenna connection - :width: 1280 - :target: https://youtu.be/8zeIVd-JRc0 - -.. only:: html - - .. raw:: html - - <iframe style="display: block; margin: auto;" width="1280" height="720" style="align:center" - src="https://www.youtube.com/embed/8zeIVd-JRc0" - title="YouTube video player" - frameborder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowfullscreen> - </iframe> +.. youtube:: 8zeIVd-JRc0 + :width: 1280 + :height: 720 + :align: center Tethering to PC **************** diff --git a/boards/beaglev/ahead/02-quick-start.rst b/boards/beaglev/ahead/02-quick-start.rst index 31db59b5e83092faf1c3e0a71bf4c6cbab69aa4d..a4fa41dcb718b738a3c1f3263a10dc03610b877e 100644 --- a/boards/beaglev/ahead/02-quick-start.rst +++ b/boards/beaglev/ahead/02-quick-start.rst @@ -21,25 +21,10 @@ When you purchase a brand new BeagleV Ahead, In the box you'll get: Unboxing ********* -.. only:: latex - - .. image:: https://img.youtube.com/vi/SVC9peUUzE0/maxresdefault.jpg - :alt: BeagleV Ahead Unboxing YouTube video - :width: 1280 - :target: https://www.youtube.com/watch?v=SVC9peUUzE0 - -.. only:: html - - .. raw:: html - - <iframe style="display: block; margin: auto;" width="1280" height="720" style="align:center" - src="https://www.youtube.com/embed/SVC9peUUzE0" - title="YouTube video player" - frameborder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowfullscreen> - </iframe> - +.. youtube:: SVC9peUUzE0 + :width: 1280 + :height: 720 + :align: center Antenna guide ************* diff --git a/boards/beaglev/fire/02-quick-start.rst b/boards/beaglev/fire/02-quick-start.rst index 3b81b615587df32b9ae860fcb6618bc0bb47f6e7..8fcc9f128563f864debdf8255f9e8bfc85e2ff5e 100644 --- a/boards/beaglev/fire/02-quick-start.rst +++ b/boards/beaglev/fire/02-quick-start.rst @@ -13,24 +13,10 @@ When you purchase a brand new BeagleV-Fire, In the box you'll get: Unboxing ********* -.. only:: latex - - .. image:: https://img.youtube.com/vi/5cylv1R-1mc/maxresdefault.jpg - :alt: BeagleV Ahead Unboxing YouTube video - :width: 1280 - :target: https://www.youtube.com/watch?v=5cylv1R-1mc - -.. only:: html - - .. raw:: html - - <iframe style="display: block; margin: auto;" width="1280" height="720" style="align:center" - src="https://www.youtube.com/embed/5cylv1R-1mc" - title="YouTube video player" - frameborder="0" - allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" - allowfullscreen> - </iframe> +.. youtube:: 5cylv1R-1mc + :align: center + :width: 1280 + :height: 720 Tethering to PC diff --git a/conf.py b/conf.py index 0b60e726eeb13c3397d21ca61df1aead98cb9f0f..b80929678058c5a6005edd2f1456f0c1fa0f2a5f 100644 --- a/conf.py +++ b/conf.py @@ -45,6 +45,7 @@ extensions = [ "sphinx_tabs.tabs", "breathe", "sphinx_copybutton", + "sphinxcontrib.youtube", ] # "exhale" diff --git a/intro/contribution/rst-cheat-sheet.rst b/intro/contribution/rst-cheat-sheet.rst index 080aef0dd75bf673594c87c1403bf678f0ab7348..9b9915ca05f2b9a8d0bcd08635f5d88bc8a4ade7 100644 --- a/intro/contribution/rst-cheat-sheet.rst +++ b/intro/contribution/rst-cheat-sheet.rst @@ -314,33 +314,11 @@ 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. +This site uses sphinxcontrib-youtube to embed YouTube videos. The syntax is as follows: .. 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> + .. youtube:: <YouTube_video_ID> .. annotations:: diff --git a/requirements.txt b/requirements.txt index 05dcb1eeaf8bc105cbd268cbf8ce9284a48f97e1..d9b072f725dd428abe40fce0ff7a16a80adc64bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,5 +34,6 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.6 sphinxcontrib-serializinghtml==1.1.9 sphinxcontrib-svg2pdfconverter==1.2.2 +sphinxcontrib-youtube==1.4.1 tornado==6.4 urllib3==2.1.0