jpmckeown
jpmckeown

Reputation: 21

Quarto RevealJs video autoplay

I have a video in a slide:

![](video/filename.mp4)

and I have set YAML option for global autoplay:

format: 
  revealjs:
    auto-play-media: true

but on page the video is not autoplaying.

I have searched and most results relate to RevealJs only rather than Quarto and suggest a raw HTML format (e.g. below) which when I try in Quarto is not recognised:

<video data-autoplay src="http://file.mp4"></video>

Please help. P.S. I understand the first slide may not autoplay but this is a slide in middle of deck.

I am trying to switch from Powerpoint to Quarto.

Upvotes: 2

Views: 1015

Answers (1)

Quinten
Quinten

Reputation: 41265

You could use autoplay="true" to your embedded video tag with a loop="true" (if you want) like this:

---
format: revealjs
---

# Test

## Demo

<center>
<video autoplay="true" loop="true">
<source src="https://s3.amazonaws.com/orm-atlas-media/atlas-jupyter/edit-with-atlas.mp4"> 
</video>
</center>

Output:

enter image description here

Upvotes: 0

Related Questions