sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.29k stars 2.05k forks source link

Video support #7404

Open petsuter opened 4 years ago

petsuter commented 4 years ago

In Sphinx images can be included with .. image:: or .. figure::. But there is no support for videos yet, right?

It would be nice to have a .. video:: or even support videos in .. figure::.

A workaround is to use:

.. raw:: html

   <video controls src="video.mp4"></video>

This works quite well! ✨

But:

In the past video support was probably completely out-of-scope, but maybe nowadays it is easy and appropriate to support it?

Thanks for your consideration.

tk0miya commented 4 years ago

+1: Nowadays, video is an important medium. It's reasonable to support. -0: The only HTML supports it. Other formats do not. -0: It would be better to add it to the original docutils spec. So it should be proposed into docutils project.

astrojuanlu commented 2 years ago

@gmilde notes in sphinx-dev:

I suppose the issue "Video support #7404" may be closed with a link to https://docutils.sourceforge.io/HISTORY.html#release-0-17-2021-04-03

docutils/writers/html5_polyglot/init.py

[...]

Use

(Unless Sphinx patches the image/figure directive handling in a way that breaks Docutils support for moving images.)