How can I resolve the issue of a dark screen appearing in Rpubs when I embed YouTube videos using Quarto?

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"
    self-contained: false
    toc: true
    toc-location: left
    toc-title: "Contenido"
#   css: styles.css
#    number-sections: true
  light: flatly
  dark: darkly

And, these are the ways I try to embed the videos:

The first:

{{< video >}}

The second:

<p style="text-align:center;">
<iframe width="600" height="420" src="">

And the third:

<iframe width="560" height="315" src="" 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.

Does the document renders correctly locally ? Is this only an issue in RPubs ?

If so, you could consider the newest alternative like RPubs, integrated with Quarto called Quarto Pub
See Quarto - Quarto Pub

Hope it helps

Hello cderv,

Yes, It renders locally. I could solve it using this thanks to Renzo Caceres Rossi with this video: Añadir vídeos en documento RMarkdown | Embed a video in a RMarkdown document | Embed vídeo RMarkdown - YouTube.

woow, Posit Pub, that was news to me. I will try it.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.