sphinx-contrib / video

A sphinx plugin that enables embedding of HTML5 videos
https://sphinxcontrib-video.readthedocs.io
Apache License 2.0
43 stars 29 forks source link

Doesn't work with local files #1

Closed lazka closed 1 year ago

lazka commented 4 years ago

The video files don't get copied to the build dir so all URLs are wrong in the end.

cbscribe commented 4 years ago

I'm having the same problem.

ghost commented 4 years ago

After cloning sphinxcontrib-video and then doing pip install . inside the cloned repository, I changed the conf.py to say

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinxcontrib.video'
]

I put video.webm in the_static subdirectory (a sister to the _build directory and conf.py) and then in some .rst file did this:


*****
title
*****

Here is a video

.. video:: _static/video.webm
build html

Then with some browser do:

open _build/html/index.html

It seems that any video in _static gets copied to _build/html/_static