I am currently creating a document using Quarto in RStudio, where I am embedding a YouTube video and generating an HTML file, which is working without any errors. However, when I publish the document to RPubs, the embedded video appears as a black screen. I am seeking advice on how to resolve this issue.
This is the Yaml:
title: "Apuntes Pildoras informáticas curso de python, módulo 1"
author: "Pedro César Del Campo Neira"
format:
html:
self-contained: false
toc: true
toc-location: left
toc-title: "Contenido"
# css: styles.css
# number-sections: true
theme:
light: flatly
dark: darkly
And, these are the ways I try to embed the videos:
The first:
{{< video https://www.youtube.com/watch?v=G2FCfQj-9ig&ab_channel=pildorasinformaticas >}}
The second:
<div>
<p style="text-align:center;">
<iframe width="600" height="420" src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>
</div>
</p>
And the third:
<iframe width="560" height="315" src="http://www.youtube.com/embed/9bZkp7q19f0?rel=0" frameborder="0" allowfullscreen></iframe>
I am attempting to successfully embed YouTube videos into Rpubs using Quarto in Rstudio. and seeking to resolve any issues that may arise.