Closed QuLogic closed 3 months ago
I've tested the patch and it works brilliantly for me (also with 2 video sources). Thanks!
I'll merge it with master once the tests are happy and create a release candidate to let people play with it. As it's changing how images are referenced it's important to give people a heads up.
@QuLogic can you have a look to the mypy issues ?
The mypy issue seems unrelated; I can reproduce it on master
. I see previous workflows passed, so maybe something in Sphinx changed recently?
See #37.
I see the version was bumped to 0.2.1rc0 in https://github.com/sphinx-contrib/video/commit/098b467ec9b376df9c764e0a37c543926e7452ee. Could this be published on PyPI (perhaps as 0.2.1) so that it can be referenced in Sphinx repositories? This would unblock me for integrating videos on godot-docs. Thanks in advance :slightly_smiling_face:
It is on PyPI: https://pypi.org/project/sphinxcontrib-video/0.2.1rc0/ (you'd need to pass --pre
to pip install
to see it, or explicitly ask for that version.)
This makes it no longer necessary to place video files in
_static
, but instead in any location.I spent a while going through Shinx's implementation for images, and this copies what it does:
Environment.relfn2path
, and also a dependency is added for the document in theEnvironment
. This allows paths relative to any document.Environment
to a tracker on theBuilder
. This causes the HTML5 builder to copy the file to the_images
directory (and a unique name is guaranteed by the tracker on theEnvironment
).Fixes #33 Because Sphinx then tries to copy the file, it raises a warning if not found, so I think this also fixes (partially) #14. However, if you expected the file to be in the
_static
directory, it might not warn. I did not check that.