I'm writing a presentation using Xaringan. I want to embed video such that when I transition to the slide containing the video it plays automatically in fullscreen. (i.e., I do not want to have to click on the video to play it).
I could achieve what I want using revealjs with:
## {data-background-video="my_video.mp4"}
but I've spent about 30 hours writing the presentation in Xaringan, including some custom css styles (I'm a complete css novice) so I don't want to convert to revealjs (especially as I haven't used revealjs other than to test the above).
Is there an equivalent in Xaringan? Given it's based on revealjs I assume it's possible but despite many hours on the internet I can't work out how.
Alternatively, is there a way to activate non-fullscreen video from a keyboard press. For example, like an incremental step that plays the video:
This doesn't work. It plays the audio upon a keypress but not the video:
---
--
<video width="100%" height="100%" controls>
<source src="media/my_video.mp4" type="video/mp4">
</video>
---
This plays the audio at the start of the presentation (not from the slide I want) and there's no video (possibly because I have a background image set up on the first slide):
<video width="100%" height="100%" autoplay>
<source src="media/my_video.mp4" type="video/mp4">
</video>